(boxes, aspect_ratio)
return boxes_ar
Perform width-relative aspect ratio transformation.
Perform width-relative aspect ratio transformation.
Perform width - relative aspect ratio transformation .
def aspect_ratio(boxes, aspect_ratio):
    """Perform width-relative aspect ratio transformation."""
    boxes_ar = boxes.copy()
    boxes_ar[:, 0::4] = aspect_ratio * boxes[:, 0::4]
    boxes_ar[:, 2::4] = aspect_ratio * boxes[:, 2::4]
    return boxes_ar
def aspect_ratio ( boxes , aspect_ratio ) : boxes_ar = boxes . copy ( ) boxes_ar [ : , 0 : : 4 ] = aspect_ratio * boxes [ : , 0 : : 4 ] boxes_ar [ : , 2 : : 4 ] = aspect_ratio * boxes [ : , 2 : : 4 ] return boxes_ar