Skip to main content
. 2019 Nov 7;19(22):4851. doi: 10.3390/s19224851
Algorithm 1: Data Cropping Strategy
Input: One dataset, A, including N big UAV images.
Output: One dataset, B, including cropped images with a fixed size (416 × 416 pixels).
  • 1:

    B←{}

  • 2:

    forainA:

  • 3:

    objs←all objects in a

  • 4:

    forobjinobjs:

  • 5:

    objsobjs\{obj}

  • 6:

    b←random crop image, a, to fixed size according to the bounding box of obj

  • 7:

    BB∪{b}

  • 8:

    foroinobjs:

  • 9:

    if the intersection over union the between b and o is bigger than 0.5:

  • 10:

    objsobjs\{o}

  • 11:

    end if

  • 12:

    end for

  • 13:

    end for

  • 14:

    end for

  • 15:

    returnB