Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[NeurIPS 2025] Official code for JAFAR: Jack up Any Feature at Any Resolution

License

PaulCouairon/JAFAR

Repository files navigation

JAFAR: Jack up Any Feature at Any Resolution

NeurIPS 2025

Website arXiv Open In Colab

Paul Couairon*, Loick Chambon*, Louis Serrano, Jean-Emmanuel Haugeard, Matthieu Cord, Nicolas Thome

*Equal Contribution.

JAFAR Overview

JAFAR improves metrics on many downstream tasks: semantic segmentation, depth estimation, feature activation, zero-shot open vocabulary, bird's eye view segmentation by upsampling features from any backbone.

Abstract

Foundation Vision Encoders have become essential for a wide range of dense vision tasks. However, their low-resolution spatial feature outputs necessitate feature upsampling to produce the high-resolution modalities required for downstream tasks. In this work, we introduce JAFAR—a lightweight and flexible feature upsampler that enhances the spatial resolution of visual features from any Foundation Vision Encoder to an arbitrary target resolution. JAFAR employs an attention- based module designed to promote semantic alignment between high-resolution queries—derived from low-level image features—and semantically enriched low- resolution keys, using Spatial Feature Transform (SFT) modulation. Notably, despite the absence of high-resolution supervision, we demonstrate that learning at low upsampling ratios and resolutions generalizes remarkably well to significantly higher output scales. Extensive xperiments show that JAFAR effectively recovers fine-grained spatial details and consistently outperforms existing feature upsampling methods across a diverse set of downstream tasks.

JAFAR Architecture

JAFAR is an efficient attention-based feature upsampler that allows upsampling to any resolution.

Updates:

  • 【24/09/2025】 JAFAR checkpoints for Radio v2.5 (B/L/H) released.
  • 【23/09/2025】 JAFAR checkpoints for DINOv3 (S/S+/B/L) released.
  • 【18/09/2025】 JAFAR is accepted at NeurIPS 2025!
  • 【10/06/2025】 Code released.
  • 【16/06/2025】 JAFAR is now on arxiv.

🚀 Main results

PCA Visualization

PCA visualization of features from various upsamplers.

🔥 Semantic Segmentation

Segmentation

Linear probing results for semantic segmentation across various upsamplers.

📊 Linear Probing Results
Method COCO mIoU (↑) VOC mIoU (↑) ADE20k mIoU (↑) Cityscapes mIoU (↑)
Training-Free
Bilinear 59.03 80.70 39.23 59.37
Task-Agnostic
FeatUp 60.10 81.08 38.82 56.06
LiFT 58.18 78.06 38.73 58.75
JAFAR (ours) 🥇 60.78 84.44 40.49 61.47

🔥 Depth estimation

Depth

Linear probing results for depth estimation across various upsamplers.

📊 Linear Probing Results
Method δ₁ (↑) RMSE (↓)
Training-Free
Bilinear 59.92 0.66
Task-Agnostic
FeatUp 61.69 0.64
LiFT 57.04 0.70
JAFAR (ours) 🥇 62.18 0.62

🔥 Class Activation Maps

Gradcam

Class Activation Map visualizations across various upsamplers.

📊 Evaluation
Method A.D (↓) A.I (↑) A.G (↑) ADCC (↑)
Training-free
Bilinear 19.0 18.5 3.4 61.7
Task-Agnostic
FeatUp 15.3 24.0 4.3 64.3
LiFT 66.9 8.7 2.3 53.0
JAFAR (ours) 🥇 17.4 30.9 6.5 73.3

🔥 Vehicle segmentation

BeV

Vehicle segmentation in Bird's Eye View using DINOv2 + JAFAR.

📊 Evaluation
Upsampling mIoU (↑) SimpleBeV PointBeV BeVFormer
Training-free
Low-Res 31.75 34.89 33.72
Bilinear 33.67 36.01 34.18
Task-Agnostic
FeatUp 33.95 35.38 34.01
JAFAR (ours) 🥇 36.59 37.20 36.54

🔨 Setup

➡️ Install.

Launch the following commands to install the dependencies and create a mamba (/ conda) environment.

Details
git clone https://github.com/...
cd JAFAR

micromamba create -n jafar python==3.10.14  -y -c conda-forge
micromamba activate jafar
micromamba install pytorch==2.4.1 torchvision==0.19.1 pytorch-cuda=11.8 -c pytorch -c nvidia -c conda-forge -y

pip install uv
uv pip install einops==0.8.0 matplotlib==3.7.0 numpy==1.24.4 timm==1.0.11 plotly tensorboard hydra-core ipykernel rich pytest scikit-learn torchmetrics==1.6.2 transformers

➡️ Datasets.

See Preparing Datasets for JAFAR for details on how to download the datasets.

🔄 Training

To train JAFAR with the dinov2 backbone, execute the following command:

python train.py backbone.name=vit_small_patch14_dinov2.lvd142m hydra.run.dir=output/jafar/dinov2

You can change the backbone to any other available backbone in the timm library by just changing the backbone.name argument.

To fast prototyping we add a sanity argument, it will execute the code for only a few steps and helps you to see if everything is working properly. You can use it as follows:

python train.py sanity=True

🔄 Evaluation

To evaluate the model on segmentation on the VOC dataset with the dinov2 backbone, execute:

python evaluation/train_probes.py eval.task=seg dataset_evaluation=voc \
  backbone.name=vit_small_patch14_dinov2.lvd142m \
  eval.model_ckpt=model.pth \
  hydra.run.dir=evaluation/unsupervised/voc/vit_small_patch14_dinov2.lvd142m

You can change the dataset and the backbone to any other available dataset and backbone in the timm library by just changing the dataset_evaluation and backbone.name arguments. It will save logs, tensorboard and checkpoits in the hydra directory.

We add a file to benchmark the evaluation time and memory usage of the model. You can run it as follows:

pytest test/test_time_and_memory.py -s -v

🔄 Notebooks

We provide notebooks to perform training, inference and visualisation.

🏆 Available Models

We provide pre-trained JAFAR models for various backbones. You can find the model weights from the following links:

Backbone Name Download Link
ViT-B-16 Download
ViT-B-16-DINO Download
ViT-S-14-DINOv2 Download
ViT-B-14-DINOv2 Download
ViT-S-Reg4-14-DINOv2 Download
ViT-S-16-DINOv3 Download
ViT-S+-16-DINOv3 Download
ViT-B-16-DINOv3 Download
ViT-L-16-DINOv3 Download
ViT-B-16-CLIP Download
ViT-B-16-SigLIP2 Download
Radio_v2.5-B Download
Radio_v2.5-L Download
Radio_v2.5-H Download

Do not hesitate to open an issue if you need a specific backbone or if you have any questions to train it by yourself.

👍 Acknowledgements

Many thanks to these excellent open source projects:

To structure our code we used:

✏️ Bibtex

If this work is helpful for your research, please consider citing the following BibTeX entry and putting a star on this repository.

@misc{couairon2025jafar,
      title={JAFAR: Jack up Any Feature at Any Resolution}, 
      author={Paul Couairon and Loick Chambon and Louis Serrano and Jean-Emmanuel Haugeard and Matthieu Cord and Nicolas Thome},
      year={2025},
      eprint={2506.11136},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2506.11136}, 
}

About

[NeurIPS 2025] Official code for JAFAR: Jack up Any Feature at Any Resolution

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •