FaceDetectorYN_create
import { FaceDetectorYN_create } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
ARGUMENTSmodel, config, input_size, score_threshold
FUNCTIONFaceDetectorYN_create
RETURN TYPEFaceDetectorYN | null
Creates an instance of face detector class with given parameters
FaceDetectorYN_create(model: EmbindString, config: EmbindString, input_size: Size, score_threshold: number, nms_threshold: number, top_k: number, backend_id: number, target_id: number): FaceDetectorYN | null;6 available overloads
FaceDetectorYN_create(model: EmbindString, config: EmbindString, input_size: Size): FaceDetectorYN | null;FaceDetectorYN_create(model: EmbindString, config: EmbindString, input_size: Size, score_threshold: number): FaceDetectorYN | null;FaceDetectorYN_create(model: EmbindString, config: EmbindString, input_size: Size, score_threshold: number, nms_threshold: number): FaceDetectorYN | null;FaceDetectorYN_create(model: EmbindString, config: EmbindString, input_size: Size, score_threshold: number, nms_threshold: number, top_k: number): FaceDetectorYN | null;FaceDetectorYN_create(model: EmbindString, config: EmbindString, input_size: Size, score_threshold: number, nms_threshold: number, top_k: number, backend_id: number): FaceDetectorYN | null;FaceDetectorYN_create(model: EmbindString, config: EmbindString, input_size: Size, score_threshold: number, nms_threshold: number, top_k: number, backend_id: number, target_id: number): FaceDetectorYN | null;modelthe path to the requested model
configthe path to the config file for compatibility, which is not requested for ONNX models
input_sizethe size of the input image
score_thresholdthe threshold to filter out bounding boxes of score smaller than the given value
nms_thresholdthe threshold to suppress bounding boxes of IoU bigger than the given value
top_kkeep top K bboxes before NMS
backend_idthe id of backend
target_idthe id of target device
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.