Fastest batch perspective transform for image augmentation I need to do some augmentation for my training images for a neural networks.
The problem is that even when loading batches in parallel, the augmentation is taking longer to perform than the network training.  

The problem is in the perspective transforms I'm applying.
Both cv2.warpPerspective and torchvision.transforms.functional.perspective (with PIL images) are taking roughly the same time. 

But both of them do it image by images (which seems very inefficient to me).    

So, what are the best (fastest and batch-wise) ways of performing perspective transformation?


I think of doing it directly with PyTorch functions, but I don't know the algorithm. (Accepting a good algorithm as answer)    
Any other package that can do it faster?
Image augmentations heavily relies on your DataGenerator and DataLoader design, mostly along with the hardware resources that you are using. Apart from that, here is a quick comparison chart to help you with the transformations along with the libraries links.
The numbers represent the number of images it processes per second.

Here are the links to all the required libraries:

Albumentations
Imgaug
Augmentor
SOLT

Ref: Albumentations benchmark results