A deep learning model built with PyTorch to classify chest X-ray images into normal or diseased categories using a pretrained ResNet18 architecture. Trained on a labeled dataset of chest X-rays for automated medical diagnosis support.
This project uses ResNet-18 to detect pneumonia from chest X-ray images. Both a scratch-trained and a pretrained version of the model were evaluated.
| Model | Overall Accuracy | Normal Accuracy | Pneumonia Accuracy |
|---|---|---|---|
| ResNet-Scratch | 86.38% | 70.51% | 95.90% |
| ResNet-Pretrained | 90.87% | 85.04% | 94.36% |
โ The pretrained model significantly improved classification of normal cases while maintaining high pneumonia accuracy.
Install required packages:
pip install torch torchvision matplotlib numpyTo train and evaluate the model, you'll need the chest X-ray image dataset.
๐ฆ Download chest_xray_images.zip from Google Drive
After downloading, unzip it and place the folder like this: Chest-Xray-Classifier/ โโโ chest_xray_images/