-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'Delegate' object has no attribute '_library' #22
Comments
@fablau Were you able to fix this ? |
Unfortunately not, the problem is still there. Any thoughts? |
Can you try to install the edgeptu runtime folllowing these instructions: https://coral.ai/docs/accelerator/get-started/#runtime-on-mac |
Yes, that's what I have done and I am able to run the tests as well as the following examples without issues: |
cool, can we close this issue? |
Why? I haven't been able to make this run. I still get the error I mentioned in my first post above! |
sorry, I thought you are able to run the tests without issues. |
I am able to run the tests here: But not this specific "project-bodypix" we are discussing about here ;) |
can you please confirm you have downloaded tflite runtime form this link https://github.com/google-coral/pycoral/releases/download/v1.0.1/tflite_runtime-2.5.0-cp38-cp38-macosx_10_15_x86_64.whl as you are using python3.8 and Mac releases: https://github.com/google-coral/pycoral/releases |
Yes, I can confirm that. |
Hmm..please share the output of below command: |
With that, I get a "v4l2-ctl: command not found" error. |
If you see the code at https://github.com/google-coral/project-posenet/blob/ugrade-to-frogfish/pose_engine.py#L79-L83 , it requires posenet_decoder.so. Library is available at https://github.com/google-coral/project-bodypix/tree/master/posenet_lib/x86_64 |
Thank you for your suggestion, but I have that library inside the same directory of the "bodypix.py" script: posenet_lib/x86_64/posenet_decoder.so It should work, right? |
Hi @fablau unfortunately Project-bodypix does not work on MacOS. It would work on linux machines and coral dev board. |
Are there plans to support macOS? I'd love to see this running without having to drop into a VM |
@aldenprudent Please try posenet_decoder.dylib by placing here |
@hjonnala thank you for that! How did you obtain the dylib? I wanted to compile posenet from source but the requirements were more than I had time for a few days back. I'm still unable to get everything to work but it's failing further along trying to load 'v4l2src' in the gstreamer pipeline. I'll report back if I can get everything resolved. |
@aldenprudent here are the steps to build posent lib for macOS.
Add the below lines to pose estmation build at the end of file.
Run the below commands
after successful build please find the macos_posenet_decoder.so Current gstreamer pipeline does not work with macOS. you can test macos_posenet_decoder.so file by runing simple_pose.py and making similar changes to pose_engine.py |
Thank you so much! I'll try and let you know if it works for me. Appreciated! |
Sorry for the late reply on this. I'm unable to get the gstreamer bits working but I am able to get a basic image response now. Here's the diff. |
Ok, I tried what you suggested, but now I get a different error, it looks like a BUILD file is missing:
|
hi @hjonnala I seem to be encountering a similar situation. I got the WSL with Ubuntu on my Windows since the repo only works on Linux based systems. So I'm using Ubuntu on Windows terminal to do most of the work now. I came across the tflite_runtime issue as well and was confused what you meant by downloading the pycoral version. I have python 3.8 and linux so I just downloaded pycoral-2.0.0-cp38-cp38-linux_x86_64.whl. I hope that's the right one, and I dragged that into the bodypix project folder. I tried the
Also relating to this comment you made earlier, I was really confused what exactly I'm supposed to be doing here to get the repo working. Please let me know how I might be able to fix the above error and also what exactly I need to do to this ^^ post you made earlier. Thanks! EDIT: I have a logitech camera attached to my device now, not sure if that impacts the EDIT Pt 2: I think I'm almost there in terms of getting all the dependencies working and whatnot but I'm still having a few issues. Following ___ they had steps to follow in order to install PyCoral API.
So I tried the alternate terminal command
I'm not sure how to proceed please let me know if you can help me out here. Thanks! |
@zain-altaf seems to be you haven't installed the edgetpu runtime. Please follow these instructions and try the basic demo first before trying any other repositories. Thanks! |
Hello, Just installed it on MacOS 11.5 and when I run the first example "python3 bodypix.py" I get this error:
Model: models/bodypix_mobilenet_v1_075_640_480_16_quant_edgetpu_decoder.tflite Traceback (most recent call last): File "bodypix.py", line 180, in <module> main() File "bodypix.py", line 161, in main engine = PoseEngine(model) File "/Users/fabrizio/Desktop/work/MagneticChessResearch/machine learning/Coral/edgetpu_runtime/coral/pycoral/TEST1/project-bodypix/pose_engine.py", line 142, in __init__ edgetpu_delegate = load_delegate(EDGETPU_SHARED_LIB) File "/Users/fabrizio/.local/share/virtualenvs/Coral-u4jlFv0K/lib/python3.8/site-packages/tflite_runtime/interpreter.py", line 152, in load_delegate delegate = Delegate(library, options) File "/Users/fabrizio/.local/share/virtualenvs/Coral-u4jlFv0K/lib/python3.8/site-packages/tflite_runtime/interpreter.py", line 81, in __init__ self._library = ctypes.pydll.LoadLibrary(library) File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/ctypes/__init__.py", line 443, in LoadLibrary return self._dlltype(name) File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/ctypes/__init__.py", line 365, in __init__ self._handle = _dlopen(self._name, mode) OSError: dlopen(libedgetpu.so.1, 6): image not found Exception ignored in: <function Delegate.__del__ at 0x125e94ee0> Traceback (most recent call last): File "/Users/fabrizio/.local/share/virtualenvs/Coral-u4jlFv0K/lib/python3.8/site-packages/tflite_runtime/interpreter.py", line 116, in __del__ if self._library is not None: AttributeError: 'Delegate' object has no attribute '_library'
Any ideas?
The text was updated successfully, but these errors were encountered: