Skip to content

fix(vision, video): remove deprecated emotion fields from face detection sample - #15015

Open
bibliofilo wants to merge 5 commits into
GoogleCloudPlatform:mainfrom
bibliofilo:fix-vision-emotion-deprecation
Open

bibliofilo wants to merge 5 commits into
GoogleCloudPlatform:mainfrom
bibliofilo:fix-vision-emotion-deprecation

Conversation

@bibliofilo

@bibliofilo bibliofilo commented Dec 1, 2026 •

Copy link
Copy Markdown

Description

Removes joy_likelihood, sorrow_likelihood, anger_likelihood, and surprise_likelihood from face detection samples (detect.py). Replaces them with active likelihood fields: headwear, under exposed, and blurred.

Minor update to video_detect_faces.py and video_detect_faces_gcs.py to remove references to smiling, and replaces them with supported DetectedAttribute names frontal_gaze, eyes_visible, mouth_open.

Emotion recognition attributes in Cloud Vision API Face Detection and Video Intelligence were deprecated on October 15, 2026, and permanently return UNKNOWN.

Refs: b/592146954

Checklist

Testing

  • I have tested this change on a live environment and verified it works as intended.

Compliance & Style


Post-Approval Actions

  • Please merge this PR for me once it is approved

@bibliofilo
bibliofilo requested review from a team as code owners December 1, 2026 21:45
@product-auto-label product-auto-label Bot added api: vision Issues related to the Cloud Vision API. samples Issues that are directly related to samples. labels Dec 1, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the detect_faces and detect_faces_uri functions in vision/snippets/detect/detect.py to print the likelihoods for headwear, under-exposure, and blurriness instead of anger, joy, and surprise. I have no feedback to provide as there are no review comments.

@bibliofilo bibliofilo changed the title fix(vision): remove deprecated emotion fields from face detection sample fix(vision, video): remove deprecated emotion fields from face detection sample Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: vision Issues related to the Cloud Vision API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant