






































Highlights in Bioscience;


Highlights in BioScience
ISSN: 2682-4043
DOI:10.36462/H.BioSci.20201

Highlights in BioScience March 2020| Volume 3
http://bioscience.highlightsin.org/

Page 1 of 3

Research Article

Open Access

1 Department of Biodiversity and Crop
Improvement, International Center for
Agriculture Research in the Dry Areas
(ICARDA), Giza, Egypt.

2 Department of Genome Mapping, Molecular
Genetics and Genome Mapping Laboratory,
Agricultural Genetic Engineering Research
Institute (AGERI), Giza, Egypt.

3 Department of Bioinformatics & Computer
Networks, AGERI, Agricultural Research
Center (ARC), Giza, Egypt.

Contacts of Authors

* To whom correspondence should be
addressed: Peter T. Habib

Citation: Habib P.T., Alsamman A.M.,
Hassanein S.E., and Hamwieh A. (2020).
Developing Convolutional Neural
Networks-Based System for Predicting
Pneumonia Using X-Radiography Image.
Highlights in BioScience, Volume 3. Article ID
20201, dio:10.36462/H.BioSci.20201

Received: January 25, 2020

Accepted: March 10, 2020

Published:March 21, 2020

Copyright: © 2020 Habib et al. This is an
open access article distributed under the terms
of the Creative Commons Attribution License,
which permits unrestricted use, distribution,
and reproduction in any medium, provided the
original author and source are credited.

Data Availability Statement: All relevant data
are within the paper and supplementary
materials

Funding: The authors have no support or
funding to report.

Competing interests: The authors declare that
they have no competing interests

Developing Convolutional Neural Networks-Based
System for Predicting Pneumonia Using X-Radiography
Image

Peter T. Habib *1, Alsamman M. Alsamman2, Sameh E. Hassanein3, and
Aladdin Hamwieh1

Abstract
Pneumonia is a respiratory disease caused by Streptococcus Pneumoniae
infection. It is a life-threatening disease that causes a high mortality rate for
children under 5 years of age every year. Under such circumstances, we
have a vital need to develop an appropriate and consistent protocol for the
identification and diagnosis of pneumonia. The incorporation of
computational approaches into the diagnosis of disease is extremely
efficient, promising and reliable. Our goal is to integrate these methods
into pneumonia routine diagnosis to save countless lives around the world.
We used the machine learning algorithm of Convolutional Neural
Networks (CNNs) to identify visual symptoms of pneumonia in X-ray
radiographic images and make a diagnostic decision. The dataset used to
construct the computational model consists of 5844 X-ray images
belonging to the pneumonia affected and normal individuals. Our
computational model has been successful in identifying pneumonia
patients with a diagnosis accuracy of 84%. Our model may increase the
efficiency of the pneumonia diagnosis process and accelerate
pathogenicity studies of the disease.

Keywords: CNNs, Artificial intelligence, Pneumonia, Disease diagnosis.

Introduction
Pneumonia is a bacterial disorder that causes severe symptoms such as

grunting, chest retraction, central cyanosis, obtundation, lethargy, convulsions and
inability to feed or drink [1,2]. Each year about 1,400 cases of pneumonia occur in
100,000 children with around 1 in 71 babies. According to a recent study,
pneumonia claimed the lives of over 800,000 children under the age of five last
year, or one child every 39 seconds [3] .

According to the American Lung Association, pneumonia can be diagnosed
in various ways, including a blood examination, pulse oximetry, sputum analysis
on a sample of mucus, arterial blood gas examination, pleural fluid culture, or
bronchoscopy [4]. Despite the many methods available to diagnose pneumonia,
chest radiography remains the main method used for diagnosis. Although x-rays
are commonly used, it is difficult to diagnose them based solely on these images.
Perusing these images is a bottleneck problem because the area or areas of
increased opacity are usually determined by pneumonia [5,6].

https://creativecommons.org/licenses/by/4.0/
http://bioscience.highlightsin.org/
https://doi.org/10.36462/H.BioSci.20201
https://doi.org/10.36462/H.BioSci.20201
http://bioscience.highlightsin.org/


Habib et al., 2020 Convolutional NN-Based System for Pneumonia Using Radiography

Highlights in BioScience March 2020| Volume 3
http://bioscience.highlightsin.org/

Page 2 of 3

In fact, accuracy of the diagnosis of pneumonia is very
limited due to certain causes of opacity which are difficult to
account for. In this regard, many advances have been
achieved by the application of machine learning (ML)
techniques in medical diagnosis. The development of an
artificial intelligence pneumonia diagnostic framework has
recently become a hot topic in medical bioinformatics. Such
frameworks may help radiologists interpret medical images
using additional perspectives developed by computer
systems [7] ⁠ .

Continuous improvement of such frameworks using
new ML algorithms and techniques could provide more
accuracy and ease of use of computer platforms. In this
regard, Python programming language provides a hundreds
of library. Sci-kit learn [8] ⁠ , Tensorflow [9] ⁠ , and Keras
[10] ⁠ are the most popular libraries ML programming.
These ML libraries have been shown to have an impact on
the integration of ML programming in biological data
analysis [11,12]. In addition, AlexNet is the name of a
convolutional neural network (CNN) algorithm designed for
large-scale visual recognition. AlexNet has been
successfully used for pathological brain detection [13–15].

In this research, we are trying to use highly
specialized ML subtype for image classification to resolve
many complications of routine pneumonia diagnosis. Using
x-images this tool may be used for diagnosis of pneumonia.
This tool will also be available as user-friendly applications
which can be used with the minimum programming skills. In
addition, we aim to develop a diagnostic software that could
be easily updated, modified and integrated into different
medical diagnostic systems.

Materials and Methods

Data collection
The dataset is composed of 5844 X-rays images

belonging to normal and pneumonia patients. The dataset
consists of images with high resolutions and satisfied
statistical variance (Figure 1). The dataset was retrieved
from kaggle database [16,17]. This data was collected from
retrospective samples of one to five year-old pediatric
patients.

Figure 1 : Sample X-ray image of normal (A) and lung
pneumonia (B).

Model construction and validation
The dataset of X-rays images have been used for ML

model training (5216 image) and validation (624 images).
The AlexNet architecture yielded 37% accuracy at the
beginning of the design. Our ML model design is inspired by
AlexNet structure, where the architecture consists of eight
constitutional layers (Figure 2 and Table 1).

Figure 2 : The architecture of the ML neural network used to
diagnose pneumonia from X-rays images .
Table 1: Description of the structure of the neural network
architecture.

Results and Discussion
Diagnosis of pneumonia is very difficult due to hidden

factors causing opacity such as pulmonary edema, bleeding,
atelectasis or lung cancer. When examining an area of
increased opacity in the chest radiography, it is critical to
determine where increased opacity occurs [18,19].
Computational analysis integration could accelerate
pneumonia and enhance the routine medical diagnosis
system.

A highly specialized sub-type of machine learning for
image classification called deep learning networks has been
used in current research to detect lung pneumonia from X-ray
images (Figure 2). We analyzed a dataset of 5844 images of
chest X-ray film to diagnose pneumonia using ML pipeline.
AlexNet's neural network architecture has produced an ML
model accuracy of 84%.
Conclusion

Deep learning is expected to lead to a revolutionary
progression in the efficacy of medical diagnosis using
radiological methods around the world. We ML models
and novel diagnostic approaches for various x-ray
abnormalities to detect pneumonia. Our pipeline may
trigger the impact of artificial intelligence, which will

Layers Feature Map Size Strides Dilation Rate Activation
Input Image 1 (150, 150, 3) 1 1 relu
1 Convolutional 3 (150, 150, 3) 1 1 relu

Max Pooling 32 (148, 148, 32) 1 1 relu
2 Convolutional 32 (74, 74, 32) 1 1 relu
3 Convolutional 180 (72, 72, 180) 1 1 relu
4 Convolutional 150 (70, 70, 150) 1 1 relu

5
Convolutional
Transpose 100 (68, 68, 100) 1 1 relu

6 Convolutional 150 (70, 70, 150) 1 1 relu
Max Pooling 120 (68, 68, 120) 1 1 relu

7 FC - 138720 - - softmax
Output FC - 1000 - - softmax

http://bioscience.highlightsin.org/


Habib et al., 2020 Convolutional NN-Based System for Pneumonia Using Radiography

Highlights in BioScience March 2020| Volume 3
http://bioscience.highlightsin.org/

Page 3 of 3

defiantly lead to an enormous improvement in the visual
diagnosis of many diseases.
Availability
The Python source code we have used is freely available

at : https://github.com/peterhabib/PneumoniaAI . This code
can be executed interactively in a Python command line.

References
1. Hamborsky J, Kroger A, editors. Epidemiology and

prevention of vaccine-preventable diseases, E-Book:
The Pink Book. Public Health Foundation; 2015 Oct
19.

2. Brooks WA. Bacterial Pneumonia. In: Hunter’s
Tropical Medicine and Emerging Infectious Diseases.
Elsevier; 2020. p. 446–53.

3. UNICEF. Annual Reports. 2020. Available from:
https://www.unicef.org

4. American Lung Association. American Lung
Association; 2020. Available from: www.lung.org

5. Mattila JT, Fine MJ, Limper AH, Murray PR, Chen BB,
Lin PL. Pneumonia. Treatment and diagnosis. Ann Am
Thorac Soc. 2014;11(Supplement 4):S189--S192.

6. Makhnevich A, Sinvani L, Cohen SL, Feldhamer KH,
Zhang M, Lesser ML, et al. The clinical utility of chest
radiography for identifying pneumonia: accounting for
diagnostic uncertainty in radiology reports. Am J
Roentgenol. 2019;213(6):1207–12.

7. Al Mubarok AF, Dominique JAM, Thias AH.
Pneumonia Detection with Deep Convolutional
Architecture. In: 2019 International Conference of
Artificial Intelligence and Information Technology
(ICAIIT). 2019. p. 486–9.

8. Pedregosa F, Varoquaux G, Gramfort A, Michel V,
Thirion B, Grisel O, et al. Scikit-learn: Machine
learning in Python. J Mach Learn Res.
2011;12(Oct):2825–30.

9. Abadi M, Barham P, Chen J, Chen Z, Davis A, Dean J,
et al. TensorFlow: A System for Large-Scale Machine
Learning (pp. 265--283). In: 12th ${$USENIX$}$
Symposium on Operating Systems Design and
Implementation (${$OSDI$}$ 16) Retrieved from
https://www usenix
org/conference/osdi16/technical-sessions/presentation/
abadirpy2(nd) Retrieved March. 2016. p. 2019.

10. Gulli A, Pal S. Deep learning with Keras. Packt
Publishing Ltd; 2017.

11. Habib PT, Alsamman AM, Hassanein SE, Hamwieh A.
TarDict: RandomForestClassifier-based software
predict Drug-Tartget interaction. bioRxiv. 2020;

12. Matstubara T, Ochiai T, Hayashida M, Akutsu T,
Nacher JC. Convolutional neural network approach to
lung cancer classification integrating protein interaction
network and gene expression profiles. J Bioinform
Comput Biol [Internet]. Available from:
https://www.worldscientific.com/doi/abs/10.1142/S02
19720019400079?af=R

13. Lu S, Lu Z, Zhang Y-D. Pathological brain detection
based on AlexNet and transfer learning. J Comput Sci.
2019;30:41–7.

14. Lebedev V, Lempitsky V. Fast convnets using
group-wise brain damage. In: Proceedings of the IEEE
Conference on Computer Vision and Pattern
Recognition. 2016. p. 2554–64.

15. Ezhilarasi R, Varalakshmi P. Tumor Detection in the
Brain using Faster R-CNN. In: 2018 2nd International
Conference on I-SMAC (IoT in Social, Mobile,
Analytics and Cloud)(I-SMAC) I-SMAC (IoT in Social,
Mobile, Analytics and Cloud)(I-SMAC), 2018 2nd
International Conference on. 2018. p. 388–92.

16. kaggle [Internet]. 2020. Available from:
www.kaggle.com%0A

17. Kermany DS, Goldbaum M, Cai W, Valentim CCS,
Liang H, Baxter SL, et al. Identifying medical
diagnoses and treatable diseases by image-based deep
learning. Cell. 2018;172(5):1122–31.

18. Franquet T. Imaging of pneumonia: trends and
algorithms. Eur Respir J. 2001;18(1):196–208.

19. Goodman P, Prosch H, Herold CJ. Imaging of
Pulmonary Infections. In: Diseases of the Chest and
Heart 2015--2018. Springer; 2015. p. 63–70.

https://github.com/peterhabib/PneumoniaAI
http://bioscience.highlightsin.org/

