Fyusion/LLFF

Error running `python imgs2poses.py data/testscene`

darthgera123 opened this issue · 13 comments

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.

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!

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

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

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

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

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.

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

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

I figured it out, see the line

'--output_path', os.path.join(basedir, 'sparse'), # --export_path changed to --output_path in colmap 3.6

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?

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

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

I have fix the issue at #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)

thanks,good done!