ProgResViT DeiT-S (192 β†’ 240)

ImageNet-1K EMA weights for ProgResViT DeiT-S (192 β†’ 240) from ProgResViT: Progressive Resolution and Width for Adaptive Vision Transformers.

Usage

Run from the cloned ProgResViT repository root, or add the repository to PYTHONPATH:

import torch
from timm.models import create_model

model = create_model("hf-hub:NCPS/progresvit-deit-s-192-240-imagenet1k", pretrained=True)
model.eval()

x = torch.randn(1, 3, 240, 240)
with torch.inference_mode():
    logits, stage = model(x, threshold=0.35)

print(logits.shape)  # (1, 1000)
print(stage)         # 0 = 192 px / 3 heads; 1 = 240 px / 6 heads

The entropy threshold controls routing. Lower values send more images to the second round; higher values exit more images after the first round.

ImageNet-1K validation

Download the release checkpoint into checkpoints/:

from huggingface_hub import hf_hub_download

hf_hub_download(
    repo_id="NCPS/progresvit-deit-s-192-240-imagenet1k",
    filename="progresvit_192_240.pth.tar",
    local_dir="checkpoints",
)

Then run the repository evaluator:

python validate.py /path/to/imagenet/val \
  --config 192_240 \
  --checkpoint checkpoints/progresvit_192_240.pth.tar
Downloads last month
16
Safetensors
Model size
24.7M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Dataset used to train NCPS/progresvit-deit-s-192-240-imagenet1k

Space using NCPS/progresvit-deit-s-192-240-imagenet1k 1

Paper for NCPS/progresvit-deit-s-192-240-imagenet1k