Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mistakes in formula #8607

Merged
merged 1 commit into from
Aug 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mmdet/models/utils/gaussian_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def gaussian_radius(det_size, min_overlap):
.. math::
\cfrac{(w-r)*(h-r)}{w*h+(w+h)r-r^2} \ge {iou} \quad\Rightarrow\quad
{r^2-(w+h)r+\cfrac{1-iou}{1+iou}*w*h} \ge 0 \\
{a} = 1,\quad{b} = {-(w+h)},\quad{c} = {\cfrac{1-iou}{1+iou}*w*h}
{a} = 1,\quad{b} = {-(w+h)},\quad{c} = {\cfrac{1-iou}{1+iou}*w*h} \\
{r} \le \cfrac{-b-\sqrt{b^2-4*a*c}}{2*a}

- Case2: both two corners are inside the gt box.
Expand All @@ -128,7 +128,7 @@ def gaussian_radius(det_size, min_overlap):
.. math::
\cfrac{(w-2*r)*(h-2*r)}{w*h} \ge {iou} \quad\Rightarrow\quad
{4r^2-2(w+h)r+(1-iou)*w*h} \ge 0 \\
{a} = 4,\quad {b} = {-2(w+h)},\quad {c} = {(1-iou)*w*h}
{a} = 4,\quad {b} = {-2(w+h)},\quad {c} = {(1-iou)*w*h} \\
{r} \le \cfrac{-b-\sqrt{b^2-4*a*c}}{2*a}

- Case3: both two corners are outside the gt box.
Expand Down