Skip to content

Commit

Permalink
Circle crop to images processing pipeline (#2341)
Browse files Browse the repository at this point in the history
add circle crop to images data processing pipeline
  • Loading branch information
kerrj authored Aug 15, 2023
1 parent bc83413 commit 5de83ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nerfstudio/process_data/images_to_nerfstudio_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ class ImagesToNerfstudioDataset(ColmapConverterToNerfstudioDataset):
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:
"""Process images into a nerfstudio dataset."""

Expand Down Expand Up @@ -93,6 +96,7 @@ def main(self) -> None:
image_dir=self.image_dir,
num_downscales=self.num_downscales,
crop_factor=(0.0, 0.0, 0.0, 0.0),
percent_radius=self.percent_radius_crop,
)
if mask_path is not None:
summary_log.append("Saved mask(s)")
Expand Down

0 comments on commit 5de83ac

Please sign in to comment.