Skip to content

Face detection

Purpose

Demonstrate enabling face mode on the online recognition pipeline, consuming quality-ranked FaceModels, and extracting optimised crops for downstream usage.

Entry points

Glass home:

  • HomeActivityGlassFaceTrackActivity

Sample Activity:

  • com.rokid.glass.GlassFaceTrackActivity

Platform

  • Glass

Main file

Flow

  1. Grab GlassSdk.getGlassOnlineRecService().
  2. Attach IGlassDetectionListener.
  3. startDetection(MODE_FACE).
  4. Consume onProcessedFaceModels() to pick the best samples.
  5. Filter noisy tracks via quality + trackId.
  6. Snapshot crops through getFaceSamllBitmap(trackId) and render.

FAQ

What “best face” means here

Heuristic blend of bounding-box area, iqaScore, faceScore, deduped per trackId; samples under iqaScore < 40 drop out.

Detection vs recognition

This path emphasises detection + crop quality scoring—no ID compare is performed in UI.

Caveats

  • Always call stop + detach on exit.
  • Persistence hooks exist but stay commented—focus is pipeline validation, not archival UX.