An end-to-end deep learning project that detects and classifies seven types of common skin lesions using the HAM10000 dataset and a CNN-based model. The application also provides medical insights and treatment suggestions based on the prediction.
Skin diseases, especially malignant ones like melanoma, can be life-threatening if not detected early. This project leverages the power of Convolutional Neural Networks (CNNs) and Transfer Learning to classify dermatological images and guide users with basic treatment advice.
- Classifies skin lesions into 7 categories
- Uses EfficientNet/ResNet for high accuracy
- Web interface for uploading images
- Provides confidence scores, medical names, and first-aid/treatment suggestions
- Optional Grad-CAM visualization to highlight lesion areas
Name: HAM10000 - Human Against Machine with 10000 training images
Source: Kaggle
| Label | Condition |
|---|---|
| akiec | Actinic keratoses |
| bcc | Basal cell carcinoma |
| bkl | Benign keratosis-like lesions |
| df | Dermatofibroma |
| mel | Melanoma |
| nv | Melanocytic nevi |
| vasc | Vascular lesions |
We used Transfer Learning with fine-tuned CNN models such as:
EfficientNetB0ResNet50
- Image Input Layer (
224x224) - Convolutional Base from pretrained model
- Global Average Pooling
- Dense + Dropout Layers
- Softmax Output (7 classes)
Categorical CrossentropyAccuracy,Precision,Recall,F1-score
| Tool | Purpose |
|---|---|
| Python | Core language |
| TensorFlow / Keras | Deep learning library |
| Pandas, NumPy | Data preprocessing |
| OpenCV / PIL | Image handling |
| Matplotlib / Seaborn | Visualization |
| Streamlit | Web app frontend |
| Grad-CAM | Visual explanation of predictions |
- Resizing images to
224x224 - Normalizing pixel values (0–1)
- One-hot encoding labels
- Train-Validation-Test Split (70/15/15)
- Class balancing using data augmentation
- Accuracy: ~
90+%(Varies with model) - Confusion matrix and classification report used for performance analysis
- Upload skin image
- Get:
- Predicted condition
- Confidence level
- Medical name and short description
- First-aid and treatment guidance
- View highlighted region (optional Grad-CAM)
git clone https://github.com/your-username/skin-disease-classifier.git
cd skin-disease-classifier
pip install -r requirements.txt
streamlit run app.pyDerma-AI/
├── data/
│ ├── HAM10000_images/
│ └── metadata.csv
├── model/
│ └── skin_disease_model.h5
├── app.py
├── utils/
│ ├── preprocess.py
│ ├── gradcam.py
├── treatment_info.json
├── requirements.txt
└── README.md
This project is licensed under the MIT License. See the LICENSE file for details.