Skip to content

[ICDE 2021] Modeling Citywide Crowd Flows using Attentive Convolutional LSTM

Notifications You must be signed in to change notification settings

BIT-MCS/AttConvLSTM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

AttConvLSTM

This work "Modeling Citywide Crowd Flows using Attentive Convolutional LSTM" has been published in ICDE 2021.

📄 Description

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.

🔧 Dependencies

Installation

  1. Clone repo
    git clone https://github.com/BIT-MCS/AttConvLSTM.git
    cd AttConvLSTM
  2. Install dependent packages
    pip install -r requirements.txt
    

⚡ Quick Inference

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

💻 Training

We provide complete training codes for AttConvLSTM.
You could adapt it to your own needs.

  1. 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,
    
  2. Training

    python train.py 
    

🏁 Testing

  1. 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,
    
  2. Testing
    python train.py
    

📜 Acknowledgement

Corresponding author: Chi Harold Liu.

📧 Contact

If you have any question, please email [email protected].

Paper

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}
}

About

[ICDE 2021] Modeling Citywide Crowd Flows using Attentive Convolutional LSTM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages