Incentivised Multi-Target, Multi-Camera Tracking with Untrusted Cameras (Part 2)

David T
3 min readJul 13, 2018

--

Grassland node-lite

My friends at Bitaccess asked if they could run two Grassland nodes from their new office so I’m programming this “lite” node for them. They couldn’t dedicate an NVIDIA GPU to just run Tensorflow’s Detection API yet so I had to find a way to streamline it — there are no other nodes at that intersection so it’s not as if they’re competing for rank (yet).

(Click here to read part 1)

Inside that transparent case is a Raspberry Pi 3 Model B with a tiny camera attached (other side). It’s powered from an outlet (top cord) but you could easily attach a battery or solar panel. The bigger cord is just an HDMI cable I temporarily attached to program it from my TV.

I modified the Grassland node software architecture here slightly so people can run nodes on slower computers without powerful graphics cards.

What’s going to happen is that this Pi will just do the motion detecting (OpenCV), tracking and the making and adjusting of path vector predictions to adjacent nodes to increase its confidence rank and thus reward (see previous article). When it detects motion, it’ll send an “object detection request” as an image frame to a cheap Digital Ocean server running the ‘faster_rcnn_inception_v2_coco_2018_01_28’ model of Tensorflow’s Detection API to help it detect and identify what it’s seeing.

While waiting for the server to respond, the Pi will record and track the objects in motion. When it receives the precise bounding boxes of the objects in frame from the detection server, another thread will rewind the video and track the objects across the video with the new bounding boxes until it loses track of them. Upon which, another “object detection request” will be sent. If there are no more objects to track, it will just idly record in a loop until there is.

I’ll be putting all the code up on Github shortly so anyone can set up their own node. (Update: The code is being put up)

Just in case you were wondering, here’s the type of detection accuracy that a full implementation would give you…

The type of accuracy a full node would provide

There are quite a few detection models you can choose from but I think this one’s pretty cool at showing how good the tech is now because it not only gives you a bounding box, it puts a mask around the object too.

But If you take it off, it would be extremely easier… for the GPU!

But for this “lite” Raspberry Pi implementation, everything: the 1080p camera, WiFi, Ethernet, and 4 USB ports is inside that little plastic case. The Pi and camera cost $160 CAD with tax but that’s a local, retail price. You could still do a decent job using a ten year old PC and a webcam and at most it’d cost you $50 if you didn’t already have them.

In this case however, I wanted powerful enough components till I knew the least amount of resources I could use and still effectively run Grassland’s protocol but I also thought it’d be nice if they had something small, sleek and unassuming.

--

--