<!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>Segmentation of Lungs, Lesions, and Lesion Types on Chest CT Scans of Patients with Covid-19?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Daria Lashchenova</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alexander Gromov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Anton Konushin</string-name>
          <email>anton.konushing@graphics.cs.msu.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Lomonosov Moscow State University</institution>
          ,
          <addr-line>Moscow</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>NRU Higher School of Economics</institution>
          ,
          <addr-line>Moscow</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Third Opinion Platform LLC</institution>
          ,
          <addr-line>Moscow</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The covid-19 pandemic has quickly spread all over the world, overwhelming public healthcare systems in many countries. In this situation demand for automatic assistance systems, to facilitate and accelerate a doctor's job has rapidly increased. Antibody tests were introduced for diagnosing covid-19, but physicians still need tools for quantification of disease severity, since treatment choice strongly depends on it. To estimate the severity of the disease physicians use computer tomography scans. It provides physicians with information about lung lesions and their types and they use this information to determine proper treatment. In this paper we made an attempt to build a system that uses patients' computer tomography scans for lung and lesion segmentation and for segmentation of specific types of lesions (i.e. pulmonary consolidation and “crazypaving”). Models for lung, lesions, consolidation, and “crazy-paving” segmentation performed with 0.96, 0.65, 0.48, 0.45 Dice coefficients respectively. Also it was shown that removing images with inaccurate ground-truth from the training subset can improve the quality of models trained on it.</p>
      </abstract>
      <kwd-group>
        <kwd>Covid-19</kwd>
        <kwd>CT</kwd>
        <kwd>Lesion segmentation</kwd>
        <kwd>Lung segmentation</kwd>
        <kwd>Deep learning</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Covid-19 is an infectious disease caused by severe acute respiratory syndrome
coronavirus 2 (SARS-CoV-2) that has a considerable mortality rate. Quick spread of this
disease caused a pandemic, which overwhelmed healthcare systems in a large number
of countries. As of 1 July 2020, 10.5M cases were confirmed worldwide and 512
thousands of patients died, so the average mortality rate was about 5%. In Russia it was
1.5% (9.5 thousands deaths for 654 thousands cases).</p>
      <p>Early diagnosis can reduce the time and intensity of medical treatment. This can
be achieved by the use of computer tomography (CT). CT is a radiography in which
a three-dimensional image of a body structure is constructed by computer from a
series of plane cross-sectional images made along an axis. CT provides physicians with
information about the lesions in lungs. Then they can calculate the percentage of lung
opacity and identify the type of the lesion so they can select appropriate treatment for
the patient and monitor the course of the disease.</p>
      <p>Computed tomography (CT) is considered to be a primary tool for giving diagnosis
of covid-19 and evaluation of the disease progression. CT is a radiography in which a
three-dimensional image of a body structure is constructed by computer from a series
of plane cross-sectional images made along an axis. CT provides radiologists with
information about disease features, or radiographic findings. These features are examined
in order to identify their type and volume. Then this information is used for selection of
appropriate treatment for the patient and monitoring the course of the disease.</p>
      <p>
        The primary CT findings of covid-19 have been reported in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. They include
pulmonary consolidation, “ground-glass” opacity and “crazy-paving” pattern. Pulmonary
consolidation is a region of normally compressible lung tissue filled with liquid instead
of air. “Ground-glass” opacity is a descriptive term referring to an area of increased
attenuation in the lung on CT scans with preserved bronchial and vascular markings.
“Crazy-paving” pattern refers to the appearance of “ground-glass” opacity with
superimposed interlobular septal thickening and intralobular septal thickening. The lack of
sufficient method for lesion volume estimation and an enormous amount of CT scans
for analysis increased demand for supervising systems.
      </p>
      <p>The aim of this study was to create a solution for segmentation of lungs and
abnormal regions of lungs and for detecting regions with pulmonary consolidation and
“crazy-paving” pattern.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Related work</title>
      <p>As covid-19 has quickly been spreading, computer vision scientists started to search for
solutions that could help physicians diagnose their patients. There were several areas to
research.</p>
      <p>
        Before the mass use of antibody tests some scientists would try to find out if a
patient had covid-19, using only their CT scans. Linda Wang [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] introduced
COVIDNet, a neural network architecture that could classify if a person was ill and distinguish
covid-19 from non-covid-19 pneumonia. Xuehai He [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] used CRNet [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] to detect
covid19. Xiaolong Qi [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] estimated how much time the patient would spend in a hospital
using only their CT.
      </p>
      <p>But those studies could not be applied for tracking patients’ condition. To achieve
that, some scientists concentrated on a segmentation task, detecting lungs and areas
with lesions. This information could then be used for measuring the percentage of lung
opacity to quantify severity of the disease. Segmentation could be performed on 2D</p>
      <p>
        Segmentation of Lungs and Lesions on Chest CT Scans 3
horizontal slices of CT or on full 3D scans. Lu Huang [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] used U-net [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] architecture on
horizontal slides of CT scans. Shuo Jin [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] used 3D Unet++ [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] on CTs with a different
slice thickness. Fei Shan [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] proposed 3D-model VB-Net for segmentation of lesions,
lung lobes and lung segments, training the model with human-in-the-loop strategy.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Dataset</title>
      <p>
        The dataset was provided by Third Opinion Platform [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. It contained 529 studies of
patients with and without covid-19. Studies came in dicom format, clipping to the window
(according to window height and window width dicom parameters) was not performed.
10-20 horizontal slices from each study were assessed giving us 10454 images.
Radiologists assessed areas with lungs, regions of pulmonary consolidation and regions with
“ground-glass” opacity, particularly with “crazy-paving”.
      </p>
      <p>The dataset was split into training and testing subsets, containing 85% and 15% studies
respectively.</p>
      <p>Radiologists used an assessment tool to draw polygons around regions of interest.
As they tend to draw areas with smoothed boundaries, while models for segmentation
calculate more precise masks, it is not expected to get results close to ideal according
to quality metrics.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Metrics</title>
      <p>For model evaluation three metrics were used: mean AP over test studies, IoU and Dice
coefficient.</p>
      <p>Model’s recall is calculated as the number of true positive pixels divided by the
number of all positive pixels. Model’s precision is calculated as the number of true
positive pixels divided by the number of pixels, predicted as positive. AP is calculated
as an area under precision-recall curve, where each point on the curve plot represents
precision and recall of results with a threshold corresponding to the point.</p>
      <p>IoU measures how much ground truth and predicted areas overlap:
(1)
(2)
IoU =</p>
      <p>T P</p>
      <p>F N + T P + F P
Dice =</p>
      <p>2T P</p>
      <p>F N + 2T P + F P
Dice coefficient is often used to evaluate the quality of segmentation of medical images:
TP is the number of true positive pixels, FN – number of false negative pixels, FP –
number of false positive pixels.
5</p>
    </sec>
    <sec id="sec-5">
      <title>Proposed method</title>
      <p>
        Due to the fact that only 20% horizontal slices from each CT were assessed, it was
necessary to use a neural network for 2D segmentation of images. In this work U-net
[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] was used. It takes horizontal slices of lung CT and returns probabilities of belonging
to a certain class for each pixel.
      </p>
      <p>At first, image normalization is performed on each slice image:</p>
      <p>Inorm =</p>
      <p>Iorig
(3)</p>
      <p>Segmentation of Lungs and Lesions on Chest CT Scans 5
where mu is the mean of the image and sigma is its standard deviation. It was done to
unify information from different X-ray machines, as due to different settings they can
produce information in different ranges of values. Then random spatial transformations
(horizontal flipping, shifting, scaling, rotating) were applied on every slice to augment
images.</p>
      <sec id="sec-5-1">
        <title>Segmentation of lungs and regions with lesions. The first task was to segment lesions,</title>
        <p>so it could be possible to calculate the percentage of lung opacity. Diseased areas and
lungs are segmented on each horizontal slice.</p>
        <p>Several losses were used to train U-net. For training with binary cross entropy loss
and Dice loss models predicted two masks: probability of lung in the pixel and
probability of affected lung (either pulmonary consolidation or “ground-glass” opacity).
Another model was trained using softmax cross entropy loss. It predicted 3 classes:
background, healthy lung and affected lung, so the mask with background was added and
lung class was replaced by healthy lung.</p>
        <p>In the table 2 results for lung segmentation and lesion segmentation are shown.
The best result for lesion class by all metrics was shown by the model that was trained
with Dice loss. Models with BCE loss and Dice loss showed similar results for lung
class.</p>
      </sec>
      <sec id="sec-5-2">
        <title>Segmentation of regions with pulmonary consolidation and “crazy-paving”. The</title>
        <p>second task was to identify different types of pathologies. Experiments showed that
the use of samplers was necessary in this task, as the majority of images did not
contain consolidation or “crazy-paving”, so training was unstable as the model received an
enormous amount of negative examples.</p>
        <p>Several models were trained. The first one (U4) predicted four binary masks for the
following classes: lungs, consolidation, “ground-glass” opacity, and “crazy-paving”.
During training batch size was divisible by 4. In every four elements of batch the first
element contained image with consolidation, the second — “crazy-paving”, the third
— “ground-glass” opacity and the fourth contained image with healthy lungs with 95%
probability and image without lungs (i.e. slices from the top or the bottom of CT) with
5% probability.</p>
        <p>The second model (C) predicted two binary masks: mask for lung and for
consolidation probabilities. Sampler was used so each sample in a batch during training contained
consolidation with 95% probability, lungs without consolidation with 2.5% probability
and no lungs with 2.5% probability. The third model (CP) was similar to the second,
but made predictions for “crazy-paving”.</p>
        <p>All three models were trained with binary cross entropy loss, Dice loss, and softmax
cross entropy loss. For training with CE loss, the model was supposed to predicted the
background class and unaffected lung class instead of the lung class.</p>
        <p>Experiment
U4 BCE
U4 Softmax CE
C BCE
C Dice
C Softmax
Experiment
U4 BCE
U4 Softmax CE
CP BCE
CP Dice
CP Softmax
For U4 BCE model confusion matrices for train and test subsets were calculated.</p>
        <p>As figure 4 shows, on both train and test subsets the model confuses lesion classes
and healthy lungs. This can be explained by the fact that some assessors tend to draw
inaccurate masks, while models produce precise result.</p>
        <p>Also figure 4 shows, that on both train and test subsets the model significantly confuses
“ground-glass” opacities that are not “crazy-paving” and the “crazy-paving”. It also
confuses consolidation and “ground-glass”. This could be explained by the presence of
ambiguous examples in the dataset and/or noisy assessment, examples are presented on
figure 5. To check the latter hypothesis three models (U4 BCE, C BCE, C Dice) were
applied to the train dataset. Images from the train dataset were blocklisted if IoU of
consolidation class was lower than 0.2 in any of those models. Then new model C BCE
(*) was trained on a new dataset.</p>
        <p>As results show even rough cleaning of the dataset could improve the result of training.</p>
        <p>Training of a “crazy-paving” model and a united model was not performed, because
after dataset reduction too few examples of “crazy-paving” remained.
7</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>Conclusion</title>
      <p>In this study we presented a solution for segmentation of lungs, lesions, pulmonary
consolidation and “crazy-paving” with reasonable quality. Experiments showed that binary
cross entropy loss works better for training models that could distinguish different types
of pathologies, but gives slightly inferior results than the model trained with Dice loss
for segmentation of general classes such as lungs and lesions. Then it was shown that
usage of noisy data during training can decrease the quality of a model and discarding
such data from the training subset can improve the quality of a model.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>1. “Third Opinion Platform” Limited Liability Company, https://thirdopinion.ai/</mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>He</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yang</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhang</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhao</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , Zhang,
          <string-name>
            <given-names>Y.</given-names>
            ,
            <surname>Xing</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            ,
            <surname>Xie</surname>
          </string-name>
          ,
          <string-name>
            <surname>P.</surname>
          </string-name>
          :
          <article-title>Sample-efficient deep learning for covid-19 diagnosis based on ct scans</article-title>
          .
          <source>medRxiv</source>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Huang</surname>
          </string-name>
          , L.,
          <string-name>
            <surname>Han</surname>
            ,
            <given-names>R</given-names>
          </string-name>
          .,
          <string-name>
            <surname>Ai</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yu</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kang</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tao</surname>
            ,
            <given-names>Q.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xia</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Serial quantitative chest ct assessment of covid-19: Deep-learning approach</article-title>
          .
          <source>Radiology: Cardiothoracic Imaging</source>
          <volume>2</volume>
          (
          <issue>2</issue>
          ),
          <year>e200075</year>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Jin</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xu</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Luo</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wei</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhao</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hou</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ma</surname>
          </string-name>
          , W.,
          <string-name>
            <surname>Xu</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zheng</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          , et al.:
          <article-title>Ai-assisted ct imaging analysis for covid-19 screening: Building and deploying a medical ai system in four weeks</article-title>
          .
          <source>medRxiv</source>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          , Zhang,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Lin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            ,
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <surname>F.</surname>
          </string-name>
          :
          <article-title>Crnet: Cross-reference networks for few-shot segmentation</article-title>
          .
          <source>In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition</source>
          . pp.
          <fpage>4165</fpage>
          -
          <lpage>4173</lpage>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Qi</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jiang</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yu</surname>
            ,
            <given-names>Q.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shao</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhang</surname>
          </string-name>
          , H.,
          <string-name>
            <surname>Yue</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          , Ma,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            ,
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Meng</surname>
          </string-name>
          ,
          <string-name>
            <surname>X.</surname>
          </string-name>
          , et al.:
          <article-title>Machine learning-based ct radiomics model for predicting hospital stay in patients with pneumonia associated with sars-cov-2 infection: A multicenter study</article-title>
          .
          <source>medRxiv</source>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Ronneberger</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fischer</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brox</surname>
          </string-name>
          , T.:
          <article-title>U-net: Convolutional networks for biomedical image segmentation</article-title>
          .
          <source>In: International Conference on Medical image computing and computerassisted intervention</source>
          . pp.
          <fpage>234</fpage>
          -
          <lpage>241</lpage>
          . Springer (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Shan</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gao</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shi</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shi</surname>
          </string-name>
          , N.,
          <string-name>
            <surname>Han</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xue</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shi</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Lung infection quantification of covid-19 in ct images with deep learning</article-title>
          .
          <source>arXiv preprint arXiv:2003</source>
          .
          <volume>04655</volume>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wong</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Covid-net: A tailored deep convolutional neural network design for detection of covid-19 cases from chest x-ray images</article-title>
          . arXiv preprint arXiv:
          <year>2003</year>
          .
          <volume>09871</volume>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Zheng</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Time course of lung changes at chest ct during recovery from coronavirus disease 2019 (covid-19)</article-title>
          .
          <source>Radiology</source>
          <volume>295</volume>
          ,
          <fpage>715</fpage>
          -
          <lpage>721</lpage>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Zhou</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Siddiquee</surname>
            ,
            <given-names>M.M.R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tajbakhsh</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liang</surname>
          </string-name>
          , J.: Unet+
          <article-title>+: A nested u-net architecture for medical image segmentation</article-title>
          . In:
          <article-title>Deep Learning in Medical Image Analysis and Multimodal Learning for Clinical Decision Support</article-title>
          , pp.
          <fpage>3</fpage>
          -
          <lpage>11</lpage>
          . Springer (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>