NVlabs / PoseCNN-PyTorch

PyTorch implementation of the PoseCNN framework
Other
186 stars 47 forks source link

IndexError: too many indices for array: array is 2-dimensional, but 21 were indexed #46

Open LDS666888 opened 2 months ago

LDS666888 commented 2 months ago

When I ran the demo, the following error occurred: Traceback (most recent call last): File "./tools/test_images.py", line 122, in dataset = get_dataset(args.dataset_name) File "/home/ys/PoseCNN-PyTorch-main/tools/../lib/datasets/factory.py", line 57, in get_dataset return __sets[name]() File "/home/ys/PoseCNN-PyTorch-main/tools/../lib/datasets/factory.py", line 28, in datasets.YCBObject(split)) File "/home/ys/PoseCNN-PyTorch-main/tools/../lib/datasets/ycb_object.py", line 75, in init self._extents = self._extents_all[cfg.TRAIN.CLASSES] IndexError: too many indices for array: array is 2-dimensional, but 21 were indexed

The following is the complete part: (pose) ys@ys-System-Product-Name:~/PoseCNN-PyTorch-main$ ./experiments/scripts/demo.sh

real 0m3.996s user 0m3.744s sys 0m1.939s

zqf1234588 commented 1 week ago

Modify

self._extents = self._extents_all[cfg.TRAIN.CLASSES]

to

self._extents = self._extents_all[np.array(cfg.TRAIN.CLASSES)]

same as other places

LDS666888 commented 1 week ago

您好!您的邮件我已收到!祝您天天开心,万事顺意!                                      东升