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 running `python imgs2poses.py data/testscene` #39

Open darthgera123 opened 4 years ago

darthgera123 commented 4 years ago

Im getting this error, when trying to do manual installation

Need to run COLMAP
Features extracted
Features matched
ERROR: Failed to parse options: unrecognised option '--output_path'.
Traceback (most recent call last):
  File "imgs2poses.py", line 18, in <module>
    gen_poses(args.scenedir, args.match_type)
  File "/home/gera/Desktop/CVIT/Research/code/LLFF/llff/poses/pose_utils.py", line 268, in gen_poses
    run_colmap(basedir, match_type)
  File "/home/gera/Desktop/CVIT/Research/code/LLFF/llff/poses/colmap_wrapper.py", line 71, in run_colmap
    map_output = ( subprocess.check_output(mapper_args, universal_newlines=True) )
  File "/home/gera/anaconda3/envs/llff/lib/python3.7/subprocess.py", line 411, in check_output
    **kwargs).stdout
  File "/home/gera/anaconda3/envs/llff/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['colmap', 'mapper', '--database_path', 'data/testscene/database.db', '--image_path', 'data/testscene/images', '--output_path', 'data/testscene/sparse', '--Mapper.num_threads', '16', '--Mapper.init_min_tri_angle', '4', '--Mapper.multiple_models', '0', '--Mapper.extract_colors', '0']' returned non-zero exit status 1.
dilaratank commented 4 years ago

This means you don't have the images in a separate folder called 'images'. This is necessary. I have stumbled upon the same problem a lot!

nitthilan commented 4 years ago

I too am facing the same problem. Can someone explain what these data structures mean? pts3d, poses in the save_poses function

SunM00n commented 4 years ago

I have another traceback on the same script imgs2poses.py

Traceback (most recent call last): File "imgs2poses.py", line 18, in gen_poses(args.scenedir, args.match_type) File "/content/LLFF/llff/poses/pose_utils.py", line 276, in gen_poses save_poses(basedir, poses, pts3d, perm) File "/content/LLFF/llff/poses/pose_utils.py", line 66, in save_poses cams[ind-1] = 1 IndexError: list assignment index out of range

I'm not sure why the index goes out of range..

robclouth commented 3 years ago

@fishirenee did you solve this? one of the images hasn't registered correctly, could it be that?

SunM00n commented 3 years ago

@robclouth I revisit the dataset. I just deleted the poses that are barely blank with minor features (such as an image of the white ceiling). I noticed those poses caused this type of bug.

@fishirenee did you solve this? one of the images hasn't registered correctly, could it be that?

robclouth commented 3 years ago

Is there anyway to figure out which images are causing the problems? Colmap is dropping one, (the number of poses is 15 but there are 16 images), but I don't know how to figure out which one it is.

robclouth commented 3 years ago

It would be nice if the code just ignored images with no pose instead of failing

kajalsanklecha commented 3 years ago

anyone with the following issue?

`Need to run COLMAP

Features extracted

Features matched

Sparse map created

Finished running COLMAP, see data/frame16/colmap_output.txt for logs

Post-colmap

Cameras 5

Images # 15

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

Done with imgs2poses`

How do I solve this? The poses are not generated.

ofekp commented 3 years ago

I figured it out, see the line https://github.com/Fyusion/LLFF/blob/c6e27b1ee59cb18f054ccb0f87a90214dbe70482/llff/poses/colmap_wrapper.py#L64 I simply changed the code from output_path to export_path and it worked I will add that I installed colmap on Ubuntu 18.04 at the time of writing this comment and the installed version was colmap 3.4 which requires the change I mentioned above.

is it possible to support both versions in the wrapper code?

shreeramsigdel77 commented 3 years ago

@kajalsanklecha Did you solved the issue that you have mentioned above?

longbowzhang commented 3 years ago

@kajalsanklecha Hi, I am facing exactly the same problem as you, do you have any idea to solve it? Thanks in advance.

starhiking commented 2 years ago

I have fix the issue at https://github.com/Fyusion/LLFF/pull/60

The issue is because some views(images) are not registered in the colmap, so we cannot use pose_boundary.npy to process all views(images)

Yes-Jumby commented 2 years ago

thanks,good done!

5p6 commented 3 weeks ago

@robclouth I revisit the dataset. I just deleted the poses that are barely blank with minor features (such as an image of the white ceiling). I noticed those poses caused this type of bug.

@fishirenee did you solve this? one of the images hasn't registered correctly, could it be that?

could you please provide some code to solve it?