Skip to content

@camera.ui/sdk / plugin / ClipDetectionInterface

Interface: ClipDetectionInterface

Defined in: plugin/interfaces.ts:323

Implemented by plugins that generate CLIP image and text embeddings used for semantic search over recorded events.

Methods

clipSettings()?

optional clipSettings(): Promise<JsonSchema[] | undefined>

Defined in: plugin/interfaces.ts:343

Return the JSON schema for the CLIP settings form in the UI, or undefined for no schema.

Returns

Promise<JsonSchema[] | undefined>


detectClipEmbedding()?

optional detectClipEmbedding(frame, config?): Promise<ClipDetectionPluginResponse | undefined>

Defined in: plugin/interfaces.ts:327

Run the CLIP image branch on a pre-decoded video frame.

Parameters

frame

VideoFrameData

config?

Record<string, unknown>

Returns

Promise<ClipDetectionPluginResponse | undefined>


embedImages()?

optional embedImages(images, config?): Promise<(ClipDetectionPluginResponse | undefined)[]>

Defined in: plugin/interfaces.ts:333

Run the CLIP image branch over a batch of encoded images (JPEG/PNG): one result per input in the same order, undefined where decoding or embedding failed. Meant for re-indexing stored images after an embedding-model change.

Parameters

images

(Buffer<ArrayBufferLike> | Uint8Array<ArrayBufferLike>)[]

config?

Record<string, unknown>

Returns

Promise<(ClipDetectionPluginResponse | undefined)[]>


getTextEmbedding()

getTextEmbedding(text): Promise<ClipTextEmbeddingResult>

Defined in: plugin/interfaces.ts:335

Run the CLIP text branch and return a vector usable for semantic-search queries against stored image embeddings.

Parameters

text

string

Returns

Promise<ClipTextEmbeddingResult>


getTextEmbeddings()?

optional getTextEmbeddings(text): Promise<ClipTextEmbeddingResult[]>

Defined in: plugin/interfaces.ts:341

Run the CLIP text branch once per embedding space the plugin can currently serve, the configured search model first. Lets semantic search also cover embeddings produced by an older model during a transition.

Parameters

text

string

Returns

Promise<ClipTextEmbeddingResult[]>


testClipEmbedding()

testClipEmbedding(imageData, metadata, config): Promise<ClipDetectionPluginResponse | undefined>

Defined in: plugin/interfaces.ts:325

Run the CLIP image branch on a single image captured by the UI test panel.

Parameters

imageData

Buffer<ArrayBufferLike> | Uint8Array<ArrayBufferLike>

metadata

ImageMetadata

config

Record<string, unknown>

Returns

Promise<ClipDetectionPluginResponse | undefined>