How to create patch from a very large image with DataLoader

There are several large images with shape of 10kx10k. I’d like to create a serial of patches with shape of 600x600. Is there any efficient way.

You can write a custom data loader (inherit from DataLoader) in which you can use Python to pre-processes the images any way you like.