Giter VIP home page Giter VIP logo

trafficpredict's Introduction

TrafficPredict

Pytorch implementation for the paper: TrafficPredict: Trajectory Prediction for Heterogeneous Traffic-Agents (AAAI), Oral, 2019

The repo has been forked initially from Anirudh Vemula's repository for his paper Social Attention: Modeling Attention in Human Crowds (ICRA 2018). If you find this code useful in your research then please also cite Anirudh Vemula's paper.

Comparison of results:

Methods Paper ADE This repo ADE Paper FDE This repo FDE
pedestrian 0.091 0.088 0.150 0.132
bicycle 0.083 0.075 0.139 0.115
vehicle 0.080 0.090 0.131 0.153
total 0.085 0.084 0.141 0.133

Requirements

How to Run

  • First cd srnn
  • To train the model run python train.py (See the code to understand all the arguments that can be given to the command)
  • To test the model run python sample.py --epoch=n where n is the epoch at which you want to load the saved model. (See the code to understand all the arguments that can be given to the command)

trafficpredict's People

Contributors

huang-xx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

trafficpredict's Issues

About the scale of (x,y) position.

Hello!
Thank you for sharing this amazing job.

I have a question about the code, and I am wondering that I use this code in the right way.
In 'sample.py' code for calculating ADE and FDE, does this code scale x,y position to real value?
This is because, in the preprocess step for generating .ckpl file, the preprocess function scales (x,y) position down to the range of (-1, 1).
Which means, if I want to get real predicted results, do I need to scale the position up?

In addition, I am wondering that numerical analysis of FDE and ADE is calculated by the position (x,y) which is not scaled up.

Outputs look wrong

I trained the model, but when I am plotting the results, it looks like this
trafpredict

This is not nearly as good as the images they show in the paper you reference though. Do you have a pretrained model with decent results?

How to Visualize the ouput

I have trained the model and when I run the sample.py I have plotted the output but I need to Visualize on the image can you help me how to visualize on the image

Thank You
Daniel

License

Thanks for putting this out there! Could you clarify the license and add a license file? Is it MIT?

Questions : preprocess

Hi,
I have some doubts about the pre-processing part.
Why does it want to multiply by two and then reduce one ( *2 - 1 ) at "frame_preprocess"?
What is the relationship between this and normalization?

data[:, 3] = (
(data[:, 3] - min_position_x) / (max_position_x - min_position_x)
) * 2 - 1
data[:, 4] = (
(data[:, 4] - min_position_y) / (max_position_y - min_position_y)
) * 2 - 1

How do you know which preprocessing the paper did?

You are comparing your results with the results from the paper and report that your results are better. However, you are using the normalized values to calculate this error as far as I can see. Since the error depends on the scale, you assume that the paper did the same preprocessing of the data as you did (division by factor 2000 as far as I can see that from the code). How do you know that this is the same as the authors did?

Bug in train.py

When I run the train.py, this error occurs,would you help me to check this question?3Q
RuntimeError: size mismatch, m1: [2 x 3], m2: [64 x 64] at C:/w/1/s/tmp_conda_3.7_044431/conda/conda-bld/pytorch_1556686009173/work/aten/src\THC/generic/THCTensorMathBlas.cu:268

Explanation of data given

I am looking at the code and cannot figure out what the numbers in your labeled data file indicate. An explanation would be good.

Additionally, in the following picture, is the circled number an identifier for a vehicle/pedestrian/bicycle? If so, how is it numbered?

image

We are looking to retrain the model with different category identifiers above 3 (1 through 5). Is that feasible?

The Graph Generator

how I can get a graph from a photograph , like this paper ,how transform each frame of the picture into graph ?

prediction test

hello,I have a problem,and in the trajectory prediction process, the data set is replaced by prediction-test, and a series of errors are always reported. In addition, it is known that predict 4 frames after 6 frames, why there are more than 6 frames of data in the prediction dataset. Thank you for you to give guidance and help

作者您好,对您所使用的数据集不太理解,问题请看文中内容

估计您是使用apollo的轨迹数据集,您所使用的数据集在https://github.com/ApolloScapeAuto/dataset-api/tree/master/trajectory_prediction有所介绍,主要是对Data Structure的部分信息不理解(相信作者对该数据集应该理解透彻了,希望能给予点解答):
Each line in a file contains frame_id, object_id, object_type, position_x, position_y, position_z, object_length, object_width, object_height, heading. 这句话中heading是什么?还有position_x, position_y, position_z的坐标系的原点在哪以及x轴方向,y轴方向,z轴方向是哪?这个三维坐标如何转换到图片上的二维坐标?

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.