MCPcopy Create free account
hub / github.com/FoundationVision/ByteTrack / filter_box

Function filter_box

yolox/utils/boxes.py:22–30  ·  view source on GitHub ↗

output: (N, 5+class) shape

(output, scale_range)

Source from the content-addressed store, hash-verified

20
21
22def filter_box(output, scale_range):
23 """
24 output: (N, 5+class) shape
25 """
26 min_scale, max_scale = scale_range
27 w = output[:, 2] - output[:, 0]
28 h = output[:, 3] - output[:, 1]
29 keep = (w * h > min_scale * min_scale) & (w * h < max_scale * max_scale)
30 return output[keep]
31
32
33def postprocess(prediction, num_classes, conf_thre=0.7, nms_thre=0.45):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected