Views
No views yet
to_q, to_k, to_v, to_out.01import torch
2from src.depth.models.model import ColonCrafterInference
3
4# Load the model
5device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
6model = ColonCrafterInference.from_pretrained(
7 "romainhardy/coloncrafter",
8 device=device
9)
10
11# Prepare video tensor: (N, C, H, W) in [0, 1] range
12# video = ...
13
14# Run inference
15pred_depth, pred_disparity = model.predict_depth(
16 video,
17 num_inference_steps=1,
18 window_size=16,
19 overlap=8,
20 guidance_scale=1.0,
21 seed=42
22)1@article{hardy2025coloncrafter,
2 title={ColonCrafter: A Depth Estimation Model for Colonoscopy Videos Using Diffusion Priors},
3 author={Hardy, Romain and Berzin, Tyler and Rajpurkar, Pranav},
4 journal={arXiv preprint arXiv:2509.13525},
5 year={2025}
6}