[Config] Support IC15_1811 (#1556)

* [Config] Update IC15 recog cfg

* Update dataset_zoo/icdar2015/textrecog.py

Co-authored-by: liukuikun <24622904+Harold-lkk@users.noreply.github.com>

Co-authored-by: liukuikun <24622904+Harold-lkk@users.noreply.github.com>
pull/1559/head
Tong Gao 2022-11-21 14:23:39 +08:00 committed by GitHub
parent cfce57ad87
commit 26e7ea6e77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 1 deletions

View File

@ -1,3 +1,6 @@
# This configuration prepares the ICDAR15 1811 and 2077
# version, and uses ICDAR15 2077 version by default.
# Read https://arxiv.org/pdf/1904.01906.pdf for more info.
data_root = 'data/icdar2015'
cache_path = 'data/cache'
@ -30,7 +33,18 @@ data_obtainer = dict(
md5='d7a71585f4cc69f89edbe534e7706d5d',
split=['test'],
content=['annotation'],
mapping=[['ic15_textrecog_test_gt.txt', 'annotations/test.txt']])
mapping=[['ic15_textrecog_test_gt.txt', 'annotations/test.txt']]),
# 3. The 1811 version discards non-alphanumeric character images and
# some extremely rotated, perspective-shifted, and curved images for
# evaluation
dict(
url='https://download.openmmlab.com/mmocr/data/1.x/recog/'
'icdar_2015/textrecog_test_1811.json',
save_name='textrecog_test_1811.json',
md5='8d218ef1c37540ea959e22eeabc79ae4',
split=['test'],
content=['annotation'],
),
])
data_converter = dict(
@ -40,3 +54,11 @@ data_converter = dict(
gatherer=dict(type='mono_gather', mapping="f'{split}.txt'"),
parser=dict(type='ICDARTxtTextRecogAnnParser', encoding='utf-8-sig'),
dumper=dict(type='JsonDumper'))
config_generator = dict(
type='TextRecogConfigGenerator',
data_root=data_root,
test_anns=[
dict(ann_file='textrecog_test.json'),
dict(dataset_postfix='1811', ann_file='textrecog_test_1811.json')
])