Chasel-Tsui / mmdet-rfla

ECCV22: RFLA
MIT License
254 stars 23 forks source link

KL散度公式计算问题 #10

Closed SadMemories closed 1 year ago

SadMemories commented 1 year ago

作者,您好,在您的论文中有写到两个分布之间的KL距离可以简化为 $D_{\mathrm{KL}}\left(n_e | n_g\right)=\frac{e r_n^2}{8 w_g^2}+\frac{e r_n^2}{8 h_g^2}+\frac{2\left(x_n-x_g\right)^2}{w_g^2}+\frac{2\left(y_n-y_g\right)^2}{h_g^2}+\ln \frac{2 w_g}{e r_n}+\ln \frac{2 h_g}{e r_n}-1$ 在这个公式中,按照论文中的we approximate the ERF radius ern with half the radius of TRF.语句,可以将 $er_n$ 写为 $er_n = \dfrac{TRF}{4}$ ,在您的代码RFGenerator类中的gen_single_level_base_anchors函数中有写到 w = base_size * self.fraction(这一句中base_size等于TRF,self.fraction等于0.5),则说明 $w = \dfrac{TRF}{2}$,那么就说明 $w = 2 er_n$,在您的代码BboxDistanceMetric类的bbox_overlaps函数中,计算KL距离的公式是 $D_{\mathrm{KL}}\left(n_e | n_g\right)=\frac{w_2^2}{2 w_g^2}+\frac{h_2^2}{2h_g^2}+\frac{2\left(x_n-x_g\right)^2}{w_g^2}+\frac{2\left(y_n-y_g\right)^2}{h_g^2}+\ln \frac{w_g}{w_2}+\ln \frac{h_g}{h_2}-1$,按照这个公式来看的话则 $w = \dfrac{er_n}{2} $,这与之前推的 $w = 2 er_n$ 是相矛盾的,请问我推理的哪里出错了吗?

Chasel-Tsui commented 1 year ago

Hi, thanks very much for pointing it out. I have re-checked the formula and found that w should be $2er_{n}$, there seems to be a typo in Eq. 7 and we will update it in the new version.

SadMemories commented 1 year ago

If $w = 2 ern$ is correct, should the formula (7) in the paper be in the following form? $D{\mathrm{KL}}\left(n_e | n_g\right)=\frac{2 e r_n^2}{w_g^2}+\frac{2 e r_n^2}{h_g^2}+\frac{2\left(x_n-x_g\right)^2}{w_g^2}+\frac{2\left(y_n-y_g\right)^2}{h_g^2}+\ln \frac{w_g}{2 e r_n}+\ln \frac{h_g}{2 e r_n}-1$ Is the above formula (7) correct?

Chasel-Tsui commented 1 year ago

Yes, you are right, thanks again and we will fix it in the paper.