Jingkang50 / OpenPSG

Benchmarking Panoptic Scene Graph Generation (PSG), ECCV'22
https://psgdataset.org
MIT License
407 stars 68 forks source link

IndexError: too many indices for tensor of dimension 1 #85

Closed Fillip1233 closed 1 year ago

Fillip1233 commented 1 year ago

Hi,authors.Thank you for your excellent work of open source. When I was training with a complete dataset, I encountered the following problems. Did I miss any details?

image
Jingkang50 commented 1 year ago

Did you check this part?

Fillip1233 commented 1 year ago

Thank you for your quick reply!I have modified this file, but the error result is still the same.

Jingkang50 commented 1 year ago

Not quite so sure. I suppose the problem is that some images do not have relation, so with the following code could solve the problem. Could you help check again, or find the image that causes the error.

        dataset['data'] = [
            d for d in dataset['data'] if len(d['relations']) != 0
        ]
Fillip1233 commented 1 year ago

Thanks again for your quick reply!The problem is as you said,when I restart debug mode, the program can run normally.Thank you!