Efficient way for online cropping in GPU

Hi I have a question about online cropping in GPU.
I want to crop the corresponding region from the input image using the box coordinate extracted from RPN, just like roi pooling from the feature map.

Is there a way to efficiently perform it on the GPU?
I would appreciate it if someone recommend a related repo.