PaddleClas icon indicating copy to clipboard operation
PaddleClas copied to clipboard

通过paddleclas训练好的模型,怎么通过paddleserving进行部署呢,文档的例子跑通了,但是自己的模型报错,有没有基于自己训练好的模型进行部署的文档

Open simplemrchen opened this issue 2 years ago • 9 comments

欢迎您使用PaddleClas并反馈相关问题,非常感谢您对PaddleClas的贡献! 提出issue时,辛苦您提供以下信息,方便我们快速定位问题并及时有效地解决您的问题:

  1. PaddleClas版本以及PaddlePaddle版本:请您提供您使用的版本号或分支信息,如PaddleClas release/2.2和PaddlePaddle 2.1.0
  2. 涉及的其他产品使用的版本号:如您在使用PaddleClas的同时还在使用其他产品,如PaddleServing、PaddleInference等,请您提供其版本号
  3. 训练环境信息: a. 具体操作系统,如Linux/Windows/MacOS b. Python版本号,如Python3.6/7/8 c. CUDA/cuDNN版本, 如CUDA10.2/cuDNN 7.6.5等
  4. 完整的代码(相比于repo中代码,有改动的地方)、详细的错误信息及相关log

simplemrchen avatar Aug 22 '22 05:08 simplemrchen

可以提供一下具体信息吗?比如训练的什么模型,怎么训练的,部署报什么错?

weisy11 avatar Aug 22 '22 07:08 weisy11

我也一样的问题,我用paddleDetection 的 picodet_lcnet_x2_5_640_mainbody.yml 训练的主体检测,替换PaddleClas的主体检测,用PaddleServing 部署,启动成功,但是识别会报错: ERROR 2022-11-02 10:27:02,137 [error_catch.py:106] Log_id: 0 Traceback (most recent call last): File "/opt/miniconda3/envs/python38/lib/python3.8/site-packages/paddle_serving_server/pipeline/error_catch.py", line 97, in wrapper res = func(*args, **kw) File "/opt/miniconda3/envs/python38/lib/python3.8/site-packages/paddle_serving_server/pipeline/error_catch.py", line 160, in wrapper raise CustomException(CustomExceptionCode.INPUT_PARAMS_ERROR, "invalid arg list: {}".format(invalid_argument_list), True) paddle_serving_server.pipeline.error_catch.CustomException: exception_code: 5000 exception_type: INPUT_PARAMS_ERROR error_msg: invalid arg list: ['feed_batch'] is_send_to_user: True Classname: Op.process..feed_fetch_list_check_helper FunctionName: feed_fetch_list_check_helper Args: ([{'image': array([[[[-0.85067207, -0.87368345, -0.9159602 , ..., 0.73871917, 0.6908233 , 0.65630627], [-0.9155588 , -0.89061487, -0.8977108 , ..., 0.81830686, 0.77274287, 0.77310246], [-1.0158992 , -0.91679746, -0.8694901 , ..., 0.94138056, 0.8994226 , 0.9537151 ], ..., [-0.31679454, -0.31962603, -0.30576232, ..., 2.2489083 , 2.2489083 , 2.2489083 ], [-0.26662436, -0.31664717, -0.33037707, ..., 2.2489083 , 2.2489083 , 2.2489083 ], [-0.23418099, -0.31472084, -0.3462946 , ..., 2.2489083 , 2.2489083 , 2.2489083 ]],

    [[-0.407563  , -0.4193255 , -0.4409357 , ...,  0.81628597,
       0.7831868 ,  0.74789923],
     [-0.4672646 , -0.4344582 , -0.42227897, ...,  0.8976501 ,
       0.86911154,  0.873936  ],
     [-0.5595867 , -0.45785928, -0.39342833, ...,  1.023471  ,
       1.0019848 ,  1.0688382 ],
     ...,
     [ 0.01445149,  0.01155681,  0.01042202, ...,  2.4285715 ,
       2.4285715 ,  2.4285715 ],
     [ 0.04522552, -0.00591386, -0.02596185, ...,  2.4285715 ,
       2.4285715 ,  2.4285715 ],
     [ 0.06512605, -0.01721156, -0.04949009, ...,  2.4285715 ,
       2.4285715 ,  2.4285715 ]],

    [[ 1.1410894 ,  1.0474075 ,  0.9147822 , ...,  0.7037256 ,
       0.67077357,  0.6356428 ],
     [ 1.061841  ,  1.0258412 ,  0.93335605, ...,  0.7817357 ,
       0.75198245,  0.74791133],
     [ 0.939292  ,  0.99249125,  0.9620785 , ...,  0.9023699 ,
       0.87756324,  0.9215224 ],
     ...,
     [ 1.1086819 ,  1.1058002 ,  1.1122904 , ...,  2.6399999 ,
       2.6399999 ,  2.6399999 ],
     [ 1.1495317 ,  1.0986196 ,  1.0816531 , ...,  2.6399999 ,
       2.6399999 ,  2.6399999 ],
     [ 1.1759479 ,  1.0939761 ,  1.061841  , ...,  2.6399999 ,
       2.6399999 ,  2.6399999 ]]]], dtype=float32), 'im_shape': array([[640, 640]]), 'scale_factor': array([[1.70666667, 1.28      ]])}], ['multiclass_nms3_0.tmp_0'])

ERROR 2022-11-02 10:27:02,137 [operator.py:1079] [det] failed to predict. Log_id: 0 Raise_msg: invalid arg list ClassName: Op.process..feed_fetch_list_check_helper FunctionName: feed_fetch_list_check_helper. Please check the input dict and checkout PipelineServingLogs/pipeline.log for more details. INFO 2022-11-02 10:27:02,137 [operator.py:1454] prometheus inf count +1 ERROR 2022-11-02 10:27:02,138 [dag.py:418] (data_id=0 log_id=0) Failed to predict: [det] failed to predict. Log_id: 0 Raise_msg: invalid arg list ClassName: Op.process..feed_fetch_list_check_helper FunctionName: feed_fetch_list_check_helper. Please check the input dict and checkout PipelineServingLogs/pipeline.log for more details.

dougzhi avatar Nov 02 '22 07:11 dougzhi

+1

sunzhaoyang avatar Dec 19 '22 12:12 sunzhaoyang

+1 问题解决了嘛

fanruifeng avatar Jan 18 '23 01:01 fanruifeng

+1 问题解决了吗

HaoLiuHust avatar Apr 17 '23 08:04 HaoLiuHust

+1 问题解决了吗

输入层的名称有误

HaoLiuHust avatar Apr 20 '23 01:04 HaoLiuHust

Can you elaborate more on where and what changes to be done ?

vikhil0609 avatar May 05 '23 10:05 vikhil0609

+1 问题解决了吗

输入层的名称有误

I met the same error msg, finally I found the model input layer name is different to the previous one. After change it, the error disapear

HaoLiuHust avatar May 06 '23 01:05 HaoLiuHust

+1 问题解决了吗

2018-Summer avatar Jun 15 '23 09:06 2018-Summer