capturegraph_recipes
capturegraph_recipes
#
capturegraph_recipes (cgr) — reconstruction and scheduling recipes over the scratch.
The vocabulary this package adds sits at the root (cgr.Reconstruction,
cgr.PosedImage, cgr.Splat, …), defined in types/ exactly as the
core types are; the recipes are folders: cgr.sfm (structure from motion),
cgr.depth (learned depth), cgr.splats (3D Gaussian splats, with
cgr.SplatViewer) and cgr.scheduling (distribution-aware capture
scheduling). gpu_run runs a driver in the interpreter CG_GPU_PYTHON
names, where torch and the model packages live, under cg.lock(cgr.GPU).
import capturegraph_recipes as cgr
frames = cgr.splats.scene_dataset(capture)
pairs = cgr.sfm.nearby_pairs(frames.pose)
model = cgr.sfm.triangulate(frames, cgr.sfm.tracks(frames.image, pairs))
splat = cgr.splats.train(cgr.sfm.reposed(frames, model), cgr.splats.depth_seed(frames))