-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
paddleOCR在Linux下自动中断程序 #13941
Comments
在第二次启动测试时,Linux环境下会自动杀死程序且无任何报错,终端仅有“已杀死”显示 |
缺乏部分细节目前很难确定到具体的原因,这边建议是:请确定get_ocr函数是否会重复加载推理模型,一般来说ocr推理会话只建议构建一次。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🔎 Search before asking
🐛 Bug (问题描述)
碰到了一个问题:代码在本地Windows环境下运行的时候可以正常运行,并且在测试了一个视频后可以继续测试下一个,不会自动中断。
但是当我把代码放到Linux环境中,测试完一个视频后会自动中断,需要我通过手动启动代码的方式才能继续测试下一个视频
这个问题是当我将LPRNet识别车牌模型换成PaddleOCR模型之后才出现的,之前我用LPRNet来进行车牌识别没有这个问题,但是由于LPRNet识别车牌效果很差,所以换成效果更好的PaddleOCR。
Windows环境下的cuda为11.8,Linux为11.3
🏃♂️ Environment (运行环境)
OS Ubuntu 18
Python 3.8
PaddleOCR 2.8.1
CUDA 11.3
🌰 Minimal Reproducible Example (最小可复现问题的Demo)
def recognize_plate_single_image(plate_img):
ocr = get_ocr()
result = ocr.ocr(plate_img, det=False, cls=True)
if result:
text = result[0][0][0]
confidence = result[0][0][1]
return text, confidence
else:
return "未检测到", 0
@app.route('/car/recognize', methods=['POST'])
def recognize_car():
The text was updated successfully, but these errors were encountered: