Ijraset Journal For Research in Applied Science and Engineering Technology
Authors: Sanjay Gandhi Gundabatini, Meda R N D LakshmiRoshini, Meruga Navya Sri, Peddisetti Deepthi, Pathuri Surya Teja
DOI Link: https://doi.org/10.22214/ijraset.2024.59145
Certificate: View Certificate
Pneumonia is a prevalent respiratory infection that poses a significant threat to public health. Timely and precise diagnosis is essential for effective treatment and patient management. The proposed methodology involves training a CNN (Convolutional Neural Networks), ResNet-50 and DenseNet-121, on a large dataset of chest X ray images. CNNs play a crucial role in feature extraction from chest X-ray images for various computer vision tasks, including image recognition. The CNN model automatically learns and extracts essential visual features from the input images, capturing patterns and characteristics. On the other hand, ResNet-50 and DenseNet-121 leverage their effectiveness in handling deeper architectures and handling vanishing gradient problems. We compare our approach with existing methods to assess the quality and accuracy of the generated captions. The models undergo training and testing utilizing an extensive dataset comprising chest X-ray images, demonstrating high accuracy in detecting pneumonia, potentially offering a valuable tool for early diagnosis and treatment. The proposed pneumonia detection framework holds great promise for assisting healthcare professionals in diagnosing and treating pneumonia, thereby improving patient outcomes, and reducing healthcare costs.
I. INTRODUCTION
Pneumonia is a serious respiratory infection that affects lungs, caused by microorganisms like bacteria (Streptococcus pneumoniae), viruses (influenza) and fungi (Pneumocysticarinii). With pneumonia, the air sacs may fill with pus (a thick yellowish or greenish opaque liquid produced by infected tissue) in lungs. This can be life-threatening particularly to infants and children. There are more than 10 million cases per year in India. Pneumonia can be categorized into infectious and non-infectious includes immune related whereas infectious is caused by pathogens. Some of the symptoms of pneumonia include reduced appetite, shortness in breathing, dry cough and fever. Timely and accurate diagnosis reduces the risk of mortality and healthcare costs and help for effective patient management. Traditional diagnosis methods rely on radiological images, such as chest X-rays and computed tomography (CT) scans, interpreted by medical experts. However, the growing demand for healthcare services, coupled with the shortage of radiologists, has created an urgent need for automated pneumonia detection systems that can assist clinicians in their diagnostic tasks. Deep learning algorithms can be effectively used for image recognition and learning features from the given data. CNN automatically learns features like edges, shapes etc. from images which is similar to human system preprocessing information.
Resnet is a deeper architecture known for its ability to train very deep networks. It learns residual instead of features. In Resnet each layer takes the residuals from the preceding two layers. It uses skip connections allowing gradients to flow more directly during backpropagation. Another deep design that feed-forwards connections between each layer and all other layers is called DenseNet. Since every layer in DenseNet receives input from every layer before it, the vanishing gradient issue is resolved.
II. LITERATURE REVIEW
In recent years, deep learning approaches have been used to medical image analysis with encouraging results, especially when it comes to the identification and categorization of pneumonia from chest Xray pictures. CNNs have been the subject of numerous studies investigating their efficacy in automating the detection process. Building on CNN’s effectiveness, researchers have looked into more advanced architectures for pneumonia detection, including Residual Networks (ResNet) and Dense Convolutional Networks (DenseNet). The availability of primary CT scans and clinical datasets will be crucial during the ongoing COVID-19 pandemic. These resources will aid in clinical decision-making, provide information to enhance comprehension of the viral infection, and serve as a foundation for systemic modelling that could aid in early diagnosis and prompt medical intervention. Making a comprehensive, open-access database with individual patient CFs and chest CT images would be one method to accomplish this goal and support global collaborative efforts against Pneumonia.
Alhassan [1] implemented ensemble model using MobileNetV2, DenseNet169 and VIT. The x-ray image is sent to the three functional layers. The output of each layer goes to pooling, flattening layers for dimensionality reduction and then concatenated. The concatenated result undergoes Batch normalization, dense and dropout layers to obtain the final output of the ensemble model. The final model has obtained the accuracy of 93.91.
Naseem Ansari [2] used two datasets which are publicly available. The datasets are RSNA and CXI datasets. The model is built using ResNet and Transfer learning. The model achieved highest accuracy when dataset is split into 80-20 ratio for training and testing ratio for both the datasets.
The work by Kundu et al. [3] presents a noteworthy contribution. Leveraging two prominent publicly available pneumonia chest X-ray datasets, namely the Kermany dataset and the RSNA dataset. Their study employs a sophisticated ensemble model comprising GoogleNet, ResNet-18, and DenseNet-121 architectures. The model is built using five-fold cross-validation strategy. The ensemble model demonstrates high accuracy and sensitivity across both datasets. The evaluation results indicate that the ensemble model achieved higher accuracy on the Kermany dataset compared to the RSNA dataset. The evaluation of this model involved statistical metrics, including Precision, Recall, F1score and AUC (Area under curve).
The work done by Saleh Albahli [4] is exploited by obtaining images from Kaggle to avoid the risk of over-fitting, done by GAN model. The target labels in this approach are 14. The ResNet-152 with augmentation obtains 67% accuracy and without obtains an accuracy of 62%. Inceptions V3 gets the accuracy of 68% and ResNet -152 with 6 classes gets 83% accuracy.
Israa Jassam [5] proposed DenseNet model, three CNN layers followed by a pooling layer that reduces the overfitting problem. The model could detect pneumonia with 90% accuracy.
The study sV S Suryaa [6] presents a transfer-learning based ensemble model to automate Pneumonia detection using Chest X-rays. Different CNN architectures were fine-tuned, trained and the results analysed to finally propose an ensemble model. The ensembled model evaluated had an accuracy of 95.03 and AUC score of 94.5 with a precision of 96.92.
Sharma [7] developed straightforward CNN structures for categorizing chest X-ray images indicative of pneumonia. They implemented data augmentation to address the limited data availability and achieved a classification accuracy of 90.68% on the dataset supplied by Kermany et al., hereafter called the Kermany dataset. Data augmentation provides only a limited amount of new information from which the CNNs can learn and thus may not significantly boost their performance.
Akshat jain [8] model is robust as it can work on any of the data sets that conform to the size of the image that is required for this model. We can observe that results for the “Efficient Net based UNet” model has high precision and decent recall of accuracy 94%, but “ResNet based U-Net” had given high recall but low precision of accuracy 84%. The initial model, "EfficientNet," demonstrated superior performance in terms of accuracy compared to our ensemble model. However, the ensemble model still yielded satisfactory results in real-world scenarios.
III. METHODOLOGIES
A. CNN
Convolutional Neural Networks, or CNNs, are growing in popularity these days because of their increased efficiency in classifying images. CNN makes it simple to extract features from an image. CNNs are trained on a dataset of labelled images, where the negative class consists of images without pneumonia and the positive class consists of images identified as such. The CNN gains the ability to recognize characteristics and patterns in the pictures that point to pneumonia through training. Majorly there are 4 building blocks in CNN and in each block there are several layers for performing.
IV. IMPLEMENTATION
The implementation of the project involves three models - CNN, Resnet and DenseNet models for accurately identifying pneumonia from chest X-ray images. These models are pivotal in the development of advanced algorithms for tasks such as image classification, object detection, and feature extraction.
A. Preprocessing
The first stage of preprocessing. In the preprocessing phase, we use the ImageDataGenerator class from the TensorFlow library to standardize and augment our dataset of chest X-ray images. It involves resizing the input images to a standardized dimension. The images were resized to square shape with dimension of 224*224 pixels for consistency in input size and the input size contains 3 dimensions. The resized input images are then augmented. Various transformation techniques such as rescaling, zooming and vertical flipping are applied to the input images for augmentation and improve model generalization.
B. CNN
CNNs are a class of deep neural networks that are particularly effective for image related tasks due to their ability to automatically learn hierarchical representations of data. The CNN model consists of five convolutional blocks, each consisting of each consisting of two separable convolutional layers followed by batch normalization and max-pooling. Dropout layers are inserted in the last two blocks to prevent overfitting. After the convolutional block, a flatten layer is added to transform the 3D feature maps into a 1D feature vector. ReLU is used as a activation function. Dropout layers with dropout rates of 0.7, 0.5, and 0.3 are added after each dense layer to further prevent overfitting by randomly deactivating neurons during training and Adam is used as an optimizer.
???????C. RESNET-50
ResNet-50 is build using residual learning framework. This consists of 50 layers and had emerged as a seminal advancement in the field of deep learning, particularly for tasks involving image classification and feature extraction. This is used to address the vanishing gradient problem in deep learning.
After pre-processing layers of the base ResNet-50s model are frozen to preserve the learned weights, preventing further updates during training. A ResNet-50 model is built followed by classification layers. A global average pooling layer (GlobalAveragePooling2D) is added to reduce the spatial dimensions of the feature maps generated by the ResNet-50 model. A dense layer (Dense) with 128 units and ReLU activation function is introduced to perform feature extraction and non-linear transformation. Finally, an output layer with a single unit and sigmoid activation function is added to produce binary classification predictions (pneumonia or normal). The Adam optimizer (adam) is utilized for gradient descent optimization.
???????D. DENSENET-121
DenseNet-121 is known for its distinctive architecture, which fosters dense connectivity between layers by establishing direct connections between all preceding layers and subsequent layers within each dense block. This dense connectivity facilitates feature reuse and gradient propagation, enabling the model to effectively leverage information from multiple layers and learn highly discriminative representations with fewer parameters.
After pre-processing layers of the base DenseNet121 model are frozen to preserve the learned weights, preventing further updates during training. Custom classification layers are added to adapt the architecture to the specific diagnostic task at hand. These layers include a flattening layer to transform the output of the base model into a suitable format for classification, followed by dense layers responsible for feature extraction and a dropout layer to mitigate overfitting. Adam is used as an optimizer.
V. RESULTS
The experimental evaluation of three notable CNN architectures - CNN, ResNet-50, and DenseNet-121 - provides compelling insights into their effectiveness in detecting pneumonia from chest X-ray images. The CNN model achieved an impressive accuracy of 92.95%, showcasing its efficacy in discerning relevant features and patterns indicative of pneumonia. Notably, ResNet-50 exhibited a slightly lower accuracy of 92.79%, albeit still demonstrating robust performance comparable to CNN. In contrast, DenseNet121 yielded an accuracy of 91.67%, slightly trailing behind CNN and ResNet50. Upon closer examination, it is evident that CNN and ResNet-50 outperformed DenseNet-121 in terms of accuracy, indicating their superior ability to extract discriminative features and effectively classify chest X-ray images.
VI. LIMITATIONS
VII. ACKNOWLEDGEMENTS
We are deeply thankful to our project Guide Dr. G. Sanjay Gandhi sir and project Coordinator Sri Hari sir for their invaluable guidance, support, and insightful feedback throughout the project's development. Their expertise and encouragement have been instrumental in shaping our approach and overcoming challenges our strategy and success in overcoming obstacles have been greatly influenced by their knowledge and support.
VIII. FUTURE WORK
This project has successfully implemented CNN, ResNet-50 and DenseNet-121 models for pneumonia detection in chest X-ray’s. CNN emerges as the top performer with an accuracy of 92.95. While CNN exhibits superior performance in this study, both DenseNet-121 and ResNet-50 still demonstrate commendable accuracy, highlighting their potential utility in medical image analysis.
[1] Mabrouk, Alhassan, et al. \"Pneumonia detection on chest X-ray images using ensemble of deep convolutional neural networks.\" Applied Sciences 12.13 (2022): 6448. [2] Ansari, Naseem, et al. \"Effective Pneumonia Detection using Res Net based Transfer Learning.\" Test Engineering and Management 82 (2020): 15146-15153 [3] Kundu, Rohit, et al. \"Pneumonia detection in chest X-ray images using an ensemble of deep learning models.\" PloS one 16.9 (2021): e0256630. [4] Albahli, Saleh, et al. \"Identification of thoracic diseases by exploiting deep neural networks.\" Neural Netw 5.6 (2021). [5] Jassam, Israa F., Saleh Mesbah Elkaffas, and Adel A. El-Zoghabi. \"Chest XRay Pneumonia Detection by DenseNet.\" 2021 31st International Conference on Computer Theory and Applications (ICCTA). IEEE, 2021. [6] Suryaa, V. S., and M. S. Aiswarya. \"Efficient DNN Ensemble for Pneumonia Detection in Chest X-ray Images.\" International Journal of Advanced Computer Science and Applications 12.10 (2021). [7] Sharma, A., et al. \"Detection of Pneumonia using ML & DL in Python.\" IOP Conference Series: Materials Science and Engineering. Vol. 1022. No. 1. IOP Publishing, 2021 [8] Pant, Ayush, et al. \"Pneumonia detection: An efficient approach using deep learning.\" 2020 11th International Conference on Computing, Communication and Networking Technologies (ICCCNT). IEEE, 2020. [9] Rayachoti, E., Vedantham, R., & Gundabatini, S. G. (2024). EU-net: An automated CNN based ebola U-net model for efficient medical image segmentation. Multimedia Tools and Applications, 1-25.
Copyright © 2024 Sanjay Gandhi Gundabatini, Meda R N D LakshmiRoshini, Meruga Navya Sri, Peddisetti Deepthi, Pathuri Surya Teja. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Paper Id : IJRASET59145
Publish Date : 2024-03-19
ISSN : 2321-9653
Publisher Name : IJRASET
DOI Link : Click Here