The Science Behind Animal Face Analysis
AnimalFaceTest is not a random generator. It uses advanced computer vision and deep learning to analyze the geometric structure of your face and classify it into one of six animal archetypes. Here's exactly how it works.
Step-by-Step: How the AI Works
Step 1 — Image Loading
When you upload a photo, it is loaded directly into your browser's memory using the JavaScript File API. The image is drawn onto an HTML5 Canvas element for processing. At no point is the image sent to any server.
Step 2 — Preprocessing
The image is resized and normalized to the input dimensions expected by our neural network model (224×224 pixels). Color values are scaled to the range expected by the model. This preprocessing ensures consistent analysis regardless of the original photo size.
Step 3 — Neural Network Inference
We use TensorFlow.js, a JavaScript implementation of the TensorFlow machine learning framework, to run inference directly in the browser. Our model is a Convolutional Neural Network (CNN) trained using Google Teachable Machine. It analyzes the spatial patterns in your facial image and maps them to feature vectors.
Step 4 — Classification
The model's final layer uses a softmax activation function to output probability scores for each of the six animal face classes: Dog, Cat, Horse, Raccoon Dog, Koala, and Panda. The class with the highest probability is your primary result, but all scores are shown so you can see how you compare across all types.
Step 5 — Result Display
The result is displayed instantly in the browser along with a description of your face type's characteristics and personality associations. No data leaves your device at any point in this process.
What Facial Features Does the AI Analyze?
Our CNN model learns to identify combinations of features, including:
- Eye shape and angle: Rounded vs. almond-shaped; horizontal vs. upward-slanting outer corners
- Jawline and chin shape: Soft, rounded contours vs. angular, V-line structure
- Facial proportions: The ratio of face width to length, mid-face to lower-face ratios
- Nose bridge: Width, height, and definition of the nose bridge
- Cheekbone prominence: High, defined cheekbones vs. softer, lower placement
- Forehead shape: Rounded/domed vs. broader/flatter
The model doesn't analyze these features individually — it learns complex patterns across the entire face that, when combined, define each archetype.
Accuracy and Limitations
Our model performs well under good lighting conditions with a clear, front-facing photo. Accuracy is affected by:
- Photo angle (side profiles produce less reliable results)
- Lighting quality (harsh shadows can misrepresent facial contours)
- Photo resolution (low-quality images reduce accuracy)
- Facial hair, glasses, or accessories that obscure features
For best results, use a well-lit, front-facing photo with a neutral expression. See our Tips for Accurate Results guide.
The Technology Stack
- TensorFlow.js: Browser-based machine learning inference
- Google Teachable Machine: Model training platform
- HTML5 Canvas: Image preprocessing
- JavaScript File API: Local file handling (no upload)
🔒 Privacy Guarantee: Because the entire pipeline runs in your browser, your photo data never leaves your device. There are no server-side uploads, no facial data storage, and no biometric data collection of any kind. This is the gold standard for privacy in AI applications.
Learn More
Curious about the cultural background of animal face types? Read our blog post: The History of Animal Face Types in East Asian Culture.
Want to understand the psychology? Explore: The Psychology of Animal Face Archetypes.