Inspiration

About the Project

Inspiration

Pneumonia is a serious respiratory infection that can be identified using chest X-ray images. We were inspired to build this project because analyzing X-ray images manually can take time and requires medical expertise. We wanted to explore how Artificial Intelligence and Deep Learning can assist in identifying pneumonia from chest X-rays.

What We Built

We developed an AI-assisted pneumonia detection system that analyzes chest X-ray images and classifies them into two categories:

  • Normal
  • Pneumonia

The system uses Deep Learning and Convolutional Neural Networks (CNNs) for image classification. We also use Transfer Learning with a pretrained MobileNetV2 model and compare it with a custom CNN approach.

The workflow of our system is:

Chest X-Ray → Preprocessing → Data Augmentation → CNN / MobileNetV2 → Prediction → Confidence Score → Grad-CAM Explanation

We integrated the trained model into a simple Streamlit web application where users can upload a chest X-ray image and receive a prediction along with a confidence score. Grad-CAM is also used to provide a visual explanation of the regions that influenced the model's prediction.

How We Built It

We used Python as the main programming language and TensorFlow/Keras for deep learning. The project includes:

  • Chest X-ray image preprocessing
  • Image resizing and normalization
  • Data augmentation
  • Custom CNN model
  • MobileNetV2 Transfer Learning
  • Model evaluation
  • Confusion matrix and classification metrics
  • Grad-CAM based visual explanation
  • Streamlit web application

The project was developed using VS Code and the final project code was maintained using Git and GitHub.

What We Learned

Through this project, we learned the complete workflow of a Deep Learning image classification project. We learned how to prepare medical image datasets, preprocess and augment images, train CNN models, use Transfer Learning, evaluate classification performance, and integrate a trained model into a web application.

We also learned that explainability is important when working with AI-based medical applications. Grad-CAM helped us understand which regions of an X-ray image influenced the model's prediction.

Challenges We Faced

One of our main challenges was working with a large number of X-ray images and managing the training process with limited computing resources. We also faced challenges while selecting suitable preprocessing techniques, training the models, comparing different approaches, and integrating the trained model with the Streamlit application.

Another important challenge was making the system understandable rather than providing only a prediction. To address this, we included a confidence score and Grad-CAM visualization.

Future Improvements

In the future, the system can be improved by training on more diverse and clinically representative datasets, improving model performance, adding additional respiratory conditions, and validating the system with medical professionals and appropriate clinical data.

Disclaimer

This project is an academic AI-assisted prototype developed for learning and demonstration purposes. It is not intended to replace doctors, radiologists, or professional medical diagnosis.

What it does

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for Intelligent Pneumonia Detection Using Deep Learning

Built With

Share this project:

Updates

Submission history