color = [127.5, 127.5, 127.5]
old_size = image.shape[:2] // old_size is in (height, width) format
ratio = float(desired_size)/max(old_size)
new_size = tuple([x + max(desired_size-x, 0) for x in old_size])
// Pad image with mean pixel value
After Change
old_size = image.shape[:2] // old_size is in (height, width) format
new_size = tuple([x + max(ds - x, 0)
for x, ds in zip(old_size, desired_size)])
// Pad image with mean pixel value
new_im = cv2.copyMakeBorder(