AI-powered privacy-preserving ads

Posted on .

After a massively successful hiring campaign, which was propagated far and wide in social media, we had our pick of the litter (or, in US English, "trash") for our Chief of Artificial Intelligence Science Officer position. After filtering candidates based on relevant traits such as age, marital status and naivety, we finally settled on our new CAISO!

He came in with some fresh new ideas, most of which were rejected outright, and we quickly got him working on the next big thing. IMGZ has been growing exponentially, and, despite all the problems that come with growth, our focus is LASER-focused on one thing: Money. We want to make lots and lots of money, as much as possible, as fast as possible. Our motto is "At IMGZ, images come first, after money".

Given this imperative, we got our finger on the pulse of the webiverse, and realized that, if we were going to make money, we couldn't rely on people paying us money for services. That's just not the way the web operates. We needed to take a page from the book of Facebook, Google, Amazon and AltaVista and innovate, so we sat down with our new CAISO and thought long and hard about how AI could aid us in our monetization strategy, and finally came up with a radical new monetization model:



Ads on the internet are not new. They've been around for at least two years, and people are getting tired of them already. They aren't so much getting tired of seeing ads, which are always relevant and nigh-magical in their pinpointing of the exact thing you're wanting to buy at any given time, but they're getting tired of the sacrifices needed to achieve this accuracy.

They're getting tired of the constant invasion of privacy by internet giants, who impinge on people's rights to sell them exactly the right thing at exactly the right time.

At IMGZ, we believe that AI can help. Help the users preserve their privacy, help the advertisers present their products in a respectful manner, but, most importantly, help us make lots of money.

We present to you:

Privacy-preserving ads.

Privacy-preserving ads

Privacy-preserving ads is a brand-new technology, from the innovative free-thinkers of IMGZ. We dared to ask the question "how can we monetize the free trial?". The obvious answer was "ads".

However, tracking the user and placing some relevant ads next to the images as they viewed them was too invasive, and protecting our users' privacy is the third most important priority for us.

We thought long and hard, and, leveraging our latest hire, we quickly came up with a design for an ML-powered pipeline:

  • The uploading frontend ingests images and sends them to a Kafka queue.
  • If the image belongs to a user on the free trial, Kafka forwards the images to a distributed worker pool for deep learning processing with a custom Keras model.
  • The Keras model performs saliency detection to find the most important parts of the image.
  • Once the most important parts of the image are identified, we send the image back to Kafka for forwarding to the next step in the pipeline, categorization.
  • A second Keras model performs label extraction on the image, to find a few categories that the image belongs to (such as "woman, dress, smiling").
  • The next step processes the image, selecting the best ad for the category and stitching it into the salient parts of the image.
  • The image is stored and forwarded to the CDN for serving.

After lots of back and forth, we finalized this plan and realized we couldn't be bothered to do any of this and just wrote three lines of OpenCV to detect faces and slap our logo on them:

You will notice that you can't tell who this guy is, perfectly preserving his privacy. In fact, we're sure you didn't even notice this is actually a girl.

That is the power of AI.

The power of AI

With the help of our engineers, we managed to take this solution from an average of 68 seconds per image to near real-time. As the free-trial user uploads an image, detection and advertization runs in a few milliseconds, ruining the image nearly instantly and resulting in happy advertisers and users who retained their privacy.

For example, try to recognize even one person in this photo, where the photographer did not obtain model releases:

You'll find that you can't! You may, however, get an inexplicable urge to sign up for IMGZ, which is exactly the intended effect of the subtle advertising.

Of course, while trial users enjoy the full suite of privacy-preserving tools IMGZ has to offer, paid users will be subject to no such annoyance. Their images will be uploaded and served entirely unchanged, as a thank-you from us to their money.


Of course, none of this would be possible without the help of one man:

He's still on the trial account, as he hasn't paid for an IMGZ account yet, but he'll have to when his trial expires.

We hope that this short article has given you some insight in the pioneering research that goes on at IMGZ in the fields of both privacy and monetization, and maybe you'll implement some of these ideas in your own companies, for only a modest fee to us.

Enjoy, and don't forget, the signup link is here.