namifusion

人脸检测

namifusion/detect_faces

人脸检测模型, 用于检测输入元素中包含的人脸信息

示例

人脸检测 example 1

参数

名称类型默认说明
url媒体URLtext图片或视频URL。url 与 img 至少提供一个;若同时提供则优先使用 url。
imgBase64图片textareaBase64 编码图片输入(未提供 url 时使用)。
num_frames抽帧数量number5视频输入时采样的帧数。
return_face_url返回人脸URLbooleantrue是否返回裁剪后的人脸图片URL。
single_face仅返回最大人脸booleanfalse是否只返回检测到的最大人脸。
deduplicate人脸去重booleantrue是否对视频采样帧中的人脸做跨帧去重。
similarity_threshold相似度阈值number0.45去重相似度阈值(0.0-1.0);值越高越严格。
time_range时间区间object[object Object]可选的视频处理时间区间(秒);仅对视频输入生效。

API

通过统一 REST API 调用本模型;在 API Keys 页获取密钥。

curl -X POST https://www.namifusion.com/api/v1/marketplace/run/namifusion/detect_faces \
  -H "Authorization: Bearer sk-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "input": { "url": ..., "img": ..., "num_frames": ... } }'