facebookresearch / vggsfm

VGGSfM: Visual Geometry Grounded Deep Structure From Motion
Other
937 stars 70 forks source link

Retrieving data from COLMAP #72

Open joseTWD opened 1 month ago

joseTWD commented 1 month ago

Hi again!

Diving in the base code I was trying to find some way to retrieve, besides of the .bin files, the .txt or .h5 files used to generate the output in the images directory. As far as I know, COLMAP and pycolmap work this way to retrieve the information deleting temporary files. Is there some way to keep these files as an output?

Thanks! :)

jytime commented 1 month ago

Hey,

I am not sure if I understand it clearly here. Do you mean cameras.txt, images.txt, and points3D.txt? You can easily convert bin files to txt by using such scripts

https://github.com/colmap/colmap/blob/6e17523401c64eabbdc6b117679504bea65ca31f/scripts/python/read_write_model.py#L512

joseTWD commented 1 month ago

Sorry, I think I was not clear enough.

Besides of the generated outputs (cameras,, images and points3D in .bin format) I was aiming to retrieve previous data, like the one generated by LightGlue, but I'm not sure if this is possible or it would work the same way COLMAP usually does, generating temporary files in order to create the .bin output.

jytime commented 1 month ago

Hey I think it is possible but you may need to customize a wrapper to do this.