Add onnxtr-db-mobilenet-v3-large model
Browse files- README.md +37 -0
- config.json +21 -0
- model.onnx +3 -0
README.md
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
language: en
|
4 |
+
---
|
5 |
+
|
6 |
+
<p align="center">
|
7 |
+
<img src="https://github.com/felixdittrich92/OnnxTR/raw/main/docs/images/logo.jpg" width="40%">
|
8 |
+
</p>
|
9 |
+
|
10 |
+
**Optical Character Recognition made seamless & accessible to anyone, powered by Onnxruntime**
|
11 |
+
|
12 |
+
## Task: detection
|
13 |
+
|
14 |
+
https://github.com/felixdittrich92/OnnxTR
|
15 |
+
|
16 |
+
### Example usage:
|
17 |
+
|
18 |
+
```python
|
19 |
+
>>> from onnxtr.io import DocumentFile
|
20 |
+
>>> from onnxtr.models import ocr_predictor, from_hub
|
21 |
+
|
22 |
+
>>> img = DocumentFile.from_images(['<image_path>'])
|
23 |
+
>>> # Load your model from the hub
|
24 |
+
>>> model = from_hub('onnxtr/my-model')
|
25 |
+
|
26 |
+
>>> # Pass it to the predictor
|
27 |
+
>>> # If your model is a recognition model:
|
28 |
+
>>> predictor = ocr_predictor(det_arch='db_mobilenet_v3_large',
|
29 |
+
>>> reco_arch=model)
|
30 |
+
|
31 |
+
>>> # If your model is a detection model:
|
32 |
+
>>> predictor = ocr_predictor(det_arch=model,
|
33 |
+
>>> reco_arch='crnn_mobilenet_v3_small')
|
34 |
+
|
35 |
+
>>> # Get your predictions
|
36 |
+
>>> res = predictor(img)
|
37 |
+
```
|
config.json
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"input_shape": [
|
3 |
+
3,
|
4 |
+
1024,
|
5 |
+
1024
|
6 |
+
],
|
7 |
+
"mean": [
|
8 |
+
0.798,
|
9 |
+
0.785,
|
10 |
+
0.772
|
11 |
+
],
|
12 |
+
"std": [
|
13 |
+
0.264,
|
14 |
+
0.2749,
|
15 |
+
0.287
|
16 |
+
],
|
17 |
+
"url": "https://github.com/felixdittrich92/OnnxTR/releases/download/v0.2.0/db_mobilenet_v3_large-4987e7bd.onnx",
|
18 |
+
"url_8_bit": "https://github.com/felixdittrich92/OnnxTR/releases/download/v0.2.0/db_mobilenet_v3_large_static_8_bit-535a6f25.onnx",
|
19 |
+
"arch": "db_mobilenet_v3_large",
|
20 |
+
"task": "detection"
|
21 |
+
}
|
model.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4987e7bdea372559808bd5add85fda10e179dc639696fb489e59a197a25b4c64
|
3 |
+
size 16076965
|