From af2ada49b11f6e9b51d2ee75d10f398d4a8a650b Mon Sep 17 00:00:00 2001 From: Google AI Edge Date: Fri, 6 Dec 2024 18:10:16 -0800 Subject: [PATCH] Add prototype MediaPipe adapter to builtin Model Explorer adapters PiperOrigin-RevId: 703671776 --- src/ui/src/common/types.ts | 1 + src/ui/src/services/internal_adapter_extensions.ts | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/src/ui/src/common/types.ts b/src/ui/src/common/types.ts index 31859d1f..f63325ae 100644 --- a/src/ui/src/common/types.ts +++ b/src/ui/src/common/types.ts @@ -36,6 +36,7 @@ export enum InternalAdapterExtId { MLIR = 'builtin_mlir', JSON_LOADER = 'builtin_json', DATA_NEXUS = 'builtin_data_nexus', + MEDIAPIPE = 'builtin_mediapipe', } /** Extension types. */ diff --git a/src/ui/src/services/internal_adapter_extensions.ts b/src/ui/src/services/internal_adapter_extensions.ts index e87ba521..48ac1dd3 100644 --- a/src/ui/src/services/internal_adapter_extensions.ts +++ b/src/ui/src/services/internal_adapter_extensions.ts @@ -88,6 +88,14 @@ const dataNexusAdapterExtension: AdapterExtension = { name: 'Data Nexus adapter', description: 'Loads data from Data Nexus.', }; +const mediapipeAdapterExtension: AdapterExtension = { + type: ExtensionType.ADAPTER, + fileExts: ['pbtxt'], + id: InternalAdapterExtId.MEDIAPIPE, + name: 'MediaPipe adapter', + description: + 'A built-in adapter that converts a MediaPipe Pipeline to Model Explorer format.', +}; /** All internal extensions. */ export const INTERNAL_ADAPTER_EXTENSIONS: AdapterExtension[] = [ @@ -99,4 +107,5 @@ export const INTERNAL_ADAPTER_EXTENSIONS: AdapterExtension[] = [ mlirAdapterExtension, jsonAdapterExtension, dataNexusAdapterExtension, + mediapipeAdapterExtension, ];