Skip to content

Commit

Permalink
[Fix] Add necessary keys to test_pipelines to enable test-time visual…
Browse files Browse the repository at this point in the history
…ization (#754)
  • Loading branch information
gaotongxiao authored Jan 26, 2022
1 parent d871eed commit a36de7b
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 9 deletions.
2 changes: 1 addition & 1 deletion configs/_base_/recog_pipelines/abinet_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
keys=['img'],
meta_keys=[
'filename', 'ori_shape', 'img_shape', 'valid_ratio',
'resize_shape'
'resize_shape', 'img_norm_cfg', 'ori_filename'
]),
])
]
5 changes: 4 additions & 1 deletion configs/_base_/recog_pipelines/crnn_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@
dict(
type='Collect',
keys=['img'],
meta_keys=['filename', 'resize_shape', 'valid_ratio']),
meta_keys=[
'filename', 'resize_shape', 'valid_ratio', 'img_norm_cfg',
'ori_filename', 'img_shape', 'ori_shape'
]),
]
5 changes: 4 additions & 1 deletion configs/_base_/recog_pipelines/crnn_tps_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@
dict(
type='Collect',
keys=['img'],
meta_keys=['filename', 'ori_shape', 'resize_shape', 'valid_ratio']),
meta_keys=[
'filename', 'ori_shape', 'resize_shape', 'valid_ratio',
'img_norm_cfg', 'ori_filename', 'img_shape'
]),
]
5 changes: 4 additions & 1 deletion configs/_base_/recog_pipelines/nrtr_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@
dict(
type='Collect',
keys=['img'],
meta_keys=['filename', 'ori_shape', 'resize_shape', 'valid_ratio'])
meta_keys=[
'filename', 'ori_shape', 'resize_shape', 'valid_ratio',
'img_norm_cfg', 'ori_filename', 'img_shape'
])
]
3 changes: 2 additions & 1 deletion configs/_base_/recog_pipelines/sar_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
type='Collect',
keys=['img'],
meta_keys=[
'filename', 'ori_shape', 'resize_shape', 'valid_ratio'
'filename', 'ori_shape', 'resize_shape', 'valid_ratio',
'img_norm_cfg', 'ori_filename', 'img_shape'
]),
])
]
2 changes: 1 addition & 1 deletion configs/_base_/recog_pipelines/satrn_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
keys=['img'],
meta_keys=[
'filename', 'ori_shape', 'img_shape', 'valid_ratio',
'resize_shape'
'resize_shape', 'img_norm_cfg', 'ori_filename'
]),
])
]
5 changes: 4 additions & 1 deletion configs/_base_/recog_pipelines/seg_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,8 @@
dict(
type='Collect',
keys=['img'],
meta_keys=['filename', 'ori_shape', 'resize_shape'])
meta_keys=[
'filename', 'resize_shape', 'img_norm_cfg', 'ori_filename',
'img_shape', 'ori_shape'
])
]
3 changes: 2 additions & 1 deletion configs/kie/sdmgr/sdmgr_novisual_60e_wildreceipt.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
dict(
type='Collect',
keys=['img', 'relations', 'texts', 'gt_bboxes'],
meta_keys=('filename', 'ori_texts'))
meta_keys=('filename', 'ori_texts', 'img_norm_cfg', 'ori_filename',
'img_shape'))
]

dataset_type = 'KIEDataset'
Expand Down
3 changes: 2 additions & 1 deletion configs/kie/sdmgr/sdmgr_novisual_60e_wildreceipt_openset.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
dict(
type='Collect',
keys=['img', 'relations', 'texts', 'gt_bboxes'],
meta_keys=('filename', 'ori_filename', 'ori_texts', 'ori_boxes'))
meta_keys=('filename', 'ori_filename', 'ori_texts', 'ori_boxes',
'img_norm_cfg', 'ori_filename', 'img_shape'))
]

dataset_type = 'OpensetKIEDataset'
Expand Down

0 comments on commit a36de7b

Please sign in to comment.