DS.
A-Level project · Completed

DroneVision.

Using Python and computer vision to control a Tello drone with keyboard input and facial tracking.

PythonOpenCVNumPyPygamedjitellopy
View the code on GitHub ↗DroneVision demonstration video thumbnailWatch the drone demonstration ↗
About the project

Teaching a drone to follow a face

DroneVision was my A-Level Computer Science project. I worked with a DJI/Ryze Tello drone and wrote Python programs to control its movement and use its camera feed for face tracking.

I liked the challenge of getting hardware, live video and code to work together, especially when a small change in the program produced a visible change in how the drone moved.

How I built it

Keyboard controls

I started by sending commands to the drone from the keyboard, including movement and emergency landing.

Live camera feed

I used the drone's camera feed and OpenCV to process video in real time.

Face tracking

I developed a separate script that detects a face in the camera image and adjusts drone movement to keep the face centred and at a useful distance.

The keyboard-control and face-tracking programs worked as separate scripts. I didn't finish the planned graphical interface or the toggle between control modes.
Development videos

From the first tests to face tracking

These videos are from my original A-Level project report. They show the different stages of development, including early tests and the final face-tracking script.

Getting the drone working

First drone movements video thumbnailWatch ↗

First drone movements

Testing basic movement commands with the Tello drone.

Camera feed and image capture video thumbnailWatch ↗

Camera feed and image capture

Getting images from the drone's camera and displaying the feed.

Keyboard input module video thumbnailWatch ↗

Keyboard input module

Testing the key-press module before connecting it to drone movement.

Keyboard-controlled flight video thumbnailWatch ↗

Keyboard-controlled flight

Using keyboard input to fly the drone, with commentary.

Keyboard control with camera video thumbnailWatch ↗

Keyboard control with camera

Combining manual controls, live camera feed and image capture.

Building face tracking

First face-tracking test video thumbnailWatch ↗

First face-tracking test

Testing the face-tracking approach with a desktop webcam.

Face detection with a rectangle video thumbnailWatch ↗

Face detection with a rectangle

Testing detection with a box drawn around the face, including glasses.

Tracking face position video thumbnailWatch ↗

Tracking face position

Showing the face centre point as I move around.

Explaining the detection code video thumbnailWatch ↗

Explaining the detection code

Walking through how the face-detection function works.

Working facial-tracking mode video thumbnailWatch ↗

Working facial-tracking mode

Testing and explaining the final face-tracking script with the drone.

Reflection

What I learned

This project gave me hands-on experience with computer vision, testing, debugging and communicating with real hardware. It also taught me to be realistic about scope: the individual control modes worked, but the complete integrated interface was not finished.

My original A-Level report estimated command response times of approximately 0.1–0.2 seconds and around 85% face-detection accuracy during my own tests. These were informal project measurements, not independently verified benchmarks.