We all hate ads. Heck, Adblock and Adblock Plus are the most popular extensions on your web browser. Now, we introduce Adblocking on a new stage: Life. We're looking to enable the average user to escape this endless stream of suggestion.

What it does

First, take a photo of a situation possible containing ads. Next, our ad detection algorithm will locate ads and automatically filter them out of the image. Thus, you are left with a wonderfully ad-free life. This is still in the demonstration phase, and is not yet real-time.

How we built it

This app runs on Android using Kotlin and Picasso. We attempted to create an ad detection algorithm by finetuning a Single Shot Multibox Detector (SSD) with a custom dataset of ads from the Internet. We chose not to use FlickrLogos-32 or FlickrLogos-47 datasets because we desired a larger dataset. This convolutional neural network (CNN) algorithm, written in Tensorflow, was then to be converted to Tensorflow Lite for Android. Instead, we use Google Cloud Vision's Logo Detection API; the NN training was too slow. Lastly, we run the algorithm on the phone at regular intervals to detect ads. When an add is detected and bounded by the algorithm, we filter out the bounding region with a mosaic blur.

Challenges we ran into

We faced issues with Google Cloud Vision's Logo Detection algorithm. The system was not well-documented and only worked for certain resolutions. Furthermore, it is rather slow and is the rate determining step to our function. Additionally, we had a few issues with asynchronous image manipulation; Picasso, by Square, largely solved this. Lastly, we had some difficulty finetuning the object detection system for ads. Google's personal tutorial is rather convoluted and, additionally, we were unsure how the detection phase of the system would work finetuned. We can easily finetune classification, but detection and bounding are somewhat more difficult.

Accomplishments that we're proud of

The app provides a simple interface for the user and successfully delineated and removes ads.

What we learned

None of us had used Tensorflow or Google Cloud Vision's APIs before.

What's next for AdBlock for Life

Next, we hope to scale up the frequency of ad detection to support a real-time stream of video. As this was our first time using Tensorflow / Lite, and analyzing video with neural networks is typically more difficult than photos, we wanted to scale back the difficulty on this aspect. We also hope to further expand our ad recognition capabilities. Lastly, we would like to run this software on smart glasses in order to provide a truly immersive experience for the user.

Built With

Share this project: