DRAC-Prediction is a pipeline for detecting a drone in video and predicting it's future trajectory several frames ahead. Given a detector's bounding box output, the system tracks a single target across frames, derives its center-point velocity, and feeds a short history window into a GRU-based recurrent model to forecast the drone's position at multiple future horizons (e.g. +1, +2, +4, +8, +16 frames). The system is built to be modular: any video source (webcam, file, or stream), any upstream object detector, and any trained trajectory model can be swapped independently.
NOTE: To run you need the models! Download the trained models from this Google Drive and place them in the
backend/models/directory.
Video Source (webcam / file / stream)
|
v
Object Detector --> Single-Target Tracker --> Trajectory Inferencer
(per-frame bbox) (locks onto one drone) (GRU: history > future positions)
The trajectory model (AdaptiveTrajectoryGRU) takes a window of the last N frames and outputs predicted (x, y, vx, vy) at each of several future horizons in a single forward pass, avoiding compounding prediction error at longer horizons.
At frame
The model input is a history window of the last
This window is passed through a GRU encoder, producing a hidden state
Rather than autoregressively rolling the model forward one step at a time (which compounds error at each step),
All horizons are predicted in a single forward pass, so a bad prediction at
Training data consists of per-frame drone center positions with timestamps, in the schema:
Source format (whitespace-separated, 1 header line):
frame no. x y
1.000000 654.62950739 262.89502463
2.000000 655.02817734 263.25773399
...
And for training the detection model, we used a public dataset of drones, witch can be found here.
For detection we used a YOLOv11 model that was fine-tuned on a public drone dataset. The model achieved great performance on the validation set, with a mean average precision (mAP) of 0.85.

The trajectory model was trained on a dataset of drone trajectories that looked like the image below. The model was able to predict the future positions of the drone with a training loss of 0.2103 and a validation loss of 0.4945.


