{"id":50664477,"url":"https://github.com/allureking/follow-me-drone","last_synced_at":"2026-06-08T05:02:53.616Z","repository":{"id":340788560,"uuid":"1167440707","full_name":"allureking/follow-me-drone","owner":"allureking","description":"Autonomous follow-me selfie drone with face tracking and gesture control","archived":false,"fork":false,"pushed_at":"2026-02-26T13:43:59.000Z","size":2793,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-26T20:00:56.200Z","etag":null,"topics":["computer-vision","dji-tello","drone","face-tracking","gesture-recognition","imu","opencv","pid-controller","python","robotics"],"latest_commit_sha":null,"homepage":"https://kingke.dev","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/allureking.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-26T09:47:45.000Z","updated_at":"2026-02-26T14:22:29.000Z","dependencies_parsed_at":"2026-02-26T20:01:14.379Z","dependency_job_id":null,"html_url":"https://github.com/allureking/follow-me-drone","commit_stats":null,"previous_names":["allureking/follow-me-drone"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/allureking/follow-me-drone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allureking%2Ffollow-me-drone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allureking%2Ffollow-me-drone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allureking%2Ffollow-me-drone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allureking%2Ffollow-me-drone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/allureking","download_url":"https://codeload.github.com/allureking/follow-me-drone/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allureking%2Ffollow-me-drone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34048681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","dji-tello","drone","face-tracking","gesture-recognition","imu","opencv","pid-controller","python","robotics"],"created_at":"2026-06-08T05:02:52.317Z","updated_at":"2026-06-08T05:02:53.610Z","avatar_url":"https://github.com/allureking.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Follow-Me Drone\n\nAutonomous follow-me selfie drone system with real-time face tracking and gesture control, built for the DJI Tello.\n\nDesigned for solo athletes and content creators who need hands-free recording during activities like mountain biking, kayaking, or other sports where both hands are occupied.\n\n## Features\n\n- **Real-time face tracking** with PID-controlled 3-axis movement (yaw, vertical, forward/backward)\n- **Gesture commands** via IMU snap detection for hands-free control\n  - Single snap: trigger circular panoramic video recording\n  - Double snap: capture a still photo\n- **Lost-face recovery** -- automatically rotates to search when the subject moves out of frame\n- **Indoor safety** -- configurable height limit to prevent ceiling collisions\n- **Modular architecture** -- cleanly separated modules for detection, control, gestures, and IPC\n\n## Hardware Requirements\n\n| Component | Purpose |\n|-----------|---------|\n| DJI Tello Drone | Flight platform with camera |\n| Teensy 4.1 Microcontroller | Sensor data acquisition via USB serial |\n| 2x MPU6050 IMU Sensors | Acceleration-based snap gesture detection |\n\n## Software Requirements\n\n- Python 3.9+\n- WiFi connection to DJI Tello\n- USB connection to Teensy 4.1\n\n## Installation\n\n```bash\ngit clone https://github.com/allureking/follow-me-drone.git\ncd follow-me-drone\npip install -r requirements.txt\n```\n\n## Usage\n\nRun two scripts in separate terminals:\n\n**Terminal 1** -- Start gesture recognition (reads IMU sensor data):\n```bash\npython scripts/run_gesture.py\n```\n\n**Terminal 2** -- Start face tracking and drone control:\n```bash\npython scripts/run_tracker.py\n```\n\n### CLI Options\n\n| Flag | Description |\n|------|-------------|\n| `--config PATH` | Custom YAML config file (default: `config/default.yaml`) |\n| `--debug` | Enable verbose debug logging |\n\nPress `q` in the video window to land and exit.\n\n## Configuration\n\nAll parameters are centralized in [`config/default.yaml`](config/default.yaml), including:\n- PID controller gains\n- Face detection thresholds\n- Drone speed limits and safety parameters\n- Serial port settings\n- Circle motion recording parameters\n\n## Project Structure\n\n```\nfollow-me-drone/\n├── config/\n│   └── default.yaml              # All configurable parameters\n├── models/\n│   └── haarcascade_frontalface_default.xml\n├── followme/\n│   ├── __init__.py\n│   ├── config.py                 # Typed dataclasses + YAML loader\n│   ├── pid.py                    # Generic PID controller\n│   ├── face_detector.py          # Haar Cascade face detection\n│   ├── drone_controller.py       # Drone connection, tracking, recording\n│   ├── gesture.py                # Snap detection + serial IMU reader\n│   ├── ipc.py                    # Atomic file-based command channel\n│   ├── commands.py               # Command enum definitions\n│   └── utils.py                  # Logging and signal handling\n├── scripts/\n│   ├── run_tracker.py            # Face tracking entry point\n│   └── run_gesture.py            # Gesture recognition entry point\n└── docs/\n    └── architecture.md           # System architecture documentation\n```\n\n## How It Works\n\n1. **Face Detection**: Each video frame is processed by a Haar Cascade classifier to locate the largest face, returning its center coordinates and bounding box area.\n\n2. **PID Tracking**: Two PID controllers compute yaw (horizontal rotation) and vertical speed to center the face at the target position. Forward/backward movement is controlled by maintaining the face within a target area range.\n\n3. **Gesture Recognition**: A separate process reads dual IMU sensors via serial. When the acceleration difference between sensors exceeds a threshold, a \"snap\" is detected. Consecutive snaps within a time window form a gesture command.\n\n4. **Inter-Process Communication**: Gesture commands are written atomically to a pickle cache file, which the tracking controller polls for new entries.\n\n## Acknowledgments\n\nBased on an EECS 206A (Introduction to Robotics) team project at UC Berkeley.\n\n## License\n\nMIT License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallureking%2Ffollow-me-drone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallureking%2Ffollow-me-drone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallureking%2Ffollow-me-drone/lists"}