AmiriHayes commited on
Commit
ef48de3
·
verified ·
1 Parent(s): 2371712

DS681 Assignment 3 "Drone Tracking" Submission

Browse files
README.md ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # UAV Drone Detection & Tracking
2
+ **CV Spring 2026 — Assignment 3**
3
+
4
+ ## Overview
5
+ This project implements a full drone detection and tracking pipeline on two UAV test videos.
6
+ Drones are detected frame-by-frame using a deep learning object detector, and their positions
7
+ are tracked across frames using a Kalman filter. The final output is an annotated video per
8
+ input showing the detector bounding box and a 2D trajectory polyline superimposed on the footage.
9
+
10
+ ## Dataset & Detector
11
+ Rather than fine-tuning from scratch, a pre-trained YOLOv8x model specifically trained on
12
+ drone imagery was sourced from HuggingFace (`doguilmak/Drone-Detection-YOLOv8x`). This model
13
+ was trained on a dedicated drone detection dataset and outputs a single class: `drone`.
14
+ This approach was chosen over fine-tuning a base COCO model because the base YOLOv8 weights
15
+ have no drone class — falling back to semantically incorrect labels like `kite` and `airplane`.
16
+ Inference was run at confidence threshold 0.25 and NMS IoU 0.45 across all frames at 5fps.
17
+
18
+ ## Kalman Filter Design
19
+ The tracker uses a 4D constant-velocity state vector `[cx, cy, vx, vy]` where `cx, cy` is
20
+ the bounding box center and `vx, vy` is estimated velocity. Measurements are the 2D center
21
+ `[cx, cy]` extracted from detector output each frame.
22
+
23
+ | Parameter | Value | Rationale |
24
+ |-----------|-------|-----------|
25
+ | Motion model | Constant velocity | Drones move smoothly between frames at 5fps |
26
+ | R (measurement noise) | 10 × I₂ | Moderate trust in detector output |
27
+ | Q (process noise) | 0.5 × I₄ | Allows gradual velocity changes |
28
+ | MAX_MISSED | 10 frames | ~2 seconds gap tolerance before track reset |
29
+
30
+ When the detector misses the drone, the filter predicts forward using the velocity estimate.
31
+ After 10 consecutive missed frames the track is dropped and re-initialized on the next detection.
32
+
33
+ ## Failure Cases
34
+ - **Fast motion:** At 5fps a fast-moving drone can shift significantly between frames, causing
35
+ the constant-velocity model to lag behind sharp direction changes.
36
+ - **Occlusion:** Short occlusions are handled by prediction-only coasting. Longer occlusions
37
+ exceed MAX_MISSED and cause a track reset.
38
+ - **Single-object assumption:** The pipeline takes the highest-confidence detection per frame.
39
+ Scenes with multiple drones would require multi-object tracking with Hungarian assignment.
40
+
41
+ ## Output Videos
42
+ - `drone_video_1_tracked.mp4`
43
+ - `drone_video_2_tracked.mp4`
drone_detections.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:50a47c793eac850a9cdab1f13d734d57d87d88de6b42b118b951a4cf1ab2c3cc
3
+ size 13887394
drone_tracking.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
drone_video_1.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e29bf8f8ddedb30dcb105b83eb9c58de02c9e012f7f11edd06702e22e18ebc1d
3
+ size 3951099
drone_video_1_tracked.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:23e3941240bce0a2291948b62d84932523894f56b3aaa35cdf1b006056e7da89
3
+ size 564057
drone_video_2.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dafe6194248260ecb29d350bee464433c3f0d55fdc2161baa96784aa66a79ed0
3
+ size 14526310
drone_video_2_tracked.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b3cfd91c9514c97e5c1fe9efc4a21965c083523d46354aa3b5d29364c9ad737
3
+ size 639036