ResNet-50 for Pneumonia Detection
This model is a fine-tuned version of microsoft/resnet-50 trained to classify chest X-ray images into two categories: NORMAL and PNEUMONIA.
It was trained to handle class imbalances using weighted Cross-Entropy loss and utilizes specific image augmentations suited for medical radiography.
Dataset
The model was trained on the Chest X-Ray Images (Pneumonia) dataset.
- Normal: 1,341 training images
- Pneumonia: 3,876 training images
Training Procedure
Preprocessing and Augmentation
Images were resized and normalized using the AutoImageProcessor configuration from the base ResNet-50 model. During training, the following augmentations were applied to improve generalization:
- Random Resized Crop
- Random Horizontal Flip
- Random Rotation (15 degrees)
- Color Jitter (Brightness and Contrast)
Hyperparameters
- Learning Rate: 5e-5
- Train Batch Size: 8
- Gradient Accumulation Steps: 8 (Effective Batch Size: 64)
- Eval Batch Size: 8
- Epochs: 5
- Warmup Ratio: 0.1
- Loss Function: Weighted Cross-Entropy Loss (to penalize minority class misclassifications)
- Optimization Strategy: Best model loaded at the end based on F1 score.
Evaluation Results
On the standard test split, the model achieved the following performance:
- Accuracy: 0.833
- F1 Score (Weighted): 0.835
- Downloads last month
- 52
Model tree for Aunsiels/resnet-pneumonia-detection
Base model
microsoft/resnet-50Evaluation results
- Accuracy on imagefoldervalidation set self-reported0.833
- F1 on imagefoldervalidation set self-reported0.835