CornerNet
CornerNet copied to clipboard
How to compute the gaussian_radius?Who can tell me the formula about it?Thank you!
i have the same question. i have tryed to derive the mathematical formulas.but mine is different with the author's code
here is one of my mathematical formulas for (r3)
here is one of my mathematical formulas for (r3)
I guess that it is the two peaks of redius value。The minimum value should be obtained from the two peaks. But,i cannot prove my guess. Your answer is the one of the peaks.
for r1
for r2
for r3
conclusion: with great possibility,the authour's mathmatical formulas are not correct and are not corresponding to the mind in papers.
the correct formulas as below
the correct formulas as below
what is the redius of the object as below??
compute as below
by the way,i am improving the method in this way.
compute as below
by the way,i am improving the method in this way.
Yes,this is the same as my idea,i look forward to the result, but,we need a dataset including various aspect ratios to confirm the idea!
just the previous datasets like COCO is ok
just the previous datasets like COCO is ok
Its my code in CenterNet and it can improve the performance a little! The formula can get by MATLAB Simulink. I need time to do this.
a = min((1 - min_overlap) / (1 + min_overlap) * width, 0.5 * width) b = min((1 - min_overlap) / (1 + min_overlap) * height, 0.5 * height) return a, b
@qiuhaining ok,can you underline the code you have changed or just a picture,because i can not easily find the diversity
Was this a small bug? Has someone noticed any improvement after re-typing the formulas?
@ggsggs i have tried.the result is that AP is almost the same,but AR is higher. i haven't found the reason why
@ggsggs i have tried.the result is that AP is almost the same,but AR is higher. i haven't found the reason why
Oh, interesting. Was it a significant improvement in AR?
@ggsggs the result as below:
@ggsggs by the way,my work is based on the paper centernet(objects as points),using the model resdcn-18
@ggsggs the result as below:
@fenglv12345 Thank you for the experiments. ~1-3 points higher! It's not bad at all :)
@ggsggs by the way,my work is based on the paper centernet(objects as points),using the model resdcn-18
I am also working with CenterNet(objects as points one), actually. So it is good to know.
@ggsggs thanks for your reminding which make me deep into the problem,perhaps i found the reason why. And i have a idea to make the AP higher while the AP is higher. By the way,there is some other method which has the problem (COCO detection challenge . focus on the MSRA)
@fenglv12345 @ggsggs , In CenterNet I use the modified gaussian_radius you mentioned above, and keep other training parameters invariable,I use DLA34dcn, but both the AP and AR reduce. Can you tell me how you get the AR increase? Do you change any other hyper-parameter?
@CF2220160244 my work in based on resdcn18 ,i didn't change any hyper-parameter,maybe there is some wrong with your implement. the formula as below.or you can show me your code
@fenglv12345 ,my code is:
r = 0.5*(1-np.sqrt(0.7))*np.sqrt(width ** 2 + height ** 2)
return r
what about a and b? please understand the formula,you should also change the gaussian function,rather than just the r
(1)get r (2)get a and b (3)change the gasssian function as above (when you change this,you will find some details should be changed)
by the way,you don't have to calculate this :np.sqrt(width ** 2 + height ** 2),just use w and h
Thank you very much, I will try! @fenglv12345
@fenglv12345 Is it right? I change the code to the following,
#def gaussian2D(shape, sigma=1): def gaussian2D(shape, a=1,b=1): m, n = [(ss - 1.) / 2. for ss in shape] y, x = np.ogrid[-m:m+1,-n:n+1] #h = np.exp(-(x * x + y * y) / (2 * sigma * sigma)) h = np.exp(-(x * x ) / (2 * a/3 * a/3)-(y * y) / (2 * b/3 * b/3)) h[h < np.finfo(h.dtype).eps * h.max()] = 0 return h
def draw_umich_gaussian(heatmap, center, radius, k=1): diameter = 2 * radius + 1 height, width = heatmap.shape[0:2] gaussian = gaussian2D((diameter, diameter), a=0.1155 * width, b=0.1155 * height) #gaussian = gaussian2D((diameter, diameter), sigma=diameter / 6) x, y = int(center[0]), int(center[1]) #height, width = heatmap.shape[0:2] ....
def gaussian_radius(det_size, min_overlap=0.7): height, width = det_size r = 0.5*(1-np.sqrt(min_overlap))*np.sqrt(width ** 2 + height ** 2) return r
diameter = 2 * radius + 1 height, width = heatmap.shape[0:2] gaussian = gaussian2D((diameter, diameter),
the diameter should be changed, understanding the meaning of diameter and its relationship with a and b for some reason,i can't see my code now,sorry.
@fenglv12345 thank you! Can you tell me what is the meaning of diameter and its relationship with a and b ? I think the radius should be sigma_a and sigma_b, so i use:
def draw_umich_gaussian(heatmap, center, radius, k=1): height, width = heatmap.shape[0:2] sigma_a = 0.1155 * width/3 sigma_b = 0.1155 * height/3 diameter_a = 2 * sigma_a + 1 diameter_b = 2 * sigma_b + 1 gaussian = gaussian2D((diameter_a, diameter_b), sigma_a, sigma_b)