An open API service indexing awesome lists of open source software.

https://github.com/qengineering/face-detection-landmark-raspberry-pi-32-64-bits

Super fast face detection with landmarks on Raspberry Pi 4
https://github.com/qengineering/face-detection-landmark-raspberry-pi-32-64-bits

aarch64 armv8 face-detection high-fps landmark-recognition ncnn ncnn-framework raspberry-pi-4 ssd-model

Last synced: about 2 months ago
JSON representation

Super fast face detection with landmarks on Raspberry Pi 4

Awesome Lists containing this project

README

        

# Face-detection-Landmark-Raspberry-Pi-32-64-bits
![output image]( https://qengineering.eu/images/Face_Land_9.jpg )
## A fast face detection with landmarks running on a bare Raspberry Pi 4.
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

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](https://github.com/Qengineering/Face-Recognition-Raspberry-Pi-64-bits)).

------------

## 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:

- A raspberry Pi 4 with a 64-bit operating system. It can be the Raspberry 64-bit OS, or Ubuntu 18.04 / 20.04. (https://qengineering.eu/install-raspberry-64-os.html)

- The Tencent ncnn framework installed. (https://qengineering.eu/install-ncnn-on-raspberry-pi-4.html)

- OpenCV 64 bit installed. (https://qengineering.eu/install-opencv-4.3-on-raspberry-64-os.html)

- Code::Blocks installed.

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

- The Tencent ncnn framework installed. (https://qengineering.eu/install-ncnn-on-raspberry-pi-4.html)

- OpenCV 32 bit installed. (https://qengineering.eu/install-opencv-4.3-on-raspberry-pi-4.html)

- Code::Blocks installed.

------------

## 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]( https://qengineering.eu/images/Face_Land_11.jpg )