This article assumes you have Shinobi installed and the Coral TPU device plugged in. Our article is based on the M.2 A+E Key version of the Coral TPU.

Please keep in mind that the USB Coral TPU was designed for testing, not production use. You may be able to use the USB Coral TPU with these instructions but there is no guarantee it will operate without frequent issues.

WARNING : Currently this plugin does have installation capability upon ARM-based CPUs but may not work. Our tests failed to run on a Jetson Nano running Ubuntu 18.04 (JetPack 4.6). We resolved to just release this plugin for linux_x86_x64 on Ubuntu 24.04 at the time of writing this article.

See plugin source here : https://gitlab.com/Shinobi-Systems/shinobi-plugins/-/tree/master/plugins/tensorflow-coral-2023-10-13

Important Notice

IMPORTANT NOTICE : We recommend installing Ubuntu 22.04.5 but Ubuntu 24.04 shall work as well.

Installing the Plugin through Superuser

  1. Login to your Superuser panel for Shinobi
  2. Open the Plugin Manager tab
  3. Select "Downloadable Plugins" and search for "Coral"
  4. Download the Coral Plugin labelled with "TensorFlow Lite (C++)"
  5. The page will return to "Downloaded" within the Plugin Manager tab.
  6. Click "Run Installer" for the Coral TPU Plugin (shinobi-coral).
    • You will now see a lot of information from the installer, please wait. It will get dependencies as well as install the Drivers for your Coral TPU.
  7. You may be asked to reboot if it is the first time installing the Coral TPU Driver, say Yes when it requests this.
  8. Once Shinobi is started again you may click "Run Installer" to complete the rest of the installation.
  9. Once it is complete you can Test the Object Detector from the "Commands" dropdown. If successful then click "Enable" and restart Shinobi from the "Controls and Logs" tab.
A Test Output may look like this, you just need to see x,y,width,height for an Object to know it is working :

Frame 176 detected in 0.278s
[
  {
    class_id: 0,
    confidence: 0.6456838250160217,
    box: { x: 254, y: 432, width: 58, height: 48 },
    tag: 'person'
  }
]
Frame 177 detected in 0.276s
[
  {
    class_id: 0,
    confidence: 0.6623225212097168,
    box: { x: 256, y: 433, width: 54, height: 52 },
    tag: 'person'
  }
]

Installing the Plugin through Terminal

This assumes your Shinobi is installed in the default location /home/Shinobi.

1. Open the Shinobi directory in Terminal

cd /home/Shinobi

2. Run the Plugin Download tool

node tools/downloadPlugins.js tensorflow-coral-2023-10-13

3. Enter the plugin directory.

cd plugins/tensorflow-coral-2023-10-13

4. Run the installer.

npm i

5. Test the installation

node tools/test.js

6. Set the Plugin Key pair from the main Shinobi directory. You can replace "$(head -c 64 < /dev/urandom | sha256sum | awk '{print substr($1,1,60)}')​" with some other string if you want.

node /home/Shinobi/tools/modifyConfigurationForPlugin.js tensorflow-coral-2023-10-13 key=$(head -c 64 < /dev/urandom | sha256sum | awk '{print substr($1,1,60)}')

7. Start as daemon

npm run startup

8. Restart Shinobi

pm2 restart camera