0

我正在努力在 NVIDIA Triton 推理服务器中运行姿势模型。模型(开放姿势,阿尔法姿势,HRNet ...等)正常加载,但后处理是问题

4

1 回答 1

0

您可以参考文档中的后处理脚本。他们给出了一个图像分类器的例子:image_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]))
于 2022-01-15T08:08:05.863 回答