Qengineering / CenterFace-ncnn-Jetson-Nano

CenterFace face detection with ncnn for Raspberry Pi 4

Home Page:https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CenterFace face detection Jetson Nano

output image

CenterFace face detection with the ncnn framework.

License

Paper: https://arxiv.org/ftp/arxiv/papers/1911/1911.03599.pdf

Special made for a bare Raspberry Pi 4 see Q-engineering deep learning examples


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.

April 4 2021: Adapted for ncnn version 20210322 or later

To run the application, you have to:

  • The Tencent ncnn framework installed. Install ncnn
  • OpenCV 64 bit installed. Install OpenCV 4.5
  • Code::Blocks installed. ($ sudo apt-get install codeblocks)

Installing the app.

To extract and run the network in Code::Blocks
$ mkdir MyDir
$ cd MyDir
$ wget https://github.com/Qengineering/CenterFace-ncnn-Jetson-Nano/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 LICENSE
$ rm README.md

Your MyDir folder must now look like this:
selfie.jpg
Walks2.mp4
CenterFace_ncnn.cpb
main.cpp
ncnn_centerface.h
ncnn_centerface.cpp
centerface.bin
centerface.param


Running the app.

To run the application load the project file CenterFace_ncnn.cbp in Code::Blocks.
Next, follow the instructions at Hands-On.

By default, the images are resized to 320x240. It gives you a fast, but less accurate result. Commenting on line 8 #define RESIZE will scan the full size of the image, resulting in the most accurate output. However, it will take more processing time depending on the size.


paypal

About

CenterFace face detection with ncnn for Raspberry Pi 4

https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C++ 100.0%