This repository has been archived by the owner on Aug 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathcrnn-lmdb.yaml
105 lines (99 loc) · 2.69 KB
/
crnn-lmdb.yaml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import:
- 'experiments/base.yaml'
- 'experiments/recognition/community-base.yaml'
package:
- 'structure.visualizers.sequence_recognition_visualizer'
- 'concern.charsets'
define:
- name: train_data
class: DataLoader
dataset:
class: LMDBDataset
lmdb_paths:
- "/data/text-spotter-data/synthtext/"
#- "/data/text-spotter-data/iiit/"
meta_loader: ^meta_loader
processes:
- class: MakeRecognitionLabel
- class: ResizeImage
image_size: [32, 128]
mode: resize
- class: NormalizeImage
- class: FilterKeys
required: ['image', 'label', 'length']
batch_size: 256
- name: iiit
class: DataLoader
dataset:
class: LMDBDataset
lmdb_paths:
- "/data/text-spotter-data/test/iiit/"
max_size: 32
num_workers: 16
meta_loader: ^meta_loader
charset: ^charset
processes:
- class: MakeRecognitionLabel
- class: ResizeImage
image_size: [32, 128]
mode: resize
- class: NormalizeImage
- class: FilterKeys
required: ['image', 'label']
batch_size: 16
- name: BasicStructure
class: Structure
builder:
class: Builder
model: SequenceRecognitionModel
model_args:
backbone: crnn_backbone
decoder: CRNNDecoder
decoder_args:
in_channels: 512
inner_channels: 256
need_reduce: False
charset: ^charset
representer:
class: CTCRepresenter
charset: ^charset
measurer:
class: SequenceRecognitionMeasurer
- name: 'Experiment'
class: Experiment
structure: ^BasicStructure
train:
class: TrainSettings
trainer_name: 'SequenceRecognizer'
data_loader: ^train_data
checkpoint:
class: Checkpoint
start_epoch: 0
start_iter: 0
resume: null
model_saver:
class: ModelSaver
dir_path: "./model"
save_interval: 8000
signal_path: null
scheduler:
class: OptimizerScheduler
optimizer: "Adam"
learning_rate:
class: MultiStepLR
milestones: [3, 4, 5]
gamma: 0.1
lr: 0.001
epochs: 5
validation: &validate
class: ValidationSettings
data_loaders:
iiit: ^iiit
interval: 8000
exempt: -1
evaluation: *validate
logger:
class: Logger
verbose: true
level: "info"
log_interval: 200