File size: 2,427 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
data_root = 'data/totaltext'
cache_path = 'data/cache'

train_preparer = dict(
    obtainer=dict(
        type='NaiveDataObtainer',
        cache_path=cache_path,
        files=[
            dict(
                url='https://universityofadelaide.box.com/shared/static/'
                '8xro7hnvb0sqw5e5rxm73tryc59j6s43.zip',
                save_name='totaltext.zip',
                md5='5b56d71a4005a333cf200ff35ce87f75',
                content=['image'],
                mapping=[['totaltext/Images/Train', 'textdet_imgs/train']]),
            dict(
                url='https://universityofadelaide.box.com/shared/static/'
                '2vmpvjb48pcrszeegx2eznzc4izan4zf.zip',
                save_name='txt_format.zip',
                md5='53377a83420b4a0244304467512134e8',
                content=['annotation'],
                mapping=[['txt_format/Train', 'annotations/train']]),
        ]),
    gatherer=dict(
        type='PairGatherer',
        img_suffixes=['.jpg', '.JPG'],
        rule=[r'img(\d+)\.([jJ][pP][gG])', r'poly_gt_img\1.txt']),
    parser=dict(type='TotaltextTextDetAnnParser'),
    packer=dict(type='TextDetPacker'),
    dumper=dict(type='JsonDumper'),
)

test_preparer = dict(
    obtainer=dict(
        type='NaiveDataObtainer',
        cache_path=cache_path,
        files=[
            dict(
                url='https://universityofadelaide.box.com/shared/static/'
                '8xro7hnvb0sqw5e5rxm73tryc59j6s43.zip',
                save_name='totaltext.zip',
                md5='5b56d71a4005a333cf200ff35ce87f75',
                content=['image'],
                mapping=[['totaltext/Images/Test', 'textdet_imgs/test']]),
            dict(
                url='https://universityofadelaide.box.com/shared/static/'
                '2vmpvjb48pcrszeegx2eznzc4izan4zf.zip',
                save_name='txt_format.zip',
                md5='53377a83420b4a0244304467512134e8',
                content=['annotation'],
                mapping=[['txt_format/Test', 'annotations/test']]),
        ]),
    gatherer=dict(
        type='PairGatherer',
        img_suffixes=['.jpg', '.JPG'],
        rule=[r'img(\d+)\.([jJ][pP][gG])', r'poly_gt_img\1.txt']),
    parser=dict(type='TotaltextTextDetAnnParser'),
    packer=dict(type='TextDetPacker'),
    dumper=dict(type='JsonDumper'),
)
delete = ['totaltext', 'txt_format', 'annotations']
config_generator = dict(type='TextDetConfigGenerator')