PaddlePaddle / PaddleDetection

Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Apache License 2.0
12.79k stars 2.89k forks source link

paddle serving部署faster rcnn模型出错 #3700

Closed gss-bai closed 2 years ago

gss-bai commented 3 years ago

infer_cfg.yml文件如下:

use_python_inference: false
mode: fluid
draw_threshold: 0.5
metric: COCO
arch: RCNN
min_subgraph_size: 40
with_background: true
Preprocess:

is_channel_first: false
is_scale: true
mean:
0.485
0.456
0.406
std:
0.229
0.224
0.225
type: Normalize
interp: 1
max_size: 1333
target_size: 800
type: Resize
use_cv2: true
channel_first: true
to_bgr: false
type: Permute
stride: 32
type: PadStride
label_list:
background
hat
person
serving_client_conf.prototxt文件如下:
feed_var {
name: "image"
alias_name: "image"
is_lod_tensor: false
feed_type: 1
shape: 3
}
feed_var {
name: "im_info"
alias_name: "im_info"
is_lod_tensor: false
feed_type: 1
shape: 3
}
feed_var {
name: "im_size"
alias_name: "im_size"
is_lod_tensor: false
feed_type: 1
shape: 3
}
fetch_var {
name: "multiclass_nms_0.tmp_0"
alias_name: "multiclass_nms_0.tmp_0"
is_lod_tensor: true
fetch_type: 1
shape: -1
}

执行客户端预测报错:

shi@shi-B360M-D2V:~/Desktop/20201102/tree/hat_code/inference_model/model$ python3 ../../deploy/serving/test_client.py ../../demo/3512.jpg
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0715 15:20:19.053577 14249 naming_service_thread.cpp:209] brpc::policy::ListNamingService("127.0.0.1:9393"): added 1
W0715 15:20:19.217628 14249 init.cc:226] Warning: PaddlePaddle catches a failure signal, it may not work properly
W0715 15:20:19.217649 14249 init.cc:228] You could check whether you killed PaddlePaddle thread/process accidentally or report the case to PaddlePaddle
W0715 15:20:19.217653 14249 init.cc:231] The detail failure signal is:

W0715 15:20:19.217655 14249 init.cc:234] *** Aborted at 1626333619 (unix time) try "date -d @1626333619" if you are using GNU date ***
W0715 15:20:19.218354 14249 init.cc:234] PC: @ 0x0 (unknown)
W0715 15:20:19.218443 14249 init.cc:234] *** SIGSEGV (@0x60) received by PID 14249 (TID 0x7fc67df2f740) from PID 96; stack trace: ***
W0715 15:20:19.219072 14249 init.cc:234] @ 0x7fc67d9aa040 (unknown)
W0715 15:20:19.219252 14249 init.cc:234] @ 0x7fc5bd9499ab baidu::paddle_serving::general_model::PredictorClient::numpy_predict()
W0715 15:20:19.219409 14249 init.cc:234] @ 0x7fc5bd9623bb ZZN8pybind1112cpp_function10initializeIZN5baidu14paddle_serving13general_modelL28pybind11_init_serving_clientERNS_6moduleEEUlRNS4_15PredictorClientERKSt6vectorIS9_INS_7array_tIfLi16EEESaISB_EESaISD_EERKS9_ISsSaISsEERKS9_IS9_IiSaIiEESaISN_EERKS9_IS9_INSA_IlLi16EEESaISS_EESaISU_EESL_SR_SL_RNS4_12PredictorResERKiE12_iIS8_SH_SL_SR_SY_SL_SR_SL_S10_S12_EINS_4nameENS_9is_methodENS_7siblingENS_10call_guardIINS_18gil_scoped_releaseEEEEEEEvOT_PFT0_DpT1_EDpRKT2_ENUlRNS_6detail13function_callEE1_4_FUNES1N.51054
W0715 15:20:19.219579 14249 init.cc:234] @ 0x7fc5bd957db2 pybind11::cpp_function::dispatcher()
W0715 15:20:19.219713 14249 init.cc:234] @ 0x566bec _PyCFunction_FastCallDict
W0715 15:20:19.219835 14249 init.cc:234] @ 0x50a533 (unknown)
W0715 15:20:19.219952 14249 init.cc:234] @ 0x50bf44 _PyEval_EvalFrameDefault
W0715 15:20:19.220070 14249 init.cc:234] @ 0x507cd4 (unknown)
W0715 15:20:19.220188 14249 init.cc:234] @ 0x509a00 (unknown)
W0715 15:20:19.220304 14249 init.cc:234] @ 0x50a3fd (unknown)
W0715 15:20:19.220412 14249 init.cc:234] @ 0x50cd15 _PyEval_EvalFrameDefault
W0715 15:20:19.220527 14249 init.cc:234] @ 0x507cd4 (unknown)
W0715 15:20:19.220600 14249 init.cc:234] @ 0x50ae13 PyEval_EvalCode
W0715 15:20:19.220721 14249 init.cc:234] @ 0x635262 (unknown)
W0715 15:20:19.220825 14249 init.cc:234] @ 0x635317 PyRun_FileExFlags
W0715 15:20:19.220890 14249 init.cc:234] @ 0x638acf PyRun_SimpleFileExFlags
W0715 15:20:19.220984 14249 init.cc:234] @ 0x639671 Py_Main
W0715 15:20:19.221087 14249 init.cc:234] @ 0x4b0e40 main
W0715 15:20:19.221774 14249 init.cc:234] @ 0x7fc67d98cbf7 __libc_start_main
W0715 15:20:19.221845 14249 init.cc:234] @ 0x5b2f0a _start
W0715 15:20:19.222424 14249 init.cc:234] @ 0x0 (unknown)
Segmentation fault (core dumped)

请问该问题如何解决?

qingqing01 commented 3 years ago

辛苦提供下PaddleServing, PaddleDetection版本号吧

gss-bai commented 3 years ago

辛苦提供下PaddleServing,PaddleDetection版本号吧

paddledetection0.4 paddleserving0.3 模型是自己训练的

liuhuiCNN commented 3 years ago

辛苦提供下PaddleServing,PaddleDetection版本号吧

paddledetection0.4 paddleserving0.3 模型是自己训练的

您好,paddledetection0.4依赖paddle==1.8.5,需要使用paddleserving0.4.0。

bjjwwang commented 3 years ago

如果有0.4.0 PaddleDetection的本地预测更好,需要提前纪录下 本地预测前处理结束 预测之前的各个feed的shape还有value。 然后serving那一头也需要看看feed的shape还有value。 如果不一致的话要查前处理,一般来说可以直接从Detection搬过去用。

paddle-bot-old[bot] commented 2 years ago

Since this issue has not been updated for more than three months, it will be closed, if it is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up. It is recommended to pull and try the latest code first. 由于该问题超过三个月未更新,将会被关闭,若问题未解决或有后续问题,请随时重新打开(建议先拉取最新代码进行尝试),我们会继续跟进。