Views
No views yet
videoldcm.infer interface.videoldcm.pt.1conda create -n vigeo python=3.10 -y
2conda activate vigeo
3
4pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu126
5pip install xformers==0.0.31 --index-url https://download.pytorch.org/whl/cu126
6
7git clone https://github.com/aigc3d/ViGeo.git
8cd ViGeo
9pip install -r requirements.txt
10pip install -r requirements_refine.txt
11pip install -e .1import torch
2
3from videoldcm import videoldcm
4from utils import load_depth_sequence, load_image_sequence
5
6image_paths = ["path/to/image_000.png", "path/to/image_001.png"]
7sparse_depth_paths = ["path/to/sparse_depth_000.npy", "path/to/sparse_depth_001.npy"]
8device = torch.device("cuda")
9
10image = load_image_sequence(image_paths).to(device) # [S, 3, H, W]
11sparse_depth = load_depth_sequence(sparse_depth_paths).to(device) # [S, 1, H, W]
12
13completion_model = videoldcm.from_pretrained("pkqbajng/VideoLDCM").eval().to(device)
14
15with torch.inference_mode():
16 output = completion_model.infer(image=image, sparse_depth=sparse_depth)
17
18refined_depth = output["depth_pred"] # [S, 1, H, W]
19points = output["points_pred"] # [S, H, W, 3]
20confidence = output["conf_pred"] # [S, 1, H, W]infer does not run the sparse-depth mismatch filter. For the explicit data
refinement pipeline with mismatch filtering and Poisson completion, see the
ViGeo main branch README.