检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
endpoint和project_id需要替换成实际信息。 String url = "https://{{endpoint}}/v2/{{project_id}}/face-compare"; // image_base64需要替换成实际的值
息,请提前保存。 本样例以“华北-北京四”区域为例,获取对应的项目ID(project_id)。 图2 我的凭证 安装SDK 使用SDK前需要安装华为云Go SDK 库。 # 安装华为云Go库 go get -u github.com/huaweicloud/huaweicloud-sdk-go-v3
36],string类型的value长度范围为[1,256],具体参见自定义字段。 如果在后续操作中,使用该自定义字段向人脸库中添加人脸,需要在创建人脸库时定义该字段。 face_set_name 是 String 人脸库的名称,字符串长度1-64。 建议人脸库的名称不要以下划线
图2 我的凭证 安装SDK 支持Python3及以上版本,执行python --version检查当前Python的版本信息。 使用SDK前,需要安装“huaweicloudsdkcore”和“huaweicloudsdkfrs”。 # 安装核心库 pip install huaweicloudsdkcore
endpoint和project_id需要替换成实际信息。 String url = "https://{{endpoint}}/v2/{{project_id}}/face-detect"; // image_base64需要替换成实际的值
ProxyPassword = "test"; 超时配置(可选) // 默认超时时间为120秒,可根据需要调整 config.Timeout = 120; SSL配置(可选) // 根据需要配置是否跳过SSL证书验证 config.IgnoreSslVerification = true;
D...", "filter" : "number:[1 TO 20] && external_image_id:test" } 非,需要在非语句前后加括号。 externalImageID:1 && (!rowkey:2) Request Body示例: { "
ilder.create()).build(); // endpoint,project_id和face_set_name需要替换成实际信息。 String url = "https://{{endpoint}}/v2/{{project_id}}
heHttpClientBuilder.create()).build(); // endpoint和project_id需要替换成实际信息。 String url = "https://{{endpoint}}/v2/{{project_id}}/face-sets";
ilder.create()).build(); // endpoint,project_id和face_set_name需要替换成实际信息。 String url = "https://{{endpoint}}/v2/{{project_id}}
ilder.create()).build(); // endpoint,project_id和face_set_name需要替换成实际信息。 String url = "https://{{endpoint}}/v2/{{project_id}}
heHttpClientBuilder.create()).build(); // endpoint和project_id需要替换成实际信息。 String url = "https://{{endpoint}}/v1/{{project_id}}/live-detect-face";
ilder.create()).build(); // endpoint,project_id和face_set_name需要替换成实际信息。 String url = "https://{{endpoint}}/v2/{{project_id}}
create()).build(); // endpoint,project_id,face_set_name和face_id需要替换成实际信息。 String url = "https://{{endpoint}}/v2/{{project_id}}
集;通过添加人脸接口向人脸集中添加图片;通过查询人脸搜索接口,返回与输入人脸相似度最高的N张人脸图片;通过删除人脸接口从人脸集中删除用户不需要的人脸特征;通过删除人脸集接口删除用户创建的人脸集。 人脸搜索可用于企业、住宅的安全管理等多种场景,但由于翻拍照片和本人照片人脸搜索服务无法感知,不可用于防翻拍场景。
侧脸不超过30°、俯仰角小于15°、偏转角小于15°、图片中人脸保持竖置正脸。 动作活体检测 目前支持检测视频文件,或视频的Base64编码,不支持直接检测视频流,需要用户客户端自己获取视频流并保存成文件,然后调用活体检测接口。 视频文件大小不超过8MB,建议客户端压缩到200KB~2MB。 限制视频时长1~15秒。
侧脸不超过30°、俯仰角小于15°、偏转角小于15°、图片中人脸保持竖置正脸。 动作活体检测 目前支持检测视频文件,或视频的Base64编码,不支持直接检测视频流,需要用户客户端自己获取视频流并保存成文件,然后调用活体检测接口。 视频文件大小不超过8MB,建议客户端压缩到200KB~2MB。 限制视频时长1~15秒。
create()).build(); // endpoint,project_id,face_set_name和face_id需要替换成实际信息。 String url = "https://{{endpoint}}/v2/{{project_id}}
ilder.create()).build(); // endpoint,project_id和face_set_name需要替换成实际信息。 String url = "https://{{endpoint}}/v2/{{project_id}}
libcurl4-openssl-dev libboost-all-dev libssl-dev libcpprest-dev spdlog 需要从源码进行安装。 git clone https://github.com/gabime/spdlog.git cd spdlog mkdir