haofeixu / aanet

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

FLOPs for AANet #70

Closed gautamsreekumar closed 1 year ago

gautamsreekumar commented 3 years ago

Can you provide the FLOPs and the number of parameters in the AANet models (AANet and AANet+) for 576x960 resolution? Table 2 in the paper only gives these values of AA modules in other networks.

Also, shouldn't the below line:

https://github.com/haofeixu/aanet/blob/f689abf81ef072b4e50eb480d3a73db66eebda44/thop/count_hooks.py#L78-L83

be changed as shown below?

ops_per_element = kernel_ops* cin // m.groups + bias_ops

# total ops
# num_out_elements = y.numel()
output_elements = batch_size * out_w * out_h * cout
total_ops = output_elements * ops_per_element

This is because the bias_ops should not be multiplied by cin // m.groups.

haofeixu commented 1 year ago

Seems that you are correct, but this small implementation detail doesn't affect the conclusion in our paper since the same code is used for all methods compared.