NVlabs / SMERF

Other
96 stars 16 forks source link

About normalizing polyline's coordinates #9

Open FURYTAIL opened 5 months ago

FURYTAIL commented 5 months ago

Hi, Thanks for the great work!

Would you mind sharing some more details about the Positional Embedding part.

First, in polyline sequence representation, every polyline's corresponding coordinates are normalized with respect to the BEV range before embedding them.

Following the idea of code x = (x - self.offset.to(x.device)) / self.range.to(x.device) * self.scale. The coordinate origin is first adjusted, and x axis and y axis is then scaled respectively by dividing the width and height of BEV range, finally 2 pi is applied to normalize the coordinates to [0, 2pi].

Generally,it is easy to understand this procedure when SD Map covers the same range as BEV range does.

The visualization results of this process are:

  1. Getting SD Map (The red rectangle in the middle shows the BEV Range) image
  2. Shifting the coordinate origin image
  3. Scaling axis image
  4. Applying 2 pi image

From the visualization results of the a map graph(which is the input of MapGraphTransformer), the SD Map covers a larger range than the BEV range, which means when we are trying to normalize the coordinates by dividing x by the width of BEV range and dividing y by the height of BEV range, it is certain we will get a value larger then 1, which means when 2 pi is multiplied, the value range will no longer be [0, 2pi].

I understand that using SD Maps that cover larger range can bring more information and will benefit solving occlusion and far distance prediction problem. I'd like to know does that mean you've tried to used the SD Map that covers the same range as the BEV range does as the input (which can be normalized to range [0-1]). And does the periodicity of sinusoidal function helps embed the position that beyond the BEV range.

The 2nd question is about the temperature scale T, why 1000 is adopted? Dose 'SD Map covers larger range than the BEV range' taken into consider when choosing this value?

Many thanks for the attention and really looking forward to your reply.

Rkyzzy commented 2 months ago

Hi I wonder have you solved this same range problem? Do you have any updates or thoughts on this? Thanks in advance!