From 0e4b88431c5006ae2b7e923cfac2a6b942cdfcaa Mon Sep 17 00:00:00 2001 From: SBrandeis Date: Wed, 7 Feb 2024 15:26:53 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20depth-estimation=20spe?= =?UTF-8?q?c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tasks/src/tasks/depth-estimation/spec/input.json | 7 +------ .../src/tasks/depth-estimation/spec/output.json | 12 +++++++++--- 2 files changed, 10 insertions(+), 9 deletions(-) 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" + } } } From 32a9a6f4450dfeb8d41312da1070284c705bf086 Mon Sep 17 00:00:00 2001 From: SBrandeis Date: Wed, 7 Feb 2024 15:27:40 +0100 Subject: [PATCH 2/2] Regenerate code --- .../src/tasks/depth-estimation/inference.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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; }