Work · Medical vision
Medical vision baselines
- Demo ready
- Synthetic demonstration
- Independent implementation
Modest, reproducible multi-label chest image baselines on a named MedMNIST task with a strict train/validate/test separation and a layer inspector that reports real shapes.
Problem
Most of what goes wrong in medical image classification happens before the model: preprocessing fitted on test data, checkpoints chosen on the test set, augmentation leaking across splits.
Contribution
Relationship to research: Independent implementation. A new benchmark exercise. It is not the image classification experiment of any publication.
Account owner’s role: Commissioned, reviewed and published the implementation. The code was produced with AI-assisted generation on commission and reviewed before release; it is not the original code of any cited publication.
What was built
- Small CNN and a ResNet-18 transfer baseline with multi-label heads
- Normalisation statistics fitted on the training split only and saved with the run
- Checkpoint selection on validation macro-AUROC; test touched once
- inspect-model command that reports layer names and output shapes from a forward pass
Method
Binary cross-entropy per label; no softmax on multi-label data.
Data and access
ChestMNIST from the official MedMNIST release, obtained by the user under its terms. A synthetic fixture with the same key layout supports installation checks.
Evaluation protocol
Per-label AUROC, macro AUROC, average precision, F1 at 0.5 and at a validation-chosen threshold, calibration.
Results
No measured result is published for this project. Demonstration outputs from the repository’s own synthetic fixtures are labelled as such in the repository and are not presented here as results.
Network explorer: SmallCNN at 28×28
Input 1 × 28 × 28, output 14 (14 labels), 94,702 parameters. Values recorded by the repository’s inspect-model command from an actual forward pass (fixture sha256 7c1562b7881e). The model is untrained here; this shows structure and shapes, not learned behaviour.
| Layer | Type | Output shape (C × H × W) | Parameters | |
|---|---|---|---|---|
| block1.0 | Conv2d | 32 × 28 × 28 | 288 | |
| block1.1 | BatchNorm2d | 32 × 28 × 28 | 64 | |
| block1.2 | ReLU | 32 × 28 × 28 | 0 | |
| block1.3 | MaxPool2d | 32 × 14 × 14 | 0 | |
| block2.0 | Conv2d | 64 × 14 × 14 | 18,432 | |
| block2.1 | BatchNorm2d | 64 × 14 × 14 | 128 | |
| block2.2 | ReLU | 64 × 14 × 14 | 0 | |
| block2.3 | MaxPool2d | 64 × 7 × 7 | 0 | |
| block3.0 | Conv2d | 128 × 7 × 7 | 73,728 | |
| block3.1 | BatchNorm2d | 128 × 7 × 7 | 256 | |
| block3.2 | ReLU | 128 × 7 × 7 | 0 | |
| block3.3 | MaxPool2d | 128 × 3 × 3 | 0 | |
| pool | AdaptiveAvgPool2d | 128 × 1 × 1 | 0 | |
| dropout | Dropout | 128 | 0 | |
| head | Linear | 14 | 1,806 |
Training and evaluation are separate commands in the repository; a training curve is shown only when a real run produced one, and no run is published here.
Limitations
- No real-data run is published unless its manifest and metrics artefacts exist.
- MedMNIST tasks are not clinical validation.
Reproducibility
Run manifests record subset, size, seed and configuration hash.
Repository metadata: Python, MIT, last push 2026-09-13, 0 stars.