Chien-Hung/DetVisGUI

Cannot visualize results

Opened this issue · 0 comments

I have confirmed the model path, the datasets path and the configs path.
The result is

(pytorch) PS D:.task\Otask_python\machine_learning\FINALWORK\DDDDDDD\MMD\mmdetection-main> python DetVisGUI/DetVisGUI_test.py configs/faster_rcnn/faster_rcnn_r50_fpn_1x_didi.py work_dirs/faster_rcnn_r50_fpn_1x_didi/epoch_12.pth D:.task\Otask_python\machine_learning\FINALWORK\DDDDDDD\dataset_release\test
Loads checkpoint by local backend from path: work_dirs/faster_rcnn_r50_fpn_1x_didi/epoch_12.pth
Traceback (most recent call last):
File "D:.task\Otask_python\machine_learning\FINALWORK\DDDDDDD\MMD\mmdetection-main\DetVisGUI\DetVisGUI_test.py", line 910, in
vis_tool().run()
File "D:.task\Otask_python\machine_learning\FINALWORK\DDDDDDD\MMD\mmdetection-main\DetVisGUI\DetVisGUI_test.py", line 884, in run
self.clear_add_listBox_img()
File "D:.task\Otask_python\machine_learning\FINALWORK\DDDDDDD\MMD\mmdetection-main\DetVisGUI\DetVisGUI_test.py", line 754, in clear_add_listBox_img
self.change_img()
File "D:.task\Otask_python\machine_learning\FINALWORK\DDDDDDD\MMD\mmdetection-main\DetVisGUI\DetVisGUI_test.py", line 455, in change_img
img = self.draw_all_det_boxes(img, self.dets)
File "D:.task\Otask_python\machine_learning\FINALWORK\DDDDDDD\MMD\mmdetection-main\DetVisGUI\DetVisGUI_test.py", line 307, in draw_all_det_boxes
for idx, cls_objs in enumerate(single_detection):
TypeError: iteration over a 0-d array

Do I need to check and change codes in DetVisGUI_test.py? Or the causes are not there?