You can use:
image = cv2.copyMakeBorder(src, top, bottom, left, right, borderType)
Where src is your source image and top, bottom, left, right are the padding around the image.
You can use max(sizes) – size value of the image in a while loop to add the padding to each image.
The bordertype can be one of these:
cv2.BORDER_CONSTANTcv2.BORDER_REFLECTcv2.BORDER_REFLECT_101cv2.BORDER_DEFAULTcv2.BORDER_REPLICATEcv2.BORDER_WRAP
cv2.copyMakeBorder tutorial