FacialHarmonyAIFacialHarmonyAI
Guides

In-Browser Facial Landmark Detection: From 468 3D Mesh Points to Facial Proportion Analysis

FacialHarmony 编辑部August 11, 20268分で読めます
浏览器里的人脸关键点检测:从 468 个 3D 网格点到面部比例分析 — 抽象比例几何封面(无真实人脸)

When you upload a front-facing photograph for analysis, a dense matrix of mesh points appears within seconds across your screen—precisely tracing your eyes, nose bridge, lip contours, and jawline. The core technology powering this process is Facial Landmark Detection.

In the past, complex geometric calculations of this scale required transferring your photo to a remote server. Today, thanks to advancements in WebAssembly and on-device machine learning (On-device ML), this entire process runs privately inside your browser. In this article, we break down how AI captures 468 three-dimensional mesh coordinates locally and translates them into objective facial proportion metrics.


1. From Image Pixels to 3D Coordinates: Client-Side Algorithmic Breakdown

Traditional image processing techniques relied heavily on pixel contrast or basic edge detection, which often failed under head rotations or shifting lighting conditions. Modern on-device AI models—such as Google AI Edge's MediaPipe Face Landmarker—operate on a completely different architecture:

  1. Image Preprocessing: Upon receiving a static image, the browser locally handles rotation correction, dimension normalization, and color space conversion.
  2. Single-Image Inference (IMAGE Mode): The model executes directly on the client side without transmitting raw images to external servers, delivering robust privacy guarantees.
  3. 3D Face Mesh Output: Once the facial structure is identified, the model outputs a spatial mesh of 3D coordinates $(x, y, z)$. Under standard configuration, this mesh comprises 468 fixed 3D landmark indices, capturing key skeletal and soft-tissue feature points.

Because each index corresponds to a fixed anatomical landmark (such as the inner eye corner, nasal tip, or cupids bow), mathematical algorithms can extract precise spatial geometric vectors directly from these landmark indices.


2. How Landmark Indices Map to Facial Geometry Vectors

Once 468 3D coordinates are established, how does the algorithm transform them into human-readable facial proportion metrics? The key lies in converting discrete point pairs into distance vectors and planar ratios:

1. Intercanthal Width

  • Landmark Mapping: The algorithm locates the landmark indices for the inner corner (endocanthion) of the left eye and right eye, calculating the absolute Euclidean distance between them on a 2D projection plane.
  • Proportional Context: Intercanthal width is evaluated relative to individual eye width to measure horizontal eye spacing balance (corresponding to the middle fifth in classical facial fifths).

2. Bizygomatic Breadth

  • Landmark Mapping: The algorithm identifies the outermost lateral boundary points of the zygomatic arches on both sides. These two points define the widest horizontal baseline of the upper face.
  • Proportional Context: Bizygomatic breadth serves as a benchmark denominator compared against total vertical facial height (from hairline/glabella to chin base) to compute the facial width-to-height ratio.

3. Philtrum Length

  • Landmark Mapping: The algorithm pinpoints the base of the nasal septum (subnasale) and the midpoint of the upper vermilion border (labiale superius).
  • Proportional Context: Philtrum length is evaluated against the vertical distance from the lower lip to the bottom of the chin—a signature metric for assessing lower facial third proportions.

Through these geometric vector mappings, raw 3D spatial points are converted into an objective data system encompassing roughly 30 frontal planar ratio metrics.


3. An Anthropometric Perspective: Proportional Harmony vs. Shaming Scores

When discussing facial features, it is easy to fall into the trap of arbitrary "attractiveness scoring." However, in formal anthropometry and facial geometry research, beauty is never a single score, but a structural relationship of proportions (harmony).

A classic anthropometric study from the University of Belgrade (Milutinovic et al., 2014) evaluated photos taken in Natural Head Position (NHP), comparing 83 average female subjects with 24 widely recognized highly attractive female subjects. The research revealed that:

  • The high-attractiveness cohort exhibited greater statistical uniformity across facial thirds and facial fifths.
  • Overall facial contour harmony matters far more than the absolute dimension of any individual feature.

On the Golden Ratio ($\phi \approx 1.618$): In academic literature, the golden ratio is frequently discussed as a reference benchmark or subject of debate, but it is by no means an absolute law of attractiveness. Human faces exhibit rich natural diversity; blindly pursuing a single mathematical constant is scientifically flawed and ignores ethnic and individual skeletal uniqueness.

Therefore, the primary goal of algorithmic facial analysis is to help us objectively understand our own feature distribution patterns (e.g., a longer middle third or wider eye spacing). This insight enables thoughtful personal styling, hair framing, or photography angle adjustments—rather than reducing unique features to a crude numerical score.


4. Experience Client-Side In-Browser Measurement on FacialHarmonyAI

If you wish to explore your own facial proportions, you can try geometric analysis built on these principles at FacialHarmonyAI:

  1. Privacy-First Processing: Visit the /tests/ page and upload a clear, front-facing photo. All landmark detection and geometric vector calculations execute locally within your browser—your photo is never uploaded, stored, or publicly shared.
  2. Free Preview: The algorithm automatically renders core feature connection vectors and displays a basic preview of your facial thirds and fifths.
  3. Complete Atelier Report (Optional): For a comprehensive analysis covering roughly 30 planar proportion metrics, you can choose the $9.99 one-time purchase Atelier Full Report (no subscription, no hidden recurring fees).

Disclaimer: Proportional parameters provided by FacialHarmonyAI are intended solely for personal aesthetic exploration, photography composition, and styling reference. They do not constitute medical diagnosis or surgical planning. Respecting natural facial individuality is the true foundation of exploring facial harmony.

Facial harmonyFace analysisfacial landmark detection

FacialHarmonyAI content is for informational and educational purposes only. It is not medical, psychological, or cosmetic advice.

Try the free analysis

Related articles

GuidesHow to measure cheekbone prominence and midface width ratios from front photosLearn how bizygomatic, bitemporal, and bigonial widths interact. Measure facial width ratios from front photos to assess contour balance accurately.August 29, 202611分で読めますGuidesMirror Flip vs. 3D Landmark Analysis: Why Does Your Flipped Reflection Feel Off?Why do unmirrored photos look so unfamiliar? Explore visual psychology and 3D facial landmark calculation behind mirror flip distortion vs. AI facial symmetry analysis.August 27, 202614分で読めますGuidesWhy Facial Proportion Analysis Is Non-Medical: Clarifying Everyday Aesthetic Proportions vs. Surgical PlanningExplore the core differences between non-medical facial proportion analysis and clinical orthognathic or orthodontic diagnosis. Learn why 2D landmark ratios differ from 3D cephalometric evaluations, overcome beauty anxiety, and view facial harmony objectively with complete privacy.August 26, 202612分で読めますGuidesMidface Ratio & Compactness: How Interpupillary Distance and Upper Lip Spacing Define Facial HarmonyWhether your midface appears elongated or compact depends on more than vertical facial thirds. Learn how the ratio of interpupillary distance to upper lip height shapes facial harmony.August 25, 202611分で読めますGuidesHow Brow-to-Eye Distance Affects Upper Facial Balance: A Practical Guide to Orbital Position and Palpebral InclinationExplore how vertical brow-to-eye distance, orbital bone placement, and palpebral tilt shape mid-to-upper facial proportions. Grounded in anthropometric research, this guide explains how to objectively evaluate eyebrow position and facial thirds harmony.August 24, 202611分で読めますGuidesSexual Dimorphism in Facial Analysis: Why Masculine and Feminine Ratio Benchmarks DifferExplore how sexual dimorphism influences masculine and feminine facial proportion benchmarks. Drawing from evolutionary biology research by Little et al. and proportionality analysis by Villavisanis et al., see how modern AI evaluates facial harmony objectively without enforcing gender stereotypes.August 23, 202611分で読めます