PaddlePaddle / PaddleOCR

Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
https://paddlepaddle.github.io/PaddleOCR/
Apache License 2.0
42.57k stars 7.67k forks source link

在使用官方的牌照检测demo时,使用--use_tensorrt 时出现错误 #11864

Closed weiming12345 closed 4 months ago

weiming12345 commented 5 months ago

请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem

请尽量不要包含图片在问题中/Please try to not include the image in the issue. 在网上查了也不知到时什么问题,请问一下这是什么问题

TingquanGao commented 5 months ago

麻烦提供一下参考文档、运行命令、报错信息

weiming12345 commented 5 months ago

参考文档: https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/applications/%E8%BD%BB%E9%87%8F%E7%BA%A7%E8%BD%A6%E7%89%8C%E8%AF%86%E5%88%AB.md 运行命令: python3 tools/infer/predict_system.py --det_model_dir=output/CCPD/det/infer/ --rec_model_dir=output/CCPD/rec/infer/ --image_dir="CCPD2020/CCPD2020/ccpd_green/yuv" --rec_image_shape=3,48,320 --use_gpu=true --use_tensorrt=true

报错信息: Traceback (most recent call last): File "tools/infer/predict_system.py", line 294, in main(args) File "tools/infer/predict_system.py", line 151, in main text_sys = TextSystem(args) File "tools/infer/predict_system.py", line 47, in init self.text_recognizer = predict_rec.TextRecognizer(args) File "/media/abc/286A809E6A806B00/paddle/PaddleOCR/PaddleOCR/tools/infer/predict_rec.py", line 127, in init utility.create_predictor(args, 'rec', logger) File "/media/abc/286A809E6A806B00/paddle/PaddleOCR/PaddleOCR/tools/infer/utility.py", line 280, in create_predictor predictor = inference.create_predictor(config) RuntimeError: (NotFound) Attribute beta is not found. [Hint: Expected it != runtimeattrs.end(), but received it == runtimeattrs.end().] (at /home/paddle/data/xly/workspace/24116/Paddle/paddle/fluid/framework/op_desc.cc:793)

weiming12345 commented 5 months ago

还有这个文档: https://github.com/PaddlePaddle/PaddleOCR/blob/dygraph/deploy/Jetson/readme_ch.md

TingquanGao commented 5 months ago

建议使用以下版本再试试: PaddlePaddle: 2.3 paddleslim: 2.2.2 PaddleOCR: Release/2.5

参考: https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/applications/%E8%BD%BB%E9%87%8F%E7%BA%A7%E8%BD%A6%E7%89%8C%E8%AF%86%E5%88%AB.md#2-%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA