Skip to content

Releases: Cureeeeeeee/CNN-Based-Skin-Lesion-Classification-for-Early-Skin-Cancer-Detection

v2.1 - UI Redesign (carries v2.0 model assets)

Choose a tag to compare

@Cureeeeeeee Cureeeeeeee released this 25 May 11:04

DermaSense v2.1 — UI Redesign

Builds on v2.0 ("Phase C v2 production deploy + Phase E external
validation") with a complete Flutter UI redesign across all five screens.

What's new in v2.1

Two-stage UI redesign (Stage 1 + Stage 2)

  • DermaSense design system in mobile_app/lib/theme/design_tokens.dart
    (palette, typography ramp, spacing, hairline border, no shadow)
  • HomeScreen redesigned (Stage 1, commit 749ec64)
  • Classification, Result, Model Performance, Safety / About redesigned
    (Stage 2, commit d39a3b9)

Result screen

  • Risk-state-coloured hero (urgent / amber / benign)
  • 200 ms cross-fade Grad-CAM attention toggle (single model)
  • 2×2 per-model ensemble grid with shared lightbox modal
  • Top-3 differential with class chips and a Calibration explainer card

Model Performance screen

  • Test-set evaluation header (ResNet50 v2 default)
  • Per-class recall with ResNet50 v2 column tinted; <70% warning glyphs
  • 7×7 confusion-matrix heatmap on ResNet50 v2 HAM10000 test split
  • Known Limitations card (5 items including ISIC 2019 external-validation
    drop: v2 single-model mel recall 73.40% → 37.09%)

Safety / About screen

  • System Identity, Intended Use, "Not Intended For"
  • Datasets card (HAM10000 + ISIC 2019, both CC BY-NC 4.0)
  • Calibration temperatures table with v2 row DEPLOYED chip
  • License & Attribution card (code MIT, model weights CC BY-NC 4.0)

What's unchanged from v2.0

  • All backend code (FastAPI, 5 endpoints)
  • All model checkpoints — bit-identical to v2.0
  • All calibration files — bit-identical to v2.0
  • Phase A (calibration), Phase B (Grad-CAM), Phase C (v2 training),
    Phase E (external validation) results

Assets

The 12 v2.0 release assets are carried over verbatim to v2.1 so this
release is self-contained (clone + download = working system).

Total: 12 files, ~317 MB

  • 4 base CNN checkpoints + their calibration JSON (ResNet50 v1, DenseNet121,
    EfficientNet-B0, MobileNetV3 Small)
  • 1 ResNet50 v2 checkpoint + calibration (single-model default,
    focal loss + balanced sampler)
  • 1 ResNet50 v1 backup checkpoint + calibration (preserved for ensemble
    stability)

How to reproduce

git clone https://github.com/Cureeeeeeee/CNN-Based-Skin-Lesion-Classification-for-Early-Skin-Cancer-Detection.git
cd CNN-Based-Skin-Lesion-Classification-for-Early-Skin-Cancer-Detection
git checkout v2.1

# Download all 12 assets from this release into runs/
gh release download v2.1 --dir runs/

# Backend
pip install -r requirements.txt
uvicorn src.skinlesion.api:app --host 0.0.0.0 --port 8126

# Flutter web
cd mobile_app
flutter run -d chrome

Co-author

Co-Authored-By: Claude noreply@anthropic.com

v2.0 — Phase C v2 production deploy + Phase E external validation

Choose a tag to compare

@Cureeeeeeee Cureeeeeeee released this 24 May 19:33

v2.0 Release

Educational prototype for AI-assisted multiclass skin lesion classification on the HAM10000 dataset. Non-commercial use only (CC BY-NC 4.0 datasets). Not a medical device.

Headline Results

Metric HAM10000 test (in-distribution) ISIC 2019 (external, HAM-disjoint)
v2 ResNet50 melanoma recall 73.40% 37.09%
v2 ResNet50 macro F1 70.08% 34.72%
v2 ResNet50 test ECE (calibrated) 0.0248 0.1814
v1 4-model ensemble macro F1 74.10% 41.24%

Key honest finding: the in-distribution +18.6 pp melanoma recall improvement from Phase C does not generalize to external (ISIC 2019) data — mel recall drops to ~37%. A three-line preprocessing audit confirmed this is genuine distribution shift, not a pipeline artefact. The strong in-distribution number does not generalize; this is an educational prototype, not a medical device.

What's In This Release

  • 6 model checkpoints: 4 v1 baseline models (ResNet50, DenseNet121, EfficientNet-B0, MobileNetV3-small), v2 ResNet50 winner (focal loss + balanced sampler), and v1 ResNet50 backup for rollback.
  • FastAPI backend with calibrated single-model /predict, 4-model ensemble /predict-ensemble, and Grad-CAM /predict-cam.
  • Flutter mobile UI prototype (clinical-style 5-screen layout).
  • Reproducibility: requirements-lock.txt, scripts/run_demo.sh / run_demo.ps1, scripts/download_checkpoints.py with SHA256 verification.

Installation

CPU-only inference, ~250 MB checkpoint download, API ready at http://127.0.0.1:8126.

bash scripts/run_demo.sh                                          # macOS / Linux
powershell -ExecutionPolicy Bypass -File scripts\run_demo.ps1     # Windows

See README Quick Start for full prerequisites and troubleshooting.

Phase Highlights

  • Phase C — focal loss + balanced sampler lifts melanoma recall from 54.79% to 73.40% on HAM10000 (single-model ResNet50).
  • Phase E — honest external validation on a HAM10000-disjoint subset of ISIC 2019 (4,353 images). Documents distribution shift, calibration OOD failure, and bias audit limitations.
  • Phase F — dependency lock, CPU-only deployment scripts, release packaging, Docker design (build deferred to future work).

Full Documentation

  • docs/release_v2.0.md — comprehensive release notes
  • docs/phase_e_external_validation.md — external validation findings + preprocessing audit
  • docs/licenses.md — full dataset citations and license terms

Citation

MIT for code; CC BY-NC 4.0 propagates to weights via HAM10000. See LICENSE.

HAM10000 citation:

Tschandl P., Rosendahl C. & Kittler H. The HAM10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions. Scientific Data 5, 180161 (2018). doi:10.1038/sdata.2018.161