'Implement RICAP Random Image cut and patch in python

I want to implement a data augmentation technique to apply on CNN algorithm, by cutting multiple images (4 images) of the same sizes say 11x11, and mixing them afterwards to have another image of 11x11 that combine random parts of those multiple images into one. my question is there any library that can help me to implement this RICAP algorithm? here is a link explaining the concept : https://blog.roboflow.com/why-and-how-to-implement-random-crop-data-augmentation/ I'm using TensorFlow for training my deep learning, and the images are created from pandas arrays. thank you in advance



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source