rodrigomasini commited on
Commit
4b079b3
·
verified ·
1 Parent(s): 623dc9f

Update mdr_pdf_parser.py

Browse files
Files changed (1) hide show
  1. mdr_pdf_parser.py +5 -4
mdr_pdf_parser.py CHANGED
@@ -1635,10 +1635,11 @@ class MDROcrEngine:
1635
  cls_model_dir=paths["cls"],
1636
  rec_model_dir=paths["rec"],
1637
  rec_char_dict_path=paths["keys"],
1638
- # --- EXPERIMENT: INCREASE THRESHOLDS ---
1639
- det_db_thresh=0.5, # Original was 0.3
1640
- det_db_box_thresh=0.8, # Original was 0.6
1641
- # --- END EXPERIMENT ---
 
1642
  )
1643
  try: self._text_system = _MDR_TextSystem(self._onnx_params); print(f"MDR OCR System initialized.")
1644
  except Exception as e: print(f"ERROR initializing MDR OCR System: {e}"); self._text_system = None
 
1635
  cls_model_dir=paths["cls"],
1636
  rec_model_dir=paths["rec"],
1637
  rec_char_dict_path=paths["keys"],
1638
+ # much lower thresholds so we actually get some candidate masks:
1639
+ det_db_thresh=0.1,
1640
+ det_db_box_thresh=0.3,
1641
+ drop_score=0.1,
1642
+ use_angle_cls=False,
1643
  )
1644
  try: self._text_system = _MDR_TextSystem(self._onnx_params); print(f"MDR OCR System initialized.")
1645
  except Exception as e: print(f"ERROR initializing MDR OCR System: {e}"); self._text_system = None