LLFF icon indicating copy to clipboard operation
LLFF copied to clipboard

Mismatch between number of poses and images

Open asad-ak opened this issue 2 years ago • 7 comments

Hello, I wanted to ask why does this issue arise? I am trying to run a nerf repo on the folder containing "sparse/0" and "poses_bounds.npy" file.

Why does this occur that the poses generated are less in number than the total images in the "images" folder?

asad-ak avatar Apr 12 '22 05:04 asad-ak

poses_bounds = np.load(os.path.join(self.root_dir, 'poses_bounds.npy')) # (N_images, 17) self.image_paths = sorted(glob.glob(os.path.join(self.root_dir, 'images/*'))) # load full resolution image then resize if self.split in ['train', 'val']: assert len(poses_bounds) == len(self.image_paths), \ 'Mismatch between number of images and number of poses! Please rerun COLMAP!'

asad-ak avatar Apr 12 '22 05:04 asad-ak

I have the same problem. The fact is that there are a lot of steps to install the various requirements (vcpkg, colmap, etc) and each of them has shown an error. For example, I wasn't able to build colmap from source on my Windows machine, so I just downloaded the pre-built binaries and set an environment variable to the colmap.bat/exe path (I guess it should work anyway). By the way, I have something like 100 images spherically captured (so there should be little difference between two adjacent pics), but running the commands suggested in https://github.com/Fyusion/LLFF/issues/36#issuecomment-648018595 gives me 0 good pairing images, so that imgs2poses.py generates only 2 poses.

Anyone figured out a possible solution?

GabrielePaolini avatar May 28 '22 14:05 GabrielePaolini

The same error. I wonder what type data do we need to run demo.sh , images in JPG,PNG format is enough?

LianShuaiLong avatar Jun 28 '22 03:06 LianShuaiLong

@LianShuaiLong I do not think the format is a problem. I tested it with fern dataset which has images in JPG and it worked fine.

I think it does not work when the dataset is not compatible. I am also looking for a workaround. If anyone figures out a solution, do let me know.

Thanks!

shreyask3107 avatar Jul 02 '22 21:07 shreyask3107

@shreyk25 I remember sampling different number of images from a video (captured at 30FPS) for ex: 1 image/sec, 5 images/sec 8 images/sec, and ran the images2poses.py until I get one pose per image. Its kind of not a good way of doing it but it solved my purpose.

sathishkumark27 avatar Jul 07 '22 18:07 sathishkumark27

Hi, I am testing it on a 360 degree scene and have captured 200 images and still it doesn't seem to work :(

shreyask3107 avatar Jul 09 '22 19:07 shreyask3107

Hi, this blog provide a solution.

At end of the blog, he said, it may be caused by function incompatibility. The solution is: copy your data from folder images to folder images_8.

image

Das-May avatar Jan 07 '24 06:01 Das-May