DerrickXuNu / OpenCOOD

[ICRA 2022] An opensource framework for cooperative detection. Official implementation for OPV2V.
https://mobility-lab.seas.ucla.edu/opv2v/
Other
663 stars 99 forks source link

Question about the pirewise transformation matrix #30

Closed zwbai closed 2 years ago

zwbai commented 2 years ago

Hi,

Thanks for the open-source work and it looks great! When I try to understand the implementation of V2Vnet I am confused about the pairwise_t_matrix shown below.

pairwise_t_matrix : torch.Tensor
            The transformation matrix from each cav to ego, 
            shape: (B, L, L, 4, 4)

why does the size have two L dimensions? because the ego vehicle is not a fixed one? Could you please give a numerical example of the pairwise_t_matrix about what it looks like?

Thanks

DerrickXuNu commented 2 years ago

Hi,

(L,L) represents from the traformation matrix from vehicle i to vehicle j. For example, 0 , 1 represents ego to cav1, and 1, 0 represents cav1 to ego. (or the reversed way, i kind of forget). In V2VNet paper, they project others to ego, and also project ego/others to others, that's why you need to have a (L, L) shape. I will include the major implementation contributor for this part in the loop @XHwind

zwbai commented 2 years ago

Thanks for your quick response. So if I understand correctly, the matrix would look like this? or its transpose.

[[[ego->ego, ego->cav1, ego->cav2,],
[cav1->ego, cav1->cav1, cav1->cav],
[cav2->ego, cav2->cav1, cav2->cav2]]]
DerrickXuNu commented 2 years ago

yes.