Giter Club home page Giter Club logo

deepmg's Introduction

DeepMG: Learning to Generate Maps from Trajectories

In this study, we aim to generate a routable road network from trajectories using a deep learning approach.

Paper

If you find our code useful for your research, please cite our paper:

Sijie Ruan, Cheng Long, Jie Bao, Chunyang Li, Zisheng Yu, Ruiyuan Li, Yuxuan Liang, Tianfu He, Yu Zheng. "Learning to Generate Maps from Trajectories". AAAI 2020.

Geometry Translation

Feature Extraction

python feature_extraction.py ../data/conf_tdrive_sample.json

Training

python train.py --name t2rnet_tdrive_sample --dataroot ../data/tdrive_sample/learning --lam 0.2 --batch_size 8 --model t2rnet --display_id -1

Inference

python test.py --name t2rnet_tdrive_sample --dataroot ../data/tdrive_sample/learning --lam 0.2 --model t2rnet

Region Concatenation

python region_concatenation.py --tile_path ./results/t2rnet_tdrive_sample/test_latest/images/ --conf_path ../data/conf_tdrive_sample.json --results_path ../data/tdrive_sample/results/

Topology Construction

Graph Extraction

python main.py --phase 1 --conf_path ../data/conf_tdrive_sample.json --results_path ../data/tdrive_sample/results/

Link Generation

python main.py --phase 2 --conf_path ../data/conf_tdrive_sample.json --results_path ../data/tdrive_sample/results/

Map Refinement

Map Matching

python main.py --phase 3 --conf_path ../data/conf_tdrive_sample.json --results_path ../data/tdrive_sample/results/

Edge Pruning

python main.py --phase 4 --conf_path ../data/conf_tdrive_sample.json --results_path ../data/tdrive_sample/results/

Requirements

DeepMG uses the following dependencies with Python 3.6

  • gdal==2.3.2
  • opencv==3.3.1
  • rtree==0.8.3
  • networkx==2.3
  • scikit-image==0.16.2
  • pytorch==1.1.0
  • torchvision==0.3.0

Other packages can be easily installed using conda install, while the following scripts are recommended for gdal, opencv and pytorch.

conda install -c conda-forge gdal==2.3.2

conda install -c menpo opencv==3.3.1

conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=9.0 -c pytorch -c defaults -c numba/label/dev

Note that gdal must be installed first, and a restart might be required after all installation.

Datasets

  • Trajectory Data

    • There are some open-source trajectory datasets, e.g., TDrive.
    • Data should be organized as text files. A text file can contain several trajectories (refer to sample.txt.template)
  • Road Network Data

deepmg's People

Contributors

sjruan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.