@@ -214,13 +214,11 @@ def get_str(str_id):
214214 model_name = "PP-OCRv5_server_rec" ,
215215 model_dir = rec_model_dir ,
216216 device = self .gpu ,
217- enable_mkldnn = False ,
218217 )
219218 self .text_detector = TextDetection (
220219 model_name = "PP-OCRv5_server_det" ,
221220 model_dir = det_model_dir ,
222221 device = self .gpu ,
223- enable_mkldnn = False ,
224222 )
225223 self .table_ocr = PPStructureV3 (
226224 use_doc_orientation_classify = False ,
@@ -231,7 +229,6 @@ def get_str(str_id):
231229 use_chart_recognition = False ,
232230 use_region_detection = False ,
233231 device = self .gpu ,
234- enable_mkldnn = False ,
235232 )
236233
237234 if os .path .exists ("./data/paddle.png" ):
@@ -3389,25 +3386,12 @@ def modelChoose(self):
33893386 choose_lang = lg_idx [current_text ]
33903387 if hasattr (self , "ocr" ):
33913388 del self .ocr
3392- # TODO the model will be automatically selected based on the language.
3393- if choose_lang in ["french" , "german" , "korean" ]:
33943389 self .ocr = PaddleOCR (
33953390 use_doc_orientation_classify = False ,
33963391 use_textline_orientation = False ,
33973392 use_doc_unwarping = False ,
33983393 lang = choose_lang ,
33993394 device = self .gpu ,
3400- ocr_version = "PP-OCRv3" ,
3401- enable_mkldnn = False , # The future will remove
3402- )
3403- else :
3404- self .ocr = PaddleOCR (
3405- use_doc_orientation_classify = False ,
3406- use_textline_orientation = False ,
3407- use_doc_unwarping = False ,
3408- lang = choose_lang ,
3409- device = self .gpu ,
3410- enable_mkldnn = False , # The future will remove
34113395 )
34123396 if choose_lang in ["ch" , "en" ]:
34133397 if hasattr (self , "table_ocr" ):
@@ -3421,7 +3405,6 @@ def modelChoose(self):
34213405 use_chart_recognition = False ,
34223406 use_region_detection = False ,
34233407 device = self .gpu ,
3424- enable_mkldnn = False , # The future will remove
34253408 )
34263409 else :
34273410 logger .error ("Invalid language selection" )
0 commit comments