GithubHelp home page GithubHelp logo

cywputao / data-preprocessing-for-traj-pred Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rodolphefarrando/data-preprocessing-for-traj-pred

0.0 0.0 0.0 6 MB

Data preprocessing for the trajnet dataset for pedestrian trajectory prediction

Python 100.00%

data-preprocessing-for-traj-pred's Introduction

data-preprocessing-for-traj-pred

Data preprocessing for the trajnet dataset for pedestrian trajectory prediction

Trajectory prediction has now some state-of-art methods. Several papers analyses the accuracy of those methods. Beyond their respective performance, there is always some cases for which the methods are struggling with the prediction. The idea is to separate trajectories by type, that is the way the pedestrian is moving and the way her/his environment interacts with her/him.

To have a better visualization of the trajectories and simplify learning, all of them are normalized. The first point is shifted towards the origin (0,0) and the trajectory is rotated such that the first segment (between first and second point) is pointing upwards:

Before shift and rotation:

After shift and rotation:

Two ways of classification are possible for the trajectories. The first one focuses more on interactions around the trajectory of interest, while the second one focuses on the direction of the trajectory.

For the interaction classification, six different criteria are possible for the trajectories:

  1. static trajectory without interaction
  2. static trajectory with static interaction
  3. static trajectory with dynamic interaction
  4. dynamic trajectory without interaction
  5. dynamic trajectory with static interaction
  6. dynamic trajectory with dynamic interaction

By static we mean a pedestrian traveling less than two meters during the twenty frames (8 seconds and so less than 0.25 m/s) provided by the data.

Example of type 1 trajectory.

Example of type 2 trajectory.

Example of type 3 trajectory.

Example of type 4 trajectory.

Example of type 5 trajectory.

Example of type 6 trajectory.

For the direction classification, three criteria are defined:

  1. static trajectory
  2. linear trajectory
  3. non-linear trajectory

Static trajectories are defined the same way as for the previous classification. To know if a trajectory is linear or not, we only look at the last 10 coordinates, that is the coordinates we need to predict. In those coordinates, if the pedestrian makes a change of direction greater than 20°, then the trajectory is considered as non-linear, otherwise, it is linear.

Example of type 2 trajectory.

Example of type 3 trajectory.

To better see the interaction between trajectories a dynamic plot is also implemented. It creates a .gif file that makes trajectories appear depending on the frame. The following gif shows the same figure as type 6 trajectory dynamically:

data-preprocessing-for-traj-pred's People

Contributors

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