Advanced AI-powered skin analysis platform combining machine learning with dermatological expertise
- 🔬 8-Class Skin Condition Detection - Vision Transformer (ViT) model with 95%+ accuracy
- 🧠 Grad-CAM Visual Explanations - See which areas influenced the AI's decision
- 💬 AI Chat Assistant - Real-time dermatology consultations powered by Groq AI
- 📊 Comprehensive Reports - Detailed analysis with symptoms, treatments, and prevention
- ⚡ Real-time Processing - Analysis results in under 2 seconds
- 🔐 Firebase Authentication - Secure login with Email/Password and Google Sign-In
- 👤 User Profiles - Manage account settings and change password
- 📈 Analytics Dashboard - Track analysis history and trends
- 📱 Mobile Responsive - Works seamlessly on all devices
- 📥 Export Data - Download analysis history as CSV or JSON
- 📄 PDF Reports - Branded, detailed analysis reports
| Category | Conditions |
|---|---|
| Bacterial | Cellulitis, Impetigo |
| Fungal | Athlete's Foot, Nail Fungus, Ringworm |
| Parasitic | Creeping Eruption |
| Viral | Chickenpox, Shingles |
- Python 3.10+
- Node.js 18+
- GROQ API Key (for AI chat)
- Clone the repository
git clone https://github.com/GauravPatil2515/derm-ai.git
cd derm-ai/project- Setup Backend
cd backend
python -m venv venv
.\venv\Scripts\activate # Windows
source venv/bin/activate # macOS/Linux
pip install -r requirements.txt- Configure Environment
# Create backend/.env
GROQ_API_KEY=your_groq_api_key_here- Setup Frontend
cd .. # Back to project root
npm install- Download AI Model
- Place
advanced_skin_disease_model.pthin theproject/directory - Model file not included due to size (~300MB)
- Run the Application
# Terminal 1 - Backend
cd backend
python app.py
# Terminal 2 - Frontend
npm run dev- Access the App
- Frontend: http://localhost:5176/derm-ai/
- Backend API: http://localhost:5002
project/
├── backend/
│ ├── api/ # API endpoints
│ │ ├── derm_ai_chat.py # Groq AI chat
│ │ └── skin_analysis.py # ViT model analysis
│ ├── utils/
│ │ ├── gradcam.py # Grad-CAM visualization
│ │ └── pdf_generator.py # PDF report generation
│ ├── models/ # Database models
│ ├── app.py # Flask application
│ └── config.py # Configuration
│
├── src/
│ ├── components/
│ │ ├── auth/ # Login, Signup, ForgotPassword
│ │ ├── dashboard/ # Dashboard, SkinScan, Analytics
│ │ ├── profile/ # User profile page
│ │ ├── chat/ # AI chat interface
│ │ ├── common/ # Navbar, shared components
│ │ └── ui/ # Reusable UI components
│ ├── lib/
│ │ ├── AuthContext.tsx # Firebase authentication
│ │ ├── firebase.ts # Firebase configuration
│ │ └── ServiceContext.tsx # API health monitoring
│ └── App.tsx # Main application
│
└── public/ # Static assets
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/health |
Health check |
| GET | /api/model-status |
AI model status |
| POST | /api/analyze |
Analyze skin image |
| GET | /api/analysis/history |
Get analysis history |
| GET | /api/analysis/:id |
Get specific analysis |
| GET | /api/analysis/:id/pdf |
Download PDF report |
| POST | /api/chat/ |
Chat with AI assistant |
DermAI uses Firebase Authentication with support for:
- Email/Password authentication
- Google Sign-In
- Password reset via email
Protected routes require authentication:
/dashboard- Analysis history/scan/:id- Analysis details/analytics- Analytics dashboard/profile- User profile
- Rate Limiting - Per-user API rate limits using Firebase UID
- Protected Routes - Authentication required for sensitive features
- CORS Protection - Configured allowed origins
- File Validation - Image type and size validation
- Automatic Cleanup - Uploaded files deleted after analysis
Modern, responsive landing page with live AI chat demo
View all your skin analyses with filtering and search
Upload images and get instant AI-powered analysis with Grad-CAM explanations
Track your analysis history with charts and export functionality
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is for educational purposes. Please consult healthcare professionals for medical advice.
DermAI is NOT a substitute for professional medical diagnosis. The AI predictions are for informational purposes only. Always consult a certified dermatologist for proper diagnosis and treatment.
Made with ❤️ by Gaurav Patil