MCPcopy Index your code
hub / github.com/ColmapView/Colmapview.github.io / getHuggingFaceColmapPaths

Function getHuggingFaceColmapPaths

src/hooks/urlLoaderPolicy.ts:353–370  ·  view source on GitHub ↗
(
  entries: readonly HuggingFaceDatasetTreeEntry[],
  treePath: string
)

Source from the content-addressed store, hash-verified

351 * not just the conventional sparse/0 location.
352 */
353export function getHuggingFaceColmapPaths(
354 entries: readonly HuggingFaceDatasetTreeEntry[],
355 treePath: string
356): HuggingFaceColmapPaths | null {
357 const relativePaths = getRelativeHuggingFaceTreePaths(entries, treePath);
358 const selection = resolveColmapPaths(relativePaths, { requirePoints3D: true });
359 if (!selection || !selection.cameras || !selection.images || !selection.points3D) {
360 return null;
361 }
362
363 return {
364 cameras: selection.cameras,
365 images: selection.images,
366 points3D: selection.points3D,
367 rigs: selection.rigs,
368 frames: selection.frames,
369 };
370}
371
372/**
373 * Locate the images directory within a HuggingFace dataset tree, relative to the

Calls 2

resolveColmapPathsFunction · 0.90

Tested by

no test coverage detected