Back to Projects
MedAL - Skin Cancer Detection System

MedAL - Skin Cancer Detection System

Classifier model to detect skin cancer based on mole images. The model was used in the app MedAL

Jul 2024 - Nov 2024 4 months

Tech Stack

PythonKerasTransfer LearningImage ClassificationMatplotlib

📊 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