Commit
•
df93020
1
Parent(s):
15aa04e
update_ocr_postprocess (#52)
Browse files- update ocr post-process (f2eb43e7c5267c1bdf4053f1478b29fc875703c8)
Co-authored-by: Haiping Wu <haipingwu@users.noreply.huggingface.co>
- processing_florence2.py +2 -2
processing_florence2.py
CHANGED
@@ -596,7 +596,7 @@ class Florence2PostProcesser(object):
|
|
596 |
{
|
597 |
'TASK_NAME': 'ocr',
|
598 |
'PATTERN': r'(.+?)<loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)>',
|
599 |
-
'AREA_THRESHOLD': 0.
|
600 |
},
|
601 |
{
|
602 |
'TASK_NAME': 'phrase_grounding',
|
@@ -1025,7 +1025,7 @@ class Florence2PostProcesser(object):
|
|
1025 |
text,
|
1026 |
pattern=pattern,
|
1027 |
image_size=image_size,
|
1028 |
-
area_threshold=self.parse_tasks_configs[task].get('AREA_THRESHOLD', 0.
|
1029 |
)
|
1030 |
parsed_dict['ocr'] = instances
|
1031 |
elif task == 'phrase_grounding':
|
|
|
596 |
{
|
597 |
'TASK_NAME': 'ocr',
|
598 |
'PATTERN': r'(.+?)<loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)>',
|
599 |
+
'AREA_THRESHOLD': 0.00
|
600 |
},
|
601 |
{
|
602 |
'TASK_NAME': 'phrase_grounding',
|
|
|
1025 |
text,
|
1026 |
pattern=pattern,
|
1027 |
image_size=image_size,
|
1028 |
+
area_threshold=self.parse_tasks_configs[task].get('AREA_THRESHOLD', 0.0),
|
1029 |
)
|
1030 |
parsed_dict['ocr'] = instances
|
1031 |
elif task == 'phrase_grounding':
|