Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Cognitive Portrait Challenge

Russian Version

This repository has been created to explore the different creative techniques inspired by Cognitive Portrait. Main idea is to use Face API to extract Facial Landmarks from photographs of people, and then lay out photographs in a certain way to create expressive artworks.

This repository is a collection of different Cognitive Portrait techniques, and I challenge you to create your own! What you can do:

  1. Just create your own cognitive portrait using one of the available techniques. No coding experience required.
  2. Propose a new cognitive portrait technique by providing a Python code.

How to do it:

  1. Fork and clone this repository help
  2. To run the notebooks in this repository, you can either:
    • Use GitHub Codespaces
    • Clone the repo in Binder by clicking here
    • Run Jupyter locally from the cloned directory (you would need some local Python environment to do that)
  3. Explore CognitivePortrait.ipynb to understand how the whole thing works in general, try to run the code yourself.
  4. If you want to use one of the existing techniques:
    • Put your own pictures into images folder (you can create a subdirectory there if you want). If you are using Azure Notebooks - upload them
    • Open the .ipynb Notebook corresponding to the technique you want
    • Run through the cells in the notebook to create the artwork
    • Save the artwork into results folder
    • If you are using Azure Notebooks -- download the result and place it into results folder in this repository
    • If you want, you can also include the image files used to create the artwork into images folder, but make sure they are not too "heavy" ), so that your code is included into the main repository at
  5. If you want to create an original cognitive portrait technique:
    • Start with CognitivePortrait-Start.ipynb
    • Write your own code to create an artwork
    • You can use existing images in images folder, or upload your own
    • Save the result in results folder. If you are using Azure Notebooks -- download it to local folder at the end.
  6. Edit to add your picture to the gallery
  7. Perform a [pull request](


Have fun creating art!

Techniques Created by Community

Artwork Created by Code Description
People Blending @shwars CognitivePortrait.ipynb A number of photographs are aligned by their eyes and blended together to create an "average" photograph of a person
2Face @shwars CognitivePortrait-2face.ipynb Photographs are grouped into two sets of different ages, and blended side-by-side
FaceCircle @shwars CognitivePortrait-Circle.ipynb Aligning faces to that eyes lie on a circle, creating visual whirlpool
OPEN YOUR THIRD EYE [@semenovdv][semenovdv] CognitivePortrait-ThirdEye.ipynb Aligning the pupils into a triangle, thereby making a third eye
two_gates_aqua @Stifeev CognitivePortrait-ThirdEye.ipynb Выравнивание с использование меток, отражения, акварельный фильтр
and we will all become dragons @noxpardus CognitivePortrait-Dragon.ipynb Placement of pupils at the vertices of the dragon fractal
gates_with_teeth @linuxxxoid CognitivePortrait-X-men.ipynb Images are connected by one mouth into one colorful picture, and blended
joley_x-man. @linuxxxoid CognitivePortrait-X-men.ipynb Aligning the face in the center and attaching two symmetrical heads to the bottom to make a x-man.
Eater [@Bronnikoff][] CognitivePortrait-Eater.ipynb Mouth instead eyes made using affine transformes of standpoints
---- ---- ---- ----
@shwars @shwars @shwars
--- --- ---
@shwars @shwars
--- --- ---


Cognitive Portrait Challenge







No releases published


No packages published