Answers.Body: <p>You can reduce your photo size and scale the corresponding boxes to the new dimensions (416x416).</p>
  <p>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.</p>
  <p>Take a look at <a href="https://albumentations.ai/docs/getting_started/bounding_boxes_augmentation/" rel="nofollow noreferrer">albumentations</a> library for this.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-18T21:38:55.050Z
Answers.LastActivityDate: 2021-02-18T21:38:55.050Z
Answers.UserDisplayName: Abhishek Verma
Body: <p>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.</p>
  <p>That way, I would not be exhausting my GPU's memory requirements.</p>
  
Tags: <deep-learning><computer-vision><object-detection><data-labelling>
Title: Is there a methodology for splitting up annotated orthophotos into smaller photos that retain the original bounding boxes?
UserDisplayName: sneeze_shiny
ThreadText: # Is there a methodology for splitting up annotated orthophotos into smaller photos that retain the original bounding boxes?
  
  (Asked by: username_0 on 2021-02-18)
  
  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.
  
  **Tags:** deep-learning, computer-vision, object-detection, data-labelling
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-02-18. Score: 1 | Accepted answer
  
  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](https://albumentations.ai/docs/getting_started/bounding_boxes_augmentation/) library for this.
  
  
  ---
  
  