Safetensors
tysirai
hosted
str/recognition
DAN-STR / config.json
Bekhouche's picture
Publish v1
7169733 verified
Raw History Blame Contribute Delete
2.81 kB
{
"schema": "graph/1",
"task": "str/recognition",
"inputs": {
"images": "image"
},
"nodes": {
"attention_module": {
"type": "str.CAMModel@1",
"args": {
"depth": 8,
"maxT": 25,
"num_channels": 64,
"scales": [
[
32,
16,
64
],
[
128,
8,
32
],
[
512,
8,
32
]
]
},
"inputs": {
"features": "feature_extraction:features"
},
"build": "class"
},
"feature_extraction": {
"type": "str.ResNet45Model@1",
"args": {
"compress_layer": false,
"return_multiscale": true,
"strides": [
[
1,
1
],
[
2,
2
],
[
1,
1
],
[
2,
2
],
[
1,
1
],
[
1,
1
]
]
},
"inputs": {
"images": "processing:pixels"
},
"build": "class"
},
"processing": {
"type": "str.ImageProcessor@1",
"args": {
"channels_size": 1,
"image_size": [
32,
128
],
"normalize": null,
"resize_method": "bilinear"
},
"inputs": {
"images": "images"
},
"build": "class"
},
"text_decoder": {
"type": "str.DTDModel@1",
"args": {
"dropout": 0.3,
"nchannel": 512,
"nclass": 38
},
"inputs": {
"features": "feature_extraction:features",
"attention": "attention_module:attention"
},
"build": "class"
},
"tokenizer": {
"type": "str.DANTokenizer@1",
"args": {
"case_sensitive": false,
"characters": [
"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",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"0"
]
},
"inputs": {
"predictions": "text_decoder:predictions",
"lengths": "text_decoder:lengths"
},
"build": "class"
}
},
"outputs": {
"text:labels": "tokenizer:labels",
"text:probabilities": "tokenizer:probabilities"
},
"params": {}
}