Esempio n. 1
0
 def image_aug(self, img, gt, scale_num, flip_p, degree_random, tw, th, x1,
               y1):
     img, gt = crop(img, gt, tw, th, x1, y1)
     # img, gt = scale(img, gt, scale_num)
     img, gt = flip(img, gt, flip_p)
     img, gt = rotate(img, gt, degree_random)
     return img, gt
Esempio n. 2
0
    def image_aug(self, img, gt, scale_num, flip_p, tw, th, x1, y1):
        img, gt = crop(img, gt, tw, th, x1, y1)
        img, gt = scale(img, gt, scale_num)
        img, gt = flip(img, gt, flip_p)

        return img, gt