Giter Site home page Giter Site logo

inhwanbae / npsn Goto Github PK

View Code? Open in Web Editor NEW
65.0 5.0 12.0 101.1 MB

Official Code for "Non-Probability Sampling Network for Stochastic Human Trajectory Prediction (CVPR 2022)"

Home Page: https://ihbae.com/publication/npsn/

License: MIT License

Python 98.48% Shell 1.52%
human-trajectory-prediction motion-forecasting multi-agent sampling-bias sampling-methods deep-learning cvpr2022 autonomous-vehicles

npsn's People

Contributors

inhwanbae avatar jinhwipark 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

Watchers

 avatar  avatar  avatar  avatar  avatar

npsn's Issues

some issues about GCS dataset

Thanks for your great work!
I am a little confused about the data preprocessing for GCS Dataset. In the paper, you used the first 3.2s (8 frames) as the observed trajectory and the next 4.8s (12 frames) as GT. However, I checked the paper [59], and found that the FPS is 25 and the annotated fps is 1.25. Thus, the time interval between two neighboring annotated frames is 1/1.25=0.8s. This means 8 steps in the past trajectory spend 8*0.8=6.4s, which is different from your paper. I am wondering if my understanding is correct.
Also, could you please release the preprocessing code or provide more details about the data preprocessing for GCS dataset (train/test split)?

Question about the dimension of the Box-muller transform

Hi,

I have a question about the dimension of the Box-muller transform. In my understanding, the Box-muller transform should work on the number of samples (n) dimension. However, in the code, it seems that you use the BM tran. on the number of feature (s) dimension. See:

NPSN/train_npsn.py

Lines 71 to 78 in 97f56cf

elif args.baseline == 'pecnet':
obs_traj, pred_traj, mask, x, y, initial_pos, _ = model_forward_pre_hook(batch, data_sampler=data_sampler)
# NPSN
loc = model_npsn(obs_traj.unsqueeze(dim=0).transpose(-1, -2), mask=mask)
loc = loc.squeeze(dim=0).permute(1, 0, 2)
loc = box_muller_transform(loc)
# PECNet
all_guesses = model_forward(model, x, initial_pos, loc)

After line 75, loc has the shape of n, batch size, s.

And the bull_muller_transform() here

NPSN/npsn/utils.py

Lines 7 to 14 in 97f56cf

def box_muller_transform(x: torch.FloatTensor):
r"""Box-Muller transform"""
shape = x.shape
x = x.view(shape[:-1] + (-1, 2))
z = torch.zeros_like(x, device=x.device)
z[..., 0] = (-2 * x[..., 0].log()).sqrt() * (2 * np.pi * x[..., 1]).cos()
z[..., 1] = (-2 * x[..., 0].log()).sqrt() * (2 * np.pi * x[..., 1]).sin()
return z.view(shape)

seems to work on the last dimension of the tensor x, which is the s dimension.

Please let me know if there is anything wrong with my understanding. Many thanks!

Box-Muller

Thanks for your great work!
But I am confused about the Box-Muller transformation. I know how to do it, but i want to know why we should do it. I'll appreciate it if you could give me an answer.

PECNet+NPSN on SDD

Hi,
Thanks for the nice work, I have a question regarding reproducing the numbers in Table 1 on SDD with PECNet+NPSN, which is 8.56/11.85 on minADE/minFDE.

Do you have the pretrained models, and also the training pipeline?

Thanks in advance!

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.