人脸搜索

1. 描述

从指定集合中搜索出与图片中人物相似度高于某值的前N个人物

注:指定集合只能是普通集合,在搜索时会自动对所有过滤集合内数据进行搜索,如果命中敏感人物,会返回服务错误码10005及业务错误码10015

2. URL

https://cosmos-cv-api.immomo.com/matchN

3. 请求方式

POST

4. 参数

名称 类型 是否必传 说明 示例
timestamp int true 当前时间戳(秒) 1522222222
sign string true 签名,生成算法 md5 (appid + appkey + timestamp)
appId string true 业务方appId
type int true 查询方式 1-url, 2-feature,3-图片二进制文件,4-personId
setId string true 普通集合ID
threshold float true 查询相似度阈值
topN int true 返回结果最大数量
imgUrl string false 图片url
imgMsg string false 人脸特征数据
image file false 图片二进制文件
personId string false 人脸ID 10011

5. 返回数据

{
    "code": 10000,
    "message": "操作成功",
    "data": {
        "results": [
            {
                "personId": "1234",
                "score": 0.5
            },
            {
                "personId": "12345",
                "score": 0.45
            }
        ],
        "qualityCode": 51, // 人脸质量
        "ec": 10012
    }
}

6. 服务错误码(code)

码值 含义
10000 操作成功
10001 服务错误
10002 参数错误
10003 appId校验失败
10005 命中过滤集合

7. 业务错误码(ec)

码值 含义
10011 URL错误
10012 personId不存在
10015 命中过滤集合
10023 无效setId
@Copyright © cosmos 2019 all right reserved,powered by Gitbook修订时间: 2019-08-19 19:28:07

results matching ""

    No results matching ""