MCPcopy
hub / github.com/zetane/viewer / postprocess

Function postprocess

models/yolo_V3/yolo_V3.py:93–105  ·  view source on GitHub ↗
(boxes, scores, indices)

Source from the content-addressed store, hash-verified

91print('update')
92
93def postprocess(boxes, scores, indices):
94 objects_identified = indices.shape[0]
95 out_boxes, out_scores, out_classes = [], [], []
96 if objects_identified > 0:
97 for idx_ in indices:
98 out_classes.append(classes[idx_[1]])
99 out_scores.append(scores[tuple(idx_)])
100 idx_1 = (idx_[0], idx_[2])
101 out_boxes.append(boxes[idx_1])
102 print(objects_identified, "objects identified in source image.")
103 else:
104 print("No objects identified in source image.")
105 return out_boxes, out_scores, out_classes, objects_identified
106
107if tinyYOLOv3:
108 out_boxes, out_scores, out_classes, objects_identified = postprocess(boxes, scores, indices[0])

Callers 1

yolo_V3.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected