Fyusion / LLFF

Code release for Local Light Field Fusion at SIGGRAPH 2019
https://fyusion.com/LLFF
GNU General Public License v3.0
1.55k stars 250 forks source link

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

Open stone100010 opened 4 years ago

stone100010 commented 4 years ago

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 commented 4 years ago

I have the same error,any suggestion?

stone100010 commented 4 years ago

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 commented 4 years ago

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

python imgs2 poses.py

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 commented 4 years ago

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 commented 4 years ago

window or ubunntu ? @ @AbbyLuHui

Jiakai-Zhang commented 4 years ago

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

stone100010 commented 4 years ago

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

Jiakai-Zhang commented 4 years ago

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 commented 4 years ago

well,it's a good idea!

AbbyLuHui commented 4 years ago

Thank you for your help! Just solved the problem.

foocross commented 4 years ago

. 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 commented 4 years ago

@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 commented 4 years ago

@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 commented 3 years ago

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 commented 2 years ago

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

Yes-Jumby commented 2 years ago

@starhiking good job,thanks!

bearosari commented 2 years ago

@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 commented 2 years ago

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 commented 2 years ago

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 commented 1 year ago

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.