How to properly load COLMAP information
Closed this issue · 4 comments
Hi, first of all, thank you for the great dataset!
I am trying to extract COLMAP information from the reconstruct
folder, however when I try opening the images.bin
file I get this error:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc5 in position 0: unexpected end of data
So, I was wondering if there is an "official" way to extract this information for the MegaScenes dataset specifically.
Thank you!
Hi! We recommend importing this module to read the binary files: https://github.com/colmap/colmap/blob/main/scripts/python/read_write_model.py.
Specifically, the helpful functions are read_images_binary(images_bin_path)
, read_cameras_binary(cameras_bin_path)
, and read_points3D_binary(points3D_bin_path)
. Each function returns a named tuple that can be manipulated in Python.
Thanks! I'm using this module already, and here is where it's crashing:
https://github.com/colmap/colmap/blob/a2db4b6f91a68e17a0894dc959698c1650fb236f/scripts/python/read_write_model.py#L266
Is it possible that you are using an older version of this script? Previously, we also got the same error at the while
loop when reading images.bin. We updated the script in this pull request to fix this issue: colmap/colmap#2344
If the updated script does not work, can you let us know which images.bin file cannot be read, so we can try to reproduce the error? Thanks!
Great, seems to be fixed now! Thank you!