From 0fcac7e989a9000f35cc399934d1098c6174d698 Mon Sep 17 00:00:00 2001 From: Hugo Tong Date: Wed, 29 Mar 2023 10:20:26 +0000 Subject: [PATCH 1/2] fix 'ValueError: train split does not come with a dumper' when running prepare_dataset.py on test set option 1 when lmdb flag --- dataset_zoo/icdar2013/textrecog.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/dataset_zoo/icdar2013/textrecog.py b/dataset_zoo/icdar2013/textrecog.py index 23fd969fb..b25874931 100644 --- a/dataset_zoo/icdar2013/textrecog.py +++ b/dataset_zoo/icdar2013/textrecog.py @@ -19,11 +19,10 @@ save_name='ic13_textrecog_train_img_gt.zip', md5='6f0dbc823645968030878df7543f40a4', content=['image'], - mapping=[ - # ['ic13_textrecog_train_img_gt/gt.txt', - # 'annotations/train.txt'], - ['ic13_textrecog_train_img_gt', 'textrecog_imgs/train'] - ]), + mapping=[[ + 'ic13_textrecog_train_img_gt/gt.txt', + 'annotations/train.txt' + ], ['ic13_textrecog_train_img_gt', 'textrecog_imgs/train']]), dict( url='https://download.openmmlab.com/mmocr/data/1.x/recog/' 'icdar_2013/train_labels.json', @@ -31,7 +30,14 @@ md5='008fcd0056e72c4cf3064fb4d1fce81b', content=['annotation'], mapping=[['ic13_train_labels.json', 'textrecog_train.json']]), - ])) + ]), + gatherer=dict(type='MonoGatherer', ann_name='train.txt'), + parser=dict( + type='ICDARTxtTextRecogAnnParser', separator=', ', + format='img, text'), # noqa + packer=dict(type='TextRecogPacker'), + dumper=dict(type='JsonDumper'), +) # Note that we offer two versions of test set annotations as follows.Please # choose one of them to download and comment the other. By default, we use the From df79a95ed27497a7977963c3d4c7d8c7d6e076a8 Mon Sep 17 00:00:00 2001 From: Hugo Tong Date: Fri, 31 Mar 2023 08:48:07 +0000 Subject: [PATCH 2/2] Revert "fix 'ValueError: train split does not come with a dumper' when running prepare_dataset.py on test set option 1 when lmdb flag" This reverts commit 0fcac7e989a9000f35cc399934d1098c6174d698. --- dataset_zoo/icdar2013/textrecog.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/dataset_zoo/icdar2013/textrecog.py b/dataset_zoo/icdar2013/textrecog.py index b25874931..23fd969fb 100644 --- a/dataset_zoo/icdar2013/textrecog.py +++ b/dataset_zoo/icdar2013/textrecog.py @@ -19,10 +19,11 @@ save_name='ic13_textrecog_train_img_gt.zip', md5='6f0dbc823645968030878df7543f40a4', content=['image'], - mapping=[[ - 'ic13_textrecog_train_img_gt/gt.txt', - 'annotations/train.txt' - ], ['ic13_textrecog_train_img_gt', 'textrecog_imgs/train']]), + mapping=[ + # ['ic13_textrecog_train_img_gt/gt.txt', + # 'annotations/train.txt'], + ['ic13_textrecog_train_img_gt', 'textrecog_imgs/train'] + ]), dict( url='https://download.openmmlab.com/mmocr/data/1.x/recog/' 'icdar_2013/train_labels.json', @@ -30,14 +31,7 @@ md5='008fcd0056e72c4cf3064fb4d1fce81b', content=['annotation'], mapping=[['ic13_train_labels.json', 'textrecog_train.json']]), - ]), - gatherer=dict(type='MonoGatherer', ann_name='train.txt'), - parser=dict( - type='ICDARTxtTextRecogAnnParser', separator=', ', - format='img, text'), # noqa - packer=dict(type='TextRecogPacker'), - dumper=dict(type='JsonDumper'), -) + ])) # Note that we offer two versions of test set annotations as follows.Please # choose one of them to download and comment the other. By default, we use the