On this blog, dronelab.dev, I explore machine learning by teaching a drone to fly autonomously. I break things down into small steps and share my discoveries along the way.
Mark Pors 2025-06-11 Under the Hood: Training a Digit Classifier Note This notebook is a copy of chapter four of the fastai book Under the Hood: Training a Digit Classifier . I added and removed code and markdown here and there reflecting my own understanding of the topic. Not very interesting (aka boring) for 99+% of you, it is mostly for my own reference. My approach here is to work through the…
Mark Pors 2025-06-08 Fitting a function with gradient descent Note This notebook is a copy of How does a neural net really work? by Jeremy Howard as part of the Fast.ai course Practical Deep Learning for Coders . I added and removed code and markdown here and there reflecting my own understanding of the topic. Not very interesting (aka boring) for 99+% of you, it is mostly for my own reference. My…
Mark Pors 2025-05-25 TL;DR Getting reproducible PyTorch/Fast.ai training results requires more than just seeding random number generators. Reproducibility is affected by three factors: seeding RNGs, using deterministic algorithms, and recreating an identical starting state. Key insights : DataLoaders maintain internal state that persists between training runs. You must recreate DataLoaders before…
Mark Pors 2025-05-19 TL;DR Learn how to choose the best image classification models using updated data and tools. See how the popular “Which image models are best?” notebook was revived with new sources and recent models. Get links to interactive notebooks and a Gradio app for hands-on model comparison. In my attempts to create an image classifier , following the Fast.ai method as learned in…
Mark Pors 2025-05-15 TL;DR Learn how to build a simple image classifier to help a drone detect obstacles (like lamps) using fast.ai. See the real-world challenges of collecting and cleaning training data for image classification. Discover the impact of label noise, data imbalance, and augmentation on model performance. Get practical tips on improving results: manual data cleaning, trying different…
Mark Pors 2025-05-11 TL;DR Learn how to connect a physical GameSir T1d controller to a real Tello drone using Python and djitellopy, moving beyond simulation. See how to integrate live video streaming from the Tello into your Pygame app, including handling frames and displaying them in real time. Get practical code examples for replacing the simulator with a real drone interface, managing video…
Mark Pors 2025-05-07 TL;DR Learn how to simulate a Tello drone using Python and pygame—no real drone required See how to connect and control the simulator with a GameSir T1d controller Discover practical code architecture for drone control, easily swappable with a real Tello/TT Get insights into input smoothing, command mapping, and realistic flight physics Find out how simulation helps debug…
Mark Pors 2025-05-04 TL;DR Learn how to package and publish a Python library to PyPI using the modern uv toolchain. See how to wrap the GameSir T1d Bluetooth controller for use with Python and pygame. Discover how to scan for your controller, connect, and read inputs using a pygame-compatible API. Get practical, step-by-step instructions for project setup, dependency management, and testing.…
Mark Pors 2025-05-02 TL;DR Connect a GameSir T1d controller to your computer via Bluetooth using a BLE hacking approach (the controller normally only works with the Tello app) Parse controller input data for all buttons, joysticks, and triggers using Python and bleak Create a pygame-compatible wrapper that lets you use the controller in any Python application Control your Tello drone with precise…
Mark Pors 2025-04-27 TL;DR Learn how to control a Tello drone using keyboard navigation with responsive, event-based controls in Python (via pygame). Understand why velocity-based commands and fixed frame-rate updates create smoother, more natural drone movement. See how to stream live video from the drone, process frames, and overlay status info (like battery level). Get step-by-step instructions…
Mark Pors 2025-04-25 TL;DR Passed the EASA A1/A3 pilot exam, officially becoming a UAV (drone) pilot—childhood dream “fulfilled.” Created a web-based EASA exam practice app to prep for the test, available online for free. Shared app’s source code on GitHub for community use. Fulfilling a dream As a kid I always wanted to be a pilot (not true, it just makes for a more interesting story), and now I…
Mark Pors 2025-04-24 TL;DR Unboxed and crashed a DJI Tello drone — first due to a buggy phone app, then because of the infamous “ceiling effect.” Recommend using TelloFPV app and GameSir T1d controller for smoother manual flight experiences. Explained basic drone movements clearly (throttle, yaw, pitch, roll). Introduced DJI’s Python SDK for coding drone flight, setting the stage for further…
Mark Pors 2025-04-20 TL;DR Combined interests in hiking, coding, and new tech led to a drone project idea Goal: build an autonomous scouting drone for hiking adventures Started with no drone or computer vision experience Resisted the urge to over-invest at first (just bought the domain dronelab.dev) Chose the DJI RoboMaster TT as a beginner-friendly, programmable drone Next steps: experiment with…