Can a Drone Keep a Map True? Week 1: Teaching It to See Cars
After the "Decisions you can check" workshop in London this month, I kept coming back to one weak spot in all my spatial decision demos. They decide once, on one snapshot of the map. Real maps get old. A street that the catalog says is open has a delivery truck parked across it, and nobody knows until somebody looks. So I started a new project with one question: can a drone keep a map true?
The interesting part is not "fly over everything and look". That is easy and expensive. The interesting part is to fly only where a look can change a decision. The source is on GitHub: mraad/map-keeper, and the simulator is mraad/drone-sim. This post covers week 1 of five: before the drone can be clever about where to look, it must see.
The problem
A map catalog keeps one record for each street segment. A segment is one street between two intersections. The record says that the segment is open or blocked, and it has an age. In this project, the decision that the catalog serves is a route from A to B. A wrong record matters only when it changes that route. A blocked side street that no route uses costs nothing.
The plan for the next weeks is to compare two drones on the same streets, with the same flight budget:
- A lawnmower drone that flies a fixed back-and-forth pattern over all segments.
- A decision-aware drone that picks the next segment by expected decision value per flight metre, and stops when no look can change the route.
The scoring is in seconds: route time, plus flight time, plus a penalty for each blocked segment the route enters. But none of that works if the drone cannot tell a blocked street from an open one. So week 1 had one job: build the sensor and test it honestly.
A simulator with exact truth
I used my own drone simulator, drone-sim. It is a three.js page with a FastAPI and FastMCP backend, so a script (or an agent) can fly the drone through MCP tools such as goto. For this project I added three tools: place_object puts a glTF model on the ground, remove_object takes it away, and capture_frame returns one camera frame plus the metadata to map pixels to metres.
The scene is Île de la Cité in Paris, built from the IGN BD ORTHO aerial photo at 20 cm per pixel (open licence), with OpenStreetMap streets on top. Because the simulator places every vehicle, I know exactly where each one is. No labelling, no argument about the ground truth. That is the main reason to do this in a simulator.
The capture script samples sites on the OSM streets with a fixed seed, puts three vehicles along the street at each site, and flies the drone over each site at 30, 45, 60 and 90 m. At every height it takes one frame without the vehicles and one with them.
Rules first, then the score
As in my earlier self-improvement experiments, I wrote the pass/fail rules down before any frame was scored. I call this a gate. The gate passes if the detector finds 80% or more of the planted vehicles at the lowest height where one pass covers a whole street. A vehicle counts as found when a vehicle-class box has its centre within half a car length of the true centre, measured on the ground:
u = W/2 + (x_vehicle - x_drone) / ground_m_per_px
v = H/2 + (z_vehicle - z_drone) / ground_m_per_px
Each gate has two parts. A selection phase on 12 sites picks the best of the four vehicle models. The gate phase then tests only that model on 20 new sites, with 60 vehicles. Choosing the model and testing it on the same sites would inflate the score.
Gate 1: COCO YOLO calls my trucks kites
The first detector was Ultralytics YOLO26m with the standard COCO weights, the same detector I use in my yolo-kalman tracker. It failed, and not a little.
Now the best part of the failure: the detector found the objects. In the frame above, the box centre on the middle truck is 2 pixels from the true centre. It only had the wrong name for them, because COCO learned cars from photos taken at street level, not from straight above. Best recall was 13 of 60 (0.22), and 0 of 60 at 30 m.
Gate 2: weights trained on aerial images
So I ran one more registered gate, with new sites, using Ultralytics' oriented-box weights trained on DOTA. DOTA is a dataset of aerial images with classes such as "small vehicle" and "large vehicle". Same rules, same matching, new seeds.
| Height | Recall (60 vehicles) | 95% interval | False vehicles per empty frame |
|---|---|---|---|
| 30 m | 22/60 = 0.37 | 0.26 – 0.49 | 0.80 |
| 45 m | 57/60 = 0.95 | 0.86 – 0.98 | 0.50 |
| 60 m | 59/60 = 0.98 | 0.91 – 1.00 | 0.55 |
| 90 m | 59/60 = 0.98 | 0.91 – 1.00 | 0.40 |
Gate 2 passes at 45 m, and the low end of the interval (0.86) is still above 0.8. Interesting detail: 30 m is too low. Seen that close, the car is bigger than most vehicles in the DOTA images.
The false positives have a nice story too. On frames with no planted vehicle, the detector reports about one vehicle every two frames at 45 m. Look at where they are:
They are real Paris cars, painted into the aerial photo on the day IGN flew over. The simulator's truth does not know them, so they count against the detector. For the route decision this is the effect that matters anyway: a false "blocked" report. So that rate goes into the next phase as is.
What this does and does not show
- The pass holds for one realistic model. The low-poly trucks were found once in 81 tries.
- It came on the second attempt, on one scene. I treat 0.95 as an upper estimate, and the main evaluation will sweep lower recall values.
- The vehicles are sharp 3D models on a blurred ground (the ground texture shows at about 0.28 m per pixel). Real drone video does not look like this.
- The streets are real. The blocks are simulated. Nothing here is a claim about real traffic.
Both gates, the failed one and the passing one, are in the repository with their rules, raw detections and summaries. A test re-scores the saved detections and must reproduce the published numbers byte for byte.
Next
Week 1 fixed the sensor: fly at 45 m, use the DOTA weights, plant the realistic car, and model the detector as 95% recall with 0.5 false vehicles per frame. Next comes the interesting part:
- A small street network on the island: 40 segments or fewer, 12 of them uncertain, one A-to-B route.
- A catalog whose records age, where the chance that a record is still true decays with a half-life.
- The decision-aware drone against the lawnmower and three other baselines, on 1,000 paired seeds, with the rules registered first.
The full documentation, with every command, is in the repository at docs/index.html. More to come.
Comments