An AI-powered web application and machine learning pipeline for skin lesion analysis and early detection, built on the ISIC 2024 Skin Lesion Dataset.
This project combines deep learning model training with an interactive, privacy-focused Next.js web application that runs real-time inference directly in the browser via TensorFlow.js.
- ⚡ Client-Side On-Device Inference: Runs the deep learning model directly in the user's browser using
@tensorflow/tfjs. No image upload to external servers required. - 🔍 Lesion Analysis & Risk Scoring: Upload or capture skin lesion images to receive confidence breakdown and risk category analysis.
- 🔒 Privacy-First Architecture: Sensitive medical images remain on the client device during analysis.
- 📊 Scan History & Tracking: Log past scans with Firebase sync to track lesion changes over time.
- 🩺 Doctor & Clinic Locator: Find nearby dermatologists and medical professionals for professional consultation.
- 📚 Educational Hub: Learn about skin cancer signs (ABCDE rule), prevention, and early detection tips.
- Framework: Next.js 16 (App Router) & React 19
- Styling: Tailwind CSS v4 & Lucide Icons
- Client Inference: @tensorflow/tfjs
- Database & Auth: Firebase
- Core Framework: TensorFlow / Keras (Python 3.10)
- Model Formats: Keras
.keras, Quantized.tflite, SavedModel, TensorFlow.js Shards (model.json) - Dataset: ISIC 2024 3D TBP Lesion Dataset
├── frontend/ # Next.js web application
│ ├── public/models/ # Converted TF.js model shards & configs
│ ├── src/
│ │ ├── app/ # Next.js pages (App Router)
│ │ ├── components/ # UI components & analysis visualizers
│ │ ├── context/ # Auth & Analysis state management
│ │ └── hooks/ # Custom hooks (e.g., useModel for TF.js)
├── models/ # Trained ML models (.keras, .tflite, SavedModel)
├── notebooks/ # Training and deployment Jupyter notebooks
└── scripts/ # Model conversion, patching, and testing scripts
- Node.js (v18 or higher recommended)
- npm, pnpm, or yarn
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser.
The repository includes scripts to convert and test the trained models:
scripts/export_savedmodel.py: Exports trained Keras models to SavedModel format.scripts/convert.py/convert_patched.py: Converts SavedModels into quantized TF.js web format.scripts/test_python_inference.py: Runs local inference tests using Python.scripts/test_inference.js: Validates Node.js / TF.js client model loading.
This project is built for educational, research, and demonstration purposes only. It is not a certified medical device and should not be used as a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified dermatologist for any skin health concerns.
Distributed under the MIT License. See LICENSE for details.