When I run demo_video_mobile.py after setting flag_nms = True I get the following error :-
TypeError: list indices must be integers or slices, not tuple
For the following code inside the function def apply_nms :-
keep = np.where((cls_dets[:, 4] >= min_scores) &
((cls_dets[:, 3] - cls_dets[:, 1]) * (cls_dets[:, 2] - cls_dets[:, 0]) >= min_box_size))[0]
When I first convert cls_dets into numpy array by cls_dets = np.array(cls_dets) and then execute, the following error is shown :-
IndexError: too many indices for array
This is because the shape of cls_dets is (4,) while the code written is for a 2 dimensional array.
Please suggest a solution so that I can apply non max suppresion with this code.
When I run demo_video_mobile.py after setting flag_nms = True I get the following error :-
TypeError: list indices must be integers or slices, not tuple
For the following code inside the function def apply_nms :-
keep = np.where((cls_dets[:, 4] >= min_scores) &
((cls_dets[:, 3] - cls_dets[:, 1]) * (cls_dets[:, 2] - cls_dets[:, 0]) >= min_box_size))[0]
When I first convert cls_dets into numpy array by cls_dets = np.array(cls_dets) and then execute, the following error is shown :-
IndexError: too many indices for array
This is because the shape of cls_dets is (4,) while the code written is for a 2 dimensional array.
Please suggest a solution so that I can apply non max suppresion with this code.