Event Server Error using TPU

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
fhold
Posts: 4
Joined: Tue Sep 14, 2021 11:05 am

Event Server Error using TPU

Post by fhold »

Hi,

I updated my zoneminder from 1.34 to 1.36 and also updated to the lastet Event Server 6.1.27 in order to be able to use my coral edge tpu.
However everything works fine until i switch the models from full yolo v3 to edge tpu. Then i get the following error:

Code: Select all

Unrecoverable error:No module named 'edgetpu' Traceback:Traceback (most recent call last): File "/var/lib/zmeventnotification/bin/zm_detect.py", line 849, in main_handler() File "/var/lib/zmeventnotification/bin/zm_detect.py", line 321, in main_handler m = object_detection.Object(logger=g.logger, options=g.config) File "/usr/local/lib/python3.8/dist-packages/pyzm/ml/object.py", line 30, in __init__ import pyzm.ml.coral_edgetpu as tpu File "/usr/local/lib/python3.8/dist-packages/pyzm/ml/coral_edgetpu.py", line 14, in from edgetpu.detection.engine import DetectionEngineModuleNotFoundError: No module named 'edgetpu'
I did follow all the steps to install the edge tpu incl giving the www-data user the correct rights. Interestingly the edge-TPU works in another scenario flawlessly.

Any idea what the cause is?

Thanks in advance

Best regards
Flave
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Event Server Error using TPU

Post by asker »

Chances are you have multiple python environments
https://github.com/f0cal/google-coral/issues/42
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
fhold
Posts: 4
Joined: Tue Sep 14, 2021 11:05 am

Re: Event Server Error using TPU

Post by fhold »

thanks for the quick reply!
following the steps suggest in the topic unfortunately doesnt't help.

Any help how i can check if the problem with the multiple python version prevails?

Thanks!
Flave
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Event Server Error using TPU

Post by asker »

The error indicates the python environment being executed can't find the tpu libs.
One way to check is to run it manually using the web user that usually runs the daemon process.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
fhold
Posts: 4
Joined: Tue Sep 14, 2021 11:05 am

Re: Event Server Error using TPU

Post by fhold »

Thanks for taking your time to help me out. Frankly i don't know how to excecute your advice :? as i'm not so firm in linux.
I'm afraid this all has something todo with the decprecation of the python edge-tpu lib which now is pycoral.
Under Python3/dist-packages at least i cannot find any edge-tpu anymore.

Any help what i can do/ which command i can try i'll be glad.

Best Flave
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Event Server Error using TPU

Post by asker »

Whoops you are correct. Looks like you are not using the latest Pyzm. Try removing it and reinstalling.
https://github.com/pliablepixels/pyzm/b ... edgetpu.py Doesn’t have edgetpu
V0.3.54
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
fhold
Posts: 4
Joined: Tue Sep 14, 2021 11:05 am

Re: Event Server Error using TPU

Post by fhold »

Hi asker,

Big thanks that was the problem! I then had a bunch of other errors and strangly i hadn't installed the latest version of ES. I could swear I did it, there must have been an error pulling the lastest version.

I'm now figuring out how to adapt my objectconfig to my needs - that will probably take some time with the extended ml section.

Thanks again -apreciate a lot the help.

Flave
Post Reply