Giter Site home page Giter Site logo

rntrajrec's Introduction

RNTrajRec

About

Source code of the ICDE'23: RNTrajRec: Road Network Enhanced Trajectory Recovery with Spatial-Temporal Transformer

Requirements

  • Python==3.6
  • pytorch==1.8.0
  • rtree==0.9.4
  • GDAL==2.3.3
  • networkx==2.3
  • dgl=0.8.0.post2
  • seaborn=0.11.2
  • chinese-calendar=1.6.1

Data format

OSM map format

Map from OSM that contains: edgeOSM.txt nodeOSM.txt wayTypeOSM.txt.

Train data format

Train data has the following format:

____ ROOT
  |____ train
    |____ train_input.txt
    |____ train_output.txt
  |____ valid
    |____ valid_input.txt
    |____ valid_output.txt
  |____ test
    |____ test_input.txt
    |____ test_output.txt

Note that:

  • {train/valid/test}_input.txt contains raw GPS trajectory, {train/valid/test}_output.txt contains map-matched trajectory.
  • The sample rate of input and output file for train and valid dataset in both raw GPS trajectory and map-matched trajectory need to be the same, as the downsampling process in done while obtaining training item.
  • The sample rate of test input and output file is different, i.e. test_input.txt contain low-sample raw GPS trajectories and test_output.txt contain high-sample map-matched trajectories.
  • We provide a toy dataset in Porto under ./data/Porto/ and OSM map for Porto under ./data/roadnet/.

Training and Testing

  • For training & testing with $\epsilon_\tau=\epsilon_\rho*8$ in Porto dataset, run the following command:
python -u multi_main.py --city Porto --keep_ratio 0.125 --pro_features_flag \
      --tandem_fea_flag --decay_flag
  • For training & testing with $\epsilon_\tau=\epsilon_\rho*16$ in Porto dataset, run the following command:
python -u multi_main.py --city Porto --keep_ratio 0.0625 --pro_features_flag \
      --tandem_fea_flag --decay_flag

Citations

If you find this repo useful and would like to cite it, citing our paper as the following will be really appropriate:

@article{chen2022rntrajrec,
  title={RNTrajRec: Road Network Enhanced Trajectory Recovery with Spatial-Temporal Transformer},
  author={Chen, Yuqi and Zhang, Hanyuan and Sun, Weiwei and Zheng, Baihua},
  journal={arXiv preprint arXiv:2211.13234},
  year={2022}
}

rntrajrec's People

Contributors

chenyuqi990215 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.