mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-24 12:09:22 +01:00
add ocr_recognition bugfix
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11785977
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# Copyright (c) Alibaba, Inc. and its affiliates.
|
||||
|
||||
import math
|
||||
import os
|
||||
|
||||
import cv2
|
||||
@@ -71,6 +72,8 @@ class OCRRecognitionPreprocessor(Preprocessor):
|
||||
)
|
||||
|
||||
if self.do_chunking:
|
||||
PRED_LENTH = 75
|
||||
PRED_PAD = 6
|
||||
data = []
|
||||
img_h, img_w = img.shape
|
||||
wh_ratio = img_w / img_h
|
||||
|
||||
Reference in New Issue
Block a user