socrits_effects

On-device face detection & camera overlays for the Socrits SDK — powered by Google ML Kit. Detect faces, landmarks and expressions live, and draw an overlay on the camera preview. Great for beauty / AR previews, face tracking and expression-driven UI.

Runs on the local device and renders on the local user's screen. Baking effects into the published video (so remote participants see them) needs a native video processor and ships separately.

Install

flutter pub add socrits_effects

Permissions: add camera usage — NSCameraUsageDescription (iOS Info.plist) and <uses-permission android:name="android.permission.CAMERA"/> (Android AndroidManifest.xml). Min SDK: Android 21, iOS 13.

Usage

import 'package:socrits_effects/socrits_effects.dart';

SocritsFaceCam(
  showLandmarks: true,
  onFaces: (faces) {
    for (final f in faces) {
      if (f.isSmiling) { /* trigger a smile effect */ }
      // f.boundingBox, f.headEulerAngleY (yaw), f.landmarks['leftEye'] …
    }
  },
)

SocritsFaceCam shows the camera preview, runs detection every frame (throttled), draws the overlay, and calls onFaces with a List<DetectedFace>.

DetectedFace

  • boundingBox — face rectangle
  • smilingProbability, leftEyeOpenProbability, rightEyeOpenProbability
  • headEulerAngleY (yaw), headEulerAngleZ (roll)
  • trackingId — stable across frames
  • landmarks — { 'leftEye': Offset, 'noseBase': Offset, … }
  • helpers: isSmiling, eyesOpen

Documentation

Full guides at socrits.com/docs/ai-effects.

Maintainer

Built and maintained by SuryaPrakash Malgo · socrits.com

Libraries

socrits_effects
Socrits effects — on-device face detection & camera overlays.