Using computer vision Hyper-models on Chest X-Ray Images (Pneumonia)
This project focuses on detecting Pneumonia from Chest X-Ray images using deep learning techniques. The dataset used is the publicly available Chest X-Ray Pneumonia dataset from Kaggle, which includes images categorized into train, val, and test folders.
The project is divided into two main parts:
- A baseline model using EfficientNet-B0
- A HyperModel using EfficientNet-B3 with advanced training enhancements
- Source: Paul Mooney – Chest X-Ray Pneumonia (Kaggle link)
- Classes:
NORMAL,PNEUMONIA - Structure:
train/: Used for model trainingval/: Used for validation during trainingtest/: Used for final model evaluation
The first model uses a lightweight and efficient CNN, EfficientNet-B0, to classify chest X-ray images. It was trained using standard data preprocessing techniques without any complex optimization strategies.
Key Details:
- Input size: 224x224
- Optimizer: Adam
- Loss: CrossEntropyLoss
- Trained for 5 epochs
- Evaluated using the separate
testdataset
🔍 Result:
The baseline EfficientNet-B0 model achieved an average accuracy of 81.09% on the test dataset.
To improve performance, a more advanced version was built using EfficientNet-B3, paired with a range of optimization strategies:
Enhancements Applied:
- Advanced data augmentation (random flip, rotation)
- Learning rate scheduler for adaptive training
- Early stopping to prevent overfitting
- Confusion matrix and classification report for detailed test evaluation
- EfficientNet-B3 backbone for improved feature extraction
📈 Result:
The HyperModel achieved higher accuracy than the baseline model, outperforming the initial 81.09% by a significant margin, while also providing deeper insight into the model's performance across both classes.
Epoch 5: Train Loss=0.2341, Val Loss=0.1890, Val Acc=92.65%
Classification Report:
precision recall f1-score support
NORMAL 0.91 0.94 0.92 234
PNEUMONIA 0.97 0.94 0.95 390