Full text
Volume-09 Issue 10, October-2025 ISSN: 2456-9348 Impact Factor: 8.232 International Journal of Engineering Technology Research & Management (IJETRM) https://ijetrm.com/ IJETRM (http://ijetrm.com/) [417] DETECTING THE SEVERITY OF PNEUMONIA USING CONVOLUTIONAL NEURAL NETWORK Prof. Aziz Makandar Professor, Department of Computer Science, Karnataka State Akkamahadevi Women’s University, Vijayapura – 586101 Anusha Almad Student, Department of Computer Science, Karnataka State Akkamahadevi Women’s University, Vijayapura – 586101 [email protected] Adiba Maniyar Research Scholar, Department of Computer Science, Karnataka State Akkamahadevi Women’s University, Vijayapura - 586101 [email protected] ABSTRACT The serious lung illness known as pneumonia can be fatal if left untreated. Chest X-ray diagnosis needs skilled radiologists, but the process can be time-consuming and sometimes inaccurate. This paper focuses on comparing detection of lung disease using different computer-aided techniques and suggests a revised model for detecting pneumonia. This model presents an automated pneumonia detection system using Convolution Neural Networks (CNNs). To treat pneumonia as soon as possible, especially in distant places, it would be advantageous to build an autonomous method for identifying the illness. With the purpose of improving dataset quality, the suggested approach preprocesses images by scaling, normalizing, and augmenting them. In order to efficiently recognize patterns in the medical images, CNN architecture is used for feature extraction and classification. High pneumonia detection accuracy was attained by the model, indicating its potential to support radiologists in clinical decision-making and early diagnosis. Through the automation of the diagnosis process, the system seeks to increase precision, lessen burden in medical settings, and enable quicker patient treatment planning. Keywords: CNN architecture, feature extraction, chest X-ray INTRODUCTION Pneumonia is a dangerous and potentially fatal lung illness that can be brought on by bacteria, viruses, or fungus. Mostly affecting the lungs alveoli (air sacs), it causes inflammation and fluid buildup. The World Health Organization (WHO) reports that pneumonia continues to rank among the world's leading causes of death, especially for elderly people and children under five. In order to avoid serious consequences and lower mortality, early and precise diagnosis is essential. Traditionally, radiologists manually read chest X-rays [10] and conduct clinical evaluations to diagnose pneumonia. Despite its effectiveness, this procedure is frequently arbitrary, labor-intensive, and prone to human error—particularly in areas with a shortage of radiologists or in medical centers with high patient volumes. Diagnoses may be delayed or incorrect due to misinterpretation caused by subtle variations in X-ray patterns. A deep learning-based method is adopted for automatically detecting and classifying the severity of pneumonia from chest X-ray images. The suggested approach removes the need for manual feature engineering by automatically extracting discriminative features from X-ray images using CNN [7] architectures or pre-trained models VGG16 [9], ResNet50 [10]. Normal, mild, moderate, and severe pneumonia are the four categories into which the method divides X-rays.
Volume-09 Issue 10, October-2025 ISSN: 2456-9348 Impact Factor: 8.232 International Journal of Engineering Technology Research & Management (IJETRM) https://ijetrm.com/ IJETRM (http://ijetrm.com/) [418] This work intends to improve diagnostic reliability, help radiologists make quicker and more reliable choices, and provide scalable healthcare solutions for under-resourced and rural areas by incorporating AI-assisted diagnosis into pneumonia detection. The developed model shows how deep learning can revolutionize conventional diagnostic procedures, assisting in the early start of therapy and eventually saving lives. LITERATURE SURVEY A significant worldwide health concern, pneumonia is especially prevalent in emerging and low-income areas with limited access to qualified radiologists and diagnostic imaging equipment. Traditional diagnosis mostly depends on manually interpreting chest X-rays, which is a laborious and subject to human error process. Alexander Kalinin et al [1] have proposed a straightforward and efficient technique for locating lung opacity regions. The model was pre-trained on the ImageNet dataset and was based on the single-shot detector RetinaNet with Se-ResNext101 encoders. The model's accuracy was raised by implementing a number of changes. To generalize the model, the ensemble of four folds and many checkpoints was unified, the global classification output was specifically included to the model, and extensive augmentations were applied to the data. Ablation research has demonstrated how the suggested methods increase the accuracy of the model. This approach offers a decent balance between accuracy and resources and intentionally avoids test-time augmentation. Kartik Thakral et al [2] have proposed work to increase medical proficiency in places where radiotherapists are still few. In such remote locations, our study helps with early pneumonia identification to avoid negative outcomes, including death. There hasn't been much effort done especially to identify pneumonia using the aforementioned dataset thus far. The creation of algorithms in this field has the potential to greatly improve healthcare services. In this classifier, we evaluated the performance of several pretrained CNN models and different classifiers, and based on statistical findings, we chose SVM for the classification stage and DenseNet169 for the feature extraction step. In the classification step, we also demonstrated that hyper-parameter tweaking improved the model's performance. With the tests we've done, we want to offer the most popular pretrained CNN model and classifier for upcoming research in related fields. Shagun Sharma et al [3] have proposed this SLR offers a taxonomy of DL-based pneumonia detection models, including as ensemble, CNN-based, and pre-trained models. Apart from classification, the review delves further into the architectures and procedures that go into creating pneumonia prediction models. In order to provide a more thorough understanding of the model's setup and training process, it furthermore contains comprehensive hyperparameter information, such as optimizers, learning rates, epochs, batch sizes, and training, testing ratios. Additionally, the evaluation takes into account the research gaps in ensemble, pre-trained, and CNN-based DL models. Pranav Rajpurkar et al [4] have proposed an algorithm that is more accurate than professional radiologists at identifying pneumonia from frontal-view chest X-ray pictures. Additionally, we demonstrate that a straightforward modification of our system to identify several diseases performs better than the prior state of the art on the biggest chest X-ray dataset that is openly accessible is called ChestX-ray14. We anticipate that expertlevel automation will enhance healthcare delivery and expand access to medical imaging knowledge in regions of the world with a shortage of qualified radiologists. Rachana Jain et al [5] have proposed two highly effective neural networks for real-time applications are presented in this research study. Both models exhibit great levels of accuracy and consistency. Since reducing the number of false negatives is crucial in the context of medical imaging, recall is a crucial performance evaluator in this endeavour. Model 2 has a 98% recall rate, while VGG19 achieves a 95% recall rate as well. Both the VGG19 and Model 2 networks had high f1 values of 91% and 94%, respectively. Given their outstanding performance on all performance metrics, medical officers can utilize the Model 2 and VGG19 models to diagnose and identify pneumonia in both adults and children early. Vikash Chouhan et al [6] have proposed a deep learning-based method for employing transfer learning to classify pneumonia from chest X-ray pictures. We utilized the transfer learning approach in this framework and extracted features using the pretrained architectures AlexNet, DenseNet121, Inception V3, Google Net, and ResNet18 that were trained on the ImageNet dataset. These characteristics were fed into the classifiers of the corresponding models, and each architecture's output was gathered. All five pretrained models were incorporated in our ensemble model, which performed better than any other model. We found that in the future, performance might be further enhanced by scaling the dataset, employing a data augmentation strategy, and utilizing hand-crafted features.
Volume-09 Issue 10, October-2025 ISSN: 2456-9348 Impact Factor: 8.232 International Journal of Engineering Technology Research & Management (IJETRM) https://ijetrm.com/ IJETRM (http://ijetrm.com/) [419] METHODOLOGY Convolutional Neural Networks (CNNs) [7] is implemented in proposed study to automatically detect and classify severity of pneumonia from chest X-ray pictures. Accuracy, interpretability, and scalability are the three main focuses of the system to guarantee dependability and appropriateness for clinical settings. Each part of its architecture, including data preparation, model training, visualization, and reporting, functions independently while integrating seamlessly because to its modular design approach. Dataset Description: The dataset is obtained from Kaggle repository [16]. It comprises of total 5,863 images among that 1,349 are Normal and 3,883 are Infected (Bacterial/Viral) images. Images are labelled and categorized based on infection severity. The table 1 shows the total number of images in the dataset. Data Characteristics Value Total Images 5,863 Normal Images 1,349 Infected Images 3,883 Number of classes 2 Image Resolution 224*224 Data Augmentation Rotation, Zooming and Flipping Table 1: Dataset descriptions Dataset Pre-processing: The obtained images are not of uniform size. To make images compatible, resized them to 224 × 224 pixels and convert grayscale to 3-channel RGB (for CNN compatibility). Data augmentation [8] is applied for rotation, zooming, flipping and the image pixel values were normalized to [0,1]. System Architecture: The workflow of the proposed methodology is shown in the figure below, which comprises of data collections, data pre-processing and augmentation, feature extraction, model training and testing, evaluation metrics, and severity detection. Figure 1: Workflow of the proposed work Step 1: Data Collection The dataset is obtained from Kaggle repository [16], consisting of labelled images Normal and Pneumonia. Step 2: Data Preprocessing and Augmentation The X-ray images are resized, normalized, and augmented (rotated, flipped, or zoomed) to enhance the dataset. Step 3: Feature Extraction
Volume-09 Issue 10, October-2025 ISSN: 2456-9348 Impact Factor: 8.232 International Journal of Engineering Technology Research & Management (IJETRM) https://ijetrm.com/ IJETRM (http://ijetrm.com/) [420] CNN automatically learns and identifies key patterns from X-ray images such as shapes, textures, and edges. Step 4: Model Building and Testing A deep CNN architecture is designed and trained to automatically extract features from the images and classify them. Step 5: Evaluation Metrics To assess the model’s learning capability; several standard classification metrics are applied. • Accuracy: Overall performance of the model. • Precision: Fraction of correctly predicted pneumonia cases. • Recall: Fraction of actual pneumonia cases correctly detected. • F1-Score: Harmonic mean of precision and recall. Step 6: Severity Detection The system establishes the severity level, which is classified as Normal, Mild, Moderate, or Severe. Deep Learning Model Convolutional Neural Network: A convolution neural network (CNN) [7] is a particular type of artificial neural network designed for uses such as image processing and classification. CNNs' architecture, which stores spatial and hierarchical information, makes them very good at identifying patterns and features in pictures. The basic CNN model is used for classification. The input layer is fed with resized input image with dimension 224*224*3. Model Adaption and Training Process: Model Adaptation and Training process refer to the method carried out to transform and fine-tune a pre-trained model for a novel and particular task. The concept of hyperparameter tuning acts as an essential role in maximizing performance of transfer learning models. Concurrently to obtain the better results in the research work, the model's learning rate, batch size, optimizer selection and no of epochs were adjusted. Hyper parameters Selected Value No of epoch 5 Batch Size 32 Optimizer Adam Learning Rate 0.001 Table 2: Model Parameters The table 2 describes the hyper parameters adopted in implementing the model no of epochs are 5, batch size is 32, optimizer is Adam and learning rate is 0.001. RESULTS AND DISCUSSION The software and hardware requirements adopted to implement this model are Intel Core i5 processor, storage is 250 GB HDD, 8 GB of RAM, operating system is 64-bit. Python programming language is used and implemented in VS code platform. Model Performance: The suggested Convolution Neural Network (CNN) [7] model's efficacy in detecting pneumonia was evaluated by computing a number of common classification performance measures, including F1-Score [10], Accuracy [10], Precision [10], and Recall (Sensitivity) [10]. Test results for True Positives (TP), True Negatives (TN), False Positives (FP), and False Negatives (FN) are used to calculate these measures. Metric Formula Result Accuracy (TP+TN)/(TP+TN+FP+FN) 94.2% Precision TP/(TP+FP) 93.6% Recall TP/(TP+FN) 92.8% F1-Score 2× (Precision × Recall)/ (Precision + Recall) 93.2% AUC Area under ROC curve 0.95 Table 3: Classification results accuracy, precision, recall, F1 score and AUC
Volume-09 Issue 10, October-2025 ISSN: 2456-9348 Impact Factor: 8.232 International Journal of Engineering Technology Research & Management (IJETRM) https://ijetrm.com/ IJETRM (http://ijetrm.com/) [421] The table 3 describes that proposed model using CNN [7] has achieved better result with Accuracy 94.2%, Precision 93.6%, Recall 92.8%, F1-Score 93.2%, and AUC 0.95. A confusion matrix [10] was developed in order to assess the suggested CNN model's classification performance in more detail. For each pneumonia severity group, it shows the proportion of chest X-ray images that were correctly and mistakenly diagnosed. The confusion matrix of the proposed work is shown below in figure 2. Figure 2: Confusion matrix of proposed work The figure 3 below describes the graphical representation of evaluation metrics such as accuracy, precision, recall, F1-score and AUC. Figure 3: Graphical representation of classification results
Volume-09 Issue 10, October-2025 ISSN: 2456-9348 Impact Factor: 8.232 International Journal of Engineering Technology Research & Management (IJETRM) https://ijetrm.com/ IJETRM (http://ijetrm.com/) [422] CONCLUSION The "Pneumonia Detection and Severity Classification Using Convolutional Neural Networks (CNN)" study effectively illustrates how deep learning methods can be used to the field of medical image analysis. Using chest X-ray images, the system offers an intelligent, automatic, and understandable way to diagnose pneumonia and further classify its severity into three levels: mild, moderate, and severe. The model demonstrates a CNN-based system that reliably and quickly diagnoses chest X-rays as either normal or pneumonia, providing diagnostic help that is particularly useful in environments with limited resources. By offering a scalable, effective method for early pneumonia detection—with the possibility for real-time deployment following additional validation—it connects AI research with practical healthcare. REFERENCES [1] Gabruseva, T., Poplavskiy, D., & Kalinin, A. (2020). Deep learning for automatic pneumonia detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition workshops (pp. 350351). [2] Varshni, D., Thakral, K., Agarwal, L., Nijhawan, R., & Mittal, A. (2019, February). Pneumonia detection using CNN based feature extraction. In 2019 IEEE international conference on electrical, computer and communication technologies (ICECCT) (pp. 1-7). IEEE. [3] Sharma, S., &Guleria, K. (2024). A systematic literature review on deep learning approaches for pneumonia detection using chest X-ray images. Multimedia Tools and Applications, 83(8), 24101-24151. [4] Rajpurkar, P., Irvin, J., Zhu, K., Yang, B., Mehta, H., Duan, T., ... & Ng, A. Y. (2017). Chexnet: Radiologist-level pneumonia detection on chest x-rays with deep learning. arXiv preprint arXiv:1711.05225. [5] Jain, R., Nagrath, P., Kataria, G., Kaushik, V. S., & Hemanth, D. J. (2020). Pneumonia detection in chest Xray images using convolutional neural networks and transfer learning. Measurement, 165, 108046. [6] Chouhan, V., Singh, S. K., Khamparia, A., Gupta, D., Tiwari, P., Moreira, C., ... & De Albuquerque, V. H. C. (2020). A novel transfer learningbased approach for pneumonia detection in chest X-ray images. Applied Sciences, 10(2), 559. [7] Varshni, D., Thakral, K., Agarwal, L., Nijhawan, R., & Mittal, A. (2019, February). Pneumonia detection using CNN based feature extraction. In 2019 IEEE international conference on electrical, computer and communication technologies (ICECCT) (pp. 1-7). IEEE. [8] Motamed, S., Rogalla, P., &Khalvati, F. (2021). Data augmentation using Generative Adversarial Networks (GANs) for GAN-based detection of Pneumonia and COVID-19 in chest X-ray images. Informatics in medicine unlocked, 27, 100779. [9] Bangare, S., Rajankar, H., Patil, P., Nakum, K., &Paraskar, G. (2022). Pneumonia detection and classification using CNN and VGG16. International Journal of Advanced Research in Science, Communication and Technology, 12, 771-779. [10] Jain, R., Nagrath, P., Kataria, G., Kaushik, V. S., & Hemanth, D. J. (2020). Pneumonia detection in chest X-ray images using convolutional neural networks and transfer learning. Measurement, 165, 108046. [11] World Health Organization, Pneumonia: Key Facts, WHO, 2023. [Online]. Available: https://www.who.int/news-room/fact-sheets/detail/pneumonia [12] Y. LeCun, Y. Bengio, and G. Hinton, “Deep learning,” Nature, vol. 521, no. 7553, pp. 436–444, 2015. [13] P. Rajpurkar, A. Irvin, K. Zhu, et al., “ChestX-ray8: Hospital-scale Chest X-ray Database and Benchmarks on Weakly-Supervised Classification and Localization of Common Thorax Diseases,” IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 2097–2106, 2017. [14] D. Kermany, M. Goldbaum, W. Cai, et al., “Identifying Medical Diagnoses and Treatable Diseases by Image-Based Deep Learning,” Cell, vol. 172, no. 5, pp. 1122–1131, 2018. [15] S. Chandra and A. Verma, “Comparative Analysis of Machine Learning Techniques for Pneumonia Detection using Chest X-rays,” International Journal of Computer Applications, vol. 175, no. 23, pp. 25–30, 2017. [16] https://www.kaggle.com/datasets/paultimothymooney/chest-xray-pneumonia