πŸ€– LateAI
Home β€Ί Tutorials β€Ί Drone Face Tracking
🚁

Drone Face Tracking

Intermediate Β· 1-2 days
πŸ“Ά Intermediate ⏱ 1-2 days πŸ’° β‰ˆ $200 (including the drone) 🏷 CV Zone

πŸ“Œ Overview

Teach a drone to follow a face: the camera detects where the face sits in the frame, that offset is converted into movement commands, and the commands go to the drone over UDP - wherever the face goes, the drone follows.

It is usually built on the Tello educational drone (an open SDK), combining face detection, PID control, and network communication - an advanced project in human-machine interaction.

🧰 What you need

πŸ”§ Step by step

1

Get to know the drone SDK

The Tello talks over UDP commands (take off, move, rotate)

Start by taking off and landing from SDK commands to verify the link

2

Face detection

Detect faces in real time from the camera (the drone's FPV feed works)

Get the face centre coordinates and the offset from the frame centre

3

Compute the control values

Horizontal offset becomes a left/right speed

Change in face size becomes forward/back movement (to hold distance)

4

Send the UDP commands

Encode the control values into Tello movement commands

Mind the command rate and the response latency

5

PID tuning

Run the offset through a PID loop for a smooth output

Too much gain and the drone oscillates; too little and it lags behind the target

6

Test safely

Start low and slow

Add a failsafe: hover or land when detection fails for longer than a threshold

πŸ’‘ Tips

View original β†— ← Back to LateAI home