Skip to content
Attentive crowd flow machines
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data
dataset
figures
model
pdf
pretrained
.gitignore
README.md
run_bikenyc.py
run_taxibj.py
run_taxinyc.py
test_bikenyc.py
test_taxibj.py
test_taxinyc.py
utils.py

README.md

Attentive Crowd Flow Machines

This is a PyTorch implementation of Attentive Crowd Flow Machines (ACFM) in ACM Multimedia 2018 and its journal version. ACFM is a a unified neural network which can effectively learn the spatial-temporal feature representations of crowd flow with an attention mechanism.

If you use this code for your research, please cite our papers (Conference Version and Journal Version):

@inproceedings{liu2018attentive,
  title={Attentive Crowd Flow Machines},
  author={Liu, Lingbo and Zhang, Ruimao and Peng, Jiefeng and Li, Guanbin and Du, Bowen and Lin, Liang},
  booktitle={2018 ACM Multimedia Conference on Multimedia Conference},
  pages={1553--1561},
  year={2018},
  organization={ACM}
}
@article{liu2019acfm,
  title={ACFM:A Dynamic Spatial-Temporal Network for Traffic Prediction},
  author={Liu, Lingbo and Zhen, Jiajie and  Li, Guanbin and Zhan, Geng and Lin, Liang},
  year={2019}
}

Requirements

  • torch==0.4.1

Preprocessing

For Crowd Flow Prediction: download TaxiBJ / BikeNYC and put them into folder data/TaxiBJ and data/BikeNYC.

For Citywide Passenger Demand Prediction (CPDP): the dataset of CPDP has been in folder data/TaxiNYC.

Model Training

# TaxiBJ
python run_taxibj.py

# BikeNYC
python run_bikenyc.py

# TaxiNYC
python run_taxinyc.py

Testing

# TaxiBJ
python test_taxibj.py

# BikeNYC
python test_bikenyc.py

# TaxiNYC
python test_taxinyc.py
You can’t perform that action at this time.