File size: 3,414 Bytes
eace6e1
 
 
 
 
 
 
 
 
 
 
9b115de
eace6e1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
library_name: onnx
license: mit
tags:
  - foundation
  - amd
  - rocm
  - pose-estimation
pipeline_tag: keypoint-detection
---

![](https://huggingface.co/AMD-PAVS-AI/HRNet/resolve/main/HrNet.png)

# HRNet: Optimized for AMD ROCm

HRNet (High-Resolution Network, W48 variant) is a human pose-estimation model that predicts COCO body keypoints while maintaining high-resolution feature representations throughout the network. This repository packages inference for human pose estimation using **ONNX Runtime**, exported and validated for **AMD ROCm** so it runs efficiently on AMD GPUs, CPUs, and NPUs.

This is based on the implementation of HRNet found [here](https://github.com/leoxiaobin/deep-high-resolution-net.pytorch).
This repository contains configurations and scripts optimized for **AMD® ROCm™** platforms. You can use the [HRNet AMD scripts](https://github.com/AMD-PAVS/physical_ai_sdk/blob/main/models/HRNet) to reproduce results or export with custom configurations.

---

## Task Overview

**Task:** Human pose estimation (keypoint detection)

**Dataset:** COCO 2017 keypoints (val2017 images + person-keypoint annotations, under `dataset/coco/`)

**Output metrics:** Throughput (inferences/sec), latency (mean/P95/P99 ms), per-operator profiling breakdown

> **NPU note:** The NPU (VitisAI) backend accepts FP32 input and auto-quantizes internally; there is no separate FP16/BF16/INT8 NPU path.

---

## AMD ROCm Optimization

This model export has been adapted and validated for **AMD Instinct™ / Radeon™ GPUs** running **ROCm**, as well as AMD CPUs and AMD Ryzen AI NPUs. Key points:

- Validated backends: **ONNX Runtime** across CPU, GPU (MIGraphX), and NPU (VitisAI) execution providers.
- CPU workflows run on any machine; GPU requires ROCm and a compatible AMD GPU; NPU requires an AMD Ryzen AI device.

| Runtime | Precision | Backend | Hardware | Notes |
|---|---|---|---|---|
| ONNX Runtime | FP32 / FP16 / BF16 / INT8 | CPU Execution Provider | AMD CPU | — |
| ONNX Runtime | FP32 / FP16 / BF16 / INT8 | MIGraphX Execution Provider | AMD Instinct™ / Radeon™ GPU (ROCm) | — |
| ONNX Runtime | FP32 | VitisAI Execution Provider | AMD Ryzen AI NPU | Accepts FP32 input; VitisAI quantizes internally |

---

## Getting Started

For setup instructions, evaluation scripts, and custom configuration options, see the [HRNet on GitHub](https://github.com/AMD-PAVS/physical_ai_sdk/blob/main/models/HRNet).

---

## Model Details

**Model Type:** Human pose estimation (keypoint detection), HRNet-W48

**Base Model:** `pose_hrnet_w48_384x288.pth` (HRNet W48, 384×288 input resolution)

**Model Stats:**
- Model variant: W48, 384×288 input resolution
- Precision tested: FP32, FP16, BF16, INT8 (CPU/GPU); FP32 auto-quantized (NPU)

---

## Accuracy Pipeline

Accuracy evaluation is not yet implemented for this model.

---

## Dig Deeper

Want to explore the full evaluation scripts, config options, and other AMD-optimized model examples?

📂 **[View the full project on GitHub](https://github.com/AMD-PAVS/physical_ai_sdk/blob/main/models/HRNet)**

The GitHub repository includes:
- Benchmark and profiling scripts for CPU, GPU, and NPU
- Instructions for downloading pretrained weights and COCO keypoint annotations
- The upstream HRNet repository clone and native NMS extension build steps
- Manual PyTorch/ONNX accuracy validation scripts (COCO AP/AR via `pycocotools`)