GithubHelp home page GithubHelp logo

Comments (10)

VisionaryMind avatar VisionaryMind commented on July 30, 2024

I can confirm that ADOP does not work with multiple cameras, regardless of configuration. Over the weekend, we have tested on several large datasets, and even with only two different cameras, it fails with:

====================================
step 1
[...]
Assertion 'cam.h == image_size_input(1)' failed!
  File: /content/ADOP/src/lib/data/Dataset.cpp:50
  Function: SceneDataTrainSampler::SceneDataTrainSampler(std::shared_ptr<SceneData>, std::vector<int>, bool, Saiga::ivec2, int, bool)

Bring the camera count down to one (i.e. exclude images with different focal lengths, even from the same camera), and the training proceeds without a problem. Please let me know where the code should be modified to allow multiple image sizes, and I will make the change accordingly and re-test. For now, this cannot be used in the majority of photogrammetric pipelines where there is more than one camera and / or images with different focal lengths / sizes. Even with a set of images all of the same size, this will be a problem because during undistortion processing, COLMAP changes image sizes.

from adop.

darglein avatar darglein commented on July 30, 2024
  • First of, you should never use the undistorted images of COLMAP (you lose sharpness if you do). Always use the original raw images if possible. ADOP directly supports the pinhole camera model with distortion.

  • Can you provide me a multi camera dataset with different image sizes? I can take a look and implement an update for you :)

from adop.

VisionaryMind avatar VisionaryMind commented on July 30, 2024

@darglein How have you been able to generate the COLMAP fused point cloud without first undistorting the images? The problem is that those undistortions and resulting image re-sizing are baked into the cameras.bin / images.bin, and if I were to simply copy over the original images alongside the COLMAP dataset, your colmap2adop routine would not be able to parse the dataset properly. I will send you a link via e-mail to the dataset (Kyrkogatan).

UPDATE: I have re-attempted running adop_train with a the COLMAP dataset, using the original undistorted images, the the same problem is present. Even with the original images, colmap2adop resizes the images and creates three cameras --- then is unable to match the resolutions.

from adop.

Gatsby23 avatar Gatsby23 commented on July 30, 2024
  • First of, you should never use the undistorted images of COLMAP (you lose sharpness if you do). Always use the original raw images if possible. ADOP directly supports the pinhole camera model with distortion.
  • Can you provide me a multi camera dataset with different image sizes? I can take a look and implement an update for you :)

Sorry for troubling you. I have met the same problem too. The dataset I used is https://www.cs.ubc.ca/research/kmyi_data/imw2020/TrainingData/brandenburg_gate.tar.gz. Because the dataset provide the finished spare reconstruction. So I use the undistort command and reconstruction command to reconstruct the scenes. And I use the colmap2adop to construct the scenes. However, the error shows that the image w is not as same as the camera w.

from adop.

Gatsby23 avatar Gatsby23 commented on July 30, 2024

@darglein How have you been able to generate the COLMAP fused point cloud without first undistorting the images? The problem is that those undistortions and resulting image re-sizing are baked into the cameras.bin / images.bin, and if I were to simply copy over the original images alongside the COLMAP dataset, your colmap2adop routine would not be able to parse the dataset properly. I will send you a link via e-mail to the dataset (Kyrkogatan).

UPDATE: I have re-attempted running adop_train with a the COLMAP dataset, using the original undistorted images, the the same problem is present. Even with the original images, colmap2adop resizes the images and creates three cameras --- then is unable to match the resolutions.

Have you solved the problem ? I comment the Saiga_ASSERT, but it breaks down at training.

from adop.

darglein avatar darglein commented on July 30, 2024

Hello, the latest commit should fix this issue. I was able to train ADOP on the kyrkogatan dataset using the undistorted images.

For an even better reconstruction, I suggest using the original images (maybe downscaled by a factor of 2).

kyrko.mp4

from adop.

VisionaryMind avatar VisionaryMind commented on July 30, 2024

This is beautiful. Thank you kindly for taking the time to resolve the issue! If I understand you correctly, you are saying that reconstruction will be more accurate with 2x downsized original images? Wouldn't we be losing keypoints during matching? I have attempted a low-resolution reconstruction using other photogrammetry tools in the past, and it has always yielded less accurate results. I am curious to hear your own experience.

from adop.

Gatsby23 avatar Gatsby23 commented on July 30, 2024

This is beautiful. Thank you kindly for taking the time to resolve the issue! If I understand you correctly, you are saying that reconstruction will be more accurate with 2x downsized original images? Wouldn't we be losing keypoints during matching? I have attempted a low-resolution reconstruction using other photogrammetry tools in the past, and it has always yielded less accurate results. I am curious to hear your own experience.

I met the same problem as you. After loading the config, it stops at once. How doyou fix that ?

from adop.

VisionaryMind avatar VisionaryMind commented on July 30, 2024

I met the same problem as you. After loading the config, it stops at once. How doyou fix that ?

In my case, I had shifted the images folder into the root ADOP dataset, thinking that it would need to look for them there. On the contrary, the images must be in the same hierarchy as they were when you run colmap2adop. Otherwise, they cannot be loaded, and it will fail.

from adop.

Gatsby23 avatar Gatsby23 commented on July 30, 2024

I met the same problem as you. After loading the config, it stops at once. How doyou fix that ?

In my case, I had shifted the images folder into the root ADOP dataset, thinking that it would need to look for them there. On the contrary, the images must be in the same hierarchy as they were when you run colmap2adop. Otherwise, they cannot be loaded, and it will fail.

You can modify the dataset.ini in the scenes folder. Thanks for your advice

from adop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.