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
- Host: GitHub
- URL: https://github.com/qengineering/face-detection-landmark-raspberry-pi-32-64-bits
- Owner: Qengineering
- License: bsd-3-clause
- Created: 2021-02-23T17:28:12.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-12T16:19:55.000Z (about 4 years ago)
- Last Synced: 2025-03-10T19:56:26.715Z (3 months ago)
- Topics: aarch64, armv8, face-detection, high-fps, landmark-recognition, ncnn, ncnn-framework, raspberry-pi-4, ssd-model
- Language: C++
- Homepage: https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html
- Size: 11.5 MB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Face-detection-Landmark-Raspberry-Pi-32-64-bits

## A fast face detection with landmarks running on a bare Raspberry Pi 4.
[](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