Switching the gaussian-splatting dataparser from ColmapDataParser to NerfStudioDataparser and updating ns-process-data (#2791)

* ns-process-data updated to output a .ply of sparse points from colmap

* docs for loading 3D points

* format fixing

* ruff formatting

* added read_points3D_text

* formatting

* added 3D points to test

* prompted user bool fix

* small fixes to pass test cases

* fix colors

* fixed coord system

* Tweak frames

* Comment wording

* ruff

* Comment intentional default change for load_3D_points

* Wording

* More wording

* Fix double/float issue

---------

Co-authored-by: Ethan Weber <ethanweber@berkeley.edu>
Co-authored-by: Brent Yi <yibrenth@gmail.com>
This commit is contained in:
authored and GitHub committed 2024-01-19 08:00:45 +00:00
1 parent 25a00a09ab
commit 288e1496f1
6 files changed
+189 -17

No files matched your search

+15
View File
@@ -12,9 +12,11 @@ from nerfstudio.data.dataparsers.nerfstudio_dataparser import NerfstudioDataPars
from nerfstudio.data.utils.colmap_parsing_utils import (
Camera,
Image as ColmapImage,
Point3D,
qvec2rotmat,
write_cameras_binary,
write_images_binary,
write_points3D_binary,
)
from nerfstudio.process_data.images_to_nerfstudio_dataset import ImagesToNerfstudioDataset
@@ -50,6 +52,19 @@ def test_process_images_skip_colmap(tmp_path: Path):
{1: Camera(1, "OPENCV", width, height, [110, 110, 50, 75, 0, 0, 0, 0, 0, 0])},
sparse_path / "cameras.bin",
)
write_points3D_binary(
{
1: Point3D(
id=1,
xyz=np.array([0, 0, 0]),
rgb=np.array([0, 0, 0]),
error=np.array([0]),
image_ids=np.array([1]),
point2D_idxs=np.array([0]),
),
},
sparse_path / "points3D.bin",
)
frames = {}
num_frames = 10
qvecs = random_quaternion(num_frames)