Skip to content

FaceRecognizerSF_create1

objdetectfunctionOpenCV 5.0.0
import { FaceRecognizerSF_create1 } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSmodel, config, backend_id, target_id
FUNCTIONFaceRecognizerSF_create1
RETURN TYPEFaceRecognizerSF | null
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Creates an instance of this class from a buffer containing the model weights and configuration.

FaceRecognizerSF_create1(framework: EmbindString, bufferModel: ucharVector, bufferConfig: ucharVector, backend_id: number, target_id: number): FaceRecognizerSF | null;
3 available overloads
FaceRecognizerSF_create1(model: EmbindString, config: ucharVector, backend_id: ucharVector): FaceRecognizerSF | null;
FaceRecognizerSF_create1(model: EmbindString, config: ucharVector, backend_id: ucharVector, target_id: number): FaceRecognizerSF | null;
FaceRecognizerSF_create1(framework: EmbindString, bufferModel: ucharVector, bufferConfig: ucharVector, backend_id: number, target_id: number): FaceRecognizerSF | null;
model

the path of the onnx model used for face recognition

config

the path to the config file for compatibility, which is not requested for ONNX models

backend_id

the id of backend

target_id

the id of target device

framework

Name of the framework (ONNX, etc.)

bufferModel

A buffer containing the binary model weights.

bufferConfig

A buffer containing the network configuration.

Returns

A pointer to the created instance of FaceRecognizerSF.

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.