( entries: readonly HuggingFaceDatasetTreeEntry[], treePath: string )
| 351 | * not just the conventional sparse/0 location. |
| 352 | */ |
| 353 | export 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 |
no test coverage detected