Add assert check for valid point clouds for COLMAP dataset

This addresses error `RuntimeError: CUDA error: invalid configuration argument` due to zero points
This commit is contained in:
Nandan Manjunatha 2025-04-27 16:36:26 +05:30 committed by GitHub
parent 54c035f783
commit ef57af14df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -211,6 +211,7 @@ def readColmapSceneInfo(path, images, depths, eval, train_test_exp, llffhold=8):
xyz, rgb, _ = read_points3D_binary(bin_path)
except:
xyz, rgb, _ = read_points3D_text(txt_path)
assert xyz and rgb, f"Error loading {path} data. Point data must exist in either points3D.bin or points3D.txt"
storePly(ply_path, xyz, rgb)
try:
pcd = fetchPly(ply_path)
@ -312,4 +313,4 @@ def readNerfSyntheticInfo(path, white_background, depths, eval, extension=".png"
sceneLoadTypeCallbacks = {
"Colmap": readColmapSceneInfo,
"Blender" : readNerfSyntheticInfo
}
}