InhwanBae / ETH-UCY-Trajectory-Visualizer

MIT License
12 stars 0 forks source link

Trajectory prediction distribution visualization. #2

Open daleigehhh opened 5 months ago

daleigehhh commented 5 months ago

Hi Inhwan,

Do you know how to visualize the distribution-like trajectory like in Sophie?

Thanks. ![Uploading distribution_viz.png…]()

InhwanBae commented 5 months ago

Hi @daleigehhh,

You can achieve this using the Seaborn library. Just substitute the generated trajectories with 2D filled seaborn.kdeplot.

daleigehhh commented 4 months ago

Thank you, I successfully plot the distribution by using seaborn.kdeplot 8910

daleigehhh commented 4 months ago

Hi @InhwanBae,

I appreciate to your kind reply. And I have another question. In your code, 'utils/dataloader_image.py':

def __getitem__(self, index): start, end = self.seq_start_end[index] frame = self.frame_list[index] + 70 - 5 out = [self.obs_traj[start:end, :], self.pred_traj[start:end, :], self.frame_list[index], self.get_image_from_frame(frame)] return out

When acquiring the starting frame image corresponding to trajectories, why frame = self.frame_list[index] + 70 - 5. I am confusing about the numbers 70 and 5. I guess the number 70 represents the total frames counted in 8-12 protocol, what if I organize the training data's obs length to 2,4,6,8. Should I change the number as well or just directly locate the frame in the dataset table. Thanks!

InhwanBae commented 4 months ago

Hi @daleigehhh,

You are right. 70 is used to obtain the frame ID of the last observation frame, calculated as ({obs_len} - 1) * 10 (10 is the multiplier between video fps and trajectory fps). Here, we manually subtract 5 for better visualization. You can use 10-5, 30-5, 50-5, 70-5 for each observation length of 2, 4, 6, and 8, respectively.