All Projects → yule-BUAA → DSTGCN

yule-BUAA / DSTGCN

Licence: other
codes of Deep Spatio-Temporal Graph Convolutional Network for Traffic Accident Prediction

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to DSTGCN

Traffic-Prediction-Open-Code-Summary
Summary of open source code for deep learning models in the field of traffic prediction
Stars: ✭ 58 (+56.76%)
Mutual labels:  graph-convolutional-networks, traffic-accident-prediction
Pytorch geometric
Graph Neural Network Library for PyTorch
Stars: ✭ 13,359 (+36005.41%)
Mutual labels:  graph-convolutional-networks
kGCN
A graph-based deep learning framework for life science
Stars: ✭ 91 (+145.95%)
Mutual labels:  graph-convolutional-networks
GCMC
Code for Graph Convolutional Matrix Factorization for Bipartite Edge Prediction
Stars: ✭ 48 (+29.73%)
Mutual labels:  graph-convolutional-networks
graph-nvp
GraphNVP: An Invertible Flow Model for Generating Molecular Graphs
Stars: ✭ 69 (+86.49%)
Mutual labels:  graph-convolutional-networks
GraphTSNE
PyTorch Implementation of GraphTSNE, ICLR’19
Stars: ✭ 113 (+205.41%)
Mutual labels:  graph-convolutional-networks
STEP
Spatial Temporal Graph Convolutional Networks for Emotion Perception from Gaits
Stars: ✭ 39 (+5.41%)
Mutual labels:  graph-convolutional-networks
AliNet
Knowledge Graph Alignment Network with Gated Multi-hop Neighborhood Aggregation, AAAI 2020
Stars: ✭ 89 (+140.54%)
Mutual labels:  graph-convolutional-networks
Awesome Graph Classification
A collection of important graph embedding, classification and representation learning papers with implementations.
Stars: ✭ 4,309 (+11545.95%)
Mutual labels:  graph-convolutional-networks
ProteinGCN
ProteinGCN: Protein model quality assessment using Graph Convolutional Networks
Stars: ✭ 88 (+137.84%)
Mutual labels:  graph-convolutional-networks
Spectral-Designed-Graph-Convolutions
Codes for "Bridging the Gap Between Spectral and Spatial Domains in Graph Neural Networks" paper
Stars: ✭ 39 (+5.41%)
Mutual labels:  graph-convolutional-networks
PyTorch-GNNs
The implement of GNN based on Pytorch
Stars: ✭ 121 (+227.03%)
Mutual labels:  graph-convolutional-networks
CoVA-Web-Object-Detection
A Context-aware Visual Attention-based training pipeline for Object Detection from a Webpage screenshot!
Stars: ✭ 18 (-51.35%)
Mutual labels:  graph-convolutional-networks
Literatures-on-GNN-Acceleration
A reading list for deep graph learning acceleration.
Stars: ✭ 50 (+35.14%)
Mutual labels:  graph-convolutional-networks
Stellargraph
StellarGraph - Machine Learning on Graphs
Stars: ✭ 2,235 (+5940.54%)
Mutual labels:  graph-convolutional-networks
NeuralDater
ACL 2018: Dating Documents using Graph Convolution Networks
Stars: ✭ 60 (+62.16%)
Mutual labels:  graph-convolutional-networks
mvGAE
Drug Similarity Integration Through Attentive Multi-view Graph Auto-Encoders (IJCAI 2018)
Stars: ✭ 27 (-27.03%)
Mutual labels:  graph-convolutional-networks
L2-GCN
[CVPR 2020] L2-GCN: Layer-Wise and Learned Efficient Training of Graph Convolutional Networks
Stars: ✭ 26 (-29.73%)
Mutual labels:  graph-convolutional-networks
Euler
A distributed graph deep learning framework.
Stars: ✭ 2,701 (+7200%)
Mutual labels:  graph-convolutional-networks
Graph Based Deep Learning Literature
links to conference publications in graph-based deep learning
Stars: ✭ 3,428 (+9164.86%)
Mutual labels:  graph-convolutional-networks

Deep Spatio-Temporal Graph Convolutional Network for Traffic Accident Prediction (DSTGCN)

DSTGCN is a graph-based neural network that predicts the risk of traffic accidents in the future.

Please refer to our Neurocomputing 2021 paper Deep Spatio-Temporal Graph Convolutional Network for Traffic Accident Prediction for more details.

Project Structure

The descriptions of principal files in this project are introduced as follows:

  • model/
    • spatial_layer.py: the Spatial Convolutional Layer
    • spatial_temporal_layer.py: the Spatial-Temporal Convolutional Layer
    • fully_connected.py: fully connected network for the Embedding layer
    • DSTGCN.py: the Deep Spatio-Temporal Graph Convolutional Network
  • preprocessing_data/
    • process_xxx.py: process the raw 'xxx' dataset
    • generate_data.py: generate the dataset for our model
  • transform_coord/: convert the coordinate, which could be obtained from here.
  • train/
    • train_model.py and train_main.py: train models
  • test/
    • test_main.py: evaluate models
  • utils/: utility files (e.g. data loader, metrics calculation, loss function, configurations)
  • original_data/: original datasets. Due to the data privacy, we do not provide the original data. But, you could use the preprocess codes in preprocessing_data/ folder to generate your own datasets and use them to train the model.
  • data/: processed datasets. We provide a sampled dataset here. You can download it and then put the data files in this folder.
  • saves/ and runs/: folders to save models and outputs of tensorboardX, respectively
  • results/: folders to save the evaluation metrics for models.

Format of the processed data:

  • accident data format: records of traffic accidents.
"longitude" "latitude" "startTime" "endTime"
accident longitude accident latitude accident start time accident end time
  • poi data format: records of pois.
"longitude" "latitude" "poi_type"
poi longitude poi latitude poi function type
  • road data (beijing_roadnet.gpickle) format: networkx.classes.graph.Graph, road network structure that records the connectivity of road segments. You can download the original data from here, and then run preprocessing_data/process_beijing_road_net.py to get the preprocessed file.

  • speed data (all_grids_speed.h5) format: DataFrame, containing the traffic speed of each grid

  • weather data format (weather.h5) format: records of the weather condition. You can run preprocessing_data/process_weather.py to get the preprocessed file.

"temp" "dewPt" "pressure" "wspd" ...
temperature dew point pressure wind speed etc.
  • edge.h5 data format: records of spatial features (poi and road segment features), which is a combination of preprocessed poi data and road data.
"XCoord" "YCoord" "LENGTH" "NUM_NODE" "spatial_features"
road segment longitude road segment latitude road segment length points that road segment contains road segment poi distribution (a list of each poi type numbers)

Parameter Settings

Please refer to our paper for more details of parameter settings. Hyperparameters could be found in utils/config.json and you can adjust them when running the model.

How to use

  • Training: after setting the parameters, run python train_main.py to train models.
  • Testing: run python test_main.py to evaluate models based on the path of saved models.

Principal environmental dependencies

Citation

Please consider citing the following paper when using our data or code.

@article{DBLP:journals/ijon/YuDHSHL21,
  author    = {Le Yu and
               Bowen Du and
               Xiao Hu and
               Leilei Sun and
               Liangzhe Han and
               Weifeng Lv},
  title     = {Deep spatio-temporal graph convolutional network for traffic accident
               prediction},
  journal   = {Neurocomputing},
  volume    = {423},
  pages     = {135--147},
  year      = {2021}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].