hellozhuo / pidinet

Code for the ICCV 2021 paper "Pixel Difference Networks for Efficient Edge Detection" (Oral).
Other
445 stars 69 forks source link

weights_c #14

Closed RuosiZhou closed 2 years ago

RuosiZhou commented 2 years ago

Hello, your work is perfect, but I took a look at the CPDC program you wrote today. I don't quite understand the solution of weights_c. Did something go wrong?

zhuoinoulu commented 2 years ago

Hello, your work is perfect, but I took a look at the CPDC program you wrote today. I don't quite understand the solution of weights_c. Did something go wrong?

Hi, thanks for you interests. The answer could be found from Eq. (7) in the appendix, where weightsc is the summation of w{i}, i=1, 2, 3, 4, 6, 7, 8, 9. In the code, w_5 is also added to weights_c, becuase "weights" also contains w_5, in line 62, the effect of w_5 will be removed by the subtraction since both weights_c and weights contain w_5. https://github.com/zhuoinoulu/pidinet/blob/c70859767b3b379cae062371501fe67ed5804a6a/models/ops.py#L59-L62

zhuoinoulu commented 2 years ago

And in Eq. (7) (see our arxiv paper), image the first part of this equation (w1x1+w2x2+...+w9x9) can be regarded as a 3x3 convolution, and the second part for x5 is a 1x1 convolution. This is how cpdc implements in our code during training.

RuosiZhou commented 2 years ago

Okay, I didn't see it clearly before, thank you very much.