amazon-science/polygon-transformer

About the generation of 2D coordinates codebook

LinfengYuan1997 opened this issue · 5 comments

Thanks for your excellent work!

I am wondering how to produce the embedding codebook for integer 2D coordinates. Maybe sin positional embedding?

Hi, in our work the embedding for each grid point of the 2D codebook is learned during training.

Thanks for you quick response~

Could you please refer me to the code involving the translation and interpolation process from the floating point coordinates to the embeddings. Your project code is detailed and a bit large in scale.

Hi this is the interpolation code

token_embedding = token_embedding_11*delta_x2*delta_y2 + token_embedding_12*delta_x2*delta_y1 + \

Hi this is the interpolation code

token_embedding = token_embedding_11*delta_x2*delta_y2 + token_embedding_12*delta_x2*delta_y1 + \

Many thanks!!!