76、迁移飞浆PaddlePaddle的PP-LCNet_x1_0_doc_ori到onnx、mnn、ncnn、昇腾平台
基本思想:迁移飞浆PaddlePaddle的PP-LCNet_x1_0_doc_ori到onnx、mnn、ncnn、昇腾平台
一、测试模型效果
#模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('PaddlePaddle/PP-LCNet_x1_0_doc_ori',cache_dir=".")from paddleocr import DocImgOrientationClassificationmodel = DocImgOrientationClassification(model_name="PP-LCNet_x1_0_doc_ori")
output = model.predict("img_rot180_demo.jpg", batch_size=1)
for res in output:res.print(json_format=False)res.save_to_img("./output/demo.png")res.save_to_json("./output/res.json")
测试结果
/usr/bin/python3.8 /home/ubuntu/Downloads/Digital_Tube/datasets/code_student.py
Do