natmlx / blazepalm-unity

Hand landmark prediction with MediaPipe Hands in Unity Engine.
https://demos.natml.ai/@natml/blazepalm-landmark
Apache License 2.0
8 stars 0 forks source link

Crash in IOS Build #1

Closed Raheel312 closed 1 year ago

Raheel312 commented 1 year ago

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::allocator >::shared_ptr_emplace<Espresso::MPSEngine::context>(std::__1::allocator, Espresso::MPSEngine::context&&) ()

7 0x000000019594af34 in std::1::shared_ptr std::__1::allocate_shared<Espresso::MPSEngine::batch, std::1::allocator, Espresso::MPSEngine::context, void>(std::__1::allocator 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); } }

Raheel312 commented 1 year ago

??

olokobayusuf commented 1 year ago

Hey @Raheel312 I think we're continuing this conversation on Discord, so I'm closing this issue.