OpenCV for Unity 2.6.4
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
Loading...
Searching...
No Matches
OpenCVForUnity.ObjdetectModule.FaceDetectorYN Class Reference

DNN-based face detector. More...

Public Member Functions

int detect (Mat image, Mat faces)
 Detects faces in the input image. Following is an example output.
 
Size getInputSize ()
 
double double height getInputSizeAsValueTuple ()
 
Vec2d getInputSizeAsVec2d ()
 
IntPtr getNativeObjAddr ()
 
float getNMSThreshold ()
 
float getScoreThreshold ()
 
int getTopK ()
 
void setInputSize (in Vec2d input_size)
 Set the size for the network input, which overwrites the input size of creating model. Call this method when the size of input image does not match the input size when creating model.
 
void setInputSize (in(double width, double height) input_size)
 Set the size for the network input, which overwrites the input size of creating model. Call this method when the size of input image does not match the input size when creating model.
 
void setInputSize (Size input_size)
 Set the size for the network input, which overwrites the input size of creating model. Call this method when the size of input image does not match the input size when creating model.
 
void setNMSThreshold (float nms_threshold)
 Set the Non-maximum-suppression threshold to suppress bounding boxes that have IoU greater than the given value.
 
void setScoreThreshold (float score_threshold)
 Set the score threshold to filter out bounding boxes of score less than the given value.
 
void setTopK (int top_k)
 Set the number of bounding boxes preserved before NMS.
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 
void ThrowIfDisposed ()
 

Static Public Member Functions

static FaceDetectorYN __fromPtr__ (IntPtr addr)
 
static FaceDetectorYN create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, in Vec2d input_size)
 
static FaceDetectorYN create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, in Vec2d input_size, float score_threshold)
 
static FaceDetectorYN create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, in Vec2d input_size, float score_threshold, float nms_threshold)
 
static FaceDetectorYN create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, in Vec2d input_size, float score_threshold, float nms_threshold, int top_k)
 
static FaceDetectorYN create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, in Vec2d input_size, float score_threshold, float nms_threshold, int top_k, int backend_id)
 
static FaceDetectorYN create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, in Vec2d input_size, float score_threshold, float nms_threshold, int top_k, int backend_id, int target_id)
 
static FaceDetectorYN create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, in(double width, double height) input_size)
 
static FaceDetectorYN create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, in(double width, double height) input_size, float score_threshold)
 
static FaceDetectorYN create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, in(double width, double height) input_size, float score_threshold, float nms_threshold)
 
static FaceDetectorYN create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, in(double width, double height) input_size, float score_threshold, float nms_threshold, int top_k)
 
static FaceDetectorYN create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, in(double width, double height) input_size, float score_threshold, float nms_threshold, int top_k, int backend_id)
 
static FaceDetectorYN create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, in(double width, double height) input_size, float score_threshold, float nms_threshold, int top_k, int backend_id, int target_id)
 
static FaceDetectorYN create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, Size input_size)
 
static FaceDetectorYN create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, Size input_size, float score_threshold)
 
static FaceDetectorYN create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, Size input_size, float score_threshold, float nms_threshold)
 
static FaceDetectorYN create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, Size input_size, float score_threshold, float nms_threshold, int top_k)
 
static FaceDetectorYN create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, Size input_size, float score_threshold, float nms_threshold, int top_k, int backend_id)
 
static FaceDetectorYN create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, Size input_size, float score_threshold, float nms_threshold, int top_k, int backend_id, int target_id)
 
static FaceDetectorYN create (string model, string config, in Vec2d input_size)
 Creates an instance of face detector class with given parameters.
 
static FaceDetectorYN create (string model, string config, in Vec2d input_size, float score_threshold)
 Creates an instance of face detector class with given parameters.
 
static FaceDetectorYN create (string model, string config, in Vec2d input_size, float score_threshold, float nms_threshold)
 Creates an instance of face detector class with given parameters.
 
static FaceDetectorYN create (string model, string config, in Vec2d input_size, float score_threshold, float nms_threshold, int top_k)
 Creates an instance of face detector class with given parameters.
 
static FaceDetectorYN create (string model, string config, in Vec2d input_size, float score_threshold, float nms_threshold, int top_k, int backend_id)
 Creates an instance of face detector class with given parameters.
 
static FaceDetectorYN create (string model, string config, in Vec2d input_size, float score_threshold, float nms_threshold, int top_k, int backend_id, int target_id)
 Creates an instance of face detector class with given parameters.
 
static FaceDetectorYN create (string model, string config, in(double width, double height) input_size)
 Creates an instance of face detector class with given parameters.
 
static FaceDetectorYN create (string model, string config, in(double width, double height) input_size, float score_threshold)
 Creates an instance of face detector class with given parameters.
 
static FaceDetectorYN create (string model, string config, in(double width, double height) input_size, float score_threshold, float nms_threshold)
 Creates an instance of face detector class with given parameters.
 
static FaceDetectorYN create (string model, string config, in(double width, double height) input_size, float score_threshold, float nms_threshold, int top_k)
 Creates an instance of face detector class with given parameters.
 
static FaceDetectorYN create (string model, string config, in(double width, double height) input_size, float score_threshold, float nms_threshold, int top_k, int backend_id)
 Creates an instance of face detector class with given parameters.
 
static FaceDetectorYN create (string model, string config, in(double width, double height) input_size, float score_threshold, float nms_threshold, int top_k, int backend_id, int target_id)
 Creates an instance of face detector class with given parameters.
 
static FaceDetectorYN create (string model, string config, Size input_size)
 Creates an instance of face detector class with given parameters.
 
static FaceDetectorYN create (string model, string config, Size input_size, float score_threshold)
 Creates an instance of face detector class with given parameters.
 
static FaceDetectorYN create (string model, string config, Size input_size, float score_threshold, float nms_threshold)
 Creates an instance of face detector class with given parameters.
 
static FaceDetectorYN create (string model, string config, Size input_size, float score_threshold, float nms_threshold, int top_k)
 Creates an instance of face detector class with given parameters.
 
static FaceDetectorYN create (string model, string config, Size input_size, float score_threshold, float nms_threshold, int top_k, int backend_id)
 Creates an instance of face detector class with given parameters.
 
static FaceDetectorYN create (string model, string config, Size input_size, float score_threshold, float nms_threshold, int top_k, int backend_id, int target_id)
 Creates an instance of face detector class with given parameters.
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 

Public Attributes

double width
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject
 DisposableOpenCVObject ()
 
 DisposableOpenCVObject (bool isEnabledDispose)
 
 DisposableOpenCVObject (IntPtr ptr)
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 
 DisposableObject (bool isEnabledDispose)
 

Additional Inherited Members

- Package Attributes inherited from OpenCVForUnity.DisposableOpenCVObject
- Properties inherited from OpenCVForUnity.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Detailed Description

Member Function Documentation

◆ __fromPtr__()

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.__fromPtr__ ( IntPtr addr)
static

◆ create() [1/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string framework,
MatOfByte bufferModel,
MatOfByte bufferConfig,
in Vec2d input_size )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
frameworkName of origin framework
bufferModelA buffer with a content of binary file with weights
bufferConfigA buffer with a content of text file contains network configuration
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

◆ create() [2/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string framework,
MatOfByte bufferModel,
MatOfByte bufferConfig,
in Vec2d input_size,
float score_threshold )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
frameworkName of origin framework
bufferModelA buffer with a content of binary file with weights
bufferConfigA buffer with a content of text file contains network configuration
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

◆ create() [3/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string framework,
MatOfByte bufferModel,
MatOfByte bufferConfig,
in Vec2d input_size,
float score_threshold,
float nms_threshold )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
frameworkName of origin framework
bufferModelA buffer with a content of binary file with weights
bufferConfigA buffer with a content of text file contains network configuration
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

◆ create() [4/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string framework,
MatOfByte bufferModel,
MatOfByte bufferConfig,
in Vec2d input_size,
float score_threshold,
float nms_threshold,
int top_k )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
frameworkName of origin framework
bufferModelA buffer with a content of binary file with weights
bufferConfigA buffer with a content of text file contains network configuration
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

◆ create() [5/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string framework,
MatOfByte bufferModel,
MatOfByte bufferConfig,
in Vec2d input_size,
float score_threshold,
float nms_threshold,
int top_k,
int backend_id )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
frameworkName of origin framework
bufferModelA buffer with a content of binary file with weights
bufferConfigA buffer with a content of text file contains network configuration
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

◆ create() [6/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string framework,
MatOfByte bufferModel,
MatOfByte bufferConfig,
in Vec2d input_size,
float score_threshold,
float nms_threshold,
int top_k,
int backend_id,
int target_id )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
frameworkName of origin framework
bufferModelA buffer with a content of binary file with weights
bufferConfigA buffer with a content of text file contains network configuration
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

◆ create() [7/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string framework,
MatOfByte bufferModel,
MatOfByte bufferConfig,
in(double width, double height) input_size )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
frameworkName of origin framework
bufferModelA buffer with a content of binary file with weights
bufferConfigA buffer with a content of text file contains network configuration
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

◆ create() [8/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string framework,
MatOfByte bufferModel,
MatOfByte bufferConfig,
in(double width, double height) input_size,
float score_threshold )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
frameworkName of origin framework
bufferModelA buffer with a content of binary file with weights
bufferConfigA buffer with a content of text file contains network configuration
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

◆ create() [9/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string framework,
MatOfByte bufferModel,
MatOfByte bufferConfig,
in(double width, double height) input_size,
float score_threshold,
float nms_threshold )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
frameworkName of origin framework
bufferModelA buffer with a content of binary file with weights
bufferConfigA buffer with a content of text file contains network configuration
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

◆ create() [10/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string framework,
MatOfByte bufferModel,
MatOfByte bufferConfig,
in(double width, double height) input_size,
float score_threshold,
float nms_threshold,
int top_k )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
frameworkName of origin framework
bufferModelA buffer with a content of binary file with weights
bufferConfigA buffer with a content of text file contains network configuration
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

◆ create() [11/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string framework,
MatOfByte bufferModel,
MatOfByte bufferConfig,
in(double width, double height) input_size,
float score_threshold,
float nms_threshold,
int top_k,
int backend_id )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
frameworkName of origin framework
bufferModelA buffer with a content of binary file with weights
bufferConfigA buffer with a content of text file contains network configuration
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

◆ create() [12/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string framework,
MatOfByte bufferModel,
MatOfByte bufferConfig,
in(double width, double height) input_size,
float score_threshold,
float nms_threshold,
int top_k,
int backend_id,
int target_id )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
frameworkName of origin framework
bufferModelA buffer with a content of binary file with weights
bufferConfigA buffer with a content of text file contains network configuration
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

◆ create() [13/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string framework,
MatOfByte bufferModel,
MatOfByte bufferConfig,
Size input_size )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
frameworkName of origin framework
bufferModelA buffer with a content of binary file with weights
bufferConfigA buffer with a content of text file contains network configuration
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

◆ create() [14/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string framework,
MatOfByte bufferModel,
MatOfByte bufferConfig,
Size input_size,
float score_threshold )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
frameworkName of origin framework
bufferModelA buffer with a content of binary file with weights
bufferConfigA buffer with a content of text file contains network configuration
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

◆ create() [15/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string framework,
MatOfByte bufferModel,
MatOfByte bufferConfig,
Size input_size,
float score_threshold,
float nms_threshold )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
frameworkName of origin framework
bufferModelA buffer with a content of binary file with weights
bufferConfigA buffer with a content of text file contains network configuration
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

◆ create() [16/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string framework,
MatOfByte bufferModel,
MatOfByte bufferConfig,
Size input_size,
float score_threshold,
float nms_threshold,
int top_k )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
frameworkName of origin framework
bufferModelA buffer with a content of binary file with weights
bufferConfigA buffer with a content of text file contains network configuration
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

◆ create() [17/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string framework,
MatOfByte bufferModel,
MatOfByte bufferConfig,
Size input_size,
float score_threshold,
float nms_threshold,
int top_k,
int backend_id )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
frameworkName of origin framework
bufferModelA buffer with a content of binary file with weights
bufferConfigA buffer with a content of text file contains network configuration
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

◆ create() [18/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string framework,
MatOfByte bufferModel,
MatOfByte bufferConfig,
Size input_size,
float score_threshold,
float nms_threshold,
int top_k,
int backend_id,
int target_id )
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
frameworkName of origin framework
bufferModelA buffer with a content of binary file with weights
bufferConfigA buffer with a content of text file contains network configuration
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

◆ create() [19/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string model,
string config,
in Vec2d input_size )
static

Creates an instance of face detector class with given parameters.

Parameters
modelthe path to the requested model
configthe path to the config file for compability, 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

◆ create() [20/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string model,
string config,
in Vec2d input_size,
float score_threshold )
static

Creates an instance of face detector class with given parameters.

Parameters
modelthe path to the requested model
configthe path to the config file for compability, 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

◆ create() [21/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string model,
string config,
in Vec2d input_size,
float score_threshold,
float nms_threshold )
static

Creates an instance of face detector class with given parameters.

Parameters
modelthe path to the requested model
configthe path to the config file for compability, 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

◆ create() [22/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string model,
string config,
in Vec2d input_size,
float score_threshold,
float nms_threshold,
int top_k )
static

Creates an instance of face detector class with given parameters.

Parameters
modelthe path to the requested model
configthe path to the config file for compability, 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

◆ create() [23/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string model,
string config,
in Vec2d input_size,
float score_threshold,
float nms_threshold,
int top_k,
int backend_id )
static

Creates an instance of face detector class with given parameters.

Parameters
modelthe path to the requested model
configthe path to the config file for compability, 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

◆ create() [24/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string model,
string config,
in Vec2d input_size,
float score_threshold,
float nms_threshold,
int top_k,
int backend_id,
int target_id )
static

Creates an instance of face detector class with given parameters.

Parameters
modelthe path to the requested model
configthe path to the config file for compability, 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

◆ create() [25/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string model,
string config,
in(double width, double height) input_size )
static

Creates an instance of face detector class with given parameters.

Parameters
modelthe path to the requested model
configthe path to the config file for compability, 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

◆ create() [26/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string model,
string config,
in(double width, double height) input_size,
float score_threshold )
static

Creates an instance of face detector class with given parameters.

Parameters
modelthe path to the requested model
configthe path to the config file for compability, 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

◆ create() [27/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string model,
string config,
in(double width, double height) input_size,
float score_threshold,
float nms_threshold )
static

Creates an instance of face detector class with given parameters.

Parameters
modelthe path to the requested model
configthe path to the config file for compability, 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

◆ create() [28/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string model,
string config,
in(double width, double height) input_size,
float score_threshold,
float nms_threshold,
int top_k )
static

Creates an instance of face detector class with given parameters.

Parameters
modelthe path to the requested model
configthe path to the config file for compability, 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

◆ create() [29/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string model,
string config,
in(double width, double height) input_size,
float score_threshold,
float nms_threshold,
int top_k,
int backend_id )
static

Creates an instance of face detector class with given parameters.

Parameters
modelthe path to the requested model
configthe path to the config file for compability, 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

◆ create() [30/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string model,
string config,
in(double width, double height) input_size,
float score_threshold,
float nms_threshold,
int top_k,
int backend_id,
int target_id )
static

Creates an instance of face detector class with given parameters.

Parameters
modelthe path to the requested model
configthe path to the config file for compability, 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

◆ create() [31/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string model,
string config,
Size input_size )
static

Creates an instance of face detector class with given parameters.

Parameters
modelthe path to the requested model
configthe path to the config file for compability, 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

◆ create() [32/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string model,
string config,
Size input_size,
float score_threshold )
static

Creates an instance of face detector class with given parameters.

Parameters
modelthe path to the requested model
configthe path to the config file for compability, 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

◆ create() [33/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string model,
string config,
Size input_size,
float score_threshold,
float nms_threshold )
static

Creates an instance of face detector class with given parameters.

Parameters
modelthe path to the requested model
configthe path to the config file for compability, 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

◆ create() [34/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string model,
string config,
Size input_size,
float score_threshold,
float nms_threshold,
int top_k )
static

Creates an instance of face detector class with given parameters.

Parameters
modelthe path to the requested model
configthe path to the config file for compability, 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

◆ create() [35/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string model,
string config,
Size input_size,
float score_threshold,
float nms_threshold,
int top_k,
int backend_id )
static

Creates an instance of face detector class with given parameters.

Parameters
modelthe path to the requested model
configthe path to the config file for compability, 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

◆ create() [36/36]

static FaceDetectorYN OpenCVForUnity.ObjdetectModule.FaceDetectorYN.create ( string model,
string config,
Size input_size,
float score_threshold,
float nms_threshold,
int top_k,
int backend_id,
int target_id )
static

Creates an instance of face detector class with given parameters.

Parameters
modelthe path to the requested model
configthe path to the config file for compability, 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

◆ detect()

int OpenCVForUnity.ObjdetectModule.FaceDetectorYN.detect ( Mat image,
Mat faces )

Detects faces in the input image. Following is an example output.

image

Parameters
imagean image to detect
facesdetection results stored in a 2D cv::Mat of shape [num_faces, 15]
  • 0-1: x, y of bbox top left corner
  • 2-3: width, height of bbox
  • 4-5: x, y of right eye (blue point in the example image)
  • 6-7: x, y of left eye (red point in the example image)
  • 8-9: x, y of nose tip (green point in the example image)
  • 10-11: x, y of right corner of mouth (pink point in the example image)
  • 12-13: x, y of left corner of mouth (yellow point in the example image)
  • 14: face score

◆ Dispose()

override void OpenCVForUnity.ObjdetectModule.FaceDetectorYN.Dispose ( bool disposing)
protectedvirtual

◆ getInputSize()

Size OpenCVForUnity.ObjdetectModule.FaceDetectorYN.getInputSize ( )

◆ getInputSizeAsValueTuple()

double double height OpenCVForUnity.ObjdetectModule.FaceDetectorYN.getInputSizeAsValueTuple ( )

◆ getInputSizeAsVec2d()

Vec2d OpenCVForUnity.ObjdetectModule.FaceDetectorYN.getInputSizeAsVec2d ( )

◆ getNativeObjAddr()

IntPtr OpenCVForUnity.ObjdetectModule.FaceDetectorYN.getNativeObjAddr ( )

◆ getNMSThreshold()

float OpenCVForUnity.ObjdetectModule.FaceDetectorYN.getNMSThreshold ( )

◆ getScoreThreshold()

float OpenCVForUnity.ObjdetectModule.FaceDetectorYN.getScoreThreshold ( )

◆ getTopK()

int OpenCVForUnity.ObjdetectModule.FaceDetectorYN.getTopK ( )

◆ setInputSize() [1/3]

void OpenCVForUnity.ObjdetectModule.FaceDetectorYN.setInputSize ( in Vec2d input_size)

Set the size for the network input, which overwrites the input size of creating model. Call this method when the size of input image does not match the input size when creating model.

Parameters
input_sizethe size of the input image

◆ setInputSize() [2/3]

void OpenCVForUnity.ObjdetectModule.FaceDetectorYN.setInputSize ( in(double width, double height) input_size)

Set the size for the network input, which overwrites the input size of creating model. Call this method when the size of input image does not match the input size when creating model.

Parameters
input_sizethe size of the input image

◆ setInputSize() [3/3]

void OpenCVForUnity.ObjdetectModule.FaceDetectorYN.setInputSize ( Size input_size)

Set the size for the network input, which overwrites the input size of creating model. Call this method when the size of input image does not match the input size when creating model.

Parameters
input_sizethe size of the input image

◆ setNMSThreshold()

void OpenCVForUnity.ObjdetectModule.FaceDetectorYN.setNMSThreshold ( float nms_threshold)

Set the Non-maximum-suppression threshold to suppress bounding boxes that have IoU greater than the given value.

Parameters
nms_thresholdthreshold for NMS operation

◆ setScoreThreshold()

void OpenCVForUnity.ObjdetectModule.FaceDetectorYN.setScoreThreshold ( float score_threshold)

Set the score threshold to filter out bounding boxes of score less than the given value.

Parameters
score_thresholdthreshold for filtering out bounding boxes

◆ setTopK()

void OpenCVForUnity.ObjdetectModule.FaceDetectorYN.setTopK ( int top_k)

Set the number of bounding boxes preserved before NMS.

Parameters
top_kthe number of bounding boxes to preserve from top rank based on score

Member Data Documentation

◆ width

double OpenCVForUnity.ObjdetectModule.FaceDetectorYN.width

The documentation for this class was generated from the following files: