Metadata-Version: 2.4
Name: turrett
Version: 1.0.0
Summary: AI-powered turret control system with face tracking, eye gaze detection, and YOLO object tracking
License: MIT
Project-URL: Homepage, https://github.com/sakul7-stack/Turrett
Project-URL: Repository, https://github.com/sakul7-stack/Turrett
Project-URL: Issues, https://github.com/sakul7-stack/Turrett/issues
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: opencv-python
Requires-Dist: numpy
Requires-Dist: pyserial
Requires-Dist: dlib
Requires-Dist: ultralytics
Requires-Dist: pyyaml

# Tracking Turret

A **2-axis tracking turret** that uses computer vision (OpenCV/YOLO) to follow faces, objects, eye-gaze, or mouse cursor in real-time via Arduino servo motors.

<p align="center">
  <img src="images/demo.gif" alt="Turret Demo">
</p>

## Implementation

- **Face Tracking**: Uses OpenCV and Haar cascades to detect and track faces.
- **Eye-Gaze Tracking**: Follows the direction of the eye-gaze.
- **Object Tracking**: Can track any colored or defined object in the camera frame.
- **Mouse Control**: Follows mouse movement on screen.
- **Jersey Tracking**: Custom-trained YOLOv8 model to track a specific college jersey.

## Hardware

- Pan-Tilt Turret with **two servo motors**
- Arduino board (Uno, Nano, or similar)
- USB/Serial connection to the controlling PC
- Camera

![Circuit Diagram](images/circuit.png)

## How It Works

1. The camera captures frames in real-time.
2. OpenCV detects faces, objects, or eye-gaze direction.
3. Errors between the target and the center of the frame are calculated.
4. Python sends commands over serial to Arduino.
5. Arduino moves the pan-tilt servos according to the commands.

