Code for the papers Group-LSTM (ECCV2018) and Group-Obstacle-LSTM (CVIU2020).
This repo contains a Tensorflow implementation for our ECCV paper and our CVIU paper. If you find this code useful in your research, please consider citing:
@inproceedings{bisagno2018group,
title={Group lstm: Group trajectory prediction in crowded scenarios},
author={Bisagno, Niccol{\'o} and Zhang, Bo and Conci, Nicola},
booktitle={Proceedings of the European conference on computer vision (ECCV)},
pages={0--0},
year={2018}
}
@article{bisagno2020embedding,
title={Embedding group and obstacle information in LSTM networks for human trajectory prediction in crowded scenes},
author={Bisagno, Niccol{\'o} and Saltori, Cristiano and Zhang, Bo and De Natale, Francesco GB and Conci, Nicola},
journal={Computer Vision and Image Understanding},
pages={103126},
year={2020},
publisher={Elsevier}
}
This code was tested on an Ubuntu 14.04 system using Pytorch 0.3.1
The data files, which have been normalised between [-1,1], are organised as:
-frame_id
-Pedestrian_id
-x_position
-y_position
-group_id
If group_id=0, the pedestrian of interest does not belong to any group.
- Python 3
- Seaborn (https://seaborn.pydata.org/)
- PyTorch (http://pytorch.org/)
- Numpy
- Matplotlib
- Scipy
- Before running the code, create the required directories by running the script
make_directories.sh
- To train the model run
python train.py
(See the code to understand all the arguments that can be given to the command) - To test the model run
python sample.py --epoch=n
wheren
is the epoch at which you want to load the saved model.