frozenlo / PaddleOCRV4-TensorRT

Using ch_PP-OCRv4 model with tensorrt
1 stars 0 forks source link

I Wonder how to download det_model.onnx and rec_model.onnx? Thank you a lot in advance! #1

Open newforrestgump001 opened 3 weeks ago

newforrestgump001 commented 3 weeks ago

I Wonder how to download det_model.onnx and rec_model.onnx? Thank you a lot in advance!

frozenlo commented 2 weeks ago

It is tranformed from paddleocr model, u should download paddleocr first, and then use commands below. paddle2onnx --model_dir ./whl/det/ch/ch_PP-OCRv4_det_server_infer --model_filename inference.pdmodel --params_filename inference.pdiparams --save_file ./det_model.onnx --opset_version 16 --input_shape_dict="{'x':[-1,3,-1,-1]}" --enable_onnx_checker True

paddle2onnx --model_dir ./whl/rec/ch/ch_PP-OCRv4_rec_server_infer --model_filename inference.pdmodel --params_filename inference.pdiparams --save_file ./rec_model.onnx --opset_version 16 --input_shape_dict="{'x':[-1,3,-1,-1]}" --enable_onnx_checker True

paddle2onnx --model_dir ./whl/cls/ch_ppocr_mobile_v2.0_cls_infer --model_filename inference.pdmodel --params_filename inference.pdiparams --save_file ./cls_model.onnx --opset_version 16 --input_shape_dict="{'x':[-1,3,-1,-1]}" --enable_onnx_checker True

frozenlo commented 2 weeks ago

I can upload an english version for u.

[Uploading models.zip…]()