[01] Overview
Dermatriage looks at a photo of a skin rash and tells you which type it most likely is. It knows six outcomes: mpox, chickenpox, measles, cowpox, hand, foot and mouth disease, and healthy skin. Several of these rashes can look alike, especially in ordinary phone photos.
It was trained on the MSLD v2.0 skin lesion dataset, a set of labeled photos covering those conditions plus healthy skin.
Upload a rash photo, get the most likely type, and see which part of the photo the model relied on.
It suggests; it does not diagnose. This is a side project, not a medical device, and a result is no substitute for seeing a doctor.
[02] How It Works
You upload a photo, or pick one of the built-in test photos. The app sends it to the model and shows the answer in four parts.
| What you see | What it means |
|---|---|
| Most likely type | The rash type that best matches the photo, with how sure the model is. |
| A score for each type | How strongly the photo matches each of the six outcomes, shown as bars. |
| A heatmap | Highlights the parts of the photo the model paid most attention to, so you can see whether it looked at the rash itself. |
| What to do next | An urgency level, from high priority to routine, with precautions and a recommended action for that type. |
The app also has a reference page for each condition, a Benchmarks page with the test results and training curves, and a Records page that lists the scans from your current visit. Records are kept only until you close the app.
[03] Implementation
For the curious: the model has two parts that look at the photo in different ways, then combine what they find. A step called cross-attention lets the close-up view decide which parts of the whole picture matter.
| Part | Implementation | Role |
|---|---|---|
| Close-up view | ResNet-50, pretrained, pooled and projected into the shared embedding | Captures the fine texture of the lesion |
| Whole-picture view | ViT-B/16, pretrained, one token per image patch | Captures layout and spread across the image |
| Combining the views | Multi-head cross-attention with layer norms and a feed-forward block | Joins both views before the final choice among the six outcomes |
Training used a patient-independent split, so photos of the same patient never appear in both the training and the test data. That way the test reflects patients the model has not seen.
Training details: a class-weighted focal loss for the uneven class sizes, AdamW with a cosine learning-rate schedule, mixed precision, and light augmentation. The same folds were used to train three baselines for comparison: ResNet-50 alone, the ViT alone, and a plain concatenation of both branches. The Benchmarks page shows how they compare.
[04] Deployment & Console
The app runs at dermatriage.ravenneil.com. It is written in Flutter, and the model runs behind a FastAPI service on a cloud GPU, so your photo is sent to that server to be classified.
If the server can't be reached, or has no trained model loaded, the app falls back to a rough guess based on the photo's colors, written in Dart. It labels that result as an estimate, not the trained model. Service status comes from the Raven Neil Console.