mirror of
https://github.com/open-mmlab/mmocr.git
synced 2025-06-03 21:54:47 +08:00
* refactor textdet configs * remove duplicate keys in _base_ * remove import from config * syncbn to bn on cpu * minimize change
40 lines
981 B
Python
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]
|