{"id":19612626,"url":"https://github.com/chenjd/unity-arfoundation-handdetection","last_synced_at":"2025-04-27T23:31:08.451Z","repository":{"id":37743075,"uuid":"196179114","full_name":"chenjd/Unity-ARFoundation-HandDetection","owner":"chenjd","description":"Hand Detection and Tracking with Unity ARFoundation and CoreML.","archived":false,"fork":false,"pushed_at":"2020-09-25T04:57:02.000Z","size":40891,"stargazers_count":117,"open_issues_count":1,"forks_count":18,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-02T05:11:40.460Z","etag":null,"topics":["arfoundation","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chenjd.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":"2019-07-10T09:49:09.000Z","updated_at":"2024-04-19T08:57:43.000Z","dependencies_parsed_at":"2022-08-24T16:02:11.090Z","dependency_job_id":null,"html_url":"https://github.com/chenjd/Unity-ARFoundation-HandDetection","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/chenjd%2FUnity-ARFoundation-HandDetection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenjd%2FUnity-ARFoundation-HandDetection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenjd%2FUnity-ARFoundation-HandDetection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenjd%2FUnity-ARFoundation-HandDetection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chenjd","download_url":"https://codeload.github.com/chenjd/Unity-ARFoundation-HandDetection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224091945,"owners_count":17254149,"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":["arfoundation","unity"],"created_at":"2024-11-11T10:47:19.959Z","updated_at":"2024-11-11T10:47:21.038Z","avatar_url":"https://github.com/chenjd.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unity-ARFoundation-HandDetection\n![GitHub](https://img.shields.io/github/license/chenjd/Unity-ARFoundation-HandDetection)\n![](https://img.shields.io/badge/platform-iOS-brightgreen)\n![](https://img.shields.io/badge/unity-2018.3%2B-brightgreen)\n![GitHub language count](https://img.shields.io/github/languages/count/chenjd/Unity-ARFoundation-HandDetection)\n\n\n## Note\n\nThe project used in [this article](https://medium.com/chenjd-xyz/unity-ar-foundation-and-coreml-hand-detection-and-tracking-b74c592206c5) is on the `ForHandDetectionAndTrackingArticle` branch. \n\nThe `master` branch is currently used for development and does not guarantee stability.\n\n## Update\n\nAdd `GetNativeTexture` scene to the master branch to show how to get native texture from iOS to Unity context and use this texture to implement the hand pixelate effect.\n\nThere is a video:\n\n[Unity AR Foundation Hand Detection 4\n](https://www.youtube.com/watch?v=l0ZY2YEu7Ts)\n\n## Description\n\nThis demo project shows how to enable the CoreML to work with [AR Foundation](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@1.5/manual/index.html) in Unity.\n\nIt is based on the [repo](https://github.com/giln/ARML) implemented on the native iOS platform by Gil Nakache.\n\nThe ARFoundation Plugin's version is 1.5.0-preview.5, you can find it inside the ARPackages folder.\n\nFor hand detection, the plugin uses the HandModel machine learning model. This model is from the same repo mentioned above inside the CoreML folder.\n\n\n## Version\n\nUnity Version: 2018.3.13f1\n\nXcode Version: 10.2.1\n\niPhone 7: 12.3.1\n\n## Implemention\n\n#### Import ARFoundation Plugin\n\nFor convenience, I use the local package import. This is very simple, just modify the manifest.json file in the package folder and add the local package in the project manifest.\n\n```\n    \"com.unity.xr.arfoundation\": \"file:../ARPackages/com.unity.xr.arfoundation\",\n    \"com.unity.xr.arkit\": \"file:../ARPackages/com.unity.xr.arkit\n\n```\n\n#### Create a Swift plugin for Unity\n\nIn order for C# to communicate with Swift, you need to create an object-c file as a bridge.\n\nThere is a [sample](https://github.com/chenjd/Unity-Hello-Swift). This proj demonstrates how to create a Swift plugin for Unity and print \"Hello, I'm Swift\" in Unity.\n\nIn the Unity-ARFoundation-HandDetection Proj, the structure of the plugins folder is as follows:\n\n```none\n\u003cPlugins\u003e\n  └── iOS\n      ├── HandDetector\n      │   ├── Native\n      │   │  ├──HandDetector.swift\n      │   │  └──HandDetectorBridge.mm\n      │   └── Managed\n      │      └──HandDetector.cs\n      └── Unity\n```\n\n## Read More\n[Unity AR Foundation and CoreML: Hand detection and tracking\n](http://www.jiadongchen.com/2019/07/unity-ar-foundation-and-coreml-hand-detection-and-tracking/)\n\nI've written an article to describ the process for integrating CoreML and AR Foundation to detect and track the hand.\n![](Res/handdetection.png)\n\n\n\n## License\nLicensed under Apache 2.0.\n\nUnity Native Plugin API headers licensed under Unity Companion License, please see the header contents for details.\n\nUnity-Chan is provided under the Unity-Chan License 2.0 terms.\nPlease refer to the following link for information regarding the Unity-Chan License.\n\nhttp://unity-chan.com/contents/guideline_en/\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchenjd%2Funity-arfoundation-handdetection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchenjd%2Funity-arfoundation-handdetection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchenjd%2Funity-arfoundation-handdetection/lists"}