OpenDriveLab / Openpilot-Deepdive

Our insights of Openpilot, a deepdive project on it
MIT License
231 stars 66 forks source link

issue about network #31

Closed Yutong-gannis closed 7 months ago

Yutong-gannis commented 1 year ago

why use three different method to handle trajectory https://github.com/OpenDriveLab/Openpilot-Deepdive/blob/72612190da3b7d78748debaa8a08766b6f78912c/model.py#L51-L53

ElectronicElephant commented 8 months ago

Hello,

First of all, in common practice, the neural networks should not output some values that are too large. Typically, the numbers in the x and y axis can go beyond 100 meters. Therefore, we need to use some function to "boost" the values from smaller network raw output to some larger numbers.

Then, since the x axis points at the forward direction. We believe the car should not go backward, so we use exp function. In terms of y axis, the car can either go left or right so we use sinh. The numbers in the z axis are usually less than +/- 10 meters so we directly use the raw output.

However, I have to admit that we use such functions without any cross validation. Therefore, you can remove them or use other functions and maybe you will find the network performs better.