Qengineering / Face-detection-Landmark-Raspberry-Pi-32-64-bits

Super fast face detection with landmarks on Raspberry Pi 4
https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html
BSD 3-Clause "New" or "Revised" License
6 stars 1 forks source link
aarch64 armv8 face-detection high-fps landmark-recognition ncnn ncnn-framework raspberry-pi-4 ssd-model

Face-detection-Landmark-Raspberry-Pi-32-64-bits

output image

A fast face detection with landmarks running on a bare Raspberry Pi 4.

License

This C ++ application detects faces in a scene. At the same time, the characteristic landmarks are located so that you can use them as input for a face recognition algorithm. (see: Face recognition).


Benchmark.

RPi 4 64-OS 1950 MHz RPi 4 64-OS 1500 MHz Jetson Nano 2015 MHz Jetson Nano 1479 MHz
20 mS 23 mS 11 mS 14 mS

Dependencies.

To run the application on a 64 OS, you have to:

To run the application on a 32 OS, you need:


Running the app.

To extract and run the network in Code::Blocks
$ mkdir MyDir
$ cd MyDir
$ wget https://github.com/Qengineering/Face-detection-Landmark-Raspberry-Pi-32-64-bits/archive/refs/heads/main.zip
$ unzip -j master.zip
Remove master.zip, LICENSE and README.md as they are no longer needed.
$ rm master.zip
$ rm README.md

Your MyDir/ncnn folder must now look like this:
9.jpg
11.jpg
Walk2.mp4 (demo video)
FaceLandmark.cpb (code::blocks project file)
main.cpp (main example file)
FaceDetector.cpp (Ultra face class)
FaceDetector.hpp (Ultra face class)
face.bin (ncnn model)
face.param (ncnn topology file)


WebCam.

If you want to use a camera please alter line 22 in main.cpp to
cv::VideoCapture cap(0); //WebCam
If you want to run a movie please alter line 22 in main.cpp to
cv::VideoCapture cap("Walks2.mp4"); //Movie


Thanks.

https://github.com/Tencent/ncnn
https://github.com/nihui
https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB
https://github.com/biubug6/Face-Detector-1MB-with-landmark/tree/master/Face_Detector_ncnn

output image