Image Feature Extraction
vit-up / README.md
nielsr's picture
nielsr HF Staff
Add pipeline tag and sample usage
06a6c63 verified
|
Raw
History Blame
1.65 kB
metadata
license: cc-by-nc-sa-4.0
pipeline_tag: image-feature-extraction

ViT-Up

ViT-Up is an implicit feature upsampler for Vision Transformers that predicts backbone-aligned features at arbitrary continuous image coordinates.

This repository provides pretrained ViT-Up weights for DINOv3-S+ and DINOv3-B.

Sample Usage

ViT-Up models can be loaded directly with torch.hub.load. The Hub entry points download ViT-Up weights from Hugging Face and load the matching DINOv3 backbone.

import torch

device = "cuda" if torch.cuda.is_available() else "cpu"

# Available entry points:
# - vit_up_dinov3_splus
# - vit_up_dinov3_base
model = torch.hub.load(
    "krispinwandel/vit-up",
    "vit_up_dinov3_splus",
    pretrained=True,
    trust_repo=True,
    device=device,
).eval()

images = torch.randn(1, 3, 448, 448, device=device)
query_coords = torch.rand(1, 100, 2, device=device)  # normalized (x, y) in [0, 1]

with torch.no_grad():
    features = model(images, query_coords)

print(features.shape)  # (B, N_queries, D)

Citation

@misc{wandel2026vitupfaithfulfeatureupsampling,
      title={ViT-Up: Faithful Feature Upsampling for Vision Transformers}, 
      author={Krispin Wandel evangelista and Jingchuan Wang and Hesheng Wang},
      year={2026},
      eprint={2606.14024},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2606.14024}, 
}