File size: 3,370 Bytes
492332d 02212c2 492332d | 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 | ---
library_name: onnx
license: apache-2.0
tags:
- foundation
- amd
- rocm
- image-classification
pipeline_tag: image-classification
---

# ResNet-50: Optimized for AMD ROCm
ResNet-50 is a 50-layer deep residual network for image classification over the 1000 ImageNet categories. This repository packages inference for image classification 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 ResNet-50 found [here](https://huggingface.co/microsoft/resnet-50).
This repository contains configurations and scripts optimized for **AMD® ROCm™** platforms. You can use the [resnet-50 AMD scripts](https://github.com/AMD-PAVS/physical_ai_sdk/blob/main/models/resnet-50) to reproduce results or export with custom configurations.
---
## Task Overview
**Task:** Image classification
**Dataset:** ImageNet-1000 label space (a small sample set is staged under `dataset/samples/` for visual evaluation)
**Output metrics:** Throughput (inferences/sec), latency (mean/P95/P99 ms), per-operator profiling breakdown
---
## 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 (native execution provider), GPU (MIGraphX execution provider, ROCm-based), and NPU (VitisAI execution provider).
- No code changes required versus the upstream `microsoft/resnet-50` export — only environment/runtime configuration differs.
- CPU fallback path supported for environments without a ROCm-capable GPU.
| 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 [resnet-50 on GitHub](https://github.com/AMD-PAVS/physical_ai_sdk/blob/main/models/resnet-50).
---
## Model Details
**Model Type:** Image classification, ResNet-50 (50-layer deep residual network)
**Base Model:** `microsoft/resnet-50` (ResNet-50, ImageNet-1000)
**Model Stats:**
- Input resolution: 224×224 (`pixel_values`: `(batch, 3, 224, 224)`; `logits` output: `(batch, 1000)`)
- 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/resnet-50)**
The GitHub repository includes:
- Benchmark and profile scripts for CPU, GPU, and NPU (including AI Analyzer profiling)
- ONNX export and pretrained weight download automation
- Sample-image evaluation with annotated top-prediction overlays
- `make metrics` aggregation into `METRICS_TABLE.md`
|