Pneumonia detection in XRay Images using Deep learning


Pneumonia detection in XRay Images using Deep learning

Pneumonia is a disease that occurs in the lungs caused by a bacterial infection. Early diagnosis is an important factor in terms of the successful treatment process.

Generally, the disease can be diagnosed from chest X-ray images by an expert radiologist. The diagnoses can be subjective for some reasons such as the appearance of the disease which can be unclear in chest X-ray images or can be confused with other diseases.

Therefore, computer-aided diagnosis systems are needed to guide clinicians. In this study, we used two well-known convolutional neural network models Xception and Vgg16 for diagnosing pneumonia. We used transfer learning and fine-tuning in our training stage.

The test results showed that the Vgg16 network exceed the Xception network at the accuracy with 0.87%, and 0.82% respectively. However, the Xception network achieved a more successful result in detecting pneumonia cases.


Artificial intelligence has found its use in various fields during the course of its development, especially in recent years with the enormous increase in available data. Its main task is to assist in making better, faster, and more reliable decisions. Artificial intelligence and machine learning are increasingly finding their application in medicine. This is especially true for medical fields that utilize various types of biomedical images and where diagnostic procedures rely on collecting and processing a large number of digital images. The application of machine learning in the processing of medical images helps with consistency and boosts accuracy in reporting. This paper describes the use of machine learning algorithms to process chest X-ray images in order to support the decision-making process in determining the correct diagnosis. Specifically, the research is focused on the use of deep learning algorithms based on a convolutional neural network in order to build a processing model. This model has the task to help with a classification problem that is detecting whether a chest X-ray shows changes consistent with pneumonia or not, and classifying the X-ray images into two groups depending on the detection results.

Introduction: –

This study, it is aimed to classify healthy patients, COVID-19, and viral pneumonia cases. Deep learning is a machine learning method. It allows us to train artificial intelligence to predict outputs with a given data set. Both supervised and unsupervised learning can be used to train artificial intelligence. Deep learning is used in voice and face recognition, disease detection, defense, and security areas. The word deep in deep learning represents artificial neural networks. Artificial neural networks are inspired by the human brain. Just like the human brain, it consists of neurons. The difference between them is the amount and speed of learning. In other words, data sets and processing power are needed to train artificial neural networks.

Existing Method: –

  • K means clustering  
  • Thresholding method
  • Manual analysis – is time-consuming, inaccurate, and requires an intensively trained person to avoid diagnostic errors.


  • Difficult to get accurate results
  • Not applicable for multiple images for pneumonia detection in a short time
  • Medical Resonance images contain a noise caused by operator performance which can lead to serious inaccuracies classification. 

Proposed Method: –

  • Pre-processing
  • Feature extraction
  • Neural network 

    Advantages: –

    • It can segment the lung regions from the image accurately.
    • It is useful to classify lung cancer images for accurate detection. 
    • Lung cancer will be detected in an early stage

    Application: –

    • Medical diseases diagnosis system for medical application


    Pneumonia detection in XRay Images using Deep learning 1
    Pneumonia detection in XRay Images using Deep learning

    Software requirement:

    Python OpenCV

    Hardware requirement




    [1] A. L. Blum and P. Langley, “Selection of relevant features and examples in machine learning,” Artif. Intell., vol. 97, no. 1–2, pp. 245– 271, Dec. 1997. 

    [2] Y. Bengio, A. Courville, and P. Vincent, “Representation Learning: A Review and New Perspectives,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 35, no. 8, pp. 1798–1828, 2013. 

    [3] COVID-19 Radiography Database. 1 July 2020. 

    [4] F. Rustam et al., “COVID-19 Future Forecasting Using Supervised Machine Learning Models,” in IEEE Access, vol. 8, pp. 101489- 101499, 2020, DOI: 10.1109/ACCESS.2020.2997311. 

    [5] S. Roy et al., “Deep Learning for Classification and Localization of COVID-19 Markers in Point-of-Care Lung Ultrasound,” in IEEE Transactions on Medical Imaging, vol. 39, no. 8, pp. 2676-2687, Aug. 2020, DOI: 10.1109/TMI.2020.2994459. 

    Customer Reviews

    There are no reviews yet.

    Be the first to review “Pneumonia detection in XRay Images using Deep learning”

    Your email address will not be published. Required fields are marked *