Skip to content
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 using custom dataset #3

Open
rohitdhote111 opened this issue Apr 10, 2023 · 5 comments
Open

Support for using custom dataset #3

rohitdhote111 opened this issue Apr 10, 2023 · 5 comments

Comments

@rohitdhote111
Copy link

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
Copy link
Owner

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
Copy link

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

@sunshineywz123
Copy link

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

@JyVenom
Copy link

JyVenom commented Jun 14, 2023

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
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants