Hongbin Sun 5a8859fe66
[Refactor] Refactor text detection config (#626)
* refactor textdet configs

* remove duplicate keys in _base_

* remove import from config

* syncbn to bn on cpu

* minimize change
2021-12-03 19:37:43 +08:00

40 lines
981 B
Python

root = 'tests/data/toy_dataset'
# dataset with type='TextDetDataset'
train1 = dict(
type='TextDetDataset',
img_prefix=f'{root}/imgs',
ann_file=f'{root}/instances_test.txt',
loader=dict(
type='HardDiskLoader',
repeat=4,
parser=dict(
type='LineJsonParser',
keys=['file_name', 'height', 'width', 'annotations'])),
pipeline=None,
test_mode=False)
# dataset with type='IcdarDataset'
train2 = dict(
type='IcdarDataset',
ann_file=f'{root}/instances_test.json',
img_prefix=f'{root}/imgs',
pipeline=None)
test = dict(
type='TextDetDataset',
img_prefix=f'{root}/imgs',
ann_file=f'{root}/instances_test.txt',
loader=dict(
type='HardDiskLoader',
repeat=1,
parser=dict(
type='LineJsonParser',
keys=['file_name', 'height', 'width', 'annotations'])),
pipeline=None,
test_mode=True)
train_list = [train1, train2]
test_list = [test]