Slide text
Drone range from one moving camera
Perseus Defense take-home assignment · ~1 week
Soham Kundu
Tuesday, November 24, 2026
1
Slide text
ROADMAP
What this presentation covers
Problem, approach and assumptions
Detector: training and validation
The EKF and its math
Geometry
Results (simulation only)
What failed, and what I would do next
2
Slide text
PART 1 · PROBLEM AND APPROACH
Why not just measure the distance?
Stereo camera
The two views barely differ
Tiny gap between cameras on a small platform
Depth camera
Built for indoors
Short range, washed out by sunlight
LiDAR
Too heavy and sparse
Too compute heavy, and not many points would land on the drones
3
Slide text
PART 1 · PROBLEM AND APPROACH
One camera
What we get
Cheap and light
Sunlight is fine
Works at any range the detector can see
Trade off
No direct distance measurement
Distance has to be worked out from the drone's size and the camera's motion
4
Slide text
PART 1 · PROBLEM AND APPROACH
Scale ambiguity
Z = fx × S ÷ w
w: box width in pixels, measured
fx: given from the camera
S: drone size, GUESSED ~0.35 m
Z: Depth
5
Slide text
PART 1 · PROBLEM AND APPROACH
Tracking another drone with one camera
My drone has one gimbal camera on the other drone, plus GPS/INS. One camera only gives a direction, so it sweeps side to side to triangulate range.
Where is it?
3D position
How fast is it moving?
3D velocity
How far away is it?
Range, with an uncertainty
6
Slide text
PART 1 · PROBLEM AND APPROACH
Inspiration
The paper, IEEE T-RO 2023
Goal: one drone follows another using one camera and only the direction to it.
Problem: direction alone can't give range unless the follower maneuvers.
Idea: move across the line of sight. Their best path is a circle or ellipse around the target, flown as a helix.
Tested: 30+ real flights on two quadrotors, with GPS-derived directions, not a camera detector.
What I take from it, and what I add
I take the sweep. I add box width, a size prior, an EKF, a measured detector, and range error by distance.
"Three-Dimensional Bearing-Only Target Following via Observability-Enhanced Helical Guidance," IEEE T-RO 39(2), 2023. Li Ning He Lee Zhao
7
Slide text
PART 1 · PROBLEM AND APPROACH
End to end pipeline
Camera frame
1920×1080 from a moving platform
YOLO26s detector
box center (u, v) and width w
13-state iterated EKF
drone-pos(3) velocity(3) size(1)
GPS/INS errors: (3) pos, (3) attitude
Output
3D position, velocity, range ± σ
GPS/INS camera pose
simulated, with slow drift
8
Slide text
PART 1 · PROBLEM AND APPROACH
Assumptions
My drone knows where it is (GPS/INS). Its position and angle drift slowly (1.5 m, 0.5°), plus jitter. I chose these values. No lens distortion or timing errors.
My drone sweeps side to side in one area. The sweep gives range. Positions are measured from the centre of the sweep, (0, 0).
The other drone is a typical quadcopter. The filter starts from that guess and corrects it with parallax. Width ignores which way it faces.
The other drone can move. The filter assumes steady velocity. I test six behaviors, from steady flight to a sidestep (jink), which breaks it.
An onboard tracker keeps the gimbal on the other drone. A tracking model with memory over time, like SAM 2, runs on my drone and steers the camera. In the sim the gimbal just points at the true position. The tracker, gimbal error, lag and a fixed camera are not tested.
One target, no clutter, 10 to 200 m. No false drones reach the filter.
Daylight and good lighting. No night, fog, rain or glare. The detector and the simulated noise are not tested outside that.
9
Slide text
PART 2 · DETECTOR
Train, validation, test
Train
The images the model learns from. Its weights get updated on these.
Validation
Checked while it trains, never used to update the weights. Used to pick the best epoch (92).
Test
Final score, never used for training or for picking the epoch.
10
Slide text
PART 2 · DETECTOR
Datasets and splits
Dataset
Train (58% drones)
Validation
images · boxes
Test
images · boxes
DUT Anti-UAVDrone photos, mostly 1920×1080, mostly against sky
5,200 drones
2,600 · 2,620 drones
2,200 · 2,245 drones
COCOEveryday-object dataset; only bird and airplane images
1,253 bird
906 airplane
604 · 673 birds, 505 airplanes
209 · 233 birds, 143 airplanes
Open Images V7Google's labeled images; helicopter, bird, airplane
747 bird · 894 airplane
1,200 helicopter
1,112 · 824 birds, 611 airplanes, 134 helicopters
1,325 · 783 birds, 592 airplanes, 391 helicopters
Det-FlyDrones filmed from another drone, 4K
1,808 drones
(sequence 010, early part)
377 · 377 drones
1,590 · 1,590 (010, end part)
6,912 · 6,911 (020)
Total
12,008 images
(58% drone)
4,693 images
3,734 images + 8,502 Det-Fly
11
Slide text
PART 2 · DETECTOR
Model size: nano vs small vs medium
Size
Params
GFLOPs
Latency (RTX 3080)
Overall mAP50–95
old → new
Drone recall, all test
old → new
Drone precision, all test
old → new
nano
2.5 M
23
4.5 ms
0.646 → 0.645
0.593 → 0.755
0.784 → 0.903
small
10.0 M
86
5.3 ms
0.660 → 0.662
0.586 → 0.773
0.831 → 0.916
medium
21.8 M
275
8.8 ms
0.652 → 0.663
0.612 → 0.790
0.872 → 0.929
old = trained on DUT + negatives only. No Det-Fly.
new = same, plus 1,808 Det-Fly frames mixed in with the DUT data, because the old model's Det-Fly recall was bad.
12
Slide text
PART 2 · DETECTOR
Drone data
DUT Anti-UAV (test)
A small drone against sky, trees and buildings.
Det-Fly (example frame)
A drone seen from above over farmland. Miss before retraining
13
Slide text
PART 2 · DETECTOR
Det-Fly: the failure, then the retrain
Still missed after retraining: tiny drone, Det-Fly 020
Still missed after retraining: dusk, Det-Fly 020
R 0.44 → 0.71
Det-Fly 020, old → retrained
mAP50 0.50 → 0.75
14
Slide text
PART 2 · DETECTOR
What the detector sees
Small
Medium
Large
Selected good detections from the DUT Anti-UAV test set, not a random sample.
15
Slide text
PART 2 · DETECTOR
The negatives: birds, airplanes, helicopters
COCO (test)
COCO (test)
Open Images V7 (test)
16
Slide text
PART 2 · DETECTOR
Training: YOLO26s at 1280 px
Setting
Value
Model
YOLO26s, 4 classes
Image size
1280
Batch
8
Gradient accumulation
Weights update once per 64 images (every 8 batches)
Time budget
7 hours
Early stopping
patience 30
Data
DUT + negatives + 1,808 Det-Fly frames
Outcome
106 epochs, best epoch 92, 7.0 h (hit the time cap)
17
Slide text
PART 2 · DETECTOR
Training settings: all Ultralytics defaults
Setting
Value
Optimizer
MuSGD (auto-picked), weight decay 0.0005
Learning rate
0.01, linear decay, 3-epoch warmup
Augmentation
mosaic, flip 0.5, scale 0.5, color jitter, RandAugment
Start from
COCO-pretrained YOLO26s weights
Precision
mixed precision (AMP)
Class head
swapped from 80 COCO classes to my 4 (bird and airplane rows copied over)
18
Slide text
PART 2 · DETECTOR
Augmentation: mosaic
What it does
Each training sample is 4 images stitched into a 2×2 grid, randomly scaled and cropped. The boxes come along. Ultralytics default, used on every image. Batch 8 means 8 mosaics (about 32 source images).
Why it helps
Objects at many scales and positions
Many backgrounds in one image
Harder to overfit
Tradeoff
Each image shrinks to about a quarter of the frame and is sometimes cropped.
19
Slide text
PART 2 · DETECTOR
Training curves: where it stopped
20
Slide text
PART 2 · DETECTOR
Accuracy on held-out test sets
Test set, class
P
R
mAP50
DUT drone
0.985
0.973
0.980
Det-Fly
0.894
0.721
0.738
Negatives (bird, airplane, helicopter)
8 of 1,534 images get a false drone box (0.5%)
Retrained model. Test split (DUT, Det-Fly, COCO, Open Images), conf 0.25, IoU 0.5
21
Slide text
PART 3 · THE EKF
State: 13 numbers
p
Position (3)
other drone, local frame
v
Velocity (3)
other drone, local frame
S
Size (1)
other drone's width
b
GPS/INS drift (6)
my drone's position (3) and angle (3) error
22
Slide text
PART 3 · THE EKF
Pinhole Formulas
Real world → image
Image → real world (a direction only, no distance)
fx = fy = 2500 px
About a 42° horizontal field of view on a 1920×1080 camera.
From depth Z to range
Range = Z × the length of the ray, which is the same as
0.5° ≈ 22 px
Camera angle INS (attitude) error is far bigger than the ~1 px detector error.
23
Slide text
PART 3 · THE EKF
Range from size, and the size prior
Z = fx · S / w
w from detector (the box width in pixels)
S size prior (my guess of the drone's size)
fx focal length in pixels (known)
Size prior: S ~ N(0.35 m, 0.15²). Picked by judgment from typical drones
The cost of guessing: a size guess that is 20% off makes the depth 20% off.
Range error ≈ √(size error² + width error²)
Drone (manufacturer specs)
Largest, m
vs prior
DJI Avata 2
0.21
−0.9σ
Parrot ANAFI
0.24
−0.7σ
DJI Mavic 2 Pro
0.32
−0.2σ
DJI Air 3
0.33
−0.1σ
DJI Mavic 3 Classic
0.35
0.0σ
DJI Mini 4 Pro
0.37
+0.1σ
DJI Inspire 3 (diagonal)
0.70
+2.3σ
DJI Matrice 350 RTK
0.81
+3.1σ
24
Slide text
PART 3 · THE EKF
Two models: how it moves and what it sees
Motion model
How my guess changes between frames
Drone: keeps flying at a constant velocity
Size: does not change between frames, but my estimate of it improves as I see more
GPS/INS drift: grows slowly
Measurement model
What the image should show if my guess is right
Where the box should be: its center (u, v)
How wide it should be, as a log
Camera pose: the GPS/INS reading, with my estimate of its drift taken off
25
Slide text
PART 3 · THE EKF
Predict and update, step by step
Predict
Innovation
Kalman gain
Update
Iterated
Q, how much the drone can change
q = 0.1 A setting I chose. It lets the drone's speed drift about 0.3 m/s in 1 s.
R, how much I trust the detector
A setting I chose, like q. I assumed about 1 px of error in the box centre and 5–9% in its width.
EKF- guess where the drone is, check the guess against what the camera sees, then fix the guess by how much you trust each one. Repeat every frame.
26
Slide text
PART 3 · THE EKF
Detector box to EKF, and where H fits
Each frame, in simulation
1
Work out the perfect box from the true drone and camera: center (u, v) and width w.
2
Add fake detector error, based on how wrong the real detector is at that box size. Sometimes drop the detection.
3
Take the log of the width, so a 10% error counts the same on a big box and a small one.
4
Hand the EKF z = [u, v, log w]. It never sees an image or the truth.
Where the Jacobian(H) comes in
The detector gives 3 numbers, my guess has 13. H, the Jacobian, is the exchange rate between meters in my guess and pixels in the image, so it tells me how much to change each one.
Example: box is 25 px off
≈ 1 m
at 100 m depth
≈ 2 m
at 200 m depth
27
Slide text
PART 4 · GEOMETRY
Why my drone sweeps side to side
Parallax gives distance
Move sideways and near things shift more than far ones.
Move 4 m: a drone at 100 m shifts 100 px, at 200 m only 50 px.
But the other drone moves too
Part of the shift is its own motion.
At constant velocity, twice as far and twice as fast looks the same, so range stays stuck at the size guess.
So my drone has to accelerate
A drone at steady velocity cannot copy my curve.
Only the true range explains the shift. Range plus box width then fixes the size guess.
Related work: Li et al., IEEE T-RO 2023. I add box width and a size prior.
28
Slide text
PART 4 · GEOMETRY
Experiment design
My drone: sweep
Side to side in one area: ±15 m, 12 s per cycle, peak 4.1 m/s²
Widths tested: ±5, ±10, ±15, ±30 m
Control: hover
Same drone, not moving. It should fail: no parallax
Shows the sweep is what gives range
Five variants of size (each run on all six behaviors)
True size drawn each run from 0.35 ± 0.15 m: bearing only (box width not used) · broad prior (guess 0.35 ± 0.15 m)
True size drawn each run from 0.35 ± 0.03 m: tight prior (guess 0.35 ± 0.03 m)
True size fixed at 0.60 m, guess wrong: wrong prior (guess 0.35 ± 0.15 m) · wrong and tight (guess 0.35 ± 0.03 m)
8,000 runs
40 configurations × 200 seeded Monte Carlo runs. Simulation only
29
Slide text
PART 4 · GEOMETRY
Six behaviors for the other drone
30
Slide text
PART 5 · RESULTS
Judging range error
RMSE
How big is the typical range error, as a % of the true range?
2σ coverage
Does the filter know how wrong its range is? How often the true range lands inside the ±2σ band it claims. Ideal: 95%.
31
Slide text
PART 5 · RESULTS
Every size variant on every behavior
32
Slide text
PART 5 · RESULTS
Claimed versus actual range error
Top: the guess is right on average
Shaded band = what the filter claims. Dashed = what actually happened. Dashed is wider, so overconfident. 2σ coverage 77.8% (ideal 95%).
Bottom: the size guess is wrong
True size 0.60 m in every run. Errors sit below the band for about 20 s. Confident and wrong. Coverage 40.5%.
33
Slide text
PART 5 · RESULTS
Measuring detector mistakes in sim
34
Slide text
PART 5 · RESULTS
Accuracy falls with range
35
Slide text
PART 5 · RESULTS
How wide does the sweep need to be?
36
Slide text
PART 6 · LIMITATIONS
What failed
The other drone sidesteps
Jink: 47% RMS error. The filter claims ±4%, coverage 5%.
Wrong size prior
Drone is 0.60 m, not 0.35 m. Range ends about 8% short while the filter claims ±3%. Coverage 41%.
Overconfident everywhere
Dash, crossing, turn, orbit: 9 to 19% error but only 50 to 76% coverage.
Detector
Det-Fly recall 0.72, same site.
37
Slide text
PART 6 · LIMITATIONS
What I would do next
1
Test range on real flights, with a real camera on a real drone.
2
Measure real GPS/INS, gimbal error, detector error, and use it to set q and R better (look into adaptive and robust EKFs). The drift values here are my choice and the gimbal is ideal.
3
Handle a drone that sidesteps. The jink gives 47% error, and a higher process noise does not fix it.
4
Train and test the detector on data from a different site.
5
Let the other drone be anywhere. A first test on random paths: 27% error, coverage 21%. Steady velocity breaks when it keeps accelerating.
6
Account for the other drone's orientation. It looks different from the side, the front and above, so its box width changes with the angle it faces.
38
Slide text
Questions
39