Make colmap_utils.py follow our style (#346)

type and lint colmap utils
This commit is contained in:
Matthew Tancik authored and GitHub committed 2022-09-05 18:45:49 -07:00
1 parent 361358c6e6
commit 32517f4587
2 files changed
+200 -87

No files matched your search

+2 -2
View File
@@ -39,7 +39,7 @@ from nerfactory.dataloaders.structs import (
from nerfactory.utils.colmap_utils import (
read_cameras_binary,
read_images_binary,
read_pointsTD_binary,
read_points3d_binary,
)
from nerfactory.utils.colors import get_color
from nerfactory.utils.io import (
@@ -712,7 +712,7 @@ class Friends(DataParser):
# NOTE(ethan): this will be common across the different splits.
point_cloud = PointCloud()
if self.include_point_cloud:
points_3d = read_pointsTD_binary(abs_dir / "colmap" / "points3D.bin")
points_3d = read_points3d_binary(abs_dir / "colmap" / "points3D.bin")
xyz = torch.tensor(np.array([p_value.xyz for p_id, p_value in points_3d.items()])).float()
rgb = torch.tensor(np.array([p_value.rgb for p_id, p_value in points_3d.items()])).float()
xyz_h = torch.cat([xyz, torch.ones_like(xyz[..., :1])], -1)