progresvit-classify / README.md
multimodalart's picture
multimodalart HF Staff
Upload folder using huggingface_hub
940f90f verified
|
Raw
History Blame Contribute Delete
2.69 kB

A newer version of the Gradio SDK is available: 6.27.0

Upgrade
metadata
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 (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. 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 (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.

Citation

@article{progresvit2026,
  title  = {ProgResViT: Progressive Resolution and Width for Adaptive Vision Transformers},
  year   = {2026},
  eprint = {2609.03216}
}