AI Agent Hub
Back to skills
Tencent Cloud FaceID CompareFace icon

Tencent Cloud FaceID CompareFace

AI Agent Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please follow https://skillhub.cn/install/skillhub.md and install @tencent-adm/tencentcloud-faceid-compareface

About this skill

The Problem

TencentCloud FaceID CompareFace is for 1:1 face comparison when two images are already available. In many Agent or backend flows, a system may have an ID photo, a liveness capture, or an uploaded user image, but still needs a comparable similarity score and a defensible threshold. This skill wraps the Tencent Cloud CompareFace API as a command-line workflow, removing the need to hand-roll API signing, Base64 encoding, and version-specific parameters.

How It Works

The skill runs scripts/main.py to request a 1:1 comparison. Inputs can be local file paths, Base64 strings, or image URLs; local files are converted to Base64 automatically, and URL parameters take precedence. Key options include:
- --image-a / --url-a: image A.
- --image-b / --url-b: image B.
- --face-model-version: choose 2.0 or 3.0, defaulting to 3.0.
- --quality-control: filter low-quality images using low, general, higher, or very high control.
- --need-rotate-detection: enable rotation detection.

On success, the API returns JSON with a similarity score from 0 to 100. For the 3.0 model, a score of >=50 is a reasonable recommended threshold; for 2.0, >=80 is a better default for identifying the same person. If an image contains multiple faces, the highest-confidence face is selected, so the skill fits single-subject 1:1 verification best.

Boundaries

This is not a 1:N search, face detection, or identity-attribute service. It does not extract names, document numbers, or other identity fields. It requires Tencent Cloud API credentials and enforces input limits: Base64 payloads under 5MB, JPG long edges under 4000 pixels, other formats under 2000 pixels on the long edge, and short edges of at least 64 pixels. Blurry, occluded, low-resolution, or crowded images can reduce reliability, so business risk rules should still be applied around the score.

Use Cases

  • A login risk engineer compares a live-capture photo with an ID photo and uses the similarity score to decide pass/fail.
  • A backend engineer calls the Tencent Cloud CompareFace API in an Agent flow to check whether two URL images show the same person.
  • A customer-support reviewer verifies local portrait photos as 1:1 matches and applies thresholds for suspect, likely, and strong matches.
  • A KYC system engineer enables quality control and rotation detection before comparing low-quality or rotated face images.

Best For

  • Risk engineers who need 1:1 comparison between a live-capture photo and an ID photo, then apply a score threshold.
  • Backend engineers who need to call the CompareFace API from a service or Agent and consume structured JSON.
  • Customer-support reviewers who need to decide quickly whether two portrait photos show the same person.
  • KYC system engineers who need to handle image quality control, rotation detection, and model version selection.