Skip to content

dsb-ifi/SPoT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPoT: Subpixel Placement of Tokens in Vision Transformers

Martine Hjelkrem-Tan, Marius Aasan, Gabriel Y. Arteaga, Adín Ramírez Rivera

DSB @ IFI @ UiO

Website PaperArxiv PaperICCVW NotebookExample

SPoT Figure 1 SPoT Figure 1

SPoT: Subpixel Placement of Tokens

This repo contains code and weights for SPoT: Subpixel Placement of Tokens, accepted for ECLR, ICCVW 2025.

For an introduction to our work, visit the project webpage.

Installation

The package can currently be installed via:

# HTTPS
pip install git+https://github.com/dsb-ifi/SPoT.git

# SSH
pip install git+ssh://[email protected]/dsb-ifi/SPoT.git

Loading models

To load the model, first download the checkpoints from Google Drive. Then extract the checkpoints into a folder named checkpoints/ in the repo.

The model can be loaded easily by

from spot.load_models import *

model_name = 'spot_mae_b16'
assert model_name in valid_models
model = load_trained_model(
    model_name=model_name,
    sampler='grid_center',      # Spatial prior
    ksize=16,                   # Window size
    n_features=25,              # Number of tokens
)

More Examples

We provide a Jupyter notebook that illustrates loading, evaluating, and extracting token placements for the models.

Citation

If you find our work useful, please consider citing our paper.

@inproceedings{hjelkremtan2025spot,
  title={{SPoT}: Subpixel Placement of Tokens in Vision Transformers},
  author={Hjelkrem-Tan, Martine and Aasan, Marius and Arteaga, Gabriel Y. and Ram\'irez Rivera, Ad\'in},
  journal={{CVF/ICCV} Efficient Computing under Limited Resources: Visual Computing ({ECLR} {ICCVW})},
  year={2025}
}

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •