mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-07 00:09:14 +08:00
Circle crop to images processing pipeline (#2341)
add circle crop to images data processing pipeline
This commit is contained in:
1 parent
bc8341378a
commit
5de83ac50a
1 file changed
+4
@@ -30,6 +30,9 @@ class ImagesToNerfstudioDataset(ColmapConverterToNerfstudioDataset):
|
|||||||
2. Calculates the camera poses for each image using `COLMAP <https://colmap.github.io/>`_.
|
2. Calculates the camera poses for each image using `COLMAP <https://colmap.github.io/>`_.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
percent_radius_crop: float = 1.0
|
||||||
|
"""Create circle crop mask. The radius is the percent of the image diagonal."""
|
||||||
|
|
||||||
def main(self) -> None:
|
def main(self) -> None:
|
||||||
"""Process images into a nerfstudio dataset."""
|
"""Process images into a nerfstudio dataset."""
|
||||||
|
|
||||||
@@ -93,6 +96,7 @@ class ImagesToNerfstudioDataset(ColmapConverterToNerfstudioDataset):
|
|||||||
image_dir=self.image_dir,
|
image_dir=self.image_dir,
|
||||||
num_downscales=self.num_downscales,
|
num_downscales=self.num_downscales,
|
||||||
crop_factor=(0.0, 0.0, 0.0, 0.0),
|
crop_factor=(0.0, 0.0, 0.0, 0.0),
|
||||||
|
percent_radius=self.percent_radius_crop,
|
||||||
)
|
)
|
||||||
if mask_path is not None:
|
if mask_path is not None:
|
||||||
summary_log.append("Saved mask(s)")
|
summary_log.append("Saved mask(s)")
|
||||||
|
|||||||
Reference in new issue
Block a user