Views
No views yet
vit_small_patch14_dinov2.lvd142m.
Two-phase fine-tune on RSNA Pneumonia Detection Challenge
(26685 patients total, ~22% prevalence).| Metric | Value |
|---|---|
| ROC-AUC | 0.869 |
| PR-AUC | 0.669 |
| Accuracy at Youden op-point | 0.760 |
| Op-point threshold | 0.145 |
| ECE (raw) | 0.0344 |
| ECE (after temperature scaling) | 0.0297 |
| Positive prevalence | 0.225 |
| Validation set size | 5337 patients |
1import timm, torch
2from safetensors.torch import load_file
3
4model = timm.create_model(
5 "vit_small_patch14_dinov2.lvd142m",
6 pretrained=False,
7 in_chans=1,
8 num_classes=2,
9 img_size=224,
10)
11model.load_state_dict(load_file("model.safetensors"))
12model.eval()1import json, torch.nn.functional as F
2
3T = json.load(open("temperature_scaling.json"))["temperature"] # 1.0571
4logits = model(x) # (B, 2)
5calibrated_probs = F.softmax(logits / T, dim=-1)
6positive_prob = calibrated_probs[:, 1]
7prediction = (positive_prob > 0.145).long()val_indices.json lists the 5337 patient IDs used as the held-out
validation set. Its sha256 is recorded in evaluation_metrics.json and
training_config.json. All metrics above are computed on exactly these
patients. We publish this list rather than relying on random_state=42 because
sklearn's stratified split is not invariant across releases.WindowCenter / WindowWidth if
present, inverts MONOCHROME1 images so air is black, resamples to
224x224 with bilinear interpolation, and feeds a single grayscale
channel. See training_config.json for the full recipe.natural_failure_gallery.png shows the highest-confidence false positives
and false negatives on the held-out validation set, with DINOv2 attention
rollout overlays. augmentation_failure_gallery.png shows
augmentation-induced flips: examples the model originally classified
correctly but flipped under one of 8 clinically-named perturbations. The
lateral_flip augmentation is the laterality-shortcut probe.@misc{oquab2024dinov2,
title = {DINOv2: Learning Robust Visual Features without Supervision},
author = {Oquab, Maxime and Darcet, Timothee and Moutakanni, Theo and
Vo, Huy and Szafraniec, Marc and Khalidov, Vasil and
Fernandez, Pierre and Haziza, Daniel and Massa, Francisco and
El-Nouby, Alaaeldin and Howes, Russell and Huang, Po-Yao and
Xu, Hu and Sharma, Vasu and Li, Shang-Wen and Galuba, Wojciech and
Rabbat, Mike and Assran, Mido and Ballas, Nicolas and
Synnaeve, Gabriel and Misra, Ishan and Jegou, Herve and
Mairal, Julien and Labatut, Patrick and Joulin, Armand and
Bojanowski, Piotr},
year = {2024},
eprint = {2304.07193},
archivePrefix = {arXiv},
}