agrimgupta92 / sgan

Code for "Social GAN: Socially Acceptable Trajectories with Generative Adversarial Networks", Gupta et al, CVPR 2018
MIT License
813 stars 261 forks source link

About training and evaluation: in case target objects do not exist in 20 frames. #35

Closed himidev closed 5 years ago

himidev commented 5 years ago

Hi.

How do you deal with target objects that do not have 20 frames in the dataset?

amiryanj commented 5 years ago

As far as I can see, there are two condition for adding a sample to the train/test dataset:

  1. The length of the trajectory >= 20
  2. The number of pedestrians in the frame >= 2

otherwise they will not be considered. However if you want to use the maximum available information from the dataset, you can apply some kind of padding on the trajectories. For example:

  1. Zero Padding: filling with zero values,
  2. Border Replicate: to propagate the first or last observed frame,
  3. Linear Extrapolation: to extrapolate the trajectories using some motion model (const-vel, const-acc, etc). In this case the RNNs will not be misled by feeding them strange inputs.
himidev commented 5 years ago

@amiryanj Thank you for your comment!