Skip to content

Commit 93f5fd6

Browse files
committed
Update NatML and NatDevice dependencies
1 parent 3b5c411 commit 93f5fd6

File tree

7 files changed

+33
-28
lines changed

7 files changed

+33
-28
lines changed

Assembly-CSharp.csproj

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<DebugType>full</DebugType>
2323
<Optimize>false</Optimize>
2424
<OutputPath>Temp\bin\Debug\</OutputPath>
25-
<DefineConstants>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_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_TEXTURE_STREAMING;ENABLE_UNET;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_MANAGED_UNITYTLS;RENDER_SOFTWARE_CURSOR;ENABLE_VIDEO;ENABLE_ACCELERATOR_CLIENT_DEBUGGING;PLATFORM_WEBGL;TEXTCORE_1_0_OR_NEWER;UNITY_WEBGL;UNITY_WEBGL_API;UNITY_DISABLE_WEB_VERIFICATION;UNITY_GFX_USE_PLATFORM_VSYNC;ENABLE_CRUNCH_TEXTURE_COMPRESSION;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</DefineConstants>
25+
<DefineConstants>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</DefineConstants>
2626
<ErrorReport>prompt</ErrorReport>
2727
<WarningLevel>4</WarningLevel>
2828
<NoWarn>0169</NoWarn>
@@ -46,6 +46,9 @@
4646
<Reference Include="UnityEngine.AIModule">
4747
<HintPath>/Applications/Unity/Hub/Editor/2021.3.4f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.AIModule.dll</HintPath>
4848
</Reference>
49+
<Reference Include="UnityEngine.ARModule">
50+
<HintPath>/Applications/Unity/Hub/Editor/2021.3.4f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.ARModule.dll</HintPath>
51+
</Reference>
4952
<Reference Include="UnityEngine.AccessibilityModule">
5053
<HintPath>/Applications/Unity/Hub/Editor/2021.3.4f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.AccessibilityModule.dll</HintPath>
5154
</Reference>
@@ -64,6 +67,12 @@
6467
<Reference Include="UnityEngine.ClothModule">
6568
<HintPath>/Applications/Unity/Hub/Editor/2021.3.4f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.ClothModule.dll</HintPath>
6669
</Reference>
70+
<Reference Include="UnityEngine.ClusterInputModule">
71+
<HintPath>/Applications/Unity/Hub/Editor/2021.3.4f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.ClusterInputModule.dll</HintPath>
72+
</Reference>
73+
<Reference Include="UnityEngine.ClusterRendererModule">
74+
<HintPath>/Applications/Unity/Hub/Editor/2021.3.4f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll</HintPath>
75+
</Reference>
6776
<Reference Include="UnityEngine.CoreModule">
6877
<HintPath>/Applications/Unity/Hub/Editor/2021.3.4f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.CoreModule.dll</HintPath>
6978
</Reference>
@@ -220,8 +229,8 @@
220229
<Reference Include="UnityEngine.VideoModule">
221230
<HintPath>/Applications/Unity/Hub/Editor/2021.3.4f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.VideoModule.dll</HintPath>
222231
</Reference>
223-
<Reference Include="UnityEngine.WebGLModule">
224-
<HintPath>/Applications/Unity/Hub/Editor/2021.3.4f1/PlaybackEngines/WebGLSupport/Managed/UnityEngine.WebGLModule.dll</HintPath>
232+
<Reference Include="UnityEngine.VirtualTexturingModule">
233+
<HintPath>/Applications/Unity/Hub/Editor/2021.3.4f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.VirtualTexturingModule.dll</HintPath>
225234
</Reference>
226235
<Reference Include="UnityEngine.WindModule">
227236
<HintPath>/Applications/Unity/Hub/Editor/2021.3.4f1/Unity.app/Contents/Managed/UnityEngine/UnityEngine.WindModule.dll</HintPath>
@@ -718,6 +727,9 @@
718727
<Reference Include="Unity.PlasticSCM.Editor">
719728
<HintPath>/Users/yusuf/Desktop/BlazePose/Library/ScriptAssemblies/Unity.PlasticSCM.Editor.dll</HintPath>
720729
</Reference>
730+
<Reference Include="UnityUIExtensions">
731+
<HintPath>/Users/yusuf/Desktop/BlazePose/Library/ScriptAssemblies/UnityUIExtensions.dll</HintPath>
732+
</Reference>
721733
<Reference Include="UnityEngine.UI">
722734
<HintPath>/Users/yusuf/Desktop/BlazePose/Library/ScriptAssemblies/UnityEngine.UI.dll</HintPath>
723735
</Reference>
@@ -763,6 +775,9 @@
763775
<Reference Include="Unity.VisualScripting.State">
764776
<HintPath>/Users/yusuf/Desktop/BlazePose/Library/ScriptAssemblies/Unity.VisualScripting.State.dll</HintPath>
765777
</Reference>
778+
<Reference Include="UnityUIExtensions.editor">
779+
<HintPath>/Users/yusuf/Desktop/BlazePose/Library/ScriptAssemblies/UnityUIExtensions.editor.dll</HintPath>
780+
</Reference>
766781
</ItemGroup>
767782
<ItemGroup>
768783
</ItemGroup>

Assets/BlazePoseSample.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55

66
namespace NatML.Examples {
77

8-
using System.Threading.Tasks;
98
using UnityEngine;
109
using NatML.Devices;
1110
using NatML.Devices.Outputs;
12-
using NatML.Features;
1311
using NatML.Vision;
1412
using Visualizers;
1513

@@ -20,7 +18,7 @@ public sealed class BlazePoseSample : MonoBehaviour {
2018
public Landmark3DVisualizer visualizer3D;
2119

2220
CameraDevice cameraDevice;
23-
TextureOutput previewTextureOutput;
21+
TextureOutput cameraTextureOutput;
2422
BlazePosePipeline posePipeline;
2523

2624
async void Start () {
@@ -34,11 +32,11 @@ async void Start () {
3432
var query = new MediaDeviceQuery(MediaDeviceCriteria.CameraDevice);
3533
cameraDevice = query.current as CameraDevice;
3634
// Start the camera preview
37-
previewTextureOutput = new TextureOutput();
38-
cameraDevice.StartRunning(previewTextureOutput);
35+
cameraTextureOutput = new TextureOutput();
36+
cameraDevice.StartRunning(cameraTextureOutput);
3937
// Display the preview
40-
var previewTexture = await previewTextureOutput;
41-
visualizer.image = previewTexture;
38+
await cameraTextureOutput.textureCreated;
39+
visualizer.image = cameraTextureOutput.texture;
4240
// Create the BlazePose pipeline
4341
var detectorModelData = await MLModelData.FromHub("@natml/blazepose-detector");
4442
var predictorModelData = await MLModelData.FromHub("@natml/blazepose-landmark");
@@ -50,7 +48,7 @@ void Update () {
5048
if (posePipeline == null)
5149
return;
5250
// Predict
53-
var poses = posePipeline.Predict(previewTextureOutput.texture);
51+
var poses = posePipeline.Predict(cameraTextureOutput.texture);
5452
// Visualize
5553
if (poses.Length == 0)
5654
return;

Assets/StreamingAssets.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Packages/ai.natml.vision.blazepose/Runtime/BlazePosePipeline.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public sealed partial class BlazePosePipeline : IMLPredictor<BlazePosePredictor.
2929
public BlazePosePipeline (MLModelData detector, MLModelData predictor, int maxDetections = Int32.MaxValue) {
3030
this.detectorData = detector;
3131
this.predictorData = predictor;
32-
this.detectorModel = detector.Deserialize() as MLEdgeModel;
33-
this.predictorModel = predictor.Deserialize() as MLEdgeModel;
32+
this.detectorModel = new MLEdgeModel(detector);
33+
this.predictorModel = new MLEdgeModel(predictor);
3434
this.detector = new BlazePoseDetector(detectorModel);
3535
this.predictor = new BlazePosePredictor(predictorModel);
3636
this.maxDetections = maxDetections;

Packages/ai.natml.vision.blazepose/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "Pose detection with MediaPipe BlazePose.",
66
"unity": "2021.2",
77
"dependencies": {
8-
"ai.natml.natml": "1.0.18",
8+
"ai.natml.natml": "1.0.19",
99
"ai.natml.vision.blazepose.detector": "1.0.2"
1010
},
1111
"keywords": [

Packages/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
],
1414
"dependencies": {
15-
"ai.natml.natdevice": "1.2.5",
15+
"ai.natml.natdevice": "1.3.1",
1616
"com.unity.collab-proxy": "1.15.17",
1717
"com.unity.feature.development": "1.0.1",
1818
"com.unity.ide.rider": "3.0.14",

Packages/packages-lock.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
22
"dependencies": {
33
"ai.natml.hub": {
4-
"version": "1.0.12",
4+
"version": "1.0.15",
55
"depth": 1,
66
"source": "registry",
77
"dependencies": {},
88
"url": "https://registry.npmjs.com"
99
},
1010
"ai.natml.natdevice": {
11-
"version": "1.2.5",
11+
"version": "1.3.1",
1212
"depth": 0,
1313
"source": "registry",
1414
"dependencies": {
15-
"ai.natml.hub": "1.0.12"
15+
"ai.natml.hub": "1.0.15"
1616
},
1717
"url": "https://registry.npmjs.com"
1818
},
1919
"ai.natml.natml": {
20-
"version": "1.0.18",
20+
"version": "1.0.19",
2121
"depth": 1,
2222
"source": "registry",
2323
"dependencies": {
@@ -30,7 +30,7 @@
3030
"depth": 0,
3131
"source": "embedded",
3232
"dependencies": {
33-
"ai.natml.natml": "1.0.18",
33+
"ai.natml.natml": "1.0.19",
3434
"ai.natml.vision.blazepose.detector": "1.0.2"
3535
}
3636
},

0 commit comments

Comments
 (0)