This is a dog, not a hotdog!

Not hotdog! A binary classification problem


Share on linkedin
Share on twitter
Remember in the HBO Silicon Valley serie, Jian-Yang was creating the Not hotdog! app. With today's Deep Learning on the shelf cloud technology, such an app is really easy to create.
Jian Yang character in HBO Silicon Valley

A fictional application

To begin, do you remember the HBO serie Silicon Valley? The character of Jian Yang was the cofounder of the fictional Seefood startup. In Season 4 Episode 4, he was creating an app that identifies if a photo is a hotdog or not. This was explained as a pivot from the initial idea of creating a “Shazam for Food” app.

Hotdog or not hotdog
Hotdog or not hotdog?

Not hotdog! a binary classification

In Machine Learning, binary classification is the task of classifying the elements of a set into two groups on the basis of a classification rule.

For example, Hotdog or not hotdog is a binary classification. Spam or safe email is another one. 

To determine in which group the image will fall, the computer is using a statistical method. This tells the probability of the image having a hotdog. 

Machine Learning vs. Deep Learning

Machine Learning vs. Deep Learning
Machine Learning vs. Deep Learning

To get a machine to run this binary classification, you can use Machine Learning or Deep Learning. In Machine Learning as explained in the picture, the is the need for an ML expert to do feature engineering. Using Deep Learning, there is no need for feature engineering.

On the shelf algorithms with Amazon Rekognition

For instance, Amazon Rekognition makes it easy to analyze an image using Deep Learning technology that requires no Machine Learning expertise to use. See my little experiment using the demo of Amazon Rekognition that only requires you to log in to your AWS Console.

I loaded the following pictures and ask Amazon Rekognition to analyze them using Deep Learning to check if it could find which one is a hotdog and which one is not:

A first picture of a dog
A first picture
A second picture of a hotdog
A second picture

First, look at the result in the demo of Amazon Rekognition with the first image:

Dog recognized
Dog recognized by Amazon Rekognition Deep Learning algorithm

Then, this is the result of the second image:

Hotdog recognized
Hotdog recognized by Amazon Rekognition

Note that in both cases, the results are not only coming with a binary classification (Hotdog or not hotdog) but with a multiclass classification. 

ML accessible to developers for multiple applications

This simplicity of usage from the cloud of existing technologies and trained algorithms allows developers to use them directly. It allows someone with no ML skills to build an image classifier in minutes as explained by Gabe Hollombe in his video: Buiding an Image Classifier on Amazon SageMaker.

In conclusion, the are multiple concrete usages of such technologies in digital applications from assigning a name to a photograph of a face (multiclass classification) to labeling an x-ray as cancer or not (binary classification). Finally, if you have more time, I encourage that you read 9 Applications of Deep Learning for Computer Vision. It gives impressive possibilities. 


Johann Georghehner is the Inventor of Hot Dog in 1487, in Vienna, Austria, Adobe Spark

Building an Image Classifier on Amazon SageMaker, AWS Innovate, Gabe Hollombe, AWS, feburary 2019

9 Applications of Deep Learning for Computer Vision, Jason Brownlee, March 13, 2019

Photo credits

Photo by T.R Photography on Unsplash

TV screenshots from HBO Sillicon Valley serie

Dog photo from studio22comua/Getty Images/iStockphoto

Hotdog sample photo from Adobe Spark

Leave a Reply