Skip to content

About

Code release of the paper: Revisiting Multi-View Stereo: A Sequence-to-Sequence Formulation (NeurIPS 2026).

Resources

Stars

11 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Revisiting Multi-View Stereo: A Sequence-to-Sequence Formulation

NeurIPS 2026

Project Page arXiv Video

CVLab, EPFL

Aoxiang Fan, Corentin Dumery, Nicolas Talabot, Pascal Fua

Complete reconstructions from 150 views by VidMap, S2S-MVS and DA3-posed, then their camera trajectories

Complete reconstructions from 150 views, then the estimated camera poses.

S2S-MVS is a feed-forward multi-view stereo model. Given posed images, it predicts a depth map and a point map for every view, the points in the camera frame of the first view. A DINOv3 ViT-L image encoder and a plane-sweep cost volume over ResNet matching features feed a multi-view transformer, which decodes depth at full resolution.

Two variants are released. They differ only in the cost volume:

Variant Config Cost volume
GCV configs/models/s2s_mvs_gcv.yaml global: one volume shared by all views, on a uniform grid over contracted space (handles 360° coverage), resampled onto each view's frustum
LCV configs/models/s2s_mvs_lcv.yaml local: one volume per view, its frustum samples correlated with the source views that see them

LCV is recommended for general use.


Installation

conda create -n s2s python=3.11 -y
conda activate s2s
pip install torch==2.10.0 torchvision==0.25.0 --index-url https://download.pytorch.org/whl/cu128
pip install -r requirements.txt

The DINOv3 architecture is fetched with torch.hub from facebookresearch/dinov3 on first use. To use a local clone instead (e.g. on a cluster without internet access), set export DINOV3_REPO=/path/to/dinov3.

Checkpoints

Download the checkpoints from https://drive.google.com/drive/folders/1TKbsuZH0Km45-4TMFWLAzb9GuUt6rKjG?usp=sharing into weights/:

weights/s2s_mvs_gcv.ckpt
weights/s2s_mvs_lcv.ckpt

They hold the full model weights (DINOv3 included), so no other weights are needed for inference.

Inference

The model takes images in [0, 1], 4×4 intrinsics and 4×4 world-to-camera extrinsics. Image sides must be multiples of 16. Run from the repository root:

import sys, torch
sys.path.insert(0, "src/s2s_mvs")
from s2s_mvs_model import s2s_mvs_model, to_44

model = s2s_mvs_model.load_from_checkpoint("weights/s2s_mvs_lcv.ckpt", map_location="cuda").eval()

# images: (B, V, 3, H, W) in [0, 1]
# K: (B, V, 3, 3) pixel intrinsics, E: (B, V, 3, 4) or (B, V, 4, 4) world-to-camera
depth, points, min_depth, max_depth = model.test_adaptive(images, to_44(K), to_44(E))
# depth: (B, V, H, W)
# points: (B, V, H, W, 3), in the camera frame of view 0
# min_depth, max_depth: (B,), the depth range the model estimated

Depth range

The cost volume samples 128 depth planes between min_depth and max_depth, and the predicted depth is confined to that range. Too wide a range leaves few planes on the scene (coarse depth); too narrow a range clips content outside it.

model.test_adaptive estimates the range in two sweeps that share the image encoders:

  1. A coarse sweep over 0.25–1000× the median distance between neighbouring cameras.
  2. A refined sweep over the 5th–95th percentiles of the coarse depth, widened to ×0.75 and ×1.25.

This needs parallax: with views only millimetres apart (consecutive video frames), the coarse sweep fails and the refined range inherits its error. If the range is known, pass it with model.test(images, K, E, min_depth, max_depth).

Demo

notebooks/demo.ipynb runs both checkpoints on the 7-Scenes pumpkin sample in example/pumpkin (18 views, 640×480) and saves the predicted point clouds as colored PLYs in notebooks/. Run it on a kernel of the environment above (pip install ipykernel); older PyTorch versions fail to load the checkpoints. example/pumpkin/cameras.npy holds a dict (np.load(path, allow_pickle=True).item()) with image_names (V,), intrinsics (V, 3, 3) and extrinsics (V, 4, 4) world-to-camera, OpenCV convention.

Datasets

Every dataset path comes from configs/data/dataset_roots.yaml. By default all datasets are expected under data/, e.g. data/ScanNetV2, data/7scenes. Point data_root at your own folder, or override single roots on the command line:

--data_overrides data_root=/path/to/datasets roots.scannet=/elsewhere/ScanNetV2

The released models were trained on ScanNet, Hypersim, TartanAir, Virtual KITTI 2, BlendedMVG, MVS-Synth, Taskonomy, MegaDepth, Co3D, Replica, Aria Synthetic Environments (ATEK), Cubify Anything, TartanAir V2, TRELLIS renders, UnrealStereo4K, Spring, Mapillary Metropolis and Kubric-4D (see configs/data/datasets.yaml). Validation uses the DL3DV benchmark scenes and the 7-Scenes test sequences. Each dataset is read by its loader in src/s2s_mvs/data/datasets/. Splits for ScanNet, Hypersim, TartanAir, Virtual KITTI 2, BlendedMVG and MVS-Synth are in src/s2s_mvs/data/splits/.

Training

Training starts from the pretrained DINOv3 ViT-L/16 weights. Request them from the DINOv3 repository and place them at weights/dinov3_vitl16_pretrain_lvd1689m-8aa4cbdd.pth, or set dino_weights_path in the model config.

wandb login          # training logs to Weights & Biases
bash scripts/train_mvs.sh

scripts/train_mvs.sh trains the LCV variant on 4 GPUs. Pass --config_file configs/models/s2s_mvs_gcv.yaml for GCV. Any field of Options (src/s2s_mvs/options.py) can be overridden on the command line, e.g. --gpus 8 --lr 5e-5. To fine-tune from a released checkpoint, add --load_weights_from_checkpoint weights/s2s_mvs_lcv.ckpt.

Each training batch has a random number of views (2–18) and a random aspect ratio, and holds as many samples as fit in max_tokens_per_gpu patch tokens. configs/data/data.yaml documents the sampling and augmentation settings.


Layout

configs/
  models/s2s_mvs_{gcv,lcv}.yaml     model and training options
  data/data.yaml                    train/val dataloaders (Hydra)
  data/datasets.yaml                dataset lists and per-dataset view sampling
  data/dataset_roots.yaml           dataset paths
scripts/                            training entry point
example/pumpkin/                    7-Scenes sample: 18 images and their cameras
notebooks/demo.ipynb                inference demo: colored point clouds
src/s2s_mvs/
  s2s_mvs_model.py                  LightningModule: cost volumes, losses, test()
  merger.py                         multi-view transformer and dense head
  networks.py                       DINOv3 / ResNet encoders, cost volume embedding
  options.py                        Options dataclass, YAML + CLI merging
  train.py                          training entry point
  data/                             datasets, sampling and dynamic batching
  utils/                            geometry, metrics and visualization helpers
  vggt/                             transformer layers, dense head and geometry adapted from VGGT

src/s2s_mvs is the import root (from data.datamodule import ...). options.py must stay at that top level, because the configs and the checkpoints reference options.Options by module path.

Citation

@inproceedings{fan2026s2smvs,
  author    = {Fan, Aoxiang and Dumery, Corentin and Talabot, Nicolas and Fua, Pascal},
  title     = {Revisiting Multi-View Stereo: A Sequence-to-Sequence Formulation},
  booktitle = {Advances in Neural Information Processing Systems (NeurIPS)},
  year      = {2026}
}

About

Code release of the paper: Revisiting Multi-View Stereo: A Sequence-to-Sequence Formulation (NeurIPS 2026).

Resources

Stars

11 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages