Katkat

How Would You Verify a Smiling-Face Detection Feature in Google Photos?

GoogleSoftware Engineer · Technical Screen

Last updated

A role-related question for software engineers: if your feature detects smiling faces in Google Photos, how would you verify that the detection is correct? It tests defining ground truth, choosing evaluation metrics and thresholds, covering hard cases and demographic slices, and validating the feature before and after launch.

Imagine you are part of the Google Photos team, and your feature detects smiling faces in photos. How would you verify that the detection is correct?

Clarifying Questions

  • What exactly does the feature output: a label per detected face, a label per photo, or a confidence score compared with a threshold?
  • How does the product use the result (search, suggestions, automatic edits), and which mistake is worse there: missing a smile or tagging a face that is not smiling?
  • Is there a face detector upstream of the smile classifier, and is verifying face detection in scope?
  • Are we verifying a new model before launch, a change to an existing one, or the feature as it runs in production?
  • What privacy constraints apply to looking at or labeling users' photos?

Hints

Hint 1

Define correct first: Before choosing any test, decide what counts as a smile, who decides when people disagree, and whether you judge individual faces or whole photos.

Hint 2

Look beyond one number: Think about where a single overall accuracy figure could look fine while the feature still fails for particular kinds of photos or people.

Follow-up questions

  • A new model version improves overall precision but gets worse on photos of young children. Do you ship it, and what would you need to know first?
  • How would you detect that the feature has degraded in production when you cannot look at users' photos?
  • In a group photo where some people smile and others do not, how should the feature behave, and how would you test that?
  • Labelers disagree on many borderline faces. How does that change your metrics and your launch criteria?