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

process data to grab only JPS and PNG, disregard the small trash files #738

Closed
wants to merge 12 commits into from

Conversation

dokluch
Copy link

@dokluch dokluch commented Oct 8, 2022

Previous was expired

@dokluch
Copy link
Author

dokluch commented Oct 9, 2022

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.

@dokluch dokluch changed the title Updated Discord link in Readme process data to grab only JPS and PNG, disregard the small trash files Oct 9, 2022
Copy link
Contributor

@tancik tancik left a 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 Show resolved Hide resolved
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.")
Copy link
Contributor

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 🎉

@tancik
Copy link
Contributor

tancik commented Oct 9, 2022

To run the core checks locally, call ns-dev-train. This will also fix the broken test above.

ethanweber
ethanweber previously approved these changes Oct 9, 2022
Copy link
Collaborator

@ethanweber ethanweber left a 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.

@dokluch
Copy link
Author

dokluch commented Oct 10, 2022

Added fix for 0th frame

@ethanweber ethanweber dismissed their stale review October 11, 2022 00:13

I'm not sure what the latest changes are for. I want to check that first.

Copy link
Collaborator

@ethanweber ethanweber left a 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.")
Copy link
Collaborator

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
Copy link
Collaborator

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.

Copy link
Author

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

@ethanweber
Copy link
Collaborator

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!

@ethanweber
Copy link
Collaborator

Closing this PR and replacing with PR #756. @dokluch you can make another PR when ready for new changes.

@ethanweber ethanweber closed this Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants