Skip to content

Commit 76b9792

Browse files
authored
🩹 [Tasks] Fix depth-estimation spec (#472)
1 parent 48af215 commit 76b9792

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

‎packages/tasks/src/tasks/depth-estimation/inference.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* Using src/scripts/inference-codegen
55
*/
66

7-
export type DepthEstimationOutput = unknown[];
8-
97
/**
108
* Inputs for Depth Estimation inference
119
*/
@@ -17,19 +15,21 @@ export interface DepthEstimationInput {
1715
/**
1816
* Additional inference parameters
1917
*/
20-
parameters?: DepthEstimationParameters;
18+
parameters?: { [key: string]: unknown };
2119
[property: string]: unknown;
2220
}
2321

2422
/**
25-
* Additional inference parameters
26-
*
27-
* Additional inference parameters for Depth Estimation
23+
* Outputs of inference for the Depth Estimation task
2824
*/
29-
export interface DepthEstimationParameters {
25+
export interface DepthEstimationOutput {
26+
/**
27+
* The predicted depth as an image
28+
*/
29+
depth?: unknown;
3030
/**
31-
* When specified, limits the output to the top K most probable classes.
31+
* The predicted depth as a tensor
3232
*/
33-
topK?: number;
33+
predictedDepth?: unknown;
3434
[property: string]: unknown;
3535
}

‎packages/tasks/src/tasks/depth-estimation/spec/input.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@
1818
"title": "DepthEstimationParameters",
1919
"description": "Additional inference parameters for Depth Estimation",
2020
"type": "object",
21-
"properties": {
22-
"topK": {
23-
"type": "integer",
24-
"description": "When specified, limits the output to the top K most probable classes."
25-
}
26-
}
21+
"properties": {}
2722
}
2823
},
2924
"required": ["data"]

‎packages/tasks/src/tasks/depth-estimation/spec/output.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33
"$schema": "http://json-schema.org/draft-06/schema#",
44
"description": "Outputs of inference for the Depth Estimation task",
55
"title": "DepthEstimationOutput",
6-
"type": "array",
7-
"items": {
8-
"description": "The output depth labels"
6+
7+
"type": "object",
8+
"properties": {
9+
"predicted_depth": {
10+
"description": "The predicted depth as a tensor"
11+
},
12+
"depth": {
13+
"description": "The predicted depth as an image"
14+
}
915
}
1016
}

0 commit comments

Comments
 (0)