imgaug
Image augmentation for machine learning experiments
...Convert keypoints to distance maps, extract pixels within bounding boxes from images, clip polygon to the image plane, etc. Scale segmentation maps, average/max pool of images/maps, pad images to aspect ratios (e.g. to square them). Draw heatmaps, segmentation maps, keypoints, bounding boxes, etc.