GeezerVison is showing github.com — Original code of gaussian_radius has been fixed · Issue #3 · lucasjinreal/CenterNet_Pro_Max
Original code of gaussian_radius has been fixed #3
Description
the code for gaussian radius from CenterNet repo was brought from Cornernet and the gaussian_radius() function is wrong, it has been fixed by the author here is the code
def gaussian_radius(det_size, min_overlap):
height, width = det_size
a1 = 1
b1 = (height + width)
c1 = width * height * (1 - min_overlap) / (1 + min_overlap)
sq1 = np.sqrt(b1 ** 2 - 4 * a1 * c1)
r1 = (b1 - sq1) / (2 * a1)
a2 = 4
b2 = 2 * (height + width)
c2 = (1 - min_overlap) * width * height
sq2 = np.sqrt(b2 ** 2 - 4 * a2 * c2)
r2 = (b2 - sq2) / (2 * a2)
a3 = 4 * min_overlap
b3 = -2 * min_overlap * (height + width)
c3 = (min_overlap - 1) * width * height
sq3 = np.sqrt(b3 ** 2 - 4 * a3 * c3)
r3 = (b3 + sq3) / (2 * a3)
return min(r1, r2, r3)
Please refer to this for formula derivation
princeton-vl/CornerNet#110
Activity
changed the title
[-]Original code of gaussian_radius was fixes[/-] [+]Original code of gaussian_radius has been fixed[/+] on Mar 19, 2020lucasjinreal commented on Mar 19, 2020
thanks for this useful info!
what's the side effect due to wrong gaussian radius anyway?
kikirizki commented on Mar 19, 2020
lucasjinreal commented on Mar 19, 2020
kikirizki commented on Mar 20, 2020
thanks for this useful info!
what's the side effect due to wrong gaussian radius anyway?
Lower average recall
Devoe-97 commented on Apr 29, 2020
the code for gaussian radius from CenterNet repo was brought from Cornernet and the gaussian_radius() function is wrong, it has been fixed by the author here is the code
def gaussian_radius(det_size, min_overlap):
height, width = det_size
a1 = 1
b1 = (height + width)
c1 = width * height * (1 - min_overlap) / (1 + min_overlap)
sq1 = np.sqrt(b1 ** 2 - 4 * a1 * c1)
r1 = (b1 - sq1) / (2 * a1)
a2 = 4
b2 = 2 * (height + width)
c2 = (1 - min_overlap) * width * height
sq2 = np.sqrt(b2 ** 2 - 4 * a2 * c2)
r2 = (b2 - sq2) / (2 * a2)
a3 = 4 * min_overlap
b3 = -2 * min_overlap * (height + width)
c3 = (min_overlap - 1) * width * height
sq3 = np.sqrt(b3 ** 2 - 4 * a3 * c3)
r3 = (b3 + sq3) / (2 * a3)
return min(r1, r2, r3)
Please refer to this for formula derivation
princeton-vl/CornerNet#110
for r1 and r2, why is b-sq not b+sq? they all are positive.
Metadata
Metadata
Development
No branches or pull requestsIssue actions