The problem
Skin disease classification is hard by eye because many lesions look alike: a melanoma and a harmless mole can share the same colour and shape, and telling them apart needs training in dermoscopy, the magnified skin-surface examination dermatologists use. This project builds an AI classifier that takes a dermoscopic photograph and ranks it across eight diagnostic classes — melanoma, melanocytic nevus, basal cell carcinoma, actinic keratosis, benign keratosis, dermatofibroma, vascular lesion and squamous cell carcinoma — using an EfficientNet-B0 network fine-tuned on the ISIC 2019 dataset of 25,331 labelled images. The system is an academic prototype, not a diagnostic tool: it never replaces a dermatologist and makes no clinical-accuracy claim. Its value for a student is the complete, explainable pipeline — dataset handling, class-imbalance fixes, transfer learning, per-class evaluation and a working web demo with real lesion photographs — documented end to end for the viva.
Lesion photo from the ISIC 2019 set, resized to 224 by 224.
Follow the working sequence
How it works
End to end, the system turns a dermoscopic photograph into a ranked list of eight diagnoses. The photograph is resized to 224 by 224 pixels and normalised with the ImageNet mean and standard deviation, exactly as the EfficientNet-B0 backbone expects, with colour constancy applied to reduce differences between capture devices. The image passes through the backbone's MBConv blocks, which extract texture, border and colour patterns, and a replaced classification head converts the extracted features into eight softmax probabilities, one per diagnostic class. Training happens beforehand in the notebook: the backbone starts from ImageNet weights and is fine-tuned on the ISIC 2019 training split with a class-weighted loss that compensates for the imbalance between the 12,875 nevus images and the 239 dermatofibroma images. Evaluation runs on a held-out split the model never trained on, reporting balanced accuracy and per-class recall, and the web demo presents the same pipeline in interactive form.
- The 25,331 ISIC 2019 training images are loaded with their eight diagnostic labels and split into stratified train, validation and test sets, so every class keeps its share in each split.
- Each image is resized to 224 × 224, normalised with ImageNet mean and standard deviation, and colour-corrected; augmentation (rotation, flip, brightness, zoom) is applied more heavily to the four rarest classes.
- EfficientNet-B0 is loaded with ImageNet-pretrained weights, its 1,000-class head is replaced with an 8-way softmax, and the backbone is fine-tuned with a class-weighted cross-entropy loss.
- Training runs with the validation split monitored; the best weights are checkpointed on validation balanced accuracy, not overall accuracy.
- The held-out test split is evaluated once: balanced accuracy, per-class precision, recall and F1, and a confusion matrix for the known hard pairs (MEL vs NV, BCC vs SCC, AKIEC vs BKL).
- Grad-CAM overlays are generated for 12 held-out images and inspected to confirm the model attends to the lesion, not to hair, ruler marks or borders.
- In the web demo, a sample or uploaded photograph is preprocessed identically to training data and passed through the trained model, which returns the ranked eight-class probabilities beside the ABCD self-check.
| Model | Parameters (approximate, published) | Input size | Fit for this project |
|---|---|---|---|
| EfficientNet-B0 (chosen) | Approximately 5.3 million | 224 × 224 | Strong accuracy per parameter (published); fine-tunes on a laptop GPU and suits the 25,331-image dataset |
| ResNet50 | Approximately 25.6 million | 224 × 224 | Strong baseline but roughly 5× the parameters for similar accuracy on this task, so slower to train |
| MobileNetV2 | Approximately 3.5 million | 224 × 224 | Lighter and faster, but lower capacity for the fine-grained texture differences between similar lesion classes |
Tech stack:
- Python 3 · TensorFlow/Keras
- EfficientNet-B0 (ImageNet-pretrained)
- ISIC 2019 dataset
- NumPy · Pandas · Matplotlib
- scikit-learn (metrics)
- Jupyter Notebook (training & evaluation)
- HTML · CSS · JavaScript (web demo)
- Grad-CAM (model explanation)
Dataset & model details
- Dataset: ISIC 2019 — Skin Lesion Analysis Towards Melanoma Detection (International Skin Imaging Collaboration). 25,331 dermoscopic training images from HAM10000 (Vienna) and BCN_20000 (Barcelona), collected 2000–2018. Eight diagnostic classes: melanoma (MEL) 4,522; melanocytic nevus (NV) 12,875; basal cell carcinoma (BCC) 3,323; actinic keratosis (AKIEC) 867; benign keratosis (BKL) 2,624; dermatofibroma (DF) 239; vascular lesion (VASC) 253; squamous cell carcinoma (SCC) 628. The official test set (8,238 images) adds a ninth, unseen "unknown" class with no training examples.
- Task: 8-class image classification; input = 224 × 224 × 3 dermoscopic image, output = probability distribution over the eight diagnostic classes.
- Model: EfficientNet-B0 (Tan & Le, ICML 2019), ImageNet-pretrained, approximately 5.3 million parameters; MBConv blocks with squeeze-and-excitation; classification head replaced with global average pooling, dropout and an 8-way softmax. Class-weighted cross-entropy loss compensates for the imbalance.
- Metrics: Balanced accuracy (the ISIC 2019 challenge's primary metric), overall accuracy, per-class precision / recall / F1, confusion matrix, Grad-CAM inspection. No accuracy is claimed as measured until the training run for the order is executed; the design target is balanced accuracy above 70% on the held-out split.
- Builder note: During the demo build, two candidate photographs shortlisted from Wikimedia Commons were rejected after visual inspection showed they were histopathology micrographs, not dermoscopic photographs. The six demo photographs are verified clinical or dermoscopic images: melanoma (NCI, public domain), intradermal nevus dermoscopy, nodular basal cell carcinoma dermoscopy, a clinical mole photograph with ruler scale, lentigo maligna melanoma, and dermoscopy through a handheld dermatoscope.
| Parameter | Value |
|---|---|
| Input format | 224 × 224 × 3 RGB dermoscopic image, normalized (design) |
| Classes | 8 diagnostic classes (ISIC 2019) |
| Training images | 25,331 (ISIC 2019 training set, verified) |
| Model parameters | Approximately 5.3 million (EfficientNet-B0, published) |
| Backbone | EfficientNet-B0, ImageNet-pretrained (Tan & Le, 2019) |
| Output | 8-class probability distribution (softmax) |
| Balanced accuracy | Above 70% (design target, not a measured claim) |
| Training time | Approximately 2–4 hours on a free-tier GPU (expected) |
| Inference | Approximately 40–90 ms per image on CPU (expected) |
| Demo size | Approximately 271 KB single-file HTML (measured from the demo build) |
| Train / validation / test split | 80 / 10 / 10, stratified (design choice) |
Project features
The build centres on four capabilities. First, the classifier itself: an EfficientNet-B0 network, pre-trained on ImageNet and fine-tuned on ISIC 2019, that returns a ranked probability list across all eight diagnostic classes instead of a single unexplained label. Second, the DermaClassify web demo, which runs six real lesion photographs through the full interface — sample selection, preprocessing preview, probability bars and the ABCD self-check — plus an upload flow for the student's own dermoscopic photos. Third, the dataset explorer, which lays out the ISIC 2019 class distribution and explains why balanced accuracy, not overall accuracy, is the honest headline when one class holds half the data. Fourth, the evaluation discipline: stratified splits, per-class precision and recall, a confusion matrix and Grad-CAM overlays that show whether the model looks at the lesion or at artefacts such as ruler marks and hair.
- [Eight-class EfficientNet-B0 classifier] An ImageNet-pretrained EfficientNet-B0 backbone fine-tuned on ISIC 2019, with the classification head replaced by an 8-way softmax over MEL, NV, BCC, AKIEC, BKL, DF, VASC and SCC.
- [Interactive web demo with real lesion photographs] The DermaClassify demo ships six verified clinical and dermoscopic photographs, per-class probability bars, an ABCD self-check panel, and an upload flow that previews preprocessing for the student's own photos.
- [Per-class probability ranking] Every prediction shows the full ranked distribution across all eight classes, so the student can discuss the runner-up class and the model's uncertainty instead of hiding behind one label.
- [ISIC 2019 dataset explorer] A dedicated view presents the verified class counts, the 50.8% nevus share, and why class-weighted loss and balanced accuracy are required on this imbalanced dataset.
- [ABCD self-check panel] The demo pairs each prediction with the dermatology ABCD guide — asymmetry, border, colour, diameter — so the interface teaches the clinical reasoning alongside the model output.
- [Full training & evaluation notebook] Data loading, preprocessing, augmentation, fine-tuning, checkpointing and evaluation in one reproducible Jupyter notebook, with the split and hyperparameters recorded.
- [Grad-CAM explanation overlays] The notebook generates Grad-CAM heatmaps for 12 held-out images, checked by eye to confirm the model attends to the lesion rather than hair, ruler marks or image borders.
Implemented in the base build: all seven features above. Optional on request: a custom dataset retrain, a mobile-friendly upload page, or a second backbone for comparison. Future scope (not included): live camera capture, multi-image patient history, and any clinical deployment.
What is included
- Complete training & evaluation Jupyter notebook (ISIC 2019 pipeline, EfficientNet-B0 fine-tuning)
- Trained model weights with preprocessing code
- DermaClassify web demo (classify, dataset explorer and evaluation views)
- Class-distribution analysis and confusion matrix for the held-out split
- Grad-CAM overlays for 12 held-out images
- Project report PDF, abstract PDF and PPT presentation
- Viva Q&A preparation document (EfficientNet scaling, transfer learning, class imbalance, evaluation metrics)
Limitations & prerequisites
- This is an academic prototype, not a diagnostic tool: it never replaces a dermatologist and no clinical-accuracy claim is made.
- Trained only on ISIC 2019 dermoscopic images — ordinary phone photos of skin taken without dermoscopy are out of scope and will perform worse.
- Class imbalance is severe (nevus 50.8% of training data, dermatofibroma 0.9%), so rare-class recall is the weak point; the honest headline is balanced accuracy, not overall accuracy.
- No accuracy figure is quoted until the training run for the order is executed; the above-70% balanced accuracy figure is a design target, not a measured result.
- The official ISIC 2019 test set contains an unseen "unknown" class; the build discusses out-of-distribution behaviour but does not claim to detect it.
- The web demo shows illustrative probabilities for its six sample cases; it does not run the trained weights in the browser — classification of new images runs in the Python notebook.
Frequently Asked Questions
Which dataset is used and what does it contain?
The ISIC 2019 dataset from the International Skin Imaging Collaboration: 25,331 dermoscopic training images across eight diagnostic classes, drawn from the HAM10000 archive in Vienna and the BCN_20000 archive in Barcelona. Melanocytic nevus dominates with 12,875 images while dermatofibroma has only 239, so the notebook treats the imbalance explicitly with class-weighted loss and reports per-class recall rather than headline accuracy alone.
Which model is used and how does it classify an image?
EfficientNet-B0, the compound-scaled convolutional network by Tan and Le (ICML 2019), pre-trained on ImageNet and fine-tuned on ISIC 2019. Each dermoscopic image is resized to 224 × 224 and normalised, passed through the network's MBConv blocks, and the replaced classification head returns an 8-way softmax — a probability for each of the eight diagnostic classes, ranked for the user.
Is the accuracy guaranteed?
No accuracy is guaranteed, and none is quoted as measured on this page. The build's design target is balanced accuracy above 70% on the held-out split, stated as a target because the figure only becomes real when the training run for the order is executed. The report records the actual achieved numbers — balanced accuracy, per-class precision and recall, and the confusion matrix — so the viva discussion uses the team's own results.
Is this a diagnostic tool? Can it replace a dermatologist?
No. This is an academic prototype for study, not a medical device, and it makes no clinical-accuracy claim: a model output is a study aid only, and any real skin concern, or any lesion matching several ABCD signs, should be shown to a dermatologist promptly. The demo and the listing both carry this disclaimer, and the report states it in the limitations section.
Can new classes or a custom dataset be added?
Yes, as an optional retrain: the notebook is written so the class list and the data loader can be changed, the head re-sized, and the model fine-tuned again on the new data. Adding a class needs enough labelled examples of it — a handful of images will not teach a new diagnosis — and the evaluation (balanced accuracy, per-class recall, confusion matrix) is re-run from scratch on the new split.
Is this project suitable for a final-year project?
Yes — for Computer Science, IT, AI & Machine Learning and Biomedical Engineering programs, because it demonstrates transfer learning, handling a real imbalanced medical dataset, honest evaluation with balanced accuracy and per-class metrics, model explanation with Grad-CAM, and a working web demo that gives the team concrete material for the report and the viva.
Components & software requirements
- Python 3 · TensorFlow/Keras
- EfficientNet-B0 (ImageNet-pretrained)
- ISIC 2019 dataset
- NumPy · Pandas · Matplotlib
- scikit-learn (metrics)
- Jupyter Notebook (training & evaluation)
- HTML · CSS · JavaScript (web demo)
- Grad-CAM (model explanation)
Dataset & model details
- Dataset: ISIC 2019 — Skin Lesion Analysis Towards Melanoma Detection (International Skin Imaging Collaboration). 25,331 dermoscopic training images from HAM10000 (Vienna) and BCN_20000 (Barcelona), collected 2000–2018. Eight diagnostic classes: melanoma (MEL) 4,522; melanocytic nevus (NV) 12,875; basal cell carcinoma (BCC) 3,323; actinic keratosis (AKIEC) 867; benign keratosis (BKL) 2,624; dermatofibroma (DF) 239; vascular lesion (VASC) 253; squamous cell carcinoma (SCC) 628. The official test set (8,238 images) adds a ninth, unseen "unknown" class with no training examples.
- Task: 8-class image classification; input = 224 × 224 × 3 dermoscopic image, output = probability distribution over the eight diagnostic classes.
- Model: EfficientNet-B0 (Tan & Le, ICML 2019), ImageNet-pretrained, approximately 5.3 million parameters; MBConv blocks with squeeze-and-excitation; classification head replaced with global average pooling, dropout and an 8-way softmax. Class-weighted cross-entropy loss compensates for the imbalance.
- Metrics: Balanced accuracy (the ISIC 2019 challenge's primary metric), overall accuracy, per-class precision / recall / F1, confusion matrix, Grad-CAM inspection. No accuracy is claimed as measured until the training run for the order is executed; the design target is balanced accuracy above 70% on the held-out split.
- Builder note: During the demo build, two candidate photographs shortlisted from Wikimedia Commons were rejected after visual inspection showed they were histopathology micrographs, not dermoscopic photographs. The six demo photographs are verified clinical or dermoscopic images: melanoma (NCI, public domain), intradermal nevus dermoscopy, nodular basal cell carcinoma dermoscopy, a clinical mole photograph with ruler scale, lentigo maligna melanoma, and dermoscopy through a handheld dermatoscope.
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.
Download free synopsis (PDF)
Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.