krishnachoudhary-hclguvi commited on
Commit
8a5e5fe
·
unverified ·
1 Parent(s): 330e804

Fix EasyOCR missing large colored certificate text

Browse files
Files changed (1) hide show
  1. extractors/ocr_extractor.py +2 -3
extractors/ocr_extractor.py CHANGED
@@ -150,9 +150,8 @@ def extract_image(file_path: str) -> ExtractionResult:
150
  file_path,
151
  detail=1,
152
  paragraph=False, # We want individual boxes for layout reconstruction
153
- width_ths=0.7, # Better for long numbers/strings
154
- height_ths=0.7,
155
- contrast_ths=0.3
156
  )
157
 
158
  # Reconstruct full layout from bounding boxes
 
150
  file_path,
151
  detail=1,
152
  paragraph=False, # We want individual boxes for layout reconstruction
153
+ canvas_size=1200, # Shrunk to detect huge fonts (like certificate names) that CRAFT misses
154
+ contrast_ths=0.1 # Reset to 0.1 so colored/light text isn't dropped
 
155
  )
156
 
157
  # Reconstruct full layout from bounding boxes