SamarthKale/Skin-Disease-Detector
A comprehensive, full-stack healthcare platform that leverages advanced AI and machine learning for intelligent skin health analysis, enabling early detection, personalized treatment recommendations, and seamless integration with telemedicine services.
๐ฅ VedaralaAI - Intelligent Skin Health Platform
VedaralaAI is a full-stack healthcare platform that leverages AI to analyze skin conditions, explain their severity, and assist patients in finding nearby dermatologists.
๐ Key Features
- ๐ง AI-Powered Skin Analysis using EfficientNetB0 + Tensor Cores
- โ๏ธ Severity Classification (Mild, Moderate, Severe)
- ๐งฌ Detailed Disease Explanation via local JSON (offline-capable)
- ๐ Doctor Locator using Google Maps API
- ๐ Secure User Authentication (Register/Login)
- ๐ Patient History with Saved Reports
- ๐ PDF Export of Analysis Results
- ๐ท Live Camera Scan + Image Upload
- ๐ Modern Responsive UI using React
๐งฑ Project Stack
| Layer | Tech |
|---|---|
| ๐ง ML Model | EfficientNetB0 (TensorFlow 2.10+) |
| ๐ Backend | Flask 2.3.3 + MySQL |
| โ๏ธ Frontend | React 18 + Tailwind + Vanilla CSS |
| ๐งพ PDF Export | jsPDF + html2canvas |
| ๐ Auth | Flask session-based login with bcrypt |
| ๐ API Keys | Managed securely with python-dotenv |
๐ง System Requirements
| Tool | Version |
|---|---|
| Python | 3.9 |
| Node.js | 14+ |
| MySQL | 8.0+ |
| TensorFlow | 2.10.0 (uses Tensor Cores if GPU is available) |
| React | 18+ |
๐ Folder Structure
๐ Backend (/backend)
| File | Purpose |
|---|---|
app.py |
Flask server & all API routes |
setup_database.py |
Create all MySQL tables + default users |
requirements.txt |
Python libraries list |
disease_explanations.json |
Explanation per severity |
train_model.py |
EfficientNet training script |
testmysql.py |
Add/List/Delete users |
๐ Frontend (/frontend/src)
| File | Description |
|---|---|
App.js |
Routing logic |
LoginPage.jsx |
Login/Signup form |
HomePage.jsx |
Dashboard |
ScanPage.jsx |
Image upload, AI scan, PDF export |
ResourcesPage.jsx |
Info cards |
AboutPage.jsx / ContactPage.jsx |
Informational |
style.css |
App-wide styling |
AuthContext.jsx |
React Auth session manager |
๐ Model (/model-2)
| File | Purpose |
|---|---|
model_weights.h5 |
Trained EfficientNetB0 model |
class_labels.txt |
Output class mappings (Benign, Melanoma, Nevus) |
โ๏ธ Environment Variables (.env)
Place this in your /backend folder as .env:
GOOGLE_API_KEY=your_google_api_key
GOOGLE_MAPS_EMBED_KEY=your_embed_key
๐ Backend Setup
cd backend
pip install -r requirements.txt
python setup_database.py
python app.py๐ Runs on http://localhost:5000
๐ป Frontend Setup
cd frontend
npm install
npm start๐ React app on http://localhost:3000
๐งช Default Users
| Role | Username | Password |
|---|---|---|
| Admin | admin@vedaralaai.com | admin123 |
| Test User | test@vedaralaai.com | test123 |
๐ฆ Backend Dependencies
Here's what's included in requirements.txt:
flask==2.3.3
flask-cors==4.0.0
mysql-connector-python==8.1.0
bcrypt==4.0.1
numpy==1.24.3
tensorflow==2.10.0
Pillow==10.0.0
python-dotenv==1.0.0
๐ฆ Frontend Dependencies (via npm)
npm install jspdf html2canvasThese are used for exporting reports as PDF from the browser.
๐ง AI Model
- EfficientNetB0 with custom classifier
- Input: 224x224 RGB images
- Output:
Benign,Melanoma,Nevus - Severity estimation based on confidence thresholds
- Explanation fetched from
disease_explanations.json
๐ Google Maps Integration
GET /api/get-map-key- Retrieves frontend embed keyPOST /api/search-doctors- Searches dermatologists near your geolocation
๐ง Prediction + Explanation Flow
- Upload/capture image in Scan Page
/api/predictreturnsprediction,confidence,severity/api/explain-diseasereturns matching explanation- Frontend renders animated explanation + nearby dermatologists
๐ก๏ธ Security Notes
- โ
Passwords hashed with
bcrypt - โ
Sessions managed via Flask with
securecookies - โ
Secret key stored in
app.secret_key(change it in production) - โ
Uses
.envto store sensitive keys
๐ Database Tables
users
Stores login credentials
skin_analysis
Stores scan results, severity, image path
patient_records
(Placeholder) for future patient medical history
๐ Report PDF Export
ScanPage.jsxuseshtml2canvas+jsPDF- User can download diagnosis as a styled PDF
- Includes image, prediction, severity, timestamp
๐งช Testing the Model
python test_model.pyOptional CLI test:
python predict.py path/to/image.jpgโจ Future Enhancements
- ๐จโโ๏ธ Doctor profiles + booking
- ๐งพ Report export to email / cloud
- ๐ Model performance dashboard
- ๐๏ธ Multi-disease classification
๐ License
MIT License โ Free to use and modify
ยฉ 2025 VedaralaAI
๐ Support
- ๐ง Email: support@vedaralaai.com
- ๐ Issues: GitHub Issue Tracker
- ๐ Docs: This
README.md
๐ฝ๏ธ Video Demo
๐ Prefer watching instead of downloading?
Click here to stream the demo on Google Drive