Files
FastDeploy/examples/vision/ocr/PP-OCRv3/rknpu2/python
Zheng-Bicheng 8c3ccc2cc2 [Hackathon 182 Model] Update PPOCRV3 For RKNPU2 (#1403)
* update ppocrv3 for rknpu2

* add config

* add config

* detele unuseful

* update useful results

* Repair note

* Repair note

* fixed bugs

* update
2023-02-27 15:01:17 +08:00
..

English | 简体中文

PPOCRv3 Python Deployment Example

Two steps before deployment

This directory provides examples that infer.py fast finishes the deployment of PPOCRv3 on CPU/GPU and GPU accelerated by TensorRT. The script is as follows

wget https://gitee.com/paddlepaddle/PaddleOCR/raw/release/2.6/doc/imgs/12.jpg
wget https://gitee.com/paddlepaddle/PaddleOCR/raw/release/2.6/ppocr/utils/ppocr_keys_v1.txt

# Download the example code for deployment
git clone https://github.com/PaddlePaddle/FastDeploy.git
cd examples/vision/ocr/PP-OCRv3/python/

python3 infer_static_shape.py \
                --det_model ./ch_PP-OCRv3_det_infer/ch_PP-OCRv3_det_infer.onnx \
                --cls_model ./ch_ppocr_mobile_v2.0_cls_infer/ch_ppocr_mobile_v2.0_cls_infer.onnx \
                --rec_model ./ch_PP-OCRv3_rec_infer/ch_PP-OCRv3_rec_infer.onnx \
                --rec_label_file ./ppocr_keys_v1.txt \
                --image 12.jpg \
                --device cpu

# NPU推理
python3 infer_static_shape.py \
                --det_model ./ch_PP-OCRv3_det_infer/ch_PP-OCRv3_det_infer_rk3588_unquantized.rknn \
                --cls_model ./ch_ppocr_mobile_v2.0_cls_infer/ch_ppocr_mobile_v20_cls_infer_rk3588_unquantized.rknn \
                --rec_model ./ch_PP-OCRv3_rec_infer/ch_PP-OCRv3_rec_infer_rk3588_unquantized.rknn \
                --rec_label_file ppocr_keys_v1.txt \
                --image 12.jpg \
                --device npu

The visualized result after running is as follows

Other Documents