Commit 2c60172b authored by icecraft's avatar icecraft
Browse files

feat: update return result

parent 92579040
...@@ -782,8 +782,7 @@ class MagicModel: ...@@ -782,8 +782,7 @@ class MagicModel:
for i in sub_obj_map_h.keys(): for i in sub_obj_map_h.keys():
ret.append( ret.append(
{ {
'sub_bbox': subjects[i]['bbox'], 'sub_bbox': {'bbox': subjects[i]['bbox'], 'score': subjects[i]['score']},
'score': subjects[i]['score'],
'obj_bboxes': [ 'obj_bboxes': [
{'score': objects[j]['score'], 'bbox': objects[j]['bbox']} {'score': objects[j]['score'], 'bbox': objects[j]['bbox']}
for j in sub_obj_map_h[i] for j in sub_obj_map_h[i]
...@@ -803,7 +802,6 @@ class MagicModel: ...@@ -803,7 +802,6 @@ class MagicModel:
record = { record = {
'image_body': v['sub_bbox'], 'image_body': v['sub_bbox'],
'image_caption_list': v['obj_bboxes'], 'image_caption_list': v['obj_bboxes'],
'score': v['score'],
} }
filter_idx = v['sub_idx'] filter_idx = v['sub_idx']
d = next(filter(lambda x: x['sub_idx'] == filter_idx, with_footnotes)) d = next(filter(lambda x: x['sub_idx'] == filter_idx, with_footnotes))
...@@ -819,7 +817,6 @@ class MagicModel: ...@@ -819,7 +817,6 @@ class MagicModel:
record = { record = {
'table_body': v['sub_bbox'], 'table_body': v['sub_bbox'],
'table_caption_list': v['obj_bboxes'], 'table_caption_list': v['obj_bboxes'],
'score': v['score']
} }
filter_idx = v['sub_idx'] filter_idx = v['sub_idx']
d = next(filter(lambda x: x['sub_idx'] == filter_idx, with_footnotes)) d = next(filter(lambda x: x['sub_idx'] == filter_idx, with_footnotes))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment