Skip to content

Commit fe01d73

Browse files
committed
[update] upload depth_anything docs
1 parent 7dfd1aa commit fe01d73

2 files changed

Lines changed: 344 additions & 0 deletions

File tree

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
# llm-depth_anything
2+
3+
depth_anything visual unit, used to provide image depth information.
4+
5+
## setup
6+
7+
Configuring the unit to work.
8+
9+
Send JSON:
10+
11+
```json
12+
{
13+
"request_id": "4",
14+
"work_id": "depth_anything",
15+
"action": "setup",
16+
"object": "depth_anything.setup",
17+
"data": {
18+
"model": "depth-anything-ax630c",
19+
"response_format": "jpeg.base64.stream",
20+
"input": "camera.1001",
21+
"enoutput": true
22+
}
23+
}
24+
```
25+
26+
- request_id: Reference basic data explanation.
27+
- work_id: When configuring the unit, it is `depth_anything`.
28+
- action: The method called is `setup`.
29+
- object: The data type being transmitted is `depth_anything.setup`.
30+
- model: The model used is the `depth_anything` model.
31+
- response_format: The return result is `jpeg.base64.stream`.
32+
- input: The input is `camera.1001`, which refers to the input from the camera unit, as detailed in the camera unit
33+
documentation.
34+
- enoutput: Whether to enable the user result output.
35+
36+
Response JSON:
37+
38+
```json
39+
{
40+
"created": 1737601952,
41+
"data": "None",
42+
"error": {
43+
"code": 0,
44+
"message": ""
45+
},
46+
"object": "None",
47+
"request_id": "4",
48+
"work_id": "depth_anything.1007"
49+
}
50+
```
51+
52+
- created: Message creation time, in Unix time.
53+
- work_id: The work_id of the successfully created unit.
54+
55+
> **When the input is `camera.1001`, the camera unit must already be configured and in working status. The JSON
56+
configuration for the camera unit is as follows:**
57+
58+
```json
59+
{
60+
"request_id": "4",
61+
"work_id": "camera",
62+
"action": "setup",
63+
"object": "camera.setup",
64+
"data": {
65+
"response_format": "camera.raw",
66+
"input": "/dev/video0",
67+
"enoutput": false,
68+
"frame_width": 384,
69+
"frame_height": 256
70+
}
71+
}
72+
```
73+
74+
## exit
75+
76+
Unit exit.
77+
78+
Send JSON:
79+
80+
```json
81+
{
82+
"request_id": "7",
83+
"work_id": "depth_anything.1007",
84+
"action": "exit"
85+
}
86+
```
87+
88+
Response JSON:
89+
90+
```json
91+
{
92+
"created": 1737603622,
93+
"data": "None",
94+
"error": {
95+
"code": 0,
96+
"message": ""
97+
},
98+
"object": "None",
99+
"request_id": "7",
100+
"work_id": "depth_anything.1007"
101+
}
102+
```
103+
104+
error::code 0 indicates successful execution.
105+
106+
## taskinfo
107+
108+
Get task list.
109+
110+
Send JSON:
111+
112+
```json
113+
{
114+
"request_id": "2",
115+
"work_id": "depth_anything",
116+
"action": "taskinfo"
117+
}
118+
```
119+
120+
Response JSON:
121+
122+
```json
123+
{
124+
"created": 1737601986,
125+
"data": [
126+
"depth_anything.1007"
127+
],
128+
"error": {
129+
"code": 0,
130+
"message": ""
131+
},
132+
"object": "depth_anything.tasklist",
133+
"request_id": "2",
134+
"work_id": "depth_anything"
135+
}
136+
```
137+
138+
Get task running parameters.
139+
140+
Send JSON:
141+
142+
```json
143+
{
144+
"request_id": "2",
145+
"work_id": "depth_anything.1007",
146+
"action": "taskinfo"
147+
}
148+
```
149+
150+
Response JSON:
151+
152+
```json
153+
{
154+
"created": 1737602022,
155+
"data": {
156+
"enoutput": true,
157+
"inputs": [
158+
"camera.1001"
159+
],
160+
"model": "depth-anything-ax630c",
161+
"response_format": "jpeg.base64.stream"
162+
},
163+
"error": {
164+
"code": 0,
165+
"message": ""
166+
},
167+
"object": "depth_anything.taskinfo",
168+
"request_id": "2",
169+
"work_id": "depth_anything.1007"
170+
}
171+
```
172+
173+
> **Note: The work_id increases according to the order of unit initialization and is not a fixed index value.**
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
# llm-depth_anything
2+
3+
depth_anything 视觉单元,用于提供图片深度信息。
4+
5+
## setup
6+
7+
配置单元工作。
8+
9+
发送 json:
10+
11+
```json
12+
{
13+
"request_id": "4",
14+
"work_id": "depth_anything",
15+
"action": "setup",
16+
"object": "depth_anything.setup",
17+
"data": {
18+
"model": "depth-anything-ax630c",
19+
"response_format": "jpeg.base64.stream",
20+
"input": "camera.1001",
21+
"enoutput": true
22+
}
23+
}
24+
```
25+
26+
- request_id:参考基本数据解释。
27+
- work_id:配置单元时,为 `depth_anything`
28+
- action:调用的方法为 `setup`
29+
- object:传输的数据类型为 `depth_anything.setup`
30+
- model:使用的模型为 `depth_anything` 模型。
31+
- response_format:返回结果为 `jpeg.base64.stream`
32+
- input:输入的为 `camera.1001`,代表的是从 camera 单元内部输入,详见 camera 单位文档。
33+
- enoutput:是否启用用户结果输出。
34+
35+
响应 json:
36+
37+
```json
38+
{
39+
"created": 1737601952,
40+
"data": "None",
41+
"error": {
42+
"code": 0,
43+
"message": ""
44+
},
45+
"object": "None",
46+
"request_id": "4",
47+
"work_id": "depth_anything.1007"
48+
}
49+
```
50+
51+
- created:消息创建时间,unix 时间。
52+
- work_id:返回成功创建的 work_id 单元。
53+
54+
> **输入为 `camera.1001` 时必须保证 camera 单元此时已经配置好进入工作状态。camera 单元配置的 json 参考如下**
55+
56+
```json
57+
{
58+
"request_id": "4",
59+
"work_id": "camera",
60+
"action": "setup",
61+
"object": "camera.setup",
62+
"data": {
63+
"response_format": "camera.raw",
64+
"input": "/dev/video0",
65+
"enoutput": false,
66+
"frame_width": 384,
67+
"frame_height": 256
68+
}
69+
}
70+
```
71+
72+
## exit
73+
74+
单元退出。
75+
76+
发送 json:
77+
78+
```json
79+
{
80+
"request_id": "7",
81+
"work_id": "depth_anything.1007",
82+
"action": "exit"
83+
}
84+
```
85+
86+
响应 json:
87+
88+
```json
89+
{
90+
"created": 1737603622,
91+
"data": "None",
92+
"error": {
93+
"code": 0,
94+
"message": ""
95+
},
96+
"object": "None",
97+
"request_id": "7",
98+
"work_id": "depth_anything.1007"
99+
}
100+
```
101+
102+
error::code 为 0 表示执行成功。
103+
104+
## taskinfo
105+
106+
获取任务列表。
107+
108+
发送 json:
109+
110+
```json
111+
{
112+
"request_id": "2",
113+
"work_id": "depth_anything",
114+
"action": "taskinfo"
115+
}
116+
```
117+
118+
响应 json:
119+
120+
```json
121+
{
122+
"created": 1737601986,
123+
"data": [
124+
"depth_anything.1007"
125+
],
126+
"error": {
127+
"code": 0,
128+
"message": ""
129+
},
130+
"object": "depth_anything.tasklist",
131+
"request_id": "2",
132+
"work_id": "depth_anything"
133+
}
134+
```
135+
136+
获取任务运行参数。
137+
138+
发送 json:
139+
140+
```json
141+
{
142+
"request_id": "2",
143+
"work_id": "depth_anything.1007",
144+
"action": "taskinfo"
145+
}
146+
```
147+
148+
响应 json:
149+
150+
```json
151+
{
152+
"created": 1737602022,
153+
"data": {
154+
"enoutput": true,
155+
"inputs": [
156+
"camera.1001"
157+
],
158+
"model": "depth-anything-ax630c",
159+
"response_format": "jpeg.base64.stream"
160+
},
161+
"error": {
162+
"code": 0,
163+
"message": ""
164+
},
165+
"object": "depth_anything.taskinfo",
166+
"request_id": "2",
167+
"work_id": "depth_anything.1007"
168+
}
169+
```
170+
171+
> **注意:work_id 是按照单元的初始化注册顺序增加的,并不是固定的索引值。**

0 commit comments

Comments
 (0)