Instructions to use Bekhouche/MORAN-STR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Bekhouche/MORAN-STR with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Bekhouche/MORAN-STR", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "inputs": [ | |
| "images" | |
| ], | |
| "modules": { | |
| "asrn_recognition": { | |
| "config": { | |
| "args": { | |
| "BidirDecoder": true, | |
| "imgH": 32, | |
| "nc": 1, | |
| "nclass": 37, | |
| "nh": 256 | |
| } | |
| }, | |
| "type": "DeepTextRecognition.CustomASRNModel" | |
| }, | |
| "morn_rectification": { | |
| "config": { | |
| "args": { | |
| "nc": 1, | |
| "targetH": 32, | |
| "targetW": 100 | |
| } | |
| }, | |
| "type": "DeepTextRecognition.CustomMORNModel" | |
| }, | |
| "processing": { | |
| "config": { | |
| "args": { | |
| "channels_size": 1, | |
| "image_size": [ | |
| 32, | |
| 100 | |
| ], | |
| "normalize": [ | |
| 0.5, | |
| 0.5 | |
| ], | |
| "padding": "none", | |
| "resize_method": "bilinear" | |
| } | |
| }, | |
| "type": "DeepTextRecognition.ImageProcessor" | |
| }, | |
| "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": 20, | |
| "separator": ":" | |
| } | |
| }, | |
| "type": "DeepTextRecognition.AttentionTokenizerModel" | |
| } | |
| }, | |
| "order": [ | |
| "processing", | |
| "morn_rectification", | |
| "asrn_recognition", | |
| "tokenizer" | |
| ], | |
| "outputs": [ | |
| "tokenizer:labels" | |
| ], | |
| "routing": { | |
| "asrn_recognition": { | |
| "inputs": [ | |
| "morn_rectification:rectified_images" | |
| ], | |
| "outputs": [ | |
| "asrn_recognition:logits" | |
| ] | |
| }, | |
| "morn_rectification": { | |
| "inputs": [ | |
| "processing:processed_images" | |
| ], | |
| "outputs": [ | |
| "morn_rectification:rectified_images" | |
| ] | |
| }, | |
| "processing": { | |
| "inputs": [ | |
| "images" | |
| ], | |
| "outputs": [ | |
| "processing:processed_images" | |
| ] | |
| }, | |
| "tokenizer": { | |
| "inputs": [ | |
| "asrn_recognition:logits" | |
| ], | |
| "outputs": [ | |
| "tokenizer:labels" | |
| ] | |
| } | |
| } | |
| } | |