faithoflifedev / google_vision_workspace

Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications.
MIT License
20 stars 8 forks source link

Face Detection Enum Decoding #7

Closed husitawi closed 1 year ago

husitawi commented 1 year ago

Resulting Face Annotations are misbehaving, I did some debugging and I think the decoding function is the problem since we're comparing the enum VALUE instead of the KEY to the returned value from Google Vision. This is resulting in LikeLihood.UNKNOWN all the time.

Screenshot 2023-03-09 at 12 15 31 PM
husitawi commented 1 year ago

Follow up, just changing the face_annotations Likelihood enum to the following fixes the issue.

@JsonEnum() enum Likelihood { @JsonValue('UNKNOWN') UNKNOWN, @JsonValue('VERY_UNLIKELY') VERY_UNLIKELY, @JsonValue('UNLIKELY') UNLIKELY, @JsonValue('POSSIBLE') POSSIBLE, @JsonValue('LIKELY') LIKELY, @JsonValue('VERY_LIKELY') VERY_LIKELY }

faithoflifedev commented 1 year ago

Hi @husitawi , Release v1.0.7+6 has the above changes.