natmlx / blazepalm-unity Goto Github PK
View Code? Open in Web Editor NEWHand landmark prediction with MediaPipe Hands in Unity Engine.
Home Page: https://demos.natml.ai/@natml/blazepalm-landmark
License: Apache License 2.0
Hand landmark prediction with MediaPipe Hands in Unity Engine.
Home Page: https://demos.natml.ai/@natml/blazepalm-landmark
License: Apache License 2.0
I am experiencing while runing natml Blaze Hand Land mark detection in IOs 6s
IOs 15.75
Unity 2021.3
Stack trace is below and memory usage is building upto 1.75 gb almost before crash
#0 0x000000010454a7c8 in ___lldb_unnamed_symbol622 ()
#1 0x000000010454a4e8 in ___lldb_unnamed_symbol617 ()
#2 0x000000010458033c in ___lldb_unnamed_symbol1168 ()
#3 0x00000001045560d8 in ___lldb_unnamed_symbol886 ()
#4 0x000000019544ca64 in Espresso::batch_metal::batch_metal(Espresso::context_metal*) ()
#5 0x00000001954a4c28 in Espresso::MPSEngine::batch::batch(Espresso::MPSEngine::context*) ()
#6 0x000000019544cbdc in std::__1::__shared_ptr_emplace<Espresso::MPSEngine::batch, std::__1::allocatorEspresso::MPSEngine::batch >::__shared_ptr_emplaceEspresso::MPSEngine::context*(std::__1::allocatorEspresso::MPSEngine::batch, Espresso::MPSEngine::context*&&) ()
#7 0x000000019594af34 in std::__1::shared_ptrEspresso::MPSEngine::batch std::__1::allocate_shared<Espresso::MPSEngine::batch, std::__1::allocatorEspresso::MPSEngine::batch, Espresso::MPSEngine::context*, void>(std::__1::allocatorEspresso::MPSEngine::batch const&, Espresso::MPSEngine::context*&&) ()
#8 0x00000001954a7b98 in Espresso::MPSEngine::context::begin_batch() ()
#9 0x0000000195426054 in EspressoLight::espresso_plan::execute_sync() ()
#10 0x000000019541d9b4 in espresso_plan_execute_sync ()
#11 0x0000000194e03958 in -[MLNeuralNetworkEngine executePlan:error:] ()
#12 0x0000000194e02de8 in -[MLNeuralNetworkEngine evaluateInputs:bufferIndex:options:error:] ()
#13 0x0000000194e08bc8 in __54-[MLNeuralNetworkEngine evaluateInputs:options:error:]_block_invoke ()
#14 0x0000000181180094 in _dispatch_client_callout ()
#15 0x000000018112d964 in _dispatch_lane_barrier_sync_invoke_and_complete ()
#16 0x0000000194e08874 in -[MLNeuralNetworkEngine evaluateInputs:options:error:] ()
#17 0x0000000194e0ac60 in __62-[MLNeuralNetworkEngine predictionFromFeatures:options:error:]_block_invoke ()
#18 0x0000000181180094 in _dispatch_client_callout ()
#19 0x000000018112d964 in _dispatch_lane_barrier_sync_invoke_and_complete ()
#20 0x0000000194e04000 in -[MLNeuralNetworkEngine predictionFromFeatures:options:error:] ()
#21 0x0000000194e0a9c4 in -[MLModel predictionFromFeatures:error:] ()
Predictor is called as
using (image)
{
try
{
if (imageFeature == null)
{
var width = image.height > image.width ? image.width : image.height;
var height = image.height > image.width ? image.height : image.width;
imageFeature = new MLImageFeature(width, height);
}
Debug.Log("Feature Size" + imageFeature.width + "," + imageFeature.height);
Debug.Log("XR Size" + image.width + "," + image.height);
MLXRExtensions.CopyFrom(imageFeature, image, true, ScreenOrientation.Portrait);
//MLImageFeature depthFeature = new MLImageFeature(Screen.width, Screen.height);
//MLXRExtensions.CopyFrom(depthFeature, depth, true, ScreenOrientation.Portrait);
var hands = pipeline.Predict(imageFeature);
//BlazePalmVisualizer.blazeInstance.aspectFitter.aspectRatio = width / height;
visualizer.Render(hands);
rgbImage = imageFeature.ToTexture();
//depthImage = depthFeature.ToTexture();
visualizer.rawImage.texture = rgbImage;
}
catch (Exception ex)
{
Debug.Log(ex);
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.