File size: 3,388 Bytes
26d219f
 
 
 
 
 
24b8eef
26d219f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24b8eef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
---
title: Dermatology AI Assistant
emoji: 🩺
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 5.49.1
app_file: app.py
pinned: false
license: apache-2.0
short_description: AI-powered dermatology analysis using Qwen2.5-VL-3B
---

# 🩺 Dermatology AI Assistant

An AI-powered dermatology analysis tool built with Qwen2.5-VL-3B, fine-tuned specifically for skin condition analysis and medical image understanding.

## πŸš€ Features

- **Advanced Vision-Language Model**: Powered by Qwen2.5-VL-3B fine-tuned for dermatology
- **Interactive Analysis**: Upload skin images and get detailed AI analysis
- **Customizable Questions**: Ask specific questions about skin conditions
- **Medical-Grade Interface**: Clean, professional interface designed for healthcare use
- **ZeroGPU Support**: Optimized for Hugging Face Spaces ZeroGPU

## πŸ₯ Medical Disclaimer

⚠️ **IMPORTANT**: This AI assistant is for educational and research purposes only. It should not be used as a substitute for professional medical advice, diagnosis, or treatment. Always consult with a qualified healthcare provider for medical concerns.

## πŸ› οΈ Technical Details

### Model Information
- **Base Model**: Qwen2.5-VL-3B-Instruct
- **Fine-tuning Method**: LoRA (Low-Rank Adaptation)
- **Training Data**: 1,000 dermatology images with conversations
- **Validation Data**: 200 dermatology images
- **Domain**: Dermatology and skin condition analysis

### Training Configuration
- **LoRA Rank**: 64
- **LoRA Alpha**: 64
- **LoRA Dropout**: 0.05
- **Learning Rate**: 1e-4
- **Batch Size**: 16
- **Epochs**: 1
- **Gradient Accumulation**: 8
- **GPU**: A100 80GB

## πŸ“– Usage

1. **Upload Image**: Click on the image upload area and select a skin condition image
2. **Ask Questions**: Use the default question or customize your own
3. **Get Analysis**: Click "Analyze Skin Condition" to get AI-powered insights
4. **Review Results**: Read the detailed analysis in the output area

### Example Questions
- "What type of skin condition is this?"
- "Describe the characteristics of this lesion."
- "What are the potential causes of this skin issue?"
- "What should I know about this skin condition?"

## πŸ”§ Local Development

### Prerequisites
- Python 3.8+
- CUDA-compatible GPU (recommended)
- 8GB+ VRAM

### Installation
```bash
# Clone the repository
git clone https://huggingface.co/spaces/ColdSlim/Dermatology-AI-Assistant
cd Dermatology-AI-Assistant

# Install dependencies
pip install -r requirements.txt

# Run the application
python app.py
```

## πŸ“Š Model Performance

- **Training Time**: ~10-15 minutes on A100 80GB
- **Inference Speed**: ~2-5 seconds per image
- **Memory Usage**: ~20-30GB VRAM
- **Model Size**: ~3B parameters

## 🀝 Contributing

Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.

## πŸ“„ License

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

## πŸ™ Acknowledgments

- [Qwen Team](https://github.com/QwenLM/Qwen2-VL) for the base model
- [Hugging Face](https://huggingface.co/) for the platform and infrastructure
- Medical professionals who provided domain expertise

## πŸ“ž Contact

For questions or support, please open an issue in this repository.

---

**Remember**: This tool is for educational purposes only. Always consult healthcare professionals for medical advice.