dd02 setting tune + change Class name from UVUnrollFrameProcessor to FrameUnwarper
This commit is contained in:
+7
-16
@@ -54,15 +54,6 @@ import orisys
|
||||
print(orisys.__version__)
|
||||
```
|
||||
|
||||
5 安装opencl(实验):
|
||||
|
||||
在不带nvidia显卡的设备,可选择通过opencl进行gpu 计算加速,需要确保opencl的库或驱动已经安装,然后在conda环境中安装依赖:
|
||||
|
||||
``` bash
|
||||
pip install pyopencl
|
||||
conda install conda-forge::pyvkfft
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
## `Sensor` 类别
|
||||
@@ -245,32 +236,32 @@ flow = sensor.read_info(sensor.info.VRAW)
|
||||
***
|
||||
***
|
||||
|
||||
## `orisys.finger` 指纹 UV pipeline
|
||||
## `orisys.finger` 手指 UV pipeline
|
||||
|
||||
`examples/finger_pipeline.py` 展示了一个更适合指纹/单相机场景的高层 API:
|
||||
`examples/finger_pipeline.py` 展示了一个更适合手指/单相机场景的高层 API:
|
||||
|
||||
1. 使用 `FingerRuntime.open()` 打开视频源、加载 Blender 导出的资产,并构建 UV 展开映射。
|
||||
2. 用 `grab_and_process()` 或 `read_source() + process_frame()` 获取一帧展开后的触觉图像。
|
||||
3. 通过 `runtime.tactile`(`TactileProcessor`)调用 `compute_deformation()`、`compute_contact()`、`read_info()`。
|
||||
4. 退出前调用 `runtime.close()` 释放视频源和内部 `Sensor` 资源。
|
||||
|
||||
相比直接使用 `Sensor`,`FingerRuntime` 已封装了视频读取、相机尺寸设置、UV 展开和有效区域掩码传递,更适合作为指纹 2D/3D 示例与上层应用的入口。
|
||||
相比直接使用 `Sensor`,`FingerRuntime` 已封装了视频读取、相机尺寸设置、UV 展开和有效区域掩码传递,更适合作为手指 2D/3D 示例与上层应用的入口。
|
||||
|
||||
### 1. `FingerRuntime.open` 方法
|
||||
|
||||
#### 描述
|
||||
|
||||
创建一个可复用的指纹 UV runtime。该方法会完成以下初始化:
|
||||
创建一个可复用的手指 UV runtime。该方法会完成以下初始化:
|
||||
|
||||
- 解析 `export_dir` 下的 `mesh.npz`、`camera_intrinsics.npz`、`world_to_cam.npy`
|
||||
- 根据配置和标定信息构建/加载 `unroll_map_uv.npz`
|
||||
- 打开相机或视频文件
|
||||
- 创建内部 `Sensor("external", ...)`
|
||||
- 创建 `UVUnrollFrameProcessor` 与 `TactileProcessor`
|
||||
- 创建 `FrameUnwarper` 与 `TactileProcessor`
|
||||
|
||||
#### 输入参数
|
||||
|
||||
* **export_dir** (`str`,可选): 指纹导出资产目录,默认值来自 `orisys.finger.DEFAULT_FINGER_EXPORT_DIR`。目录下通常需要包含 `mesh.npz`、`camera_intrinsics.npz`、`world_to_cam.npy`。
|
||||
* **export_dir** (`str`,可选): 手指导出资产目录,默认值来自 `orisys.finger.DEFAULT_FINGER_EXPORT_DIR`。目录下通常需要包含 `mesh.npz`、`camera_intrinsics.npz`、`world_to_cam.npy`。
|
||||
* **config** (`str`,可选): Orisys 配置文件路径,默认 `./config/dd02-ov.json`。
|
||||
* **map_cache** (`str`,可选): UV 展开缓存文件路径,默认值来自 `orisys.finger.DEFAULT_FINGER_MAP_CACHE`。
|
||||
* **source_scale** (`float`,可选): 输入相机分辨率缩放比例;未提供时根据配置自动推断。
|
||||
@@ -402,7 +393,7 @@ runtime = FingerRuntime.open(
|
||||
|
||||
除 `push_frame()` / `warmup()` 之外,`TactileProcessor` 的 `compute_deformation()`、`compute_contact()`、`read_info()`、`reset()` 调用方式与 `Sensor` 基本一致,因此可直接复用前文 `Sensor` 章节中的参数说明。
|
||||
|
||||
### 10. 最小指纹 pipeline 示例
|
||||
### 10. 最小手指 pipeline 示例
|
||||
|
||||
下面的流程与 `examples/finger_pipeline.py` 一致:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user