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

a stronger version of Where2comm #57

Closed Little-Podi closed 1 year ago

Little-Podi commented 1 year ago

This version should have stronger performance. I don't remember the best configutation, but here are some configurations can be tried to see how it goes:

DerrickXuNu commented 1 year ago

Quick question: When we set fully to true, what is the compression rate? Is it something random?

Little-Podi commented 1 year ago

Where2comm reduces the communication cost by selecting spatially sparse yet perceptually critical areas. where2comm_fusion.fully denotes whether we keep the fully-connected communication graph or prune it. In the updated implementation, it works like this:

DerrickXuNu commented 1 year ago

Where2comm reduces the communication cost by selecting spatially sparse yet perceptually critical areas. where2comm_fusion.fully denotes whether we keep the fully-connected communication graph or prune it. In the updated implementation, it works like this:

  • During training, if where2comm_fusion.fully is True, then the model will be always trained with 100% communication without any communication saving. Otherwise, the pruning ratio will be randomly selected from 0% to 100%.
  • During inference, if where2comm_fusion.fully is True, then the agent will send the whole feature map to the ego agent. Otherwise, it will send partial features according to the confidence map and the pre-defined threshold.

Thanks for the clarification. Do you know what kind of threshold should we set to be the same as the v2x-vit paper, e.g., 32x compression rate?

Little-Podi commented 1 year ago

I think 32x will be fine. In Where2comm, they didn't use channel-wise compression to save the communication cost, so I didn't try it.

DerrickXuNu commented 1 year ago

I think 32x will be fine. In Where2comm, they didn't use channel-wise compression to save the communication cost, so I didn't try it.

I may not ask the question clearly. Other models by default use 32x compression, which will impact the performance. To make fair comparison, where2comm should do the same thing. But it seem they already have compression inside the algorithm, so I am not sure how much compression they have by default/

Little-Podi commented 1 year ago

For a pair comparison, you can use 32x. It will make the channel dimension of the transmitted feature map the same as other models. Besides, in my practice, the threshold 0.01 already filter out a large portion of the feature map, which further reduce the communication cost.

Little-Podi commented 1 year ago

Oh, I got your point. Because the "compression" mechanism in Where2comm is based on a threshold, it cannot precisely control the ratio such as 1/32 or something. By default, they use 0.01.

Little-Podi commented 1 year ago

You can tune this threshold after the model is trained to make the compression rate to be roughly 32x. But the exact rate will be slightly different between different inputs and datasets.

DerrickXuNu commented 1 year ago

Thanks for your reply. I think everything looks good to me now except the "kernel" typo. Could you revert back and update it so I can merge yours into my branch?

Little-Podi commented 1 year ago

Sorry, I was preparing a tutorial yesterday. Thanks for your help, anyway.