# AI Face Compare (1:1)

Compare two images, output embedding distance and match boolean by threshold, only compare the first face in each image

> Canonical page: https://test.elysiatools.com/en/tools/ai-face-compare

- **Category:** AI Tools

- **Keywords:** face, compare, distance, recognition

## Overview

AI Face Compare (1:1) analyzes two uploaded portraits to locate the first face in each image, returning a JSON response with the embedding distance and a boolean match status based on configurable threshold and confidence settings.

## Inputs

- **Image A** (file): Upload first image
- **Image B** (file): Upload second image
- **Match Threshold** (number): 0.6
- **Minimum Confidence (0-1)** (number): 0.5

## When to use

- You need to verify whether a photo ID matches a submitted onboarding selfie.
- You want to measure facial similarity between two pictures taken at different times or under different lighting.
- You need to test and tune embedding distance thresholds for a face verification process.

## How it works

- Upload the first image into Image A and the second image into Image B (BMP, JPEG, PNG, or GIF formats up to 30 MB each).
- Set the Match Threshold (default 0.6, range 0.1 to 1.5) to define the maximum distance value considered a match.
- Adjust the Minimum Confidence (default 0.5, range 0.05 to 0.99) to specify the minimum face detection score required for processing.
- Run the comparison and inspect the JSON output for the computed embedding distance and boolean match result.

## Use cases

- Identity Verification Audits: Check identity records by comparing user-submitted headshots against reference photos to confirm likeness via JSON output.
- Threshold Calibration: Test sample image pairs across different Match Threshold and Minimum Confidence values to establish accurate operating thresholds for verification tasks.
- Duplicate Detection Checks: Evaluate two user profiles suspected of belonging to the same individual by measuring the embedding distance between their profile images.

## Frequently asked questions

### Which image file types and size limits are supported?

The tool supports BMP, JPEG, PNG, and GIF files up to 31,457,280 bytes (approximately 30 MB) per image.

### How does the Match Threshold parameter work?

Match Threshold sets the cutoff for the embedding distance. A distance at or below this value results in a true match boolean, while a distance above it returns false.

### What does the Minimum Confidence parameter do?

It sets the starting detection confidence score (0.05 to 0.99) for registering a face in each image. If no face is found at that level, the tool automatically retries at lower confidences (down to 0.2) before giving up, so only lowering the setting below 0.2 changes which faces can be detected.

### What happens if an uploaded photo contains more than one face?

The tool detects and compares only the first face identified in each uploaded image, ignoring any other faces.

### What output does the tool provide?

It returns a JSON object containing the calculated embedding distance value and a boolean match determination based on your threshold setting.

## Related tools

- [Image Adaptive Threshold](https://test.elysiatools.com/en/tools/image-adaptive-threshold): Apply adaptive threshold operation that calculates threshold for small regions, suitable for varying lighting conditions
- [Image Boolean AND](https://test.elysiatools.com/en/tools/image-boolean-and): Apply bitwise AND operation between two images to create intersection mask
- [Image Boolean OR](https://test.elysiatools.com/en/tools/image-boolean-or): Apply bitwise OR operation between two images to create union mask
- [Image Boolean XOR](https://test.elysiatools.com/en/tools/image-boolean-xor): Apply bitwise XOR operation between two images to create difference mask
- [Image Box Blur](https://test.elysiatools.com/en/tools/image-box-blur): Apply box blur kernel for simple uniform averaging and fast noise reduction
- [Image Noise Reduction](https://test.elysiatools.com/en/tools/image-noise-reduction): Reduce image noise using multiple algorithms including median, gaussian, and bilateral filtering
- [Image Trim Whitespace](https://test.elysiatools.com/en/tools/image-trim-whitespace): Remove whitespace and empty margins from images by detecting and trimming blank areas
- [Image Color Extractor](https://test.elysiatools.com/en/tools/image-color-extractor): Extract dominant colors from images using various algorithms including k-means clustering and histogram analysis

## Samples

- [macOS Image Processing Objective-C Samples](https://test.elysiatools.com/en/samples/macos-image-processing-objectivec): macOS Objective-C image processing examples including image reading/saving, image scaling, and format conversion
- [Web Image Processing Go Samples](https://test.elysiatools.com/en/samples/web-image-processing-go): Web Go image processing examples including image reading/saving, image resizing, and format conversion
- [Web Image Processing Python Samples](https://test.elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Web Image Processing TypeScript Samples](https://test.elysiatools.com/en/samples/web-image-processing-typescript): Web TypeScript image processing examples including image read/save, scaling, and format conversion

## Related content

- [AI Face Analysis: Detection, Comparison, and Recognition Workflows](https://test.elysiatools.com/en/hubs/ai-face-detection-recognition-workflows): Separate face detection and alignment from descriptor comparison, gallery recognition, and expression or age-gender estimation, with practical privacy and error boundaries.
