{ "schema": "graph/1", "task": "str/recognition", "inputs": { "images": "image" }, "nodes": { "avg_pool": { "type": "str.AdaptiveAvgPoolModule@1", "args": { "output_size": [ null, 1 ] }, "inputs": { "x": "permute:out" }, "build": "class" }, "feature_extraction": { "type": "str.ResNetModel@1", "args": { "input_channel": 1, "output_channel": 512, "variant": "DTRB" }, "inputs": { "images": "processing:pixels" }, "build": "class" }, "permute": { "type": "str.PermuteModule@1", "args": { "dims": [ 0, 3, 1, 2 ] }, "inputs": { "x": "feature_extraction:features" }, "build": "class" }, "prediction": { "type": "str.SRNDecoder@1", "args": { "N_max_character": 26, "n_class": 38, "n_position": 26 }, "inputs": { "features": "sequence_modeling:features" }, "build": "class" }, "processing": { "type": "str.ImageProcessor@1", "args": { "channels_size": 1, "image_size": [ 32, 100 ], "normalize": [ 0.5, 0.5 ] }, "inputs": { "images": "images" }, "build": "class" }, "sequence_modeling": { "type": "str.TransformerEncoderv1@1", "args": { "d_inner": 1024, "d_k": 64, "d_model": 512, "d_v": 64, "dropout": 0.1, "n_head": 8, "n_layers": 2, "n_position": 26 }, "inputs": { "features": "squeeze:out" }, "build": "class" }, "squeeze": { "type": "str.SqueezeModule@1", "args": { "dim": 3 }, "inputs": { "x": "avg_pool:out" }, "build": "class" }, "tokenizer": { "type": "str.SRNTokenizer@1", "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, "pad_token": 36 }, "inputs": { "logits": "prediction:logits" }, "build": "class" } }, "outputs": { "text:labels": "tokenizer:labels" }, "params": {} }