facebookresearch / detectron2

Detectron2 is a platform for object detection, segmentation and other visual recognition tasks.
https://detectron2.readthedocs.io/en/latest/
Apache License 2.0
30.55k stars 7.49k forks source link

visualize_json_results.py IndexError: too many indices for tensor of dimension 1 #2763

Open U-Help opened 3 years ago

U-Help commented 3 years ago

Instructions To Reproduce the 🐛 Bug:

I use visualize_json_results.py to visualize the results for faster rcnn on lvis_v0.5_val dataset, however I can only get results for 12 pictures and get the following error: image

Expected behavior:

I want to get the visualization results for every picture in lvis_v0.5_val dataset.

Environment:

detectron2_v0.1.1

image

ppwwyyxx commented 3 years ago

I think it's because the predictions for the image is empty and the script should skip such images.

U-Help commented 3 years ago

Thanks for your reply, I've solved the question according to your suggestion.