JialeCao001 / D2Det

D2Det: Towards High Quality Object Detection and Instance Segmentation (CVPR2020)
https://openaccess.thecvf.com/content_CVPR_2020/papers/Cao_D2Det_Towards_High_Quality_Object_Detection_and_Instance_Segmentation_CVPR_2020_paper.pdf
MIT License
297 stars 86 forks source link

inference_demo.inpynb D2Det-instance-res101.pth error #13

Closed zgq91 closed 3 years ago

zgq91 commented 3 years ago

Hi: 感谢开源,当我使用inference_demo.ipynb代码是 checkpoint 的模型D2Det-instance-res101.pth 会报以下的错误"d2det\mmdet\apis\inference.py", line 169, in show_result img[mask] = img[mask] 0.5 + color_mask 0.5 IndexError: boolean index did not match indexed array along dimension 2; dimension is 3 but corresponding boolean dimension is 19"

JialeCao001 commented 3 years ago

@zgq91 Hi. The problem has been fixed. Please update the functions in mmdet/apis/inference.py. https://github.com/JialeCao001/D2Det/blob/ca26d3f1ceb8e0460a1ed75226d9b49fb5027603/mmdet/apis/inference.py#L119 https://github.com/JialeCao001/D2Det/blob/ca26d3f1ceb8e0460a1ed75226d9b49fb5027603/mmdet/apis/inference.py#L188 You can also use our newly provided file to show or save detection results of a single image: demo/D2Det_demo.py. Please refer to README for the usage.

zgq91 commented 3 years ago

谢谢