Artificial intelligence 使用Amazon人脸识别节点查找最适合的图像

Artificial intelligence 使用Amazon人脸识别节点查找最适合的图像,artificial-intelligence,amazon,Artificial Intelligence,Amazon,“console.log(Photo,ID:+Photo\u target+匹配${similarity}%置信度)” 我想抓住每一个请求,比较所有的请求,哪一个有最高的信心 我现在这样说: client.compareFaces(params, function(err, response) { if (err) { console.log(err, err.stack); // an error occurred } else { wait(3000); respon

“console.log(
Photo,ID:
+Photo\u target+
匹配${similarity}%置信度
)”

我想抓住每一个请求,比较所有的请求,哪一个有最高的信心

我现在这样说:

client.compareFaces(params, function(err, response) {
if (err) {
    console.log(err, err.stack); // an error occurred
} else {
    wait(3000);
    response.FaceMatches.every(data => {
        let similarity = data.Similarity
        console.log(`Photo with ID:  `+photo_target+` matches with ${similarity} % confidence`)

    }) // for response.faceDetails
}
Photo with ID:  81.jpeg matches with 0.007053143810480833 % confidence
Photo with ID:  65.jpeg matches with 0.3279508650302887 % confidence
Photo with ID:  68.jpeg matches with 0.5895840525627136 % confidence
Photo with ID:  103.jpeg matches with 0.2035781294107437 % confidence
Photo with ID:  59.jpeg matches with 2.0684666633605957 % confidence
但我想这样:

client.compareFaces(params, function(err, response) {
if (err) {
    console.log(err, err.stack); // an error occurred
} else {
    wait(3000);
    response.FaceMatches.every(data => {
        let similarity = data.Similarity
        console.log(`Photo with ID:  `+photo_target+` matches with ${similarity} % confidence`)

    }) // for response.faceDetails
}
Photo with ID:  81.jpeg matches with 0.007053143810480833 % confidence
Photo with ID:  65.jpeg matches with 0.3279508650302887 % confidence
Photo with ID:  68.jpeg matches with 0.5895840525627136 % confidence
Photo with ID:  103.jpeg matches with 0.2035781294107437 % confidence
Photo with ID:  59.jpeg matches with 2.0684666633605957 % confidence