Breast Cancer Prediction Using Machine Learning and Deep Learning
Breast Cancer Prediction Using Machine Learning and Deep Learning

Breast Cancer Prediction Using Machine Learning and Deep Learning

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.

image

๐ŸŽฏ 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:
    • Normal
    • Benign
    • Malignant

Each class includes real ultrasound scans with associated segmentation masks (ground truth).

image
image
image

๐Ÿงช 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:

  • GlobalAveragePooling
  • Dense layers
  • Softmax output
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.

image

๐Ÿ“ 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

image

๐Ÿš€ 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.