ES 6.0 and lots of goodies (but be prepared for breaking changes)

oZoneDev
zmNinja
Published in
3 min readAug 15, 2020
You’re either falling or you’re rising. It’s all perspective.

I am close to releasing ES 6.0 and along with it many updates to pyzm and mlapi. A lot of updates have gone in, both as features and under-the-hood structural changes for the greater good. This post covers some highlights:

Let’s start with the good stuff:

  • ES now support detection using Google Coral USB stick. It’s a great little stick that costs around $60 and offers fast object detection. Note that you can use any coral compatible model you want, including creating your own or using a 3rd party model that has been converted to coral’s tflite format. By default, I download mobilenetSSD v2. It’s not as accurate as Yolov4 but works quite well. And for that speed, hell yeah.
  • The ES now supports a rule file called es_rules.json that is placed in /var/lib/zmeventnotification/es_rules.json — You can use it to customize notification mute times on a per monitor basis. Over time, this functionality will expand. See this for some more details.
  • You can now specify how many simultaneous processes can use your target hardware at the same time (TPU/GPU or CPU). This is a great help if you find your object detection code crashing when a lot of requests come together. Any processes that exceed the maximum count will wait till the count goes below max count (see xxx_max_processes where xxx=cpu or tpu or gpu )
  • All the machine learning code has now moved to pyzm — the common python library I wrote for ZM. This means we no longer need to keep updating mlapi separately. With each update to pyzm, local detection and remote detection stay in sync. This also means mlapi now supports all detection algorithms that local detection supports including alpr. Bonus, you can now use ML code in your own python scripts like this.
  • Many more fine grained controls have been introduced that allows you to switch processors based on type of detection (example, you can do object detection on a TPU, face detection on a CPU or GPU etc.)
  • You can now filter detection patterns based on object type. For example, you can filter for certain license plates using alpr, while using a different filtering criteria for objects.
  • zm_detect.py can now be used to update detection for past events as well. See --notes command line parameter. This is useful if you want to run detection in batch mode for a bunch of past events.

All of this come with costs. Some due to new features, some due to my not thinking things through well before.

  • A lot of things have changed in objectconfig.ini . Don’t expect to just clone and start running. Please read “Breaking Changes” and follow the instructions.
  • I’d strongly recommend you use the supplied install.sh script- it will ease a lot of your pain and also create a migrated config file for you to inspect and modify.
  • If you are using mlapi or pyzm in your own projects, make sure you update to the latest versions for all, or things will break.

Enjoy.

--

--

oZoneDev
zmNinja

A breath of fresh air for security and surveillance software