-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathdemo.py
More file actions
22 lines (14 loc) · 798 Bytes
/
Copy pathdemo.py
File metadata and controls
22 lines (14 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# -*- encoding: utf-8 -*-
# @Author: SWHL
# @Contact: liekkaskono@163.com
from paddleocr_convert import PaddleOCRModelConvert
converter = PaddleOCRModelConvert()
# converter('ch_PP-OCRv3_det_infer.tar', save_dir)
# url = 'https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_det_infer.tar'
# url = 'https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar'
url = "https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv5_mobile_det_infer.tar"
# url = "https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar"
save_dir = "models"
# txt_path = "https://gitee.com/paddlepaddle/PaddleOCR/raw/release/2.6/ppocr/utils/ppocr_keys_v1.txt"
result = converter(url, save_dir, is_del_raw=False)
print(result)