def resize(img, label, new_size, interpolation=cv2.INTER_CUBIC):
"""
Resizes the image
TODO: Make this method more generic to modify the label
Args:
img: input image
new_size: new image size [new_width,new_height]
interpolation: Kind of interpolation to use
"""
return cv2.resize(img, new_size, interpolation=interpolation), label
评论列表
文章目录