Skip to content

Windsrain/PromptStereo

Repository files navigation

🏆 [CVPR 2026] PromptStereo: Zero-Shot Stereo Matching via Structure and Motion Prompts 🏆

Xianqi Wang, Hao Yang, Hangtian Wang, Junda Cheng, Gangwei Xu, Min Lin, Xin Yang

Huazhong University of Science and Technology, Optics Valley Laboratory

arxiv

PromptStereo

🔄 Update

  • 05/14/2026: Update demo and training code.
  • 04/15/2026: Update more versions of PromptStereo.
  • 04/01/2026: Update the evaluation code.

⚙️ Environment

conda create -n promptstereo python=3.12
conda activate promptstereo

pip install tqdm numpy wandb opt_einsum hydra-core
pip install imageio scipy torch torchvision opencv-python matplotlib
pip install xformers accelerate scikit-image

📂 Required Data

Data for evaluation:

Data for training:

🎁 Pre-Trained Model

Model Link
Depth-Anything-V2-Large Download 🤗
PromptStereo-SceneFlow-192 Download 🤗
PromptStereo-Unlimited-192 Download 🤗
PromptStereo-SceneFlow-576 Download 🤗
PromptStereo-Unlimited-576 Download 🤗

The SceneFlow checkpoint is retrained and obtains better performance than the paper's version.

🎥 Demo

accelerate launch save_disparity.py

📊 Evaluation

accelerate launch evaluate_stereo.py
# To evaluate with large disparity
accelerate launch evaluate_stereo.py checkpoint=checkpoint/unlimited_576.safetensors model.instance.cfg.gwc_max_disp=576

Default settings use bf16 precision with faster speed but a very little performance degration, you can set accelerator.mixed_precision to null to obtain entire performance.

🚀 Training

# SceneFlow training
accelerate launch train_stereo.py
# Unlimited training
accelerate launch train_stereo.py --config-name train_unlimited checkpoint=checkpoint/sceneflow_192.safetensors

You should set tracker.init_kwargs.wandb.entity and save_path.

🙏 Acknowledgement

This project is based on Depth Anything V2, and MonSter. We thank the original authors for their excellent works.

About

[CVPR 2026] PromptStereo: Zero-Shot Stereo Matching via Structure and Motion Prompts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages