f"The size({h}, {w}) of CropImage must be greater than size({img_h}, {img_w}) of image. Please check image original size and size of ResizeImage if used."
f"The size({h}, {w}) of CropImage must be greater than size({img_h}, {img_w}) of image. "
f"Please check image original size and size of ResizeImage if used."
)
)
w_start=(img_w-w)//2
w_start=(img_w-w)//2
h_start=(img_h-h)//2
h_start=(img_h-h)//2
w_end=w_start+w
w_end=w_start+w
h_end=h_start+h
h_end=h_start+h
img=img[h_start:h_end,w_start:w_end,:]
img=img[h_start:h_end,w_start:w_end,:]
ifimg_info:
img_info["input_shape"]=img.shape[:2]
# TODO(gaotingquan): im_shape is needed to update?