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 : We recommend installing Ubuntu 22.04.5 but Ubuntu 24.04 shall work as well.
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'
}
]
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