Computer Vision · Medical Imaging · Accepted
DiaFoot.AI
A 75-model study of how training-data composition affects diabetic-foot image segmentation, supported by a documented leakage audit.
- Context
- Research project · training-data composition study
- Stack
- PyTorch, DINOv2, MONAI, ONNX, FastAPI, SLURM

U-Net++ DFU Dice for five training-set compositions, one slice of the 75-model study (5 compositions x 3 architectures x 5 folds, single seed). Points are 5-fold CV means; whiskers are fold standard deviation, not a confidence interval. Every model was scored on one fixed test split of 1,215 foot photographs, with DFU Dice measured on its 318 ulcer images. DFU + healthy beat DFU-only by about 0.007, significant in 2 of 5 folds. Ordinary photographs; research prototype, not a clinical product.
How it works

Explainer animation, not a screen recording. How training-data composition was tested across 75 models, with a documented leakage audit.
Audit the split first
Found and removed 96,829 near-duplicate train-test pairs, rebuilt every split to verified zero overlap across four checks, then re-benchmarked
Five training compositions
DFU only, DFU plus healthy feet, DFU plus other wounds, everything, and a random mix sized to match DFU only
75 models
Controlled 75-model study (5 training compositions x 3 architectures x 5-fold CV)
One fixed test split
Every model was scored on one fixed test split of 1,215 foot photographs, with DFU Dice measured on its 318 ulcer images
Composition study
U-Net++ DFU Dice for five training-set compositions, one slice of the 75-model study. Whiskers are fold standard deviation, not a confidence interval.
Problem
Diabetic foot ulcer segmentation is usually improved by collecting more images. It is rarely checked whether the extra images help, or whether the benchmark itself is clean. I wanted to measure what the composition of the training set does when the architecture and settings stay fixed.
My contribution
DiaFoot.AI is my repository and my experiment. I built the data pipeline, the split and leakage tooling, the training and evaluation code, and ran the 75-model study. The related paper is first-authored with Prof. Mohammad Eslami of Harvard Medical School.
Approach
Three architectures (U-Net++, SegFormer-B0, DINOv2 with UPerNet) were each trained on five compositions of the same pool: DFU only, DFU plus healthy feet, DFU plus other wounds, everything, and a random mix sized to match DFU only. Each cell used 5-fold cross-validation with one seed and was scored on one fixed held-out test split.
How it was built
I built a data pipeline that assembles foot photographs into train, validation and test splits, with checks for path, ID, content-hash and near-duplicate overlap. The first audit found 96,829 near-duplicate train-test pairs, so I rebuilt the splits to 5,674, 1,216 and 1,215 images with zero overlap and reran everything. I then trained U-Net++, SegFormer-B0 and DINOv2 on five training-set compositions with 5-fold cross-validation, running the 75 jobs as a SLURM array on an HPC cluster. Each result file records the commit and checksums. Limits: one seed, one test split, research code only. Accepted at SPIE Medical Imaging 2027. Presenting in Vancouver, February 14 to 17, 2027.
Evidence and limitations
Auditing the first split found 96,829 near-duplicate train-test image pairs. I rebuilt every split to 5,674 train, 1,216 validation and 1,215 test images with zero path, ID, content-hash or near-duplicate overlap, then reran the study.
On U-Net++, DFU plus healthy reached a mean DFU Dice of 0.879 against 0.872 for DFU only. That gap is small and was significant in 2 of 5 folds, so the safer reading is that adding other wounds or a random mix lowers DFU Dice, while healthy images mainly cut false positives on intact skin. The ordering held across all three architectures.
Limits: one seed, one test split, spread shown as fold standard deviation rather than a confidence interval, and ordinary foot photographs only. This is research code, not a medical device. Accepted at SPIE Medical Imaging 2027. Presenting in Vancouver, February 14 to 17, 2027.
- 0.879: mean DFU Dice, U-Net++, DFU plus healthy, 5-fold CV means
- 0.872: mean DFU Dice, U-Net++, DFU only
- 1,215: test images, one fixed test split
- 96,829: Auditing the first split found, near-duplicate train-test image pairs, I rebuilt every split
- Scope: one seed, one test split
Links
Accepted at SPIE Medical Imaging 2027. Presenting in Vancouver, February 14 to 17, 2027.