Views
No views yet

1import torch
2from omnivggt.models.omnivggt import OmniVGGT
3
4# Load model
5model = OmniVGGT()
6model.load_state_dict(torch.load('path/to/model.pth'))
7model.eval()
8
9# Prepare inputs
10inputs = {
11 'images': images, # torch.Tensor [B, N, 3, H, W]
12 'extrinsics': extrinsics, # optional
13 'intrinsics': intrinsics, # optional
14 'depth': depth, # optional
15 'mask': mask, # optional
16}
17
18# Run inference
19with torch.no_grad():
20 predictions = model(**inputs)1# Basic usage - only images required
2python inference.py --image_folder path/to/images/
3
4# With auxiliary camera and depth information
5python inference.py \
6 --image_folder path/to/images/ \
7 --camera_folder path/to/cameras/ \
8 --depth_folder path/to/depths/1conda create -n omnivggt python=3.10
2conda activate omnivggt
3pip install torch==2.7.0 torchvision==0.22.0 torchaudio==2.7.0 --index-url https://download.pytorch.org/whl/cu128
4pip install -r requirements.txt1@article{peng2025omnivggt,
2 title={OmniVGGT: Omni-Modality Driven Visual Geometry Grounded Transformer},
3 author={Peng, Haosong and Li, Hao and Dai, Yalun and Lan, Yushi and Luo, Yihang and Qi, Tianyu and Zhang, Zhengshen and Zhan, Yufeng and Zhang, Junfei and Xu, Wenchao and Liu, Ziwei},
4 journal={arXiv preprint arXiv:2511.10560},
5 year={2025}
6}