Skip to content
Selected work

Case study

One Framework, Four Medical Datasets

How I built one framework that matches or beats published results on medical classification problems it was never tuned for.

The leukocyte classifier needed more than a model: reproducible splits, a data pipeline that handles heavy class imbalance, several backbones evaluated the same way, and experiment tracking. I built that pipeline as a reusable framework. To test whether it generalises, I applied it — one fixed recipe, no dataset-specific tuning — to four public medical datasets and compared the results with what their authors and later papers report.

Role
Design, implementation, evaluation
Domain
Medical imaging · cytology · histology · ophthalmology · ultrasound
Core stack
PyTorch · Ultralytics · Hugging Face · Weights & Biases
4
public datasets
+8.4
pts over the bone-marrow paper
95.74%
colorectal, new patients
33%
OCT training images from test patients

What the framework is

Four parts, each written once and reused: a data layer that turns any folder or label file into one table of images, labels and patient ids; a split builder that is deterministic and groups images by patient, so no patient sits on both sides of a split, and that respects an official test set when one exists; a per-class cap that keeps the largest classes from drowning the rest; and a training layer that runs every backbone under the same protocol and logs everything to Weights & Biases.

The backbones cover both families. Convolutional: YOLO classification models. Vision transformers: SigLIP from Google, DINOv2 from Meta and C-RADIOv4 from NVIDIA — all benchmarked on the leukocyte work. The four datasets below were run with YOLO, the strongest single model on that benchmark, and SigLIP, with the recipe left exactly as it was.

Four datasets, one recipe

Each card compares our two models with the published results on the same kind of test: an external or official test set where the dataset has one, a held-out split otherwise. Published numbers are shown only where a source states them; where a protocol is not comparable, the card says so.

One recipe, four public medical datasets, no dataset-specific tuning

Our two models against the published results on each dataset. SigLIP YOLO published

Bone marrow cytology

20 cell types · 171,366 cells · 17,137 held out

Balanced accuracy (mean recall over classes)

  • SigLIP79.76%
  • YOLO79.48%
  • ResNeXt-50 · dataset paper, 202171.4%
  • Region-attention · 2024, unseen test32%

+8.4 points over the dataset paper, trained on 30% of the images.

Matek et al., Blood 2021 · Tarquino et al., J Pathol Inform 2024

Colorectal histology

9 tissue classes · external test on 7,180 patches of new patients

Accuracy on CRC-VAL-HE-7K

  • DINO · self-supervised ViT95.9%
  • SigLIP95.74%
  • YOLO95.32%
  • VGG19 · dataset paper, 201994.3%
  • DenseNet92.9%

Above the dataset paper and classic CNNs, within 0.2 points of DINO, on a third of the data.

Kather et al., PLoS Med 2019 · leaderboard compiled in Ignatov & Malivenko 2024

Retinal OCT

CNV · DME · drusen · normal · official test set of 968 scans

Accuracy on the official test set

96.49%YOLO

What we found in the official split

27,693 of the 83,516 official training images come from patients who are also in the test set. We removed them before training; results reported on the raw split include that overlap.

Counted from the patient id in every file name · Kermany et al., Cell 2018

Breast ultrasound (BUSI)

benign · malignant · normal · 780 images · 78 held out

Three-class accuracy

  • DCUNet + DenseNet + LSTM · 2024(protocol not stated)99.86%
  • SigLIP87.18%
  • YOLO87.18%
  • InceptionV3 · 202583%
  • Graph transformer · 202668.8%

Above the two published results whose protocol is stated; the dataset itself ships duplicates.

ArunKumar et al., Sensors 2025 · Ali et al., Bioengineering 2026 · Meena & Joe Prathap, JBSD 2024

DatasetTest setOur bestPublished reference
Bone marrow cytology (20 classes)17,137 held-out cells79.76% bal. acc.71.4% · dataset paper
Colorectal histology (9 classes)7,180 patches, new patients95.74% acc.94.3% · dataset paper
Retinal OCT (4 classes)official test, 968 scans96.49% acc.test patients removed from training
Breast ultrasound (3 classes)78 held-out images87.18% acc.83.0% · 68.8% · 99.86% (protocol not stated)
Our best model per dataset. Every published number comes from the paper named in the dataset's repository.

What each dataset taught

Bone marrow: the largest public cytology set, 20 cell types from 8 to 29,424 images each. Balanced accuracy — the mean recall over classes — is 8.4 points above the dataset paper's model, trained on 30% of the images; a 2024 method reports 32% on an unseen test set.

Colorectal histology: a random split of the training set scores 99.7–99.8%, because patches of the same slide land on both sides. On the official external set of new patients the same models score 95.3–95.7% — above the dataset paper and classic CNNs, within 0.2 points of a self-supervised ViT.

Retinal OCT: before training, the framework's patient grouping flagged that 27,693 of the 83,516 official training images come from patients who are also in the official test set. With them removed, the model still reaches 96.49% on the official test.

Breast ultrasound: 780 images, published accuracies from 68.8% to 99.86% depending on the protocol, and a release documented to contain duplicates. Both of our models land at 87.18%, above the two results whose protocol is stated — a reminder that on small datasets the protocol moves the number more than the model.

Code, demos and weights

Each dataset has a public write-up with figures, a live demo, and the trained weights on Hugging Face: bone marrow — repository · demo; colorectal histology — repository · demo; retinal OCT — repository · demo; breast ultrasound — repository · demo.

Limits

One training run per model and dataset, so no confidence intervals. Inputs are 224 pixels. Where a dataset has no patient ids, the split is per image. Only YOLO and SigLIP were run on these four datasets; the other backbones were benchmarked on the leukocyte data only.

More projects

The rest of the work.

01

docverify — Payslip Tampering Detection

Find the edit, show where it is, and explain it to a human.

Banks receive payslips with every credit file, and editing one takes two minutes with a free PDF editor. docverify checks a payslip with five independent kinds of evidence — a forensic network that paints the edit, seven payslip sums, PDF file forensics, a field detector and a document router, fused into one risk level with the reasons in plain language.

  • PyTorch · ONNX
  • YOLO · SigLIP · Granite
  • FastAPI · Ollama
  • Document forensics
Read the case study
95%
of forgeries caught at 1.7% false alarms (synthetic test set)
03

Automated Leukocyte Classification

I worked with the R&D arm of one of the largest medical-biology groups in Alsace — more than 40 labs — building an in-house model that classifies white blood cells from blood-smear images. Trained on 39,037 clinician-validated cells across 12 classes, it outperformed a re-implemented top-3 competition solution on the same test split, and beat vision backbones ten times its size while running several times faster.

  • PyTorch
  • YOLO
  • SigLIP · DINOv2
  • Medical imaging
Read the case study
95.8%
macro F1 across 12 cell classes
04

DaT Parkinson's Challenge

Classifying dopamine-transporter SPECT brain scans as normal or abnormal, in a code-execution competition run on DrivenData for the French Society of Nuclear Medicine. I built four tabular views of every scan and a 3D convolutional network, fused without a single fitted weight, and learned the hard way how far a public leaderboard can mislead.

  • Medical imaging
  • 3D CNN
  • TabICL
  • PyTorch
Read the case study
6th
of 1,009 entrants, private leaderboard
05

The Link

I worked with one of the largest residential landlords in Alsace, where every department held its own data, used it for its own tasks, and could not see past its own boundary — with basic reporting rented from outside vendors. Before any modelling was possible, I spent weeks mapping what each department held and what it needed, and joining those sources into one base covering the whole estate.

  • Python
  • pandas
  • SQL
  • Data integration
Read the case study
13
variables catalogued into one base
06

The Value

Chapter two of the same engagement: with the data finally joined, modelling what actually sets rent per square metre.

  • scikit-learn
  • SciPy
  • Web scraping
  • Forecasting
Project complete — write-up in progress
60%
of predictive weight in one financing rule
07

AI Assistant for Cross-Continental Freight

An AI chatbot for a large startup moving cargo between Europe and the Gulf states, built around the way freight actually gets booked, tracked and chased across two regions and several time zones.

  • LLMs
  • Conversational AI
  • Logistics
In progress
Report coming soon — the work is still running
Back to the homepage