GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

New issue
Copy link
New issue
Copy link
Closed
Closed
Original code of gaussian_radius has been fixed#3
Copy link

Description

@kikirizki
kikirizki
opened on Mar 19, 2020
Issue body actions

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

  1. kikirizki
    changed the title [-]Original code of gaussian_radius was fixes[/-] [+]Original code of gaussian_radius has been fixed[/+] on Mar 19, 2020
  2. lucasjinreal commented on Mar 19, 2020

    @lucasjinreal
    lucasjinreal
    on Mar 19, 2020
    Owner
    More actions

    thanks for this useful info!

    what's the side effect due to wrong gaussian radius anyway?

  3. kikirizki commented on Mar 19, 2020

    @kikirizki
    kikirizki
    on Mar 19, 2020
    Author
    More actions

    @fenglv12345 show significant improvement in average recall princeton-vl/CornerNet#110 (comment)

  4. lucasjinreal commented on Mar 19, 2020

    @lucasjinreal
    lucasjinreal
    on Mar 19, 2020
    Owner
    More actions

    got it, will try it

  5. kikirizki commented on Mar 20, 2020

    @kikirizki
    kikirizki
    on Mar 20, 2020
    Author
    More actions

    thanks for this useful info!

    what's the side effect due to wrong gaussian radius anyway?

    Lower average recall

  6. kikirizki
    closed this as completedon Mar 20, 2020
  7. Devoe-97 commented on Apr 29, 2020

    @Devoe-97
    Devoe-97
    on Apr 29, 2020
    More actions

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.