Skip to content

Error in running with flag_nms= True #45

@Atishaysjain

Description

@Atishaysjain

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions