nvs2colmap 0.3.1__tar.gz → 0.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/PKG-INFO +3 -2
  2. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/README.md +2 -1
  3. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap/dynamic3dgs/__main__.py +2 -0
  4. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap/dynamic3dgs/link_frames.py +2 -1
  5. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap/dynamic3dgs/points.py +1 -1
  6. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap/write_pcd.py +3 -4
  7. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap.egg-info/PKG-INFO +3 -2
  8. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/pyproject.toml +1 -1
  9. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/LICENSE +0 -0
  10. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap/__init__.py +0 -0
  11. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap/colmap.py +0 -0
  12. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap/dynamic3dgs/camera_meta.py +0 -0
  13. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap/extract_videos.py +0 -0
  14. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap/n3dv/__main__.py +0 -0
  15. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap/n3dv/extract_videos.py +0 -0
  16. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap/n3dv/poses_bounds.py +0 -0
  17. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap/stnerf/__init__.py +0 -0
  18. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap/utils/__init__.py +0 -0
  19. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap/utils/colmap.py +0 -0
  20. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap/utils/ffmpeg.py +0 -0
  21. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap/utils/rotation.py +0 -0
  22. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap/write_model.py +0 -0
  23. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap.egg-info/SOURCES.txt +0 -0
  24. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap.egg-info/dependency_links.txt +0 -0
  25. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap.egg-info/entry_points.txt +0 -0
  26. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap.egg-info/requires.txt +0 -0
  27. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/nvs2colmap.egg-info/top_level.txt +0 -0
  28. {nvs2colmap-0.3.1 → nvs2colmap-0.3.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nvs2colmap
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Utilities for converting novel view synthesis datasets to COLMAP format.
5
5
  Author-email: Howard Yin <yindaheng98@gmail.com>
6
6
  Maintainer-email: Howard Yin <yindaheng98@gmail.com>
@@ -125,6 +125,7 @@ For Dynamic 3D Gaussians scenes, images from both `train_meta.json` and
125
125
  `test_meta.json` are hardlinked into `frame*/images`, and included masks are
126
126
  hardlinked into `frame*/image_masks` (`cam01.jpg` pairs with `cam01.jpg.png`).
127
127
  `--no-train-camera` and `--no-test-camera` drop one split. The same
128
- `--use-colmap` switch writes images to `frame*/input` and runs COLMAP.
128
+ `--use-colmap` switch writes images to `frame*/input`, masks to
129
+ `frame*/input_mask`, and runs COLMAP.
129
130
  `--start-number` uses the same 1-based output numbering; source file
130
131
  `000000.jpg` is frame `1`.
@@ -96,6 +96,7 @@ For Dynamic 3D Gaussians scenes, images from both `train_meta.json` and
96
96
  `test_meta.json` are hardlinked into `frame*/images`, and included masks are
97
97
  hardlinked into `frame*/image_masks` (`cam01.jpg` pairs with `cam01.jpg.png`).
98
98
  `--no-train-camera` and `--no-test-camera` drop one split. The same
99
- `--use-colmap` switch writes images to `frame*/input` and runs COLMAP.
99
+ `--use-colmap` switch writes images to `frame*/input`, masks to
100
+ `frame*/input_mask`, and runs COLMAP.
100
101
  `--start-number` uses the same 1-based output numbering; source file
101
102
  `000000.jpg` is frame `1`.
@@ -90,6 +90,7 @@ def main() -> None:
90
90
  n_frames = args.n_frames
91
91
  frame_output_pattern = folder / "frame%d"
92
92
  image_dir_name = "input" if args.use_colmap else "images"
93
+ mask_dir_name = "input_mask" if args.use_colmap else "image_masks"
93
94
  if not args.skip_frame_linking:
94
95
  if n_frames is None:
95
96
  n_frames = available_frames - args.start_number + 1
@@ -100,6 +101,7 @@ def main() -> None:
100
101
  n_frames=n_frames,
101
102
  start_number=args.start_number,
102
103
  image_dirname=image_dir_name,
104
+ mask_dirname=mask_dir_name,
103
105
  )
104
106
  elif n_frames is None:
105
107
  n_frames = count_frame_dirs(frame_output_pattern, start_number=args.start_number)
@@ -36,6 +36,7 @@ def link_frames(
36
36
  n_frames: int,
37
37
  start_number: int = 1,
38
38
  image_dirname: str = "images",
39
+ mask_dirname: str = "image_masks",
39
40
  ) -> None:
40
41
  folder = Path(folder)
41
42
  frame_pattern = str(frame_pattern)
@@ -43,7 +44,7 @@ def link_frames(
43
44
  frame_index = start_number - 1 + offset
44
45
  frame_dir = Path(frame_pattern % (start_number + offset))
45
46
  image_dir = frame_dir / image_dirname
46
- mask_dir = frame_dir / "image_masks"
47
+ mask_dir = frame_dir / mask_dirname
47
48
  for camera in cameras:
48
49
  filename = camera.filenames[frame_index]
49
50
  link_file(folder / "ims" / filename, image_dir / camera.camera.name)
@@ -20,6 +20,6 @@ def write_init_point_cloud(
20
20
  data = np.load(npz_path)["data"]
21
21
  output_pattern = str(output_pattern)
22
22
  paths = [Path(output_pattern % frame) for frame in range(start_number, start_number + n_frames)]
23
- write_pcd(paths[0], data[:, :3], data[:, 3:6])
23
+ write_pcd(paths[0], data[:, :3], data[:, 3:6] * 255.0)
24
24
  for path in paths[1:]:
25
25
  link_file(paths[0], path)
@@ -9,12 +9,11 @@ from plyfile import PlyData, PlyElement
9
9
  def write_pcd(path, points, colors) -> None:
10
10
  """Write a point cloud in the InstantSplat ``points3D.ply`` layout.
11
11
 
12
- ``points`` and ``colors`` are ``(N, 3)`` arrays. Colors are in ``[0, 1]``
13
- and are scaled to 8-bit RGB here, matching
14
- ``InitializedPointCloud.save_ply``.
12
+ ``points`` and ``colors`` are ``(N, 3)`` arrays. Colors are already 8-bit
13
+ RGB values in ``[0, 255]``.
15
14
  """
16
15
  xyz = np.asarray(points)
17
- rgb = np.asarray(colors) * 255.0
16
+ rgb = np.asarray(colors)
18
17
  dtype = [
19
18
  ("x", "f4"),
20
19
  ("y", "f4"),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nvs2colmap
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Utilities for converting novel view synthesis datasets to COLMAP format.
5
5
  Author-email: Howard Yin <yindaheng98@gmail.com>
6
6
  Maintainer-email: Howard Yin <yindaheng98@gmail.com>
@@ -125,6 +125,7 @@ For Dynamic 3D Gaussians scenes, images from both `train_meta.json` and
125
125
  `test_meta.json` are hardlinked into `frame*/images`, and included masks are
126
126
  hardlinked into `frame*/image_masks` (`cam01.jpg` pairs with `cam01.jpg.png`).
127
127
  `--no-train-camera` and `--no-test-camera` drop one split. The same
128
- `--use-colmap` switch writes images to `frame*/input` and runs COLMAP.
128
+ `--use-colmap` switch writes images to `frame*/input`, masks to
129
+ `frame*/input_mask`, and runs COLMAP.
129
130
  `--start-number` uses the same 1-based output numbering; source file
130
131
  `000000.jpg` is frame `1`.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "nvs2colmap"
7
- version = "0.3.1"
7
+ version = "0.3.2"
8
8
  description = "Utilities for converting novel view synthesis datasets to COLMAP format."
9
9
  readme = "README.md"
10
10
  authors = [{ name = "Howard Yin", email = "yindaheng98@gmail.com" }]
File without changes
File without changes