| { | |
| "inputs": [ | |
| "images" | |
| ], | |
| "modules": { | |
| "lmim_encoder": { | |
| "config": { | |
| "args": { | |
| "depth": 12, | |
| "embed_dim": 384, | |
| "img_size": [ | |
| 32, | |
| 128 | |
| ], | |
| "in_chans": 3, | |
| "mlp_ratio": 4.0, | |
| "norm_layer_eps": 1e-06, | |
| "num_heads": 6, | |
| "patch_size": 4 | |
| } | |
| }, | |
| "type": "DeepTextRecognition.models.lmim.MAEEncoderModel" | |
| }, | |
| "text_decoder": { | |
| "config": { | |
| "args": { | |
| "bidirectional": true, | |
| "dropout": 0.1, | |
| "hidden_sizes": [ | |
| 256, | |
| 256 | |
| ], | |
| "input_size": 384, | |
| "num_layers": 2, | |
| "output_size": 95 | |
| } | |
| }, | |
| "type": "DeepTextRecognition.BiLSTMModel" | |
| }, | |
| "tokenizer": { | |
| "config": { | |
| "args": { | |
| "characters": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~", | |
| "max_length": 25 | |
| } | |
| }, | |
| "type": "DeepTextRecognition.CTCTokenizer" | |
| } | |
| }, | |
| "order": [ | |
| "lmim_encoder", | |
| "text_decoder", | |
| "tokenizer" | |
| ], | |
| "outputs": [ | |
| "tokenizer:labels", | |
| "lmim_encoder:visual_features" | |
| ], | |
| "routing": { | |
| "lmim_encoder": { | |
| "inputs": [ | |
| "images" | |
| ], | |
| "outputs": [ | |
| "lmim_encoder:visual_features", | |
| "lmim_encoder:mask", | |
| "lmim_encoder:ids_restore" | |
| ] | |
| }, | |
| "text_decoder": { | |
| "inputs": [ | |
| "lmim_encoder:visual_features" | |
| ], | |
| "outputs": [ | |
| "text_decoder:text_predictions" | |
| ] | |
| }, | |
| "tokenizer": { | |
| "inputs": [ | |
| "text_decoder:text_predictions" | |
| ], | |
| "outputs": [ | |
| "tokenizer:labels" | |
| ] | |
| } | |
| } | |
| } | |