Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
machineuser
commited on
Commit
·
1fd06a7
1
Parent(s):
beb51b0
Sync widgets demo
Browse files
packages/tasks/src/tasks/depth-estimation/inference.ts
CHANGED
|
@@ -4,8 +4,6 @@
|
|
| 4 |
* Using src/scripts/inference-codegen
|
| 5 |
*/
|
| 6 |
|
| 7 |
-
export type DepthEstimationOutput = unknown[];
|
| 8 |
-
|
| 9 |
/**
|
| 10 |
* Inputs for Depth Estimation inference
|
| 11 |
*/
|
|
@@ -17,19 +15,21 @@ export interface DepthEstimationInput {
|
|
| 17 |
/**
|
| 18 |
* Additional inference parameters
|
| 19 |
*/
|
| 20 |
-
parameters?:
|
| 21 |
[property: string]: unknown;
|
| 22 |
}
|
| 23 |
|
| 24 |
/**
|
| 25 |
-
*
|
| 26 |
-
*
|
| 27 |
-
* Additional inference parameters for Depth Estimation
|
| 28 |
*/
|
| 29 |
-
export interface
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
/**
|
| 31 |
-
*
|
| 32 |
*/
|
| 33 |
-
|
| 34 |
[property: string]: unknown;
|
| 35 |
}
|
|
|
|
| 4 |
* Using src/scripts/inference-codegen
|
| 5 |
*/
|
| 6 |
|
|
|
|
|
|
|
| 7 |
/**
|
| 8 |
* Inputs for Depth Estimation inference
|
| 9 |
*/
|
|
|
|
| 15 |
/**
|
| 16 |
* Additional inference parameters
|
| 17 |
*/
|
| 18 |
+
parameters?: { [key: string]: unknown };
|
| 19 |
[property: string]: unknown;
|
| 20 |
}
|
| 21 |
|
| 22 |
/**
|
| 23 |
+
* Outputs of inference for the Depth Estimation task
|
|
|
|
|
|
|
| 24 |
*/
|
| 25 |
+
export interface DepthEstimationOutput {
|
| 26 |
+
/**
|
| 27 |
+
* The predicted depth as an image
|
| 28 |
+
*/
|
| 29 |
+
depth?: unknown;
|
| 30 |
/**
|
| 31 |
+
* The predicted depth as a tensor
|
| 32 |
*/
|
| 33 |
+
predictedDepth?: unknown;
|
| 34 |
[property: string]: unknown;
|
| 35 |
}
|
packages/tasks/src/tasks/depth-estimation/spec/input.json
CHANGED
|
@@ -18,12 +18,7 @@
|
|
| 18 |
"title": "DepthEstimationParameters",
|
| 19 |
"description": "Additional inference parameters for Depth Estimation",
|
| 20 |
"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 |
-
}
|
| 27 |
}
|
| 28 |
},
|
| 29 |
"required": ["data"]
|
|
|
|
| 18 |
"title": "DepthEstimationParameters",
|
| 19 |
"description": "Additional inference parameters for Depth Estimation",
|
| 20 |
"type": "object",
|
| 21 |
+
"properties": {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
}
|
| 23 |
},
|
| 24 |
"required": ["data"]
|
packages/tasks/src/tasks/depth-estimation/spec/output.json
CHANGED
|
@@ -3,8 +3,14 @@
|
|
| 3 |
"$schema": "http://json-schema.org/draft-06/schema#",
|
| 4 |
"description": "Outputs of inference for the Depth Estimation task",
|
| 5 |
"title": "DepthEstimationOutput",
|
| 6 |
-
|
| 7 |
-
"
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
}
|
| 10 |
}
|
|
|
|
| 3 |
"$schema": "http://json-schema.org/draft-06/schema#",
|
| 4 |
"description": "Outputs of inference for the Depth Estimation task",
|
| 5 |
"title": "DepthEstimationOutput",
|
| 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 |
+
}
|
| 15 |
}
|
| 16 |
}
|