Skip to content

Commit

Permalink
Bump to NatML 1.1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
olokobayusuf committed Oct 3, 2023
1 parent b64f054 commit c00a7ab
Show file tree
Hide file tree
Showing 28 changed files with 1,985 additions and 582 deletions.
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ Logs/
.gradle/
.vs/

# Function
ProjectSettings/Function.asset

# NatML
Assets/NatML
Assets/NatML.meta
ProjectSettings/NatML.asset
ProjectSettings/NatMLHub.asset

# VideoKit
ProjectSettings/VideoKit.asset

# Misc
.DS_Store
606 changes: 314 additions & 292 deletions Assembly-CSharp.csproj

Large diffs are not rendered by default.

14 changes: 5 additions & 9 deletions Assets/BlazePoseSample.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
/*
* BlazePose
* Copyright (c) 2022 NatML Inc. All Rights Reserved.
* Copyright (c) 2023 NatML Inc. All Rights Reserved.
*/

namespace NatML.Examples {

using UnityEngine;
using NatML.Devices;
using NatML.Devices.Outputs;
using NatML.VideoKit;
using NatML.Vision;
using Visualizers;
using VideoKit;

public sealed class BlazePoseSample : MonoBehaviour {

Expand All @@ -25,11 +23,9 @@ public sealed class BlazePoseSample : MonoBehaviour {

private async void Start () {
// Create the BlazePose pipeline
var detectorModelData = await MLModelData.FromHub("@natml/blazepose-detector");
var predictorModelData = await MLModelData.FromHub("@natml/blazepose-landmark");
pipeline = new BlazePosePipeline(detectorModelData, predictorModelData, maxDetections: 1);
pipeline = await BlazePosePipeline.Create(maxDetections: 1);
// Listen for camera frames
cameraManager.OnFrame.AddListener(OnCameraFrame);
cameraManager.OnCameraFrame.AddListener(OnCameraFrame);
}

private void OnCameraFrame (CameraFrame frame) {
Expand All @@ -46,7 +42,7 @@ private void OnCameraFrame (CameraFrame frame) {

private void OnDisable () {
// Stop listening for camera frames
cameraManager.OnFrame.RemoveListener(OnCameraFrame);
cameraManager.OnCameraFrame.RemoveListener(OnCameraFrame);
// Dispose the pipeline
pipeline?.Dispose();
}
Expand Down
Loading

0 comments on commit c00a7ab

Please sign in to comment.