The technology enabling our project is a very commonly used and very efficient object-detection Neural Networks: Yolo. A version of this network, specifically trained to recognize garbage containers, bags and cardboard boxes has been recently released by Maarten Sukel, an AI specialist working for the city of Amsterdam. This is the core of our camera software.
The best way to add smart capabilities to a portable camera is to use one of the NVIDIA Jetson family system-on-a-chip. For our camera we have chosen the most powerful one, the NVIDIA AGX Xavier series. It was a safe choice considering we have to run both garbage detection and people blurring, but it is probably possible to achieve the same results on a less expensive TX2.
The camera is a simple logitech webcam and additional hardware includes an Arduino-compatible GPS+Glonass module with its antenna and a battery-powered wifi/4G hotspot for cloud connectivity.
The best battery-powered vehicle that one can use to reach every zone in Amsterdam is an electric bike. However, style matters and for this reason we modified our Vespa to hold all the equipment (cameras and antenna excluded) in the helmet compartment. Add a simple voltage regulator (from 12V to 19V for the Xavier) and a power button, and you have an AI-powered Vespa: we baptized it VespAI!
The software on-board uses a modified version of Darknet to run Yolo v3. The detection results are fed through a filter-and-accumulate module that will avoid counting multiple times the same garbage, if present in multiple adjacent video frames; it will also merge to a single “garbage point” multiple detections done within approximately a 5-meters radius area. Better resolution seems unnecessary and can be achieved in any case only with more advanced GPS modules.
GPS points are read from the usb module by using the simple gpsd interface. Data are stored on Google Firestore real-time database and as such the native google firebase SDK has been used for client app development.
Modern applications for data analytics need to be accessible from any device and platform. Real-time data access requires the usage of an appropriate back-end technology and a properly designed data model able to support user queries. Our choice has fallen on Ionic+Angular for the front-end development and on Google Firestore real-time database.
Ionic+Angular allows us to deploy, from a common codebase, native iOS and Android apps as well as a web-based app accessible from any browser.
Google Firebase allows us to store each GPS point as a nested collections/document store. The chosen data model allows us to quickly retrieve the list of detected trash points, with related GPS location, a count of containers/bags/cardboard, by zone and with hourly granularity. The support for distributed counters makes it easy to pre-calculate basic statistics by hour and zone in real-time with no need to perform complicated queries.
The Firebase client SDK includes an extensive APIs that can be used to subscribe client applications to add/update/remove events generated by the application running on VespAI on the Firestore database. In this way, all our applications can show data within seconds from the detection.
Of course, Google Maps is the chosen platform to show geo-analytics data. For the moment, support for two different visualization layer is present: heatmaps and markers. Heatmaps allow to have a quick glance at garbage distribution in areas, markers allow to inspect the details of the single garbage detection point.
Credit: BecomingHuman By: Michele Moscaritolo