/CreepyFaces

Python Tutorial / Competition on Creating Science Art Creepy Faces

Primary LanguageJupyter Notebook

CreepyFaces Tutorial

Welcome to the CreepyFaces Tutorial!

In this tutorial, we will teach you how to create Creepy Faces like this one:

The main idea is to use Microsoft Face API to extract coordinates of key points of the face - so called Face Landmarks. We then then use OpenCV machinery to apply some transformations to the image according to those key points. In the example above you can see several images blended together, aligned to the eyes.

This technique was originally proposed by Dmitry Soshnikov and called Cognitive People Blending. If you develop something substantially interesting, please share your results/feedback/ideas with him.

How to use this tutorial

This repo contains the following files with demo code:

You should probably start with CreepyFace-Tutorial. You can do it in one of the following ways:

Obtaining Face API keys

To extract Facial Landmarks and call Face API, you would need a special key. You can obtain the key in one of the following ways:

To use Face API, we need to provide a key and endpoint URL (because it is available in different regions, URL can be different). There are many ways to obtain Face API Key:

Once you get the key and the endpoint, please paste them into appropriate place in the code.

Getting Images

Whichever way you chose, you would need some images to play with. While we provide some pictures to start with, you may want to:

  • Use your own pictures - make sure the face is visible and of reasobable quality / resolution
  • Use ImageGatherer notebook to get results from Bing Image Search

You would need to upload the images into images folder of the notebook directory. In case of Azure Notebooks, this can be done through web interface.

Sharing Results

We ask you to share the results that you get on social media, so that we can share your joy! Use #creepyfaces hash tag, plus the hash tag of the event. In addition, please share the URL with us using the REST function call - sample code is provided in the notebooks.