💪 Strong collapse prevention: High gradient when embedding collapse
⚡ Friendly to scale training: Linear complexity to scaling factors
🧩 Easy to train: Similar to LeJEPA, it is a heuristic-free method
🏆 Best OOD performance: Achieve the best accuracy on 6 OOD datasets
📉 Data efficiency: Achieving a similar average accuracy to DINOv2 with 90% less data
🧬 Robust to low-quality datasets: It is robust to long-tailed and sparse datasets
Available Checkpoints
File
Architecture
Patch Size
Embed Dim
Backbone Params
Pre-training Data
visreg-vit-b-inet1k.pth
ViT-Base
16
768
86M
ImageNet-1K
visreg-vit-l-inet1k.pth
ViT-Large
14
1024
304M
ImageNet-1K
visreg-vit-l-inet22k.pth
ViT-Large
14
1024
304M
ImageNet-22K
What is in each file
Every checkpoint is a single flat state_dict containing the ViT backbone and the
projection head used during pretraining. No optimizer, scheduler, online-probe or
training-config state is included, so the files load with weights_only=True.
The head is published so the models can be fine-tuned, or SSL pretraining continued, with the
projector that was actually trained. For frozen-feature use (linear probing, segmentation,
retrieval) the backbone alone is enough.
Usage
Load the backbone with timm
The proj.* entries have no counterpart in a bare timm ViT, so drop them before loading:
python
1import timm
2import torch
34# ViT-Base/165state_dict = torch.load("visreg-vit-b-inet1k.pth", map_location="cpu", weights_only=True)6model = timm.create_model("vit_base_patch16_224", pretrained=False, num_classes=0, dynamic_img_size=True)7model.load_state_dict({k: v for k, v in state_dict.items()ifnot k.startswith("proj.")})89# ViT-Large/14 (ImageNet-22K)10state_dict = torch.load("visreg-vit-l-inet22k.pth", map_location="cpu", weights_only=True)11model = timm.create_model("vit_large_patch14_224", pretrained=False, num_classes=0, dynamic_img_size=True)12model.load_state_dict({k: v for k, v in state_dict.items()ifnot k.startswith("proj.")})
Load the backbone and projection head
Using the GitHub repo, which rebuilds the pretraining
encoder with the correct proj_dim and activation and loads it with strict=True:
python
1from downstream.model_zoo import load_visreg_encoder
23encoder = load_visreg_encoder("visreg_vit_l_inet22k")# downloads from this repo on first use4emb, proj = encoder(images)# same interface as pretraining
Full evaluation suite (linear probe, segmentation, fine-tuning) is available in the GitHub repo. The scripts accept a release name and download the
weights automatically:
bash
1# Linear probe on 10+ datasets2python downstream/linear_prob/run_evaluation.py \3 --checkpoint visreg_vit_l_inet22k \4 --model vit_l \5 --datasets all