From 5d8aa79f76a6f5ffd2bfa042e07b087165b654e3 Mon Sep 17 00:00:00 2001 From: Lanre Date: Sun, 28 Aug 2022 19:52:29 -0400 Subject: [PATCH] Add predictor sources --- Assembly-CSharp.csproj | 85 ++++---- BlazePose-Detector.sln | 17 ++ .../Changelog.md | 8 + .../Changelog.md.meta | 7 + .../LICENSE | 201 ++++++++++++++++++ .../LICENSE.meta | 7 + .../README.md | 56 +++++ .../README.md.meta | 7 + .../Runtime.meta | 8 + .../Runtime/BlazePoseDetector.cs | 171 +++++++++++++++ .../Runtime/BlazePoseDetector.cs.meta | 11 + .../NatML.Vision.BlazePose.Detector.asmdef | 22 ++ ...atML.Vision.BlazePose.Detector.asmdef.meta | 7 + .../Runtime/Pose.cs | 106 +++++++++ .../Runtime/Pose.cs.meta | 11 + .../package.json | 27 +++ .../package.json.meta | 7 + Packages/manifest.json | 4 +- Packages/packages-lock.json | 23 +- ProjectSettings/ProjectSettings.asset | 8 +- .../Layouts/CurrentMaximizeLayout.dwlt | 90 ++++---- UserSettings/Layouts/default-2021.dwlt | 50 ++--- 22 files changed, 807 insertions(+), 126 deletions(-) create mode 100644 BlazePose-Detector.sln create mode 100644 Packages/ai.natml.vision.blazepose-detector/Changelog.md create mode 100644 Packages/ai.natml.vision.blazepose-detector/Changelog.md.meta create mode 100644 Packages/ai.natml.vision.blazepose-detector/LICENSE create mode 100644 Packages/ai.natml.vision.blazepose-detector/LICENSE.meta create mode 100644 Packages/ai.natml.vision.blazepose-detector/README.md create mode 100644 Packages/ai.natml.vision.blazepose-detector/README.md.meta create mode 100644 Packages/ai.natml.vision.blazepose-detector/Runtime.meta create mode 100644 Packages/ai.natml.vision.blazepose-detector/Runtime/BlazePoseDetector.cs create mode 100644 Packages/ai.natml.vision.blazepose-detector/Runtime/BlazePoseDetector.cs.meta create mode 100644 Packages/ai.natml.vision.blazepose-detector/Runtime/NatML.Vision.BlazePose.Detector.asmdef create mode 100644 Packages/ai.natml.vision.blazepose-detector/Runtime/NatML.Vision.BlazePose.Detector.asmdef.meta create mode 100644 Packages/ai.natml.vision.blazepose-detector/Runtime/Pose.cs create mode 100644 Packages/ai.natml.vision.blazepose-detector/Runtime/Pose.cs.meta create mode 100644 Packages/ai.natml.vision.blazepose-detector/package.json create mode 100644 Packages/ai.natml.vision.blazepose-detector/package.json.meta diff --git a/Assembly-CSharp.csproj b/Assembly-CSharp.csproj index 65fd522..b1a1323 100644 --- a/Assembly-CSharp.csproj +++ b/Assembly-CSharp.csproj @@ -9,7 +9,7 @@ 10.0.20506 2.0 - {c027c0f5-18ef-e1c0-ee47-64ed3efb9e00} + {d8db87ba-b234-5491-a2a4-91c9fb353610} Library Properties Assembly-CSharp @@ -22,7 +22,7 @@ full false Temp\bin\Debug\ - DEBUG;TRACE;UNITY_2021_3_4;UNITY_2021_3;UNITY_2021;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_3_OR_NEWER;UNITY_2018_4_OR_NEWER;UNITY_2019_1_OR_NEWER;UNITY_2019_2_OR_NEWER;UNITY_2019_3_OR_NEWER;UNITY_2019_4_OR_NEWER;UNITY_2020_1_OR_NEWER;UNITY_2020_2_OR_NEWER;UNITY_2020_3_OR_NEWER;UNITY_2021_1_OR_NEWER;UNITY_2021_2_OR_NEWER;UNITY_2021_3_OR_NEWER;UNITY_INCLUDE_TESTS;USE_SEARCH_ENGINE_API;USE_SEARCH_TABLE;USE_SEARCH_MODULE;USE_PROPERTY_DATABASE;USE_SEARCH_EXTENSION_API;SCENE_TEMPLATE_MODULE;ENABLE_AR;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_TEXTURE_STREAMING;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_UNITYWEBREQUEST;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;ENABLE_MANAGED_AUDIO_JOBS;ENABLE_ENGINE_CODE_STRIPPING;ENABLE_ONSCREEN_KEYBOARD;ENABLE_MANAGED_UNITYTLS;INCLUDE_DYNAMIC_GI;ENABLE_SCRIPTING_GC_WBARRIERS;PLATFORM_SUPPORTS_MONO;ENABLE_VIDEO;ENABLE_ACCELERATOR_CLIENT_DEBUGGING;PLATFORM_IOS;TEXTCORE_1_0_OR_NEWER;ENABLE_RUNTIME_GI;ENABLE_GAMECENTER;ENABLE_NETWORK;ENABLE_IOS_ON_DEMAND_RESOURCES;ENABLE_IOS_APP_SLICING;PLAYERCONNECTION_LISTENS_FIXED_PORT;DEBUGGER_LISTENS_FIXED_PORT;PLATFORM_SUPPORTS_ADS_ID;SUPPORT_ENVIRONMENT_VARIABLES;PLATFORM_SUPPORTS_PROFILER;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_ETC_COMPRESSION;ENABLE_UNITYADS_RUNTIME;UNITY_UNITYADS_API;UNITY_IOS;PLATFORM_IPHONE;UNITY_IPHONE;UNITY_IPHONE_API;UNITY_HAS_GOOGLEVR;ENABLE_SPATIALTRACKING;ENABLE_MONO;NET_STANDARD_2_0;NET_STANDARD;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;UNITY_PRO_LICENSE;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_DIRECTOR;ENABLE_LOCALIZATION;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_TILEMAP;ENABLE_TIMELINE;ENABLE_LEGACY_INPUT_MANAGER;CSHARP_7_OR_LATER;CSHARP_7_3_OR_NEWER;DEVELOPMENT_BUILD + DEBUG;TRACE;UNITY_2021_3_4;UNITY_2021_3;UNITY_2021;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_3_OR_NEWER;UNITY_2018_4_OR_NEWER;UNITY_2019_1_OR_NEWER;UNITY_2019_2_OR_NEWER;UNITY_2019_3_OR_NEWER;UNITY_2019_4_OR_NEWER;UNITY_2020_1_OR_NEWER;UNITY_2020_2_OR_NEWER;UNITY_2020_3_OR_NEWER;UNITY_2021_1_OR_NEWER;UNITY_2021_2_OR_NEWER;UNITY_2021_3_OR_NEWER;PLATFORM_ARCH_64;UNITY_64;UNITY_INCLUDE_TESTS;USE_SEARCH_ENGINE_API;USE_SEARCH_TABLE;USE_SEARCH_MODULE;USE_PROPERTY_DATABASE;USE_SEARCH_EXTENSION_API;SCENE_TEMPLATE_MODULE;ENABLE_AR;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_TEXTURE_STREAMING;ENABLE_VIRTUALTEXTURING;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_UNITYWEBREQUEST;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_NATIVE_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;ENABLE_MANAGED_AUDIO_JOBS;ENABLE_MANAGED_UNITYTLS;INCLUDE_DYNAMIC_GI;ENABLE_SCRIPTING_GC_WBARRIERS;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_VIDEO;ENABLE_ACCELERATOR_CLIENT_DEBUGGING;PLATFORM_STANDALONE;TEXTCORE_1_0_OR_NEWER;PLATFORM_STANDALONE_OSX;UNITY_STANDALONE_OSX;UNITY_STANDALONE;ENABLE_GAMECENTER;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_SPATIALTRACKING;PLATFORM_UPDATES_TIME_OUTSIDE_OF_PLAYER_LOOP;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_STANDARD_2_0;NET_STANDARD;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;UNITY_PRO_LICENSE;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_DIRECTOR;ENABLE_LOCALIZATION;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_TILEMAP;ENABLE_TIMELINE;ENABLE_LEGACY_INPUT_MANAGER;CSHARP_7_OR_LATER;CSHARP_7_3_OR_NEWER prompt 4 0169 @@ -65,6 +65,12 @@ /Applications/Unity/Hub/Editor/2021.3.4f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.ClothModule.dll + + /Applications/Unity/Hub/Editor/2021.3.4f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.ClusterInputModule.dll + + + /Applications/Unity/Hub/Editor/2021.3.4f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll + /Applications/Unity/Hub/Editor/2021.3.4f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.CoreModule.dll @@ -221,6 +227,9 @@ /Applications/Unity/Hub/Editor/2021.3.4f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.VideoModule.dll + + /Applications/Unity/Hub/Editor/2021.3.4f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.VirtualTexturingModule.dll + /Applications/Unity/Hub/Editor/2021.3.4f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.WindModule.dll @@ -273,13 +282,13 @@ /Applications/Unity/Hub/Editor/2021.3.4f1/Unity.app/Contents/Managed/UnityEngine/UnityEditor.UnityConnectModule.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/PackageCache/com.unity.visualscripting@1.7.8/Runtime/VisualScripting.Flow/Dependencies/NCalc/Unity.VisualScripting.Antlr3.Runtime.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/PackageCache/com.unity.visualscripting@1.7.8/Runtime/VisualScripting.Flow/Dependencies/NCalc/Unity.VisualScripting.Antlr3.Runtime.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/PackageCache/com.unity.testtools.codecoverage@1.0.1/lib/ReportGenerator/ReportGeneratorMerged.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/PackageCache/com.unity.testtools.codecoverage@1.0.1/lib/ReportGenerator/ReportGeneratorMerged.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/PackageCache/com.unity.nuget.newtonsoft-json@3.0.2/Runtime/Newtonsoft.Json.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/PackageCache/com.unity.nuget.newtonsoft-json@3.0.2/Runtime/Newtonsoft.Json.dll /Applications/Unity/Hub/Editor/2021.3.4f1/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.Xcode.dll @@ -660,103 +669,103 @@ /Applications/Unity/Hub/Editor/2021.3.4f1/Unity.app/Contents/NetStandard/compat/2.1.0/shims/netfx/mscorlib.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/NatML.ML.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/NatML.ML.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.VisualScripting.Flow.Editor.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.VisualScripting.Flow.Editor.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.VSCode.Editor.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.VSCode.Editor.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.Performance.Profile-Analyzer.Editor.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.Performance.Profile-Analyzer.Editor.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.TestTools.CodeCoverage.Editor.OpenCover.Model.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.TestTools.CodeCoverage.Editor.OpenCover.Model.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.VisualStudio.Editor.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.VisualStudio.Editor.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.Timeline.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.Timeline.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.VisualScripting.Core.Editor.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.VisualScripting.Core.Editor.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.TextMeshPro.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.TextMeshPro.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.VisualScripting.State.Editor.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.VisualScripting.State.Editor.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/NatML.Devices.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/NatML.Devices.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.VisualScripting.SettingsProvider.Editor.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.VisualScripting.SettingsProvider.Editor.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.TestTools.CodeCoverage.Editor.OpenCover.Mono.Reflection.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.TestTools.CodeCoverage.Editor.OpenCover.Mono.Reflection.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.VisualScripting.Flow.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.VisualScripting.Flow.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/UnityEditor.UI.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/UnityEditor.UI.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/NatML.Vision.BlazePose.Detector.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/NatML.Vision.BlazePose.Detector.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.Rider.Editor.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.Rider.Editor.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.PlasticSCM.Editor.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.PlasticSCM.Editor.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/UnityEngine.UI.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/UnityEngine.UI.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.Services.Core.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.Services.Core.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.VisualScripting.Core.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.VisualScripting.Core.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.EditorCoroutines.Editor.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.EditorCoroutines.Editor.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.Services.Core.Analytics.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.Services.Core.Analytics.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/NatML.Hub.Editor.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/NatML.Hub.Editor.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/NatML.ML.Editor.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/NatML.ML.Editor.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.VisualScripting.Shared.Editor.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.VisualScripting.Shared.Editor.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/NatML.Hub.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/NatML.Hub.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.Services.Core.Environments.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.Services.Core.Environments.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.Timeline.Editor.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.Timeline.Editor.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/NatML.Devices.Editor.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/NatML.Devices.Editor.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.TestTools.CodeCoverage.Editor.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.TestTools.CodeCoverage.Editor.dll - /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample/Library/ScriptAssemblies/Unity.VisualScripting.State.dll + /Users/yusuf/Desktop/BlazePose-Detector/Library/ScriptAssemblies/Unity.VisualScripting.State.dll diff --git a/BlazePose-Detector.sln b/BlazePose-Detector.sln new file mode 100644 index 0000000..a932ce4 --- /dev/null +++ b/BlazePose-Detector.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{d8db87ba-b234-5491-a2a4-91c9fb353610}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {d8db87ba-b234-5491-a2a4-91c9fb353610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {d8db87ba-b234-5491-a2a4-91c9fb353610}.Debug|Any CPU.Build.0 = Debug|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Packages/ai.natml.vision.blazepose-detector/Changelog.md b/Packages/ai.natml.vision.blazepose-detector/Changelog.md new file mode 100644 index 0000000..ec2a997 --- /dev/null +++ b/Packages/ai.natml.vision.blazepose-detector/Changelog.md @@ -0,0 +1,8 @@ +## 1.0.2 ++ Refactored `BlazePoseDetector.Pose` struct to `Detection`. + +## 1.0.1 ++ Update `README`. + +## 1.0.0 ++ First release. \ No newline at end of file diff --git a/Packages/ai.natml.vision.blazepose-detector/Changelog.md.meta b/Packages/ai.natml.vision.blazepose-detector/Changelog.md.meta new file mode 100644 index 0000000..d8dc1fc --- /dev/null +++ b/Packages/ai.natml.vision.blazepose-detector/Changelog.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3860ff3e9f8ef42cf9b592b9952f22dd +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/ai.natml.vision.blazepose-detector/LICENSE b/Packages/ai.natml.vision.blazepose-detector/LICENSE new file mode 100644 index 0000000..f49a4e1 --- /dev/null +++ b/Packages/ai.natml.vision.blazepose-detector/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/Packages/ai.natml.vision.blazepose-detector/LICENSE.meta b/Packages/ai.natml.vision.blazepose-detector/LICENSE.meta new file mode 100644 index 0000000..a8c3c50 --- /dev/null +++ b/Packages/ai.natml.vision.blazepose-detector/LICENSE.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4d25ed85abddb472da583932b29cdee4 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/ai.natml.vision.blazepose-detector/README.md b/Packages/ai.natml.vision.blazepose-detector/README.md new file mode 100644 index 0000000..bff32be --- /dev/null +++ b/Packages/ai.natml.vision.blazepose-detector/README.md @@ -0,0 +1,56 @@ +# BlazePose Detector +[MediaPipe BlazePose](https://google.github.io/mediapipe/solutions/pose.html) for person detection in Unity Engine with [NatML](https://github.com/natmlx/NatML). + +## Installing BlazePose +Add the following items to your Unity project's `Packages/manifest.json`: +```json +{ + "scopedRegistries": [ + { + "name": "NatML", + "url": "https://registry.npmjs.com", + "scopes": ["ai.natml"] + } + ], + "dependencies": { + "ai.natml.vision.blazepose.detector": "1.0.2" + } +} +``` + +## Detecting Poses in an Image +First, create the BlazePose detector: +```csharp +// Fetch the model data from NatML +var modelData = await MLModelData.FromHub("@natml/blazepose-detector"); +// Deserialize the model +var model = modelData.Deserialize(); +// Create the BlazePose detector +var predictor = new BlazePoseDetector(model); +``` + +Then detect pose rectangles in the image: +```csharp +// Create image feature +Texture2D image = ...; +var imageFeature = new MLImageFeature(image); +// Set normalization and aspect mode +(imageFeature.mean, imageFeature.std) = modelData.normalization; +imageFeature.aspectMode = modelData.aspectMode; +// Detect pose regions-of-interest in the image +BlazePoseDetector.Detection[] faces = predictor.Predict(imageFeature); +``` + +___ + +## Requirements +- Unity 2020.3+ + +## Quick Tips +- Discover more ML models on [NatML Hub](https://hub.natml.ai). +- See the [NatML documentation](https://docs.natml.ai/unity). +- Join the [NatML community on Discord](https://hub.natml.ai/community). +- Discuss [NatML on Unity Forums](https://forum.unity.com/threads/open-beta-natml-machine-learning-runtime.1109339/). +- Contact us at [hi@natml.ai](mailto:hi@natml.ai). + +Thank you very much! \ No newline at end of file diff --git a/Packages/ai.natml.vision.blazepose-detector/README.md.meta b/Packages/ai.natml.vision.blazepose-detector/README.md.meta new file mode 100644 index 0000000..10c14d9 --- /dev/null +++ b/Packages/ai.natml.vision.blazepose-detector/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e044cee4ca4654f6ca87a34c895dd513 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/ai.natml.vision.blazepose-detector/Runtime.meta b/Packages/ai.natml.vision.blazepose-detector/Runtime.meta new file mode 100644 index 0000000..38a5f5d --- /dev/null +++ b/Packages/ai.natml.vision.blazepose-detector/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c71f6a1a491654b49864b8e8114a4bd5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/ai.natml.vision.blazepose-detector/Runtime/BlazePoseDetector.cs b/Packages/ai.natml.vision.blazepose-detector/Runtime/BlazePoseDetector.cs new file mode 100644 index 0000000..16ea60f --- /dev/null +++ b/Packages/ai.natml.vision.blazepose-detector/Runtime/BlazePoseDetector.cs @@ -0,0 +1,171 @@ +/* +* BlazePose +* Copyright (c) 2022 NatML Inc. All Rights Reserved. +*/ + +namespace NatML.Vision { + + using System; + using System.Collections.Generic; + using UnityEngine; + using NatML.Features; + using NatML.Internal; + using NatML.Types; + + /// + /// BlazePose detector. + /// This predictor detects aligned region of interest rectangles for each person in the input image. + /// + public sealed partial class BlazePoseDetector : IMLPredictor { + + #region --Client API-- + /// + /// Create the BlazePose detection predictor. + /// + /// BlazePose detector ML model. + /// Minimum candidate detection score. + /// Maximum intersection-over-union score for overlap removal. + public BlazePoseDetector (MLModel model, float minScore = 0.4f, float maxIoU = 0.3f) { + this.model = model as MLEdgeModel; + this.minScore = minScore; + this.maxIoU = maxIoU; + this.anchors = GenerateAnchors( + model.inputs[0] as MLImageType, + new [] { 8, 16, 16, 16 }, //new [] { 8, 16, 32, 32, 32 }, + 0.1484375f, + 0.75f + ); + this.candidateBoxes = new List(anchors.Length); + this.candidateScores = new List(anchors.Length); + this.candidatePoints = new List(anchors.Length); + } + + /// + /// Detect poses in an image. + /// + /// Input image. + /// Detected poses. + public Detection[] Predict (params MLFeature[] inputs) { + // Check + if (inputs.Length != 1) + throw new ArgumentException(@"BlazePose detector expects a single feature", nameof(inputs)); + // Check type + var input = inputs[0]; + var imageType = MLImageType.FromType(input.type); + var imageFeature = input as MLImageFeature; + if (!imageType) + throw new ArgumentException(@"BlazePose detector expects an an array or image feature", nameof(inputs)); + // Predict + var inputType = model.inputs[0] as MLImageType; + using var inputFeature = (input as IMLEdgeFeature).Create(inputType); + using var outputFeatures = model.Predict(inputFeature); + // Decode + var (widthInv, heightInv) = (1f / inputType.width, 1f / inputType.height); + var scoreFeature = new MLArrayFeature(outputFeatures[0]); + var regressionFeature = new MLArrayFeature(outputFeatures[1]); + candidateBoxes.Clear(); + candidateScores.Clear(); + candidatePoints.Clear(); + for (var i = 0; i < anchors.Length; ++i) { + // Check score + var score = 1f / (1f + Mathf.Exp(-scoreFeature[0,i,0])); + if (score < minScore) + continue; + // Extract box + var anchor = anchors[i]; + var cx = regressionFeature[0,i,0] * widthInv + anchor.x; + var cy = regressionFeature[0,i,1] * heightInv + anchor.y; + var w = regressionFeature[0,i,2] * widthInv; + var h = regressionFeature[0,i,3] * heightInv; + var rawBox = new Rect((cx - w / 2), 1f - (cy + h / 2), w, h); + var box = imageFeature?.TransformRect(rawBox, inputType) ?? rawBox; + // Extract points + var points = new Vector2[4]; + for (var j = 0; j < points.Length; ++j) { + var point = new Vector2( + regressionFeature[0,i,2*j+4] * widthInv + anchor.x, + 1f - (regressionFeature[0,i,2*j+5] * heightInv + anchor.y) + ); + points[j] = imageFeature?.TransformPoint(point, inputType) ?? point; + } + // Add + candidateBoxes.Add(box); + candidateScores.Add(score); + candidatePoints.Add(points); + } + var keepIdx = MLImageFeature.NonMaxSuppression(candidateBoxes, candidateScores, maxIoU); + var result = new List(); + for (var i = 0; i < keepIdx.Length; ++i) { + var idx = keepIdx[i]; + var rect = candidateBoxes[idx]; + var score = candidateScores[idx]; + var points = candidatePoints[idx]; + var pose = new Detection(rect, score, points, imageType); + result.Add(pose); + } + return result.ToArray(); + } + #endregion + + + #region --Operations-- + private readonly MLEdgeModel model; + private readonly float minScore; + private readonly float maxIoU; + private readonly List candidateBoxes; + private readonly List candidateScores; + private readonly List candidatePoints; + private readonly Vector2[] anchors; + + void IDisposable.Dispose () { } // Not used + + private static Vector2[] GenerateAnchors ( + MLImageType type, + int[] strides, + float minScale, + float maxScale, + float aspect = 1f + ) { + var result = new List(); + var layerId = 0; + while (layerId < strides.Length) { + var scales = new List(); + var lastSameStrideLayer = layerId; + while (lastSameStrideLayer < strides.Length && strides[lastSameStrideLayer] == strides[layerId]) { + var scale = CalculateScale(minScale, maxScale, lastSameStrideLayer, strides.Length); + scales.Add(scale); + var nextScale = Mathf.Clamp01(CalculateScale(minScale, maxScale, lastSameStrideLayer + 1, strides.Length)); + scales.Add(Mathf.Sqrt(scale * nextScale)); + lastSameStrideLayer++; + } + var stride = strides[layerId]; + var featureWidth = Mathf.Ceil((float)type.width / stride); + var featureHeight = Mathf.Ceil((float)type.height / stride); + for (var j = 0; j < featureHeight; ++j) + for (var i = 0; i < featureWidth; ++i) + for (var s = 0; s < scales.Count; ++s) { + var anchor = new Vector2( + (i + 0.5f) / featureWidth, + (j + 0.5f) / featureHeight + ); + result.Add(anchor); + } + layerId = lastSameStrideLayer; + } + return result.ToArray(); + } + + private static float CalculateScale ( + float minScale, + float maxScale, + int strideIdx, + int strideCount + ) { + if (strideCount == 1) + return (minScale + maxScale) * 0.5f; + else + return minScale + (maxScale - minScale) * strideIdx / (strideCount - 1f); + } + #endregion + } +} \ No newline at end of file diff --git a/Packages/ai.natml.vision.blazepose-detector/Runtime/BlazePoseDetector.cs.meta b/Packages/ai.natml.vision.blazepose-detector/Runtime/BlazePoseDetector.cs.meta new file mode 100644 index 0000000..d339433 --- /dev/null +++ b/Packages/ai.natml.vision.blazepose-detector/Runtime/BlazePoseDetector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1283f980bd7b64357b532ad12e65f902 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/ai.natml.vision.blazepose-detector/Runtime/NatML.Vision.BlazePose.Detector.asmdef b/Packages/ai.natml.vision.blazepose-detector/Runtime/NatML.Vision.BlazePose.Detector.asmdef new file mode 100644 index 0000000..e43308c --- /dev/null +++ b/Packages/ai.natml.vision.blazepose-detector/Runtime/NatML.Vision.BlazePose.Detector.asmdef @@ -0,0 +1,22 @@ +{ + "name": "NatML.Vision.BlazePose.Detector", + "references": [ + "NatML.ML" + ], + "includePlatforms": [ + "Android", + "Editor", + "iOS", + "macOSStandalone", + "WebGL", + "WindowsStandalone64" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Packages/ai.natml.vision.blazepose-detector/Runtime/NatML.Vision.BlazePose.Detector.asmdef.meta b/Packages/ai.natml.vision.blazepose-detector/Runtime/NatML.Vision.BlazePose.Detector.asmdef.meta new file mode 100644 index 0000000..a0bf4b1 --- /dev/null +++ b/Packages/ai.natml.vision.blazepose-detector/Runtime/NatML.Vision.BlazePose.Detector.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 87306b161b0c84962afd99409692b97d +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/ai.natml.vision.blazepose-detector/Runtime/Pose.cs b/Packages/ai.natml.vision.blazepose-detector/Runtime/Pose.cs new file mode 100644 index 0000000..7aefaee --- /dev/null +++ b/Packages/ai.natml.vision.blazepose-detector/Runtime/Pose.cs @@ -0,0 +1,106 @@ +/* +* BlazePose +* Copyright (c) 2022 NatML Inc. All Rights Reserved. +*/ + +namespace NatML.Vision { + + using System.Runtime.CompilerServices; + using UnityEngine; + using NatML.Types; + + public sealed partial class BlazePoseDetector { + + /// + /// Detected pose region of interest. + /// + public readonly struct Detection { + + #region --Client API-- + /// + /// Pose confidence score. + /// + public readonly float score; + + /// + /// Pose bounding box in normalized coordinates. + /// + public readonly Rect rect; + + /// + /// Full body mid-hip center. + /// + public readonly Vector2 midHipCenter => points[0]; + + /// + /// Upper body mid-shoulder center. + /// + public readonly Vector2 midShoulderCenter => points[3]; + + /// + /// Pose clockwise rotation angle from upright in degrees. + /// + public readonly float rotation { + [MethodImpl(MethodImplOptions.AggressiveInlining)] // hope and pray + get { + var hipCenter = midHipCenter; + var detectionCenter = rect.center; + var targetAngle = 0.5f * Mathf.PI; + var currentAngle = Mathf.Atan2(detectionCenter.y - midHipCenter.y, detectionCenter.x - midHipCenter.x); + var rotation = targetAngle - currentAngle; + return Mathf.Rad2Deg * rotation; + } + } + + /// + /// Detected pose region of interest in the source image feature. + /// This region of interest is large enough to cover the entire detected person. + /// This rectangle is specified in pixel coordinates. + /// + public readonly RectInt regionOfInterest { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { + var hipCenter = Vector2.Scale(midHipCenter, imageSize); + var scalePoint = Vector2.Scale(points[1], imageSize); + var boxSize = 2f * (hipCenter - scalePoint).magnitude; + var length = 1.25f * boxSize; + var size = Vector2Int.RoundToInt(length * Vector2.one); + var minPoint = Vector2Int.RoundToInt(hipCenter - 0.5f * (Vector2)size); + return new RectInt(minPoint, size); + } + } + + /// + /// Transformation that maps a normalized 2D point in the region of interest defined by this detection + /// to a normalized point in the original image. + /// + public readonly Matrix4x4 regionOfInterestToImageMatrix { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { + var roi = regionOfInterest; + var center = midHipCenter; + var scale = new Vector3(roi.width / imageSize.x, roi.height / imageSize.y, 1f); + var result = Matrix4x4.Translate(midHipCenter) * + Matrix4x4.Scale(scale) * + Matrix4x4.Rotate(Quaternion.Euler(0f, 0f, -rotation)) * + Matrix4x4.Translate(new Vector2(-0.5f, -0.5f)); + return result; + } + } + #endregion + + + #region --Operations-- + private readonly Vector2[] points; + private readonly Vector2 imageSize; + + internal Detection (Rect rect, float score, Vector2[] points, MLImageType imageType) { + this.rect = rect; + this.score = score; + this.points = points; + this.imageSize = new Vector2(imageType.width, imageType.height); + } + #endregion + } + } +} \ No newline at end of file diff --git a/Packages/ai.natml.vision.blazepose-detector/Runtime/Pose.cs.meta b/Packages/ai.natml.vision.blazepose-detector/Runtime/Pose.cs.meta new file mode 100644 index 0000000..7e9a8a8 --- /dev/null +++ b/Packages/ai.natml.vision.blazepose-detector/Runtime/Pose.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 73e1edb7c62564dc7bdb53e5072f0d6e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/ai.natml.vision.blazepose-detector/package.json b/Packages/ai.natml.vision.blazepose-detector/package.json new file mode 100644 index 0000000..6d7a6e6 --- /dev/null +++ b/Packages/ai.natml.vision.blazepose-detector/package.json @@ -0,0 +1,27 @@ +{ + "name": "ai.natml.vision.blazepose.detector", + "version": "1.0.2", + "displayName": "BlazePose Detector", + "description": "Pose detection with MediaPipe BlazePose.", + "unity": "2020.3", + "dependencies": { + "ai.natml.natml": "1.0.17" + }, + "keywords": [ + "natml", + "machine learning", + "ml", + "aritificial intelligence", + "face detection", + "mediapipe", + "face filters", + "augmented reality" + ], + "author": { + "name": "NatML", + "email": "hi@natml.ai", + "url": "https://github.com/natmlx" + }, + "license": "Apache-2.0", + "repository": "github:natml-hub/BlazePose-Detector" +} \ No newline at end of file diff --git a/Packages/ai.natml.vision.blazepose-detector/package.json.meta b/Packages/ai.natml.vision.blazepose-detector/package.json.meta new file mode 100644 index 0000000..ead6b5c --- /dev/null +++ b/Packages/ai.natml.vision.blazepose-detector/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a1a7eea511fed4bd9b31ce6986bcc0a1 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/manifest.json b/Packages/manifest.json index 2833ff1..31a5fdd 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -7,9 +7,7 @@ } ], "dependencies": { - "ai.natml.natml": "1.0.13", - "ai.natml.natdevice": "1.2.2", - "ai.natml.vision.blazepose.detector": "1.0.2", + "ai.natml.natdevice": "1.2.3", "com.unity.collab-proxy": "1.15.17", "com.unity.feature.development": "1.0.1", "com.unity.ide.rider": "3.0.14", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 720556e..669b205 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -1,38 +1,37 @@ { "dependencies": { "ai.natml.hub": { - "version": "1.0.9", - "depth": 1, + "version": "1.0.12", + "depth": 2, "source": "registry", "dependencies": {}, "url": "https://registry.npmjs.com" }, "ai.natml.natdevice": { - "version": "1.2.2", + "version": "1.2.3", "depth": 0, "source": "registry", "dependencies": { - "ai.natml.hub": "1.0.8" + "ai.natml.hub": "1.0.10" }, "url": "https://registry.npmjs.com" }, "ai.natml.natml": { - "version": "1.0.13", - "depth": 0, + "version": "1.0.17", + "depth": 1, "source": "registry", "dependencies": { - "ai.natml.hub": "1.0.9" + "ai.natml.hub": "1.0.12" }, "url": "https://registry.npmjs.com" }, "ai.natml.vision.blazepose.detector": { - "version": "1.0.2", + "version": "file:ai.natml.vision.blazepose-detector", "depth": 0, - "source": "registry", + "source": "embedded", "dependencies": { - "ai.natml.natml": "1.0.13" - }, - "url": "https://registry.npmjs.com" + "ai.natml.natml": "1.0.17" + } }, "com.unity.collab-proxy": { "version": "1.15.17", diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 9d26c09..c3e22cb 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -16,9 +16,9 @@ PlayerSettings: productName: BlazePose Detector defaultCursor: {fileID: 0} cursorHotspot: {x: 0, y: 0} - m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} + m_SplashScreenBackgroundColor: {r: 0.0746262, g: 0.0746262, b: 0.122641504, a: 1} m_ShowUnitySplashScreen: 1 - m_ShowUnitySplashLogo: 1 + m_ShowUnitySplashLogo: 0 m_SplashScreenOverlayOpacity: 1 m_SplashScreenAnimation: 1 m_SplashScreenLogoStyle: 1 @@ -39,7 +39,9 @@ PlayerSettings: y: 0 width: 1 height: 1 - m_SplashScreenLogos: [] + m_SplashScreenLogos: + - logo: {fileID: 21300000, guid: 0733e6937997f4b97be94e96d7a9651f, type: 3} + duration: 2 m_VirtualRealitySplashScreen: {fileID: 0} m_HolographicTrackingLossScreen: {fileID: 0} defaultScreenWidth: 1920 diff --git a/UserSettings/Layouts/CurrentMaximizeLayout.dwlt b/UserSettings/Layouts/CurrentMaximizeLayout.dwlt index 16d6e1c..048c8dc 100644 --- a/UserSettings/Layouts/CurrentMaximizeLayout.dwlt +++ b/UserSettings/Layouts/CurrentMaximizeLayout.dwlt @@ -22,11 +22,11 @@ MonoBehaviour: x: 0 y: 30 width: 1440 - height: 850 + height: 745 m_MinSize: {x: 400, y: 200} m_MaxSize: {x: 32384, y: 16192} vertical: 0 - controlID: 1975 + controlID: 17 --- !u!114 &2 MonoBehaviour: m_ObjectHideFlags: 52 @@ -43,14 +43,14 @@ MonoBehaviour: m_MaxSize: {x: 4000, y: 4000} m_TitleContent: m_Text: Project Settings - m_Image: {fileID: 866346219090771560, guid: 0000000000000000d000000000000000, type: 0} + m_Image: {fileID: -5712115415447495865, guid: 0000000000000000d000000000000000, type: 0} m_Tooltip: m_Pos: serializedVersion: 2 x: 1110.5 - y: 30 + y: 83 width: 328.5 - height: 829 + height: 724 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -100,7 +100,7 @@ MonoBehaviour: x: 0 y: 0 width: 410.5 - height: 850 + height: 745 m_MinSize: {x: 201, y: 221} m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 4} @@ -124,14 +124,14 @@ MonoBehaviour: m_MaxSize: {x: 4000, y: 4000} m_TitleContent: m_Text: Scene - m_Image: {fileID: 8634526014445323508, guid: 0000000000000000d000000000000000, type: 0} + m_Image: {fileID: 2593428753322112591, guid: 0000000000000000d000000000000000, type: 0} m_Tooltip: m_Pos: serializedVersion: 2 x: 0 - y: 30 + y: 83 width: 409.5 - height: 829 + height: 724 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -431,9 +431,9 @@ MonoBehaviour: x: 410.5 y: 0 width: 391.5 - height: 850 - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 4000, y: 4000} + height: 745 + m_MinSize: {x: 202, y: 221} + m_MaxSize: {x: 4002, y: 4021} m_ActualView: {fileID: 6} m_Panes: - {fileID: 6} @@ -455,14 +455,14 @@ MonoBehaviour: m_MaxSize: {x: 4000, y: 4000} m_TitleContent: m_Text: Game - m_Image: {fileID: 4621777727084837110, guid: 0000000000000000d000000000000000, type: 0} + m_Image: {fileID: -6423792434712278376, guid: 0000000000000000d000000000000000, type: 0} m_Tooltip: m_Pos: serializedVersion: 2 x: 410.5 - y: 30 + y: 83 width: 389.5 - height: 829 + height: 724 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -473,7 +473,7 @@ MonoBehaviour: m_ShowGizmos: 0 m_TargetDisplay: 0 m_ClearColor: {r: 0, g: 0, b: 0, a: 0} - m_TargetSize: {x: 779, y: 1616} + m_TargetSize: {x: 779, y: 1406} m_TextureFilterMode: 0 m_TextureHideFlags: 61 m_RenderIMGUI: 1 @@ -490,8 +490,8 @@ MonoBehaviour: vZoomLockedByDefault: 0 m_HBaseRangeMin: -194.75 m_HBaseRangeMax: 194.75 - m_VBaseRangeMin: -404 - m_VBaseRangeMax: 404 + m_VBaseRangeMin: -351.5 + m_VBaseRangeMax: 351.5 m_HAllowExceedBaseRangeMin: 1 m_HAllowExceedBaseRangeMax: 1 m_VAllowExceedBaseRangeMin: 1 @@ -510,9 +510,9 @@ MonoBehaviour: x: 0 y: 21 width: 389.5 - height: 808 + height: 703 m_Scale: {x: 1, y: 1} - m_Translation: {x: 194.75, y: 404} + m_Translation: {x: 194.75, y: 351.5} m_MarginLeft: 0 m_MarginRight: 0 m_MarginTop: 0 @@ -520,12 +520,12 @@ MonoBehaviour: m_LastShownAreaInsideMargins: serializedVersion: 2 x: -194.75 - y: -404 + y: -351.5 width: 389.5 - height: 808 + height: 703 m_MinimalGUI: 1 m_defaultScale: 1 - m_LastWindowPixelSize: {x: 779, y: 1658} + m_LastWindowPixelSize: {x: 779, y: 1448} m_ClearInEditMode: 1 m_NoCameraWarning: 1 m_LowResolutionForAspectRatios: 00000000000000000000 @@ -551,11 +551,11 @@ MonoBehaviour: x: 802 y: 0 width: 308.5 - height: 850 + height: 745 m_MinSize: {x: 100, y: 200} m_MaxSize: {x: 8096, y: 16192} vertical: 1 - controlID: 1981 + controlID: 58 --- !u!114 &8 MonoBehaviour: m_ObjectHideFlags: 52 @@ -574,7 +574,7 @@ MonoBehaviour: x: 0 y: 0 width: 308.5 - height: 374 + height: 328 m_MinSize: {x: 202, y: 221} m_MaxSize: {x: 4002, y: 4021} m_ActualView: {fileID: 9} @@ -599,14 +599,14 @@ MonoBehaviour: m_MaxSize: {x: 4000, y: 4000} m_TitleContent: m_Text: Hierarchy - m_Image: {fileID: -3734745235275155857, guid: 0000000000000000d000000000000000, type: 0} + m_Image: {fileID: 7966133145522015247, guid: 0000000000000000d000000000000000, type: 0} m_Tooltip: m_Pos: serializedVersion: 2 x: 802 - y: 30 + y: 83 width: 306.5 - height: 353 + height: 307 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -616,7 +616,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 1edbffff6edbffff88dcffffd0f0ffffb0f7ffffbaf8ffff36fbffff + m_ExpandedIDs: aed1ffff m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -656,7 +656,7 @@ MonoBehaviour: m_MaxSize: {x: 4000, y: 4000} m_TitleContent: m_Text: Console - m_Image: {fileID: -4950941429401207979, guid: 0000000000000000d000000000000000, type: 0} + m_Image: {fileID: -4327648978806127646, guid: 0000000000000000d000000000000000, type: 0} m_Tooltip: m_Pos: serializedVersion: 2 @@ -684,9 +684,9 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 374 + y: 328 width: 308.5 - height: 476 + height: 417 m_MinSize: {x: 232, y: 271} m_MaxSize: {x: 10002, y: 10021} m_ActualView: {fileID: 12} @@ -710,14 +710,14 @@ MonoBehaviour: m_MaxSize: {x: 10000, y: 10000} m_TitleContent: m_Text: Project - m_Image: {fileID: -5179483145760003458, guid: 0000000000000000d000000000000000, type: 0} + m_Image: {fileID: -5467254957812901981, guid: 0000000000000000d000000000000000, type: 0} m_Tooltip: m_Pos: serializedVersion: 2 x: 802 - y: 404 + y: 411 width: 306.5 - height: 455 + height: 396 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -743,14 +743,14 @@ MonoBehaviour: m_LastFolders: - Assets m_LastFoldersGridSize: -1 - m_LastProjectPath: /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample + m_LastProjectPath: /Users/yusuf/Desktop/BlazePose-Detector m_LockTracker: m_IsLocked: 0 m_FolderTreeState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: c8590000 - m_LastClickedID: 22984 - m_ExpandedIDs: 00000000c859000000ca9a3b + m_SelectedIDs: 5a820000 + m_LastClickedID: 33370 + m_ExpandedIDs: 000000005a82000000ca9a3bffffff7f m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -778,7 +778,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 00000000c859000000ca9a3b + m_ExpandedIDs: m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -805,7 +805,7 @@ MonoBehaviour: m_ListAreaState: m_SelectedInstanceIDs: m_LastClickedInstanceID: 0 - m_HadKeyboardFocusLastEvent: 1 + m_HadKeyboardFocusLastEvent: 0 m_ExpandedInstanceIDs: c6230000 m_RenameOverlay: m_UserAcceptedRename: 0 @@ -852,7 +852,7 @@ MonoBehaviour: x: 1110.5 y: 0 width: 329.5 - height: 850 + height: 745 m_MinSize: {x: 311, y: 221} m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 2} @@ -882,9 +882,9 @@ MonoBehaviour: m_Pos: serializedVersion: 2 x: 1110.5 - y: 30 + y: 83 width: 328.5 - height: 829 + height: 724 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default diff --git a/UserSettings/Layouts/default-2021.dwlt b/UserSettings/Layouts/default-2021.dwlt index 6ae911e..ec057b5 100644 --- a/UserSettings/Layouts/default-2021.dwlt +++ b/UserSettings/Layouts/default-2021.dwlt @@ -19,7 +19,7 @@ MonoBehaviour: width: 1440 height: 795 m_ShowMode: 4 - m_Title: Hierarchy + m_Title: Inspector m_RootView: {fileID: 2} m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} @@ -121,7 +121,7 @@ MonoBehaviour: m_MinSize: {x: 400, y: 200} m_MaxSize: {x: 32384, y: 16192} vertical: 0 - controlID: 16 + controlID: 357 --- !u!114 &6 MonoBehaviour: m_ObjectHideFlags: 52 @@ -198,7 +198,7 @@ MonoBehaviour: m_MinSize: {x: 100, y: 200} m_MaxSize: {x: 8096, y: 16192} vertical: 1 - controlID: 25 + controlID: 318 --- !u!114 &9 MonoBehaviour: m_ObjectHideFlags: 52 @@ -218,8 +218,8 @@ MonoBehaviour: y: 0 width: 308.5 height: 328 - m_MinSize: {x: 202, y: 221} - m_MaxSize: {x: 4002, y: 4021} + m_MinSize: {x: 201, y: 221} + m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 15} m_Panes: - {fileID: 15} @@ -300,22 +300,22 @@ MonoBehaviour: m_Pos: serializedVersion: 2 x: 1110.5 - y: 30 + y: 83 width: 328.5 - height: 829 + height: 724 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default m_SaveData: [] m_PosLeft: {x: 0, y: 0} - m_PosRight: {x: 0, y: 0} + m_PosRight: {x: 0, y: 11.999817} m_Scope: 1 m_SplitterFlex: 0.2 m_SearchText: m_TreeViewState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: bbbcc5c3 - m_LastClickedID: -1010451269 + m_SelectedIDs: 4dcf9b58 + m_LastClickedID: 1486606157 m_ExpandedIDs: a01a5fa600000000 m_RenameOverlay: m_UserAcceptedRename: 0 @@ -350,7 +350,7 @@ MonoBehaviour: m_MaxSize: {x: 4000, y: 4000} m_TitleContent: m_Text: Scene - m_Image: {fileID: 2593428753322112591, guid: 0000000000000000d000000000000000, type: 0} + m_Image: {fileID: 8634526014445323508, guid: 0000000000000000d000000000000000, type: 0} m_Tooltip: m_Pos: serializedVersion: 2 @@ -655,7 +655,7 @@ MonoBehaviour: m_MaxSize: {x: 4000, y: 4000} m_TitleContent: m_Text: Game - m_Image: {fileID: -6423792434712278376, guid: 0000000000000000d000000000000000, type: 0} + m_Image: {fileID: 4621777727084837110, guid: 0000000000000000d000000000000000, type: 0} m_Tooltip: m_Pos: serializedVersion: 2 @@ -747,7 +747,7 @@ MonoBehaviour: m_MaxSize: {x: 4000, y: 4000} m_TitleContent: m_Text: Hierarchy - m_Image: {fileID: 7966133145522015247, guid: 0000000000000000d000000000000000, type: 0} + m_Image: {fileID: -3734745235275155857, guid: 0000000000000000d000000000000000, type: 0} m_Tooltip: m_Pos: serializedVersion: 2 @@ -762,9 +762,9 @@ MonoBehaviour: m_SceneHierarchy: m_TreeViewState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: 32fbffff + m_SelectedIDs: f2820000 + m_LastClickedID: 33522 + m_ExpandedIDs: e4cfffffaed1ffff m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -804,7 +804,7 @@ MonoBehaviour: m_MaxSize: {x: 4000, y: 4000} m_TitleContent: m_Text: Console - m_Image: {fileID: -4327648978806127646, guid: 0000000000000000d000000000000000, type: 0} + m_Image: {fileID: -4950941429401207979, guid: 0000000000000000d000000000000000, type: 0} m_Tooltip: m_Pos: serializedVersion: 2 @@ -832,7 +832,7 @@ MonoBehaviour: m_MaxSize: {x: 10000, y: 10000} m_TitleContent: m_Text: Project - m_Image: {fileID: -5467254957812901981, guid: 0000000000000000d000000000000000, type: 0} + m_Image: {fileID: -5179483145760003458, guid: 0000000000000000d000000000000000, type: 0} m_Tooltip: m_Pos: serializedVersion: 2 @@ -865,14 +865,14 @@ MonoBehaviour: m_LastFolders: - Assets m_LastFoldersGridSize: -1 - m_LastProjectPath: /Users/yusuf/Documents/Projects/BlazePose-Detector-Sample + m_LastProjectPath: /Users/yusuf/Desktop/BlazePose-Detector m_LockTracker: m_IsLocked: 0 m_FolderTreeState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: d25a0000 - m_LastClickedID: 23250 - m_ExpandedIDs: 00000000d25a000000ca9a3b + scrollPos: {x: 0, y: 60} + m_SelectedIDs: 5a820000 + m_LastClickedID: 33370 + m_ExpandedIDs: 000000005a8200006a82000000ca9a3bffffff7f m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -900,7 +900,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 00000000d25a0000 + m_ExpandedIDs: 000000005a82000000ca9a3bffffff7f m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -927,7 +927,7 @@ MonoBehaviour: m_ListAreaState: m_SelectedInstanceIDs: m_LastClickedInstanceID: 0 - m_HadKeyboardFocusLastEvent: 0 + m_HadKeyboardFocusLastEvent: 1 m_ExpandedInstanceIDs: c6230000 m_RenameOverlay: m_UserAcceptedRename: 0