tedhuang96 / gst

[RA-L + ICRA22] Learning Sparse Interaction Graphs of Partially Detected Pedestrians for Trajectory Prediction
MIT License
38 stars 3 forks source link

How to make a training dataset #2

Closed CAI23sbP closed 1 year ago

CAI23sbP commented 1 year ago

Hi @tedhuang96 !. I read your code and paper. it was powerful to me. Anyway i want to train GST by my human trajectories, could you explain about how to make a dataset?

tedhuang96 commented 1 year ago

Hi @CAI23sbP , thank you for the question! To make dataset, you can check biwi_eth.txt as an example. It is essentially a txt file of a Nx4 table. For each row, the first entry means the frame id, the second entry means the pedestrian id, and the third and the fourth entries are xy positions of the pedestrian at the frame. Tab ('\t') is used to split the entries in one row.

You need to organize your human trajectories into this kind of txt file. If you want to name your dataset as 'abc' for example, you need to create a folder gst/datasets/abc/raw like gst/datasets/eth/raw, and then move the txt file into gst/datasets/abc/raw. The name of the txt file does not matter.

Before you run the shell scripts like create_datasets.sh and train_sparse.sh, replace for dataset in eth hotel univ zara1 zara2; do with for dataset in abc; do.

https://github.com/tedhuang96/gst/blob/ac300d34e17fa2d6639c1df329ac1e8f80bccaec/run/create_datasets.sh#L1

https://github.com/tedhuang96/gst/blob/ac300d34e17fa2d6639c1df329ac1e8f80bccaec/run/train_sparse.sh#L22

CAI23sbP commented 1 year ago

Wow! Thank you for your perfect answer!.