def detect_angle(self,img):
        """
        detect text angle in [0,90,180,270]
        @@img:np.array
        """
        angle = self.angleModel(img)
        if angle==90:
            im = Image.fromarray(img).transpose(Image.ROTATE_90)
            img = np.array(im)
        elif angle==180:
            im = Image.fromarray(img).transpose(Image.ROTATE_180)
            img = np.array(im)
        elif angle==270:
            im = Image.fromarray(img).transpose(Image.ROTATE_270)
            img = np.array(im)
        
        return img,angle

        detect text angle in [0,90,180,270]
        @@img:np.array
        
main.py