def _to_original_scale(boxes): height, width = image.shape[:2] minmax_boxes = to_minmax(boxes) minmax_boxes[:, 0] *= width minmax_boxes[:, 2] *= width minmax_boxes[:, 1] *= height minmax_boxes[:, 3] *= height return minmax_boxes.astype(np.int)
def _to_original_scale(boxes): height, width = image.shape[:2] minmax_boxes = to_minmax(boxes) minmax_boxes[:,0] *= width minmax_boxes[:,2] *= width minmax_boxes[:,1] *= height minmax_boxes[:,3] *= height return minmax_boxes.astype(np.int)