Spaces:
Running on Zero
Running on Zero
File size: 2,692 Bytes
d089e8a 940f90f d089e8a 940f90f d089e8a 940f90f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | ---
title: ProgResViT
emoji: πͺ
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 6.26.0
app_file: app.py
short_description: Adaptive-compute ViT that classifies in progressive rounds
python_version: "3.12"
startup_duration_timeout: 30m
license: mit
---
# ProgResViT: Progressive Resolution and Width for Adaptive Vision Transformers
Interactive ImageNet-1K demo of [ProgResViT](https://huggingface.co/papers/2609.03216)
(arXiv:2609.03216, Kiel University).
ProgResViT performs inference **progressively**. Round 1 processes a low-resolution
image with a narrow subnetwork (3 of 6 attention heads). If the round-1 prediction is
confident enough β measured by the entropy of its top-10 softmax β inference stops
there. Otherwise the model recycles the round-1 tokens and refines the prediction at a
higher input resolution with the full-width subnetwork. All rounds share a single
backbone, conditioned by **Progress-Conditioned Soft Gating (PSG)**.
The demo exposes that mechanism directly: it runs both rounds, shows each round's top-5
prediction, and reports which round the routing threshold would have stopped at, along
with the GMACs saved.
## Checkpoints
All four released DeiT-S checkpoints are available in the dropdown:
| Resolution schedule | Training | Top-1 | GMACs (full path) |
|---|---|---:|---:|
| 160 β 384 | KD | 84.90% | 16.152 |
| 160 β 384 | standard | 83.70% | 16.152 |
| 192 β 240 | KD | 83.80% | 6.267 |
| 192 β 240 | standard | 82.21% | 6.267 |
Weights: [NCPS on the Hub](https://huggingface.co/NCPS). Default routing thresholds are
the authors' reported operating points (β€0.03 pp top-1 drop).
## Implementation notes
- The ProgResViT model code is the authors' vendored `timm` fork, copied verbatim from
[ds-kiel/ProgResViT](https://github.com/ds-kiel/ProgResViT) (MIT; `NOTICE` and
`LICENSE-timm.txt` retained).
- Preprocessing matches `validate.py` upstream: bicubic resize with `crop_pct=0.9`,
center crop to the checkpoint's eval resolution, ImageNet mean/std.
- Rounds are run with `model._forward_stage(...)` exactly as the upstream evaluator
does, so both rounds are always computed and the routing decision is reported rather
than short-circuited β that is what makes the trade-off visible.
- GMACs figures are the authors' measured values from `results/RESULTS.md`.
## Credits
Example photographs come from
[linoyts/repo-to-space-example-inputs](https://huggingface.co/datasets/linoyts/repo-to-space-example-inputs).
## Citation
```bibtex
@article{progresvit2026,
title = {ProgResViT: Progressive Resolution and Width for Adaptive Vision Transformers},
year = {2026},
eprint = {2609.03216}
}
```
|