def forward_ocr(self, img):
    img = cv2.resize(img, (80, 30))
    img = img.transpose(1, 0)
    img = img.reshape((80 * 30))
    img = np.multiply(img, (1 / 255.0))
    self.predictor.forward(data=img)
    prob = self.predictor.get_output(0)
    label_list = []
    for p in prob:
        max_index = np.argsort(p)[::(- 1)][0]
        label_list.append(max_index)
    return self.__get_string(label_list)
def forward_ocr(self, img):
    img = cv2.resize(img, (80, 30))
    img = img.transpose(1, 0)
    img = img.reshape((80 * 30))
    img = np.multiply(img, (1 / 255.0))
    self.predictor.forward(data=img)
    prob = self.predictor.get_output(0)
    label_list = []
    for p in prob:
        max_index = np.argsort(p)[::(- 1)][0]
        label_list.append(max_index)
    return self.__get_string(label_list)