ProgResViT DeiT-S (160 β†’ 384, KD)

ImageNet-1K EMA weights for ProgResViT DeiT-S (160 β†’ 384, KD) 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-160-384-kd-imagenet1k", pretrained=True)
model.eval()

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

print(logits.shape)  # (1, 1000)
print(stage)         # 0 = 160 px / 3 heads; 1 = 384 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-160-384-kd-imagenet1k",
    filename="progresvit_160_384_kd.pth.tar",
    local_dir="checkpoints",
)

Then run the repository evaluator:

python validate.py /path/to/imagenet/val \
  --config 160_384_kd \
  --checkpoint checkpoints/progresvit_160_384_kd.pth.tar
Downloads last month
20
Safetensors
Model size
24.9M 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-160-384-kd-imagenet1k

Space using NCPS/progresvit-deit-s-160-384-kd-imagenet1k 1

Paper for NCPS/progresvit-deit-s-160-384-kd-imagenet1k