1.6.1.3 match_faces()
优质
小牛编辑
133浏览
2023-12-01
match_faces(self, *args, **kwargs) 方法
调用人脸对比接口, 返回人脸对比的结果
request syntax
image1 = Image(uri="fds://cnbj2.fds.api.xiaomi.com/vision-test/test_img.jpg")
image2 = Image(uri="fds://cnbj2.fds.api.xiaomi.com/vision-test/test_img.jpg")
face_compare_request = FaceCompareRequest(image1=image, image2=image,threshold=3500 )
match_face_result = vision_client.match_faces(face_compare_request)
parameters
face_compare_request :FaceCompareRequest对象,必须
人脸对比的请求类型,见FaceCompareRequest
response syntax
{"match_face_result": {
"isMatch": True,
"score": 4102
}
}
{"match_face_result": {
"isMatch": False,
"score": 2314
}
}
match_face_result
isMatch boolean
人脸匹配结果
score int
匹配程度