nerf-pytorch icon indicating copy to clipboard operation
nerf-pytorch copied to clipboard

A question about TypeError: cannot unpack non-iterable NoneType object?

Open newforests opened this issue 1 year ago • 1 comments

when I train the data,the error happens: Mismatch between imgs 0 and poses 187 !!!! Traceback (most recent call last): File "run_nerf.py", line 878, in train() File "run_nerf.py", line 544, in train spherify=args.spherify) File "D:\acu\lh\nerf-pytorch-master\nerf-pytorch\load_llff.py", line 246, in load_llff_data poses, bds, imgs = _load_data(basedir, factor=factor) # factor=8 downsamples original imgs by 8x TypeError: cannot unpack non-iterable NoneType object

newforests avatar Oct 07 '22 03:10 newforests

If you're running this on a Windows machine, the line check_output('cp {}/* {}'.format(imgdir_orig, imgdir), shell=True) under function def _minify in load_llff.py will not work as cp is not a recognized command in windows. This function is supposed to shrink your original image by a factor of your choosing -- in this case, 8 -- and copy those shrunken images to a new folder called images_8. Since cp doesn't work on Windows, it just skips that step and leaves the images_8 folder empty (hences imgs 0).

What I did was write a separate script to shrink the images and then copy those images into the images_8 folder and then it would work.

zhijiz8 avatar Dec 11 '23 00:12 zhijiz8