DermBridge-X / README.md
sani0185's picture
Update primary Vercel website URL to dermbridge-x-ai.vercel.app
66b7dfd verified
|
Raw History Blame Contribute Delete
6.38 kB
---
language:
- en
license: cc-by-nc-4.0
tags:
- dermatology
- medical-imaging
- multimodal
- skin-cancer
- evidential-deep-learning
- dempster-shafer
- uncertainty-quantification
- explainable-ai
- pytorch
- safetensors
datasets:
- MILK10k
metrics:
- accuracy
- f1
- roc_auc
---
# DermBridge-X: Multimodal Evidential Skin Lesion Triage Model
**DermBridge-X** is a physics-guided, evidential multimodal deep learning framework developed as a Final Year Design Project (Department of Computer Science and Engineering, Daffodil International University) for 11-class skin lesion classification and selective specialist deferral across paired clinical close-up photographs, polarized dermoscopy, and structured patient metadata.
- **Code Repository:** https://github.com/Sabbirhossansani/DermBridge-X
- **Project Website (Vercel):** https://dermbridge-x-ai.vercel.app *(also mirrored at https://sani0185-dermbridge-x.static.hf.space/)*
- **Live ZeroGPU Demo (HF Space β€” Free `zero-a10g`):** https://huggingface.co/spaces/sani0185/DermBridge-X-Demo
- **Backup Static Demo (HF Space β€” Free Static Tier):** https://huggingface.co/spaces/sani0185/DermBridge-X
- **Full GPU Gradio Demo (Free Google Colab T4):** [Open in Colab](https://colab.research.google.com/github/Sabbirhossansani/DermBridge-X/blob/main/space/DermBridge_X_Colab_Demo.ipynb)
> **WARNING β€” NOT A MEDICAL DEVICE**
> This model is released strictly for **non-commercial academic research and educational use**. It is **not** cleared or approved by the FDA, CE MDR, DGDA, or any clinical regulator and **must not** be used for clinical diagnosis, skin cancer screening, biopsy decisions, or patient care.
---
## Model Description
- **Optical Standardisation (`DermNorm-Phys`):** 5-stage deterministic pipeline performing circular FOV masking, anisotropic vascular-safe hair removal, specular glare inpainting, purple biopsy-ink suppression, pre-color-constancy perilesional $\text{ITA}^\circ$ metering, and bounded Minkowski ($p=6$) Shades-of-Gray color constancy.
- **Artifact-Adaptive Residual Optical Gate:** Learns a per-image scalar gate $\gamma_{\text{art}}(\mathbf{q}_{\text{phys}}) \in (0, 1)$ blending raw foundation embeddings with optically repaired embeddings to protect clean tissue features while suppressing artefacts.
- **Missing-Modality Cross-View Bridges:** Bidirectional latent bridges (`Clinical <-> Dermoscopy`) trained via cosine + InfoNCE distillation allow robust inference when dermoscopy or clinical photos are absent.
- **Calibrated Subjective Logic Dempster-Shafer Fusion:** Combines clinical, dermoscopic, and joint-synergy Dirichlet opinions to output calibrated probabilities, epistemic vacuity $u$, and cross-modal conflict $C$ for blind 80%-coverage specialist deferral.
---
## Included Weights (No Third-Party Base Weights Redistributed)
This Hub repository contains **only** the trained DermBridge-X multimodal evidential fusion weights (`safetensors`, FP16, ~11–13 MB per fold):
- `dermbridge_x_fold0.safetensors` – `dermbridge_x_fold4.safetensors`: 5-fold lesion-disjoint Multi-Foundation Evidential Fusion heads (`6.87M` params/fold).
- `dermbridge_x_focused_fold0.safetensors` – `dermbridge_x_focused_fold4.safetensors`: 5-fold Focused Dermatology-Native (`DermFM-Zero` + `ConvNeXt-V2-Base`) Evidential Fusion heads (used by the free CPU Hugging Face Space for fast, compliant inference without requiring unlicensed third-party mirrors).
- `config.json`: Exact architecture config, class list (`MILK10K_CLASSES`), train-fold Bayes priors, and 80%-coverage vacuity thresholds ($\tau_{80}$).
- `examples/`: Three de-identified public MILK10k example pairs (`CC BY-NC 4.0`, attributed in `examples/ATTRIBUTION.md`).
Upstream vision encoders (`redlessone/DermFM-Zero`, `convnextv2_base.fcmae_ft_in22k_in1k_384`, etc.) are loaded directly from their upstream Hugging Face / `timm` repositories at runtime and are **not** redistributed here.
---
## Training Data
- **MILK10k (ISIC 2025/2026):** 5,240 unique lesions (10,480 paired clinical close-up + polarized dermoscopic images) across 11 diagnostic classes (`AKIEC, BCC, BEN_OTH, BKL, DF, INF, MAL_OTH, MEL, NV, SCCKA, VASC`), evaluated under strict lesion-disjoint 5-fold stratified cross-validation. Licence: **CC BY-NC 4.0**.
---
## Frozen Thesis Benchmark Results (MILK10k 5-Fold Lesion-Disjoint CV, $N = 5,240$)
| Variant | Accuracy (%) | Macro-F1 (%) | Macro-AUROC (%) | AdaECE (↓) | 80%-Cov. Acc. (%) |
|---|---:|---:|---:|---:|---:|
| **DermBridge-X Unified (Multi-Foundation + E2E Thesis Ensemble)** | **81.79** | **62.02** | **94.97** | **0.0290** | **88.88** |
| **DermBridge-X Multi-Foundation (3-Seed Thesis Ensemble)** | **81.20** | **61.44** | **94.65** | **0.0253** | **88.19** |
| **DermBridge-X Focused Branch B (5-Fold Released Weights)** | **80.76** | **61.65** | **92.35** | **0.0301** | **88.17** |
| **DermBridge-X Multi-Foundation Branch A (5-Fold Single-Seed Weights)** | **79.89** | **59.77** | **93.09** | **0.0303** | **87.60** |
| MetaBlock (Baseline) | 81.51 | 61.18 | 93.39 | 0.0695 | 88.81 |
| IRENE Transformer (Baseline) | 80.53 | 61.40 | 92.50 | 0.0392 | 88.24 |
| ResNet-50 (Baseline) | 65.95 | 30.41 | 86.06 | 0.0986 | 73.90 |
- **Thick Invasive Melanoma Capture (> 1.0 mm):** 58 / 63 (92.06%) detected or flagged for specialist deferral under blind 80%-coverage triage.
- **Dark-Skin Subgroup Parity (Tones 0–2):** Malignant sensitivity reaches 82.38% (vs. 62.70% for ResNet-50).
---
## Limitations & Risks
1. **Retrospective Single-Benchmark Scope:** All thesis experiments were conducted via retrospective 5-fold cross-validation on MILK10k; prospective multi-hospital clinical validation remains required.
2. **Severe Class Imbalance:** Ultra-rare categories such as `MAL_OTH` ($N = 9$, 280:1 skew) exhibit low recall and must always rely on specialist oversight.
3. **Phototype Representation:** Darker skin phototypes (tones 0–2, $n = 617$) remain underrepresented relative to intermediate/light tones.
4. **Non-Clinical Prototype:** Never use outputs to rule out melanoma or defer a clinically indicated biopsy.
---
## Licence
- **Model Weights & Bundled Example Pairs:** Creative Commons Attribution-NonCommercial 4.0 International (**CC BY-NC 4.0**).
- **Source Code:** **MIT License** (see GitHub repository).