在NVIDIA Triton推理服务器中,我在运行位姿模型。模型(开放姿态,阿尔法姿势,HRNet .正常加载,但后处理是问题所在。
发布于 2022-01-15 08:08:05
您可以参考文档中的后处理脚本。他们给出了一个图像分类器的例子:client.py
def postprocess(results, output_name, batch_size, batching):
"""
Post-process results to show classifications.
"""
output_array = results.as_numpy(output_name)
if len(output_array) != batch_size:
raise Exception("expected {} results, got {}".format(
batch_size, len(output_array)))
# Include special handling for non-batching models
for results in output_array:
if not batching:
results = [results]
for result in results:
if output_array.dtype.type == np.object_:
cls = "".join(chr(x) for x in result).split(':')
else:
cls = result.split(':')
print(" {} ({}) = {}".format(cls[0], cls[1], cls[2]))https://stackoverflow.com/questions/70200437
复制相似问题