Eigenfaces: Facial Feature Extraction

Camera Input

Initializing...

Captured Image Preview

Configuration

Eigenfaces

These are the principal components extracted from the captured faces. Each represents a key facial feature variation.

How This App Works: A Step-by-Step Guide

1. Capturing Faces:
Each time you click "Capture Face" (or upload an image), the app takes a snapshot from your camera or file, converts it to grayscale, and adds it to your collection. You need at least two faces to get started, but the more you add—especially if they are well-lit, centered, and a bit different from each other—the better the results will be.
2. Alignment Matters:
For best results, try to keep each face in roughly the same position, size, and orientation in the frame. This means centering the face, facing forward, and keeping it about the same scale every time. Good alignment helps the app compare features accurately and makes the eigenfaces much clearer.
3. What Happens After Capture?
Once you have at least two faces, the app calculates the "mean face" (the average of all your captures) and then finds the main ways your faces differ from each other. These differences are called eigenfaces—they are like the basic building blocks or patterns that make each face unique in your set.
4. Adjusting the Weights:
After capturing, you'll see sliders appear. Each slider controls the weight of a different eigenface. By moving these sliders, you mix and match the patterns to create new faces or reconstruct the ones you captured. It's like adjusting the ingredients in a recipe: changing the weights lets you see how each pattern affects the final face image in real time. You can also use the play button to animate a slider and watch how the reconstruction changes.
5. How Many Images Do You Need?
You can start with just two faces, but that's very limited. For more realistic and interesting results, try to capture 5–10 different faces. The more variety and quality you have, the better the app can learn and reconstruct faces.
6. What Determines the Quality of an Eigenface?
The quality and clarity of each eigenface depends on two main things:
  • Eigenvalue (Variance Explained): Eigenfaces with higher eigenvalues capture more of the important differences in your dataset and tend to look clearer and more meaningful.
  • Input Data Quality: Well-aligned, well-lit, and diverse faces produce clearer, more informative eigenfaces. If your faces are poorly aligned or all look very similar, the eigenfaces may appear noisy or less useful.
7. How Do the Weights Work?
Each slider you see after capturing faces controls the weight of a different eigenface. When you move a slider, you’re deciding how much of that particular facial pattern (eigenface) to mix into the final image. The weights don’t have to add up to any specific value—they can be positive or negative, and each one independently changes the influence of its eigenface. By adjusting them, you can create new faces, exaggerate certain features, or even try to reconstruct one of your original captures. The sliders work together, so changing one can affect the overall look, but you can experiment freely—there’s no “wrong” combination!
8. What Happens with Expressions or Movements?
If you capture one image with a neutral expression and another with, say, your eyebrows raised, the app will notice that eyebrow movement is a key difference. When you adjust the weights, especially for the eigenface that represents “eyebrow movement,” you’ll see the reconstructed face smoothly transition between the neutral and raised eyebrow look. So, by moving that slider, you’re blending in more or less of the “eyebrow raising” feature, and the face on the screen will change accordingly—almost like morphing between your different expressions!
9. Why Might Reconstructions Look Low-Res or Less Natural?
The naturalness and detail of the reconstructed face depend on a few things: the image size you choose (higher is better, but slower), the number and variety of faces you capture, and how well-aligned your faces are. With only a few images or low resolution, the results will look blurry or cartoonish. Even with more data, eigenfaces are best at capturing the main patterns, not fine details—so some loss of realism is expected. For best results, use the highest resolution you can, capture more faces, and keep your face centered and consistent in each shot.
10. Why Is This Useful?
This technique is foundational for facial recognition, compression, and understanding how computers can "see" and analyze faces. It's also a fun way to experiment with the building blocks of human appearance!
Honest Limitations: Why Does This App Look So Bad Sometimes?
Let’s be real—this demo is fun, but it’s far from perfect! The reconstructions can look blurry, cartoonish, or just plain weird, especially if you use a small image size or only capture a few faces. That’s because eigenfaces only capture the main patterns, not all the fine details that make a face look natural. If your faces aren’t well-aligned, or the lighting is poor, the results get even messier. And since everything runs in your browser, it’s not as powerful as professional facial recognition systems. So, think of this as an educational toy: it’s great for exploring the basics, but don’t expect magic or photorealism!
Have fun exploring! Try capturing faces with different expressions, lighting, or even props to see how the eigenfaces and reconstructions change. The more you experiment, the more you’ll see how each slider and captured image shapes the results!