Improving the Generalizability of Trajectory Prediction Models with Frenét-Based Domain Normalization
This repository provides a suite to transform coordinates from the Cartesian to the Frenét frame. Besides the basic transformation, we also provide complete extensions for the Argoverse dataset.
For basic usage, you only need numpy
in your Python environment, and matplotlib
if you require visualization functions.
For those working with the Argoverse dataset, please first follow the instructions provided by the Argoverse API to install the argoverse
package. Then, proceed to install the following requirements:
pip install -r requirements.txt
from frenet import cartesian_to_frenet
s, d, direction = cartesian_to_frenet(x, y, ref_path)
where x, y
are numpy arrays with the shape of (n,)
, indicating the trajectory coordinates in the Cartesian frame, and ref_path
is a numpy array with the shape of (m, 2)
, indicating the coordinates of the reference path in the Cartesian frame.
The output s, d
are numpy arrays with the shape of (n,)
, indicating the trajectory coordinates in the Frenet frame, and direction
is a boolean array with the shape of (n,)
. True
indicates that the point is on the left of the reference path, while False
indicates that the point is on the right.
Please refer to the \demo
folder, for more demonstrations, such as Work on Argoverse.
- Include more text descriptions/comments in the demo.
- Complete the docstrings of the functions.
- Provide more demonstrations about the functions.
- Rebuild the function to transform coordinates from the Frenet frame to the Cartesian frame.
If you think this repository is helpful, please cite our paper Improving the Generalizability of Trajectory Prediction Models with Frenet-Based Domain Normalization.
@INPROCEEDINGS{10160788,
author={Ye, Luyao and Zhou, Zikang and Wang, Jianping},
booktitle={2023 IEEE International Conference on Robotics and Automation (ICRA)},
title={Improving the Generalizability of Trajectory Prediction Models with Frenét-Based Domain Normalization},
year={2023},
volume={},
number={},
pages={11562-11568},
doi={10.1109/ICRA48891.2023.10160788}}