|
{ |
|
"inputs": [ |
|
"images" |
|
], |
|
"modules": { |
|
"feature_extraction": { |
|
"config": { |
|
"args": { |
|
"leakyRelu": false, |
|
"nc": 1, |
|
"nh": 256 |
|
} |
|
}, |
|
"type": "DeepTextRecognition.CustomCNNv1" |
|
}, |
|
"permute": { |
|
"config": { |
|
"args": { |
|
"dims": [ |
|
2, |
|
0, |
|
1 |
|
] |
|
} |
|
}, |
|
"type": "DeepTextRecognition.PermuteModule" |
|
}, |
|
"permute_2": { |
|
"config": { |
|
"args": { |
|
"dims": [ |
|
1, |
|
0, |
|
2 |
|
] |
|
} |
|
}, |
|
"type": "DeepTextRecognition.PermuteModule" |
|
}, |
|
"processing": { |
|
"config": { |
|
"args": { |
|
"channels_size": 1, |
|
"image_size": [ |
|
32, |
|
100 |
|
], |
|
"normalize": [ |
|
0.5, |
|
0.5 |
|
], |
|
"padding": "none", |
|
"resize_method": "bilinear" |
|
} |
|
}, |
|
"type": "DeepTextRecognition.ImageProcessor" |
|
}, |
|
"sequence_modeling": { |
|
"config": { |
|
"args": { |
|
"hidden_sizes": [ |
|
256 |
|
], |
|
"input_size": 512, |
|
"output_size": 37, |
|
"use_sequence_first": true |
|
} |
|
}, |
|
"type": "DeepTextRecognition.BiLSTMModel" |
|
}, |
|
"squeeze": { |
|
"config": { |
|
"args": { |
|
"dim": 2 |
|
} |
|
}, |
|
"type": "DeepTextRecognition.SqueezeModule" |
|
}, |
|
"tokenizer": { |
|
"config": { |
|
"args": { |
|
"characters": [ |
|
"0", |
|
"1", |
|
"2", |
|
"3", |
|
"4", |
|
"5", |
|
"6", |
|
"7", |
|
"8", |
|
"9", |
|
"a", |
|
"b", |
|
"c", |
|
"d", |
|
"e", |
|
"f", |
|
"g", |
|
"h", |
|
"i", |
|
"j", |
|
"k", |
|
"l", |
|
"m", |
|
"n", |
|
"o", |
|
"p", |
|
"q", |
|
"r", |
|
"s", |
|
"t", |
|
"u", |
|
"v", |
|
"w", |
|
"x", |
|
"y", |
|
"z" |
|
], |
|
"max_length": 25 |
|
} |
|
}, |
|
"type": "DeepTextRecognition.CTCTokenizer" |
|
} |
|
}, |
|
"order": [ |
|
"processing", |
|
"feature_extraction", |
|
"squeeze", |
|
"permute", |
|
"sequence_modeling", |
|
"permute_2", |
|
"tokenizer" |
|
], |
|
"outputs": [ |
|
"tokenizer:labels" |
|
], |
|
"routing": { |
|
"feature_extraction": { |
|
"inputs": [ |
|
"processing:processed_images" |
|
], |
|
"outputs": [ |
|
"feature_extraction:extracted_features" |
|
] |
|
}, |
|
"permute": { |
|
"inputs": [ |
|
"squeeze:squeezed_features" |
|
], |
|
"outputs": [ |
|
"permute:permuted_features" |
|
] |
|
}, |
|
"permute_2": { |
|
"inputs": [ |
|
"sequence_modeling:modeled_features" |
|
], |
|
"outputs": [ |
|
"permute_2:permuted_features" |
|
] |
|
}, |
|
"processing": { |
|
"inputs": [ |
|
"images" |
|
], |
|
"outputs": [ |
|
"processing:processed_images" |
|
] |
|
}, |
|
"sequence_modeling": { |
|
"inputs": [ |
|
"permute:permuted_features" |
|
], |
|
"outputs": [ |
|
"sequence_modeling:modeled_features" |
|
] |
|
}, |
|
"squeeze": { |
|
"inputs": [ |
|
"feature_extraction:extracted_features" |
|
], |
|
"outputs": [ |
|
"squeeze:squeezed_features" |
|
] |
|
}, |
|
"tokenizer": { |
|
"inputs": [ |
|
"permute_2:permuted_features" |
|
], |
|
"outputs": [ |
|
"tokenizer:labels" |
|
] |
|
} |
|
} |
|
} |
|
|