Aws Rekognition需要太长时间才能比较2张图片之间的面孔

时间:2019-01-03 02:44:52

标签: android amazon-rekognition

我正在使用以下代码进行识别。

AWSCredentials credentials = new BasicAWSCredentials(xx, yy);
            AmazonRekognition rekognitionClient = new AmazonRekognitionClient(credentials);
            rekognitionClient.setRegion(Region.getRegion(Regions.US_EAST_1));
            CompareFacesRequest request = new CompareFacesRequest()
                    .withSourceImage(new Image().withBytes(byteBufferSrc))
                    .withTargetImage(new Image().withBytes(byteBufferDest)).withSimilarityThreshold(90f);
            CompareFacesResult response = rekognitionClient.compareFaces(request);
            boolean matched = false;
            for (CompareFacesMatch singleMatch : response.getFaceMatches()) {
                if (singleMatch.getSimilarity() >= 90f) {
                    return true;
                }
            }

完成两张图像之间的面部检测大约需要1分钟。 这正常吗?我觉得它太过分了,所以我想知道是否有一种方法可以加速它,或者我做错了什么 谢谢

0 个答案:

没有答案