Closed Jatin-Pawar closed 3 years ago
Also, I just found out that building MedaPipe_Android apks is not possible on Windows.On official page of MediaPipe it states
building MediaPipe Android apps is still not possible on native Windows.
Does this affect this plugin as well? Is this the reason native android libraries are not compiling on windows? Is this the reason I spent my last two days trying out different things to make it work but it still didn't work?
I sincerely hope the answer to all the above questions is "NO". Eagerly looking forward to your reply. 🧑💻
There are two problems. First, the below error is a bug (same as #90, see https://github.com/homuler/MediaPipeUnityPlugin/issues/96#issuecomment-804128266).
Assets\Mediapipe\Samples\Scripts\SceneDirector.cs(53,33): error CS0103: The name 'GetCurrentContext' does not exist in the current context
Second, unfortunately you cannot build mediapipe_android.aar
(native libraries for Android) on Windows (cf. #80, I'm sorry that its' undocumented now).
And the answer to the below question is yes.
On official page of MediaPipe it states building MediaPipe Android apps is still not possible on native Windows. Does this affect this plugin as well?
Please try building on WSL 2.
Hey bud, Thanks for the quick reply.
As I feared the answer to the questions is Yes. Sure, I will try building on WSL 2.
And I highly recommend that this should be mentioned in the Readme file. May be we can have a section called "Take a note of the following things" in the readme. Anyways, once again thanks for the quick reply.
Also, I would like to know if I can play around with the information I get with mediapie and add my custom gameObjects as a child the detected feature points. I haven't explored the project yet and will be doing it today. Just asked you so as to get a brief and a general direction. As per my current project, my aim is to simply be able to use the information given by mediaPipe for example placing a nosepin on the user nose with the help of face detection example. When I run it in Unity, I can see that a lot of gameObjects are created with Node(Clone). I would like to know how can get the position of the Node(gameobject) representing the detected face's nose.
For instance, Manomotion (a hand detection library for Unity) gives you apis like trackedHand.fingure[0].pose (this gives us the pose of the thumb.) Do we have something similar for MideoPipe?
When I run it in Unity, I can see that a lot of gameObjects are created with Node(Clone). I would like to know how can get the position of the Node(gameobject) representing the detected face's nose.
If you mean that you see lots of Node
in this plugin's sample scene, those objects only exist for annotation purpose.
You can get face landmarks' positions directly like this.
Please also refer to the official repository to know the protobuf's definition (cf. https://github.com/google/mediapipe/blob/master/mediapipe/framework/formats/landmark.proto).
For instance, Manomotion (a hand detection library for Unity) gives you apis like trackedHand.fingure[0].pose (this gives us the pose of the thumb.) Do we have something similar for MideoPipe?
MediaPipe does not return the pose information directly, so you need to implement those features by yourself.
Thanks for your help.
I will dig deeper into the project to see what all info, processed by Media Pipe, can be used in Unity.
Once again, thanks for your quick reply and keep up the good work mate. 💯 🔥
Also, in Readme.md, there is typo in block given after step 5.
Required files (native
libarieslibraries, model files, C# scripts) will be built and installed.
(Closing this issue with this comment.)
There are two problems. First, the below error is a bug (same as #90, see #96 (comment)).
Assets\Mediapipe\Samples\Scripts\SceneDirector.cs(53,33): error CS0103: The name 'GetCurrentContext' does not exist in the current context
Second, unfortunately you cannot build
mediapipe_android.aar
(native libraries for Android) on Windows (cf. #80, I'm sorry that its' undocumented now). And the answer to the below question is yes.On official page of MediaPipe it states building MediaPipe Android apps is still not possible on native Windows. Does this affect this plugin as well?
Please try building on WSL 2.
Hi Homuler, Could you resolve this bug? I got same error and I wonder if you could fix this. Thank you so much!
Hey @homuler , First of all, hats of to you and your team members for this project. You guys are doing a great job and are really active too.
I have successfully build windows native libraries for unity project by following the Readme. It seems to work fine on Unity in windows. I am facing issues while building for android.
My setup is: ~ Windows 10 ~ Bazel 4.0.0 (also tried with 3.7.1... but no luck as I receive same errors) ~ Android NDK r21(21.4.7075529) ~ Unity 2019.4.18f
I run the following command to build native libraries for android
python build.py build --android arm64 -v --verbose_failures
I would like to mention here that, I tried to use v0.5.0 as well as v0.5.1 of this project and both the times I am able to build native libraries for windows but not for android (and recieve the same errors as mentioned above.)
Also, I noticed that I was able to build v0.5.1 for windows yesterday and it was working great on Unity (windows) as well but today I can see an error popped up, it states
Assets\Mediapipe\Samples\Scripts\SceneDirector.cs(53,33): error CS0103: The name 'GetCurrentContext' does not exist in the current contex
In order to fix things, I rebuild the native libraries for windows using command:
python build.py build --desktop cpu -v --verbose_failures
The build process completes succesfully but when I again open Unity the error (Assets\Mediapipe\Samples\Scripts\SceneDirector.cs(53,33): error CS0103: The name 'GetCurrentContext' does not exist in the current contex
) still persists.This is the first time posting an issues. Kindly don't mind any noob mistakes I make. Kindly let me know if you need more information from my side.
Thanks in advance. :)