I want to process an image (not the whole image) like the figure below.

I don’t want the Faster-RCNN to process the part in the red area of the image. I know that I can change the pixels in the red area to black color. However, these black pixels still pass the Faster-RCNN and the inference time doesn’t decrease.
How can DNN only process the image outside the red area and skip the red area?
Thank you for any suggestion!