Facial Recognition in Computer Vision: How the Pipeline Actually Works

Computer face recognition is a four-stage pipeline: detection, alignment, embedding, matching. Where demo accuracy breaks and what governance wraps it.

Facial Recognition in Computer Vision: How the Pipeline Actually Works
Written by TechnoLynx Published on 27 Nov 2024

Computer face recognition is not one model. It is a pipeline that detects a face, aligns it, turns it into an embedding vector and matches that vector against a gallery of enrolled identities. NIST’s verification test, the source of headline accuracy figures, compares two high-quality frontal images. Errors grow sharply under surveillance-style capture, and they grow unevenly across demographic groups. Face recognition is one entry in our computer vision applications overview.

The four stages of a computer face recognition pipeline

A typical image-based face recognition pipeline runs face detection, landmark localisation and alignment, feature extraction and feature matching, in that order. The detector predicts a bounding box around each face. A landmark detector then finds key points, and a similarity transform (rotation, translation and scaling) maps the face to standard coordinates so the next stage sees a consistent input. A feature extractor network turns the aligned face into a low-dimensional vector, and that vector is compared with other vectors, commonly by cosine similarity. The two most common embedding sizes are 128 and 512.

NIST describes a fuller operational version of the same pipeline: a capture subsystem, a presentation attack detection module that looks for impersonation attempts, a quality acceptance step that checks portrait standards, then feature extraction and comparison, with output that may prompt human involvement.

Matching comes in two forms, and the difference matters for everything that follows. Verification (1:1) checks whether a pair of faces belongs to the same person, for example a live photo against the photo on record. Identification (1:N) compares a probe face against a gallery of N enrolled faces to find who it is, or to report no match.

The thing stored in the gallery is a template: data produced by the recognition algorithm that includes a feature vector. When a subject has several images, they can be pooled into one template. Average pooling is the simplest method, and its drawback is that it weights every image equally regardless of quality. In a 2024 multi-domain study, norm pooling, which weights images by a feature-norm proxy for quality, matched or beat average pooling with all models on all domains bar one.

Because each stage can fail on its own, a single end-to-end accuracy figure hides which stage is responsible.

Why MTCNN replaced Haar cascades, and where Haar still holds

The Viola-Jones detector of 2001, on which Haar cascades are built, was one of the first major breakthroughs in face detection, though it fails on noisy images. Its speed was the point: the original paper reports processing a 384x288 image in 0.067 seconds on a 700 MHz processor. MTCNN, published in 2016, uses three cascaded CNNs (P-Net proposes candidate windows, R-Net rejects non-faces, O-Net refines the result and outputs five facial landmarks). MTCNN predicts face and landmark locations jointly, exploiting the correlation between detection and alignment.

On accuracy, the measurements below favour MTCNN:

  • On the UTK Face dataset, a practitioner comparison by Data Wow measured Haar at 82.60% recall and 95.24% precision, against MTCNN at 89.85% recall and 98.02% precision.
  • A 2022 study on a small dataset of 627 faces reported MTCNN at 96.2% accuracy and a Haar cascade boosted with Gaussian features at 65%.
  • A 2025 comparison under yaw variation and occlusion found MTCNN handles pose variation and partial occlusion well, while Haar cascades are less computationally demanding and cheaper for simpler scenarios.

Speed runs the other way. In the same Data Wow test on CPU, Haar processed about 25 images per second against roughly 3 for MTCNN. A practitioner write-up reports Haar at 18 to 22 FPS on a Raspberry Pi 4 with a 480p webcam, and says it handles frontal webcam footage reliably for attendance systems and privacy filters but fails on heavily rotated faces, faces under 30x30 pixels and extreme lighting.

With a cooperative subject standing in front of a fixed camera on CPU-only hardware, a Haar cascade can be an adequate detector; with uncontrolled pose, occlusion or small faces, it becomes the weakest link in the chain. MTCNN is also no longer the accuracy ceiling: on the WIDER Face benchmark, LearnOpenCV reports an AP of 0.915 for MTCNN against 0.994 for RetinaFace and for YuNet. YuNet, added to OpenCV 4.5.4 in October 2021, has about 85,000 parameters and a model size under 1 MB.

Which face recognition algorithms are still relevant

A 2020 smart-surveillance paper puts eigenvector methods at about 60% on the Labeled Faces in the Wild (LFW) benchmark, against more than 99% for neural network methods. Deep learning has reshaped face recognition research since 2014, starting with DeepFace and DeepID.

Current methods are deep embeddings trained to separate identities:

  • FaceNet (2015) learned a mapping into a Euclidean space where distance measures face similarity, trained with triplet loss, using 128 bytes per face and reaching 99.63% on LFW.
  • Margin losses such as ArcFace add an angular margin to the softmax loss to increase class separability. AdaFace adapts its margins to image quality, and MagFace adds magnitude-aware regularisation.
  • Transformer hybrids are arriving on mobile: FaceLiVT, presented at ICIP 2025, combines a CNN with linear attention, and its authors report it running 8.6 times faster than the EdgeFace hybrid model and 21.2 times faster than a pure ViT-based model on mobile devices.

Which embedding model performs best depends on the domain. A 2024 multi-domain study found AdaFace-trained models better on long-range faces captured at a distance, while ArcFace and CosFace models did better on surveillance and GoPro footage. That is a reason to evaluate on your own capture conditions rather than on LFW. LFW is also unrepresentative: it was built from people in Yahoo! news stories, and only 22.5% of its images are of women.

For the wider frame, see our explainer on computer vision and pattern recognition.

How accurate is face recognition outside the demo?

In controlled, cooperative settings such as phone unlocking or passport checks, modern systems can be highly accurate. The Federation of American Scientists (FAS), summarising NIST evaluations in 2025, puts errors at about one in 1,000, depending on conditions. In NIST’s verification test on high-quality frontal images, the best system as of January 2025 missed 0.13% of correct matches at a threshold set for a 0.003% false positive rate.

Change the images and the picture changes. When the best mugshot-identification system was applied to a gallery of visa images with probes taken from a kiosk, its error rate rose by a factor of about 18, from roughly one miss in 500 to one in 30. Face resolution matters too. A 2020 surveillance pipeline measured a false negative rate of 100% at a false positive rate below 10⁻⁶ for 8-pixel faces, against 0.001% for 63-pixel faces. A 2025 benchmark of five commercial cloud services (Amazon Rekognition, Face++, Luxand, Tencent and Verigram) found every one more accurate on posed celebrity photos than on athletes photographed mid-event.

Demographic false-positive differentials

NIST’s 2019 demographic study (NISTIR 8280) found that false positive differentials are much larger than false negative ones: across demographics, false positive rates often vary by factors of 10 to beyond 100, while false negatives usually vary by factors below 3. False positives were 2 to 5 times higher in women than in men, and elevated in the elderly and in children. On high-quality application photos, false positives were highest in West and East African and East Asian people and lowest in Eastern Europeans, though several algorithms developed in China reversed the effect on East Asian faces.

Measurements from 2025 show the gap persists among top-performing systems. FAS reports that the top-performing system as of March 2025 produced 358 times as many false positives for West African women over 65 as for Eastern European men aged 35 to 50, with the false match rate moving from about one in 15,000 to about one in 50. Among the top ten systems, false positives for West Africans averaged about 23 times those for Eastern Europeans, 4.6 times higher for women than men, and 2.9 times higher for people over 65 than for those aged 20 to 35. The 2025 cloud benchmark found markedly higher error rates for Asian female celebrities in the two most accurate services.

Not every vendor shows the same pattern. NIST found some identification algorithms, including Idemia’s, with undetectable false positive differentials. Two caveats point in the worrying direction, though. NISTIR 8280 did not use internet or surveillance images, so it does not capture differentials in that imagery, and FAS cites some evidence that differential performance grows with task difficulty.

This is where our position on production computer vision applies directly. Off-the-shelf face recognition that performs in a demo can fail at the lighting, pose and image-quality edge cases of an actual deployment. The FTC’s December 2023 action against Rite Aid shows a production failure driven by image quality and missing controls: the retailer collected tens of thousands of images, many low-quality and from security cameras, employee phones and news stories, the system generated thousands of false positives, and Rite Aid was banned from facial recognition for surveillance for five years.

Thresholds decide which error you live with

A match is declared when the similarity score clears a cutoff, and the cutoff sets the balance between false positives and false negatives: tighten it and the system misses more genuine matches. NIST notes that most biometric systems run one fixed threshold for every comparison, not tailored to cameras, conditions or demographics. Many academic studies report false negatives at a fixed false positive rate instead, which hides the false positive excursions a fixed threshold produces in a real system. Operational systems target false match rates anywhere from 10⁻⁶ to 10⁻².

Vendor thresholds need calibrating to the use case. Amazon Rekognition’s UserMatchThreshold defaults to 75 on a 0 to 100 scale, and AWS suggests around 80% for a family photo app but 99% or above for many law enforcement uses. NIST also warns that evaluations which pair impostors at random (zero-effort pairing) underestimate the false match rates that occur in practice.

An accuracy percentage quoted without its threshold, its false match rate and its test images cannot be compared with any other figure.

Cloud, edge and hybrid deployment

Where the pipeline runs changes communication delay, processing delay, scalability and privacy. A study of 294 experiments compared cloud, edge and hybrid deployment on Jetson boards and GPUs. Its trade-offs:

Characteristic Cloud Edge Hybrid (detect at edge, recognise in cloud)
Communication delay High Low Low
Processing delay Low High Medium
Scalability Limited High High
Privacy Low High Medium

Source for the table: the cloud-versus-edge deployment study.

Cloud GPUs ran 2x to 7.7x faster than edge devices on average. TensorRT accelerated MTCNN 6x to 11x over TensorFlow on every platform and FaceNet by 51% to 76%, at the cost of up to 40% more energy on edge devices. A Jetson Nano could not run the TensorFlow implementation of MTCNN at all. On the privacy side, cloud deployment streams whole frames, exposing everything the camera captures, while edge deployment can filter sensitive data before anything leaves the device.

Embedding model cost differs sharply on edge hardware. A 2026 low-power study measured FaceNet at 27.69 ms per face on CPU and 70.47 ms on a Raspberry Pi 4, and concluded that full FaceNet extraction suits the cloud. The same study found MobileFaceNet fastest (7.78 ms on CPU) but reported poor and unstable accuracy for it, while a 2020 pipeline built on MobileFaceNet reported 99.50% on LFW and about 30 ms per frame on a smartphone. The two studies disagree on MobileFaceNet, another reason to test the specific model on your own images.

How do GDPR, BIPA and the EU AI Act attach to each stage of the pipeline?

Under GDPR, exposure attaches once templates are stored to identify someone. Under the EDPB’s 2019 guidelines, GDPR Article 9 applies when biometric data results from specific technical processing and is used for the purpose of uniquely identifying a natural person. Storing templates to recognise a person re-entering an area meets that test from the start.

Pipeline stage What attaches to it Engineering control
Capture and detection Large-scale monitoring of publicly accessible areas requires a data protection impact assessment under GDPR Article 35(3)(c) Decide what leaves the camera; edge filtering limits exposure
Embedding (template creation) Article 9 special-category data once used to identify; templates must hold only what the purpose requires Delete templates made on the fly for comparison immediately after the match or no-match result
Gallery (enrolment and storage) In controlled environments, store templates on the user’s own device, or centrally in encrypted form with the key held by the person; BIPA requires consent, secure storage and timely destruction Separate templates from identity data and encrypt both, with a key-management policy
Matching (1:1 versus 1:N) Under the EU AI Act, remote biometric identification is high-risk, while verification of a person who presents themselves is not Document which mode the system runs in, and why
Decision and human review No adverse legal decision may rest solely on the output of real-time remote identification Treat matches as leads, with audit trails of searches and outcomes

Verification versus remote identification under the EU AI Act

The AI Act Service Desk’s examples turn on whether the person actively participates. A home-entrance system checking a face against a database the resident agreed to join is biometric verification and does not meet the condition of remoteness. A stadium entry camera that requires visitors to step in front of it is not remote either, whereas stadium CCTV matched against a database after an incident, without visitors’ involvement, is remote identification. Real-time remote identification in public spaces for law enforcement needs a completed fundamental rights impact assessment and registration in the EU database. ComplyLayer, a compliance vendor, also notes that building face databases by untargeted scraping from the internet or CCTV is banned outright by Article 5(1)(e).

BIPA in Illinois

The Illinois Biometric Information Privacy Act of 2008 regulates private entities and sets damages of $1,000 per violation, or $5,000 if intentional or reckless. The Illinois Supreme Court ruled that plaintiffs do not need to prove injury; the violation alone is enough. Facebook’s tag suggestions and Google Photos face scans both drew BIPA suits over consent.

Embeddings are not anonymous

A 2026 study found that simple linear maps align embeddings between different networks, reaching 97% cross-model retrieval accuracy among face-specific models. Its authors say this challenges template protection schemes that assume system-specific embeddings are inherently revocable. We would govern a gallery of embeddings with the same care as a gallery of photos.

Whether a given deployment is lawful is a call for counsel and the data protection officer.

Ask for error rates at the threshold the system will actually run, on images like yours, broken down by demographic group. NIST’s demographic report says that because most systems run a fixed threshold, both false negative and false positive rates must be reported per group at that threshold, and this is rarely done. A diagnostic checklist:

  1. Which embedding model, trained with which loss, in which version? Model fit depends on the domain, and hosted models change: a 2024 rerun of the cloud benchmark found Amazon Rekognition’s accuracy had improved, which the authors attributed to a model change.
  2. Is the system verification (1:1) or identification (1:N)? The answer changes the error metrics (FMR and FNMR versus FPIR and FNIR) and the EU AI Act tier.
  3. What are the false match and false non-match rates at the operating threshold, per demographic group? Ask whether impostor pairs were demographically matched rather than random.
  4. What minimum face size and quality does the pipeline accept, and what happens below it? In one pipeline, 8-pixel faces missed every match while 63-pixel faces missed 0.001%.
  5. How are templates built from several images? Average pooling treats bad images like good ones.
  6. What is the gallery refresh policy? NIST found elevated false positives at the age extremes. We would treat any refresh interval a vendor quotes as its own claim and ask what data supports it.
  7. Where do frames, templates and the gallery physically live, and when are they deleted?
  8. How is accuracy monitored after go-live? Rite Aid failed to test or monitor accuracy once deployed, enforce image-quality standards, or track false positive alerts. Ongoing monitoring is an MLOps engineering problem as much as a model problem.

A vendor who answers only with an LFW score has answered none of these. Whether to buy at all or build is a separate decision, covered in our guide on when to build a custom computer vision model.

Who can audit a face recognition pipeline before it goes live?

TechnoLynx builds and deploys computer vision recognition systems, including face recognition pipelines. That covers building the pipeline, deploying it and making it run faster on the target edge or cloud hardware, through Computer Vision R&D work. The first step is to test the candidate pipeline on a sample of your own capture conditions rather than the vendor’s demo set.

Some limits apply. We cover the engineering, not legal sign-off, so lawfulness under GDPR, BIPA or the AI Act stays with your counsel and data protection officer. If you need a hosted API for a low-stakes, cooperative use (a photo app, say), a cloud service with a calibrated threshold may be all you need, and an audit would be overkill.

FAQ

What is the key difference between face detection and face recognition?

Face detection finds whether there is a face in an image and where it is. Face recognition goes a step further and decides whose face it is, with detection as its preceding step. For the terminology in practice, see what face recognition means in computer vision.

How is facial recognition used in policing?

Through one-to-many searches against galleries such as mugshots or licence photos. FBI and NYPD protocols require trained examiners and treat a possible match only as an investigative lead that must be corroborated.

Back See Blogs
arrow icon