Skip to content

license_plate_detection_yunet NMSBoxes call with wrong bboxes #275

Open
@tomchen1000

Description

Hi @fengyuentau ,

It seems to me in lpd_yunet.py (under models/license_plate_detection_yunet), the bboxes parameter of the call to NMSBoxes contains wrong data. dets[:, :-1] is array of (x,y) coordinates of 4 corners, i.e. 8 numbers of [x1, y1, x2, y2, x3, y3, x4, y4], so dets[:, 0:4].tolist() is [x1, y1, x2, y2], however bboxes of NMSBoxes expects bounding box in the form of [x, y, width, height].

    # NMS
    keepIdx = cv.dnn.NMSBoxes(
        bboxes=dets[:, 0:4].tolist(),
        scores=dets[:, -1].tolist(),
        score_threshold=self.confidence_threshold,
        nms_threshold=self.nms_threshold,
        top_k=self.top_k
    ) # box_num x class_num

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions