Skip to content

Commit b12f226

Browse files
fix: lenient vision face annotation results (#9947)
* 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 <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 880604f commit b12f226

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎java-vision/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
2020
<dependency>
2121
<groupId>com.google.cloud</groupId>
2222
<artifactId>libraries-bom</artifactId>
23-
<version>26.23.0</version>
23+
<version>26.24.0</version>
2424
<type>pom</type>
2525
<scope>import</scope>
2626
</dependency>

‎java-vision/google-cloud-vision/src/test/java/com/google/cloud/vision/it/ITSystemTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ public void detectFacesTest() throws IOException {
292292
AnnotateImageResponse res =
293293
requestAnnotatedImage("face_no_surprise.jpg", Type.FACE_DETECTION, false);
294294
for (FaceAnnotation annotation : assertNotEmpty(res, res.getFaceAnnotationsList())) {
295-
assertEquals(Likelihood.LIKELY, annotation.getAngerLikelihood());
295+
assertThat(annotation.getAngerLikelihood()).isAnyOf(Likelihood.LIKELY, Likelihood.POSSIBLE);
296296
assertEquals(Likelihood.VERY_UNLIKELY, annotation.getJoyLikelihood());
297297
assertEquals(Likelihood.LIKELY, annotation.getSurpriseLikelihood());
298298
}
@@ -303,7 +303,7 @@ public void detectFacesGcsTest() throws IOException {
303303
AnnotateImageResponse res =
304304
requestAnnotatedImage("face/face_no_surprise.jpg", Type.FACE_DETECTION, true);
305305
for (FaceAnnotation annotation : assertNotEmpty(res, res.getFaceAnnotationsList())) {
306-
assertEquals(Likelihood.LIKELY, annotation.getAngerLikelihood());
306+
assertThat(annotation.getAngerLikelihood()).isAnyOf(Likelihood.LIKELY, Likelihood.POSSIBLE);
307307
assertEquals(Likelihood.VERY_UNLIKELY, annotation.getJoyLikelihood());
308308
assertEquals(Likelihood.LIKELY, annotation.getSurpriseLikelihood());
309309
}

0 commit comments

Comments
 (0)