Skip to content

jonpappalord/crowd_flow_prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AdjNet: a deep learning approach for Crowd Flow Prediction

Python impletmentaion of the thesis AdjNet: a deep learning approach for Crowd Flow Prediction (Link)

Introduction

We propose AdjNet (Adjacency Matrix Neural Network), which solves the Crowd Flow Prediction problem using an approach based on Graph Convolutional Networks (GCN) and Convolutional Neural Networks (CNN). In the first stage, we first represent the area taken into account using different tessellations. In the second stage, we train our model using the New York City Bike Share dataset to predict flows among regions.

Architecture of CrowdNet.

Result

We evaluate our model using different tessellation, evaluating them exploiting the RMSE metric. We compare it using as baseline another Deep Learning approach named STResNet (Link).

RMSE

Tile Size
750m 1000m
1500m
AdjNet STResNet AdjNet STResNet AdjNet STResNet
Time intervals 15min 1.71 1.69 2.76 2.35 3.73 3.35
30min 3.69 2.65 5.23 4.85 8.93 5.64
45min 4.34 3.67 6.68 5.63 11.3 10.91
60min 5.18 5.44 8.53 9.38 11.1 11.66
Performance of the ST-ResNet and CrowdNet models for crowd flow prediction problem on the BikeNYC dataset.

Images

A visual comparison of the mean real crowd inflows with the mean crowd inflows predicted by STResNet and AdjNet is provided by the following image.

Comparison of mean real crowd inflows (center) with those predicted by CrowdNet (left) and STResNet (right) using tile size of 1000m and time intervals of 30 minutes.

Train

Dataset

Flow data available online

Install

At first you need to clone this repository:

$ git clone https://github.com/jonpappalord/crowd_flow_prediction
$ cd crowd_flow_prediction

Create a new environment:

$ python -m venv yourenvname 
$ source yourenvname/bin/activate

Launch the following command to install the required packages

$ pip install -r requirements.txt

Usage

We have prepared an instance for running the model, that is main.py.

$ python main.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages