Professional Documents
Culture Documents
PII: S2666-285X(21)00055-8
DOI: https://doi.org/10.1016/j.gltp.2021.08.027
Reference: GLTP 51
Please cite this article as: Victor Ikechukwu A Research Scholar , Murali S dProfessor ,
Deepu R dProfessor , Shivamurthy RC Professor , ResNet-50 vs VGG-19 vs Training from Scratch:
A comparative analysis of the segmentation and classification of Pneumonia from chest x-ray images,
Global Transitions Proceedings (2021), doi: https://doi.org/10.1016/j.gltp.2021.08.027
This is a PDF file of an article that has undergone enhancements after acceptance, such as the addition
of a cover page and metadata, and formatting for readability, but it is not yet the definitive version of
record. This version will undergo additional copyediting, typesetting and review before it is published
in its final form, but we are providing this version to give early visibility of the article. Please note that,
during the production process, errors may be discovered which could affect the content, and all legal
disclaimers that apply to the journal pertain.
© 2021 The Authors. Publishing Services by Elsevier B.V. on behalf of KeAi Communications Co.
Ltd.
This is an open access article under the CC BY-NC-ND license
(http://creativecommons.org/licenses/by-nc-nd/4.0/)
Global Transitions
ScienceDirect Proceedings
http://www.keaipublishing.co
Procedia Manufacturing 00 (2019) 000–000 m/en/journals/global-transiti
ons-proceedings/
ResNet-50 vs VGG-19 vs Training from Scratch: A comparative analysis of the segmentation and
classification of Pneumonia from chest x-ray images
Abstract
In medical imaging, segmentation plays a vital role towards the interpretation of X-ray images where salient features are
extracted with the help of image segmentation. Without undergoing surgery, clinicians employ various modalities ranging from
X-Rays and CT-Scans to ultrasonography, and other imaging techniques to visualise and examine interior human body organ and
structures. To ensure appropriate convergence, training a deep convolutional neural network (CNN) from scratch is tough since it
requires more computational time, a big amount of labelled training data and a considerable degree of experience. Fine-tuning a
CNN that has been pre-trained using, for instance, a huge set of labelled medical datasets, is a viable alternative. In this paper, a
comparative study was done using pre-trained models such as VGG-19 and ResNet-50 as against training from scratch. To
reduce overfitting, data augmentation and dropout regularization was used. With a recall of 92.03%, our analysis showed that the
pre-trained models with proper finetuning was comparable with Iyke-Net, a CNN trained from scratch.
Keywords: Chest x-rays; CNNs; Deep Learning; Medical imaging; Pneumonia detection; ResNet-50; Segmentation; VGG-19
Fig. 1: The chest x-ray images of (a) a patient with highly enhanced edges,
There was no need for image quality enhancement as the
and (b) normal patient. dataset images has already been denoised and in high
resolution. However, to make the model more robust,
It was further subdivided into training, testing and
rescaling and normalization was used. Furthermore, images
validation set with each containing both normal and
were randomly rotated at 30 degrees during training and
pneumonia annotated images. For pneumonia cases, 3875
flipped both vertically and horizontally by 25 degrees each as
images were used for training, 390 for testing and 8 for
illustrated in table (1).
validation as illustrated in figure (2).
Table 1: Parameters for image augmentation.
Method Default Adjusted
Horizontal flip None True
Horizontal shift 0 0.25
Vertical shift 0 0.25
(a) (b) Shear range 0 0.3
Fig. 2: The chest x-ray images (a), (b) of Pneumonia patients. Rescale - 1./255
The remaining normal images were 1341, 234 and 8 Zoom range - 0.3
respectively as shown in the figure (3). Fixed image size 1024 x 1024 224 x 224
3.4. ResNet-50
[ ] [ ]
[ ] [ ] [ ]
conv3_x 28 x 28
[ ] [ ]
[ ] [ ] [ ]
conv4_x 14 x 14
[ ] [ ]
[ ] [ ] [ ]
conv5_x 7x7
[ ] [ ]
[ ] [ ] [ ]
3.5. VGG-19
To compare the performance of various deep learning Table 2: Model accuracy under various epochs
algorithms for classifying the prevalence of pneumonia from Epochs Training Validation
Accuracy (%) Accuracy (%)
chest x-ray images, the standard metrics were used. It is worth
highlighting that the experiment‟s performance measures are 10 65.02 45.34
based on an average of 3 simulated runs, with each consisting 100 81.24 79.02
of 100, 200 and 400 epochs with mini-batch size of 64. The 200 83.97 83.91
accuracy, precision (NPV), recall(sensitivity), and F1-scores 300 93.6 93.55
employed in this investigation will be described next.
400 88.60 88.68
(2)
It can be seen from table (2) that the accuracy was below
average, and that led us to conduct more experiments. Data
augmentation was done, and the epochs increased to 100
(3) while keeping all the hyperparameters constant. We observe
improvements in the performance of the baseline model
highlighting the possibility of more accuracy as we finetune
(4) our model. The model shown in figure (8) trained in
02Hours:31Mins:05Secs with an accuracy(validation) of
(5) 79.02%. Furthermore, the model was fine-tuned by adding
dropout layers in between convolutional layers.
We started by dropping out 20% of the dataset at random
(6) during training. Variations of dropout (30%, 45%, and 55%)
were used alongside increasing the epochs to 200 while
Where pneu = the pneumonia class keeping other parameters constant and obtained an
accuracy(validation) of 83.91% as shown in figure (9) and the
model trained in 05Hours:06Mins:11Secs. Although slight
improvement was recorded in accuracy, but that came at the
4. Results and Discussion cost of resources. Finally, we tried tunning the
hyperparameters, in this case, the learning rate was changed
The results were based on two different approaches; first from 0.001 to 0.0001 and the epochs increased to 400 which
we conducted experiments using VGG-19 and ResNet-50, took 16Hours:43Mins:11Secs to train with an accuracy of
pretrained models to discriminate pneumonia images from 88.68% as depicted in figure (10).
normal chest x-ray images taken from the anterior to posterior
(AP/PA) at high resolution. The choice of ResNet-50 over
ResNet-101 was to compensate for limited resources at our
Fig. 10: Cross entropy loss and classification accuracy curves for 400 epochs
Rajpukar et ChexNet 85 95 - -
al(2017)[31]
Loey et ResNet-50 84.5 - - 0.10
al(2020)[32]
Apostolopoulos VGG-19 93.5 - - 86.0
et al(2020)[33]
Proposed Proposed 93.60 91.66 91.30 92.03
method (Iyke-Net)