Skip to content

Commit f250ea2

Browse files
authored
[Fix] Fix wrong ic13 textspotting split data; add lexicons to ic13, ic15 and totaltext (#1758)
* [Fix] Fix wrong ic13 textspotting split data; add lexicons to ic13, ic15 and totaltext * [Fix] Fix wrong ic13 textspotting split data; add lexicons to ic13, ic15 and totaltext * update
1 parent 5685bb0 commit f250ea2

File tree

3 files changed

+87
-3
lines changed

3 files changed

+87
-3
lines changed

dataset_zoo/icdar2013/textspotting.py

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,38 @@
11
_base_ = ['textdet.py']
22

33
_base_.train_preparer.gatherer.img_dir = 'textdet_imgs/train'
4-
_base_.test_preparer.gatherer.img_dir = 'textdet_imgs/test'
54
_base_.train_preparer.packer.type = 'TextSpottingPacker'
5+
66
_base_.test_preparer.packer.type = 'TextSpottingPacker'
7+
_base_.test_preparer.gatherer.img_dir = 'textdet_imgs/test'
8+
_base_.test_preparer.obtainer.files = [
9+
dict(
10+
url='https://rrc.cvc.uab.es/downloads/'
11+
'Challenge2_Test_Task12_Images.zip',
12+
save_name='ic13_textdet_test_img.zip',
13+
md5='af2e9f070c4c6a1c7bdb7b36bacf23e3',
14+
content=['image'],
15+
mapping=[['ic13_textdet_test_img', 'textdet_imgs/test']]),
16+
dict(
17+
url='https://download.openmmlab.com/mmocr/data/1.x/'
18+
'textspotting/icdar2013/ic13_textspotting_test_gt.zip',
19+
save_name='ic13_textspotting_test_gt.zip',
20+
md5='d0d95e800504795d153f4f21d4d8ce07',
21+
content=['annotation'],
22+
mapping=[['ic13_textspotting_test_gt', 'annotations/test']]),
23+
dict(
24+
url='https://download.openmmlab.com/mmocr/data/1.x/'
25+
'textspotting/icdar2013/lexicons.zip',
26+
save_name='icdar2013_lexicons.zip',
27+
md5='4ba017ab0637dae7a66fa471ac0a3253',
28+
content=['annotation'],
29+
mapping=[['icdar2013_lexicons/lexicons', 'lexicons']]),
30+
]
31+
_base_.test_preparer.parser = dict(
32+
type='ICDARTxtTextDetAnnParser', encoding='utf-8-sig')
733

34+
delete = [
35+
'annotations', 'ic13_textdet_train_img', 'ic13_textdet_train_gt',
36+
'ic13_textdet_test_img', 'ic13_textdet_test_gt', 'icdar2013_lexicons'
37+
]
838
config_generator = dict(type='TextSpottingConfigGenerator')

dataset_zoo/icdar2015/textspotting.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,35 @@
11
_base_ = ['textdet.py']
2+
23
_base_.train_preparer.gatherer.img_dir = 'textdet_imgs/train'
3-
_base_.test_preparer.gatherer.img_dir = 'textdet_imgs/test'
44
_base_.train_preparer.packer.type = 'TextSpottingPacker'
5+
6+
_base_.test_preparer.gatherer.img_dir = 'textdet_imgs/test'
57
_base_.test_preparer.packer.type = 'TextSpottingPacker'
8+
_base_.test_preparer.obtainer.files = [
9+
dict(
10+
url='https://rrc.cvc.uab.es/downloads/ch4_test_images.zip',
11+
save_name='ic15_textdet_test_img.zip',
12+
md5='97e4c1ddcf074ffcc75feff2b63c35dd',
13+
content=['image'],
14+
mapping=[['ic15_textdet_test_img', 'textdet_imgs/test']]),
15+
dict(
16+
url='https://rrc.cvc.uab.es/downloads/'
17+
'Challenge4_Test_Task4_GT.zip',
18+
save_name='ic15_textdet_test_gt.zip',
19+
md5='8bce173b06d164b98c357b0eb96ef430',
20+
content=['annotation'],
21+
mapping=[['ic15_textdet_test_gt', 'annotations/test']]),
22+
dict(
23+
url='https://download.openmmlab.com/mmocr/data/1.x/'
24+
'textspotting/icdar2015/lexicons.zip',
25+
save_name='icdar2015_lexicons.zip',
26+
md5='daec48ee72de25a4293a6b12cdc181f5',
27+
content=['annotation'],
28+
mapping=[['icdar2015_lexicons/lexicons', 'lexicons']]),
29+
]
630

731
config_generator = dict(type='TextSpottingConfigGenerator')
32+
delete = [
33+
'annotations', 'ic15_textdet_test_img', 'ic15_textdet_train_img',
34+
'icdar2015_lexicons'
35+
]

dataset_zoo/totaltext/textspotting.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,34 @@
11
_base_ = ['textdet.py']
22

33
_base_.train_preparer.gatherer.img_dir = 'textdet_imgs/train'
4-
_base_.test_preparer.gatherer.img_dir = 'textdet_imgs/test'
54
_base_.train_preparer.packer.type = 'TextSpottingPacker'
5+
6+
_base_.test_preparer.gatherer.img_dir = 'textdet_imgs/test'
67
_base_.test_preparer.packer.type = 'TextSpottingPacker'
8+
_base_.test_preparer.obtainer.files = [
9+
dict(
10+
url='https://universityofadelaide.box.com/shared/static/'
11+
'8xro7hnvb0sqw5e5rxm73tryc59j6s43.zip',
12+
save_name='totaltext.zip',
13+
md5='5b56d71a4005a333cf200ff35ce87f75',
14+
content=['image'],
15+
mapping=[['totaltext/Images/Test', 'textdet_imgs/test']]),
16+
dict(
17+
url='https://universityofadelaide.box.com/shared/static/'
18+
'2vmpvjb48pcrszeegx2eznzc4izan4zf.zip',
19+
save_name='txt_format.zip',
20+
md5='53377a83420b4a0244304467512134e8',
21+
content=['annotation'],
22+
mapping=[['txt_format/Test', 'annotations/test']]),
23+
dict(
24+
url='https://download.openmmlab.com/mmocr/data/1.x/'
25+
'textspotting/totaltext/lexicons.tar.gz',
26+
save_name='totaltext_lexicons.tar.gz',
27+
md5='59e3dd01ee83355043ac69437e2e2ff2',
28+
content=['annotation'],
29+
mapping=[['totaltext_lexicons/lexicons', 'lexicons']]),
30+
]
31+
32+
delete = ['totaltext', 'txt_format', 'annotations', 'totaltext_lexicons']
733

834
config_generator = dict(type='TextSpottingConfigGenerator')

0 commit comments

Comments
 (0)