Paddle2ONNX
Paddle2ONNX copied to clipboard
ppocr4 paddle转onnx模型后在cpu上的推理速度远大于在gpu的推理速度
用下面的三个命令生成ppocr4的onnx模型后,用cuda providers推理的速度很慢,用cpu providers推理的速度更快一些,请问是什么原因导致的呢?
paddle2onnx命令:
paddle2onnx --model_dir ch_PP-OCRv4_det_infer --model_filename inference.pdmodel --params_filename inference.pdiparams --save_file ppocr4_det_0926.onnx --opset_version 16 --enable_onnx_checker True
paddle2onnx --model_dir ch_PP-OCRv4_rec_infer --model_filename inference.pdmodel --params_filename inference.pdiparams --save_file ppocr4_rec_0926.onnx --opset_version 16 --enable_onnx_checker True
paddle2onnx --model_dir ch_ppocr_mobile_v2.0_cls_infer --model_filename inference.pdmodel --params_filename inference.pdiparams --save_file ppocr4_cls_0926.onnx --opset_version 16 --enable_onnx_checker True
遇到了一样的问题,cpu和GPU速度差不多
实际测试之后发现,在识别不同图片时会发生十几倍甚至几十倍的速度减慢 After actual testing, it was found that a dozen or even tens of times slowdown occurs when recognizing different images
我也遇到了 使用rust的ort在cpu上2秒,在gpu上10秒。
我也遇到了 使用rust的ort在cpu上2秒,在gpu上10秒。
如果你是在win上使用,可以考虑尝试一下使用directml推理,我尝试dml速度是正常的
检测慢第一次调用FFI很慢,后面识别的时候,不同文本有的快有的慢,随机的。
同一张图片第二次识别就会很快。但是换一张图片依旧很慢。
不知道是Onnx运行时的问题,还是转换成onnx的问题。
检测慢第一次调用FFI很慢,后面识别的时候,不同文本有的快有的慢,随机的。
同一张图片第二次识别就会很快。但是换一张图片依旧很慢。 不知道是Onnx运行时的问题,还是转换成onnx的问题。
是的,我跟你同样问题,使用cuda速度就是会很慢,甚至比不上CPU,但是使用directml之后速度就正常了
This issue is stale because it has been open for 30 days with no activity.
Still experiencing the problem, is there any possible solutions?
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
检测慢第一次调用FFI很慢,后面识别的时候,不同文本有的快有的慢,随机的。
同一张图片第二次识别就会很快。但是换一张图片依旧很慢。 不知道是Onnx运行时的问题,还是转换成onnx的问题。