Skip to content

Latest commit

 

History

History

output image Find this example on our SD-image

Super fast face detection at 80 FPS on bare Raspberry Pi 4.


Benchmark.

Model framework model size mAP Jetson Nano
2015 MHz
RPi 4 64-OS
1950 MHz
Ultra-Light-Fast ncnn slim-320 320x240 67.1 - FPS 26 FPS
Ultra-Light-Fast ncnn RFB-320 320x240 69.8 - FPS 23 FPS
Ultra-Light-Fast MNN slim-320 320x240 67.1 70 FPS 65 FPS
Ultra-Light-Fast MNN RFB-320 320x240 69.8 60 FPS 56 FPS
Ultra-Light-Fast OpenCV slim-320 320x240 67.1 48 FPS 40 FPS
Ultra-Light-Fast OpenCV RFB-320 320x240 69.8 43 FPS 35 FPS
Ultra-Light-Fast + Landmarks ncnn slim-320 320x240 67.1 50 FPS 24 FPS
LFFD ncnn 5 stage 320x240 88.6 16.4 FPS 4.85 FPS
LFFD ncnn 8 stage 320x240 88.6 11.7 FPS 3.45 FPS
LFFD MNN 5 stage 320x240 88.6 2.6 FPS 2.17 FPS
LFFD MNN 8 stage 320x240 88.6 1.8 FPS 1.49 FPS
CenterFace ncnn - 320x240 93 16.5 FPS 6.8 FPS

Dependencies 32-bit OS.

To run the application, you have to:

Dependencies 64-bit OS.

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


Running the app.

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

Your MyDir/MNN folder must now look like this:
Walk2.mp4 (demo video)
FaceDetection.cpb (code::blocks project file)
main.cpp (main example file)
MNN_UltraFace.cpp (Ultra face class)
MNN_UltraFace.hpp (Ultra face class)
RFB-320.mnn (fp32)
RFB-320-quant-ADMM-32.mnn (int8 ADMM quantified)
RFB-320-quant-KL-5792.mnn (int8 KL quantified)
slim_320.mnn (fp32)
slim_320-quant-ADMM-50.mnn (int8 ADMM quantified)

The RFB-320 model recognizes slightly more faces than slim_320 at the expense of a little bit of speed. The quantified models are a lot faster. Choose the one you like.
See the video at https://youtu.be/DERA83C9K2A

RFB-320

output image

RFB-320-quant-ADMM-32 (int8 ADMM quantified)

output image

RFB-320-quant-KL-5792 (int8 KL quantified)

output image

slim_320

output image

slim_320-quant-ADMM-50 (int8 ADMM quantified)

output image


paypal