Deeplens Trash Classiffication Recipe

Today we’re going to show you how to build a prototype trash sorter using AWS DeepLens, AWS’s deep learning-enabled video camera designed for developers to learn machine learning in a fun, hands-on way. This prototype trash sorter project teaches you how to train image classification models with custom data. Image classification is a powerful machine learning technique where a machine learning model learns how to distinguish between many different objects inside images by observing many examples. You can apply techniques learned in this tutorial to solve problems that require sorting objects into different bins based on imagery (such as sorting fruits by size or grade) or detecting the existence of an object in an image (such as recognizing the type of object at self-checkout).

This tutorial was inspired by the smart recycle arm project created for the AWS Public Sector Builders Fair. For more information, see Demonstration: Automatic Recycling on YouTube.

Solution overview

This walkthrough includes the following steps:

  1. Collect and prepare your own dataset to feed into an ML algorithm
  2. Train a model with Amazon SageMaker, a fully managed service that provides the ability to build, train, and deploy machine learning (ML) models quickly
  3. Running the model locally on AWS DeepLens to predict types of trash without sending any data to the cloud
  4. Optionally, after AWS DeepLens makes its prediction, you can set up AWS DeepLens to send a message to a Raspberry Pi via AWS IoT Greengrass to show you which bin to throw the item in.

The following diagram illustrates the solution architecture.

Reference Architecture

Prerequisites

To complete this walkthrough, you must have the following prerequisites: