2021-04-06 11:14:30 +08:00
|
|
|
_base_ = [
|
2021-11-25 16:27:45 +08:00
|
|
|
'../../_base_/default_runtime.py',
|
|
|
|
'../../_base_/schedules/schedule_adam_step_6e.py',
|
|
|
|
'../../_base_/recog_pipelines/nrtr_pipeline.py',
|
|
|
|
'../../_base_/recog_datasets/ST_MJ_train.py',
|
|
|
|
'../../_base_/recog_datasets/academic_test.py'
|
2021-04-06 11:14:30 +08:00
|
|
|
]
|
|
|
|
|
2021-11-25 16:27:45 +08:00
|
|
|
train_list = {{_base_.train_list}}
|
|
|
|
test_list = {{_base_.test_list}}
|
|
|
|
|
|
|
|
train_pipeline = {{_base_.train_pipeline}}
|
|
|
|
test_pipeline = {{_base_.test_pipeline}}
|
|
|
|
|
2021-04-06 11:14:30 +08:00
|
|
|
label_convertor = dict(
|
|
|
|
type='AttnConvertor', dict_type='DICT90', with_unknown=True)
|
|
|
|
|
|
|
|
model = dict(
|
|
|
|
type='NRTR',
|
|
|
|
backbone=dict(
|
|
|
|
type='ResNet31OCR',
|
|
|
|
layers=[1, 2, 5, 3],
|
|
|
|
channels=[32, 64, 128, 256, 512, 512],
|
|
|
|
stage4_pool_cfg=dict(kernel_size=(2, 1), stride=(2, 1)),
|
2021-04-07 10:19:36 +08:00
|
|
|
last_stage_pool=False),
|
2021-12-04 17:12:31 +08:00
|
|
|
encoder=dict(type='NRTREncoder'),
|
|
|
|
decoder=dict(type='NRTRDecoder'),
|
2021-04-06 11:14:30 +08:00
|
|
|
loss=dict(type='TFLoss'),
|
|
|
|
label_convertor=label_convertor,
|
|
|
|
max_seq_len=40)
|
|
|
|
|
|
|
|
data = dict(
|
2021-07-16 15:06:36 +08:00
|
|
|
samples_per_gpu=64,
|
2021-04-06 11:14:30 +08:00
|
|
|
workers_per_gpu=4,
|
2021-07-03 16:03:37 +08:00
|
|
|
train=dict(
|
|
|
|
type='UniformConcatDataset',
|
2021-11-25 16:27:45 +08:00
|
|
|
datasets=train_list,
|
2021-07-03 16:03:37 +08:00
|
|
|
pipeline=train_pipeline),
|
2021-04-06 11:14:30 +08:00
|
|
|
val=dict(
|
2021-07-03 16:03:37 +08:00
|
|
|
type='UniformConcatDataset',
|
2021-11-25 16:27:45 +08:00
|
|
|
datasets=test_list,
|
2021-07-03 16:03:37 +08:00
|
|
|
pipeline=test_pipeline),
|
2021-04-06 11:14:30 +08:00
|
|
|
test=dict(
|
2021-07-03 16:03:37 +08:00
|
|
|
type='UniformConcatDataset',
|
2021-11-25 16:27:45 +08:00
|
|
|
datasets=test_list,
|
2021-07-03 16:03:37 +08:00
|
|
|
pipeline=test_pipeline))
|
2021-04-06 11:14:30 +08:00
|
|
|
|
|
|
|
evaluation = dict(interval=1, metric='acc')
|