
Discover why Python fuels drone programming for face recognition and tracking, and explore real world uses from light shows to delivery, rescue, and autopilot-enabled remote operation.
Prepare a Tello or Tello Edu drone, a Wi-Fi enabled PC, and a compatible smartphone; extras include extra batteries and a charging hub for coding with Python and face recognition.
Learn drone programming with Python while mastering safety guidelines and FAA regulations for recreational and business use, including airspace, registration, and staying clear of airports, crowds, and emergencies.
Assess your python basics and acquire essential web framework, rest, JavaScript, sockets, IP addresses, and UDP knowledge; set up your environment and connect devices over Wi-Fi.
Learn to operate a Tello drone using the Tello or Tello edu app, connect via Wi-Fi, take off, fly with cross keys, adjust speed, land, and build block-based flight sequence.
Navigate a block programming training station to command your drone: take off, fly forward, avoid obstacles, rise, and rotate while completing bomb drop and gun firing steps.
Learn to program drone motion using Scratch by building level-based paths with takeoffs, landings, and obstacle avoidance, using functions and zigzag patterns to reach goals and earn three stars.
Set up Mac for Python development by installing Xcode, Homebrew, Python 3.7.2, and a Python IDE; configure the interpreter, create a project, and run a test script.
Set up a Python development environment on Windows using PyCharm or Visual Studio Code, install Python 3.7.2, configure the interpreter, create a drone project, and run and debug scripts.
Install OpenCV library on mac using brew and pip to enable face recognition for drone tracking. Verify the installation by launching Python, importing cv2, and confirming no errors before proceeding.
Install the OpenCV library on Windows to enable face recognition for drone tracking with Python, and verify by importing cv2 while installing FFmpeg for video capture.
Learn to use OpenCV with Python for object detection, face and eye detection via Haar cascades, alongside grayscale processing and deploying XML cascade files with sample code.
Develop a Python image-based face recognition workflow using OpenCV to detect faces with Haar cascades, draw blue rectangles around faces and green around eyes, and display results.
Learn to perform face and eye recognition from a live camera stream using OpenCV, capturing frames, displaying rectangles around faces, and quitting with q.
Access the Tello SDK 2.0 user guide, understand UDP commands and ports, and review sample Python codes and video streaming options for drone control.
Connect Tello drone to your laptop via UDP, using port 8889 for commands and 11111 for video, then control takeoff and landing with a Python drone manager for face recognition.
Learn to receive drone responses by implementing a threaded receive loop, logging outcomes, and handling socket errors while sending takeoff and land commands from a laptop.
Learn to command a Python-controlled drone using a move method with directions (up, down, left, right, forward, backward) and distances in centimeters, including takeoff, hover, and landing.
Set and adjust drone speed with the speed command, starting from a default of 10 centimeters per second indoors. Outdoors, test 100 centimeters per second to observe noticeable differences.
Learn to rotate a drone clockwise and counterclockwise by defined degrees, set a default of 10 degrees and 90-degree commands, and safely test takeoff, hover, rotation, flips, and landing.
Learn to control the drone with the SDK flip command, performing front, back, left, and right flips; observe a takeoff, sequential flips, and landing.
Program the drone to patrol via a status-driven loop guarded by a semaphore and threading events, moving up, rotating 90 degrees, and descending with logging and stop handling.
Create a flask-based web server to stream the drone camera, organize the project into controllers, models, templates, and static folders, and install required packages via a requirements file.
Create a config.py to route data to files, logs, templates, and static folders using os and flask. Launch the Flask server from the main script with the app object.
Set up a Flask server for the drone project by configuring logging, creating the app object from config, and defining a hello world route, run with host, port, and threading.
Learn front-end development with jQuery and jQuery mobile to create mobile-friendly interfaces, featuring drag-and-drop, date picker, and responsive UI components.
Create the index page for the drone app using Flask templates and static files, and implement a mobile-friendly front end with jQuery mobile, header, content, and a controller link.
Extend the base layout to create a controller page by using layout.html and block content, copy and adapt index.html into controller.html, and test navigation to the remote controller page.
Set up a flask back end to receive post requests at api/command and log commands. Create JavaScript front end that sends takeoff and land commands and confirms a 200 response.
Add command buttons to the drone controller and use copy-pasted code to send up, down, left, right, forward, backward, and rotate commands, with a speed slider to adjust flight.
Master the singleton design pattern to ensure the drone manager is created once and reused for all requests, linking commands to a single drone manager in Python.
Connect the web interface to the drone by configuring the singleton drone manager and get_drone, then test take off, land, speed, and movement commands via the front end.
Stream the drone camera to a webcam by piping ffmpeg over UDP port 1111, decoding the video, and displaying it through pipe 1, with frame size adjustments for performance.
Stream decoded drone video to a webcam by converting frames to jpeg and serving them via Flask multipart streaming for real-time viewing on the front end.
Build a face recognition feature for the drone by loading a cascade model, enabling face detection, and drawing blue rectangles around detected faces while issuing enable and stop track commands.
Detect faces, compute the face center and its gap to the frame center, then steer the drone with x, y, z to keep the face centered and monitor occupancy rate.
Create and manage drone snapshots from the camera by configuring a snapshot workflow: set up directories, enable face-detect snapshots, save time-stamped JPEGs, and integrate with front-end controls.
Control a drone with phone shakes to navigate a Mario Kart-style course, race against others, and learn the required network setup: wifi, router, and IP configurations.
Create a reusable drone course framework by building a base course class with singleton courses A and B, implementing start, stop, and timed run logic for takeoff, flips, and turns.
Define the get courses flow, import drone app models, and render a shake game page with radio-button course choices to let users select a course.
Connect the front end to back end using API endpoints to start the drone course, monitor status updates, and orchestrate takeoff, rotations, and landing.
Learn to receive a shake event from your smartphone and send it to the back end using shake.js, a post request, and a JSON response for drone programming workflows.
Control a drone using a smartphone shake gesture via a local API and Wi-Fi network, linking the phone, computer, and drone through a router for real-time flight commands.
Update the drone project by refining the front end with jquery or react and improving error handling. Tune face detect and tracking, validate tello sdk commands, enforce pep8 and flake8.
As you may know, robot technology is now very advanced. As an engineer working in one of the top IT companies in Silicon Valley for over 12 years, I feel that the trend to replace humans with robots will continue for quite a long time
In this course, we will be going to learn the following, using a toy drone that can fly indoors.
-Drone operation using Python
-Face recognition with OpenCV using the drone camera
-Web framework and web camera
-Automatic tracking
-Drone flight game (shake your smartphone)
Starting off with a toy drone will be a great way to start off your robot programming experience while you get used to Python. This is also an easy and fun way for your children to start coding. Now, let's get started with drone programming and be ahead of the robot technology trend!