оценка позы на сервере вывода Triton
Я борюсь с запуском моделей поз на сервере вывода NVIDIA Triton. Модель (открытая поза, альфа-поза, HRNet и т. д.) загружается нормально, но проблема заключается в постобработке.
1 ответ
Вы можете обратиться к сценарию постобработки в документации. Они дали пример для классификатора изображений: 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]))