All Projects
AI/ML

Deep Learning-Based Skin Cancer Detection

About

This project presents a comprehensive, automated dermatological diagnosis system designed to detect and classify seven distinct types of skin lesions. Trained on the benchmark HAM10000 dataset, the system tackles major challenges inherent in medical imaging—such as severe class imbalance (58x difference between majority and minority classes) and visual occlusions. By combining an advanced preprocessing pipeline with a custom, highly efficient Convolutional Neural Network (CNN), the model delivers accurate, multi-class skin cancer detection without requiring massive computational overhead.

Tech Stack

Python
TensorFlow/Keras
PyTorch
OpenCV
NumPy
Pandas

Features

Advanced Image Preprocessing

Automatically removes occluding hairs using morphological black-hat filtering and inpainting, and improves lesion visibility using CLAHE.

Targeted Data Balancing

Mitigates massive dataset imbalances using a two-phase data augmentation strategy specifically targeted at minority classes.

Lightweight Efficiency

The entire CNN model contains only ~1.28 million parameters, offering an optimal trade-off between discriminative power and speed.

Multi-Class Classification

Capable of categorizing seven different diagnostic classes, ranging from severe Melanoma to Benign keratosis-like lesions.

Architecture

01

Input Pipeline

Images are resized to 224x224 pixels and normalized using ImageNet mean and standard deviation metrics.

02

Convolutional Feature Extractor

Four sequential blocks with 3x3 convolutions, batch normalization, ReLU activation, and max-pooling. Filter sizes progressively increase (32 → 64 → 128 → 256).

03

Classification Head

Extracted features are flattened and passed through dense layers (256 → 128 → 64 → 32) with batch normalization.

04

Regularization & Output

A dropout layer (rate 0.2) reduces overfitting, leading into a final 7-unit Softmax activation layer.

Future Improvements

Explainable AI (XAI) Integration

Implement Grad-CAM to generate heatmaps highlighting the exact visual features the model used for its prediction.

Mobile Point-of-Care App

Convert and optimize using TensorFlow Lite or CoreML for deployment as a real-time, offline smartphone application.

Ensemble Learning & ViTs

Explore integrating Vision Transformers alongside the CNN to better capture both local textures and global context.