Image processing with USB acceleration - all pi! ARCHIVED

Forgive me for being a noob. But if one is using the Coral and the supplied custom component, does one then still need to do all the setup described here - https://www.home-assistant.io/components/tensorflow/ ?

You don’t need Tensorflow or the component :slight_smile:

Well that makes life so much easier, thank you.
Coral order on the way. You should be getting commission on the hardware.

So does this currently work with hassio?

Really? read the thread!

Nice helpful and informative comment. I did read the thread. He mentioned that he hopes to make a hassio addon for this, but that doesn’t mean it’s not supported in hassio as a non-addon.

No Hassio addon yet, but you can run on any computer and connect over the network

Are there any use case examples of using it for number plate recognition?

There is a HA component dedicated to number plates, neural networks are not required

OK, I have my USB, how do I set it up?
Do I follow these instructions?

Or do I do a git clone of


Then run what is in that?

Yes install and test the stick, then you can use the component

OK installed the code from Coral and it ran fine, I could identify the Macaw.

I tried to install the git hub for coral-pi-rest-server but when I run ‘python3 coral-app.py’ I get the error below.

I am running Raspbian on a Raspberry Pi 3 with the USB stick

Traceback (most recent call last):
  File "coral-app.py", line 103, in <module>
    load_model()
  File "coral-app.py", line 42, in load_model
    engine = DetectionEngine(MODEL)
  File "/usr/local/lib/python3.5/dist-packages/edgetpu/detection/engine.py", line 55, in __init__
    super().__init__(model_path)
  File "/usr/local/lib/python3.5/dist-packages/edgetpu/swig/edgetpu_cpp_wrapper.py", line 300, in __init__
    this = _edgetpu_cpp_wrapper.new_BasicEngine(*args)
RuntimeError: Could not open '/home/pi/edgetpu/all_models/mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite'.

And running Hassio on a seperate Pi3 pointing to the Raspbian Pi.
Hassio has the error of…

ConnectionError: Is google_coral running?

What should I do next?

Well the error states that the model file is not reachable. Either you haven’t placed the model files in that location or you can run using sudo

so is it the “Could not open ‘/home/pi/edgetpu/all_models/mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite’” that is causing the error?

I dont see where I get this file? I have edgetpu_api from the coral install.

How to I get “/home/pi/edgetpu/all_models/…”?

Please read the component README, this is documented. Thanks

OK, I see the note

NOTE: you need to update the MODEL and LABELS file paths in coral-app.py. For compatability with the way these paths are hard coded in this repo, you can on a pi cd ~, mkdir edgetpu, mkdir all_models, cd all_models, wget https://dl.google.com/coral/canned_models/all_models.tar.gz, tar xf all_models.tar.gz, rm all_models.tar.gz

that fixed it, thank you!!! this is great!! (sorry for missing that, I dont like to post unless I really cant figure it out)

1 Like

I will create an issue that the hub should return an error response in this case (unreachable model)

hi @robmarkcole,

so i received the USB stick and installed all necessary on my RPI3.
So far i tried to run it locally, and it works, and installed flask and run the server at RPI3 startup.

Next is to test the custom component on HA which hopefully I will do on the weekend.

In the meanwhile I am starting to think what to use this stick for (within HA): any suggestion?
I would like to use it for face recognition but not sure how to train the model…

Hi @mspinolo I made a post re recognition earlier in this thread, let me know what you think

You should know that no one reads more then two posts above their own!