Crop large images randomly, where objects are inside the box and save the annotations as well.
This is useful when you have large images but the input size of your network is small, so small objects will be lost.
This code can prevent this and crop your large images into a specific size (width, height).
It can also generates more data.