Closed superuser789 closed 3 years ago
I disabled carotene_o4t when I built mediapipe python on aarch64 ubuntu. See the step 6 of https://github.com/jiuqiant/mediapipe_python_aarch64#readme.
I have a Raspberrypi4 with Raspbian os. After import mediapipe as mp mp.solutions.hands in python3.7.3,
"module 'mediapipe' has no attribute 'solutions'".
I'm looking for the solution.
So I found '_frameworkbinding~~.so' in mediapipe/python in mediapipe_python_aarch64/mediapipe-0.8.1-cp38-cp38-linux_aarch64.whl in https://github.com/jiuqiant/mediapipe_python_aarch64 but when I ran, I received error "ELFCLASS64".
Can't I use mediapipe in Python in Raspian? Should I install Ubuntu?
Please help. thank you. @jiuqiant @sgowroji
I disabled carotene_o4t when I built mediapipe python on aarch64 ubuntu. See the step 6 of https://github.com/jiuqiant/mediapipe_python_aarch64#readme.
I think, the most appropriate option to disable carotene_o4t is to add "WITH_CAROTENE": "OFF",
in third_party/BUILD. After adding "WITH_CAROTENE": "OFF",
, the ImportError was gone.
I have written all the steps here https://github.com/superuser789/MediaPipe-on-RaspberryPi#readme .
I have a Raspberrypi4 with Raspbian os. After import mediapipe as mp mp.solutions.hands in python3.7.3,
"module 'mediapipe' has no attribute 'solutions'".
I'm looking for the solution.
- file name = module name? --> My file name isn't same any module names.
- When I compared my desktop with Rpi, I found that there was another mediapipe folder in the mediapipe folder of the pie. So I wrote "from mediapipe import mediapipe" in init.py in the first mediapipe folder, and ran. An error occurred in "from mediapipe.python import *" in init.py in python module. It was that there was no "_framework_binding" module. Even though I have 'framework_binding.cc' in mediapipe/mediapipe/python.
So I found '_frameworkbinding~~.so' in mediapipe/python in mediapipe_python_aarch64/mediapipe-0.8.1-cp38-cp38-linux_aarch64.whl in https://github.com/jiuqiant/mediapipe_python_aarch64 but when I ran, I received error "ELFCLASS64".
Can't I use mediapipe in Python in Raspian? Should I install Ubuntu?
Please help. thank you. @jiuqiant @sgowroji
I think following steps 5&6 of https://github.com/jiuqiant/mediapipe_python_aarch64#readme, gives "module 'mediapipe' has no attribute 'solutions'"
error.
I rebuilt my mediapipe package without removing any OpenCV modules and did not face any error. I have written my steps here https://github.com/superuser789/MediaPipe-on-RaspberryPi#readme .
I have a Raspberrypi4 with Raspbian os. After import mediapipe as mp mp.solutions.hands in python3.7.3, "module 'mediapipe' has no attribute 'solutions'". I'm looking for the solution.
- file name = module name? --> My file name isn't same any module names.
- When I compared my desktop with Rpi, I found that there was another mediapipe folder in the mediapipe folder of the pie. So I wrote "from mediapipe import mediapipe" in init.py in the first mediapipe folder, and ran. An error occurred in "from mediapipe.python import *" in init.py in python module. It was that there was no "_framework_binding" module. Even though I have 'framework_binding.cc' in mediapipe/mediapipe/python.
So I found '_frameworkbinding~~.so' in mediapipe/python in mediapipe_python_aarch64/mediapipe-0.8.1-cp38-cp38-linux_aarch64.whl in https://github.com/jiuqiant/mediapipe_python_aarch64 but when I ran, I received error "ELFCLASS64". Can't I use mediapipe in Python in Raspian? Should I install Ubuntu? Please help. thank you. @jiuqiant @sgowroji
I think following steps 5&6 of https://github.com/jiuqiant/mediapipe_python_aarch64#readme, gives
"module 'mediapipe' has no attribute 'solutions'"
error. I rebuilt my mediapipe package without removing any OpenCV modules and did not face any error. I have written my steps here https://github.com/superuser789/MediaPipe-on-RaspberryPi#readme .
I haven't tried "https://github.com/superuser789/MediaPipe-on-RaspberryPi#readme" yet, but thank you for uploading it. I'll try it in a minute. thank you.
Hi @superuser789, Glad to see your contributions for RaspberryPi in the above repo. We are closing this issue now. Please reach us if you still have any further queries relevant to the above issue.
I am trying to build mediapipe for Raspberry Pi 3 on RPi3 itself. I built the latest opencv release 4.5.2 by following these guide
and successfully built opencv with these flags
cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr \ -D OPENCV_EXTRA_MODULES_PATH=/home/pi/opencv/opencv_contrib-4.5.2/modules \ -D ENABLE_NEON=ON \ -D ENABLE_VFPV3=ON \ -D BUILD_TESTS=OFF \ -D INSTALL_PYTHON_EXAMPLES=OFF \ -D OPENCV_ENABLE_NONFREE=ON \ -D CMAKE_SHARED_LINKER_FLAGS=-latomic \ -D BUILD_EXAMPLES=OFF ..
To build mediapipe, I used bazel binary and prebuilt opencv 4.5.2. Followed official guide, made the changes in
opencv_linux.BUILD
&ffmpeg_linux.BUILD
usingand also commented
"include/opencv2/**/*.h*",
& uncommented"include/opencv4/opencv2/**/*.h*",
underhdrs
and commented"include/",
& uncommented"include/opencv4/",
underincludes
inopencv_linux.BUILD
.To resolve _ZN3ruy14Kernel8bitNeon issue. I added :
as told by arron2003 here.
Built the package :
python3 setup.py gen_protos && python3 setup.py bdist_wheel
& Installed using :sudo python3 -m pip install mediapipe-0.8-cp37-cp37m-linux_aarch64.whl --no-deps
But during
import mediapipe
I get this error :Checking with
nm -gCD /usr/local/lib/python3.7/dist-packages/mediapipe/python/_framework_bindings.cpython-37m-arm-linux-gnueabihf.so | grep -n rgb2hsv
gives :I even tried to build opencv without custom hal carotene by changing ON to OFF in this line. But still throws the same
undefined symbol: _ZN12carotene_o4t7r
error. Which program or library is causing this issue ?Please guide me to resolve this issue. Thanks.