LLFF icon indicating copy to clipboard operation
LLFF copied to clipboard

Error running `python imgs2poses.py data/testscene`

Open darthgera123 opened this issue 5 years ago • 14 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.

darthgera123 avatar Jun 07 '20 20:06 darthgera123

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!

dilaratank avatar Jun 10 '20 12:06 dilaratank

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

nitthilan avatar Jul 24 '20 21:07 nitthilan

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

SunM00n avatar Nov 05 '20 15:11 SunM00n

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

robclouth avatar Feb 09 '21 11:02 robclouth

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

SunM00n avatar Feb 09 '21 14:02 SunM00n

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 avatar Feb 09 '21 17:02 robclouth

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

robclouth avatar Feb 09 '21 17:02 robclouth

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.

kajalsanklecha avatar Mar 03 '21 09:03 kajalsanklecha

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?

ofekp avatar May 15 '21 20:05 ofekp

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

shreeramsigdel77 avatar Oct 15 '21 04:10 shreeramsigdel77

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

longbowzhang avatar Oct 29 '21 07:10 longbowzhang

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)

starhiking avatar Dec 02 '21 09:12 starhiking

thanks,good done!

Yes-Jumby avatar Oct 27 '22 14:10 Yes-Jumby