Spaces:
Running
Running
metadata
title: Face Tracker
emoji: π€
colorFrom: purple
colorTo: blue
sdk: static
pinned: false
short_description: Robot smoothly follows your face
tags:
- reachy_mini
- reachy_mini_python_app
Face Tracker π€π€
Detects faces via MediaPipe Face Detection and smoothly tracks the closest/largest face with the robot's head. Includes proximity-based emotional responses.
Features
- Smooth tracking: Proportional controller with exponential smoothing
- Largest face priority: Tracks the biggest (closest) face in frame
- Proximity emotions:
- Close (large face) β Happy, antennas up
- Medium distance β Mildly content
- Far (small face) β Curious
- No face β Lonely drift/scanning
- Natural movement: Smooth interpolation prevents jerky head motion
- Idle behavior: Gentle scanning when no face detected for ~1 second
How It Works
- Captures frames from Reachy Mini's camera
- Detects faces using MediaPipe Face Detection
- Calculates face center offset from frame center
- Maps offset to head yaw/pitch correction (proportional controller)
- Smoothly interpolates toward target position
- Adjusts antenna angle based on face proximity (emotion)
Requirements
- Camera connected to Reachy Mini
mediapipe,opencv-python,numpy
Install & Run
pip install .
reachy-mini run face_tracker