OpenCV for Unity
2.6.0
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.9.0/index.html ) for the details of the argument of the method.
|
DNN-based face detector. More...
Public Member Functions | |
IntPtr | getNativeObjAddr () |
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. More... | |
Size | getInputSize () |
void | setScoreThreshold (float score_threshold) |
Set the score threshold to filter out bounding boxes of score less than the given value. More... | |
float | getScoreThreshold () |
void | setNMSThreshold (float nms_threshold) |
Set the Non-maximum-suppression threshold to suppress bounding boxes that have IoU greater than the given value. More... | |
float | getNMSThreshold () |
void | setTopK (int top_k) |
Set the number of bounding boxes preserved before NMS. More... | |
int | getTopK () |
int | detect (Mat image, Mat faces) |
Detects faces in the input image. Following is an example output. More... | |
Public Member Functions inherited from OpenCVForUnity.DisposableObject | |
void | Dispose () |
void | ThrowIfDisposed () |
Static Public Member Functions | |
static FaceDetectorYN | __fromPtr__ (IntPtr addr) |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
static FaceDetectorYN | create (string model, string config, Size input_size, float score_threshold) |
Creates an instance of face detector class with given parameters. More... | |
static FaceDetectorYN | create (string model, string config, Size input_size) |
Creates an instance of face detector class with given parameters. More... | |
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 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) |
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) |
static FaceDetectorYN | create (string framework, MatOfByte bufferModel, MatOfByte bufferConfig, Size input_size) |
Static Public Member Functions inherited from OpenCVForUnity.DisposableObject | |
static IntPtr | ThrowIfNullIntPtr (IntPtr ptr) |
Protected Member Functions | |
override void | Dispose (bool disposing) |
Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject | |
DisposableOpenCVObject () | |
DisposableOpenCVObject (IntPtr ptr) | |
DisposableOpenCVObject (bool isEnabledDispose) | |
DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose) | |
Protected Member Functions inherited from OpenCVForUnity.DisposableObject | |
DisposableObject () | |
DisposableObject (bool isEnabledDispose) | |
Additional Inherited Members | |
Properties inherited from OpenCVForUnity.DisposableObject | |
bool | IsDisposed [get, protected set] |
bool | IsEnabledDispose [get, set] |
DNN-based face detector.
model download link: https://github.com/opencv/opencv_zoo/tree/master/models/face_detection_yunet
|
static |
|
static |
Creates an instance of face detector class with given parameters.
model | the path to the requested model |
config | the path to the config file for compability, 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 |
|
static |
Creates an instance of face detector class with given parameters.
model | the path to the requested model |
config | the path to the config file for compability, 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 |
|
static |
Creates an instance of face detector class with given parameters.
model | the path to the requested model |
config | the path to the config file for compability, 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 |
|
static |
Creates an instance of face detector class with given parameters.
model | the path to the requested model |
config | the path to the config file for compability, 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 |
|
static |
Creates an instance of face detector class with given parameters.
model | the path to the requested model |
config | the path to the config file for compability, 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 |
|
static |
Creates an instance of face detector class with given parameters.
model | the path to the requested model |
config | the path to the config file for compability, 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 |
|
static |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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 |
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 |
|
static |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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 |
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 |
|
static |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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 |
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 |
|
static |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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 |
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 |
|
static |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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 |
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 |
|
static |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
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 |
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 |
Detects faces in the input image. Following is an example output.
image | an image to detect |
faces | detection results stored in a 2D cv::Mat of shape [num_faces, 15]
|
|
protectedvirtual |
Reimplemented from OpenCVForUnity.DisposableOpenCVObject.
Size OpenCVForUnity.ObjdetectModule.FaceDetectorYN.getInputSize | ( | ) |
IntPtr OpenCVForUnity.ObjdetectModule.FaceDetectorYN.getNativeObjAddr | ( | ) |
float OpenCVForUnity.ObjdetectModule.FaceDetectorYN.getNMSThreshold | ( | ) |
float OpenCVForUnity.ObjdetectModule.FaceDetectorYN.getScoreThreshold | ( | ) |
int OpenCVForUnity.ObjdetectModule.FaceDetectorYN.getTopK | ( | ) |
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.
input_size | the size of the input image |
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.
nms_threshold | threshold for NMS operation |
void OpenCVForUnity.ObjdetectModule.FaceDetectorYN.setScoreThreshold | ( | float | score_threshold | ) |
Set the score threshold to filter out bounding boxes of score less than the given value.
score_threshold | threshold for filtering out bounding boxes |
void OpenCVForUnity.ObjdetectModule.FaceDetectorYN.setTopK | ( | int | top_k | ) |
Set the number of bounding boxes preserved before NMS.
top_k | the number of bounding boxes to preserve from top rank based on score |