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 yolov5_description.md #34

Merged
merged 1 commit into from
Sep 19, 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
20 changes: 10 additions & 10 deletions docs/zh_cn/algorithm_descriptions/yolov5_description.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ anchors = [[(10, 13), (16, 30), (33, 23)], [(30, 61), (62, 45), (59, 119)],

在 YOLOv3 中,回归公式为:

```math
```{math}
Copy link
Collaborator

@PeterH0323 PeterH0323 Sep 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Nioolek

  • In my browser it show like below when using {math}
    image

  • But using math will show like this which is correct.
    image

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that you install some plugin in your browser ?

b_x=\sigma(t_x)+c_x \\
b_y=\sigma(t_y)+c_y \\
b_w=a_w\cdot e^{t_w} \\
Expand All @@ -354,15 +354,15 @@ b_h=a_h\cdot e^{t_h} \\

公式中,

```math
```{math}
a_w 代表 Anchor 的宽度 \\
c_x 代表 Grid 所处的坐标 \\
\sigma 代表 Sigmoid 公式。
```

而在 YOLOv5 中,回归公式为:

```math
```{math}
b_x=(2\cdot\sigma(t_x)-0.5)+c_x \\
b_y=(2\cdot\sigma(t_y)-0.5)+c_y \\
b_w=a_w\cdot(2\cdot\sigma(t_w))^2 \\
Expand All @@ -374,13 +374,13 @@ b_h=a_h\cdot(2\cdot\sigma(t_h))^2
- 中心点坐标范围从 (0, 1) 调整至 (-0.5, 1.5)
- 宽高范围从

```math
```{math}
(0,+\infty)
```

调整至

```math
```{math}
(0,4a_{wh})
```

Expand Down Expand Up @@ -410,7 +410,7 @@ b_h=a_h\cdot(2\cdot\sigma(t_h))^2

比较流程:

```math
```{math}
r_w = w\_{gt} / w\_{pt} \\
r_h = h\_{gt} / h\_{pt} \\
r_w^{max}=max(r_w, 1/r_w) \\
Expand All @@ -427,7 +427,7 @@ if\ \ r_{max} < prior\_match\_thr: match!

prior1 匹配失败的原因是

```math
```{math}
h\_{gt}\ /\ h\_{prior}\ =\ 4.8\ >\ prior\_match\_thr
```

Expand All @@ -443,7 +443,7 @@ Prior WH 值为 \[(15, 5), (24, 16), (16, 24)\],其中在 P3 特征图上,st

**(2.1) 将 GT Bbox 的中心点坐标对应到 P3 的 grid 上**

```math
```{math}
GT_x^{center_grid}=26/8=3.25 \\
GT_y^{center_grid}=37/8=4.625
```
Expand Down Expand Up @@ -496,7 +496,7 @@ YOLOv5 中总共包含 3 个 Loss,分别为:

三个 loss 按照一定比例汇总。

```math
```{math}
Loss=\lambda_1L_{cls}+\lambda_2L_{obj}+\lambda_3L_{loc}
```

Expand All @@ -506,7 +506,7 @@ Loss=\lambda_1L_{cls}+\lambda_2L_{obj}+\lambda_3L_{loc}
obj_level_weights=[4., 1., 0.4]
```

```math
```{math}
L_{obj}=4.0\cdot L_{obj}^{small}+1.0\cdot L_{obj}^{medium}+0.4\cdot L_{obj}^{large}
```

Expand Down