#how-it-works#guide

Animal Face Analysis: From 478 Landmarks to Rule Matching

By WhatZoo Team · Published May 22, 2026 · Updated September 21, 2026

Implementation checked · September 21, 2026

Understand the seven inputs, required gates, matched-rule counts, detail-only fallback and random selection among tied candidates.

Detection and animal classification are separate

WhatZoo obtains 478 facial landmarks with MediaPipe Face Landmarker in the browser. That model does not predict an animal name or personality. The app selects an animal afterward by checking programmed conditions. Model loading and processing time depend on the device and connection.

The seven inputs used by the code

The current calculateMetrics implementation uses x and y coordinates. Distances are Euclidean distances along those two axes; it does not use z coordinates for depth analysis.

  • Eye slant: (point 33 y − point 133 y + point 362 y − point 263 y) × 100. This is not an angle in degrees.
  • Eye spacing ratio: distance from point 33 to 362 ÷ face width.
  • Face aspect ratio: face height ÷ face width.
  • Nose width ratio: distance from point 102 to 331 ÷ face width.
  • Mouth width ratio: distance from point 61 to 291 ÷ face width.
  • Chin ratio: distance from point 17 to 152 ÷ face height.
  • Smile flag: true when the average y of points 0 and 17 minus the average y of points 61 and 291 exceeds 0.01.

Face width is the distance between points 234 and 454; height uses points 10 and 152. Ratios do not eliminate the effects of pose, expression or obstruction. These are not medical measurements or validated accuracy figures.

How candidates are compared

  1. Check each profile's required gate. A gate can combine several comparisons.
  2. Give passing candidates one point, then add one for each matched detail rule. Profiles currently have up to three detail rules. This is a count, not weighted or distance-based similarity.
  3. Only if no candidate passes a gate, compare all profiles using detail matches alone. A low score by itself does not trigger this pass.
  4. If several candidates share the highest score, choose one with Math.random. Use the default profile if no candidate exists.

For example, if A and B both pass their gate and two detail rules, each scores 3. If they share the highest score, either may be selected. Three points does not mean 75% resemblance or personality accuracy.

Why the same photo can give a different result

A different photo can change landmarks and rule matches. Even with identical measurements, a top-score tie can change the selected animal. There is no guarantee that one person always receives the same label. Tiers group content; they do not measure career ability, personality or human worth.

Analysis photos and facial coordinates are not sent to a server for this classification. Single-face analysis can send the resulting animal ID to the statistics API, and ordinary web analytics operate separately. See the methodology and encyclopedia for measurements and individual animal rules.