umautobots / bidirection-trajectory-predicter

The code for Bi-directional Trajectory Prediction (BiTraP).
Other
79 stars 22 forks source link

Extracting Pedestrian Trajectory (.pkl) files #13

Closed sanketh1691 closed 2 years ago

sanketh1691 commented 2 years ago

Hi @ksachdeva, @MoonBlvd I am trying to extract the pedestrian trajectory as asked in the README of this repo in the form of pickle files from JAAD and PIE original repos but unable to find proper functions that do the required operations, which will generate the pedestrian trajectory data. Can you help/guide me on how to extract this data?

Thank you, Sanketh

josephT1962 commented 2 years ago

Meet the same problem. Not able to generate the .pkl files

MoonBlvd commented 2 years ago

Hi @sanketh1691 and @josephT1962 , I believe you are talking about this: https://github.com/ykotseruba/JAAD#using-the-interface. We did not do any special extraction in our paper, everything was from JAAD and PIE repos. Feel free to let me know if you have any other questions.

sanketh1691 commented 2 years ago

Hi @MoonBlvd ,

Thanks for the response, in this repo (in training section - "https://github.com/umautobots/bidireaction-trajectory-prediction#training"), it is written that "the users need to download the dataset from their original webpage and follow their directions to extract pedestrian trajectory files ('.pkl'). The trajectories should locate at the DATASET.TRAJECTORY_PATH in the configuration file." I found a function in jaad_data.py called generate_database(), which will give me complete dataset in pickle format but I couldn't find a function to get the pedestrian trajectory files in (.pkl) format. Can you tell how to get those set of files from JAAD dataset.

Thank you, Sanketh

josephT1962 commented 2 years ago

Hi @MoonBlvd, thanks for the reply. I did use the generate_database() function in the JAAD repo, but it will give me a single jaad_database.pkl file. Is it that the one we are looking forward to using? Thank you.

Best, Joe

MoonBlvd commented 2 years ago

Have you tried this? https://github.com/ykotseruba/JAAD#sequence-analysis

josephT1962 commented 2 years ago

Have you tried this? https://github.com/ykotseruba/JAAD#sequence-analysis

I tried it but it only gives a sequence like the picture below without generating any pkl files if I am using the generate_data_trajectory_sequence(). Screenshot from 2021-10-23 23-03-03

sanketh1691 commented 2 years ago

Yeah same for me too, I tried it with generate_data_trajectory_sequence() and it doesn't give what is required for the pre-trained model to be tested.

MoonBlvd commented 2 years ago

It's been so long since I worked on this project so I probably had some wrong memory about our code. After re-reading it, it seems that the ".pkl" is only for optical flow input (see here), which is not actually used by our model. I think it should be safe to just remove it and all the other code related to "flow" or "flow_input".

sanketh1691 commented 2 years ago

Hi @MoonBlvd , thank you again for your response, so the input dataset can be the pickle file generated by "generate_database()" of jaad_data.py ?

MoonBlvd commented 2 years ago

Yes I think it should work. Let me know if it has other problems.

sanketh1691 commented 2 years ago

But the description in the readme says that we have to generate those pickle files for each pedestrian. So, just the single file wouldn't be enough right.

MoonBlvd commented 2 years ago

Did you try what I said and found it not work? I do not havd access to our lab machines, but according to what i read from the code, the so-called trajectory pickle files are only for optical flow data which is not actually used in our paper.

MoonBlvd commented 2 years ago

I think it should be safe to just remove it and all the other code related to "flow" or "flow_input".

I'm closing this issue since I believe this could be the solution.