Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circle crop to images processing pipeline #2341

Merged
merged 1 commit into from
Aug 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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