Face Averaging Made Simple

Ronan Rooney
4 min readOct 10, 2017

--

Face averaging, also called face blending, is a popular method of combining a group of faces to create a single image. When we blend together a set of faces from a time, place, or a group, interesting patterns may emerge that spark conversation.

Examples of face averaging. Time magazine’s The New Face of America; University of Glasgow’s computer generated averages; and Learn OpeCV’s presidential face blending.

There are software tools designed specifically for this purpose (e.g., faceresearch.org), but it turns out, it is very easy to create your own face averages. All you will need is:

  • A collection of faces
  • Photoshop, Sketch, GIMP Image Editor, Acorn… any image editing software that allows you create multiple layers and adjust their opacity.
  • An eye for detail

Prepping your images

The sixty faces I sampled (left) and the finished output (right).

The more images you have, the better! Just like a survey, having more people involved will give you a more accurate outcome. Outliers will be muted by the averaging effect of the others in your group. Your finished product will look best if all the faces have the same pose and orientation. In my photos above, all the faces are straight-on looking directly into the camera.

Your first step is to bring all the faces into the graphic software of your choice. One by one, you will modify each image’s size, nudge their position, and rotate them to match up the eyes. This is a little bit painstaking, but it gives you a final output with much stronger fidelity. Avoid doing this, and you may get a blurry finished product. Two methods to try:

Guidelines. Use guidelines to align the eyes, mouth, and the vertical center of the face.

Guidelines, a simple feature in most graphic design software, can help you poinpoint the center of the two eyeballs and the mouth.

Using a face as a guide. Select a face that’s the perfect example of what you want, place it at the top of your stack, dim the opacity, and lock it in place. Adjust all the images in your stack to match this top image.

Lock a semi-transparent image in the foreground, and drag, scale, and rotate images underneath it to match. In this example, I moved the image in the background around until it matched up with the location of the image in the foreground.

By the time you’re done, you’ll be able to flip through your layers and see the eyes are all in the same position.

Blend Images by Dropping the Opacity

This part is really more of an art than empiricism. Select all the image layers, and reduce their opacity together. Start very low — 3% to 6% — but work up and down the opacity scale until you believe you have your strongest image.

Changing the opacity of the layers increases the vividness of the colors, but it favors the faces in the foreground. Use your best judgement.

The images in the foreground have the advantage. Make the opacity too high, and your “average” will actually skew to favor the faces in the foreground while blocking out those in the back.

These face averages were made with the same sixty faces. Why are they different? On the left, I put all the faces with dark complexion near the top; on the right, I put all the faces with fair complexion near the top. This example emphasizes the importance of randomly shuffling the order of faces in your stack of layers, as well as using an opacity that ensures all images — foreground to background — blend into the final product.

Reshuffle to ensure even blending. In order to test if you have evenly blended layers together, re-sort the layer order randomly. Does your output image change? If the output face changes significantly, consider dropping opacity even further. Optimally, the output should not change very much no matter how you shuffle the images. This is a sign of an even averaging of faces.

Final Thoughts

  1. Use a collection of face images that match each other as much as possible.
  2. Take the time to adjust all the faces so the eyes match up. You can skip this step, but your output will be blurrier and less impressive.
  3. Ensure an even blending of faces by using a sufficiently low opacity and shuffling images into a random order.

Extra: FramerJS Face Blending Prototype

I tested some of my theories here by creating a prototype in FramerJS that allowed me to randomly sort the order of my images much more quickly than any graphic design software. Here’s a link to my face blending prototype. Note: this prototype runs a looping animation of sixty faces and may take a while to load!

--

--

Ronan Rooney

Mobile UI/UX Designer. I write about tech, culture, and life. Say hello!