Git Product home page Git Product logo

trafficscenarios-rfapsclustering's Introduction

TrafficScenarios-RFAPsClustering

The official code for the paper: "Traffic Scenario Clustering by Iterative Optimisation of Self-Supervised Networks Using a Random Forest Activation Pattern Similarity" from Intelligent Vehichle Symposium 2021

Dependencies

  • Python (>=3.6)
  • scikit-learn (0.21.0) (custom) -> Installation instructions given below
  • scipy (1.5.2)
  • numpy (0.19.0)
  • Pytorch (1.14)
  • tkinter
  • tqdm
  • shutil

Custom Scikit learn Installation Instructions

Table of Contents

  1. General descriptiopn
  2. Traffic Scenarios
  3. Clustering

General description

The 7 highways classes are divided into 4 labelled classes and the rest of the traffic scenarios from the three classes are considered unlabelled. The clustering is done in a three step process. Step I: Self-supervised initialisation, a 3D CNN is trained on a pretext task for predicting the temporal order of the occupancy grids representing the traffic scenarios, Step II: Classification, the trained 3D CNN is fine-tuned to classify the 4 labelled classes, Step III: CLustering, the 3D CNN trained until now is iteratively optimised to cluster the scenarios from the 3 unlabelled classes.

Traffic Scenarios

The traffic scenarios are generated from the HighD Dataset [1]. 7 common highway scenarios are extracted from highD dataset. The 7 scenarios are as follows:

- Ego - Following: The ego vehicle follows a leader vehicle.
- Ego - Right lane change: The ego makes a lane change to the right lane.
- Ego - Left lane change: The ego makes a lane change to the left lane.
- Leader - Cutin from left: The leader vehicle  makes a lane change in front of the ego lane from the left lane of ego. 
- Leader - Cutin from right: The leader vehicle  makes a lane change in front of the ego lane from the right lane of ego.
- Leader - Cutout to left: The leader vehicle  makes a lane change from  the ego lane to the left lane of ego.
- Leader - Cutout to right: The leader vehicle  makes a lane change  from  the ego lane from the right lane of ego.

Clustering

Please fill in the forms to request access to the HighD Data from https://www.highd-dataset.com/. The code for processing the data is available in https://github.com/lab176344/Traffic_Sceanrios-VoteBasedEVT. Process the data and place the .mat file in .data/datasets/Scenarios/ and use the name HighDScenarioClassV1_Train/Test/Val. Followed by that the scripts mentioned below can be run one after the other to cluster the scenarios. Note: The example in this repo is only for 4 known and 3 unknown classes, changes should be made for other experiments

Step 1: Self-Supervised Initialisation -> python selfsupervised_learning_scenario.py

Step 2: Classification -> python supervised_learning_scenarios.py

Step 3: Clustering -> python clustering_scenarios.py

Reference

[1] The highD Dataset: A Drone Dataset of Naturalistic Vehicle Trajectories on German Highways for Validation of Highly Automated Driving Systems, Krajewski et al., ITSC 2018

  • Thanks to Kai Han for his AutoNovel repository https://github.com/k-han/AutoNovel, the implementation of RFAPs based clustering is based on that and extensions have been proposed.

trafficscenarios-rfapsclustering's People

Contributors

lab176344 avatar

Stargazers

 avatar HWOLF avatar  avatar  avatar  avatar  avatar XIN, Ren avatar

Watchers

James Cloos 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.