update_ocr_postprocess
#52
by
haipingwu
- opened
- 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':
|