Unet and Segnet
Unet and Segnet
TECHNICAL ADVANCE
Abstract
Background: Currently, there is an urgent need for efficient tools to assess in the diagnosis of COVID-19
patients. In this paper, we present feasible solutions for detecting and labeling infected tissues on CT lung
images of such patients. Two structurally-different deep learning techniques, SegNet and UNET, are
investigated for semantically segmenting infected tissue regions in CT lung images.
Methods: We propose to use two known deep learning networks, SegNet and UNET, for image tissue
classification. SegNet is characterized as scene segmentation network and UNet as a medical segmentation
tool. Both networks were exploited as binary segmentors to discriminate between infected and healthy lung
tissue, and as multi-class segmentors to learn the infection type on the lung. Each network is trained using 72
data images, validated on 10 images and tested against the left 18 images. Several statistical scores are
calculated for the results and tabulated accordingly.
Results: The results show the superior ability of SegNet in classifying infected/non-infected tissues compared
to the other methods (with 0.95 mean accuracy), while the UNET shows better results as a multi-class
segmentor (with 0.91 mean accuracy).
Conclusion: Semantically segmenting CT scan images of COVID-19 patients is a crucial goal because it would
not only assist in disease diagnosis , but also help in quantifying the severity of the disease ,and hence,
prioritize the population treatment accordingly. We propose computer-based techniques that prove to be
reliable as detectors for infected tissue in lung CT scans. The availability of such a method in today’s pandemic
would help automate, prioritize, fasten, and broaden the treatment of COVID-19 patients globally.
Keywords: COVID-19; pneumonia; SegNet; UNET; Computerized Tomography; Semantic Segmentation
also; researchers attempted to segment: kidneys in [7], class) show an extensive disparity in representation;
Lungs in [8, 9], liver in [10], brain tissue in [11] and the dominant class is larger in order of 1e+3 than the
[12], temporal bones in [13], and arterial walls in [14]. least represented class. See 1. We note here that the
Until today, many research projects have been con- class C0 not only represent the portions of the lungs
ducted for COVID-19 detection using DL analysis of unaffected by pneumonia, but also the lung-enclosing
medical images such as X-Ray and Computerized To- tissue.
mography (CT) scans and revealed significant results.
Table 1 Dataset Class Sizes. Pixel Count denotes the total
However, semantically segmenting those images has number of pixels of the class, and Image Pixel Count is the total
been less appealing. number of pixels of images that had an instance of the class.
Many DL structures were considered by researchers Class Metrics
to detect COVID-19 patients using medical images. A Name Pixel Count Image Pixel Count
recent study designed a binary classifier (COVID-19, C0 2.4394E + 07 2.6214E + 07
C1 1.1965E + 06 2.5166E + 07
No information) and a multi classifier (COVID-19 C2 5.8921E + 05 2.0447E + 07
, No Information, Pneumonia) using a CNN with C3 3.4265E + 04 6.5536E + 06
X-Ray images as an input, reaching 0.98 for binary
classes and 0.87 for a multi-class classifier [15]. Another The dataset source website offers image masks to
study employed Xception and ResNet50V2 networks segment the lungs. Figure 1 shows images for one sam-
for COVID-19 detection from CT scans, resulting in ple.
an accuracy of 0.99 for the target class [16]. References
[17, 18, 19, 20, 21] used various DL systems with med-
ical images and obtained results with accuracy values
ranging from 0.83 to 0.98.
Network Training
Training the neural networks is done using the ADAM
stochastic optimizer due to its fast convergence rate
compared to other optimizers [29]. The input images
are resized to 256 × 256 to reduce the training time
and also for memory requirements. The one-hundred
images dataset is divided into three sets for train-
ing, validation, and testing with proportions of 0.72,
0.10, and 0.18 respectively. In spite of the class imbal-
ance discussed earlier, class weights are handed over to
the pixel classification layer in the networks. Weights
are calculated using median frequency balancing. Each
network is trained nine times using different hyperpa-
rameters to find the best configuration possible. Table
2 lists the hyperparameters used for training.
Figure 3 The DNN architectures. The SegNet (top) where the encoder-decoder of the network are illustrated using the gray and
white bubbles, and UNET (bottom) where the contractive and expansive layer patches are encapsulated in blue and yellow bubbles.
Class Level
√ Based on the criteria discussed in subsection of the
G-mean = sensitivity × specificity (4) ”Methods” section, the best two networks found in
the previous section are evaluated. We can see that
the SegNet network surpasses UNET with noticeable
5 × Precision × Sensitivity margins for all metrics except sensitivity and G-mean,
F2-score = (5) where both networks produce similar results. See table
4 × Precision + Sensitivity
5
These criteria are selected because of the dataset im-
balance nature discussed in the “Methods” section. Multi Class Segmentation
The evaluation was carried out as follows: the global
Test images results
accuracy of the classifier was calculated for each test
image and averaged over all the images. Using the Similarly, we obtain the best experiment for each
mean values of global accuracies, the best experiment multi-classification network. The best experiment of
of each network were chosen for a “Class Level” assess- the SegNet architecture is number 7, giving an accu-
ment. Then, statistical scores (1) to (5) were calculated racy of 0.907 with a standard deviation of 0.06. We also
for each class and tabulated properly. find that the overall best accuracy of 0.908 is given by
the fourth experiment of UNET network with a stan-
Results dard deviation of 0.065. All the experiments achieve
Binary Segmentation higher accuracy than 0.8 except for the first three ex-
Test images results periments of SegNet. Refer to table 4.
Table 3 shows results for both models of binary clas-
sifiers after evaluating every experiment of each net-
Class level
work. We can see from the results that our networks
achieve accuracy values larger than 0.90 in all cases, In the same manner as the binary segmentation re-
and 0.954 accuracy in the best case (experiment 4 of sults section, the best experiment of each architecture
the network SegNet). The standard deviation of ex- is evaluated as presented in table 6. Both networks
periment 4 is 0.029. The second best network is exper- struggled to recognize the C3 class. Nevertheless, they
iment 4 of the UNET architecture with an accuracy of achieve good results for C1 and C2. We also notice
0.95 and a standard deviation of 0.043. the high specificity rate regarding all the classes. The
The best experiment of each architecture is selected UNET architecture recorded higher values for all pa-
for further performance investigation on the class level. rameters except the specificity.
Saood and Hatem Page 5 of 7
Table 3 Global accuracy metrics of the Test data images calculated for the nine experiments of the UNET and SegNet networks as
binary class segmentors. The “plot” columns visualize the mean accuracy and the standard deviation of each experiment
SegNet UNET
plot of mean and σ plot of mean and σ
0 1 0 1
Exp. mean σ var mean σ var
1 0.934 0.053 0.004 0.921 0.056 0.003
2 0.919 0.061 0.004 0.901 0.067 0.004
3 0.919 0.066 0.007 0.896 0.069 0.005
4 0.954 0.029 0.004 0.949 0.043 0.002
5 0.940 0.052 0.005 0.933 0.057 0.003
6 0.947 0.042 0.005 0.900 0.069 0.005
7 0.941 0.033 0.003 0.939 0.059 0.003
8 0.935 0.056 0.004 0.927 0.061 0.003
9 0.948 0.046 0.005 0.894 0.070 0.005
Table 4 Global accuracy metrics of the Test data images calculated for the nine experiments of the UNET and SegNet networks as
multi-class segmentors. The “plot” columns visualize the mean accuracy and the standard deviation of each experiment.
SegNet UNET
plot of mean and σ plot of mean and σ
0 1 0 1
Exp. mean σ var mean σ var
1 0.703 0.063 0.004 0.860 0.079 0.006
2 0.657 0.067 0.004 0.852 0.080 0.006
3 0.652 0.086 0.007 0.844 0.084 0.007
4 0.894 0.068 0.004 0.908 0.065 0.004
5 0.877 0.071 0.005 0.880 0.071 0.005
6 0.870 0.072 0.005 0.881 0.073 0.005
7 0.907 0.060 0.003 0.903 0.067 0.004
8 0.891 0.069 0.004 0.883 0.074 0.005
9 0.881 0.075 0.005 0.899 0.075 0.005
Acknowledgements
Data for this study come from the Italian Society of Medical and
Interventional Radiology [26]
Author details
1
Mechatronics Program for the Distinguished in Tishreen University,
Distinction and Creativity Agency, Latakia, SY. 2 Mechatronics Program
for the Distinguished in Tishreen University, Distinction and Creativity
Agency, Latakia, SY.
References
Figure 4 SegNet binary segmentor Deep Dream image.
1. meizhu chen, changli tu, Tan C, Zheng X, xiaohua wang, jian wu,
Deep dream image laying out key features the network is using
et al. Key to successful treatment of COVID-19: accurate identification
to segment the CT scans. infected tissue (right), non-infected
of severe risks and early intervention of disease progression. 2020 Apr;.
(left).
2. Shi H, Han X, Jiang N, Cao Y, Alwalid O, Gu J, et al. Radiological
findings from 81 patients with COVID-19 pneumonia in Wuhan, China:
a descriptive study. The Lancet Infectious Diseases. 2020
Apr;20(4):425–434.
3. Ye Z, Zhang Y, Wang Y, Huang Z, Song B. Chest CT manifestations
Conclusions of new coronavirus disease 2019 (COVID-19): a pictorial review.
European Radiology, Mar. 2020;.
In this paper, the performance of two deep learning 4. Causey JL, Guan Y, Dong W, Walker K, Qualls JA, Prior F, et al..
networks (SegNet & UNET) was compared in their Lung cancer screening with low-dose CT scans using a deep learning
ability to detect diseased areas in medical images of approach; 2019. Available from:
https://arxiv.org/abs/1906.00240.
the lungs of COVID-19 patients. The results demon- 5. Daimary D, Bora MB, Amitab K, Kandar D. Brain Tumor
strated the ability of the SegNet network to distinguish Segmentation from MRI Images using Hybrid Convolutional Neural
between infected and healthy tissues in these images. A Networks. Procedia Computer Science. 2020;167:2419–2428.
6. Singh VK, Rashwan HA, Romani S, Akram F, Pandey N, Sarker
comparison of these two networks was also performed MMK, et al. Breast tumor segmentation and shape classification in
in a multiple classification procedure of infected ar- mammograms using generative adversarial and convolutional neural
eas in lung images. The results showed the UNET network. Expert Systems with Applications. 2020 Jan;139:112855.
7. Zhao W, Jiang D, Queralta JP, Westerlund T. MSS U-Net: 3D
network’s ability to distinguish between these areas. segmentation of kidneys and tumors from CT images with a multi-scale
The results obtained in this paper represent promising supervised U-Net. Informatics in Medicine Unlocked. 2020;19:100357.
8. Skourt BA, Hassani AE, Majda A. Lung CT Image Segmentation
prospects for the possibility of using deep learning to
Using Deep Neural Networks. Procedia Computer Science.
assist in an objective diagnosis of COVID-19 disease 2018;127:109–113.
through CT images of the lung. 9. Huidrom R, Chanu YJ, Singh KM. Automated Lung Segmentation on
Computed Tomography Image for the Diagnosis of Lung Cancer. CyS.
2018 9;22(3).
Saood and Hatem Page 7 of 7