Mix&Fix-Net: A Dual-Stage Trajectory Prediction Model for AIS and Vision-Derived Vessel Data
Organizations: Department of Electrical Engineering, University of South Florida, Tampa, FL, 33647, USA · College of Transportation and Logistics, Istanbul University, Istanbul, Turkey
Abstract
Vessel trajectory prediction is critical for maritime safety and accident prevention. While most existing trajectory prediction models rely on Automatic Identification System (AIS) data due to its precision and availability, small vessels mostly operate without AIS, resulting in a significant monitoring gap. To address this, we propose Mix&Fix-Net, a dual-stage mixer-based trajectory prediction model designed to handle vessel trajectory time-series data derived from both AIS and (non-AIS) vision data. Our architecture integrates a Primary Trajectory Predictor with a Residual Trajectory Adjuster, enabling more refined trajectory prediction. Additionally, we introduce a new video-based dataset derived from webcam streams, from which vessel trajectories are extracted to represent non-AIS data. Extensive evaluations on both AIS and non-AIS datasets across six metrics (mean squared error, mean absolute error, symmetric mean absolute percentage error, final displacement error, Frechet distance, and average Euclidean distance) demonstrate that Mix&Fix-Net consistently outperforms existing baselines across most metrics and datasets.
Figures & tables
| S/N | Recording Date | Start time | Duration | Purpose |
|---|---|---|---|---|
| 0 | 2/12/2025 | 13:02:00 | 6 Hours | Detector training |
| 1 | 11/19/2024 | 8:01:00 | 4 Hours | Detector training |
| 2 | 11/19/2024 | 12:17:00 | 4 Hours | Trajectory Prediction |
| 3 | 11/19/2024 | 16:26:00 | 38 Minutes | Trajectory Prediction |
| 4 | 11/20/2024 | 8:12:00 | 4 Hours | Trajectory Prediction |
| 5 | 2/12/2025 | 7:50:00 | 5 Hours | Trajectory Prediction |
| Setting-1 | Setting-2 | |||||
|---|---|---|---|---|---|---|
| M3 | TampaBay | VVR | M3 | TampaBay | VVR | |
| Train | 367039 | 133740 | 119312 | 369845 | 200719 | 117421 |
| Validation | 127752 | 49651 | 37361 | 123282 | 66940 | 39140 |
| Test | 121618 | 60817 | 39029 | 123282 | 67046 | 39141 |
| Total | 616409 | 244208 | 195702 | 616409 | 334705 | 195702 |
| Mix&Fix-Net | WPMixer | P_sLSTM | PatchTST | Dlinear | FusionRNN | ||
|---|---|---|---|---|---|---|---|
| VVR | MSE | 5.22E-04 | 7.76E-04 | 6.71E-04 | 8.18E-04 | 9.83E-04 | 9.22E-04 |
| MAE | 1.58E-02 | 1.61E-02 | 1.58E-02 | 1.66E-02 | 2.05E-02 | 2.35E-02 | |
| SMA. | 4.60E-02 | 5.22E-02 | 4.78E-02 | 5.44E-02 | 6.31E-02 | 7.01E-02 | |
| FDE | 2.69E-02 | 3.05E-02 | 2.95E-02 | 3.27E-02 | 3.99E-02 | 3.60E-02 | |
| FD | 3.21E-02 | 3.29E-02 | 3.13E-02 | 3.36E-02 | 4.06E-02 | 3.96E-02 | |
| AED | 1.28E-02 | 1.30E-02 | 1.30E-02 | 1.35E-02 | 1.63E-02 | 1.88E-02 |
| Mix&Fix-Net | WPMixer | P_sLSTM | PatchTST | Dlinear | FusionRNN | ||
|---|---|---|---|---|---|---|---|
| VVR | MSE | 3.86E-06 | 7.38E-04 | 5.33E-04 | 8.33E-04 | 1.16E-03 | 9.43E-06 |
| MAE | 1.45E-03 | 1.59E-02 | 1.45E-02 | 1.72E-02 | 2.20E-02 | 2.58E-03 | |
| SMA. | 4.08E-03 | 5.04E-02 | 4.40E-02 | 5.47E-02 | 6.76E-02 | 7.47E-03 | |
| FDE | 1.64E-03 | 3.01E-02 | 2.68E-02 | 3.29E-02 | 4.15E-02 | 3.13E-03 | |
| FD | 3.72E-03 | 3.25E-02 | 2.85E-02 | 3.41E-02 | 4.23E-02 | 5.35E-03 | |
| AED | 1.16E-03 | 1.29E-02 | 1.19E-02 | 1.39E-02 | 1.75E-02 | 2.06E-03 |
| Mix&Fix-Net | WPMixer | P_sLSTM | |||||
|---|---|---|---|---|---|---|---|
| Mean | Std. | Mean | Std. | Mean | Std. | ||
| VVR | MSE | 4.12E-06 | 2.09E-07 | 7.65E-04 | 1.89E-05 | 5.33E-04 | 4.51E-06 |
| MAE | 1.46E-03 | 3.29E-05 | 1.61E-02 | 1.69E-04 | 1.43E-02 | 1.46E-04 | |
| SMAPE | 4.11E-03 | 9.49E-05 | 5.12E-02 | 5.68E-04 | 4.37E-02 | 2.59E-04 | |
| FDE | 1.64E-03 | 2.39E-05 | 3.09E-02 | 5.94E-04 | 2.67E-02 | 9.26E-05 | |
| FD | 3.71E-03 | 4.89E-05 | 3.35E-02 | 7.89E-04 | 2.84E-02 | 1.05E-04 | |
| Train Time | Test time | GFLOPs | |
|---|---|---|---|
| Mix&Fix-Net | 0.086 | 0.030 | 1136 |
| WPMixer | 0.011 | 0.005 | 11 |
| P_sLSTM | 0.029 | 0.010 | 3 |
| PatchTST | 0.010 | 0.006 | 35 |
| Dlinear | 0.008 | 0.004 | 0.03 |
| FusionRNN | 0.008 | 0.003 | 14 |
| Case | RTA | Emb. Mx | Tm. Mx | Head | Padding | RevIN | MSE | MAE | SMAPE | FDE | FD | AED |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | ✓ | ✓ | ✓ | ✓ | 0 | 0 | 0 | 0 | 0 | 0 | ||
| 2 | ✓ | ✓ | ✓ | 14 | 5 | 4 | 7 | 2 | 5 | |||
| 3 | ✓ | ✓ | ✓ | 157906 | 4562 | 3932 | 5312 | 2365 | 4565 | |||
| 4 | ✓ | ✓ | ✓ | 322 | 131 | 140 | 163 | 87 | 131 | |||
| 5 | ✓ | ✓ | ✓ | ✓ | 231 | 67 | 66 | 98 | 44 | 68 | ||
| 6 | ✓ | ✓ | ✓ | ✓ | - | 39 | 23 | 26 | 27 | 14 | 22 |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Parameter | Description | Value |
|---|---|---|
| hsv_h | Image HSV-Hue augmentation (fraction) | 0.015 |
| hsv_s | Image HSV-Saturation augmentation (fraction) | 0.7 |
| hsv_v | Image HSV-Value augmentation (fraction) | 0.4 |
| translate | Image translation (+/- fraction) | 0.1 |
| scale | Image scale (+/- gain) | 0.5 |
| fliplr | Image flip left-right (probability) | 0.5 |
| Parameter | Description | Value |
|---|---|---|
| track_high_thresh | Threshold for the first association (high score) | 0.5 |
| track_low_thresh | Threshold for the second association (low score) | 0.1 |
| new_track_thresh | Threshold for initiating a new track | 0.5 |
| track_buffer | Number of frames to retain a lost track | 600 |
| match_thresh | Intersection over Union (IoU) matching threshold | 0.95 |
| Setting | Data | Initial lr. | Batch | drop. | Epochs | Patience | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | VVR | 60 | 120 | 8.13E-05 | 128 | 16 | 5 | 2 | 0.05 | 50 | 10 |
| M3 | 60 | 120 | 0.004887 | 512 | 16 | 5 | 1 | 0.05 | 50 | 10 | |
| TampaBay | 60 | 120 | 6.72E-05 | 128 | 16 | 1 | 3 | 0.05 | 50 | 10 | |
| 2 | VVR | 60 | 120 | 0.001172 | 128 | 256 | 5 | 5 | 0 | 50 | 10 |
| M3 | 60 | 120 | 0.001392 | 512 | 256 | 3 | 5 | 0 | 50 | 10 | |
| TampaBay | 60 | 120 | 8.18E-05 | 128 | 128 | 5 | 2 | 0.1 | 50 | 10 |
| 2 | 7 | 9 | ||
|---|---|---|---|---|
| VVR | MSE | 2.16E-05 | 4.63E-06 | 3.86E-06 |
| MAE | 3.50E-03 | 1.49E-03 | 1.45E-03 | |
| SMAPE | 1.02E-02 | 4.18E-03 | 4.08E-03 | |
| FDE | 4.92E-03 | 1.70E-03 | 1.64E-03 | |
| FD | 7.08E-03 | 3.79E-03 | 3.72E-03 | |
| AED | 2.82E-03 | 1.19E-03 | 1.16E-03 |
| Case | RTA | Emb. Mx | Tm. Mx | Head | Padding | RevIN | MSE | MAE | SMAPE | FDE | FD | AED |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | ✓ | ✓ | ✓ | ✓ | 3.86E-06 | 1.45E-03 | 4.08E-03 | 1.64E-03 | 3.72E-03 | 1.16E-03 | ||
| 2 | ✓ | ✓ | ✓ | 4.41E-06 | 1.52E-03 | 4.26E-03 | 1.75E-03 | 3.79E-03 | 1.22E-03 | |||
| 3 | ✓ | ✓ | ✓ | 6.10E-03 | 6.77E-02 | 1.64E-01 | 8.88E-02 | 9.17E-02 | 5.40E-02 | |||
| 4 | ✓ | ✓ | ✓ | 1.63E-05 | 3.35E-03 | 9.79E-03 | 4.31E-03 | 6.96E-03 | 2.67E-03 | |||
| 5 | ✓ | ✓ | ✓ | ✓ | 1.28E-05 | 2.42E-03 | 6.79E-03 | 3.25E-03 | 5.35E-03 | 1.95E-03 | ||
| 6 | ✓ | ✓ | ✓ | ✓ | - | 5.37E-06 | 1.78E-03 | 5.13E-03 | 2.08E-03 | 4.24E-03 | 1.42E-03 |