@camera.ui/sdk / plugin / FaceEmbeddingInterface
Interface: FaceEmbeddingInterface ​
Defined in: plugin/interfaces.ts:415
Implemented by plugins that turn a face crop into an embedding vector. Split from face detection so the two can run on different hosts: locating a face is cheap, embedding it is not.
Methods ​
embedFaceImages() ​
embedFaceImages(
images,config?,landmarks?):Promise<(FaceEmbeddingPluginResponse|undefined)[]>
Defined in: plugin/interfaces.ts:425
Embed a batch of encoded images (JPEG/PNG), each showing one face: one result per input in the same order. An empty embedding means the picture holds no face this model can use, undefined that the plugin could not run at all: the caller may drop such a picture, so the two must not be mixed up. Meant for re-embedding stored pictures after an embedding-model change. landmarks holds the points an earlier result returned for the same picture, one entry per image: with them the face is not searched again.
Parameters ​
images ​
(Buffer<ArrayBufferLike> | Uint8Array<ArrayBufferLike>)[]
config? ​
Record<string, unknown>
landmarks? ​
(Point[] | undefined)[]
Returns ​
Promise<(FaceEmbeddingPluginResponse | undefined)[]>
faceEmbeddingSettings()? ​
optionalfaceEmbeddingSettings():Promise<JsonSchema[] |undefined>
Defined in: plugin/interfaces.ts:431
Return the JSON schema for the face-embedding settings form in the UI, or undefined for no schema.
Returns ​
Promise<JsonSchema[] | undefined>