Felix92 commited on
Commit
3fd7bd6
·
verified ·
1 Parent(s): 1c26b54

Add onnxtr-tablecenternet model

Browse files
Files changed (3) hide show
  1. README.md +56 -0
  2. config.json +21 -0
  3. model.onnx +3 -0
README.md ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - fr
5
+ license: apache-2.0
6
+ tags:
7
+ - ocr
8
+ - onnx
9
+ - onnxtr
10
+ - table_structure
11
+ ---
12
+
13
+ <p align="center">
14
+ <img src="https://github.com/felixdittrich92/OnnxTR/raw/main/docs/images/logo.jpg" width="40%">
15
+ </p>
16
+
17
+ **Optical Character Recognition made seamless & accessible to anyone, powered by Onnxruntime**
18
+
19
+ ## Task: table_structure
20
+
21
+ https://github.com/felixdittrich92/OnnxTR
22
+
23
+ ### Example usage:
24
+
25
+ ```python
26
+ >>> from onnxtr.io import DocumentFile
27
+ >>> from onnxtr.models import ocr_predictor, from_hub
28
+
29
+ >>> img = DocumentFile.from_images(['<image_path>'])
30
+ >>> # Load your model from the hub
31
+ >>> model = from_hub('onnxtr/my-model')
32
+
33
+ >>> # Pass it to the predictor
34
+ >>> # If your model is a recognition model:
35
+ >>> predictor = ocr_predictor(det_arch='db_mobilenet_v3_large',
36
+ >>> reco_arch=model)
37
+
38
+ >>> # If your model is a detection model:
39
+ >>> predictor = ocr_predictor(det_arch=model,
40
+ >>> reco_arch='crnn_mobilenet_v3_small')
41
+
42
+ >>> # Get your predictions
43
+ >>> res = predictor(img)
44
+ ```
45
+
46
+ ### Layout / table structure models
47
+
48
+ ```python
49
+ >>> from onnxtr.models import from_hub, layout_predictor, table_predictor
50
+
51
+ >>> model = from_hub('onnxtr/my-model')
52
+ >>> # If your model is a layout model:
53
+ >>> predictor = layout_predictor(arch=model)
54
+ >>> # If your model is a table structure model:
55
+ >>> predictor = table_predictor(arch=model)
56
+ ```
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.8.1/tablecenternet-2c8de407.onnx",
18
+ "url_8_bit": null,
19
+ "arch": "tablecenternet",
20
+ "task": "table_structure"
21
+ }
model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2c8de4071c98e6c8084dbdd5a7968081ad4504f407e20432766b206d663efb70
3
+ size 29372386