Back to Projects
MedAL - Skin Cancer Detection System

MedAL - Skin Cancer Detection System

Deep learning image classification project for detecting malignant skin moles from medical images. The model was built with TensorFlow/Keras using transfer learning, data augmentation, and a recall-first evaluation approach to reduce the risk of missing malignant cases.

Jul 2024 - Nov 2024 4 months

Tech Stack

PythonTensorFlowKerasTransfer LearningImage ClassificationMedical AIMatplotlib

Key Results

We achieved a 97% Recall rate for Malignant cases, ensuring that the vast majority of cancerous moles are flagged for further review by a dermatologist.

ClassPrecisionRecallF1-ScoreSupport
Benign0.960.640.77360
Malignant0.690.970.81300
Overall Accuracy79%660

Model Architectures

We experimented with two distinct architectures to benchmark performance:

1. Transfer Learning (EfficientNetB0)

2. Custom CNN (Built from scratch)


Engineering Pipeline

Data Preprocessing & Augmentation

Medical datasets are often imbalanced or limited. We implemented a robust tf.data pipeline:

Optimization Strategy

The “Recall-First” Approach

Standard classification uses a decision threshold of 0.5. However, for cancer detection, this is often too conservative. We analyzed the Precision-Recall Curve and adjusted the decision threshold to 0.37.


Tech Stack

Usage

# Load the model
model = tf.keras.models.load_model('medal_model.h5')

# Predict on an image
img = load_and_prep_image('mole.jpg')
prob = model.predict(img)

# Apply the medical threshold
is_malignant = prob > 0.37
View All Projects