File size: 3,187 Bytes
48f92fa
 
 
 
 
 
 
 
 
 
 
c59ad14
48f92fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
library_name: onnx
license: other
tags:
  - foundation
  - amd
  - rocm
  - depth-estimation
pipeline_tag: depth-estimation
---

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

# Bi3D: Optimized for AMD ROCm

Bi3D performs stereo depth estimation by reformulating disparity search as a sequence of binary classifications over a cost volume, with optional 3D regularization for sub-pixel continuous depth. This repository packages evaluation/inference for stereo depth / disparity estimation using ONNX Runtime, MIGraphX EP, and VitisAI EP, exported and validated for **AMD ROCm** so it runs efficiently on AMD GPUs, CPUs, and NPUs.

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

---

## Task Overview

**Task:** Stereo depth / disparity estimation

**Dataset:** SceneFlow FlyingThings3D TEST (cleanpass WebP; bundled 10-pair subset committed in-repo)

**Output metrics:** EPE (End-Point Error, mean absolute disparity error in pixels)

> **NPU note:** Uses VitisAI EP auto-partitioning with per-dtype `config/vitisai_config_*.json` files.

---

## AMD ROCm Optimization

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

- Validated backends: **ONNX Runtime** (CPU), **MIGraphX EP** (GPU), and **VitisAI EP** (NPU).

| Runtime | Precision | Backend | Hardware | Notes |
|---|---|---|---|---|
| CPU | FP32 / FP16 / BF16 | ONNX Runtime | AMD RYZEN AI MAX+ 395 w/ Radeon 8060S | — |
| GPU | FP32 / FP16 / BF16 | MIGraphX EP | AMD RYZEN AI MAX+ 395 w/ Radeon 8060S | — |
| NPU | FP32 / FP16 / BF16 | VitisAI EP | AMD RYZEN AI MAX+ 395 w/ Radeon 8060S | Auto-partitioning via per-dtype `config/vitisai_config_*.json` |

---

## Getting Started

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

---

## Model Details

**Model Type:** Stereo depth estimation (binary classification over a disparity cost volume, with 3D regularization for continuous depth)

**Base Model:** SceneFlow-trained continuous depth 3D + confidence regularization checkpoint (NVIDIA Bi3D)

**Model Stats:**
- Model variant: continuous depth 3D + confidence regularization (default checkpoint)
- Input resolution: 288×480 (cropped from the original 540×960 to fit device memory constraints)
- Precision tested: FP32, FP16, BF16

---

## 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/bi3d)**

The GitHub repository includes:
- Setup and prerequisites for ROCm environments
- Scripts for the supported runners
- Additional model variants and datasets
- Benchmarking and reproduction instructions