match user is not found
K1ASES 发布于2019-05 浏览:4911 回复:3
0
收藏

V3接口调用search人脸搜索报错match user is not found

问题主要出现在 如果两个人都注册了 那么交换设备进行人脸认证的时候(对方的uid+自己的人脸图片),90%会报错 222207

如果是一个人注册了 使用其他没有在人脸库里有照片的人的认脸照进行人脸认证的时候才会进行返回score 进行分数反馈  

代码如下:search的时候

HashMap options = new HashMap();
options.put("quality_control", "NORMAL");
options.put("liveness_control", "LOW");
options.put("user_id", SSS.ToPinyin(param.get("userId")));

String image = param.get("path");
String imageType = "BASE64";
String groupIdList = "group_" + SSS.ToPinyin(param.get("userId"));

System.out.println(imageType + "/n" + groupIdList + "/n" + options);

// 人脸搜索
JSONObject res = client.search(image, imageType, groupIdList, options);

 

注册代码如下:

HashMap options = new HashMap();
options.put("quality_control", "NORMAL");
options.put("liveness_control", "LOW");

String image = param.get("path");
String imageType = "BASE64";
String groupId = "group_"+SSS.ToPinyin(param.get("userId"));
String userId = SSS.ToPinyin(param.get("userId"));

// 人脸注册
JSONObject res = client.addUser(image, imageType, groupId, userId, options);

 

可以保证userId和groupid都唯一 我是每个人建一个groupid 每一个groupid存一个人脸照

 

收藏
点赞
0
个赞
共3条回复 最后由love奋斗201322回复于2020-03
#4love奋斗201322回复于2020-03

同一台客户端去调用,组用的是@ALL,仍然出现 222207,用测试追踪的时候,恢复正常,原程序没有改动也恢复正常,总之一下午白费了

总结下:这个就是个BUG

0
#3totti789回复于2019-10

检查图片base64,可能有换行符

0
#2K1ASES回复于2019-05

自顶 绝对不是groupid传成userid那样子的问题

0
TOP
切换版块