This work "Modeling Citywide Crowd Flows using Attentive Convolutional LSTM" has been published in ICDE 2021.
We present a novel deep model for this task, called "AttConvLSTM", which leverages a convolutional LSTM (ConvLSTM), Convolutional Neural Networks (CNNs) along with an attention mechanism, where ConvLSTM keeps spatial information as intact as possible during sequential analysis, and the attention mechanism can focus important crowd flow variations which cannot be identified by the recurrent module.
- Python == 3.5 (Recommend to use Anaconda or Miniconda)
- Tensorflow == 1.4.1
- NVIDIA GPU (NVIDIA GTX TITAN XP) + CUDA 10
- Clone repo
git clone https://github.com/BIT-MCS/AttConvLSTM.git cd AttConvLSTM
- Install dependent packages
pip install -r requirements.txt
Get the usage information of the project
cd code/AttConvLSTM/experiment/att_conv_lstm2/
python train.py -h
Then the usage information will be shown as following
usage: train.py [-h] PATH SEQ_LENGTH DATA_WIDTH
positional arguments: PATH The directory of saving model SEQ_LENGTH Total sequence length DATA_WIDTH The resolution of data
optional arguments: -h, --help show this help message and exit
We provide complete training codes for AttConvLSTM.
You could adapt it to your own needs.
-
You can modify the config files AttConvLSTM/code/AttConvLSTM/experiment/att_conv_lstm2/conf.py For example, you can set the batch size and training mode by modifying these lines
[4] 'BATCH' : 32, [32] 'SAVE_MODEL' : True, [33] 'LOAD_MODEL' : False, [34] 'IS_TEST' : False,
-
Training
python train.py
- Before testing, you should modify the file AttConvLSTM/code/AttConvLSTM/experiment/att_conv_lstm2/conf.py as:
[32] 'SAVE_MODEL' : False, [33] 'LOAD_MODEL' : True, [34] 'IS_TEST' : True,
- Testing
python train.py
Corresponding author: Chi Harold Liu.
If you have any question, please email [email protected]
.
If you are interested in our work, please cite our paper as
@INPROCEEDINGS{9458664,
author={Liu, Chi Harold and Piao, Chengzhe and Ma, Xiaoxin and Yuan, Ye and Tang, Jian and Wang, Guoren and Leung, Kin K.},
booktitle={2021 IEEE 37th International Conference on Data Engineering (ICDE)},
title={Modeling Citywide Crowd Flows using Attentive Convolutional LSTM},
year={2021},
pages={217-228},
doi={10.1109/ICDE51399.2021.00026}
}