cunjunyu / STAR

[ECCV 2020] Code for "Spatio-Temporal Graph Transformer Networks for Pedestrian Trajectory Prediction"
MIT License
338 stars 78 forks source link

Some potential bugs in Trajectory_Dataloader #22

Open HRHLALALA opened 2 years ago

HRHLALALA commented 2 years ago

Hi, I found three potential bugs in src/utils/Trajectory_Dataloader:

Bug 1 https://github.com/Majiker/STAR/blob/d2dd113e3deb1098760c454ab15e7cb0652f3c0c/src/utils.py#L216 I think there is no +1 here otherwise it will start from index 1

Bug 2 https://github.com/Majiker/STAR/blob/d2dd113e3deb1098760c454ab15e7cb0652f3c0c/src/utils.py#L250 Here should be frameend_pedi = set(frameped_dict[cur_set][cur_frame + (self.args.seq_length-1) * skip[cur_set]])

Bug 3 https://github.com/Majiker/STAR/blob/d2dd113e3deb1098760c454ab15e7cb0652f3c0c/src/utils.py#L412 It seems like all position at (0,x) will be considered as missing which may drop several trajectories. I recommend to change the rule as np.nan


These bugs may result in fewer samples with full length being extracted than in Social GAN. One evidence is that when i add

if not iffull:
    continue

There are 24254 and 24334 full length samples (ped_cnt) extracted from UNIV test set before and after the modification.

Hope this helps for further research if the total number of trajectories is sensitive to the results.