{"id":13644638,"url":"https://github.com/cansik/yolo-hand-detection","last_synced_at":"2025-10-09T03:13:55.262Z","repository":{"id":41960383,"uuid":"254162134","full_name":"cansik/yolo-hand-detection","owner":"cansik","description":"A pre-trained YOLO based hand detection network.","archived":false,"fork":false,"pushed_at":"2022-10-05T19:56:22.000Z","size":18662,"stargazers_count":303,"open_issues_count":3,"forks_count":62,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-19T18:08:49.325Z","etag":null,"topics":["detection","hand","handtracking","machinelearning","yolov3","yolov4"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cansik.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}},"created_at":"2020-04-08T17:57:03.000Z","updated_at":"2025-05-13T16:24:22.000Z","dependencies_parsed_at":"2023-01-19T07:45:15.042Z","dependency_job_id":null,"html_url":"https://github.com/cansik/yolo-hand-detection","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cansik/yolo-hand-detection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cansik%2Fyolo-hand-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cansik%2Fyolo-hand-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cansik%2Fyolo-hand-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cansik%2Fyolo-hand-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cansik","download_url":"https://codeload.github.com/cansik/yolo-hand-detection/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cansik%2Fyolo-hand-detection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000777,"owners_count":26082911,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["detection","hand","handtracking","machinelearning","yolov3","yolov4"],"created_at":"2024-08-02T01:02:09.902Z","updated_at":"2025-10-09T03:13:55.246Z","avatar_url":"https://github.com/cansik.png","language":"Python","funding_links":[],"categories":["Object Recognition","Object Detection Applications"],"sub_categories":["Human Detection Repositories"],"readme":"# YOLO-Hand-Detection\nScene hand detection for real world images.\n\n![Hand Detection Example](readme/export.jpg)\n\n### Idea\nTo detect hand gestures, we first have to detect the hand position in space. This pre-trained network is able to extract hands out of a `2D RGB` image, by using the YOLOv3 neural network.\n\nThere are already existing models available, mainly for MobileNetSSD networks. The goal of this model is to support a wider range of images and a more stable detector (hopefully 🙈).\n\n### Dataset\nThe first version of this network has been trained on the [CMU Hand DB](http://domedb.perception.cs.cmu.edu/handdb.html) dataset, which is free to access and download. Because the results were ok, but not satisfying, I used it to pre annotate more images and manually then corrected the pre-annotations.\n\nBecause [Handtracking](https://github.com/victordibia/handtracking) by Victor Dibia is using the [Egohands](http://vision.soic.indiana.edu/projects/egohands/) dataset, I tried to include it into the training-set as well.\n\nIn the end, the training set consists of the CMU Hand DB, the Egohands dataset and my own trained images (mainly from marathon runners), called **cross-hands**.\n\n### Training\nThe training took about 10 hours on a single NVIDIA 1080TI and was performed with the YOLOv3 default architecture. I also trained the slim version of it called YOLOv3-tiny.\n\n#### YOLOv3\n\n![Training Graph](readme/chart_yolov3.png)\n\n```\nPrecision: 0.89 Recall: 0.85 F1-Score: 0.87 IoU: 69.8\n```\n\n#### YOLOv3-Tiny\n\n![Training Graph](readme/chart_yolov3-tiny_obj.png)\n\n```\nPrecision: 0.76 Recall: 0.69 F1-Score: 0.72 IoU: 53.67\n```\n\n#### YOLOv3-Tiny-PRN\nThe tiny version of YOLO has been improved by the [partial residual networks paper](https://github.com/WongKinYiu/PartialResidualNetworks). Because of that I trained YOLO-Tiny-PRN and share the results here too. It is interesting to see that the Yolov3-Tiny-PRN performance **comes close** to the original Yolov3!\n\n![Training Graph](readme/chart_yolov3-tiny-prn.png)\n\n```\nPrecision: 0.89 Recall: 0.79 F1-Score: 0.83 IoU: 68.47\n```\n\n#### YOLOv4-Tiny\nWith the recent version of YOLOv4 it was interesting to see how good it performs against it's predecessor. Same precision, but better recall and IoU.\n\n![Training Graph](readme/chart_yolov4-tiny.png)\n\n```\nPrecision: 0.89 Recall: 0.89 F1-Score: 0.89 IoU: 91.48\n```\n\n### Testing\nI could not test the model on the same dataset as for example the Egohands dataset, because I mixed the training and testing samples together and created my own test-dataset out of it.\n\nAs soon as I have time, I will publish a comparison of my trained data vs. for example Handtracking.\n\n### Inferencing\nThe models have been trained on an image size `416x416`. It is also possible to inference it with a lower model size to increase the speed. A good performance / accuracy mix on CPUs has been discovered by using an image size of `256x256`.\n\nThe model itself is fully compatible with the opencv dnn module and just ready to use.\n\n### Demo\nTo run the demo, please first install all the dependencies ([requirements.txt](requirements.txt)) into a virtual environment and download the model and weights into the model folder (or run the shell script).\n\n```bash\n# mac / linux\ncd models \u0026\u0026 sh ./download-models.sh\n\n# windows\ncd models \u0026\u0026 powershell .\\download-models.ps1\n\n```\n\nThen run the following command to start a webcam detector with YOLOv3:\n\n```bash\n# with python 3\npython demo_webcam.py\n```\n\nOr this one to run a webcam detrector with YOLOv3 tiny:\n\n```bash\n# with python 3\npython demo_webcam.py -n tiny\n```\n\nFor YOLOv3-Tiny-PRN use the following command:\n\n```bash\n# with python 3\npython demo_webcam.py -n prn\n```\n\nFor YOLOv4-Tiny use the following command:\n\n```bash\n# with python 3\npython demo_webcam.py -n v4-tiny\n```\n\n### Download\n\n- YOLOv3 Cross-Dataset\n\t- [Configuration](https://github.com/cansik/yolo-hand-detection/releases/download/pretrained/cross-hands.cfg)\n\t- [Weights](https://github.com/cansik/yolo-hand-detection/releases/download/pretrained/cross-hands.weights)\n- YOLOv3-tiny Cross-Hands\n\t- [Configuration](https://github.com/cansik/yolo-hand-detection/releases/download/pretrained/cross-hands-tiny.cfg)\n\t- [Weights](https://github.com/cansik/yolo-hand-detection/releases/download/pretrained/cross-hands-tiny.weights)\n- YOLOv3-tiny-prn Cross-Hands\n\t- [Configuration](https://github.com/cansik/yolo-hand-detection/releases/download/pretrained/cross-hands-tiny-prn.cfg)\n\t- [Weights](https://github.com/cansik/yolo-hand-detection/releases/download/pretrained/cross-hands-tiny-prn.weights)\n- YOLOv4-Tiny Cross-Hands\n\t- [Configuration](https://github.com/cansik/yolo-hand-detection/releases/download/pretrained/cross-hands-yolov4-tiny.cfg)\n\t- [Weights](https://github.com/cansik/yolo-hand-detection/releases/download/pretrained/cross-hands-yolov4-tiny.weights)\n\nIf you are interested in the CMU Hand DB results, please check the [release](https://github.com/cansik/yolo-hand-detection/releases/tag/pretrained) section.\n\n### About\nTrained by *[cansik](https://github.com/cansik)*, datasets are described in the readme and fall under the terms and conditions of their owners.\n\nAll the demo images have been downloaded from [unsplash.com](https://unsplash.com/):\n\nTim Marshall, Zachary Nelson, John Torcasio, Andy Falconer, Sherise, Alexis Brown\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcansik%2Fyolo-hand-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcansik%2Fyolo-hand-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcansik%2Fyolo-hand-detection/lists"}