{"id":21802533,"url":"https://github.com/qengineering/head-pose-ncnn-raspberry-pi-4","last_synced_at":"2025-10-07T23:30:39.824Z","repository":{"id":112946330,"uuid":"440485395","full_name":"Qengineering/Head-Pose-ncnn-Raspberry-Pi-4","owner":"Qengineering","description":"Ultra fast head pose estimation on a bare Raspberry Pi 4 at 20 FPS","archived":false,"fork":false,"pushed_at":"2021-12-21T11:31:35.000Z","size":16163,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-27T11:36:26.839Z","etag":null,"topics":["aarch64","cpp","deep-learning","head-pose","head-pose-estimation","head-position","ncnn","ncnn-model","raspberry","raspberry-pi-4","raspberry-pi-64-os"],"latest_commit_sha":null,"homepage":"https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Qengineering.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-21T10:58:00.000Z","updated_at":"2024-04-02T09:59:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"6dbebbc1-4782-4fb2-9f5e-723af9c5999c","html_url":"https://github.com/Qengineering/Head-Pose-ncnn-Raspberry-Pi-4","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FHead-Pose-ncnn-Raspberry-Pi-4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FHead-Pose-ncnn-Raspberry-Pi-4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FHead-Pose-ncnn-Raspberry-Pi-4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FHead-Pose-ncnn-Raspberry-Pi-4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Qengineering","download_url":"https://codeload.github.com/Qengineering/Head-Pose-ncnn-Raspberry-Pi-4/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235661843,"owners_count":19025607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aarch64","cpp","deep-learning","head-pose","head-pose-estimation","head-position","ncnn","ncnn-model","raspberry","raspberry-pi-4","raspberry-pi-64-os"],"created_at":"2024-11-27T11:29:21.186Z","updated_at":"2025-10-07T23:30:33.260Z","avatar_url":"https://github.com/Qengineering.png","language":"C++","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=CPZTM5BB3FCYL"],"categories":[],"sub_categories":[],"readme":"# Head Pose estimation Raspberry-Pi-4\n![output image]( https://qengineering.eu/images/HeadPose_9.jpg )\n## Head pose with the ncnn framework. \u003cbr/\u003e\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\u003cbr/\u003e\u003cbr/\u003e\nSpecial 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)\n\n------------\n\n## Dependencies.\nTo run the application, you have to:\n- 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) \u003cbr/\u003e\n- The Tencent ncnn framework installed. [Install ncnn](https://qengineering.eu/install-ncnn-on-raspberry-pi-4.html) \u003cbr/\u003e\n- OpenCV 64 bit installed. [Install OpenCV 4.5](https://qengineering.eu/install-opencv-4.5-on-raspberry-64-os.html) \u003cbr/\u003e\n- Code::Blocks installed. (```$ sudo apt-get install codeblocks```)\n\n------------\n\n## Installing the app.\nTo extract and run the network in Code::Blocks \u003cbr/\u003e\n$ mkdir *MyDir* \u003cbr/\u003e\n$ cd *MyDir* \u003cbr/\u003e\n$ wget https://github.com/Qengineering/Head-Pose-ncnn-Raspberry-Pi-4/archive/refs/heads/main.zip \u003cbr/\u003e\n$ unzip -j master.zip \u003cbr/\u003e\nRemove master.zip, LICENSE and README.md as they are no longer needed. \u003cbr/\u003e \n$ rm master.zip \u003cbr/\u003e\n$ rm LICENSE \u003cbr/\u003e\n$ rm README.md \u003cbr/\u003e \u003cbr/\u003e\nYour *MyDir* folder must now look like this: \u003cbr/\u003e \n9.jpg \u003cbr/\u003e\nGroup2.jpg \u003cbr/\u003e\nGroup4.jpg \u003cbr/\u003e\nHeadPose.cpb \u003cbr/\u003e\nmain.cpp \u003cbr/\u003e\nFaceDetector.cpp \u003cbr/\u003e\nFaceDetector.h \u003cbr/\u003e\nface.bin \u003cbr/\u003e\nface.param \u003cbr/\u003e\n\n------------\n\n## Running the app.\nTo run the application load the project file HeadPose.cbp in Code::Blocks.\u003cbr/\u003e \nNext, follow the instructions at [Hands-On](https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html#HandsOn).\u003cbr/\u003e\u003cbr/\u003e\nWe 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.\nNeedless to say, there are more accurate methods. But they all require more computing power. The processing speed will therefore be much lower.\n\n------------\n\n### Thanks.\nhttps://github.com/Tencent/ncnn\u003cbr/\u003e\nhttps://github.com/nihui\u003cbr/\u003e\nhttps://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB\u003cbr/\u003e\nhttps://github.com/biubug6/Face-Detector-1MB-with-landmark/tree/master/Face_Detector_ncnn\u003cbr/\u003e\u003cbr/\u003e\n\n![output image]( https://qengineering.eu/images/HeadPose_2.jpg )\n\n------------\n\n[![paypal](https://qengineering.eu/images/TipJarSmall4.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=CPZTM5BB3FCYL) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqengineering%2Fhead-pose-ncnn-raspberry-pi-4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqengineering%2Fhead-pose-ncnn-raspberry-pi-4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqengineering%2Fhead-pose-ncnn-raspberry-pi-4/lists"}