The Story and Source for TwinsOrNot


Extraordinary Robot
News Feed
Just a couple weeks ago we highlighted Project Oxford with a getting started post, Hello Face API...

Now how about a web site that uses the same API, one that went viral during Build 2015? Hello (and it's sibling,!

Mat Velloso posted the story behind TwinsOrNot;

How was built


We are now having some smaller events across the world following Build and I decided to use a few spare hours I’ve had in a hotel in Czech Republic to try another fun site: Twins Or Not

This site takes two photos and will assess how similar the people in these photos are, giving you a score from 0 to a 100. In order to do this, I used the Face API in Project Oxford, a platform of intelligent services. This is just one of the many other amazing features our Machine Learning APIs and platform can offer.

How was it built?

1-I signed up for Azure, Microsoft’s cloud platform

2-Obtained an API key for the Face API, which is a subset of our Machine Learning APIs focused on facial recognition.

3-Downloaded the Face API SDK in .Net which already has a sample that does almost exactly what I needed

4-Adapted the code into an ASP.Net MVC website

5-Published the site to Azure

Total time between the idea and the actual live site: 4 hours (and yes, 4 hours means I haven’t had time to test it with most devices, improve the UI experience or even test so do expect bugs)

Yes, it is that simple. We can create amazing, fun and useful sites and applications one after another, as many as we want. Welcome to the world of Machine Learning.


Source? Yep!

Source code for v1

Notes: This is the version as it was launched. Again, this was a 4 hours project so there isn't much there. Key point is the home controller where we call the Face APIs and some JavaScript at the _Layout.cshtml handling the uploads and returned data. Most of everything else is just a vanilla ASP.Net MVC app out of Visual Studio.

A new version of TwinsOrNot is now live and that version doesn't match this source code anymore. This is just for the records and to illustrate how simple these APIs are.

Remember you will need your own Face API key: and some details about how it was built are available here:


The Magic?

Who’s Your Doppelganger? #TwinsOrNotRobot Will Tell You


TwinsOrNot is powered by Microsoft Project Oxford, a beta version of a set of APIs, SDKS and services freely available to developers to make their applications more intelligent and engaging. Project Oxford expands upon Microsoft’s evolving portfolio of machine learning APIs adding vision, speech, facial recognition, and language understanding to the set of advanced analysis capabilities. With machine learning technology, it is possible to create sophisticated models that learn from existing data to detect patterns and even predict future behaviors, outcomes, and trends. Developers who want to build breakthrough apps can easily implement machine learning APIs to perform advanced analysis without the expertise of a data scientist.

The popular site is the inspiration for Created in two weeks by a team of three Microsoft engineers, quickly became an internet sensation and a brilliant example of these intelligent features. In a similar fashion, was built by Microsoft developer Mat Velloso in a few hours and was demoed at a //build/tour event to illustrate how anyone can quickly add machine learning intelligence to any application. now features a visual refresh and new capabilities including using Bing integration to better compare to your favorite celebrity. We’re also inviting people to help us improve the technology by allowing us to keep their images. These are stripped of identifying information, such as location, and are used to train and improve Microsoft’s computer vision and related services. If people don’t opt-in to help us improve, the images are kept only for the duration of the session and any associated data is automatically deleted within 24 hours.


And using these two very different pictures of me, it seemed to do a pretty good job! :)

Follow @CH9
Follow @coding4fun
Follow @gduncan411

Continue reading...

This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.