geaxgx / depthai_hand_tracker

Running Google Mediapipe Hand Tracking models on Luxonis DepthAI hardware (OAK-D-lite, OAK-D, OAK-1,...)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot run in edge mode

TheBricktop opened this issue · comments

After trying to run the demo.py with -e or --edge parameters ive got critical error :
[critical] ValueError: memoryview assignment: lvalue and rvalue have different structures

(venv) PS B:\Github\depthai_hand_tracker> & b:/Github/depthai_hand_tracker/venv/Scripts/python.exe b:/Github/depthai_hand_tracker/demo.py --edge
Palm detection blob : B:\Github\depthai_hand_tracker\models\palm_detection_sh4.blob
Landmark blob : B:\Github\depthai_hand_tracker\models\hand_landmark_lite_sh4.blob
PD post processing blob : B:\Github\depthai_hand_tracker\custom_models\PDPostProcessing_top2_sh1.blob
Sensor resolution: (1920, 1080)
Internal camera FPS set to: 39
Internal camera image size: 1152 x 648 - pad_h: 252
Creating pipeline...
Creating Color Camera...
Creating Palm Detection pre processing image manip...
Creating Palm Detection Neural Network...
Creating Palm Detection post processing Neural Network...
Creating Hand Landmark pre processing image manip...
Creating Hand Landmark Neural Network (1 thread)...
Pipeline created.
[14442C1051FD60D700] [11.544] [NeuralNetwork(4)] [warning] Network compiled for 4 shaves, maximum available 13, compiling for 6 shaves likely will yield in better performance
[14442C1051FD60D700] [11.775] [NeuralNetwork(8)] [warning] Number of inference threads assigned for network is 1, assigning 2 will likely yield in better performance
[14442C1051FD60D700] [11.775] [NeuralNetwork(8)] [warning] Network compiled for 4 shaves, maximum available 13, compiling for 6 shaves likely will yield in better performance
[14442C1051FD60D700] [11.786] [NeuralNetwork(4)] [warning] The issued warnings are orientative, based on optimal settings for a single network, if multiple networks are running in parallel the optimal settings
may vary
[14442C1051FD60D700] [11.786] [NeuralNetwork(8)] [Pipeline started - USB speed: SUPER
warning] The issued warnings are orientative, based on optimal settings for a single network, if multiple networks are running in parallel the optimal settings may vary
[14442C1051FD60D700] [12.369] [Script(2)] [critical] ValueError: memoryview assignment: lvalue and rvalue have different structures
At:

<script>(36): send_result <script>(40): send_result_no_hand <script>(80):

Yes, this is due to a bug in the latest version of depthai (2.12.0 or 2.12.1). Luxonis team is aware of this bug and actually has already found a fix. The fix should be available in 2.12.2.
So I suggest one of these 2 options:

  • wait for 2.12.2, should be available soon;
  • downgrade depthai to a previous version:
pip uninstall depthai
pip install depthai==2.11.1

Thank You for the information i'll try the latter while waiting for the fix

Luxonis team has released depthai 2.13 which includes the fix.
The following command should install this release:
pip install -U depthai

The next release fixed the issue for me.