This repository is the official implementation of DRIFT.
- Unified PDE Framework: Single equation captures advection, diffusion, and wave-like propagation
- GVF-based Vehicle Interaction: Anisotropic Gaussian kernels model relative motion risk
- Occlusion Reasoning: Shadow regions behind trucks inject latent hazard
- Merge Topology: Road geometry creates conflict zones with elevated risk
- Interpretable Sources: Clear decomposition into Q_veh, Q_occ, Q_merge
| Source | Description |
|---|---|
| Q_veh | Vehicle-induced risk using GVF-style anisotropic Gaussians weighted by TTC, relative speed, and vehicle class |
| Q_occ | Occlusion hazard in sensor shadow behind large vehicles; higher at lane centers and truck edges where cut-ins emerge |
| Q_merge | Merge conflict pressure; intensifies toward gore point with topology-driven drift |
see another repo: https://github.com/PeterWANGHK/Benchmark-RiskField.git
-
Install dependencies:
git clone https://github.com/PeterWANGHK/DRIFT.git pip install numpy scipy matplotlib imageio loguru
-
Run verification:
cd DRIFT/src python test_pde_fixes.py -
Generate visualization:
python drift_pde_visualization.py
-
Loading sceanrioos from BEV dataset if needed (please specify the dataset directory in corresponding code lines in your drif_pde_xxd.py)
#example usage of exiD dataset python drift_pde_exid.py --recording 00 --ego_id 5 -
Fine-tune parameters if needed (see tuning guide in another branch)
python drift_pde_visualization.py --ablation --frames 70 --fps 8



