From b12f226051bfc264b6f498aaed48ecca18f50196 Mon Sep 17 00:00:00 2001 From: Burke Davison <40617934+burkedavison@users.noreply.github.com> Date: Thu, 12 Oct 2023 13:15:15 -0400 Subject: [PATCH] fix: lenient vision face annotation results (#9947) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: lenient vision face annotation results * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- java-vision/README.md | 2 +- .../test/java/com/google/cloud/vision/it/ITSystemTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/java-vision/README.md b/java-vision/README.md index 0396cce79929..8a71257f4464 100644 --- a/java-vision/README.md +++ b/java-vision/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.23.0 + 26.24.0 pom import diff --git a/java-vision/google-cloud-vision/src/test/java/com/google/cloud/vision/it/ITSystemTest.java b/java-vision/google-cloud-vision/src/test/java/com/google/cloud/vision/it/ITSystemTest.java index 08d2c48b44ab..141ed836f460 100644 --- a/java-vision/google-cloud-vision/src/test/java/com/google/cloud/vision/it/ITSystemTest.java +++ b/java-vision/google-cloud-vision/src/test/java/com/google/cloud/vision/it/ITSystemTest.java @@ -292,7 +292,7 @@ public void detectFacesTest() throws IOException { AnnotateImageResponse res = requestAnnotatedImage("face_no_surprise.jpg", Type.FACE_DETECTION, false); for (FaceAnnotation annotation : assertNotEmpty(res, res.getFaceAnnotationsList())) { - assertEquals(Likelihood.LIKELY, annotation.getAngerLikelihood()); + assertThat(annotation.getAngerLikelihood()).isAnyOf(Likelihood.LIKELY, Likelihood.POSSIBLE); assertEquals(Likelihood.VERY_UNLIKELY, annotation.getJoyLikelihood()); assertEquals(Likelihood.LIKELY, annotation.getSurpriseLikelihood()); } @@ -303,7 +303,7 @@ public void detectFacesGcsTest() throws IOException { AnnotateImageResponse res = requestAnnotatedImage("face/face_no_surprise.jpg", Type.FACE_DETECTION, true); for (FaceAnnotation annotation : assertNotEmpty(res, res.getFaceAnnotationsList())) { - assertEquals(Likelihood.LIKELY, annotation.getAngerLikelihood()); + assertThat(annotation.getAngerLikelihood()).isAnyOf(Likelihood.LIKELY, Likelihood.POSSIBLE); assertEquals(Likelihood.VERY_UNLIKELY, annotation.getJoyLikelihood()); assertEquals(Likelihood.LIKELY, annotation.getSurpriseLikelihood()); }