utils/augment.py
def rotate_whole_img(self, img):
        """
        rotate whole image
        rotate angle is 0 - 20
        """
        angle = np.random.randint(0, 20)
        h, w = img.shape[:2]
        center = (w / 2, h / 2)
        M = cv2.getRotationMatrix2D(center, angle, 1)
        im = cv2.warpAffine(img, M, (w, h), borderValue=(255, 255, 255))
        return im

        rotate whole image
        rotate angle is 0 - 20
        
rotate whole image
rotate angle is 0 - 20
rotate whole image rotate angle is 0 - 20
def rotate_whole_img(self, img):
        angle = np.random.randint(0, 20)
        h, w = img.shape[:2]
        center = (w / 2, h / 2)
        M = cv2.getRotationMatrix2D(center, angle, 1)
        im = cv2.warpAffine(img, M, (w, h), borderValue=(255, 255, 255))
        return im
def rotate_whole_img ( self , img ) : angle = np . random . randint ( 0 , 20 ) h , w = img . shape [ : 2 ] center = ( w / 2 , h / 2 ) M = cv2 . getRotationMatrix2D ( center , angle , 1 ) im = cv2 . warpAffine ( img , M , ( w , h ) , borderValue = ( 255 , 255 , 255 ) ) return im
rotate whole image
rotate angle is 0 - 20
rotate whole image rotate angle is 0 - 20
"""
        rotate whole image
        rotate angle is 0 - 20
        """
self
img