loads the anchors from a file
(anchors_path, tiny=False)
| 56 | |
| 57 | |
| 58 | def 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 | |
| 66 | def postprocess_bbbox(pred_bbox, ANCHORS, STRIDES, XYSCALE=[1, 1, 1]): |