{"id":21802540,"url":"https://github.com/qengineering/face-mask-detection-jetson-nano","last_synced_at":"2025-04-13T18:42:11.101Z","repository":{"id":112946069,"uuid":"320298903","full_name":"Qengineering/Face-Mask-Detection-Jetson-Nano","owner":"Qengineering","description":"Face mask detection on a Jetson Nano","archived":false,"fork":false,"pushed_at":"2021-04-19T11:07:43.000Z","size":5081,"stargazers_count":14,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T09:23:23.188Z","etag":null,"topics":["aarch64","cpp","deep-learning","face-detection","face-mask","face-mask-detection","face-recognition","high-fps","jetson-nano","ncnn","ncnn-framework","paddle","paddle-lite","ssd-model"],"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":"2020-12-10T14:35:52.000Z","updated_at":"2023-09-08T22:19:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"aa7daf18-43ea-4fa2-b1db-7e0d46856917","html_url":"https://github.com/Qengineering/Face-Mask-Detection-Jetson-Nano","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%2FFace-Mask-Detection-Jetson-Nano","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FFace-Mask-Detection-Jetson-Nano/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FFace-Mask-Detection-Jetson-Nano/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FFace-Mask-Detection-Jetson-Nano/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Qengineering","download_url":"https://codeload.github.com/Qengineering/Face-Mask-Detection-Jetson-Nano/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248764599,"owners_count":21158125,"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","face-detection","face-mask","face-mask-detection","face-recognition","high-fps","jetson-nano","ncnn","ncnn-framework","paddle","paddle-lite","ssd-model"],"created_at":"2024-11-27T11:29:22.885Z","updated_at":"2025-04-13T18:42:11.089Z","avatar_url":"https://github.com/Qengineering.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Face-Mask-Detection-Jetson-Nano\n![output image]( https://qengineering.eu/images/FamilyOut.jpg )\n\n## A fast face mask recognition running at 44-5 FPS on a Jetson Nano.\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\u003cbr/\u003e\u003cbr/\u003e\nThis is a fast C++ implementation of two deep learning models found in the public domain. \u003cbr/\u003e\u003cbr/\u003e\nThe first is face detector of Linzaer running on a ncnn framework.\u003cbr/\u003e \nhttps://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB. \u003cbr/\u003e\u003cbr/\u003e\nThe second is the Paddle Lite mask detection which classifies the found faces.\u003cbr/\u003e \nhttps://github.com/PaddlePaddle/Paddle-Lite/tree/develop/lite/demo/cxx/mask_detection. \u003cbr/\u003e\u003cbr/\u003e\nThe frame rate depends on the number of detected faces and can be calculated as follows: \u003cbr/\u003e\nFPS = 1.0/(0.022 + 0.008 x #Faces) when overclocked to 2014 MHz. \u003cbr/\u003e\u003cbr/\u003e\nPaper: https://arxiv.org/abs/1905.00641.pdf \u003cbr/\u003e\nSize: 320x320 \u003cbr/\u003e\u003cbr/\u003e\nSpecial made for a Jetson Nano see [Q-engineering deep learning examples](https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html) \u003cbr/\u003e\n### New version 2.0.\nA new and superior version with only __TensorFlow Lite__ for a Jetson Nano see [GitHub](https://github.com/Qengineering/TensorFlow_Lite_Face_Mask_Jetson-Nano) \u003cbr/\u003e\n## Dependencies.\n### April 4 2021: Adapted for ncnn version 20210322 or later\nTo run the application, you have to:\n- The Paddle Lite framework installed. [Install Paddle](https://qengineering.eu/install-paddle-on-jetson-nano.html) \u003cbr/\u003e\n- The Tencent ncnn framework installed. [Install ncnn](https://qengineering.eu/install-ncnn-on-jetson-nano.html) \u003cbr/\u003e\n- Code::Blocks installed. (```$ sudo apt-get install codeblocks```)\n## Running 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/Face-Mask-Detection-Jetson-Nano/archive/refs/heads/main.zip \u003cbr/\u003e\n$ unzip -j master.zip \u003cbr/\u003e\nRemove master.zip and README.md as they are no longer needed. \u003cbr/\u003e \n$ rm master.zip \u003cbr/\u003e\n$ rm README.md \u003cbr/\u003e \u003cbr/\u003e\nYour *MyDir* folder must now look like this: \u003cbr/\u003e \nFace_1.jpg \u003cbr/\u003e\nFace_2.jpg \u003cbr/\u003e\nFace_3.jpg \u003cbr/\u003e\nFace_Mask_Video.mp4 \u003cbr/\u003e\nmask_detector_opt2.nb \u003cbr/\u003e\nMaskUltra.cpb \u003cbr/\u003e\nmask_ultra.cpp \u003cbr/\u003e\nUltraFace.cpp \u003cbr/\u003e\nUltraFace.hpp \u003cbr/\u003e\nRFB-320.bin \u003cbr/\u003e\nRFB-320.param \u003cbr/\u003e\nslim_320.bin \u003cbr/\u003e\nslim_320.param \u003cbr/\u003e\n### Notes. \nThe directories in the Code::Blocks project file will probably need to be adapted to the naming convention you are using. \u003cbr/\u003e\nThe camera input used is a simple OpenCV webcam. The GStreamer is not used in this example for symplicity reasons.\u003cbr/\u003e\u003cbr/\u003e\nThe RFB-320 model recognizes slightly more faces than slim_320 at the expense of a little bit of speed. It is up to you.\u003cbr/\u003e\nNote that the compilation of the Paddle Lite framework in your application may take a while. \u003cbr/\u003e \u003cbr/\u003e\nSee the Raspberry Pi video at https://youtu.be/LDPXgJv3wAk\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqengineering%2Fface-mask-detection-jetson-nano","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqengineering%2Fface-mask-detection-jetson-nano","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqengineering%2Fface-mask-detection-jetson-nano/lists"}