RaduAlexandru / permuto_sdf

Code for our CVPR'23 paper - "PermutoSDF: Fast Multi-View Reconstruction with Implicit Surfaces using Permutohedral Lattices"
https://radualexandru.github.io/permuto_sdf/
MIT License
435 stars 26 forks source link

Support for using custom dataset #3

Open rohitdhote111 opened 1 year ago

rohitdhote111 commented 1 year ago

I have used this repo on the given dataset and I am really amazed by the quality of the outputs.

Can anyone help me to understand how to use it on a custom dataset? I collected drone images for a building structure and generated camera positions file using Agisoft metashape software.

RaduAlexandru commented 1 year ago

Hi there and thanks a lot for the interest in this work!

I recently added another section here to the readme which might help with your usecase. You would need to modify the example script so that you plug in the camera positions you got from Agisoft and also scale your scene so that it fits within the bounding sphere of radius 0.5.

I hope the readme and example script can be useful but please let me know if you encounter any issues along the way!

sunshineywz123 commented 1 year ago

How to convert colmap's bin file to poses_and_intrinsics.txt?

sunshineywz123 commented 1 year ago

for colmap bin,how should i do to custom dataset?

JyVenom commented 1 year ago

How to convert colmap's bin file to poses_and_intrinsics.txt?

for colmap bin,how should i do to custom dataset?

In Colmap, after the automatic reconstruction, in the File pane, choose "Export model as text" and it will export a cameras.txt and images.txt file. cameras.txt contains fx, fy, cx, and cy (It's the camera parameters. You can look up what the params mean for different camera types. For simple radial, since square pixels, fx = fy = params[0], cx = params[1], and cy = params[2]) images.txt contains tx, ty, tz, qw, qx, qy, and qz for each image. You must transform these 7 values to get the value in the world coordinate system. Apply -R^t * T (https://colmap.github.io/format.html and https://stackoverflow.com/questions/69210497/how-to-visualize-colmap-export-images-txt-in-blender). Finally combine the new 7 values with the camera intrinsic to generate a poses_and_intrinsics.txt. look at the file in the EasyPBR dataset as an example for the order of variables. Make sure to toggle checkpoint saving in the config file.

When running the run_custom_dataset.py script, make sure to scale and translate as necessary.

Finally, to get your mesh, make a copy of the create_my_meshes.py script, delete all references to DataLoader's (they are created but not used), and run the new script.

Zvyozdo4ka commented 1 year ago

I have used this repo on the given dataset and I am really amazed by the quality of the outputs.

Can anyone help me to understand how to use it on a custom dataset? I collected drone images for a building structure and generated camera positions file using Agisoft metashape software.

did you get camera positions in Agisoft Professional or Standard?