-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Hloc fix for image_ids (camera per image) #3081
Conversation
… camera_mode to PER_IMAGE)
This was a dependency problem error: Failed to download: protobuf==3.12.1 Not related to the commit. Can you re-run the Build Core test? |
Let me recap my understanding of the issue. Are you capturing horizontal pictures and portrait pictures with the same resolution? In the original intention, To my knowledge, the current preprocessing in nerfstudio doesn't support distinctive image resolutions. |
I see you are mentioning this code If the camera parameters are defined for every image (frame) the nerfstudio parser can read each camera params independently as in (https://github.com/nerfstudio-project/nerfstudio/blob/main/nerfstudio/data/dataparsers/nerfstudio_dataparser.py#L83) defined as a bool In the How can the Core fail be fixed? The core error is related to a network/pip problem from the github side, not related to the pull-request :( |
Can the Core build be re-run? Now it's pip who couldn't fetch another wheel: botocore==1.34.85 ... |
okay, I think my main concern here is if the user actually have images from the same camera model, would it makes sense to use |
CI is not super stable, I guess. Don't worry about it. |
Yes, it should be added as a parameter in |
…n hloc. Also updated colmap_to_json to detect if there is one or several cameras per frame while keeping the camera type specifications
nerfstudio/process_data/colmap_converter_to_nerfstudio_dataset.py
Outdated
Show resolved
Hide resolved
@@ -418,6 +418,14 @@ def colmap_to_json( | |||
# im_id_to_image = recon.images | |||
cam_id_to_camera = read_cameras_binary(recon_dir / "cameras.bin") | |||
im_id_to_image = read_images_binary(recon_dir / "images.bin") | |||
multifocal = False # one camera for all frames (distort_fixed=True) |
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.
Maybe use use_single_camera_mode = True
@dberga LGTM, I just have some minor comments about the change. |
Right, will do the corrections asap during the next week :) |
|
@dberga I couldn't push my changes to your feature branch, could you either change the permission to allow upstream authors (or just me) or make the suggested change accordingly.
|
Done in b4f0312 |
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.
I manually tested this PR with a local colmap project that have multiple cameras, it works as expected.
It will depend on the amount of matches found from the features detected in the colmap/hloc method. Can you share the transforms.json? To solve the lack on matching please try to add some parameters on the ns-process-data methods (e.g. other feature extractors and matchers, enable exhaustive feature matching, perspective mode, etc.). You can check all parameters by |
Hello @dberga , I want to share my
detected 8 of 8 images (100%). Second attempt:
detected 7 of 8 images. (87,5%) colmap 3.9.1 with CUDA, built from source |
Could you share your dataset? @ichsan2895 |
Here is it |
It is very good you could obtain 100% matchings (1st case) considering a few amount of images. I see in the first case that you add Can you check (with COLMAP gui) the database that all cameras are found? Did the hloc found matches for all cases? In the second transforms case the frame_0001.jpg is missing. |
Yes @dberga , I was intended to use ################ Hey, Sorry for my careless. In first attempt that I said before:
I found 8th images in Take a look in portrait image, but in |
* changed run_hloc args to fill image_ids (added image_list and changed camera_mode to PER_IMAGE) * added parameter same_camera on ns-process-data for multifocal cases in hloc. Also updated colmap_to_json to detect if there is one or several cameras per frame while keeping the camera type specifications * ruff-formatted changes in colmap_utils.py * use_single_camera_mode update args, including colmap_utils and hloc_utils * changed multicamera warning's print to CONSOLE.print * fix path typo console print * rewritten use-single-camera-mode comment in ns-process-data * (fix) inverted bool for colmap_utils * change im_id to im_data.camera_id --------- Co-authored-by: Jianbo Ye <jianboye@amazon.com>
Probably the parameter Maybe try adding an elif checking that:
Let us know so it can be updated |
My recommendation @dberga : auto rotation has another flag like
The images still rotated. |
INTERESTING FINDING:
|
The images in the output
|
Hloc gets a single image_ids here so that it is unable to get the matching between images. Thus it gets an error on not finding images "frame_XXX not found". This little fix in
hloc_utils.py
is solving this issue #3059Found this error on using
--no_same_dimensions
withdisk
features anddisk+lightglue
matching