mediapipe
mediapipe copied to clipboard
Question regarding Mediapipe hands Api jetson Nano
The use of mediapipe in windows was easy andit was installed using pip, after searching a lot I was able to build the examples of mediapipe using bazel build.
After I ssh and open the terminal to import mediapipe it works, but when I run my personal code where I was enhanced mediapipe, it shows no module named mediapipe. I don't have a .BUILD file for my example is that the issue
Hi @RohitSingh1226, Have you followed the instructions to install MediaPipe python?https://google.github.io/mediapipe/getting_started/building_examples.html#python.
Thanks for the prompt @sgowroji. I did, that’s why I was able to import it on the terminal, the examples have a .BUILD file, my program is a python file and strangely not able to import the package. Does it have something to do with the paths? Because I moved my project folder to the location where I’ve built my mediapipe using bazelisk
Can you run $ python3 -c 'import mediapipe as mp; help(mp); print(mp.__file__)'
to see that if mediapipe is indeed installed?
@RohitSingh1226 you may also reffer as to a reference to https://github.com/jiuqiant/mediapipe_python_aarch64 or to https://google.github.io/mediapipe/getting_started/python.html#building-mediapipe-python-package
python3 -c 'import mediapipe as mp; help(mp); print(mp.file)'
@RohitSingh1226 you may also reffer as to a reference to https://github.com/jiuqiant/mediapipe_python_aarch64 or to https://google.github.io/mediapipe/getting_started/python.html#building-mediapipe-python-package
@AndreV84 thanks for replying immediately, I Have tried to run and build the wheel on python by executing the command python3 setup.py gen_protos, I get the following error. Does this issue have something to do with the shebang inside the setup.py.
revise steps here https://github.com/jiuqiant/mediapipe_python_aarch64#step-to-build-mediapipe-python-on-aarch64-ubuntu-2004 it shows what to do with protoc err
@RohitSingh1226 refrer to this instruction instead if the other two instructions won't work for you https://github.com/google/mediapipe/blob/master/docs/getting_started/python.md#building-mediapipe-python-package
ah, I see there is no instruction on how to make dist builds in the latter url, but on how to build for windows
@jiuqiant is there instruction on how to build python wheel from sources for arm linux? just linux?
in my case the output is
python3 -c 'import mediapipe as mp; help(mp); print(mp.file)'
NAME
mediapipe
PACKAGE CONTENTS
mediapipe (package)
objectron
setup
FILE
/home/nvidia/mediapipe/__init__.py
`
ah, I see there is no instruction on how to make dist builds in the latter url, but on how to build for windows
I have to use this on a Jetson Nano, basically for Ubuntu 18.04
in my case the output is
python3 -c 'import mediapipe as mp; help(mp); print(mp.file)' NAME mediapipe PACKAGE CONTENTS mediapipe (package) objectron setup FILE /home/nvidia/mediapipe/__init__.py
rohit5466@Vicara:~/mediapipe/mediapipe$ python3 -c 'import mediapipe as mp; help(mp); print(mp.file)' Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
PACKAGE CONTENTS calculators (package) examples (package) framework (package) modules (package) python (package) util (package)
FILE /home/rohit5466/mediapipe/mediapipe/mediapipe/init.py
This is my updated output @jiuqiant @AndreV84
@RohitSingh1226 you may also reffer as to a reference to https://github.com/jiuqiant/mediapipe_python_aarch64 or to https://google.github.io/mediapipe/getting_started/python.html#building-mediapipe-python-package
@AndreV84 thanks for replying immediately, I Have tried to run and build the wheel on python by executing the command python3 setup.py gen_protos, I get the following error. Does this issue have something to do with the shebang inside the setup.py.
Any update on this? @jiuqiant @AndreV84 @sgowroji @cdibona
@RohitSingh1226 you may also reffer as to a reference to https://github.com/jiuqiant/mediapipe_python_aarch64 or to https://google.github.io/mediapipe/getting_started/python.html#building-mediapipe-python-package
@AndreV84 thanks for replying immediately, I Have tried to run and build the wheel on python by executing the command python3 setup.py gen_protos, I get the following error. Does this issue have something to do with the shebang inside the setup.py.
Any update on this? @jiuqiant @AndreV84 @sgowroji @cdibona
You don't have the proto compiler package. See the third step of https://github.com/jiuqiant/mediapipe_python_aarch64#readme.
in my case the output is
python3 -c 'import mediapipe as mp; help(mp); print(mp.file)' NAME mediapipe PACKAGE CONTENTS mediapipe (package) objectron setup FILE /home/nvidia/mediapipe/__init__.py
rohit5466@Vicara:~/mediapipe/mediapipe$ python3 -c 'import mediapipe as mp; help(mp); print(mp.file)' Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
PACKAGE CONTENTS calculators (package) examples (package) framework (package) modules (package) python (package) util (package)
FILE /home/rohit5466/mediapipe/mediapipe/mediapipe/init.py
This is my updated output @jiuqiant @AndreV84
home/rohit5466/mediapipe/mediapipe/mediapipe/__init__.py
seems incorrect since the init.py is not in a python site-packages directory. Can you go to the root directory and run $ python3 -c 'import mediapipe as mp; help(mp); print(mp.file)'
?
in my case it is as follows. I am also trying to figure out how to settle python mediapipe
Help on package mediapipe:
NAME
mediapipe - Copyright 2019 - 2020 The MediaPipe Authors.
DESCRIPTION
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
PACKAGE CONTENTS
examples (package)
framework (package)
gpu (package)
python (package)
util (package)
FILE
/home/user/mediapipe/mediapipe/__init__.py
root folder of mediapipe or root folder of the system? the above is from fodler of mediapipe while the below is from folder of the system
Help on package mediapipe:
NAME
mediapipe
PACKAGE CONTENTS
mediapipe (package)
objectron
setup
FILE
/home/nvidia/mediapipe/__init__.py
(END)
I realize that we need to avoid running python interpreter in any parent direcotry of mediapipe. Otherwise, the mediapipe directory will confuse the python interpreter...
For example, I stay in ~/mediapipe after building and installing mediapipe python on my jetson nx. I will get
~/mediapipe$ python3 -m install attrs
~/mediapipe$ python3 -c 'import mediapipe as mp; help(mp); print(mp.file)'
Help on package mediapipe:
NAME
mediapipe - Copyright 2019 - 2020 The MediaPipe Authors.
DESCRIPTION
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specifi
PACKAGE CONTENTS
examples (package)
framework (package)
gpu (package)
python (package)
util (package)
FILE
/home/jiuqiant/mediapipe/mediapipe/__init__.py
If I go to ~/Desktop, which is not a parent directory of mediapipe. I can see that the mediapipe python package is in python3.8/dist-packages/, which is what I expected it to be.
~/Desktop$ python3 -c 'import mediapipe as mp; help(mp); print(mp.file)'
Help on package mediapipe:
NAME
mediapipe - Copyright 2019 - 2020 The MediaPipe Authors.
DESCRIPTION
Help on package mediapipe:
NAME
mediapipe - Copyright 2019 - 2020 The MediaPipe Authors.
DESCRIPTION
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
PACKAGE CONTENTS
calculators (package)
examples (package)
framework (package)
gpu (package)
modules (package)
python (package)
util (package)
SUBMODULES
packet_creator
packet_getter
resource_util
solutions
FILE
/usr/local/lib/python3.8/dist-packages/mediapipe/__init__.py
@jiuqiant good catch! could you also share steps on building pythin whl on jetson nx, please?
@jiuqiant good catch! could you also share steps on building pythin whl on jetson nx, please?
I followed https://github.com/jiuqiant/mediapipe_python_aarch64#step-to-build-mediapipe-python-on-aarch64-ubuntu-2004 to build the python wheel package and it went well. Also, step 6 & 7 can be ignored since opencv aarch64 package is now available.
Hi @RohitSingh1226, Could you please respond to the above comment and share us the issue status. Thanks!
It isn’t working out, I have included multiple files and imported mediapipe as a class from somw other files. Is it because of that? Cause the error comes in the second file not the main.py
On Fri, 21 May 2021 at 4:04 PM, GowrojiSunil @.***> wrote:
Hi @RohitSingh1226 https://github.com/RohitSingh1226, Could you please respond to the above comment and share us the issue status. Thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/mediapipe/issues/1982#issuecomment-845855454, or unsubscribe https://github.com/notifications/unsubscribe-auth/AISFHNMSRRNLWP6X2CQLWCDTOYZK3ANCNFSM44EQBQ7A .
@RohitSingh1226 do you need it with python/ c or basel? both? neither of the two?
Hi @RohitSingh1226, This issue is fixed in the latest release of mediapipe 0.8.11
, Could you please let us know if this is still an issue at your end. Thank you!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.
Closing as stale. Please reopen if you'd like to work on this further.
Hi @RohitSingh1226, This issue is fixed in the latest release of mediapipe
0.8.11
, Could you please let us know if this is still an issue at your end. Thank you!
Hi @RohitSingh1226 In MP v0.8.11 which version of bazel I need to use?