Code Monkey home page Code Monkey logo

face-detection-landmark-raspberry-pi-32-64-bits's Introduction

Face-detection-Landmark-Raspberry-Pi-32-64-bits

output image

A fast face detection with landmarks running on a bare Raspberry Pi 4.

License

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).


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:

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


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

face-detection-landmark-raspberry-pi-32-64-bits's People

Contributors

qengineering avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

anka0991

face-detection-landmark-raspberry-pi-32-64-bits's Issues

undefined reference error compiling main.cpp

Command:
g++ main.cpp

Error:
/usr/bin/ld: /tmp/ccfhTjVl.o: in function main': main.cpp:(.text+0xc0): undefined reference to Detector::Detector(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/usr/bin/ld: main.cpp:(.text+0x114): undefined reference to cv::VideoCapture::VideoCapture(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)' /usr/bin/ld: main.cpp:(.text+0x12c): undefined reference to cv::VideoCapture::isOpened() const'
/usr/bin/ld: main.cpp:(.text+0x1a4): undefined reference to cv::VideoCapture::operator>>(cv::Mat&)' /usr/bin/ld: main.cpp:(.text+0x284): undefined reference to cv::resize(cv::InputArray const&, cv::OutputArray const&, cv::Size, double, double, int)'
/usr/bin/ld: main.cpp:(.text+0x2b4): undefined reference to Detector::Detect(cv::Mat&, std::vector<bbox, std::allocator<bbox> >&)' /usr/bin/ld: main.cpp:(.text+0x3f8): undefined reference to cv::rectangle(cv::InputOutputArray const&, cv::Rect, cv::Scalar
const&, int, int, int)'
/usr/bin/ld: main.cpp:(.text+0x498): undefined reference to cv::circle(cv::_InputOutputArray const&, cv::Point_<int>, int, cv::Scalar_<double> const&, int, int, int)' /usr/bin/ld: main.cpp:(.text+0x540): undefined reference to cv::circle(cv::InputOutputArray const&, cv::Point, int, cv::Scalar
const&, int, int, int)'
/usr/bin/ld: main.cpp:(.text+0x5e8): undefined reference to cv::circle(cv::_InputOutputArray const&, cv::Point_<int>, int, cv::Scalar_<double> const&, int, int, int)' /usr/bin/ld: main.cpp:(.text+0x688): undefined reference to cv::circle(cv::InputOutputArray const&, cv::Point, int, cv::Scalar const&, int, int, int)'
/usr/bin/ld: main.cpp:(.text+0x728): undefined reference to cv::circle(cv::_InputOutputArray const&, cv::Point_<int>, int, cv::Scalar_<double> const&, int, int, int)' /usr/bin/ld: main.cpp:(.text+0x81c): undefined reference to cv::format[abi:cxx11](char const*, ...)'
/usr/bin/ld: main.cpp:(.text+0x880): undefined reference to cv::putText(cv::_InputOutputArray const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' /usr/bin/ld: main.cpp:(.text+0x8cc): undefined reference to cv::imshow(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, cv::_InputArray const&)'
/usr/bin/ld: main.cpp:(.text+0x8ec): undefined reference to cv::waitKey(int)' /usr/bin/ld: main.cpp:(.text+0x93c): undefined reference to cv::destroyAllWindows()'
/usr/bin/ld: main.cpp:(.text+0x948): undefined reference to cv::VideoCapture::~VideoCapture()' /usr/bin/ld: main.cpp:(.text+0x950): undefined reference to Detector::~Detector()'
/usr/bin/ld: main.cpp:(.text+0xa9c): undefined reference to cv::VideoCapture::~VideoCapture()' /usr/bin/ld: main.cpp:(.text+0xaa4): undefined reference to Detector::~Detector()'
/usr/bin/ld: /tmp/ccfhTjVl.o: in function cv::Mat::~Mat()': main.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x34): undefined reference to cv::fastFree(void*)'
/usr/bin/ld: /tmp/ccfhTjVl.o: in function cv::Mat::release()': main.cpp:(.text._ZN2cv3Mat7releaseEv[_ZN2cv3Mat7releaseEv]+0x54): undefined reference to cv::Mat::deallocate()'
collect2: error: ld returned 1 exit status

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.