@camera.ui/sdk / plugin / ClipDetectionInterface
Interface: ClipDetectionInterface ​
Defined in: plugin/interfaces.ts:504
Implemented by plugins that generate CLIP image and text embeddings used for semantic search over recorded events.
Methods ​
clipSettings()? ​
optionalclipSettings():Promise<JsonSchema[] |undefined>
Defined in: plugin/interfaces.ts:524
Return the JSON schema for the CLIP settings form in the UI, or undefined for no schema.
Returns ​
Promise<JsonSchema[] | undefined>
detectClipEmbedding()? ​
optionaldetectClipEmbedding(frame,config?):Promise<ClipDetectionPluginResponse|undefined>
Defined in: plugin/interfaces.ts:508
Run the CLIP image branch on a pre-decoded video frame.
Parameters ​
frame ​
config? ​
Record<string, unknown>
Returns ​
Promise<ClipDetectionPluginResponse | undefined>
embedImages()? ​
optionalembedImages(images,config?):Promise<(ClipDetectionPluginResponse|undefined)[]>
Defined in: plugin/interfaces.ts:514
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:516
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()? ​
optionalgetTextEmbeddings(text):Promise<ClipTextEmbeddingResult[]>
Defined in: plugin/interfaces.ts:522
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:506
Run the CLIP image branch on a single image captured by the UI test panel.
Parameters ​
imageData ​
Buffer<ArrayBufferLike> | Uint8Array<ArrayBufferLike>
metadata ​
config ​
Record<string, unknown>
Returns ​
Promise<ClipDetectionPluginResponse | undefined>