File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ def get_str(str_id):
194194 params = {
195195 "use_doc_orientation_classify" : False ,
196196 "use_doc_unwarping" : False ,
197- "use_textline_orientation" : True ,
197+ "use_textline_orientation" : False ,
198198 "device" : self .gpu ,
199199 "lang" : self .lang ,
200200 "text_detection_model_name" : "PP-OCRv5_server_det" ,
Original file line number Diff line number Diff line change @@ -41,11 +41,12 @@ def run(self):
4141 if self .handle == 0 :
4242 self .listValue .emit (img_path )
4343 if self .model == "paddle" :
44- h , w , _ = cv2 .imdecode (
44+ img = cv2 .imdecode (
4545 np .fromfile (img_path , dtype = np .uint8 ), cv2 .IMREAD_COLOR
46- ).shape
46+ )
47+ h , w , _ = img .shape
4748 if h > 32 and w > 32 :
48- result = self .ocr .predict (img_path )[0 ]
49+ result = self .ocr .predict (img )[0 ]
4950 self .result_dic = []
5051 for poly , text , score in zip (
5152 result ["rec_polys" ],
You can’t perform that action at this time.
0 commit comments