Skip to content

A Master Thesis project to increase the temporal resolution of vehicle trajectories using recurrent time series imputation.

Notifications You must be signed in to change notification settings

hasnainroopawalla/super-resolution-vehicle-trajectory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Super-Resolution Vehicle Trajectory using Recurrent Time Series Imputation

This repository is a Master Thesis project conducted at Scania CV AB and Uppsala University, Sweden. The thesis publication can be found here.

Aim

This thesis aims to increase the temporal resolution of the data (vehicle trips) using deep neural networks. Given a temporally ordered sequence of geospatial coordinates indicating a truck’s trajectory, the objective is to estimate the intermediate positions of the truck. Furthermore, the model should implicitly learn the actual road network and predict feasible positions of the truck. An example of a trip where a truck collects data every 10 minutes can be found in Table 1.

Table 1

The objective is to double the frequency of the data, i.e., to generate intermediate latitude and longitude values for the truck every 5 minutes, which can be found in Table 2.

Table 2

Preprocessing

The Preprocessor class can be found here and the preprocessing utilities can be found here.

A few randomly sampled, preprocessed subtrips plotted on the map are shown below:

Subtrips example

Results

The axes text in the following figures is black in color and may not be visible in dark mode.

Training and Validation Error

Training and Validation Loss

Qualitative results

Quantitative results

Instructions

  1. Install the requirements
    $ pip install -r requirements.txt
    
  2. Set the hyper-parameters in the Config class. The final set of hyper-parameters used in this thesis are as follows:
    class Config:
     model_name: str = "model"
     data_path: str = "data"
     traj_len: int = 30
     stride: int = 4
     traj_dist: int = 1000  # meters
     epochs: int = 500
     learning_rate: float = 1e-4
     batch_size: int = 128
     hid_dim: int = 100
     load_weights: bool = False
     checkpoint_freq: int = 10
     training: bool = True
  3. Navigate to the geo_rits package
    $ cd geo_rits
    
  4. Begin model training
    $ python3 train.py
    
  5. The trained model can be found in the models/ directory.

An example of the input subtrips and masks can be found in the data/ directory.

Acknowledgments

The original publication of the RITS architecture- "BRITS: Bidirectional Recurrent Imputation for Time Series, Wei Cao, Dong Wang, Jian Li, Hao Zhou, Lei Li Yitan Li. (NerIPS 2018)" can be found here.

The TensorFlow implementation of the original RITS architecture used in this project can be found here.

About

A Master Thesis project to increase the temporal resolution of vehicle trajectories using recurrent time series imputation.

Topics

Resources

Stars

Watchers

Forks

Languages