m-hasan-n / pooling

"Pooling Toolbox" is the code of our work "Maneuver-Aware Pooling for Vehicle Trajectory Prediction".
MIT License
51 stars 8 forks source link

Maneuver-Aware Pooling for Vehicle Trajectory Prediction

This project focuses on predicting the behavior of the vehicles surrounding an autonomous vehicle on highways. We are motivated by improving the prediction accuracy when a vehicles perform lane change and highway merging maneuvers.

The interaction among vehicles in a given scene is generally captured using a pooling module. This pools the LSTM states of the neighbor vehicles. We propose a novel pooling strategy to capture the inter-dependencies between the neighbor vehicles. Our pooling mechanism employs polar trajectory representation, vehicles orientation and radial velocity.

This results in an implicitly maneuver-aware pooling operation. We incorporated the proposed pooling mechanism into a generative encoder-decoder model, and evaluated our method on the public NGSIM dataset.

# model image

Pooling Toolbox

This project helps to reproduce the proposed maneuver-aware pooling strategy, in addition to other pooling approaches such as that used in Social LSTM , Covolutional Social Pooling and Soicla GAN works. # pooling image

Visualizing pooling mechanisms (A green vehicle shows the ego, yellow vehicle shows a neighbor covered by the pooling strategy, and grey vehicle shows a non-covered neighbor).

NGSIM Dataset Pre-processing

The NGSIM public dataset is used for our experiments. The dataset consists of two subsets: US-101 and I-80. Download the raw (.txt) files of both subsets, and then run the following MATLAB script:

preprocess_ngsim(us_dataset_dir, i80_dataset_dir).m

This will preprocess the dataset, splits it into train, validation and test subsets, and save that to the 'data' directory. In addition, the test subset will be further split to perform the maneuver-based evaluation for the keep, merge, left and right maneuvers.

Model Arguments

The default network arguments are in:

model_args.py 

You can also set the required experiment arguments in this script. For example:

Model Training and Evaluation

The model structure is coded in 'model.py'. We extended the CSP work to: (1) incorporate our benchmark pooling strategies, and (2) use multi-variate Gaussian distribution. After setting the required experiment arguments, you can start model training by running:

train.py

The output model will be save in 'trained_models' directory. To test a trained model run:

evaluate.py

which will load and test the trained model defined by the selected model arguments. The RMSE results will be saved as csv files to the 'evaluation' directory.

Citation

If you find this code useful for your research, please cite our work:

License

This project is licensed under the MIT License - see the LICENSE.md file for details.