Instructions to use PaddlePaddle/PP-OCRv6_tiny_det_onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PaddleOCR
How to use PaddlePaddle/PP-OCRv6_tiny_det_onnx with PaddleOCR:
# 1. See https://www.paddlepaddle.org.cn/en/install to install paddlepaddle # 2. pip install paddleocr from paddleocr import TextDetection model = TextDetection(model_name="PP-OCRv6_tiny_det_onnx") output = model.predict(input="path/to/image.png", batch_size=1) for res in output: res.print() res.save_to_img(save_path="./output/") res.save_to_json(save_path="./output/res.json") - Notebooks
- Google Colab
- Kaggle
Upload inference.yml with huggingface_hub
Browse files- inference.yml +52 -0
inference.yml
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Global:
|
| 2 |
+
model_name: PP-OCRv6_tiny_det
|
| 3 |
+
Hpi:
|
| 4 |
+
backend_configs:
|
| 5 |
+
paddle_infer:
|
| 6 |
+
trt_dynamic_shapes: &id001
|
| 7 |
+
x:
|
| 8 |
+
- - 1
|
| 9 |
+
- 3
|
| 10 |
+
- 32
|
| 11 |
+
- 32
|
| 12 |
+
- - 1
|
| 13 |
+
- 3
|
| 14 |
+
- 736
|
| 15 |
+
- 736
|
| 16 |
+
- - 1
|
| 17 |
+
- 3
|
| 18 |
+
- 4000
|
| 19 |
+
- 4000
|
| 20 |
+
tensorrt:
|
| 21 |
+
dynamic_shapes: *id001
|
| 22 |
+
PostProcess:
|
| 23 |
+
box_thresh: 0.4
|
| 24 |
+
max_candidates: 3000
|
| 25 |
+
name: DBPostProcess
|
| 26 |
+
thresh: 0.2
|
| 27 |
+
unclip_ratio: 1.4
|
| 28 |
+
PreProcess:
|
| 29 |
+
transform_ops:
|
| 30 |
+
- DecodeImage:
|
| 31 |
+
channel_first: false
|
| 32 |
+
img_mode: BGR
|
| 33 |
+
- DetLabelEncode: null
|
| 34 |
+
- DetResizeForTest: null
|
| 35 |
+
- NormalizeImage:
|
| 36 |
+
mean:
|
| 37 |
+
- 0.485
|
| 38 |
+
- 0.456
|
| 39 |
+
- 0.406
|
| 40 |
+
order: hwc
|
| 41 |
+
scale: 1./255.
|
| 42 |
+
std:
|
| 43 |
+
- 0.229
|
| 44 |
+
- 0.224
|
| 45 |
+
- 0.225
|
| 46 |
+
- ToCHWImage: null
|
| 47 |
+
- KeepKeys:
|
| 48 |
+
keep_keys:
|
| 49 |
+
- image
|
| 50 |
+
- shape
|
| 51 |
+
- polys
|
| 52 |
+
- ignore_tags
|