-
Notifications
You must be signed in to change notification settings - Fork 16
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
Support for image masks? #6
Comments
There is some loading support for image masks based on the alpha channel of the image. However, some of the losses might need to be changed: Line 160 in 1902e97
Also, I’m not entirely sure if that projection is supposed by default. The area that handles different camera types is here: ever_training/utils/camera_utils_zipnerf.py Line 1003 in 1902e97
|
I was procrastinating so I added masking. Tell me if it works. Also tell me if the FISHEYE projection matches your image. |
Thanks a lot, will test asap! Guessing I need to put my separate masks in the alpha channel instead right? |
Yeah |
Getting this error when I try to train with or without masks:
Think I've fixed it by changing line 158 in train.py from:
to:
and adding Will let you know if the masks are working and about this fisheye projection. |
Seems like both circular fisheye and masks are working! Not sure if the masks are causing this blue weirdness you can see on the ground somehow? Also any settings you could recommend tweaking for massive scenes like this? It didn't turn out great with default settings, but definitely handled it way better than 3DGS! |
Circular fisheye with masks - https://www.youtube.com/watch?v=oWVB3m-1cIk Pinhole without masks - |
Woah. These are incredible results, to be honest! Especially the fisheye. I'm glad it works out of the box. Are you using different exposures for different photos? If so, there are some extra steps that could be needed. I'm not exactly sure what to tune, as you are probably running into the limits of what is possible with current technology. If you have a very large GPU, here is what I recommend to increase detail: Scenes with many images tend to need a longer training time ( Compared to the scenes I've been working with, the main difference is the actual distance to objects. This probably mostly impacts the distortion loss, which is probably why you are seeing weird blue colors through the floor. In theory, the PRE_MULTI should be scaled based on the scene I believe, or at least the average distance to objects. Unfortunately, I have not exposed the parameter, so it's buried in this file: I guess I could get around to fixing this, if you really need this feature. The setting I usually change for larger scenes is |
Do you think I could share some of these videos on twitter? |
Thanks, so happy the fisheye and masking is working! I'll try tuning all these to see if I can get better results on the huge scenes. Yeah sure, just tried to DM you on there but it wouldn't let me. Follow me @ gradeeterna and I'll send over the videos. |
@half-potato @gradeeterna May I ask the command and data preparation used at last to apply such mask in reconstruction? Any clue how the render.py and metric.py should be adapted in applying mask in evaluation? |
@yuliangguo Masks need to be in the alpha of the images, and it detects them without adding anything to the training command. I am exporting separate binary masks from Metashape and then using this script to combine them in to the alpha of the images. Not sure about the second question. python maskcombiner.py imagespath maskspath combinedpath
|
Hey, are image masks currently supported? I would like to try training circular fisheye datasets which use OPENCV_FISHEYE model, but the black edges around the image circle need to be masked out for training.
I have binary mask .pngs in masks, masks_2 etc folders next to my images and sparse folders, with matching filenames to the images.
Thanks!
The text was updated successfully, but these errors were encountered: