You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/features/depth_estimation.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,8 @@ Depth estimation predicts the per-pixel distance from the camera for every pixel
11
11
12
12
| Value | What happens |
13
13
|---|---|
14
-
|`"depth-anything/Depth-Anything-V2-Base-hf"`*(default)*| Downloads the vizion3D release checkpoint (`depth_anything_v2_vitb.pth`) to `~/.cache/vizion3d/models/` on first use, then loads it directly |
15
-
|Any other string | Passed through to Hugging Face `transformers.pipeline(task="depth-estimation", model=...)`|
14
+
|*(default)*| Downloads the vizion3D release checkpoint (`depth_anything_v2_vitb.pth`) to `~/.cache/vizion3d/models/` on first use, then loads it directly |
15
+
|An HTTPS URL ending in `.pth` or `.pt`| Downloaded to the cache directory on first use, then loaded as a Depth Anything V2 checkpoint|
16
16
| A local `.pth` or `.pt` file path | Loaded directly as a Depth Anything V2 checkpoint — never downloaded |
17
17
18
18
Models are kept in memory after the first inference in the current process. Subsequent calls to any `DepthEstimation` instance reuse the loaded weights.
@@ -28,7 +28,7 @@ Set `VIZION3D_MODEL_CACHE` in your environment to change the default cache direc
|`image_input`|`str \| bytes`|**Yes**| — | Image to process. Pass a file path string or raw image bytes. |
31
-
|`model_backend`|`str`| No |`"depth-anything/Depth-Anything-V2-Base-hf"`| Model backend identifier. See [Model backends](#model-backends) above. |
31
+
|`model_backend`|`str`| No |vizion3D release checkpoint URL| Model backend identifier. See [Model backends](#model-backends) above. |
32
32
|`return_depth_image`|`bool`| No |`False`| If `True`, the result includes a 16-bit grayscale Open3D Image of the depth map. |
33
33
|`return_point_cloud`|`bool`| No |`False`| If `True`, the result includes an Open3D PointCloud unprojected from the RGB-D image. |
34
34
|`return_mesh`|`bool`| No |`False`| If `True`, the result includes an Open3D TriangleMesh reconstructed from the point cloud via ball-pivoting. |
@@ -44,7 +44,7 @@ Set `VIZION3D_MODEL_CACHE` in your environment to change the default cache direc
44
44
|`depth_map`|`list[list[float]]`| Yes | Raw floating-point depth array, shape `[H][W]`. Values are relative (not metric) — closer objects have higher values for inverse-depth models. |
45
45
|`min_depth`|`float`| Yes | Minimum value in `depth_map`. |
46
46
|`max_depth`|`float`| Yes | Maximum value in `depth_map`. Guaranteed `max_depth >= min_depth`. |
47
-
|`backend_used`|`str`| Yes | Resolved model identifier that processed the request (local file path or HuggingFace model ID). |
47
+
|`backend_used`|`str`| Yes | Resolved model identifier that processed the request (local file path). |
48
48
|`depth_image`|`open3d.geometry.Image \| None`| When `return_depth_image=True`| 16-bit grayscale image, dtype `uint16`, shape `(H, W)`. The full 0–65535 range maps to `[min_depth, max_depth]`. |
49
49
|`point_cloud`|`open3d.geometry.PointCloud \| None`| When `return_point_cloud=True`| Coloured 3D point cloud unprojected from the RGB-D image using PrimeSense default intrinsics. Coordinates are in metres. |
50
50
|`mesh`|`open3d.geometry.TriangleMesh \| None`| When `return_mesh=True`| Triangle mesh surface reconstructed from the point cloud via ball-pivoting. Includes vertex colours. |
Copy file name to clipboardExpand all lines: docs/index.md
+118-4Lines changed: 118 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,22 +16,136 @@ Every task is accessible through three consumption modes driven by one shared CQ
16
16
17
17
Requires **Python 3.12** (Open3D constraint).
18
18
19
+
PyTorch is **not bundled** in the base install — choose the extra that matches your hardware (see [Hardware acceleration](#hardware-acceleration) below). For most users the `cpu` extra is the right default; it installs the standard PyTorch wheel which covers CPU, NVIDIA CUDA, and Apple Silicon MPS automatically.
20
+
19
21
**pip**
20
-
```bash
21
-
pip install vizion3d
22
+
```bash
23
+
pip install "vizion3d[cpu]"
22
24
```
23
25
24
26
**Poetry**
25
27
```bash
26
-
poetry add vizion3d
28
+
poetry add "vizion3d[cpu]"
27
29
```
28
30
29
31
**uv**
30
32
```bash
31
33
uv python pin 3.12
32
-
uv add vizion3d
34
+
uv add "vizion3d[cpu]"
35
+
```
36
+
37
+
---
38
+
39
+
## Hardware acceleration
40
+
41
+
vizion3d detects the best available device automatically at runtime — no code changes required. Choose the install extra that matches your hardware.
Works on every platform with no additional drivers. **This is the recommended install for most users.** Inference runs on PyTorch's CPU backend and automatically upgrades to NVIDIA CUDA or Apple Silicon MPS if detected at runtime — no separate install needed for those.
55
+
56
+
**pip**
57
+
```bash
58
+
pip install "vizion3d[cpu]"
59
+
```
60
+
61
+
**uv**
62
+
```bash
63
+
uv add "vizion3d[cpu]"
64
+
```
65
+
66
+
> **Mac M-series users:** the standard CPU extra automatically includes Metal Performance Shaders (MPS) support — no separate install needed. vizion3d will use your GPU via MPS as long as you are on macOS 12.3 or later with PyTorch ≥ 2.0.
67
+
68
+
---
69
+
70
+
### NVIDIA CUDA
71
+
72
+
Delivers the highest throughput for depth estimation. On NVIDIA Ampere GPUs and newer (RTX 30xx / A100 and above), PyTorch additionally uses Tensor Cores for mixed-precision acceleration.
Install CUDA and cuDNN **before** installing vizion3d. The PyTorch wheel bundled with the `cuda` extra already includes its own CUDA runtime libraries, but the driver must be present on the host.
83
+
84
+
**pip**
85
+
```bash
86
+
pip install "vizion3d[cuda]"
87
+
```
88
+
89
+
**uv**
90
+
```bash
91
+
uv add "vizion3d[cuda]"
92
+
```
93
+
94
+
vizion3d detects CUDA via `torch.cuda.is_available()` at runtime and moves models and tensors to the GPU automatically — no configuration needed.
95
+
96
+
---
97
+
98
+
### AMD ROCm
99
+
100
+
Provides GPU-accelerated inference on supported AMD GPUs using the ROCm open-source compute stack. ROCm exposes itself through PyTorch's CUDA namespace (`torch.cuda.is_available()` returns `True`), so vizion3d uses it transparently with no code changes.
101
+
102
+
> **Platform:** ROCm is supported on **Linux only**. There is no ROCm support for Windows or macOS.
103
+
104
+
#### Supported hardware
105
+
106
+
| Family | Examples |
107
+
|---|---|
108
+
| RDNA2 | RX 6700 XT, RX 6800, RX 6900 XT |
109
+
| RDNA3 | RX 7800 XT, RX 7900 XTX |
110
+
| CDNA | Instinct MI100 |
111
+
| CDNA2 | Instinct MI200 series |
112
+
| CDNA3 | Instinct MI300 series |
113
+
114
+
For the full supported GPU list see the [AMD ROCm hardware compatibility guide](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html).
115
+
116
+
#### Prerequisites
117
+
118
+
Install the ROCm stack on your system before installing the PyTorch ROCm wheel. Follow AMD's official guide:
119
+
120
+
-[ROCm installation for Linux](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/)
121
+
122
+
#### Install
123
+
124
+
Because the ROCm PyTorch wheel is hosted on PyTorch's own index (not PyPI), it must be installed **before** vizion3d — vizion3d's base install has no torch dependency and will not overwrite it.
For the full list of available ROCm wheel versions see [PyTorch ROCm install guide](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/install/3rd-party/pytorch-install.html#using-wheels-package).
133
+
134
+
**Step 2 — install vizion3d (no extra needed)**
135
+
```bash
136
+
pip install vizion3d
33
137
```
34
138
139
+
Because `vizion3d` declares no torch dependency in its base install, pip will not touch the ROCm wheel you installed in step 1.
140
+
141
+
> **Warning:** do **not** run `pip install "vizion3d[cpu]"` or `pip install "vizion3d[cuda]"` after installing the ROCm wheel — those extras pull a standard PyPI torch build and will replace your ROCm installation.
142
+
143
+
#### Limitations
144
+
145
+
- Linux only — ROCm does not run on Windows or macOS.
146
+
- Only GPUs on AMD's official support list are guaranteed to work; consumer RDNA1 cards (RX 5000 series) are not supported.
147
+
- Some PyTorch operations fall back to CPU on ROCm; performance for those ops will match CPU speed.
0 commit comments