haofeixu / aanet

[CVPR'20] AANet: Adaptive Aggregation Network for Efficient Stereo Matching
Apache License 2.0
524 stars 102 forks source link

Correlation in cost volume #4

Closed jbohnslav closed 4 years ago

jbohnslav commented 4 years ago

https://github.com/haofeixu/aanet/blob/f27ec42e3c3c8482d1ca49076ed56b1993aa1028/nets/cost.py#L40-L48

Hi there,

The paper looks great. Thanks for releasing your code! I noticed that in the "correlation" type of cost volume construction, you used the mean of the elementwise product of two feature vectors instead of the traditional dot product, which DispNetC and FlowNet (the original) used. Of course, this is just a scaled version. Can you talk about why you scaled it this way? Thank you!

haofeixu commented 4 years ago

Hi @jbohnslav ,

Thanks for your interest! Our intuition is that the scaled version can potentially prevent very large values, but the actual difference may be very small.

jbohnslav commented 4 years ago

Thanks! It's certainly easier to read this way, and should hopefully be less dependent on the dimensionality of your input features to the cost volume. Thanks again for the code and paper.

kwea123 commented 4 years ago

This correlation, if I am right, first appeared in gwcnet

https://github.com/xy-guo/GwcNet/blob/0987074f48b098c6e975a58ca5aacf233b0fb0eb/models/submodule.py#L44-L63

The code is almost the same. Don't know if it's actually the first though, if I'm wrong correct me.

haofeixu commented 4 years ago

It was already used in PWC-Net (https://arxiv.org/abs/1709.02371) before.