You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It turns out that doing face detection in 2025 is much more efficient with neural networks than cascades.
6
+
So here is an OF example that uses opencv's facedetectoryn (for yunet).
7
+
8
+
You will need the file with the pre-trained model. The model version must be compatible with your opencv version.
9
+
10
+
How to find out your opencv version?
11
+
* It will be printed out during the ofApp::setup() function.
12
+
* If you have a version greater than 4.9, you can download the current [face_detection_yunet_2023mar.onnx](https://github.com/opencv/opencv_zoo/tree/main/models/face_detection_yunet) model
13
+
* If your version is 4.6 or earlier, download the [2022](https://github.com/opencv/opencv_zoo/blob/088c3571ec70df15100a5e4c26894d95951e92e9/models/face_detection_yunet/face_detection_yunet_2022mar.onnx) version of the model.
14
+
15
+
The versions are coded in the ofApp::setup() function. Different versions might require editing the code.
16
+
17
+
### Expected behavior
18
+
19
+
The camera starts, and a red square will be drawn around the faces found.
0 commit comments