tensorboy / centerpose

Push the Extreme of the pose estimation
MIT License
237 stars 45 forks source link

Confused about func gaussian_radius #10

Closed murdockhou closed 4 years ago

murdockhou commented 4 years ago

Hi, I'm still a little confused about func gaussian_radius, which defined like this:

def gaussian_radius(det_size, min_overlap=0.7):
  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

  a2  = 4
  b2  = 2 * (height + width)
  c2  = (1 - min_overlap) * width * height
  sq2 = np.sqrt(b2 ** 2 - 4 * a2 * c2)
  r2  = (b2 + sq2) / 2

  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
  return min(r1, r2, r3)

I have test some values like this: image

Dose this a little bigger for drawing gaussian distribution? Beacause in keypoints detection job, sigma always be 2.5 or 3.0. What do you think of this?