Image processing with USB acceleration - all pi! ARCHIVED

Basically there is no nice module (that I know of) for adding annotations to images in python. People use either openCV or Pillow. The code in this integration is from Home Assistant, and I worked on it. If you can come up with a better way let me know!

so are you saying this is the right module? thatā€™s where the font is specified? if so, I changed what was there (8) to 15, then to 25 but I saw no subsequent change in the font size. I therefore assumed that the file coral_image_processing.py was not the right file. Now Iā€™m really confused.

We can take this conversation onto github via an issue on the repo, cheers

Is there a way to use the current Tensorflow component with the coral or must it be done through a separate install of tensorflow? And how hard is it to integrate that back to HA?

I think this may be the only way to utilise the Coral with Tensorflow - https://github.com/robmarkcole/coral-pi-rest-server

Integration is quite straight forward per the README

I think the only way possible to use a coral is with tensorflow-lite

coral is for use with tensorflow-lite models. The official HA Tensorflow is for full tensorflow models

some people are hoping the coral code i wrote will perform as well as the official deepstack docker container - that is not the case. The coral code is very alpha, and doesnā€™t handle multiple requests

what do you mean exactly by ā€œmultiple requestsā€?

If deepstack receives multiple request it will queue them. Coral is very fast so should be fine, but I have not stress tested it

Just ordered mine. Would be interested to see how many FPS you can get from this stick :slight_smile:

Hi Robin,

I read here:

you arenā€™t working anymore on Coral stick.
Donā€™t you see still advantages of high FPS capabilities and no need to rely upon internet connection?

for HA deepstack type integration I need at most 1-2 FPS. For video rate processing there is frigate or doods.

First off, thanks for making this project. I bought a coral accelerator just to use for this application.

However, Iā€™m seeing high memory and CPU usage after running either the coral-pi-reset-server or the tensorflow-lite-rest-server for about a day.

Is anyone else having this issue?

Might be an idea to have it restart daily, I wouldnt know where to begin debugging this kind of issue

Good news, the issue seems to have gone away on itā€™s own after upgrading to Home Assistant 0.113.1. It makes sense that it was on the HA side since it was affecting both the coral-pi-reset-server and the tensorflow-lite-rest-server. Keeping my fingers crossed that the issue is gone for good.

2 Likes

@robmarkcole Hello Iā€™ve just bought Google Coral USB Accelerator and I cannot make it work on synology DS918+. Did you managed to get it working on your syno ?

Not something I tried, I do recall someone did it

did u try to make it work with synology with docker device mount ?

I was planning to do the same (DS1618+ here) can you elaborate a little bit more, what you tried, and how it failed?

Yea at the moment Iā€™m running it in docker. Itā€™s plausible but quite hard to run it on VM not mentioned that after extensive talk with Google Coral Stick Dev Team there is a huge performance bottleneck (their claim).
With docker itā€™s basically hassle free and itā€™s really 10x faster than without the stick. Iā€™m having 8~10ms processing time.

1 Like