GitHunt
SA

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 html2canvas

These 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 key
  • POST /api/search-doctors - Searches dermatologists near your geolocation

๐Ÿง  Prediction + Explanation Flow

  1. Upload/capture image in Scan Page
  2. /api/predict returns prediction, confidence, severity
  3. /api/explain-disease returns matching explanation
  4. Frontend renders animated explanation + nearby dermatologists

๐Ÿ›ก๏ธ Security Notes

  • โœ… Passwords hashed with bcrypt
  • โœ… Sessions managed via Flask with secure cookies
  • โœ… Secret key stored in app.secret_key (change it in production)
  • โœ… Uses .env to 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.jsx uses html2canvas + jsPDF
  • User can download diagnosis as a styled PDF
  • Includes image, prediction, severity, timestamp

๐Ÿงช Testing the Model

python test_model.py

Optional 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

Watch the Demo

๐Ÿ”— Prefer watching instead of downloading?
Click here to stream the demo on Google Drive