Skip to content

Update nms.py #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ML/Pytorch/object_detection/metrics/nms.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ def nms(bboxes, iou_threshold, threshold, box_format="corners"):
Parameters:
bboxes (list): list of lists containing all bboxes with each bboxes
specified as [class_pred, prob_score, x1, y1, x2, y2]
iou_threshold (float): threshold where predicted bboxes is correct
threshold (float): threshold to remove predicted bboxes (independent of IoU)
iou_threshold (nms)(float): threshold where predicted bboxes is correct
threshold (objectness_threshold) (float): threshold to remove predicted bboxes (independent of IoU)
box_format (str): "midpoint" or "corners" used to specify bboxes

iou_threshold is nms threshold; <nms then box is considered, else ignored

Returns:
list: bboxes after performing NMS given a specific IoU threshold
"""
Expand Down