Detect and blur faces in less than a second with the help of OpenCV and dlib.
You have to install OpenCV. You can see instruction here.
You also have to install dlib, you can get instruction here.
Clone this repo, put the images that you want to blur in the images folder.
Run the program, and you will get the blurred faces in dist folder.
git clone https://github.com/obito/faceblur
cd faceblur
go mod download
go run .
-cnn
flag is used to tell if it should use CNN for recognition. Default is false.
Unfortunately I can't provide binaries because of OpenCV limitations, I can't cross compile CGO.
Before | After |
---|---|
Before (without CNN) | After (without CNN) |
---|---|
- CNN recognizing (takes more time).
- Try different tolerance values of
ClassifyThreshold
- Try different size/padding/jittering values of
NewRecognizerWithConfig
- Train network (
dlib_face_recognition_resnet_model_v1.dat
) on your own data.