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.
Automatically removes occluding hairs using morphological black-hat filtering and inpainting, and improves lesion visibility using CLAHE.
Mitigates massive dataset imbalances using a two-phase data augmentation strategy specifically targeted at minority classes.
The entire CNN model contains only ~1.28 million parameters, offering an optimal trade-off between discriminative power and speed.
Capable of categorizing seven different diagnostic classes, ranging from severe Melanoma to Benign keratosis-like lesions.
Images are resized to 224x224 pixels and normalized using ImageNet mean and standard deviation metrics.
Four sequential blocks with 3x3 convolutions, batch normalization, ReLU activation, and max-pooling. Filter sizes progressively increase (32 → 64 → 128 → 256).
Extracted features are flattened and passed through dense layers (256 → 128 → 64 → 32) with batch normalization.
A dropout layer (rate 0.2) reduces overfitting, leading into a final 7-unit Softmax activation layer.
Implement Grad-CAM to generate heatmaps highlighting the exact visual features the model used for its prediction.
Convert and optimize using TensorFlow Lite or CoreML for deployment as a real-time, offline smartphone application.
Explore integrating Vision Transformers alongside the CNN to better capture both local textures and global context.
Interested in this project?