jingxuanyang / NeuralNDE

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Learning Naturalistic Driving Environment with Statistical Realism

Michigan Traffic Lab, University of Michigan

Introduction of the Project

About

This project contains two parts:

  • Source code used to analyze experiment results and generate figures;
  • The Ann Arbor dataset that we used to train NeuralNDE.

Code Structure

Learning-Naturalistic-Driving-Environment/
|__ result_analysis: data analysis and figure plotting codes
|__ requirements.txt: required packages

Installation

Installation and configuration

Clone this repository

git clone https://github.com/michigan-traffic-lab/Learning-Naturalistic-Driving-Environment.git

Create a new virtual environment (Optional)

You are recommended to create a new Conda environment to install the project

conda create -n NNDE python=3.9
conda activate NNDE

Install all required packages

To install the Python packages required for this repository, execute the command provided below:

pip install -r requirements.txt

Usage

The experiment data can be downloaded here. Unzip the file and put them into the result_analysis/raw_data folder, the file structure should look like:

Repo-path/result_data/
|__ raw_data

The results for NeuralNDE in the Ann Arbor roundabout are located in the raw_data/NeuralNDE folder. Each sub-folder contains the results generated by one simulation worker that runs in parallel. There include around 15,000 simulation hours of data, where all data are used for calculating crash-related metrics (e.g., crash rate/type/severity) and 100 hours of data (folder 2000 to 2099) are used for other metrics (e.g., instantaneous speed, distance, etc.).

You can run scripts in the result_analysis folder to process the data and generate figures. For example, to generate instantaneous speed distributions, you can run

cd result_analysis
python instantaneous_speed.py

The result and figure will be saved in result_analysis/plot folder.

Dataset

In this repository, we also provide the Ann Arbor dataset that we used to train NeuralNDE. The dataset contains the vehicle trajectory data perceived by the roadside perception system deployed at the two-lane roundabout at the intersection of State St. and W. Ellsworth Rd. in Ann Arbor, Michigan.

  • The data was collected from 10 am to 5 pm on May 2nd, 2022.
  • The data sample rate is 2.5Hz.

Download

The dataset can be downloaded here.

Data format

The dataset contains multiple json files.

trajectory_data
  |-2021-05-02 10-03-48-671927.json
  |-2021-05-02 10-03-49-076785.json
  |-2021-05-02 10-03-49-475787.json
  ...

Each json file contains the vehicle trajectory data of one frame. Here is an example of the data in a json file

[
    {
        "vid": "1",
        "x": 86.76476951608201,
        "y": -25.098855800926685,
        "heading": 163.5021444664423
    },
    {
        "vid": "3",
        "x": 69.60102021666243,
        "y": -24.766377145424485,
        "heading": 198.9397031364029
    },
   ...
]

where vid denotes the unique vehicle id, x, y denote the vehicle position (local x, y coordinates, unit in meter), and heading denotes the vehicle heading (starting from east and anticlockwise, unit in degree). An illustration figure of the roundabout is included in the zip file.

Terms of use

License

This project is licensed under the [PolyForm Noncommercial License 1.0.0]. Please refer to LICENSE for more details.

Acknowledgment

This work is supported by the U.S. Department of Transportation Region 5 University Transportation Center: Center for Connected and Automated Transportation (CCAT) of the University of Michigan, and National Science Foundation.

Developers

Zhengxia Zou (zhengxiazou@gmail.com)

Xintao Yan (xintaoy@umich.edu)

Contact

Henry Liu (henryliu@umich.edu)

About

License:Other


Languages

Language:Python 100.0%