PPOCR_v5

This version of PPOCR_v5 has been converted to run on the Axera NPU using w8a16 quantization.

This model has been optimized with the following LoRA:

Compatible with Pulsar2 version: 4.1-patch1

Convert tools links:

For those who are interested in model conversion, you can try to export axmodel through

Support Platform

Chips model cost
PP-OCRv5_mobile_det 16.8ms
AX650 PP-OCRv5_mobile_rec 1.4ms
PP-LCNet_x0_25_textline_ori 0.17ms
PP-OCRv5_mobile_det 121.7ms
AX630C PP-OCRv5_mobile_rec 17.8ms
PP-LCNet_x0_25_textline_ori 0.9ms

How to use

Download all files from this repository to the device


root@ax650:~/PPOCR_v5# tree
.
|-- ax650
|   `-- det.axmodel
|   `-- rec.axmodel
|   `-- cls.axmodel
|-- infer_onnx.py
|-- infer_axmodel.py
|-- 11.jpg
`-- res_onnx.jpg
`-- res_ax.jpg

Inference

Input image:

Inference with AX650 Host, such as M4N-Dock(爱芯派Pro)

root@ax650:~/PPOCR_v5# python3 infer_axmodel.py
[INFO] Available providers:  ['AxEngineExecutionProvider']
[INFO] Using provider: AxEngineExecutionProvider
[INFO] Chip type: ChipType.MC50
[INFO] VNPU type: VNPUType.DISABLED
[INFO] Engine version: 2.12.0s
[INFO] Model type: 2 (triple core)
[INFO] Compiler version: 4.2 b98901c3
[INFO] Using provider: AxEngineExecutionProvider
[INFO] Model type: 0 (single core)
[INFO] Compiler version: 4.2 b98901c3
[INFO] Using provider: AxEngineExecutionProvider
[INFO] Model type: 2 (triple core)
[INFO] Compiler version: 4.2 b98901c3
[[[22.0, 32.0], [307.0, 32.0], [307.0, 77.0], [22.0, 77.0]], ('纯臻营养护发素', 0.9881175756454468)]
[[[24.0, 80.0], [174.0, 80.0], [174.0, 105.0], [24.0, 105.0]], ('产品信息/参数', 0.9941993951797485)]
[[[25.0, 110.0], [333.0, 110.0], [333.0, 135.0], [25.0, 135.0]], ('(45元/每公斤,100公斤起订)', 0.9549185633659363)]
[[[24.0, 140.0], [283.0, 142.0], [283.0, 167.0], [24.0, 165.0]], ('每瓶22元,1000瓶起订)', 0.9522098898887634)]
[[[23.0, 175.0], [302.0, 174.0], [302.0, 197.0], [23.0, 198.0]], ('【品牌】:代加工方式/OEMODM', 0.98729008436203)]
[[[24.0, 206.0], [235.0, 208.0], [235.0, 229.0], [24.0, 228.0]], ('【品名】:纯臻营养护发素', 0.9895920753479004)]
[[[26.0, 238.0], [242.0, 238.0], [242.0, 259.0], [26.0, 259.0]], ('【产品编号】:YM-X-3011', 0.9853904843330383)]
[[[412.0, 233.0], [430.0, 233.0], [430.0, 303.0], [412.0, 303.0]], ('ODMOEM', 0.8154547810554504)]
[[[24.0, 269.0], [181.0, 268.0], [181.0, 289.0], [25.0, 290.0]], ('【净含量】:220ml', 0.9779437780380249)]
[[[24.0, 300.0], [253.0, 301.0], [253.0, 322.0], [24.0, 321.0]], ('【适用人群】:适合所有肤质', 0.9893492460250854)]
[[[24.0, 331.0], [345.0, 332.0], [345.0, 354.0], [24.0, 352.0]], ('【主要成分】:鲸蜡硬脂醇、燕麦β-葡聚', 0.9715114235877991)]
[[[26.0, 364.0], [283.0, 364.0], [283.0, 384.0], [26.0, 384.0]], ('糖、椰油酰胺丙基甜菜碱、泛醌', 0.9863923192024231)]
[[[367.0, 366.0], [476.0, 366.0], [476.0, 388.0], [367.0, 388.0]], ('(成品包材)', 0.8738409876823425)]
[[[25.0, 394.0], [362.0, 394.0], [362.0, 416.0], [25.0, 416.0]], ('【主要功能】:可紧致头发磷层,从而达到', 0.9911136627197266)]
[[[27.0, 426.0], [373.0, 426.0], [373.0, 447.0], [27.0, 447.0]], ('即时持久改善头发光泽的效果,给干燥的头', 0.9935663342475891)]
[[[26.0, 457.0], [137.0, 457.0], [137.0, 478.0], [26.0, 478.0]], ('发足够的滋养', 0.9879047274589539)]

Output image:

Downloads last month
19
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support