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

ERROR: the correct camera poses for current points cannot be accessed #36

Open
stone100010 opened this issue May 20, 2020 · 20 comments
Open

Comments

@stone100010
Copy link

Need to run COLMAP
Features extracted
Features matched
Sparse map created
Finished running COLMAP, see batman2/colmap_output.txt for logs
Post-colmap
Cameras 5
Images # 2
ERROR: the correct camera poses for current points cannot be accessed
Done with imgs2poses

@ShengliL
Copy link

I have the same error,any suggestion?

@stone100010
Copy link
Author

I ended up with a colmap installation error with "Python imgs2 poses.py Fern / "can be run without error. Follow the" Official Guide to colmap "to install," apt get install colmap "may not be useful.If you have any questions, please contact me in time. I'm willing to help you as much as I can.

@stone100010
Copy link
Author

Step 1: "scenedir / images /" file structure, run as follows to get the data set made by colmap

python imgs2 poses.py <your_ scenedir>

Step 2: check that the created file directory has "fern file structure" and copy it to "nerf project file directory"

Step 3: modify "config"_ fern.txt ”Folder path and name

Step 4: clear all files under "log /", and execute "Python run"_ nerf.py --config config_ fern.txt ”At the same time, you should run "tensorboard -- logdir = logs / summaries -- port = 6006" in the same Anaconda environment and corresponding file directory!

At this point, you start the model training and tensorboard training query. The browser can use the“ localhost:6006 ”Check it out, nice~~
@ShengliL

@AbbyLuHui
Copy link

Hi @stone100010 I seem to have the same error. How did you end up solving the issue? I built colmap from source following the installation guide on the official page.

@stone100010
Copy link
Author

window or ubunntu ? @ @AbbyLuHui

@Jiakai-Zhang
Copy link

@stone100010 I met the same problem on Ubuntu 18.04, Did you recompile your boost library?

@stone100010
Copy link
Author

Thank you. My problem has been solved.Others who have the same question can contact me.

@Jiakai-Zhang
Copy link

Jiakai-Zhang commented Jun 23, 2020

Hi @stone100010 I seem to have the same error. How did you end up solving the issue? I built colmap from source following the installation guide on the official page.

I solved the exact problem with u with 3 steps:

  1. recompile boost with your gcc version, mine is boost 1.65-1 and gcc 5.50
  2. change the cmake boost path to make sure you are linking the right boost
  3. manually recompile colmap.

But then I still met the same problem.

So I ran these three lines in terminal:
colmap feature_extractor --database_path $DATASET_PATH/database.db --image_path $DATASET_PATH/images

colmap sequential_matcher --database_path $DATASET_PATH/database.db

colmap mapper --database_path $DATASET_PATH/databse.db --image_path $DATASET_PATH/images --output_path $DATASET_PATH/sparse

I found out colmap works fine but the database maybe bad which led no matching image. I changed my database, finally the code python imgs2poses.py /path/to/your/dataset works.

I recommend you strongly to test your output with above three commands to see if it's the problem of colmap or your dataset.

@stone100010
Copy link
Author

well,it's a good idea!

@AbbyLuHui
Copy link

Thank you for your help! Just solved the problem.

@foocross
Copy link

. I changed my database, finally the code python imgs2poses.py /path/to/your/dataset works.

Hello @FrankZhang0309 I am having the same problem. Can you give more information on "I changed my database"?.

@AbbyLuHui can you tell how you solved the problem?

@Jiakai-Zhang
Copy link

@foocross As I said, the dataset is too bad, so COLMAP can not match the images. So ran the three commands I mentioned to see if your images are paired.

@cuixianguang
Copy link

@FrankZhang0309 U are right. I met the same error with my own data. When I input the images of flowers provided by the author, the error disappeared.

@wilbercl
Copy link

Hello, I am running colmap and it is generating the same error that you raise, I have tried to follow the steps for the solution that they pose @stone100010 @Jiakai-Zhang and I still have the same problem. Could someone help? Thanks!

@starhiking
Copy link

@foocross As I said, the dataset is too bad, so COLMAP can not match the images. So ran the three commands I mentioned to see if your images are paired.

Hi, I have fixed the issue at #60
Beside the pose_boundary.npy will be generated, it also will generate view_imgs.txt to mark which views are used.

@Yes-Jumby
Copy link

@starhiking good job,thanks!

@bearosari
Copy link

@foocross As I said, the dataset is too bad, so COLMAP can not match the images. So ran the three commands I mentioned to see if your images are paired.

Hi, I have fixed the issue at #60 Beside the pose_boundary.npy will be generated, it also will generate view_imgs.txt to mark which views are used.

Hi, I tried using your new code on poses_utils.py and it generated views_imgs.txt however I am curious as to why it always only has 2 images listed in views_imgs.txt, thus, when training, it does not match with the number of images extracted from a video input. I keep receiving an error of "Mismatch between imgs 47 and poses 2 !!!!". I hate 47 images from my dataset but only 2 produced poses. Looking forward to your reply! Thanks! :))

@cjw531
Copy link

cjw531 commented Jun 14, 2022

I also had a similar problem, this is how I solved:

  1. Initially ran COLMAP via imgs2poses.py, encountered an error
  2. Removed all the binary/incorrectly formatted files in images/ folder (i.e. I used a USB drive to transfer image files from Mac, and had DS_Store and/or ._img_1.png like malformed files)
  3. Removed colmap text file from the images/ folder where the COLMAP was running in step no. 1
  4. Re-run, got a proper result

@shreyask3107
Copy link

Hi @bmild and all authors, could this issue be addressed? Will we have to conclude that this error shall pop up for bad incompatible datasets?

I agree with @bearosari, the new pull request suggested by @starhiking does not seem to resolve the problem. It just generated two images.

Hope to get this resolved soon. Thanks!

@harivnkochi
Copy link

harivnkochi commented Nov 28, 2022

I face a similar issue. Ran colmap separately and generated the binary files (cameras, images, points3D) as well as text files. Ran the subfunctions load_colmap_data() followed by save_poses using the loaded cameras, poses, perm (tried with both binary and text), but it clearly has a mismatch between number of images and the cam[ind] it is trying to access. specifically, pts3d[k].image_ids contains inds outside length of camera inds.

I know the colmap output isnt bad or degraded because instant-ngp worked fine on this colmap output.

I'm guessing either your load_colmap_data or save_poses function may be outdated with respect to latest colmap outputs ? Please help, this is getting me stuck.

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