https://face.canscorp.comapplication/json encoding.
The Face Scan API provides high-speed, deep-learning based facial recognition, feature extraction, and 1:1 identity verification. It detects faces, computes mathematical facial embedding vectors, and compares face signatures using Cosine similarity metrics.
| Feature | Specification | Details |
|---|---|---|
| Default Engine | Facenet | Compact, high-accuracy neural network (128-d vector output) |
| Face Detector | OpenCV Haar Cascade | Fast, real-time face localization and bounding box extraction |
| Distance Metric | Cosine Distance | 0.00 (Identical) to 1.00 (Completely Different) |
| Verification Threshold | 0.40 | Pair distance ≤ 0.40 indicates the same person |
| Image Inputs | Base64 or Server Path | Supports standard JPEG, PNG, WEBP encoded images |
You may optionally specify any of the supported recognition backends using the model parameter:
| Model Name | Vector Dimension | Accuracy | Best Use Case |
|---|---|---|---|
| Facenet (Default) | 128 | 99.6% | Recommended general-purpose face recognition and fast matching |
| Facenet512 | 512 | 99.6% | High-precision biometric matching |
| VGG-Face | 2622 | 98.8% | Large embedding size, robust feature representation |
| ArcFace | 512 | 99.5% | Enterprise-grade high-security identification |
| OpenFace | 128 | 92.9% | Lightweight mobile/edge computing |
Returns the operational status of the service and the active face model.
| Field | Type | Description |
|---|---|---|
status | string | Always returns "running" when service is active |
service | string | Service name identifier ("face-scan-api") |
model | string | Default loaded model ("Facenet") |
Used by load balancers, container orchestrators, and uptime monitors.
Detects a face in the input image and extracts its numerical embedding vector and bounding box coordinates.
| Field | Type | Requirement | Description |
|---|---|---|---|
img_base64 |
string | Required* | Base64-encoded image string (with or without data URI scheme) |
img_path |
string | Required* | Absolute file path on server (*Provide either img_base64 or img_path) |
model |
string | Optional | Model name. Defaults to "Facenet" |
| Field | Type | Description |
|---|---|---|
success | boolean | true when extraction succeeds |
model | string | Name of the model used |
facial_area | object | Coordinates: x, y, w, h, left_eye, right_eye |
embedding | array[float] | Normalized float vector representing facial biometric features |
Compares two facial images to verify whether they represent the same individual.
| Field | Type | Requirement | Description |
|---|---|---|---|
img1_base64 |
string | Required* | Base64 string of reference face image |
img1_path |
string | Required* | Local path to reference image (*Use either base64 or path) |
img2_base64 |
string | Required* | Base64 string of target face image to compare |
img2_path |
string | Required* | Local path to target image (*Use either base64 or path) |
model |
string | Optional | Recognition model. Defaults to "Facenet" |
| Field | Type | Description |
|---|---|---|
success | boolean | true when verification executes successfully |
verified | boolean | true if faces match (distance ≤ threshold), else false |
distance | float | Cosine distance score (Lower score = higher similarity) |
threshold | float | Decision threshold boundary (0.40 for Facenet) |
| Status Code | Reason | Sample Error Response |
|---|---|---|
| 400 Bad Request | Missing required image parameters | {"success": false, "message": "No image provided"} |
| 422 Unprocessable Entity | No face detected in submitted image | {"success": false, "message": "No face detected in the image"} |
| 500 Internal Server Error | Unexpected server or processing error | {"success": false, "message": "<error details>"} |
data:image/jpeg;base64, prefixes are automatically parsed.Select two facial images to test live 1:1 identity verification with the multi-detector AI engine: