An AI-powered skin disease detection system that analyzes skin lesion images and classifies them into 8 categories. Features an interactive chatbot assistant to explain results, treatments, and causes.
Important: The trained model files are too large (>100MB) for GitHub, so they are hosted on Google Drive:
📥 Download Models: Google Drive Link
Please download the model files and place them in the models/final_model_optimized/ folder before running the application.
- Paresh Suva - Team Leader
- Pranay Suthar - Developer
- Krish Zalavadiya - Developer
- Samarth Patel - Developer
-
8-Class Skin Disease Classification
- Actinic Keratosis (precancerous)
- Basal Cell Carcinoma (skin cancer)
- Benign Keratosis (harmless)
- Dermatofibroma (benign)
- Melanocytic Nevus (common mole)
- Melanoma (dangerous cancer)
- Squamous Cell Carcinoma (skin cancer)
- Vascular Lesion (blood vessel abnormality)
-
AI Chatbot Assistant - Ask questions about your diagnosis
-
Detailed Information - Causes, treatments, home care tips
-
Educational Resources - YouTube videos, medical articles
-
Downloadable Reports - Save analysis results
Run the application locally using the instructions below.
git clone https://github.com/Pranay-Suthar/Skin-disease-analysis-using-Deep-Learning.git
cd Skin-disease-analysis-using-Deep-LearningDownload the trained model from Google Drive and extract to:
models/final_model_optimized/
├── config.json
├── model.safetensors
└── preprocessor_config.json
python -m venv venv
# Windows
venv\Scripts\activate
# macOS/Linux
source venv/bin/activate# For running the app
pip install -r requirements-streamlit.txt
# For full development (includes training dependencies)
pip install -r requirements.txtcp .env.example .env
# Edit .env and add your GROQ_API_KEYstreamlit run skin_app.pyOpen http://localhost:8501 in your browser.
skin-disease-detection/
├── skin_app.py # Main Streamlit application
├── train_cpu.py # Training script for CPU
├── train_optimized_colab.py # Training script for GPU (Colab)
├── requirements.txt # Full dependencies (dev + training)
├── requirements-streamlit.txt # Minimal dependencies (deployment)
├── .streamlit/
│ └── config.toml # Streamlit configuration
├── .env.example # Environment template
├── .gitignore # Git ignore rules
├── README.md # This file
├── LICENSE # MIT License
└── models/
└── final_model_optimized/ # Our trained model
- Upload Image: Click "Browse files" and select a skin lesion image (JPG, PNG)
- Analyze: Click "🚀 Analyze Image" to get AI prediction
- View Results: See the predicted condition, confidence score, and severity
- Chat: Ask the AI assistant questions about your results
- Learn More: Check the resources section for treatments and articles
- Download Report: Save your analysis as a text file
- Frontend: Streamlit
- ML Model: Custom trained Swin Transformer (offline)
- Inference: PyTorch + Transformers
- Chatbot: Groq API with LLaMA 3.1
- Dataset: ISIC (International Skin Imaging Collaboration)
| Metric | Score |
|---|---|
| Validation Accuracy | 85-92% |
| Top-3 Accuracy | 96-98% |
If you have trained your own skin disease classification model, you can easily integrate it:
- Place your model files in
models/final_model_optimized/ - Ensure files are named:
config.json,model.safetensors,preprocessor_config.json - Update the
LABEL_MAPinskin_app.pyif your classes are different
- Update
LOCAL_MODEL_PATHinskin_app.py:LOCAL_MODEL_PATH = "models/your_model_folder"
- Place your model files in the new folder
- Restart the application
- HuggingFace Transformers format (recommended)
- PyTorch models with AutoImageProcessor
- Models with 8-class skin disease classification
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- ISIC Archive for the skin lesion dataset
- HuggingFace for model hosting
- Groq for free LLM API access
- Medical resources from Mayo Clinic, AAD, and Skin Cancer Foundation
⭐ If you found this project helpful, please give it a star!