| { |
| "inputs": [ |
| "images" |
| ], |
| "modules": { |
| "avg_pool": { |
| "config": { |
| "args": { |
| "output_size": [ |
| null, |
| 1 |
| ] |
| } |
| }, |
| "type": "DeepTextRecognition.AdaptiveAvgPoolModule" |
| }, |
| "feature_extraction": { |
| "config": { |
| "args": { |
| "input_channel": 1, |
| "output_channel": 512, |
| "variant": "DTRB" |
| } |
| }, |
| "type": "DeepTextRecognition.VGGModel" |
| }, |
| "permute": { |
| "config": { |
| "args": { |
| "dims": [ |
| 0, |
| 3, |
| 1, |
| 2 |
| ] |
| } |
| }, |
| "type": "DeepTextRecognition.PermuteModule" |
| }, |
| "prediction": { |
| "config": { |
| "args": { |
| "in_features": 512, |
| "out_features": 37 |
| } |
| }, |
| "type": "torch.nn.Linear" |
| }, |
| "processing": { |
| "config": { |
| "args": { |
| "channels_size": 1, |
| "image_size": [ |
| 32, |
| 100 |
| ], |
| "padding": "left" |
| } |
| }, |
| "type": "DeepTextRecognition.ImageProcessor" |
| }, |
| "squeeze": { |
| "config": { |
| "args": { |
| "dim": 3 |
| } |
| }, |
| "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", |
| "permute", |
| "avg_pool", |
| "squeeze", |
| "prediction", |
| "tokenizer" |
| ], |
| "outputs": [ |
| "tokenizer:labels" |
| ], |
| "routing": { |
| "avg_pool": { |
| "inputs": [ |
| "permute:permuted_features" |
| ], |
| "outputs": [ |
| "avg_pool:pooled_features" |
| ] |
| }, |
| "feature_extraction": { |
| "inputs": [ |
| "processing:processed_images" |
| ], |
| "outputs": [ |
| "feature_extraction:extracted_features" |
| ] |
| }, |
| "permute": { |
| "inputs": [ |
| "feature_extraction:extracted_features" |
| ], |
| "outputs": [ |
| "permute:permuted_features" |
| ] |
| }, |
| "prediction": { |
| "inputs": [ |
| "squeeze:squeezed_features" |
| ], |
| "outputs": [ |
| "prediction:predictions" |
| ] |
| }, |
| "processing": { |
| "inputs": [ |
| "images" |
| ], |
| "outputs": [ |
| "processing:processed_images" |
| ] |
| }, |
| "squeeze": { |
| "inputs": [ |
| "avg_pool:pooled_features" |
| ], |
| "outputs": [ |
| "squeeze:squeezed_features" |
| ] |
| }, |
| "tokenizer": { |
| "inputs": [ |
| "prediction:predictions" |
| ], |
| "outputs": [ |
| "tokenizer:labels" |
| ] |
| } |
| } |
| } |
|
|