Skip to content

lisekarimi/skindx

Repository files navigation

πŸ”¬ SKINDX – AI Skin Lesion Analysis

Upload a skin photo and the AI will classify it into one of 7 lesion types.

πŸš€ Try the Live Demo

SkindDx interface

SkinDx is an AI-powered web app that uses a fine-tuned ResNet-50 CNN model trained on the HAM10000 dataset to classify skin lesions into 7 categories.

πŸš€ Features

  • Upload skin lesion images β†’ get predicted class and confidence.
  • Supports 7 skin lesion types (akiec, bcc, bkl, df, mel, nv, vasc).
  • Confidence breakdown visualization with urgency indicators.

πŸ”¬ How SkinDx Works

  1. πŸ“Έ Upload a skin lesion photo
  2. πŸ” Click Analyze
  3. πŸ€– AI model (ResNet-50) predicts lesion type + confidence
  4. πŸ“Š Results shown in the app (class, risk, confidence, chart)

⚠️ Disclaimer: This tool is not a medical device. Results are for educational purposes only – always consult a dermatologist.

πŸ› οΈ Pre-requisites

  • Python 3.11.x (not 3.12+)
  • uv package manager
  • Docker Desktop
  • Make: winget install GnuWin32.Make (Windows) | brew install make (macOS) | sudo apt install make (Linux)
  • GPU – model trained on RTX 5080

πŸ”§ Setup & Architecture

Runs with Docker Desktop (WSL2 on Windows recommended). This ensures consistent environments across systems.

Components:

  • Streamlit β†’ Web UI
  • FastAPI β†’ Model inference API
  • Jupyter/MLflow β†’ Notebooks & experiment tracking

Everything runs together via Docker Compose (already included in Docker Desktop).

Start with:

docker compose up --build

Or, if you prefer Makefile shortcuts:

make up
  • Streamlit UI β†’ http://localhost:7860
  • FastAPI Docs (Swagger UI) β†’ http://localhost:8000/api-docs
  • Jupyter/MLflow (notebooks) β†’ http://localhost:8888

    ⚠️ The first time you start notebooks, Jupyter requires an access token. Copy the full URL with ?token=... from the container logs (shown in the terminal).

πŸ“‚ Project Structure

  • main.py β†’ FastAPI inference service
  • src/ui/ β†’ Streamlit frontend
  • src/model_loader.py β†’ HuggingFace model loader
  • notebooks/ β†’ Data exploration, training & evaluation
  • tests/ β†’ Pytest unit/integration tests
  • Model hosted on HF: https://huggingface.co/lisekarimi/resnet50-ham10000

πŸ“Š Training Pipeline (in notebooks)

  1. Data exploration (HAM10000 distribution)
  2. Class imbalance handling (smart augmentation)
  3. ResNet-50 training & tracking with MLflow
  4. External validation on ISIC 2019 dataset

βš™οΈ CI/CD

This project includes a full CI/CD pipeline (tests, linting, security scans, deployment in Hugging Face).

πŸ“– Documentation

Additional details are available here.

About

πŸ”¬AI web app classifying skin lesions

Topics

Resources

Stars

Watchers

Forks