A modular and production ready deep learning framework for classifying breast abnormalities using mammographic imaging
This project leverages tailored CNN architectures and strategic data augmentation to enhance diagnostic accuracy on the MIAS dataset.
This repository implements and compares several pretrained deep learning models on the MIAS mammography dataset, focusing on improved generalization through:
- Smart data augmentation
 - Label balancing with optional inclusion of normal tissue
 - Freezing pre-trained convolutional backbones
 - Modular training and evaluation pipeline
 
Citation
This implementation is inspired by the paper:
“Optimized Deep Learning for Mammography: Augmentation and Tailored Architectures”
Authors: Syed Ibrar, Hussain et al.
Published in MDPI Information, 2025
📎 Read the paper
- Name: Mammographic Image Analysis Society (MIAS) Database
 - Source: Kaggle Dataset Link
 - Classes:
B: BenignM: MalignantN: Normal (optional)
 - Image Size: 1024x1024 
.pgmgrayscale images 
Preprocessing includes:
- Resizing to 
299x299 - Image normalization verification
 - 360° rotation augmentation in 6° steps
 
| Model Name | Architecture | 
|---|---|
mobilenetv3 | 
MobileNetV3 Large | 
nasnetmobile | 
NASNetMobile | 
resnetrs | 
ResNetRS101 | 
xception | 
Xception | 
resnet152 | 
ResNet152 | 
densenet201 | 
DenseNet201 | 
Each model:
- Uses pretrained ImageNet weights
 - Freezes the convolutional base
 - Adds 3-layer custom classifier
 
bash pip install -r requirements.txt
Download the data and place it in your main folder repository....:
./ ├── Info.txt └── all-mias-norm/*.pgm
Each trained model reports:
Accuracy
Precision (weighted)
Recall (weighted)
F1 Score (weighted)
Cohen Kappa Score
Full classification report
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.