Skip to content

Pranaykarvi/derma-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Derma-AI

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.


πŸ“Œ Project Overview

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.

πŸ” Key Features

  • 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

πŸ“‚ Dataset

Name: HAM10000 - Human Against Machine with 10000 training images
Source: Kaggle

Classes:

Label Condition
akiec Actinic keratoses
bcc Basal cell carcinoma
bkl Benign keratosis-like lesions
df Dermatofibroma
mel Melanoma
nv Melanocytic nevi
vasc Vascular lesions

🧠 Model Architecture

We used Transfer Learning with fine-tuned CNN models such as:

  • EfficientNetB0
  • ResNet50

Layers:

  • Image Input Layer (224x224)
  • Convolutional Base from pretrained model
  • Global Average Pooling
  • Dense + Dropout Layers
  • Softmax Output (7 classes)

Loss & Metrics:

  • Categorical Crossentropy
  • Accuracy, Precision, Recall, F1-score

πŸ› οΈ Tech Stack

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

πŸ§ͺ Model Training

πŸ”„ Preprocessing:

  • 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

πŸ“ˆ Results:

  • Accuracy: ~90+% (Varies with model)
  • Confusion matrix and classification report used for performance analysis

🌐 Web Application

πŸ“Έ Features:

  • Upload skin image
  • Get:
    • Predicted condition
    • Confidence level
    • Medical name and short description
    • First-aid and treatment guidance
  • View highlighted region (optional Grad-CAM)

πŸ–₯️ Launch App Locally:

git clone https://github.com/your-username/skin-disease-classifier.git
cd skin-disease-classifier
pip install -r requirements.txt
streamlit run app.py

πŸ“ Project Structure

Derma-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

πŸ“„ License

This project is licensed under the MIT License. See the LICENSE file for details.

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors