/// <summary> /// Creates an instance of this class with given parameters. /// </summary> /// <param name="model">The path to the requested model</param> /// <param name="config">The path to the config file for compability, which is not requested for ONNX models</param> /// <param name="inputSize">The size of the input image</param> /// <param name="scoreThreshold">The threshold to filter out bounding boxes of score smaller than the given value</param> /// <param name="nmsThreshold">The threshold to suppress bounding boxes of IoU bigger than the given value</param> /// <param name="topK">Keep top K bboxes before NMS</param> /// <param name="backendId">The id of backend</param> /// <param name="targetId">The id of target device</param> public FaceDetectorYN( String model, String config, Size inputSize, float scoreThreshold, float nmsThreshold, int topK, Emgu.CV.Dnn.Backend backendId, Emgu.CV.Dnn.Target targetId) { using (CvString csModel = new CvString(model)) using (CvString csConfig = new CvString(config)) { _ptr = CvInvoke.cveFaceDetectorYNCreate( csModel, csConfig, ref inputSize, scoreThreshold, nmsThreshold, topK, backendId, targetId, ref _sharedPtr ); } }
internal static extern IntPtr cveFaceDetectorYNCreate( IntPtr model, IntPtr config, ref Size inputSize, float scoreThreshold, float nmsThreshold, int topK, Emgu.CV.Dnn.Backend backendId, Emgu.CV.Dnn.Target targetId, ref IntPtr sharedPtr);
/// <summary> /// Creates an instance of this class with given parameters. /// </summary> /// <param name="model">The path of the onnx model used for face recognition</param> /// <param name="config">The path to the config file for compability, which is not requested for ONNX models</param> /// <param name="backendId">The id of backend</param> /// <param name="targetId">The id of target device</param> public FaceRecognizerSF( String model, String config, Emgu.CV.Dnn.Backend backendId, Emgu.CV.Dnn.Target targetId) { using (CvString csModel = new CvString(model)) using (CvString csConfig = new CvString(config)) { _ptr = CvInvoke.cveFaceRecognizerSFCreate( csModel, csConfig, backendId, targetId, ref _sharedPtr ); } }
internal static extern IntPtr cveFaceRecognizerSFCreate( IntPtr model, IntPtr config, Emgu.CV.Dnn.Backend backendId, Emgu.CV.Dnn.Target targetId, ref IntPtr sharedPtr);