ispc-lab / GSC

Spatial-Temporal Graph Learning with Self-supervised Spatial State Module for Traffic Accident Anticipation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GSC: A Graph and Spatio-temporal Continuity Based Framework for Accident Anticipation

License: MIT

The repository contains the source code and pred-trained models of our paper: GSC: A Graph and Spatio-temporal Continuity Based Framework for Accident Anticipation

Architecture

The overview of the network is showed below;

Prerequisites

  • Python 3.6
  • Pytorch 1.7.0
  • Pytorch-Lightning 0.9.0
  • Other required packages in requirements.txt

Getting Started

Create conda environment

conda create -n sspm python=3.6
source activate sspm

Install the required packages

pip install -r requirements.txt

Downloading MASKER_MD dataset and unzip it

  • Access the datasets by BaiduYun[Passwards: qo81], and unzip it.

  • Change the data_root of configs/config.py to your unzip path;

Train the Model

  • Run the following command in Terminal:
    python run.py --train ./configs/config.py

Test the Model

  • Change the test_checkpoint of configs/config.py to your model

  • Run the following command in Terminal

    python run.py --test ./configs/config.py

Visualize

About

Spatial-Temporal Graph Learning with Self-supervised Spatial State Module for Traffic Accident Anticipation


Languages

Language:Python 100.0%