- Overview
- Features
- Project Structure
- Hardware Requirements
- Software Requirements
- Installation
- Usage
- System Architecture
- Documentation
- Contributing
FazeTrak is an intelligent webcam system capable of real-time face detection, gesture-based control, and autonomous tracking. Developed for CS3283 - Embedded Systems Project (Semester 5), the system combines computer vision, embedded systems, and robotics to create a self-centering camera platform.
The system uses:
- Desktop Application (PyQt5) - Face/gesture detection and servo control
- ESP32-C3 Microcontroller - Servo motor driver and command processing
- Pan-Tilt Mechanism - Dual servo motors for 2-axis tracking
- Virtual Camera Integration - Stream tracked video to Zoom, OBS, etc.
- β Real-time Face Detection - Powered by MediaPipe
- β Gesture-based Control - Lock/unlock tracking with hand gestures
- β Autonomous Tracking - Servos automatically center face in frame
- β Virtual Camera Support - Stream to OBS, Zoom, Teams
- β Desktop Application - Full PyQt5 GUI with live preview
Face-Tracking-WebCam/
βββ desktop-app/
β βββ app/
β β βββ main.py # PyQt5 GUI entry point
β β βββ video_thread.py # Video capture & face tracking
β β βββ servo_controller.py # Serial communication with ESP32-C3
β β βββ gesture.py # Hand gesture detection
β β parameters
β βββ requirements.txt
β βββ README.md
βββ device-firmware/
β βββ src/
β β βββ main.cpp # ESP32-C3 servo control firmware
β βββ platformio.ini
β βββ README.md
βββ assets/
β βββ esp32_c3_supermini.jpeg
β βββ circuit.png
β βββ ...
βββ README.md
βββ .gitignore
- Microcontroller: ESP32-C3 SuperMini
- Servos: 2Γ SG90 Pan-Tilt Servos (180Β° range)
- Webcam: Logitech C270 HD (or compatible USB camera)
- Servo Bracket: Pan-Tilt mount
- USB Cable: Type-C (ESP32-C3 connection)
| ESP32-C3 Pin | Component |
|---|---|
| GPIO 4 | Pan Servo Signal |
| GPIO 3 | Tilt Servo Signal |
| GND | Servo GND |
| 5V | Servo VCC (via external PSU) |
- Python 3.8+
- PyQt5
- OpenCV (cv2)
- MediaPipe
- pyvirtualcam
- PlatformIO
- ESP32Servo library
-
Clone the repository
git clone https://github.com/AkinduID/FazeTrak.git cd FazeTrak/desktop-app -
Create virtual environment (recommended)
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Install PlatformIO
pip install platformio
-
Navigate to firmware directory
cd device-firmware -
Build and upload
platformio run -t upload
cd desktop-app
python -m app.mainControls:
- Start Tracking - Begin face detection and servo control
- Stop Tracking - Stop the tracking system
- Hand Gestures:
- β Open Palm β Release face lock
- β Closed Fist β Lock face and start tracking
Visual Feedback:
- π΅ Blue circle - Raw face detection (noisy)
- π‘ Yellow circle - Kalman Filter estimate (smooth)
- π’ Green rectangle - Face bounding box
- π’ Green line - Servo aim vector
βββββββββββββββββββββββββββββββββββββββ
β Desktop Application (PyQt5) β
βββββββββββββββββββββββββββββββββββββββ€
β βββββββββββββββββββββββββββββββββ β
β β Video Input (Webcam) β β
β ββββββββββββββββ¬βββββββββββββββββ β
β β β
β ββββββββββββββββΌβββββββββββββββββ β
β β Face Detection (MediaPipe) β β
β ββββββββββββββββ¬βββββββββββββββββ β
β β β
β ββββββββββββββββΌβββββββββββββββββ β
β β Servo Control Algorithm β β
β ββββββββββββββββ¬βββββββββββββββββ β
β β β
βββββββββββββββββββΌβββββββββββββββββββββ
β Serial @ 115200 baud
ββββββββββΌββββββββββ
β ESP32-C3 β
ββββββββββββββββββββ€
β Servo Driver β
β (PWM Generator) β
ββββββββββ¬ββββββββββ
β
ββββββββββ΄βββββββββββ
β β
ββββΌβββ ββββΌβββ
β Pan β βTilt β
βServoβ βServoβ
βββββββ βββββββ
For detailed progress and technical documentation, see:
- GitHub Wiki - Weekly progress and technical details
- Desktop App README
- Firmware README
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request