google-coral / project-posenet

Human Pose Detection on EdgeTPU
Apache License 2.0
553 stars 157 forks source link

Does this work on native OSX? #71

Closed pliablepixels closed 3 years ago

pliablepixels commented 3 years ago

Hi, does this project work on native OSX? I'm running Catalina. Coral (with pycoral) is installed properly, demo examples work.

When trying to run the posenet simple image example, it seems to find the posenet so, but can't load it

python3 simple_pose.py
--2021-08-14 07:12:55--  https://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Hindu_marriage_ceremony_offering.jpg/640px-Hindu_marriage_ceremony_offering.jpg
Resolving upload.wikimedia.org (upload.wikimedia.org)... 208.80.154.240
Connecting to upload.wikimedia.org (upload.wikimedia.org)|208.80.154.240|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 83328 (81K) [image/jpeg]
Saving to: ‘/tmp/couple.jpg’

/tmp/couple.jpg               100%[================================================>]  81.38K  --.-KB/s    in 0.04s

2021-08-14 07:12:55 (2.01 MB/s) - ‘/tmp/couple.jpg’ saved [83328/83328]

Traceback (most recent call last):
  File "simple_pose.py", line 27, in <module>
    'models/mobilenet/posenet_mobilenet_v1_075_481_641_quant_decoder_edgetpu.tflite')
  File "/Users/pp/fiddle/coral/project-posenet/pose_engine.py", line 83, in __init__
    posenet_decoder_delegate = load_delegate(POSENET_SHARED_LIB)
  File "/Users/pp/.pyenv/versions/ml/lib/python3.6/site-packages/tflite_runtime/interpreter.py", line 160, in load_delegate
    delegate = Delegate(library, options)
  File "/Users/pp/.pyenv/versions/ml/lib/python3.6/site-packages/tflite_runtime/interpreter.py", line 89, in __init__
    self._library = ctypes.pydll.LoadLibrary(library)
  File "/Users/pp/.pyenv/versions/3.6.10/lib/python3.6/ctypes/__init__.py", line 426, in LoadLibrary
    return self._dlltype(name)
  File "/Users/pp/.pyenv/versions/3.6.10/lib/python3.6/ctypes/__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(./posenet_lib/x86_64/posenet_decoder.so, 6): no suitable image found.  Did find:
    ./posenet_lib/x86_64/posenet_decoder.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
    ./posenet_lib/x86_64/posenet_decoder.so: stat() failed with errno=60
Exception ignored in: <bound method Delegate.__del__ of <tflite_runtime.interpreter.Delegate object at 0x120a615f8>>
Traceback (most recent call last):
  File "/Users/pp/.pyenv/versions/ml/lib/python3.6/site-packages/tflite_runtime/interpreter.py", line 124, in __del__
    if self._library is not None:
AttributeError: 'Delegate' object has no attribute '_library'
hjonnala commented 3 years ago

Hi, yes project posenet does not work on native Mac OS.

pliablepixels commented 3 years ago

ok thanks.