Skip to content

About

Skin-condition classifier (EfficientNet-B3 + VAE) with FastAPI inference, Gemini symptom analysis and dermatologist-in-the-loop retraining. Paper: IEEE ICICI 2026.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

DermaScan AI

DermaScan AI is a comprehensive skin lesion classification and monitoring system that leverages advanced Deep Learning and Generative AI to provide accurate diagnoses and detailed medical insights. The platform connects patients with an AI-powered analysis tool and provides medical professionals with a dashboard to review cases and continuously improve the model through active learning.

🚀 Features

  • AI-Powered Analysis: Uses a custom Fusion Model combining EfficientNet for feature extraction and a Variational Autoencoder (VAE) for robust classification and anomaly detection.
  • Generative AI Reports: Integrates Google Gemini AI to generate detailed medical reports including severity, prevalence, symptoms, risk factors, and treatment recommendations for detected conditions.
  • Real-time Online Learning: Features a feedback loop where doctor corrections instantly fine-tune the model, effectively allowing the system to learn from new data without full retraining.
  • Cross-Platform Mobile App: A user-friendly React Native mobile application for patients to capture and analyze skin conditions.
  • Doctor Portal: A web-based dashboard for dermatologists to review patient scans, visualize data, and provide expert feedback.

📂 Project Structure

The repository is organized into three main components:

  • DermaScan_app: The mobile application built with React Native and Expo.
  • Dr_portal: The web portal for doctors built with React and Material UI.
  • Dr_portal/MODEL: The Python backend hosting the FastAPI server and PyTorch models.

🛠️ Tech Stack

  • Frontend (Mobile): React Native, Expo, Firebase, Victory Native (Charts).
  • Frontend (Web): React.js, Material UI (MUI), Recharts, Leaflet.
  • Backend / AI: Python, FastAPI, PyTorch (TorchVision), EfficientNet, Google Gemini API.
  • Database / Infrastructure: Firebase (Auth, Firestore, Storage), Google Cloud Vision.

📋 Prerequisites

Ensure you have the following installed:

  • Node.js (v18+ recommended)
  • Python (v3.9+ recommended)
  • Expo Go app on your mobile device (for testing the mobile app).

⚡ Getting Started

1. Backend Setup (AI Model)

The backend handles image processing, inference, and the feedback loop.

cd Dr_portal/MODEL

# Create a virtual environment (optional but recommended)
python -m venv .venv
# Windows:
.venv\Scripts\activate
# Mac/Linux:
source .venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Run the FastAPI server
uvicorn api:app --reload --host 127.0.0.1 --port 8000

The server will start at http://127.0.0.1:8000

2. Doctor Portal Setup

The web portal allows doctors to view analytics and manage patient data.

cd Dr_portal

# Install dependencies
npm install

# Start the React development server
npm start

The portal will open at http://localhost:3000

3. Mobile App Setup

The mobile application for independent user scanning.

cd DermaScan_app

# Install dependencies
npm install

# Start the Expo development server
npx expo start

Scan the QR code with the Expo Go app (Android/iOS) to run the app.

🧠 Model Details

The core of DermaScan is a Fusion Model (FusionModel in api.py) which:

  1. Encodes images using a pre-trained EfficientNet-B3.
  2. Projects features into a latent space (VAE architecture).
  3. Classifies into 7 skin condition classes:
    • bkl (Benign keratosis)
    • nv (Melanocytic nevi)
    • df (Dermatofibroma)
    • mel (Melanoma)
    • vasc (Vascular lesions)
    • bcc (Basal cell carcinoma)
    • akiec (Actinic keratoses)

When a prediction is made, the backend also queries the Gemini API to fetch a context-aware medical summary for the user.

🔄 Feedback & Fine-tuning

The system implements an online learning mechanism:

  1. A doctor corrects a diagnosis in the Portal.
  2. The image and new label are sent to the /feedback/ endpoint.
  3. The model updates its weights immediately using the new example (fine_tune.py).
  4. The updated model is saved and reloaded automatically without server downtime.

📄 License

MIT License

About

Skin-condition classifier (EfficientNet-B3 + VAE) with FastAPI inference, Gemini symptom analysis and dermatologist-in-the-loop retraining. Paper: IEEE ICICI 2026.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages