diff --git a/packages/tasks/src/tasks/depth-estimation/inference.ts b/packages/tasks/src/tasks/depth-estimation/inference.ts index ca831fdb41..2eb17c74e3 100644 --- a/packages/tasks/src/tasks/depth-estimation/inference.ts +++ b/packages/tasks/src/tasks/depth-estimation/inference.ts @@ -4,8 +4,6 @@ * Using src/scripts/inference-codegen */ -export type DepthEstimationOutput = unknown[]; - /** * Inputs for Depth Estimation inference */ @@ -17,19 +15,21 @@ export interface DepthEstimationInput { /** * Additional inference parameters */ - parameters?: DepthEstimationParameters; + parameters?: { [key: string]: unknown }; [property: string]: unknown; } /** - * Additional inference parameters - * - * Additional inference parameters for Depth Estimation + * Outputs of inference for the Depth Estimation task */ -export interface DepthEstimationParameters { +export interface DepthEstimationOutput { + /** + * The predicted depth as an image + */ + depth?: unknown; /** - * When specified, limits the output to the top K most probable classes. + * The predicted depth as a tensor */ - topK?: number; + predictedDepth?: unknown; [property: string]: unknown; } diff --git a/packages/tasks/src/tasks/depth-estimation/spec/input.json b/packages/tasks/src/tasks/depth-estimation/spec/input.json index 3d58c82ff6..bbf31ff9e5 100644 --- a/packages/tasks/src/tasks/depth-estimation/spec/input.json +++ b/packages/tasks/src/tasks/depth-estimation/spec/input.json @@ -18,12 +18,7 @@ "title": "DepthEstimationParameters", "description": "Additional inference parameters for Depth Estimation", "type": "object", - "properties": { - "topK": { - "type": "integer", - "description": "When specified, limits the output to the top K most probable classes." - } - } + "properties": {} } }, "required": ["data"] diff --git a/packages/tasks/src/tasks/depth-estimation/spec/output.json b/packages/tasks/src/tasks/depth-estimation/spec/output.json index 72d6a714dd..85bc6ef103 100644 --- a/packages/tasks/src/tasks/depth-estimation/spec/output.json +++ b/packages/tasks/src/tasks/depth-estimation/spec/output.json @@ -3,8 +3,14 @@ "$schema": "http://json-schema.org/draft-06/schema#", "description": "Outputs of inference for the Depth Estimation task", "title": "DepthEstimationOutput", - "type": "array", - "items": { - "description": "The output depth labels" + + "type": "object", + "properties": { + "predicted_depth": { + "description": "The predicted depth as a tensor" + }, + "depth": { + "description": "The predicted depth as an image" + } } }