TensorFlow 2.0 Hackathon - Recyclinator

⚡ #PoweredByTF 2.0 Challenge! [ Devpost ]


A lot of countries have started segregating garbage into recyclable and non recyclable. But many times, a lot of people won't be familiar with the items that can be recycled or not. It is beneficial to remember such information but not everyone can do that. To help that, we present a web application which tells you if an object is recyclable or not. But what is special about this? You don't have to put in name of things and search for items. You just click a photo of the object and the app will tell you which garbage bin to throw it into.

What it does

Recyclinator is a simple web application that tells people whether an object is recyclable or not. Its easy UI lets people take photographs of objects and get results with just one touch.


We split the work into front-end, back-end and TensorFlow. The front-end is made in javascript. This then calls a flask app running in the back-end which does preprocessing. This flask app then calls the TensorFlow served model. The architecture used in the neural network is VGG16. Although it's very outdated but it gives a nice beginning(tutorial like feeling) to people who are new to TensorFlow 2.0.


The original repository we used for the neural network was written in TensorFlow 0.X. This was more difficult than converting from 1.X to 2.0 because there were a lot of changes from 0 to 2. We also tried using a ResNet-50 implementation but we couldn't get around batch-norm. There were also a few preprocessing and normalisation errors which weren't visible until we tested the app on many objects. We also had to deal with HTTPS browser related issues because modern browsers don't allow insecure connections to use the camera and/or send requests.


Converting the code was the biggest accomplishment. We had to go through 3 versions of TensorFlow documentation just for converting the code. And when we nailed it by running it on multiple GPUs and serving it, it felt amazing.

What we learned

We learnt quite a few things about TensorFlow 2.0. For people who are used to 1.X, adapting had a steep learning curve. We also learnt what not to do while deploying and making the front-end(like security and preprocessing).

What's next?

We want to improve the feedback by adding more items to the list. We also want to improve the response time by improving the architecture from VGG16 to ResNet or ResNeXT or Inception. We also hope to add maps to it so that people know where the nearest recycle bin is.

PS: Do checkout our video and website. Star us on GitHub and let us know if you have questions/ideas to share!

Built With

Share this project: