Comments (10)
Please provide actionable logs and code samples so we can work with your issue better.
from mediapipe.net.
Remember that Mediapipe resources such as graphs and modules are not provided by MediaPipe.NET.
You can find them in the original mediapipe repo under mediapipe/graphs
and mediapipe/modules
.
In particular, the graph you're looking for is here.
from mediapipe.net.
It also needs to be under the same directory structure, with the mediapipe/
folder directly visible to the executable.
However, you can also create a child of the ResourceManager
class where you can load resources manually by providing 2 delegate functions.
from mediapipe.net.
I have added the mediapipe/ folder directly but still getting the same error. Here is the detailed log
FATAL UNHANDLED EXCEPTION: System.IO.DirectoryNotFoundException: Could not find a part of the path '/mediapipe/graphs/face_mesh/face_mesh_desktop_live_gpu.pbtxt'.
[mono-rt] at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func2 errorRewriter) [mono-rt] at Interop.CheckIo(Error error, String path, Boolean isDirectory, Func
2 errorRewriter)
[mono-rt] at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
[mono-rt] at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
[mono-rt] at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
[mono-rt] at System.IO.Strategies.UnixFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
[mono-rt] at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
[mono-rt] at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
[mono-rt] at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
[mono-rt] at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
[mono-rt] at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync)
[mono-rt] at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
[mono-rt] at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
[mono-rt] at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
[mono-rt] at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks)
[mono-rt] at System.IO.File.InternalReadAllText(String path, Encoding encoding)
[mono-rt] at System.IO.File.ReadAllText(String path)
[mono-rt] at Mediapipe.Net.Calculators.Calculator2[[Mediapipe.Net.Framework.Packet.NormalizedLandmarkListVectorPacket, Mediapipe.Net, Version=0.8.10.0, Culture=neutral, PublicKeyToken=null],[System.Collections.Generic.List
1[[Mediapipe.Net.Framework.Protobuf.NormalizedLandmarkList, Mediapipe.Net.Framework.Protobuf, Version=0.8.9.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]..ctor(String graphPath, String secondaryOutputStream)
[mono-rt] at Mediapipe.Net.Calculators.GpuCalculator2[[Mediapipe.Net.Framework.Packet.NormalizedLandmarkListVectorPacket, Mediapipe.Net, Version=0.8.10.0, Culture=neutral, PublicKeyToken=null],[System.Collections.Generic.List
1[[Mediapipe.Net.Framework.Protobuf.NormalizedLandmarkList, Mediapipe.Net.Framework.Protobuf, Version=0.8.9.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]..ctor(String graphPath, String secondaryOutputStream)
[mono-rt] at Mediapipe.Net.Calculators.FaceMeshGpuCalculator..ctor()
[mono-rt] at MauiApp1.MainPage.TakePhoto() in C:\Users\amal.b\source\repos\MauiApp1\MauiApp1\MainPage.xaml.cs:line 56
[mono-rt] at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
[mono-rt] at Android.App.SyncContext.<>c__DisplayClass2_0.b__0() in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.App/SyncContext.cs:line 36
[mono-rt] at Java.Lang.Thread.RunnableImplementor.Run() in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:line 36
[mono-rt] at Java.Lang.IRunnableInvoker.n_Run(IntPtr jnienv, IntPtr native__this) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net6.0/android-32/mcw/Java.Lang.IRunnable.cs:line 84
[mono-rt] at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V(_JniMarshal_PP_V callback, IntPtr jnienv, IntPtr klazz) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:line 22
from mediapipe.net.
Could you tell me how you run your project and where you placed the mediapipe/
folder?
from mediapipe.net.
I run the project on Android emulator and have placed the mediapipe folder in the MauiApp root folder
from mediapipe.net.
You have to place it in the folder where the executable is. I assume it's somewhere in bin/Debug/[...]/
or bin/Release/[...]
.
from mediapipe.net.
Android
I'd also like to mention that we never tested MediaPipe.NET on Android before. Our main targets are Windows and Linux. Maybe the Linux shared library isn't adapted for Android, but in that case it's surprising that it didn't crash in the first place...
from mediapipe.net.
I tried placing it in this folder bin/Debug/[...]/ or bin/Release/[...] but still getting the same result.
Could you please give a sample of loading it with resource manager ?
from mediapipe.net.
You can look at the FaceMesh example. It provides a DummyResourceManager
and uses it if you run the example with the --use-resource-manager
option. You could copy the class and extend it with some print statements to see what's going on, it would also help us in the process.
from mediapipe.net.
Related Issues (20)
- Adding hair segmentation HOT 1
- Update face capture to 52 blendshapes HOT 7
- The type or namespace name 'Solutions' does not exist in the namespace 'Mediapipe.Net' HOT 2
- ImageFrame SignalAbort tests failing due to incorrect ByteDepth HOT 1
- Alternate solution of Mediapipe.Net.Solutions HOT 1
- Redo examples HOT 4
- Build Errors HOT 8
- Native pointer is not assigned when creating packet with default constructor HOT 3
- Revisit Calculator Solutions
- About examples of solutions that existed before HOT 2
- MediaPipe 0.10.1 HOT 2
- Pose LandMark: Unmanaged Code HOT 1
- How to improve recognition speed HOT 4
- Compilation errors when running pose tracking cpu on windows HOT 1
- Create Benchmark Tests HOT 1
- Rewrite Framework Code to take advantage of SIMD Numerics
- Unable to run Hello World instance successfully HOT 3
- What is the most stable version of Media Pipe I can use to run hand tracking on windows? HOT 12
- System.DllNotFoundException: Unable to load DLL 'mediapipe_c' or one of its dependencies: Can't find the specified module. HOT 1
- [WIP] July 2024 Update HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mediapipe.net.