Skip to content

Commit

Permalink
fix: lenient vision face annotation results (#9947)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
burkedavison and gcf-owl-bot[bot] committed Oct 12, 2023
1 parent 880604f commit b12f226
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion java-vision/README.md
Expand Up @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.23.0</version>
<version>26.24.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Expand Up @@ -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());
}
Expand All @@ -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());
}
Expand Down

0 comments on commit b12f226

Please sign in to comment.