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/api/lifting.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,14 @@ Input contract for the depth estimation task. All inference parameters are decla
20
20
21
21
---
22
22
23
+
## DepthEstimationAdvanceConfig
24
+
25
+
Camera intrinsics and depth range settings. Pass an instance of this model as `advanced_config` on `DepthEstimationCommand` to override the PrimeSense defaults used for point cloud unprojection.
Output contract returned by `DepthEstimation.run()`. All fields are always present; optional geometry fields are `None` when the corresponding `return_*` flag was not set.
|*(default)*| Downloads the vizion3D release checkpoint (`depth_anything_v2_vitb.pth`) to `~/.cache/vizion3d/models/` on first use, then loads it directly |
@@ -32,6 +41,7 @@ Set `VIZION3D_MODEL_CACHE` in your environment to change the default cache direc
32
41
|`return_depth_image`|`bool`| No |`False`| If `True`, the result includes a 16-bit grayscale Open3D Image of the depth map. |
33
42
|`return_point_cloud`|`bool`| No |`False`| If `True`, the result includes an Open3D PointCloud unprojected from the RGB-D image. |
34
43
|`return_mesh`|`bool`| No |`False`| If `True`, the result includes an Open3D TriangleMesh reconstructed from the point cloud via ball-pivoting. |
44
+
|`advanced_config`|`DepthEstimationAdvanceConfig`| No | PrimeSense defaults | Camera intrinsics and depth range settings. See [Advanced config](#10-advanced-config-camera-intrinsics-depth-range) below. |
35
45
36
46
---
37
47
@@ -46,7 +56,7 @@ Set `VIZION3D_MODEL_CACHE` in your environment to change the default cache direc
46
56
|`max_depth`|`float`| Yes | Maximum value in `depth_map`. Guaranteed `max_depth >= min_depth`. |
47
57
|`backend_used`|`str`| Yes | Resolved model identifier that processed the request (local file path). |
48
58
|`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
-
|`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. |
59
+
|`point_cloud`|`open3d.geometry.PointCloud \| None`| When `return_point_cloud=True`| Coloured 3D point cloud unprojected from the RGB-D image using the intrinsics in `advanced_config`. Coordinates are in metres. |
50
60
|`mesh`|`open3d.geometry.TriangleMesh \| None`| When `return_mesh=True`| Triangle mesh surface reconstructed from the point cloud via ball-pivoting. Includes vertex colours. |
51
61
|`point_cloud_scale`|`float`| Yes | Scale factor: multiply any distance measured between two points in the point cloud by this value to get the equivalent distance in metres. Always `1.0` — Open3D produces point cloud coordinates directly in metres. |
## 10. Advanced config: camera intrinsics & depth range
336
+
337
+
`DepthEstimationAdvanceConfig` lets you supply the actual camera intrinsics and depth range for your sensor, replacing the built-in PrimeSense defaults. This is required for accurate metric 3D geometry when your camera is not a 640×480 PrimeSense sensor.
338
+
339
+
```python
340
+
from vizion3d.lifting import (
341
+
DepthEstimation,
342
+
DepthEstimationAdvanceConfig,
343
+
DepthEstimationCommand,
344
+
)
345
+
346
+
result = DepthEstimation().run(
347
+
DepthEstimationCommand(
348
+
image_input="scene.png",
349
+
return_point_cloud=True,
350
+
advanced_config=DepthEstimationAdvanceConfig(
351
+
fx=909.15,
352
+
fy=908.48,
353
+
cx=640.0,
354
+
cy=360.0,
355
+
depth_trunc=6.0,
356
+
),
357
+
)
358
+
)
359
+
```
360
+
361
+
The same config is available in the REST and gRPC entry points. See [Advanced Config](depth_estimation_advanced_config.md) for the full field reference, formulas, entry-point examples, and camera presets.
362
+
363
+
---
364
+
297
365
## Known limitations
298
366
299
367
-**Relative depth only** — the default monocular backend produces relative (inverse) depth, not metric depth. Point cloud distances are internally consistent but not calibrated to real-world scale without a known reference distance.
300
-
-**Fixed camera intrinsics** — point cloud unprojection uses `PrimeSenseDefault` (640×480) intrinsics regardless of input image resolution. For accurate metric geometry, supply real camera intrinsics.
301
368
-**Ball-pivoting mesh quality** — the mesh reconstructor works best on dense, evenly sampled point clouds. Sparse or noisy clouds may produce gaps or missing faces.
302
369
-**Python 3.12 required for Open3D** — `return_depth_image`, `return_point_cloud`, and `return_mesh` require Open3D, which currently only supports Python 3.12 in this project.
0 commit comments