danfeiX / scene-graph-TF-release

"Scene Graph Generation by Iterative Message Passing" code repository
http://cs.stanford.edu/~danfei/scene-graph/
MIT License
421 stars 130 forks source link

TypeError: Boolean indexing array has incompatible shape #35

Open Wangzhen-kris opened 5 years ago

Wangzhen-kris commented 5 years ago

I got the following error, anybody has solution?

Traceback (most recent call last): File "./tools/test_net.py", line 89, in imdb = get_imdb(args.roidb, args.imdb, args.rpndb, split=2, num_im=args.test_size) File "/home/jonas/桌面/scene-graph-TF-release/tools/../lib/datasets/factory.py", line 4, in get_imdb return vg_hdf5('%s.h5'%roidb_name, '%s-dicts.json'%roidb_name, imdb_name, rpndb_name, split=split, num_im=num_im) File "/home/jonas/桌面/scene-graph-TF-release/tools/../lib/datasets/vg_hdf5.py", line 42, in init self.im_sizes = np.vstack([self.im_h5['image_widths'][split_mask], File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "/home/jonas/anaconda3/envs/py2.7/lib/python2.7/site-packages/h5py/_hl/dataset.py", line 553, in getitem selection = sel.select(self.shape, args, dsid=self.id) File "/home/jonas/anaconda3/envs/py2.7/lib/python2.7/site-packages/h5py/_hl/selections.py", line 72, in select sel[arg] File "/home/jonas/anaconda3/envs/py2.7/lib/python2.7/site-packages/h5py/_hl/selections.py", line 214, in getitem raise TypeError("Boolean indexing array has incompatible shape") TypeError: Boolean indexing array has incompatible shape

sakets594 commented 5 years ago

@danfeiX I am getting same error when i replaced mini_imdb_1024.h5 (in folder scene-graph-TF-release-master/data/vg without changing any other files) with file created from ./create_imdb.sh in data_tools folder

lawRen75 commented 5 years ago

@JonasWangCN Have you solved this problem? I meet this error too 😂😂

MinglangQiao commented 2 years ago

you may refer to https://github.com/jwyang/graph-rcnn.pytorch/issues/65#issuecomment-1128380060

vamshi813 commented 1 year ago

File "/home/vkmtrddy/Graph-RCNN-master/main.py", line 133, in main() File "/home/vkmtrddy/Graph-RCNN-master/main.py", line 128, in main model = train(cfg, args) File "/home/vkmtrddy/Graph-RCNN-master/main.py", line 73, in train model = build_model(cfg, arguments, args.local_rank, args.distributed) File "/home/vkmtrddy/Graph-RCNN-master/lib/model.py", line 307, in build_model return SceneGraphGeneration(cfg, arguments, local_rank, distributed) File "/home/vkmtrddy/Graph-RCNN-master/lib/model.py", line 31, in init self.data_loader_train = build_data_loader(cfg, split="train", is_distributed=distributed) File "/home/vkmtrddy/Graph-RCNN-master/lib/data/build.py", line 60, in build_data_loader dataset = vg_hdf5(cfg, split=split, transforms=transforms, num_im=num_im) File "/home/vkmtrddy/Graph-RCNN-master/lib/data/vg_hdf5.py", line 53, in init self.split_mask, self.image_index, self.im_sizes, self.gt_boxes, self.gt_classes, self.relationships = load_graphs( File "/home/vkmtrddy/Graph-RCNN-master/lib/data/vg_hdf5.py", line 249, in load_graphs im_widths = im_h5["image_widths"][split_mask[:-1]] File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "/cm/shared/public/apps/python/3.9.13/lib/python3.9/site-packages/h5py/_hl/dataset.py", line 814, in getitem selection = sel.select(self.shape, args, dataset=self) File "/cm/shared/public/apps/python/3.9.13/lib/python3.9/site-packages/h5py/_hl/selections.py", line 64, in select raise TypeError("Boolean indexing array has incompatible shape") TypeError: Boolean indexing array has incompatible shape