Table of Contents

Method Create

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

Create(string, string, Size, float, float, int, Backend, Target)

Creates an instance of this class with given parameters.

public static FaceDetectorYN Create(string model, string config, Size inputSize, float scoreThreshold = 0.9, float nmsThreshold = 0.3, int topK = 5000, Backend backendId = Backend.DEFAULT, Target targetId = Target.CPU)

Parameters

model string

The path to the requested model

config string

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

inputSize Size

The size of the input image

scoreThreshold float

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

nmsThreshold float

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

topK int

Keep top K bboxes before NMS

backendId Backend

The id of backend

targetId Target

The id of target device

Returns

FaceDetectorYN

Create(string, byte[], byte[], Size, float, float, int, Backend, Target)

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

public static FaceDetectorYN Create(string framework, byte[] bufferModel, byte[] bufferConfig, Size inputSize, float scoreThreshold = 0.9, float nmsThreshold = 0.3, int topK = 5000, Backend backendId = Backend.DEFAULT, Target targetId = Target.CPU)

Parameters

framework string

Name of the framework.

bufferModel byte[]

A buffer containing the binary model weights.

bufferConfig byte[]

A buffer containing the network configuration.

inputSize Size

The size of the input image.

scoreThreshold float

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

nmsThreshold float

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

topK int

Keep top K bounding boxes before NMS.

backendId Backend

The id of backend.

targetId Target

The id of target device.

Returns

FaceDetectorYN