Skip to content

FaceDetectorYN_create1

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

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

ARGUMENTSmodel, config, input_size, score_threshold
FUNCTIONFaceDetectorYN_create1
RETURN TYPEFaceDetectorYN | null
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Creates an instance of face detector class with given parameters

FaceDetectorYN_create1(framework: EmbindString, bufferModel: ucharVector, bufferConfig: ucharVector, input_size: Size, score_threshold: number, nms_threshold: number, top_k: number, backend_id: number, target_id: number): FaceDetectorYN | null;
6 available overloads
FaceDetectorYN_create1(model: EmbindString, config: ucharVector, input_size: ucharVector, score_threshold: Size): FaceDetectorYN | null;
FaceDetectorYN_create1(model: EmbindString, config: ucharVector, input_size: ucharVector, score_threshold: Size, nms_threshold: number): FaceDetectorYN | null;
FaceDetectorYN_create1(model: EmbindString, config: ucharVector, input_size: ucharVector, score_threshold: Size, nms_threshold: number, top_k: number): FaceDetectorYN | null;
FaceDetectorYN_create1(model: EmbindString, config: ucharVector, input_size: ucharVector, score_threshold: Size, nms_threshold: number, top_k: number, backend_id: number): FaceDetectorYN | null;
FaceDetectorYN_create1(model: EmbindString, config: ucharVector, input_size: ucharVector, score_threshold: Size, nms_threshold: number, top_k: number, backend_id: number, target_id: number): FaceDetectorYN | null;
FaceDetectorYN_create1(framework: EmbindString, bufferModel: ucharVector, bufferConfig: ucharVector, input_size: Size, score_threshold: number, nms_threshold: number, top_k: number, backend_id: number, target_id: number): FaceDetectorYN | null;
model

the path to the requested model

config

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

input_size

the size of the input image

score_threshold

the threshold to filter out bounding boxes of score smaller than the given value

nms_threshold

the threshold to suppress bounding boxes of IoU bigger than the given value

top_k

keep top K bboxes before NMS

backend_id

the id of backend

target_id

the id of target device

framework

Name of origin framework

bufferModel

A buffer with a content of binary file with weights

bufferConfig

A buffer with a content of text file contains network configuration

Returns

The FaceDetectorYN | null result.

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.