CenterNet icon indicating copy to clipboard operation
CenterNet copied to clipboard

关于高斯半径的疑问

Open wuzuowuyou opened this issue 3 years ago • 5 comments

CornerNet里面确定高斯半径是由左上和右下两个点构成的框与gt框计算IOU,通过一定规则计算出r https://zhuanlan.zhihu.com/p/96856635 但是centernet只是中心点,和左上右下点没有关系,为啥centernet的高斯半径也沿用CornerNet里面的计算规则得到高斯半径r。

另外,弱弱的问下应该是2a,这里还是2,不需要改吗?

wuzuowuyou avatar Nov 07 '20 10:11 wuzuowuyou

In cornernet, Gauss radius is determined by the box composed of upper left and lower right points and GT box to calculate IOU, and R is calculated by certain rules https://zhuanlan.zhihu.com/p/96856635 Centrernet uses the rule of the center to calculate the radius of the center, but the center of the center is not related to the center of the center. What's more, it should be 2a, here or 2. Don't you need to change it?

wuzuowuyou avatar Nov 07 '20 10:11 wuzuowuyou

Hi, Thanks for raising this up. It's a good point. Ideally, it should be different from the setting in CornerNet. However, it might not be important as in the modified focal loss, we calculate 1 - (1 - x) ** 4 of the gaussian weight as the negative weight. This makes a large circle near the center all close to 1.

Also, I have played a bit about different radius formulation, it turned out (h * w) ** 0.5 * 0.1 can work similarly well. I guess the exact form of the radius is not important.

Best, Xingyi

xingyizhou avatar Nov 08 '20 23:11 xingyizhou

@xingyizhou For some small object, for example, h=5, w=5, then radius=0.1sqrt(hw) = 0.5. But I think the gaussian radius must be larger than 1. Thus, for such a small object, how to set the radius? Or may we let the radius must be larger than a threshold (how about 3)?

In addition, if it is a 3D image (medical image), how about the radius should be? 0.1*[ (hwd)**(1/3) ] ? Is that OK?

NeuZhangQiang avatar Dec 02 '20 01:12 NeuZhangQiang

Hi, Thanks for raising this up. It's a good point. Ideally, it should be different from the setting in CornerNet. However, it might not be important as in the modified focal loss, we calculate 1 - (1 - x) ** 4 of the gaussian weight as the negative weight. This makes a large circle near the center all close to 1.

Also, I have played a bit about different radius formulation, it turned out (h * w) ** 0.5 * 0.1 can work similarly well. I guess the exact form of the radius is not important.

Best, Xingyi

I'm new to centerNet. When reading source code about the definition of Gaussian_radius, I got the same confusion as this opened issue. Lucky for me to search first before raising it. centerNet gaussian_radius definition

This image is drawn by myself.

There is only one point in centerNet, the center, wheareas two points, the top-left and bottom right, are needed in cornerNet . The calculation should correspond to r1 in another cornerNet open issue

This is an image pasted from that issue. The r1 is what I'm talking about. image

I'm glad you are fully aware of this and gave your opinion on it. Though you think the definition may not affect the outcome too much, maybe worth trying modifying to only r1 and check the result?

And also, I have a question on how the centerNet can learn the connection between coordinates of center and the size of the bounding-box. The backbone CNN network in your paper mainly focuses on pinpoint the precise location of the center point, yet somehow it got the ability to draw a bounding-box of correct size for that center, even for a different -sized object. In cornerNet, the author specifically design the network to include the information of the bounding-box size. The beauty of your paper is that you ditched all of those yet still get the correct result. I really want to know the magic behind this. Can you give an explanation?

youngfisher avatar Jun 21 '21 03:06 youngfisher

为何不直接内接椭圆,iou为pi/4?代码和计算公式不匹配,这个半径貌似经验所得就行?

hshgftt avatar Feb 28 '22 10:02 hshgftt