3

I'm trying to train an object detection algorithm (i.e. YOLOv4 Scaled, Faster R-CNN) on data taken from large orthophotos. Let's say I have one class, and I label the entire orthophoto with bounding boxes. After labeling, is there a way to slice up the entire image into individual photos of specified pixel sizes (i.e. 416x416 pixels) while keeping the bounding boxes? I can easily slice the photo into the specified dimensions, but the problem I am having is keeping the bounding boxes in these new images.

That way, I would not be exhausting my GPU's memory requirements.

ihb
  • 129
  • 1
  • 10

1 Answers1

1

You can reduce your photo size and scale the corresponding boxes to the new dimensions (416x416).

Or if you want to go with your technique, you can slice the image and then, check if the bounding box lies in the slice, then, reorient it according to the slice you took.

Take a look at albumentations library for this.

Abhishek Verma
  • 858
  • 3
  • 6