Offline-first AI dermatology screening for Sub-Saharan Africa | Kaggle Gemma 4 Hackathon
# DermAssist LMIC
> **Offline-first AI dermatology screening assistant for Sub-Saharan Africa and other low- and middle-income countries (LMICs).**
In Sub-Saharan Africa, fewer than **1 dermatologist serves every 1,000,000 people**. DermAssist LMIC brings frontier dermatology AI to clinics 200 km from the nearest specialist, runs entirely offline on a single laptop, and is specifically fine-tuned for LMIC patient contexts including patients with albinism (1000x increased skin cancer risk).
---
## Demo
**Video demo:** YouTube link
---
## Key Results
The system was validated on two datasets to test cross-dataset robustness:
| Metric | HAM10000 (in-distribution, n=35) | BCN20000 (external, n=60) |
|---|---|---|
| Vision Classifier accuracy | 60.0% | 28.3% |
| Urgency-recommendation consistency | 100.0% | 100.0% |
| Hallucination-free output | 100.0% | 98.3% |
| Safety disclaimer inclusion | 100.0% | 100.0% |
| **Overall safety pass rate** | **100.0%** | **98.3%** |
**Key finding:** The system maintains safety guarantees under significant distribution shift, even when the upstream Vision Classifier accuracy drops by 32 percentage points. This is the result of deliberate "safety-by-design" through LMIC-specialized fine-tuning.
---
## Architecture
```
[Skin Lesion Image]
|
v
[DullRazor Hair Removal]
|
v
[Vision Classifier]
(EfficientNet-B4)
|
v
[Patient Context]
|
v
[RAG Retrieval] <-- (DermNet, BAD, WHO)
|
v
[Gemma 4 E4B + LoRA]
(LMIC-specialized)
|
v
[Urgency | Recommendation | Patient Summary | Limitations]
```
### Components
- **Vision Classifier:** EfficientNet-B4 fine-tuned on HAM10000 (10,015 dermatoscopic images, 7 classes)
- **Hair Removal:** DullRazor algorithm (Lee et al., 1997) for image preprocessing
- **RAG Knowledge Base:** SQLite + BAAI/bge-m3 embeddings (1024-dim, 246 chunks), indexed from DermNet, BAD guidelines, and WHO LMIC dermatology protocols
- **LLM:** Gemma 4 E4B (4-bit quantized) + LoRA adapter (r=32, alpha=16) fine-tuned for …