FaceDetectorYN class
DNN-based face detector.
model download link: https://github.com/opencv/opencv_zoo/tree/master/models/face_detection_yunet
- Inheritance
- Available extensions
Constructors
- FaceDetectorYN.fromBuffer(String framework, Uint8List bufferModel, Uint8List bufferConfig, (int, int) inputSize, {double scoreThreshold = 0.9, double nmsThreshold = 0.3, int topK = 5000, int backendId = 0, int targetId = 0})
-
Creates an instance of face detector class with given parameters.
factory
- FaceDetectorYN.fromFile(String model, String config, (int, int) inputSize, {double scoreThreshold = 0.9, double nmsThreshold = 0.3, int topK = 5000, int backendId = 0, int targetId = 0})
-
Creates an instance of face detector class with given parameters.
factory
- FaceDetectorYN.fromPointer(FaceDetectorYNPtr ptr, [bool attach = true])
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDisposed → bool
-
Whether this object has been disposed.
no setterinherited
-
props
→ List<
Object?> -
no setterinherited
-
ptr
↔ Pointer<
FaceDetectorYN> -
getter/setter pairinherited
- ref → FaceDetectorYN
-
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
detect(
Mat image) → Mat - Detects faces in the input image. Following is an example output.
-
detectAsync(
Mat image) → Future< Mat> -
Available on FaceDetectorYN, provided by the FaceDetectorYNAsync extension
-
dispose(
) → void -
Releases the underlying native resources. Idempotent: calling it more
than once is safe, but the object must not be used after dispose.
inherited
-
freeNative(
) → void -
Frees the native resources owned by this object. Subclasses implement the
concrete free logic here; callers must use dispose instead.
override
-
getInputSize(
) → (int, int) - https://docs.opencv.org/4.x/df/d20/classcv_1_1FaceDetectorYN.html#a68b6fb9bffbed0f3d5c104996113f247
-
getNmsThreshold(
) → double - https://docs.opencv.org/4.x/df/d20/classcv_1_1FaceDetectorYN.html#a40749dc04b9578631d55122be9ab10c3
-
getScoreThreshold(
) → double - https://docs.opencv.org/4.x/df/d20/classcv_1_1FaceDetectorYN.html#a5329744e10441e1c01526f1ff10b80de
-
getTopK(
) → int - https://docs.opencv.org/4.x/df/d20/classcv_1_1FaceDetectorYN.html#acc6139ba763acd67f4aa738cee45b7ec
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setInputSize(
(int, int) inputSize) → void - 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.
-
setNMSThreshold(
double nmsThreshold) → void - Set the Non-maximum-suppression threshold to suppress bounding boxes that have IoU greater than the given value.
-
setScoreThreshold(
double scoreThreshold) → void - Set the score threshold to filter out bounding boxes of score less than the given value.
-
setTopK(
int topK) → void - Set the number of bounding boxes preserved before NMS.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- finalizer → NativeFinalizer
-
final