You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure Face API:能否用PersistedFaceId替代FaceId调用Find Similar?

Can I use PersistedFaceId instead of FaceId for Azure Face API's Find Similar?

Short answer: No, you can't directly substitute a PersistedFaceId for the FaceId required as the first input parameter in the Find Similar API.

Let me break down why, and what you can do instead:

  • First, a quick recap of the two IDs:
    • FaceId is a temporary ID returned by the Face Detect API, valid only for 24 hours. It represents a freshly detected face that hasn’t been saved to any face list.
    • PersistedFaceId is a permanent ID assigned to a face when you add it to a Face List or Large Face List. It’s tied directly to that stored entry in your list.
  • The Find Similar API’s first parameter expects a FaceId because it needs a "live" or recently detected reference face to compare against the faces in your specified FaceListId. PersistedFaceIds aren’t recognized as valid input here—they’re designed to be returned as part of the matching results, not used as the query face itself.

Workarounds if you want to use a persisted face as your reference:

  1. Re-detect the face to get a valid FaceId:
    Pull the image associated with the PersistedFaceId from your storage, run it through the Face Detect API to generate a fresh FaceId, then use that FaceId as the input for Find Similar.
  2. Reverse your approach:
    If your goal is to find faces in the Face List that match a persisted face, you can instead take the FaceId of any face you want to compare (even if it’s from the same image as your persisted face), set the FaceListId to your target list, and the API will return matching entries along with their PersistedFaceIds.

内容的提问来源于stack exchange,提问作者Puzzle

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 08:04:43