MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / get_anchors

Function get_anchors

examples/vision/python_yolov4/image_processing.py:58–63  ·  view source on GitHub ↗

loads the anchors from a file

(anchors_path, tiny=False)

Source from the content-addressed store, hash-verified

56
57
58def get_anchors(anchors_path, tiny=False):
59 '''loads the anchors from a file'''
60 with open(anchors_path) as f:
61 anchors = f.readline()
62 anchors = np.array(anchors.split(','), dtype=np.float32)
63 return anchors.reshape(3, 3, 2)
64
65
66def postprocess_bbbox(pred_bbox, ANCHORS, STRIDES, XYSCALE=[1, 1, 1]):

Callers

nothing calls this directly

Calls 3

arrayMethod · 0.80
reshapeMethod · 0.80
splitMethod · 0.45

Tested by

no test coverage detected