- non_max_suppression(boxlist: BoxList, max_output_size: int = 10000, iou_threshold: float = 1.0, score_threshold: float = -10.0) BoxList [source]#
Non maximum suppression. This op greedily selects a subset of detection bounding boxes, pruning away boxes that have high IOU (intersection over union) overlap (> thresh) with already selected boxes. In each iteration, the detected bounding box with highest score in the available pool is selected.
boxlist (BoxList) – BoxList holding N boxes. Must contain a ‘scores’ field representing detection scores. All scores belong to the same class.
max_output_size (int) – Maximum number of retained boxes. Defaults to 10_000.
iou_threshold (float) – Intersection over union threshold. Defaults to 1.0.
score_threshold (float) – Minimum score threshold. Remove the boxes with scores less than this value. Default value is set to -10. A very low threshold to pass pretty much all the boxes, unless the user sets a different score threshold. Defaults to -10.0.
A BoxList holding M boxes. where M <= max_output_size.
- Return type
ValueError – If ‘scores’ field does not exist.
ValueError – If threshold is not in [0, 1].
ValueError – If max_output_size < 0.