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

https://github.com/qengineering/head-pose-ncnn-raspberry-pi-4

Ultra fast head pose estimation on a bare Raspberry Pi 4 at 20 FPS
https://github.com/qengineering/head-pose-ncnn-raspberry-pi-4

aarch64 cpp deep-learning head-pose head-pose-estimation head-position ncnn ncnn-model raspberry raspberry-pi-4 raspberry-pi-64-os

Last synced: 8 months ago
JSON representation

Ultra fast head pose estimation on a bare Raspberry Pi 4 at 20 FPS

Awesome Lists containing this project

README

          

# Head Pose estimation Raspberry-Pi-4
![output image]( https://qengineering.eu/images/HeadPose_9.jpg )
## Head pose with the ncnn framework.

[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)


Special made for a bare Raspberry Pi 4, see [Q-engineering deep learning examples](https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html)

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

## Dependencies.
To run the application, you have to:
- A raspberry Pi 4 with a 32 or 64-bit operating system. It can be the Raspberry 64-bit OS, or Ubuntu 18.04 / 20.04. [Install 64-bit OS](https://qengineering.eu/install-raspberry-64-os.html)

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

- OpenCV 64 bit installed. [Install OpenCV 4.5](https://qengineering.eu/install-opencv-4.5-on-raspberry-64-os.html)

- 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/Head-Pose-ncnn-Raspberry-Pi-4/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:

9.jpg

Group2.jpg

Group4.jpg

HeadPose.cpb

main.cpp

FaceDetector.cpp

FaceDetector.h

face.bin

face.param

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

## Running the app.
To run the application load the project file HeadPose.cbp in Code::Blocks.

Next, follow the instructions at [Hands-On](https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html#HandsOn).


We only use 5 landmarks. For the PnP solver you need at least 6 points. The sixth point (chin) is interpolated from the nose and the corners of the mouth.
Needless to say, there are more accurate methods. But they all require more computing power. The processing speed will therefore be much lower.

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

### 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/HeadPose_2.jpg )

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

[![paypal](https://qengineering.eu/images/TipJarSmall4.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CPZTM5BB3FCYL)