LLFF icon indicating copy to clipboard operation
LLFF copied to clipboard

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

Open stone100010 opened this issue 4 years ago • 20 comments

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

stone100010 avatar May 20 '20 11:05 stone100010

I have the same error,any suggestion?

ShengliL avatar May 29 '20 01:05 ShengliL

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 avatar Jun 02 '20 02:06 stone100010

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

stone100010 avatar Jun 02 '20 03:06 stone100010

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.

AbbyLuHui avatar Jun 22 '20 12:06 AbbyLuHui

window or ubunntu ? @ @AbbyLuHui

stone100010 avatar Jun 23 '20 04:06 stone100010

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

Jiakai-Zhang avatar Jun 23 '20 05:06 Jiakai-Zhang

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

stone100010 avatar Jun 23 '20 07:06 stone100010

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.

Jiakai-Zhang avatar Jun 23 '20 09:06 Jiakai-Zhang

well,it's a good idea!

stone100010 avatar Jun 23 '20 09:06 stone100010

Thank you for your help! Just solved the problem.

AbbyLuHui avatar Jun 25 '20 08:06 AbbyLuHui

. 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?

foocross avatar Jul 13 '20 14:07 foocross

@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.

Jiakai-Zhang avatar Jul 13 '20 15:07 Jiakai-Zhang

@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.

cuixianguang avatar Jul 20 '20 11:07 cuixianguang

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!

wilbercl avatar Jul 21 '21 11:07 wilbercl

@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 https://github.com/Fyusion/LLFF/pull/60 Beside the pose_boundary.npy will be generated, it also will generate view_imgs.txt to mark which views are used.

starhiking avatar Dec 02 '21 09:12 starhiking

@starhiking good job,thanks!

Yes-Jumby avatar Dec 24 '21 02:12 Yes-Jumby

@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! :))

bearosari avatar Mar 16 '22 14:03 bearosari

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

cjw531 avatar Jun 14 '22 06:06 cjw531

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!

shreyask3107 avatar Jul 02 '22 21:07 shreyask3107

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.

harivnkochi avatar Nov 28 '22 14:11 harivnkochi