Tsinghua-MARS-Lab / DenseTNT

MIT License
464 stars 122 forks source link

Some confusions about this code #31

Open jackson-sunj opened 2 years ago

jackson-sunj commented 2 years ago

Hi, Thank you for sharing the great work. I have some confusions about the code, and I put these questions in a PDF file, please check it out, thanks for your reply! Some confusions about this code.pdf

GentleSmile commented 2 years ago
  1. Loss for lane can be found in 'lane_scoring' module (in our updated code)
  2. New detailed description for this function may be helpful
  3. Scores of heatmap indicate probability distribution of final position. Generated 6 trajectories together with their scores can be treated as a simplification of the heatmap.
jackson-sunj commented 2 years ago

Thank for your reply!
I have another question about Goal_2D, in the code, the function def get_subdivide_points(polygon): is still dense sampling on the lane centerline, where can it be expressed that it is dense sampling on the lane?

GentleSmile commented 2 years ago

We treat sampling on the centerline as sparse sampling. Dense sampling is performed at https://github.com/Tsinghua-MARS-Lab/DenseTNT/blob/a0e3b8a51aecf9f9046db4fb72e2793684c96e69/src/modeling/decoder.py#L143

jackson-sunj commented 2 years ago

Thank for your reply! I also want to ask you a question,without using " a set predictor ", we calculate the loss in " goals_2D_per_example_calc_loss ",we get a " predict_traj " It's just to calculate loss? and we get 6 trajectories using the topk(6) scores. How do we determine that the calculated " predict_traj " must be in the 6 trajectories with the highest score in the end?

weihuaLi1 commented 2 years ago

I also have the similar question. We get the "highest_goal" in https://github.com/Tsinghua-MARS-Lab/DenseTNT/blob/a0e3b8a51aecf9f9046db4fb72e2793684c96e69/src/modeling/decoder.py#L228 But it not used for generating the trajectory. So what is the usage of it?

GentleSmile commented 2 years ago

predict_traj here is only used to calculate loss for trajectory completion. During training, we don't need to generate top K goals. During evaluation, we get top K goals at https://github.com/Tsinghua-MARS-Lab/DenseTNT/blob/a0e3b8a51aecf9f9046db4fb72e2793684c96e69/src/modeling/decoder.py#L263