Image Classification
English

🦠 Pneumonia Classification Model

Welcome to the Pneumonia Classification Model repository! This project utilizes a deep learning approach based on the powerful ResNet-18 architecture to classify chest X-ray images and detect pneumonia with high accuracy.

Pneumonia Detection

πŸš€ Project Overview

This repository contains code for:

  • Training a ResNet-18 model for pneumonia classification
  • Evaluating model performance with detailed accuracy metrics
  • Visualizing key features using Class Activation Mapping (CAM)

πŸ“Š Key Features

βœ… ResNet-18 Backbone: Fine-tuned on chest X-ray images for accurate pneumonia detection
βœ… Model Evaluation: Includes both weighted and non-weighted accuracy assessments
βœ… Class Activation Mapping (CAM): Visualizes critical regions influencing the model’s predictions
βœ… Efficient Training: Optimized data pipelines for fast model training and inference


πŸ—‚οΈ Repository Structure

Pneumonia-Classification-Model/
β”œβ”€β”€ PneumoniaClassification.ipynb   # Jupyter Notebook for model training & evaluation
β”œβ”€β”€ checkpoints/                    # Saved model weights
β”œβ”€β”€ data/                           # Dataset folder (chest X-ray images)
β”œβ”€β”€ outputs/                        # Generated CAM images & evaluation results
└── README.md                       # Project documentation

βš™οΈ Installation

  1. Clone the Repository:
git clone https://github.com/SYEDFAIZAN1987/Pneumonia-Classification-using-resnet-18-based-model-with-evaluation-and-CAM.git
cd Pneumonia-Classification-Model
  1. Install Dependencies:
pip install -r requirements.txt
  1. Run the Model:
jupyter notebook PneumoniaClassification.ipynb

πŸ” Model Performance

Non-Weighted Accuracy:

Non-Weighted Accuracy

Weighted Loss Accuracy:

Weighted Accuracy

Class Activation Mapping (CAM):

Visual representation of regions critical to the model’s pneumonia classification:

CAM Visualization


πŸ“ˆ Evaluation Metrics

  • Precision, Recall, F1-Score for performance evaluation
  • Confusion Matrix for classification analysis
  • Weighted vs Non-Weighted Accuracy comparison

🀝 Contributing

Contributions are welcome! To contribute:

  1. Fork the repository
  2. Create a new branch: git checkout -b feature-branch
  3. Commit your changes
  4. Open a pull request πŸš€

πŸ“œ License

This project is licensed under the MIT License.


πŸ‘¨β€βš•οΈ Author

Developed by Syed Faizan
For any queries or collaborations, feel free to connect on GitHub.

⭐ If you found this project useful, please give it a star! ⭐

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for DrSyedFaizan/Pneumofind

Base model

frgfm/resnet18
Finetuned
(1)
this model

Dataset used to train DrSyedFaizan/Pneumofind