<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Lung X-Ray Images Preprocessing Diagnosing Intelligent Systems</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Kirill Smelyakov</string-name>
          <email>kyrylo.smelyakov@nure.ua</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Anastasiya Chupryna</string-name>
          <email>anastasiya.chupryna@nure.ua</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Oleksandr Bohomolov</string-name>
          <email>oleksandr.bohomolov@nure.ua</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Eugen Vakulik</string-name>
          <email>yevhen.vakulik@nure.ua</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Kharkiv National University of Radio Electronics</institution>
          ,
          <addr-line>14 Nauky Ave., Kharkiv, 61166</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Most of the current COVID-19 smart diagnostic systems use convolutional neural networks to detect foci and classify the stages of the disease on X-rays of the lungs. The conditions for obtaining such images and their parameters vary considerably. Therefore, the direct application of convolutional neural networks to unprepared lung X-rays is characterized by low accuracy. To solve this problem, the paper describes models and algorithms for preprocessing lung X-rays in relation to cleaning, preliminary detection in areas of interest, format transformation and standardization of image presentation. The use of such algorithms can significantly improve the accuracy of the subsequent application of convolutional neural networks to detect foci and classify the stages of diseases on prepared X-ray images of the patient's lungs. The paper presents the results of theoretical and experimental studies on real data - on the open depersonalized Kaggle dataset. Based on the presented research results, a generalized model and practical recommendations are provided on the use of particular preprocessing algorithms for the effective diagnosis of COVID19 on heterogeneous chest X-rays.</p>
      </abstract>
      <kwd-group>
        <kwd>1 Intelligent Systems</kwd>
        <kwd>Lung X-Ray</kwd>
        <kwd>Covid-19</kwd>
        <kwd>Image Preprocessing</kwd>
        <kwd>Object Detection and Classification</kwd>
        <kwd>Convolutional Neural Network (CNN)</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Effective treatment of Covid-19, first of all, requires the development and implementation of prompt
and accurate diagnostic tools for this disease. In this regard, currently the most common method of rapid
diagnosis of Covid-19 on a global scale is based on the examination of X-rays of the lungs. This technique
has many well-known advantages, but there are also important disadvantages. Mainly, this is poor visibility
and low contrast of not expressed foci of the disease. This is especially true in the early stages of Covid-19.
The analysis of such images is difficult even for an experienced radiologist. Therefore, when analyzing
Xray images of the lungs, the time of data analysis can significantly increase, as well as the likelihood of
erroneous conclusions and inadequate diagnosis. The aim of the work is to develop mathematical models
and methods for preprocessing lung X-ray images to ensure subsequent effective diagnosis of Covid-19 in
terms of time and accuracy. The objectives of the article are to develop models and methods for cleaning
and improving images, preliminary detection of informative areas, converting images and gray scales to the
required format for the effectiveness of Covid-19 diagnostics based on standard intelligence models, mainly
based on convolutional neural networks (CNN).</p>
    </sec>
    <sec id="sec-2">
      <title>2. Related Works</title>
      <p>Currently, an objective diagnosis of lung diseases can be made on the basis of analysis of samples of the
patient's genetic material. In such a situation, Immuno assay devices, Nucleic acid devices, CE Marking
devices, etc. are widely used [1, 2]. These are reliable devices (and tests), but they can take several hours,
and sometimes days, before the results of the analysis are received. Therefore, this approach cannot be
applied in the systems of rapid diagnostics of Covid-19.</p>
      <p>
        To improve the efficiency of Covid-19 diagnostics, the development of appropriate methods and
services of computer vision [3] and artificial intelligence [
        <xref ref-type="bibr" rid="ref1 ref2 ref3">4-6</xref>
        ] is currently supported, the work of which is
based on the analysis of an X-ray image of the lungs [
        <xref ref-type="bibr" rid="ref4 ref5">7, 8</xref>
        ], or computed tomography (CT) data [
        <xref ref-type="bibr" rid="ref6 ref7">9, 10</xref>
        ]. In
such systems, convolutional neural networks (first of all CNNs Yolov5, EfficientDet, EfficientNet,
FasterRNN) are used to detect and classify diseases in images. CNNs are characterized by high autonomy.
But applying them to the entire image without first cleaning it leads to a significant decrease in the reliability
of Covid-19 classification. What determines the need for preprocessing the image in order to clean it up
and highlight informative areas.
      </p>
      <p>
        Analysis of an X-ray or CT scan of the chest can be completed in minutes. CT analysis is much more
informative, but significantly more expensive and often not as readily available in low income countries.
In contrast, the diagnosis of lung diseases based on X-ray analysis is much more accessible, especially in
low income countries. However, in the early stages of the disease, the analysis of an X-ray image is much
less informative than the analysis of CT data according to [
        <xref ref-type="bibr" rid="ref8 ref9">11, 12</xref>
        ]. Since at an early stage the foci of the
disease are small and have low contrast. This is especially critical for outdated X-ray machines. In such a
situation, even a highly qualified radiologist cannot always reliably assess the patient's condition, especially
in the early stages of the disease [
        <xref ref-type="bibr" rid="ref5">8</xref>
        ]. What determines the need to use machine learning in diagnostic
systems. And also in services designed to search for images in medical data warehouses; In this respect, an
efficient algorithm for searching for similar medical images based on a new method based on deep metric
learning was proposed in [
        <xref ref-type="bibr" rid="ref10">13</xref>
        ].
      </p>
      <p>
        In the current situation, the relevant task of developing innovative mathematical and software for an
intelligent Covid-19 diagnostic system [
        <xref ref-type="bibr" rid="ref11">14</xref>
        ], based on the use of deep learning methods [
        <xref ref-type="bibr" rid="ref12">15</xref>
        ] and the use of
high performance computing [
        <xref ref-type="bibr" rid="ref13">16</xref>
        ], which is capable of: 1) to receive X-ray images of the lungs of various
formats and quality at the input; 2) quickly analyze X-ray images, detect disease foci at different stages,
and evaluate their localization and area with high accuracy [
        <xref ref-type="bibr" rid="ref14 ref15">17, 18</xref>
        ]; 3) objectively diagnose the patient's
health status [
        <xref ref-type="bibr" rid="ref16">19</xref>
        ].
      </p>
      <p>
        While papers [
        <xref ref-type="bibr" rid="ref11 ref12 ref13">14-16</xref>
        ] describe the most important Challenges, Requirements and Approaches to
intelligent diagnostic systems for Covid-19, papers [
        <xref ref-type="bibr" rid="ref14 ref15 ref16">17-19</xref>
        ] describe modern solutions for the use of CNN
for diagnostic purposes, as well as the use of deep learning methods, which can significantly improve the
reliability of the classification of lung diseases. At the same time, work [20] presents the results of low level
optimization of the parameters of convolution masks, which are used in CNN convolutional layers.
      </p>
      <p>
        To create a perspective intelligent diagnostic system, at the first stage, it is necessary to develop a
subsystem for preprocessing lung X-ray images, which will perform image cleaning, image enhancement
(primarily gradation correction), detection of informative areas (lungs, disease foci), transformation of input
images and scales brightness to the required format for the effectiveness of subsequent diagnostics based
on standard models of computational intelligence. The main requirements and promising ways to build such
a system from the point of view of using computer vision are described in [21, 22], and from the point of
view of artificial intelligence – in [
        <xref ref-type="bibr" rid="ref11">14, 23</xref>
        ].
      </p>
      <p>
        The development and implementation of efficient preprocessing algorithms will make it possible to
detect foci of Covid-19 disease on lung X-rays with high accuracy and classify disease stages using standard
computational intelligence models [
        <xref ref-type="bibr" rid="ref1 ref2">4, 5, 24</xref>
        ]. In this regard, the works [24, 25] describe the combined
application of various CNNs for image detection and classification. This approach is important for the
development of a promising two stage technology for detecting an informative area of the lungs and
classifying the disease in this area in the image.
      </p>
      <p>In addition to solving the main problem of diagnostics, efficient preprocessing and application of the
CNN, mainly in relation to the detection of the informative part of the image, will effectively compress
their images for storage and transmission over communication channels in modern information and
communication systems [26]. The solution of the task, including a description of the standardization of the
application of the CNN, will ensure the transfer of technologies for solving related problems in the areas of
image recognition, building promising systems for machine vision and controlling robots (and drones) [27,
28], artificial intelligence, related to ICT [29].</p>
    </sec>
    <sec id="sec-3">
      <title>3. Methods and Materials</title>
      <p>Consider typical input data, preliminary research results, materials and methods proposed for solving
the problem.
3.1.</p>
    </sec>
    <sec id="sec-4">
      <title>Typical Data Description</title>
      <p>X-ray images of an open depersonalized dataset are considered as initial data for analysis and
experiments [3, 30]. All files are in DICOM format. Typical examples of images are shown in Figure 1.
For the highest quality visualization of images, a unified exponential-logarithmic model proposed in [31]
with the parameter  = 1 by default.</p>
      <p>As a result of the analysis of the dataset images [30], it can be seen that they are all presented in the
DICOM format. However, they can differ significantly from each other:</p>
      <p>1) by size (the size / scale of representation of some images may differ by an order of magnitude from
the area of other images);
2) some images may be inverted while others are not;
3) some images may have a frame around the perimeter (the dimensions and colors of the frame are not
known a priori and may vary over a wide range of values);
e) f)
Figure 1: Examples of images of the considered dataset (opened and rendered by author's software): а)
1ebbe0481d58 (size 3052х2899; density [0,…, 1604]); b) 7e7d3afebf5d (size 1356х1486; density [0,…,
4095]); c) f5451a98d684 (size 2880х2539; density [0,…, 16383]); d) f8ded2e15154 (size 1387х1140;
density [0,…, 4095]); e) bb4b1da810f3 (size 2836х2335; density [0,…, 17708]); f) b98508598396 (size
2832х2319; density [0,…, 4095]); the names of the images are given according to the Kaggle dataset [30];
images 1ebbe0481d58 and bb4b1da810f3 are inverted to a single presentation format
4) some images can be rotated to an arbitrary angle;
5) some images may contain various objects and inscriptions of arbitrary brightness in arbitrary places;
6) images can have a different density range (single-byte / double-byte, moreover, with different
significant boundaries of the density range);
7) different images are obtained using different equipment in different conditions.</p>
      <p>It is also important to note that the dataset under consideration is a mix of images of the lungs of healthy
and sick people, and at different stages of the disease. To understand the situation, we note that pneumonia
is associated with the appearance of an area of infiltration in the lungs (Figure 1). The main sign of
pneumonia in the pictures is the effect of frosted glass with blurred borders. It may be represented by one
large spot, or a group of small spots and some other effects.</p>
      <p>For images of the lungs of sick people, the coordinates of rectangular areas of lung damage are given
(they are shown by red rectangles). Their number may vary. This markup (we are considering images of
the Train category) was made for the purposes of machine learning. Due to the presence of a large number
of influencing factors, the use of standard models for the detection of foci of the disease and classification
(primarily SNS) to the original images leads to a low quality of the results. Experiments have shown that
the classification accuracy does not exceed 0.3, Metrics Average Precision [32].</p>
      <p>In such a situation, it’s advisable to preliminarily clean and standardize the image (its brightness / density
scale, scale limits) in order to obtain acceptable results for the detection of disease foci and classification.
In the framework of this work, first of all, we are trying to calculate the limiting density / brightness of the
lungs and normalize the image in such a way as to differentiate the pixel density of the lungs, and turn
everything else into black or white. To provide for further processing the area in the image as close as
possible to the lung area. By assumption, this will give the best classification result.
3.2.</p>
    </sec>
    <sec id="sec-5">
      <title>Preliminary Histogram Studies</title>
      <p>To understand the essence of the proposed preprocessing methods and algorithms, in addition to the
images themselves, we also consider the density histograms (Figure 2) of these images (Figure 1).</p>
      <p>Artificial objects in the image (perimeter frames, inscriptions, equipment fragments, etc.) give peak
density / brightness, distorting the histogram.</p>
      <p>For example, boxes give long histogram tails and pronounced peaks in the start and end frequencies of
the histogram. Other objects produce frequency peaks in the interior of the histogram. All this makes it
difficult to assess the limits of lung density without artificial objects.</p>
      <p>Therefore, the basic set of preprocessing algorithms will be aimed not only at standardizing the image
presentation format, but also at solving the problems of eliminating artificial objects and their influence on
the image histogram (by eliminating objects / cutting off the non-informative part of the histogram in order
to leave only the part that corresponds to the densities lungs).
3.3.</p>
    </sec>
    <sec id="sec-6">
      <title>Proposed Methods and Techniques</title>
      <p>Let's consider the key stages and methods of X-ray image preprocessing, taking into account the above
variations in the properties and parameters of images.</p>
    </sec>
    <sec id="sec-7">
      <title>3.3.1. Histogram Shift Compensation</title>
      <p>For standardization and resistance to negative values, we will eliminate the shift in the density range to
the non-negative part in the presence of negative values as follows:
– find the minimum density:  ;
– if:  &lt; 0, correct the density of the image like this:  + | |.</p>
      <p>Now all densities are not negative numbers. The new density matrix is saved. Based on it, we make
further transformations.</p>
    </sec>
    <sec id="sec-8">
      <title>3.3.2. Image Inversion and Bias Compensation</title>
      <p>Some images come in inverted form. Some are offset. For uniformity, we will eliminate inversion and
bias as follows:
– find the minimum and maximum density: min f, max f;
– if the image is inverted (this information is in the tags of the DICOM file), we perform the inverse
transformation with a shift of the left value to zero:  = | − max f | ;
– if the image is not inverted and  &gt; 0 shift to zero:  =  − min f.</p>
      <p>The new density matrix is saved. Based on it, we make further transformations.</p>
    </sec>
    <sec id="sec-9">
      <title>3.3.3. Image Density Scale Normalization</title>
      <p>The input images have significantly different density ranges. This is due to different image standards
(within the DICOM standard), the presence of frames and artificial objects. For the effectiveness of the
subsequent analysis, it is advisable:
– find the boundaries of the informative range [ , … ,  ], that corresponds to the densities of the lungs;
– eliminate the offset relative to zero and normalize this range – bring it to a standard size with standard
division and start at zero.</p>
      <p>To do this, we will use the following algorithm.</p>
      <p>Step 1. Clipping. All pictures have a significant background area and may have borders around the
edges. These effects can significantly distort the density histogram. To construct an adequate histogram of
an X-ray image (without background and frame effects), we will consider images without a cut-off edge;
the width of the clipping band is given in relative form by the threshold Т1, [%].</p>
      <p>Step 2. Building a density histogram. A histogram of densities is built in the cut window; for visual
analysis, all histograms are compressed to a width of 1024 bars (0 – 1023) by aggregation.</p>
      <p>Step 3. Histogram Truncation. All histograms have peak extreme bars. Due to clipping, in most cases
they go away. But there are exceptions. For large frames and a number of other difficult situations. For
insurance, we set to zero the k extreme left and right non-zero densities.</p>
      <p>Step 4. Histogram smoothing. With a low initial width of the density range, the histogram has a striped
spectrum. For example, when using a one-byte density storage format. Also, the histogram may have
significant frequency beats. This has a negative impact on the robustness of data analysis. In the presence
of artificial gray objects (letters, wires, electrodes, …), peak values may appear on the histogram. To
minimize the influence of these effects, we will smooth the histogram with an arithmetic mean filter. The
linear size of the filter mask according to the experimentally verified rule shown in Figure 3.</p>
      <p>Density Range: Filter mask linear size:
8192 and more - 3x1
4096-8192 - 5x1
2048-4096 - 7x1
1024-2048 - 9x1</p>
      <p>Step 5. Suppression. To find the true boundaries of the informative range of lung densities, we will set
insignificant densities to zero, applying the multiplicative rule in this way. Threshold Т2, [%] is set. The
histogram densities are zeroed starting from the minimum value upwards until the sum of the zeroed
densities is less than the T2 threshold. Upon completion of this process, all densities that are equal to the
maximum zeroed density are zeroed out.</p>
      <p>Step 6. Selection of informative range. Find the maximum length range of densities other than zero. Its
extreme values are preliminary estimates of the boundaries of the desired informative range [ , … ,  ].
Values outside this range are set to zero. Finding such a maximum extended range is necessary in order to
eliminate large residual fragments of the frame / background, if any. This approach is unstable for a striped
histogram. However, after initial histogram aggregation and histogram smoothing (step 4), no banding is
observed.</p>
      <p>Experimental results. Experiments with model parameters showed the following.</p>
      <p>1) The largest contribution to the result (almost 100%) comes from step 1 – Clipping. To stabilize the
boundaries of the histogram, it suffices to set Т1 = 23%.</p>
      <p>2) As a rule, after clipping, the peak frequencies at the edges go away. But there were a few exceptions.
There was a column on the left. To eliminate it, we will assume: k = 1.</p>
      <p>3) Smoothing allows you to eliminate the effect of the striped spectrum and stabilize frequencies.
Extrema from artificial objects remain, but their contribution is insignificant.</p>
      <p>4) Suppression allows you to eliminate residual phenomena. Often – eliminate the histogram tails that
are left after removing the frame / background of the image. To perform the suppression, we set Т2 = 0.1%.
We slightly increase the threshold for resistance to unexplored negative effects.</p>
      <p>The result is a deliberately narrowed informative range [ , … ,  ]. Now we need to clarify the boundaries
of this informative range.</p>
      <p>Step 7. Refinement of the boundaries of the informative range. Right border  – assessment of the most
dense bones:  ′ =  0.1, where  0.1 – right border for Т2 = 0.1% (Т1 = 23%, k = 1).</p>
      <p>The left side is more difficult. After the image of the frame and background – the left border is an
approximation of the minimum brightness of the lung.</p>
      <p>For the approximation of the left  ′ boundary the best formula</p>
      <p>′ = {0     &lt;. 0,  =  0.1 −  0.1 ∙ ( 0.1 −  0.1), (1)
where  0.1 – left boundary for Т2 = 0.1% (Т1 = 23%, k = 1);  0.1 – right boundary for Т2 = 0.1% (Т1 =
23%, k = 1);  0.1 – coefficient of proportionality for Т2 = 0.1.</p>
      <p>Taking into account the errors  0.1 ∈ [0.015, … ,0.107]. Value  0.1 = 0.05 is on average the best. It
delivers a minimum of error for most normal intervals. We use it by default.</p>
      <p>In most cases, the value  0.0 (left boundary for Т2 = 0.0%) gives an almost perfect approximation of the
minimum brightness of the lungs. But sometimes there are significant deviations. For example, for «File:
7e7d3afebf5d» approximation error 29 intervals. In addition, there is a possibility of a very big error if a
picture with a large frame comes in which has a long tail on the histogram on the left.</p>
      <p>So, we get a new informative density interval [ ′, … ,  ′].</p>
      <p>Step 8. Normalization. Let's assume that: 1) [ ′, … ,  ′] – boundaries of the informative range, expressed
by density, not by interval number; 2)  – image pixel density  ∈ [ ′, … ,  ′]; 3) [  , … ,   ] – boundaries
of the new (after normalization) range; 4)  ′– new normalized image pixel density  ′ ∈ [  , … ,   ].</p>
      <p>Redefine the new densities like this (shift and scale compensation)</p>
      <p>,   &lt;  ′,
 ′ = { ( −  ′) (  −  +1)   ′ ≤  ≤  ′.</p>
      <p>( ′− ′+1)
  ,   &gt;  ′.</p>
      <p>By default, we will use such a new range [  , … ,   ]: 0 – 2047.</p>
      <p>The result is a new matrix of normalized image densities  ′ ∈ [  , … ,   ].</p>
      <p>This matrix is saved and further used for all types of image analysis.</p>
      <p>Visually, now the same objects in different images have similar brightness. But not identical brightness,
since the original images have individual characteristics and distortions. Background and border areas –
black or white.</p>
      <p>For machine learning, it is advisable that all features change on a scale of 0 – 1. If the CNN does not
transform the source data on its own, when transferring data, we will transform the densities as follows:
 =  /(  −   + 1). As well as the use of CNN at the initial stage of preprocessing, it is advisable to
reduce the initial image to the required scale to optimize the complexity. Perhaps one that will subsequently
be fed to the input of the SNS during classification.
(2)</p>
    </sec>
    <sec id="sec-10">
      <title>4. Experiment</title>
      <p>Section 3 of the work describes typical initial data – X-ray images of the lungs of the considered dataset,
including their structure and the most important features. In addition, histograms of the distributions of
these images are given and their features that are important for the subsequent analysis of histograms are
described. Based on this description, a set of methods for preprocessing images of the considered dataset is
proposed for cleaning images, improving their quality and bringing the image format to one standard for
further processing using standard SNS for detection and classification purposes.</p>
      <p>Based on the proposed methods, has been developed software that allows preprocessing of X-ray images
of the dataset [30], as well as visualization of the original images and the results of their processing,
including distribution histograms (Figure 4), for control.
b)
Figure 4: Visualization of the histogram of the 7e7d3afebf5d image of the dataset [30] before (a) and after
(b) preprocessing of this image; you can see the effective selection of the informative range of the image
with the suppression of peak frequencies corresponding to the black frame</p>
      <p>To confirm the effectiveness of the proposed models and methods for preprocessing images, a series of
experiments was carried out according to the following scenario.</p>
      <p>Dataset images [30] are fed to the input.</p>
      <p>Experiment 1. At the first stage, X-ray images of the lungs are not preprocessed, but are immediately
fed to the input of CNN EfficientNet for classification. After that, Metrics Average Precision [32] is
calculated as described above.</p>
      <p>Experiment 2. At the second stage, X-ray images of the lungs are preprocessed according to the
algorithm proposed above; produced:
– shift compensation;
– displacement compensation;
– image inversion if necessary;
– normalization of the X-ray image brightness distribution;
– gradation correction.</p>
      <p>After such preliminary processing, the boundaries of the informative range [a,…, b] were determined,
which correspond to the densities of the lungs. This eliminated all the negative effects of displacement.</p>
      <p>After preprocessing, the images are fed to the input of CNN EfficientNet for classification. After that,
Metrics Average Precision is calculated [32].</p>
      <p>Next, a comparative analysis of the results of two experiments is carried out, conclusions are drawn and
recommendations are formulated regarding the prospects for further work.</p>
      <p>In addition to numerical evaluations of efficiency (Average Precision), a visual analysis of X-ray images
after their preprocessing is performed, as well as an analysis of their histograms for anomalies.</p>
      <p>The results of the experiments are given in Section 5.</p>
      <p>A comparative analysis of the effectiveness and prospects for further development are given in Section</p>
    </sec>
    <sec id="sec-11">
      <title>5. Results</title>
      <p>The typical application results of applying the proposed algorithm are shown in Figure 5, Figure 6.
Figure 5 shows pairwise histograms of the original image and the lung area after preprocessing (after the
stage of extracting the informative range). Figure 6 shows X-ray images which brightness/densities have
been corrected based on the distribution and boundaries of the new histogram by gradation correction.</p>
      <p>After preprocessing, we were able to localize the informative ranges of the lung region of interest with
high accuracy and improve the images themselves, make them more saturated and contrast (Figure 6) in
comparison with the original images (Figure 1). The application of standard CNN models for classification
to such images showed an increase in accuracy by more than 1.5 times. Which made the final accuracy in
the range of 0.3 – 0.4. Metrics Average Precision (CNN EfficientNet).
c)
d)
f)
Figure 5: Density histograms of the original and processed images after the stage of extracting the
informative range (x axis – density, y – frequency; images are shown in Figure 1): а) Histograms
1ebbe0481d58, b) Histograms 7e7d3afebf5d, c) Histograms f5451a98d684, d) Histograms f8ded2e15154,
e) Histograms bb4b1da810f3, f) Histograms b98508598396</p>
    </sec>
    <sec id="sec-12">
      <title>6. Discussions</title>
      <p>Algorithms proposed in paragraphs “3.3.1. Histogram Shift Compensatio” and “3.3.2. Image Inversion
and Bias Compensation” are systemically important. In contrast to them, the algorithm proposed in
paragraph “3.3.3. Image Density Scale Normalization” is a new author's algorithm.</p>
      <p>With these preprocessing algorithms, the information content of lung zones is increased by identifying,
marking and eliminating the influence of artificial objects (frames, text, etc.) and normalizing the image
scale.</p>
      <p>As a result of these operations, not only the probability of adequate lung extraction increases, but also
the accuracy of predicting the presence of the disease and the stage of its development increases by 2-3
times.</p>
      <p>Although we got a noticeable increase in classification accuracy, this result cannot be considered
acceptable. It is necessary to further improve the model and algorithms for the preprocessing of an X-ray
image of the lungs.</p>
      <p>Model 1. The first thing that gives a significant improvement is a two-stage data analysis scheme, when
at the first stage we learn to detect the region of the lungs in the image (Figure 7), and after that we use the
CNN to search for disease foci and classify images.</p>
      <p>This approach was proposed in the solution [33] at the Kaggle competition [3]. It was proposed to take
a third-party labeled dataset, train the SNS to detect the lung area on an X-ray, and perform all subsequent
detection and classification operations based on the analysis of the lung area only. This approach allows
you to focus on the lung area, discarding frames, edges and most of the background. The use of such
preprocessing made it possible to significantly increase the accuracy of the subsequent classification to
values in the range of 0.5 – 0.6. Metrics Average Precision [34].</p>
      <p>Model 2. Additionally, the classification accuracy can be increased to approximately the level of 0.635
(Metrics Average Precision) by using a stacking CNN ensemble [35]. Such an increase in accuracy is
mainly due to the use of the individual features of each CNN in the ensemble.</p>
      <p>At the stages of detection and classification, the stacking ensemble was composed of the 4 most effective
SNS. Types of networks and their performance indicators can be seen in the description of the solution here
[33]. Comparative efficient estimates with other CNNs presented here [33].</p>
    </sec>
    <sec id="sec-13">
      <title>7. Conclusions</title>
      <p>An analysis of modern solutions in the field of computer vision shows that the accuracy of classification
of X-ray images of the lungs, as well as images of other types, directly depends on the efficiency of image
preprocessing. In this regard, the best classification accuracy is achieved through the use of a hybrid
preprocessing model, which combines classical algorithms with innovative artificial intelligence algorithms
that have been significantly developed in the last decade. Proposed hybrid preprocessing model in a
generalized form is as follows.</p>
      <p>Stage 1. Since the DICOM format is too wide, at the first stage it is advisable to bring the image
brightness / density scales to a certain standard, eliminate image inversion, eliminate scale shift, normalize
brightness (most often – bring to a scale [0,…1]).</p>
      <p>In this regard, the algorithm proposed in the work (for stage 1) is system-forming; it allows you to
quickly prepare the input image for subsequent analysis in accordance with the requirements.</p>
      <p>Stage 2. Further, it is advisable to detect and exclude from consideration the background, frames and
"garbage" objects. Zeroing their brightness, marking their pixels in the picture. Such detection can be done
by classical methods, or artificial intelligence methods. For example, objects of the same tone (frames,
inscriptions) can be quickly localized using classical segmentation methods, followed by the use of CNN
to identify and filter them.</p>
      <p>To perform preprocessing, the methods proposed in subsection 3.3, that were applied for histogram shift
compensation, image inversion and bias compensation, image density scale normalization.</p>
      <p>In comparison with other methods of histogram improvement, proposed image density scale
normalization method has significantly improved the efficiency of image analysis in terms of the stability
of the selection and classification of lungs and zones of interest within them.</p>
      <p>The information content of lung zones is increased (after preprocessing) by identifying, marking and
eliminating the influence of artificial objects (frames, text, etc.) and normalizing the image scale. As a result
of these operations, not only the probability of adequate lung extraction increases, but also the accuracy of
predicting the presence of the disease and the stage of its development increases by 2-3 times.</p>
      <p>Stage 3. Further, it is advisable to localize the area of interest – the region of the lungs. This can be
effectively done by using detection type CNNs (Yolo, EfficientDet, etc). To improve visibility and enhance
the contrast of objects in the area of interest, it may be advisable to repeat step 1 for the area of lung
localization.</p>
      <p>The solution of this problem based on an ensemble of neural networks is described in [33].</p>
      <p>Stage 4. Now you can proceed to the detection of foci of the disease and the classification of the stages
of the disease based on the consideration of the area of localization of the lungs.</p>
      <p>To improve accuracy, it’s advisable to use verified CNNs ensembles instead of individual CNNs [33].
8. References
[1] COVID-19 In Vitro Diagnostic Devices and Test Methods Database. URL:
https://covid-19diagnostics.jrc.ec.europa.eu.
[2] S. Tabik et al., "COVIDGR Dataset and COVID-SDNet Methodology for Predicting COVID-19 Based
on Chest X-Ray Images," in IEEE Journal of Biomedical and Health Informatics, vol. 24, no. 12, pp.
3595-3605, Dec. 2020, doi: 10.1109/JBHI.2020.3037127.
[3] SIIM-FISABIO-RSNA COVID-19, Detection. URL:
https://www.kaggle.com/c/siim-covid19detection/overview/description#.
[20] K. Smelyakov, A. Chupryna, M. Hvozdiev and D. Sandrkin, "Gradational Correction Models
Efficiency Analysis of Low-Light Digital Image," 2019 Open Conference of Electrical, Electronic and
Information Sciences (eStream), 2019, pp. 1-6, doi: 10.1109/eStream.2019.8732174.
[21] V. Lishchenko, T. Kalimulin, I. Khizhnyak and H. Khudov, "The Method of the organization
Coordinated Work for Air Surveillance in MIMO Radar," 2018 International Conference on
Information and Telecommunication Technologies and Radio Electronics (UkrMiCo), 2018, pp. 1-4,
doi: 10.1109/UkrMiCo43733.2018.9047560.
[22] T. Esteves et al., "AUTOMOTIVE: A Case Study on AUTOmatic multiMOdal Drowsiness detecTIon
for smart VEhicles," in IEEE Access, vol. 9, pp. 153678-153700, 2021, doi:
10.1109/ACCESS.2021.3128016.
[23] O. Vynokurova and D. Peleshko, "Hybrid Multidimensional Deep Convolutional Neural Network for
Multimodal Fusion," 2020 IEEE Third International Conference on Data Stream Mining &amp; Processing
(DSMP), 2020, pp. 131-135, doi: 10.1109/DSMP47368.2020.9204215.
[24] K. Smelyakov, D. Tovchyrechko, I. Ruban, A. Chupryna and O. Ponomarenko, "Local Feature
Detectors Performance Analysis on Digital Image," 2019 IEEE International Scientific-Practical
Conference Problems of Infocommunications, Science and Technology (PIC S&amp;T), 2019, pp.
644648, doi: 10.1109/PICST47496.2019.9061331.
[25] R. Chauhan, K. K. Ghanshala and R. C. Joshi, "Convolutional Neural Network (CNN) for Image
Detection and Recognition," 2018 First International Conference on Secure Cyber Computing and
Communication (ICSCCC), 2018, pp. 278-282, doi: 10.1109/ICSCCC.2018.8703316.
[26] O. Lemeshko, O. Yeremenko and A. M. Hailan, "Two-level method of fast ReRouting in
softwaredefined networks," 2017 4th International Scientific-Practical Conference Problems of
Infocommunications. Science and Technology (PIC S&amp;T), 2017, pp. 376-379, doi:
10.1109/INFOCOMMST.2017.8246420.
[27] Q. Fu, S. Wang, J. Wang, S. Liu and Y. Sun, "A Lightweight Eagle-Eye-Based Vision System for
Target Detection and Recognition," in IEEE Sensors Journal, vol. 21, no. 22, pp. 26140-26148, 15
Nov.15, 2021, doi: 10.1109/JSEN.2021.3120922.
[28] G. Krivoulya, I. Ilina, V. Tokariev and V. Shcherbak, "Mathematical Model for Finding Probability of
Detecting Victims of Man-Made Disasters Using Distributed Computer System with Reconfigurable
Structure and Programmable Logic," 2020 IEEE International Conference on Problems of
Infocommunications. Science and Technology (PIC S&amp;T), 2020, pp. 573-576, doi:
10.1109/PICST51311.2020.9467976.
[29] K. Wang, Y. Wang, S. Zhang, J. Zhang and S. Sun, "Automatic Label Welding Robot System for
Bundled Rebars," in IEEE Access, vol. 9, pp. 160072-160084, 2021, doi:
10.1109/ACCESS.2021.3130919.
[30] SIIM-FISABIO-RSNA COVID-19, Data. URL:
https://www.kaggle.com/c/siim-covid19detection/data.
[31] K. Smelyakov, A. Datsenko, V. Skrypka and A. Akhundov, "The Efficiency of Images Reduction
Algorithms with Small-Sized and Linear Details," 2019 IEEE International Scientific-Practical
Conference Problems of Infocommunications, Science and Technology (PIC S&amp;T), 2019, pp.
745750, doi: 10.1109/PICST47496.2019.9061250.
[32] MAP. URL:
https://jonathan-hui.medium.com/map-mean-average-precision-for-object-detection45c121a31173.
[33] 1st place solution. URL: https://www.kaggle.com/c/siim-covid19-detection/discussion/263658.
[34] K. Oksuz, B. C. Cam, S. Kalkan and E. Akbas, "One Metric to Measure them All: Localisation Recall
Precision (LRP) for Evaluating Visual Detection Tasks," in IEEE Transactions on Pattern Analysis
and Machine Intelligence, doi: 10.1109/TPAMI.2021.3130188.
[35] Ensemble methods: bagging, boosting and stacking. URL:
https://towardsdatascience.com/ensemblemethods-bagging-boosting-and-stacking-c9214a10a205.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [4]
          <string-name>
            <surname>J. M. H. Noothout</surname>
          </string-name>
          et al.,
          <article-title>"Deep Learning-Based Regression and Classification for Automatic Landmark Localization in Medical Images,"</article-title>
          <source>in IEEE Transactions on Medical Imaging</source>
          , vol.
          <volume>39</volume>
          , no.
          <issue>12</issue>
          , pp.
          <fpage>4011</fpage>
          -
          <lpage>4022</lpage>
          , Dec.
          <year>2020</year>
          , doi: 10.1109/TMI.
          <year>2020</year>
          .
          <volume>3009002</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>P.</given-names>
            <surname>Bir</surname>
          </string-name>
          and
          <string-name>
            <given-names>V. E.</given-names>
            <surname>Balas</surname>
          </string-name>
          ,
          <article-title>"A Review on Medical Image Analysis with Convolutional Neural Networks,"</article-title>
          <source>2020 IEEE International Conference on Computing, Power and Communication Technologies (GUCON)</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>870</fpage>
          -
          <lpage>876</lpage>
          , doi: 10.1109/GUCON48875.
          <year>2020</year>
          .
          <volume>9231203</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Pan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Fu</surname>
          </string-name>
          , B. Cheng,
          <string-name>
            <given-names>X.</given-names>
            <surname>Tao</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Guo</surname>
          </string-name>
          ,
          <article-title>"Enhanced Deep Learning Assisted Convolutional Neural Network for Heart Disease Prediction on the Internet of Medical Things Platform,"</article-title>
          <source>in IEEE Access</source>
          , vol.
          <volume>8</volume>
          , pp.
          <fpage>189503</fpage>
          -
          <lpage>189512</lpage>
          ,
          <year>2020</year>
          , doi: 10.1109/ACCESS.
          <year>2020</year>
          .
          <volume>3026214</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [7]
          <string-name>
            <surname>J. De Moura</surname>
          </string-name>
          et al.,
          <article-title>"Deep Convolutional Approaches for the Analysis of COVID-19 Using Chest XRay Images From Portable Devices,"</article-title>
          <source>in IEEE Access</source>
          , vol.
          <volume>8</volume>
          , pp.
          <fpage>195594</fpage>
          -
          <lpage>195607</lpage>
          ,
          <year>2020</year>
          , doi: 10.1109/ACCESS.
          <year>2020</year>
          .
          <volume>3033762</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Sreena</surname>
            <given-names>V. G</given-names>
          </string-name>
          , N. Ponraj and
          <string-name>
            <surname>Deepa P. L</surname>
          </string-name>
          ,
          <article-title>"Study on Public Chest X-ray Data sets for Lung Disease Classification,"</article-title>
          <source>2021 3rd International Conference on Signal Processing and Communication (ICPSC)</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>54</fpage>
          -
          <lpage>58</lpage>
          , doi: 10.1109/ICSPC51351.
          <year>2021</year>
          .
          <volume>9451726</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>F.</given-names>
            <surname>Silva</surname>
          </string-name>
          et al.,
          <article-title>"EGFR Assessment in Lung Cancer CT Images: Analysis of Local and Holistic Regions of Interest Using Deep Unsupervised Transfer Learning,"</article-title>
          <source>in IEEE Access</source>
          , vol.
          <volume>9</volume>
          , pp.
          <fpage>58667</fpage>
          -
          <lpage>58676</lpage>
          ,
          <year>2021</year>
          , doi: 10.1109/ACCESS.
          <year>2021</year>
          .
          <volume>3070701</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>F.</given-names>
            <surname>Shariaty</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Orooji</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Mousavi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Baranov</surname>
          </string-name>
          and
          <string-name>
            <given-names>E.</given-names>
            <surname>Velichko</surname>
          </string-name>
          ,
          <article-title>"Automatic Lung Segmentation in Computed Tomography Images Using Active Shape Model,"</article-title>
          <source>2020 IEEE International Conference on Electrical Engineering and Photonics (EExPolytech)</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>156</fpage>
          -
          <lpage>159</lpage>
          , doi: 10.1109/EExPolytech50912.
          <year>2020</year>
          .
          <volume>9243982</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>M.</given-names>
            <surname>Kircher</surname>
          </string-name>
          et al.,
          <article-title>"Regional Lung Perfusion Analysis in Experimental ARDS by Electrical Impedance and Computed Tomography,"</article-title>
          <source>in IEEE Transactions on Medical Imaging</source>
          , vol.
          <volume>40</volume>
          , no.
          <issue>1</issue>
          , pp.
          <fpage>251</fpage>
          -
          <lpage>261</lpage>
          , Jan.
          <year>2021</year>
          , doi: 10.1109/TMI.
          <year>2020</year>
          .
          <volume>3025080</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>R.</given-names>
            <surname>Hu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Ristaniemi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Zhu</surname>
          </string-name>
          and
          <string-name>
            <given-names>X.</given-names>
            <surname>Sun</surname>
          </string-name>
          ,
          <article-title>"Lung CT Image Registration through Landmarkconstrained Learning with Convolutional Neural Network,"</article-title>
          <source>2020 42nd Annual International Conference of the IEEE Engineering in Medicine &amp; Biology Society (EMBC)</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>1368</fpage>
          -
          <lpage>1371</lpage>
          , doi: 10.1109/EMBC44109.
          <year>2020</year>
          .
          <volume>9176363</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>A.</given-names>
            <surname>Mbilinyi</surname>
          </string-name>
          and
          <string-name>
            <given-names>H.</given-names>
            <surname>Schuldt</surname>
          </string-name>
          ,
          <article-title>"Retrieving Chest X-rays for Differential Diagnosis: A Deep Metric Learning Approach,"</article-title>
          <source>2021 IEEE EMBS International Conference on Biomedical and Health Informatics (BHI)</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>4</lpage>
          , doi: 10.1109/BHI50953.
          <year>2021</year>
          .
          <volume>9508620</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>P.</given-names>
            <surname>Zhang</surname>
          </string-name>
          et al.,
          <source>"Artificial Intelligence Technologies for COVID-19-Like Epidemics: Methods and Challenges," in IEEE Network</source>
          , vol.
          <volume>35</volume>
          , no.
          <issue>3</issue>
          , pp.
          <fpage>27</fpage>
          -
          <lpage>33</lpage>
          , May/June 2021, doi: 10.1109/MNET.011.2000741.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>M.</given-names>
            <surname>Jamshidi</surname>
          </string-name>
          et al.,
          <source>"Artificial Intelligence</source>
          and COVID-
          <volume>19</volume>
          :
          <article-title>Deep Learning Approaches for Diagnosis and Treatment,"</article-title>
          <source>in IEEE Access</source>
          , vol.
          <volume>8</volume>
          , pp.
          <fpage>109581</fpage>
          -
          <lpage>109595</lpage>
          ,
          <year>2020</year>
          , doi: 10.1109/ACCESS.
          <year>2020</year>
          .
          <volume>3001973</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>B.</given-names>
            <surname>Kang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Guo</surname>
          </string-name>
          and
          <string-name>
            <given-names>X.</given-names>
            <surname>Meng</surname>
          </string-name>
          ,
          <article-title>"Rapid Implementation of COVID-</article-title>
          19
          <source>AI Assisted Diagnosis System Based on Supercomputing Platform," 2020 5th International Conference on Universal Village (UV)</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>5</lpage>
          , doi: 10.1109/UV50937.
          <year>2020</year>
          .
          <volume>9426227</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [17]
          <string-name>
            <surname>M. K. Hashem</surname>
            and
            <given-names>A. S.</given-names>
          </string-name>
          <string-name>
            <surname>Abbas</surname>
          </string-name>
          ,
          <article-title>"Survey on using deep learning to detection</article-title>
          <source>COVID-19 disease," 2021 1st Babylon International Conference on Information Technology and Science (BICITS)</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>199</fpage>
          -
          <lpage>204</lpage>
          , doi: 10.1109/BICITS51482.
          <year>2021</year>
          .
          <volume>9509924</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>B.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Zheng</surname>
          </string-name>
          and
          <string-name>
            <given-names>C. L. P.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <article-title>"A Survey on Masked Facial Detection Methods and Datasets for Fighting Against COVID-19,"</article-title>
          <source>in IEEE Transactions on Artificial Intelligence</source>
          , doi: 10.1109/TAI.
          <year>2021</year>
          .
          <volume>3139058</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>R.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Ji</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zhang</surname>
          </string-name>
          and
          <string-name>
            <given-names>Y.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <article-title>"Focus, Fusion, and Rectify: Context-Aware Learning for COVID19 Lung Infection Segmentation,"</article-title>
          <source>in IEEE Transactions on Neural Networks and Learning Systems</source>
          , vol.
          <volume>33</volume>
          , no.
          <issue>1</issue>
          , pp.
          <fpage>12</fpage>
          -
          <lpage>24</lpage>
          , Jan.
          <year>2022</year>
          , doi: 10.1109/TNNLS.
          <year>2021</year>
          .
          <volume>3126305</volume>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>