Spaces:
Sleeping
Sleeping
krishnachoudhary-hclguvi commited on
Fix EasyOCR missing large colored certificate text
Browse files
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 |
-
|
| 154 |
-
|
| 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
|