Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Pixio

A capable vision encoder dedicated to dense prediction, simply by pixel reconstruction

Paper Hugging Model Card


Official implementation of Pixio from the paper In Pursuit of Pixel Supervision for Visual Pre-training.

Lihe Yang, Shang-Wen Li, Yang Li, Xinjie Lei, Dong Wang, Abdelrahman Mohamed, Hengshuang Zhao, Hu Xu

[BibTeX]

Pixio is largely built on MAE, with three minimal yet critical algorithm updates:

  • deeper decoder
  • larger masking granularity
  • more class tokens

Pixio also updates MAE's pre-training data from ImageNet-1K to MetaCLIP-2B with a simple self-curation strategy.

Performance

Monocular depth estimation ($\delta_1 \uparrow$, frozen encoder)

MethodViT#ParamsNYUv2 (DPT head)KITTI (DPT head)NYUv2 (linear head)KITTI (linear head)
MAEH/14631M80.890.970.379.4
DINOv2g/141137M90.194.675.378.1
DINOv3H+/16841M93.295.676.373.2
PixioH/16631M95.596.790.890.3

Feed-forward 3D reconstruction (MapAnything, ScanNet++ v2)

MethodViT#ParamsScale (rel $\downarrow$)Points (rel $\downarrow$)Points ($\tau \uparrow$)Pose (auc5 $\uparrow$)Depth (rel $\downarrow$)Depth ($\tau \uparrow$)
MAEH/14631M0.0500.05763.365.60.05855.4
DINOv2L/14304M0.0410.05267.673.20.05260.6
DINOv3H+/16841M0.0350.05169.068.50.05161.2
PixioH/16631M0.0290.04178.880.50.04272.4

Semantic segmentation (mIoU $\uparrow$, frozen encoder)

MethodViT#ParamsADE20K (DPT)VOC (DPT)LoveDA (DPT)ADE20K (linear)VOC (linear)LoveDA (linear)
MAEH/14631M37.676.050.235.270.847.6
DINOv2g/141137M51.585.255.049.081.851.9
DINOv3H+/16841M52.385.655.350.382.152.7
PixioH/16631M53.685.954.750.282.253.9

Installation

This codebase is developed with PyTorch 2.8.0 + CUDA 12.8.

conda create -n pixio python=3.10.18
conda activate pixio
pip install -r requirements.txt

Inference (may need Huggingface login)

You can either use source code from this repo or call Transformers APIs.

Source Code

Pixio ViT models pre-trained on web-scale dataset (MetaCLIP-2B):

ModelParametersPre-training DatasetDownload
Pixio-B/1686MMetaCLIP-2B[link]
Pixio-L/16303MMetaCLIP-2B[link]
Pixio-H/16631MMetaCLIP-2B[link]
Pixio-1B/161362MMetaCLIP-2B[link]
Pixio-5B/165441MMetaCLIP-2B[link]
cd pixio

Then testing as follows:

from PIL import Image
from torchvision import transforms

from pixio import pixio_vith16

model = pixio_vith16(pretrained="your/checkpoint/path")

# you can try larger resolution, but ensure both sides are divisible by 16
transform = transforms.Compose([
    transforms.Resize((256, 256), interpolation=3), # 3 is bicubic
    transforms.ToTensor(),
    transforms.Normalize((0.485, 0.456, 0.406), (0.229, 0.224, 0.225))
])

img = Image.open("your/image/path").convert("RGB")
img = transform(img)

# block-wise features containing class tokens and patch tokens
features = model(img.unsqueeze(0))

Transformers (may need Huggingface login)

You can find all HuggingFace paths under this collection.

from transformers import AutoImageProcessor, AutoModel
from PIL import Image

img = Image.open("your/image/path")

processor = AutoImageProcessor.from_pretrained("facebook/pixio-vith16")
model = AutoModel.from_pretrained("facebook/pixio-vith16")

inputs = processor(images=img, return_tensors="pt")
outputs = model(**inputs, output_hidden_states=True)
features_norm = outputs.last_hidden_state # 8 class tokens + patch tokens after last LayerNorm
features = outputs.hidden_states[-1] # 8 class tokens + patch tokens before last LayerNorm

Pre-training

Data Preparation

We provide examples using ImageNet-1K and ImageNet-21K. We use ImageNet datasets organized as tar files from HuggingFace:

Launch Pre-training

cd pretraining

# specify your data path in the script
bash scripts/pretrain_pixio_vith16_imagenet.sh

Evaluation

We provide the evaluation code for monocular depth estimation (NYUv2, KITTI), semantic segmentation (ADE20K, Pascal VOC, LoveDA), and k-NN classification (ImageNet-1K).

Data Preparation

Click here for details

Monocular Depth Estimation

We follow ZoeDepth and BTS, preparing the data as follows:

Please organize the data as follows:

├── [Your NYUv2 Path]
    ├── sync
    │   ├── basement_0001a
    │   ├── bathroom_0001
    │   └── ...    
    └── official_splits
        └── test
            ├── bathroom
            ├── bedroom
            └── ...

├── [Your KITTI Path]
    ├── images
    │   ├── 2011_09_26
    │   ├── 2011_09_28
    │   └── ...    
    └── annotations # extracted from data_depth_annotated.zip
        ├── 2011_09_26_drive_0001_sync
        ├── 2011_09_26_drive_0002_sync
        └── ...

Semantic Segmentation

We mainly follow UniMatch V2, preparing the data as follows:

Please organize the data as follows:

├── [Your ADE20K Path]
    ├── images
    │   ├── training
    │   └── validation
    └── annotations
        ├── training
        └── validation

├── [Your Pascal Path]
    ├── JPEGImages
    └── SegmentationClass

├── [Your LoveDA Path]
    ├── Train/Train
    └── Val/Val

k-NN Classification

Following this script to prepare ImageNet-1K.

Launch Evaluation

cd evaluation

model="pixio_vith16"
pretrained="your/checkpoint/path"

# specify the data path in config files or script
sbatch launch_monodepth.sh monodepth/configs/nyuv2_dpt.yaml $model $pretrained
sbatch launch_semseg.sh semseg/configs/ade20k_linear.yaml $model $pretrained
sbatch launch_knn.sh $model $pretrained

# or run all evaluations together
bash run_all.sh $model $pretrained

Distillation

Launch Distillation

cd distillation

# specify your data path and teacher checkpoint path in the scripts
bash scripts/distill_pixio_vit5b16_to_vit1b16+vith16_imagenet.sh

License

Pixio is licensed under Facebook license.

Acknowledgement

We sincerely thank the authors of MAE, DINO, DINOv2, and DINOv3 for open-sourcing their code and models.

Citation

@article{pixio,
  title={In Pursuit of Pixel Supervision for Visual Pre-training},
  author={Yang, Lihe and Li, Shang-Wen and Li, Yang and Lei, Xinjie and Wang, Dong and Mohamed, Abdelrahman and Zhao, Hengshuang and Xu, Hu},
  journal={arXiv:2512.15715},
  year={2025}
}

关于 About

[CVPR 2026] Pixio: a capable vision encoder dedicated to dense prediction, simply by pixel reconstruction
dense-predictionrepresentation-learningself-supervised-learning

语言 Languages

Python97.1%
Shell2.9%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
10
Total Commits
峰值: 7次/周
Less
More

核心贡献者 Contributors