Dataset Viewer
Auto-converted to Parquet Duplicate
video_name
large_stringclasses
2 values
frame_file
large_stringlengths
40
40
frame_name
large_stringlengths
15
15
drone_video_1
detections/drone_video_1/frame_00001.jpg
frame_00001.jpg
drone_video_1
detections/drone_video_1/frame_00002.jpg
frame_00002.jpg
drone_video_1
detections/drone_video_1/frame_00003.jpg
frame_00003.jpg
drone_video_1
detections/drone_video_1/frame_00004.jpg
frame_00004.jpg
drone_video_1
detections/drone_video_1/frame_00005.jpg
frame_00005.jpg
drone_video_1
detections/drone_video_1/frame_00006.jpg
frame_00006.jpg
drone_video_1
detections/drone_video_1/frame_00007.jpg
frame_00007.jpg
drone_video_1
detections/drone_video_1/frame_00008.jpg
frame_00008.jpg
drone_video_1
detections/drone_video_1/frame_00009.jpg
frame_00009.jpg
drone_video_1
detections/drone_video_1/frame_00010.jpg
frame_00010.jpg
drone_video_1
detections/drone_video_1/frame_00011.jpg
frame_00011.jpg
drone_video_1
detections/drone_video_1/frame_00012.jpg
frame_00012.jpg
drone_video_1
detections/drone_video_1/frame_00013.jpg
frame_00013.jpg
drone_video_1
detections/drone_video_1/frame_00014.jpg
frame_00014.jpg
drone_video_1
detections/drone_video_1/frame_00015.jpg
frame_00015.jpg
drone_video_1
detections/drone_video_1/frame_00016.jpg
frame_00016.jpg
drone_video_1
detections/drone_video_1/frame_00017.jpg
frame_00017.jpg
drone_video_1
detections/drone_video_1/frame_00018.jpg
frame_00018.jpg
drone_video_1
detections/drone_video_1/frame_00019.jpg
frame_00019.jpg
drone_video_1
detections/drone_video_1/frame_00020.jpg
frame_00020.jpg
drone_video_1
detections/drone_video_1/frame_00021.jpg
frame_00021.jpg
drone_video_1
detections/drone_video_1/frame_00022.jpg
frame_00022.jpg
drone_video_1
detections/drone_video_1/frame_00023.jpg
frame_00023.jpg
drone_video_1
detections/drone_video_1/frame_00024.jpg
frame_00024.jpg
drone_video_1
detections/drone_video_1/frame_00025.jpg
frame_00025.jpg
drone_video_1
detections/drone_video_1/frame_00026.jpg
frame_00026.jpg
drone_video_1
detections/drone_video_1/frame_00027.jpg
frame_00027.jpg
drone_video_1
detections/drone_video_1/frame_00028.jpg
frame_00028.jpg
drone_video_1
detections/drone_video_1/frame_00029.jpg
frame_00029.jpg
drone_video_1
detections/drone_video_1/frame_00030.jpg
frame_00030.jpg
drone_video_1
detections/drone_video_1/frame_00031.jpg
frame_00031.jpg
drone_video_1
detections/drone_video_1/frame_00032.jpg
frame_00032.jpg
drone_video_1
detections/drone_video_1/frame_00033.jpg
frame_00033.jpg
drone_video_1
detections/drone_video_1/frame_00034.jpg
frame_00034.jpg
drone_video_1
detections/drone_video_1/frame_00035.jpg
frame_00035.jpg
drone_video_1
detections/drone_video_1/frame_00036.jpg
frame_00036.jpg
drone_video_1
detections/drone_video_1/frame_00037.jpg
frame_00037.jpg
drone_video_1
detections/drone_video_1/frame_00038.jpg
frame_00038.jpg
drone_video_1
detections/drone_video_1/frame_00039.jpg
frame_00039.jpg
drone_video_1
detections/drone_video_1/frame_00040.jpg
frame_00040.jpg
drone_video_1
detections/drone_video_1/frame_00041.jpg
frame_00041.jpg
drone_video_1
detections/drone_video_1/frame_00042.jpg
frame_00042.jpg
drone_video_1
detections/drone_video_1/frame_00043.jpg
frame_00043.jpg
drone_video_1
detections/drone_video_1/frame_00044.jpg
frame_00044.jpg
drone_video_1
detections/drone_video_1/frame_00045.jpg
frame_00045.jpg
drone_video_1
detections/drone_video_1/frame_00046.jpg
frame_00046.jpg
drone_video_1
detections/drone_video_1/frame_00047.jpg
frame_00047.jpg
drone_video_1
detections/drone_video_1/frame_00048.jpg
frame_00048.jpg
drone_video_1
detections/drone_video_1/frame_00049.jpg
frame_00049.jpg
drone_video_1
detections/drone_video_1/frame_00050.jpg
frame_00050.jpg
drone_video_1
detections/drone_video_1/frame_00051.jpg
frame_00051.jpg
drone_video_1
detections/drone_video_1/frame_00052.jpg
frame_00052.jpg
drone_video_1
detections/drone_video_1/frame_00053.jpg
frame_00053.jpg
drone_video_1
detections/drone_video_1/frame_00054.jpg
frame_00054.jpg
drone_video_1
detections/drone_video_1/frame_00055.jpg
frame_00055.jpg
drone_video_1
detections/drone_video_1/frame_00056.jpg
frame_00056.jpg
drone_video_1
detections/drone_video_1/frame_00057.jpg
frame_00057.jpg
drone_video_1
detections/drone_video_1/frame_00058.jpg
frame_00058.jpg
drone_video_1
detections/drone_video_1/frame_00059.jpg
frame_00059.jpg
drone_video_1
detections/drone_video_1/frame_00060.jpg
frame_00060.jpg
drone_video_1
detections/drone_video_1/frame_00061.jpg
frame_00061.jpg
drone_video_1
detections/drone_video_1/frame_00062.jpg
frame_00062.jpg
drone_video_1
detections/drone_video_1/frame_00063.jpg
frame_00063.jpg
drone_video_1
detections/drone_video_1/frame_00064.jpg
frame_00064.jpg
drone_video_1
detections/drone_video_1/frame_00065.jpg
frame_00065.jpg
drone_video_1
detections/drone_video_1/frame_00066.jpg
frame_00066.jpg
drone_video_1
detections/drone_video_1/frame_00067.jpg
frame_00067.jpg
drone_video_1
detections/drone_video_1/frame_00068.jpg
frame_00068.jpg
drone_video_1
detections/drone_video_1/frame_00069.jpg
frame_00069.jpg
drone_video_1
detections/drone_video_1/frame_00070.jpg
frame_00070.jpg
drone_video_1
detections/drone_video_1/frame_00071.jpg
frame_00071.jpg
drone_video_1
detections/drone_video_1/frame_00072.jpg
frame_00072.jpg
drone_video_1
detections/drone_video_1/frame_00073.jpg
frame_00073.jpg
drone_video_1
detections/drone_video_1/frame_00074.jpg
frame_00074.jpg
drone_video_1
detections/drone_video_1/frame_00075.jpg
frame_00075.jpg
drone_video_1
detections/drone_video_1/frame_00076.jpg
frame_00076.jpg
drone_video_1
detections/drone_video_1/frame_00077.jpg
frame_00077.jpg
drone_video_1
detections/drone_video_1/frame_00078.jpg
frame_00078.jpg
drone_video_1
detections/drone_video_1/frame_00079.jpg
frame_00079.jpg
drone_video_1
detections/drone_video_1/frame_00080.jpg
frame_00080.jpg
drone_video_1
detections/drone_video_1/frame_00081.jpg
frame_00081.jpg
drone_video_1
detections/drone_video_1/frame_00082.jpg
frame_00082.jpg
drone_video_1
detections/drone_video_1/frame_00083.jpg
frame_00083.jpg
drone_video_1
detections/drone_video_1/frame_00084.jpg
frame_00084.jpg
drone_video_1
detections/drone_video_1/frame_00085.jpg
frame_00085.jpg
drone_video_1
detections/drone_video_1/frame_00086.jpg
frame_00086.jpg
drone_video_1
detections/drone_video_1/frame_00087.jpg
frame_00087.jpg
drone_video_1
detections/drone_video_1/frame_00088.jpg
frame_00088.jpg
drone_video_1
detections/drone_video_1/frame_00089.jpg
frame_00089.jpg
drone_video_1
detections/drone_video_1/frame_00090.jpg
frame_00090.jpg
drone_video_1
detections/drone_video_1/frame_00091.jpg
frame_00091.jpg
drone_video_1
detections/drone_video_1/frame_00092.jpg
frame_00092.jpg
drone_video_1
detections/drone_video_1/frame_00093.jpg
frame_00093.jpg
drone_video_1
detections/drone_video_1/frame_00094.jpg
frame_00094.jpg
drone_video_1
detections/drone_video_1/frame_00095.jpg
frame_00095.jpg
drone_video_1
detections/drone_video_1/frame_00096.jpg
frame_00096.jpg
drone_video_1
detections/drone_video_1/frame_00097.jpg
frame_00097.jpg
drone_video_1
detections/drone_video_1/frame_00098.jpg
frame_00098.jpg
drone_video_1
detections/drone_video_1/frame_00099.jpg
frame_00099.jpg
drone_video_1
detections/drone_video_1/frame_00100.jpg
frame_00100.jpg
End of preview. Expand in Data Studio

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

UAV Drone Detection and Tracking with YOLO and Kalman Filter

Overview

This project detects UAV drones in video using a deep learning object detector and tracks them across frames using a Kalman filter. The system processes every .mp4 file in a given input directory, saves frames containing detections, and produces one tracked output video per input video with bounding boxes and 2D trajectories overlaid.


Test Videos

The following YouTube videos were used as the primary test inputs:

Output Tracking Videos

Replace these with your uploaded YouTube links:


Dataset Choice

For drone detection, I used the Hugging Face dataset:

This dataset was selected because it contains bounding box annotations for drones themselves, which matches the assignment requirement. Many aerial vision datasets instead focus on detecting objects from drones, which is not the same problem.

The dataset was converted into YOLO format for training. The original annotations were provided as bounding boxes, and each bounding box was transformed into normalized YOLO labels:

  • class id
  • center x
  • center y
  • width
  • height

Since this project only tracks drones, the dataset was treated as a single-class detection task:

  • class 0 = drone

Detector Configuration

The detector used in this project is:

  • Model: Ultralytics YOLOv8
  • Starting checkpoint: yolov8n.pt

YOLOv8 was chosen because it is easy to train, works well for custom object detection tasks, and integrates cleanly with Python for inference on video frames.

Training Setup

The detector was fine-tuned on the drone dataset after converting the dataset into YOLO folder structure.

Example configuration:

  • image size: 640
  • batch size: 16
  • epochs: 30 for a full run
  • smaller debug runs were also used, such as:
    • epochs: 3
    • image size: 416
    • batch size: 8

The final trained model weights were saved as best.pt and then used during the video-processing stage.

Inference Pipeline

For each .mp4 file in the input directory:

  1. Open the video with OpenCV
  2. Read frames one by one
  3. Run the YOLO detector on each frame
  4. Keep detections above the confidence threshold
  5. Save any frame containing at least one detection into detections/
  6. Pass the detections to the Kalman filter tracker
  7. Draw:
    • bounding box
    • track ID
    • estimated center point
    • 2D trajectory polyline
  8. Write the result to an output video

Kalman Filter Tracking

The second part of the project uses a Kalman filter to track the drone across frames.

State Design

The Kalman filter uses a constant velocity motion model with the following state vector:

[x, y, vx, vy]

Noise Parameters

The Kalman filter requires covariance settings for uncertainty.

Initial covariance P

I used a large initial covariance: kf.P *= 500.0

This reflects high uncertainty at the beginning of the track, especially because the initial velocity is unknown.

Measurement noise R

I used: kf.R = np.array([ [25., 0.], [0., 25.] ])

This represents moderate uncertainty in detector measurements. Bounding box centers can jitter slightly from frame to frame, so the tracker should not trust every detection perfectly.

Process noise Q

I used:

q = 1.0 kf.Q = np.array([ [q, 0, 0, 0], [0, q, 0, 0], [0, 0, q, 0], [0, 0, 0, q] ])

This allows the tracker to adapt to small motion changes while still favoring smooth trajectories.

Handling Missing Detections

If no detection is assigned to a track in a frame, the Kalman filter still performs the predict step.

The track remains alive temporarily the predicted state is used for continuity. Each track keeps a missed counter.

If the tracker misses the drone for too many frames in a row, the track is removed.

Downloads last month
8