Breast Cancer Detection with Deep Learning
Ultrasound Image Classification using ResNet50V2 + Xception Ensemble
๐ Overview
Breast cancer is one of the most common and life-threatening conditions affecting women globally. Early detection can significantly increase survival rates, and medical imaging, particularly ultrasound, has become a key tool in this process. This project explores how deep learning can help classify breast ultrasound images into malignant, benign, or normal categories with improved accuracy and diagnostic support.
๐ฏ Objective
To build and evaluate a hybrid deep learning model that combines ResNet50V2 and Xception for classifying breast ultrasound images. The goal is to create a robust model that enhances detection accuracy, compares well against traditional machine learning models, and supports early breast cancer diagnosis.
๐ Dataset
- Name: BUSI (Breast Ultrasound Images)
- Source: Cairo University, Egypt (2018)
- Collected by: Professor Aly Fahmy
- Data: 600 patients aged 25โ75
- Classes:
NormalBenignMalignant
Each class includes real ultrasound scans with associated segmentation masks (ground truth).
๐งช Technologies & Tools
- Python
- TensorFlow & Keras
- Matplotlib / Seaborn (Visualisation)
- scikit-learn
- Opencv (Image Processing)
๐ง Methodology
๐ผ๏ธ Image Preprocessing
- Resizing and normalising images
- Augmentation for the training set
- Label encoding + one-hot conversion
๐ค Model Architecture
Two pre-trained CNN models were used in parallel:
- Xception (for extracting complex spatial patterns)
- ResNet50V2 (for handling vanishing gradients and deeper feature layers)
Both were fine-tuned and merged using a Concatenate layer followed by:
GlobalAveragePoolingDense layersSoftmaxoutput
This combination had previously been used in COVID-19 and pneumonia research, but not in breast cancer classification, making it a Novel approach in this space.
๐ Comparison Models
- Convolutional Neural Networks (CNN)
- Support Vector Machines (SVM)
- Random Forest Classifier
- Logistic Regression
๐ Evaluation Metrics
- Accuracy
- Precision
- Recall
- F1-Score
- Confusion Matrix
- ROC-AUC Curve
These were used to evaluate and compare model performance, particularly sensitivity to malignant cases.
๐ Key Takeaways
- The ResNet50V2 + Xception hybrid model outperformed baseline models in terms of classification accuracy and sensitivity.
- This ensemble model successfully learnt meaningful features from ultrasound scans and reduced the likelihood of false negatives, crucial in cancer detection.
๐ธ Sample Image From Model Prediction
๐ Future Work
- Deployment via a web dashboard for clinical access
- Further model training with more diverse datasets
- Integration with segmentation models for lesion localisation
๐ง Reflection
This project deepened my understanding of how machine learning intersects with healthcare, especially in real-world, high-impact applications. It also challenged me to experiment with novel architectures and consider ethical implications in medical AI.
For a deeper dive into the methodologies and data, the project's GitHub repository is available at GitHub Repository.
This project originated as academic research and has been adapted here to demonstrate applied machine learning techniques.