-
Notifications
You must be signed in to change notification settings - Fork 252
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
pipline 部署 cascade 模型 http 分析了多张图像后报 Segmentation fault #1276
Comments
Message that will be displayed on users' first issue |
您好,今晚我复现一下。图片是公共数据集吗? |
好的,我训练的模型是自训练的,不知道paddle model zoo 中 cascade 模型是否可以复现,没测试! |
您好,我跑通了Serving目录下cascade示例在Pipeline上部署,你训练的模型是在Paddle 2.1上训练的吗?从报错信息上看是slice op运行报错,你看一下PipelineServingLogs/pipeline.log.wf里是否有更多的错误信息。打印一下image名称,image_shape, scale_factor,看下是否在特定图片报错,image_shape, scale_factor是否正确? |
感谢您的回复,在您的提示下,找到了原因,是 class CascadeBankOp(Op):
def init_op(self):
self.img_preprocess = Sequential([
BGR2RGB(), Div(255.0),
Normalize([0.4966, 0.4876, 0.4861], [0.0270, 0.0245, 0.0238], False),
Resize((720, 1280)), Transpose((2, 0, 1)), PadStride(32)
])
... 改正之后: class CascadeBankOp(Op):
def init_op(self):
self.img_preprocess = Sequential([
BGR2RGB(), Div(255.0),
Normalize([0.4966, 0.4876, 0.4861], [0.0270, 0.0245, 0.0238], False),
Resize((1280, 720)), Transpose((2, 0, 1)), PadStride(32)
]) 可以正常稳定运行了,再次感谢 🤙🏻🤙🏻🤙🏻 |
@TeslaZhao 您好,我这边又进行了批量图像分析测试,发现有一张图分析的时候仍然会导致段错误,看图像没什么异常,不知道为什么只有这一张图像有问题,单独只使用这一张图像调分析接口,返回的错误是: {
'err_no': 8,
'err_msg': "(data_id=0 log_id=0) [bank|0] Failed to postprocess: 'save_infer_model/scale_0.tmp_1.lod'",
'key': [],
'value': []
} 打印了下 {'save_infer_model/scale_0.tmp_1': array([[-1., 0., 0., 0., 0., 0.]], dtype=float32)} 确实是没有 {'save_infer_model/scale_0.tmp_1': array([[0.0000000e+00, 9.8990679e-01, 6.6382672e+02, 4.6241437e+02,
8.3422443e+02, 7.1902985e+02],
[1.0000000e+00, 7.3206198e-01, 6.5045532e+02, 6.0466644e+02,
7.2246985e+02, 7.0166632e+02]], dtype=float32), 'save_infer_model/scale_0.tmp_1.lod': array([0, 2], dtype=int32)} |
您好,从错误信息上看缺少模型结果缺少save_infer_model/scale_0.tmp_1.lod,您可以直接修改一下python3.7/site-packages/paddle_serving_app/reader/image_reader.py中_get_bbox_result的代码,判断lod存在在取值。至于为什么会出现lod不存在的情况,我们要和模型的同学反馈一下,再决定如何修改。 |
您好,这个问题原因找到了吗? |
如题,使用 pipline 的方式部署了 cascade 服务,使用 http 接口进行图像预测,使用多线程方式调接口,分析了多张图像之后出现段错误。
测试环境
web_service.py
config.yaml
错误信息
The text was updated successfully, but these errors were encountered: