update_model_init_fp16 (#53)

- update model init with float16 (93d5b247d87e5e0afeafe5b49c4a796aa5ba9e7c)
- update model init with float16 (bab1b3cbc340fac15205568422af11476c232442)

Co-authored-by: Haiping Wu <haipingwu@users.noreply.huggingface.co>
This commit is contained in:
ai-modelscope
2024-07-26 20:46:36 +08:00
parent 92117d39db
commit 064b22a4ff
5 changed files with 393 additions and 46 deletions

View File

@ -596,7 +596,7 @@ class Florence2PostProcesser(object):
{
'TASK_NAME': 'ocr',
'PATTERN': r'(.+?)<loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)><loc_(\d+)>',
'AREA_THRESHOLD': 0.01
'AREA_THRESHOLD': 0.00
},
{
'TASK_NAME': 'phrase_grounding',
@ -1025,7 +1025,7 @@ class Florence2PostProcesser(object):
text,
pattern=pattern,
image_size=image_size,
area_threshold=self.parse_tasks_configs[task].get('AREA_THRESHOLD', 0.01),
area_threshold=self.parse_tasks_configs[task].get('AREA_THRESHOLD', 0.0),
)
parsed_dict['ocr'] = instances
elif task == 'phrase_grounding':