Skip to content

tricks_1.py中统计结果有误 #60

Description

@AWeiXN

参考自B站视频评论
【目标检测tricks-统计TP,FP,FN】 https://www.bilibili.com/video/BV1yM4y1d7Gp
Image

对应修改如下:

Image
        for i in range(label.shape[0]):
            if len(pred) > 0:
                ious = iou(label[i:i+1, 1:], np.array(pred)[:, 1:5])[0]
                ious_argsort = ious.argsort()[::-1]
                missing = True
            for j in ious_argsort:
                if ious[j] < iou_threshold: break
                if label[i, 0] == pred[j][0]:
                    image = draw_box(image, pred[j][1:5], detect_color)
                    pred.pop(j)
                    missing = False
                    right_num += 1
                    break

                if missing:
                    image = draw_box(image, label[i][1:5], missing_color)
                    missing_num += 1
            else:
                image = draw_box(image, label[i][1:5], missing_color)
                missing_num += 1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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