Spaces:
Sleeping
Sleeping
File size: 2,536 Bytes
174ad5e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
data_root = 'data/textocr'
cache_path = 'data/cache'
train_preparer = dict(
obtainer=dict(
type='NaiveDataObtainer',
cache_path=cache_path,
files=[
dict(
url='https://dl.fbaipublicfiles.com/textvqa/images/'
'train_val_images.zip',
save_name='textocr_textdet_img.zip',
md5='d12dd8098899044e4ae1af34db7ecfef',
content=['image'],
mapping=[[
'textocr_textdet_img/train_images', 'textdet_imgs/images'
]]),
dict(
url='https://dl.fbaipublicfiles.com/textvqa/data/textocr/'
'TextOCR_0.1_train.json',
save_name='textocr_textdet_train.json',
md5='0f8ba1beefd2ca4d08a4f82bcbe6cfb4',
content=['annotation'],
mapping=[[
'textocr_textdet_train.json', 'annotations/train.json'
]]),
]),
gatherer=dict(
type='MonoGatherer',
ann_name='train.json',
img_dir='textdet_imgs/images'),
parser=dict(type='COCOTextDetAnnParser', variant='textocr'),
packer=dict(type='TextDetPacker'),
dumper=dict(type='JsonDumper'))
val_preparer = dict(
obtainer=dict(
type='NaiveDataObtainer',
cache_path=cache_path,
files=[
dict(
url='https://dl.fbaipublicfiles.com/textvqa/images/'
'train_val_images.zip',
save_name='textocr_textdet_img.zip',
md5='d12dd8098899044e4ae1af34db7ecfef',
content=['image'],
mapping=[[
'textocr_textdet_img/train_images', 'textdet_imgs/images'
]]),
dict(
url='https://dl.fbaipublicfiles.com/textvqa/data/textocr/'
'TextOCR_0.1_val.json',
save_name='textocr_textdet_val.json',
md5='fb151383ea7b3c530cde9ef0d5c08347',
content=['annotation'],
mapping=[['textocr_textdet_val.json',
'annotations/val.json']]),
]),
gatherer=dict(
type='MonoGatherer',
ann_name='val.json',
img_dir='textdet_imgs/images'),
parser=dict(type='COCOTextDetAnnParser', variant='textocr'),
packer=dict(type='TextDetPacker'),
dumper=dict(type='JsonDumper'))
delete = ['annotations', 'textocr_textdet_img']
config_generator = dict(type='TextDetConfigGenerator')
|