-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
process data to grab only JPS and PNG, disregard the small trash files #738
Conversation
Updated the way ns-process-data is grabbing the images. Some hidden images may appear in the image folder along with crmeta.db file from Reality Capture. Better to disregard that straight away. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the improvements!
scripts/process_data.py
Outdated
with CONSOLE.status("[bold yellow]Downscaling images...", spinner="growVertical"): | ||
downscale_images(image_dir, num_downscales, verbose=verbose) | ||
if num_frames == 0: | ||
CONSOLE.log("[bold red]:tada: No usable images in the data folder.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha, I don't thin this deserves a 🎉
To run the core checks locally, call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to merge! I only made a few changes. Thanks for the PR.
Added fix for 0th frame |
I'm not sure what the latest changes are for. I want to check that first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a few comments. Thanks for these changes.
with CONSOLE.status("[bold yellow]Downscaling images...", spinner="growVertical"): | ||
downscale_images(image_dir, num_downscales, verbose=verbose) | ||
if num_frames == 0: | ||
CONSOLE.log("[bold red]No usable images in the data folder.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there are no frames, I think the code should exit right after. Right?
images_path=colmap_dir / "sparse" / "0" / "images.bin", | ||
output_dir=output_dir, | ||
max_side = max(Image.open(next(image_dir.glob("[!.]*"))).size) | ||
factor = max_side // 2000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should 2000 be a parameter someone can change from the terminal? If so, we can document it there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I forgot this PR is still opened and pushed without consideration. I am still doing tests so I'd rather roll back a commit
Can you also update the name of the PR? We should merge it after you address the minor comments just to get it in. Thanks! |
Previous was expired