Skip to content

关于ppyoloe serving pipeline部署只输出一个检测框的bug问题及临时修补方法。 #1948

Closed
@wj920291253

Description

在/usr/local/lib/python3.6/site-packages/paddle_serving_server/pipeline/operator.py文件中,
midped_batch, error_code, error_info = self.process(
feed_batch, typical_logid)
通过上述命令获得的预测结果midped_batch正常,所有检测框数据都在,但在

normal tensor

                for idx, data_id in enumerate(data_ids):
                    start = input_offset_dict[data_id][0]
                    end = input_offset_dict[data_id][1]
                    midped_data_dict[data_id][name] = value[start:end]

进行筛选时,由于输入部分,只输入一张图片,data_ids=[0],
for data_id in data_ids:
start = cur_offset
for key, val in preped_data_dict[data_id].items():
if isinstance(val, (list, np.ndarray)):
cur_offset += len(val)
else:
cur_offset += 1
break
input_offset_dict[data_id] = [start, cur_offset]
导致input_offset_dict是一个[0,1]的列表,则检测框取值只取了第一个检测框。
具体产生原因没搞懂= =
改成midped_data_dict[data_id][name] = value则解决此问题。
results [{'bbox': (array([[ 0. , 0.8911667, 358.67282 , 21.874176 , 487.72583 ,
590.9016 ]], dtype=float32), [6]), 'im_id': array([[0]])}]
-------》
results [{'bbox': (array([[0.0000000e+00, 8.9116669e-01, 3.5867282e+02, 2.1874176e+01,
4.8772583e+02, 5.9090161e+02],
[0.0000000e+00, 8.7308830e-01, 5.3001239e+02, 3.1271460e+02,
5.9980963e+02, 5.2793616e+02],
[0.0000000e+00, 8.1745487e-01, 9.1202881e+01, 2.7218240e+02,
1.6436841e+02, 5.3688599e+02],
...,
[1.9000000e+01, 6.6376023e-02, 3.6651331e+02, 2.2170178e+02,
3.9852289e+02, 2.4392216e+02],
[1.9000000e+01, 5.9004810e-02, 3.7924310e+02, 2.1985689e+02,
3.9876065e+02, 2.3381659e+02],
[1.9000000e+01, 5.6407396e-02, 3.4724228e+02, 2.5580838e+02,
3.8182556e+02, 2.7566129e+02]], dtype=float32), [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6]), 'im_id': array([[0]])}]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions