mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-18 13:53:44 +08:00
Refactor of image and video dataset conversion (#1690)
* Refactor of image and video dataset conversion The classes to convert images and video to a NerfStudio dataset are moved to the main repo and refactor: * Code duplications are removed * Import of the class is now done from nerfstudio package instead of scripts * Doc formatting nits * Doc formatting --------- Co-authored-by: Brent Yi <yibrenth@gmail.com>
This commit is contained in:
1 parent
281615e638
commit
3d2e62a480
6 files changed
+544
-490
No files matched your search
@@ -16,7 +16,9 @@ from nerfstudio.data.utils.colmap_parsing_utils import (
|
||||
write_cameras_binary,
|
||||
write_images_binary,
|
||||
)
|
||||
from scripts.process_data import ProcessImages
|
||||
from nerfstudio.process_data.images_to_nerstudio_dataset import (
|
||||
ImagesToNerfstudioDataset,
|
||||
)
|
||||
|
||||
|
||||
def random_quaternion(num_poses: int):
|
||||
@@ -79,8 +81,10 @@ def test_process_images_skip_colmap(tmp_path: Path):
|
||||
(tmp_path / "mocked_bin" / "colmap").touch(mode=0o777)
|
||||
(tmp_path / "mocked_bin" / "ffmpeg").touch(mode=0o777)
|
||||
|
||||
# Run ProcessImages
|
||||
cmd = ProcessImages(tmp_path / "images", tmp_path / "nerfstudio", colmap_model_path=sparse_path, skip_colmap=True)
|
||||
# Convert images into a NerfStudio dataset
|
||||
cmd = ImagesToNerfstudioDataset(
|
||||
data=tmp_path / "images", output_dir=tmp_path / "nerfstudio", colmap_model_path=sparse_path, skip_colmap=True
|
||||
)
|
||||
cmd.main()
|
||||
os.environ["PATH"] = old_path
|
||||
|
||||
|
||||
Reference in new issue
Block a user