glenn-jocher
commited on
PANet anchor order correction (#1420)
Browse files- models/hub/yolov3-spp.yaml +1 -1
- models/hub/yolov5-fpn.yaml +1 -1
- models/hub/yolov5-panet.yaml +4 -4
models/hub/yolov3-spp.yaml
CHANGED
@@ -21,7 +21,7 @@ backbone:
|
|
21 |
[-1, 8, Bottleneck, [256]],
|
22 |
[-1, 1, Conv, [512, 3, 2]], # 7-P4/16
|
23 |
[-1, 8, Bottleneck, [512]],
|
24 |
-
[-1, 1, Conv, [1024, 3, 2]],
|
25 |
[-1, 4, Bottleneck, [1024]], # 10
|
26 |
]
|
27 |
|
|
|
21 |
[-1, 8, Bottleneck, [256]],
|
22 |
[-1, 1, Conv, [512, 3, 2]], # 7-P4/16
|
23 |
[-1, 8, Bottleneck, [512]],
|
24 |
+
[-1, 1, Conv, [1024, 3, 2]], # 9-P5/32
|
25 |
[-1, 4, Bottleneck, [1024]], # 10
|
26 |
]
|
27 |
|
models/hub/yolov5-fpn.yaml
CHANGED
@@ -19,7 +19,7 @@ backbone:
|
|
19 |
[-1, 9, BottleneckCSP, [256]],
|
20 |
[-1, 1, Conv, [512, 3, 2]], # 5-P4/16
|
21 |
[-1, 9, BottleneckCSP, [512]],
|
22 |
-
[-1, 1, Conv, [1024, 3, 2]],
|
23 |
[-1, 1, SPP, [1024, [5, 9, 13]]],
|
24 |
[-1, 6, BottleneckCSP, [1024]], # 9
|
25 |
]
|
|
|
19 |
[-1, 9, BottleneckCSP, [256]],
|
20 |
[-1, 1, Conv, [512, 3, 2]], # 5-P4/16
|
21 |
[-1, 9, BottleneckCSP, [512]],
|
22 |
+
[-1, 1, Conv, [1024, 3, 2]], # 7-P5/32
|
23 |
[-1, 1, SPP, [1024, [5, 9, 13]]],
|
24 |
[-1, 6, BottleneckCSP, [1024]], # 9
|
25 |
]
|
models/hub/yolov5-panet.yaml
CHANGED
@@ -5,9 +5,9 @@ width_multiple: 1.0 # layer channel multiple
|
|
5 |
|
6 |
# anchors
|
7 |
anchors:
|
8 |
-
- [116,90, 156,198, 373,326] # P5/32
|
9 |
-
- [30,61, 62,45, 59,119] # P4/16
|
10 |
- [10,13, 16,30, 33,23] # P3/8
|
|
|
|
|
11 |
|
12 |
# YOLOv5 backbone
|
13 |
backbone:
|
@@ -19,7 +19,7 @@ backbone:
|
|
19 |
[-1, 9, BottleneckCSP, [256]],
|
20 |
[-1, 1, Conv, [512, 3, 2]], # 5-P4/16
|
21 |
[-1, 9, BottleneckCSP, [512]],
|
22 |
-
[-1, 1, Conv, [1024, 3, 2]],
|
23 |
[-1, 1, SPP, [1024, [5, 9, 13]]],
|
24 |
[-1, 3, BottleneckCSP, [1024, False]], # 9
|
25 |
]
|
@@ -44,5 +44,5 @@ head:
|
|
44 |
[[-1, 10], 1, Concat, [1]], # cat head P5
|
45 |
[-1, 3, BottleneckCSP, [1024, False]], # 23 (P5/32-large)
|
46 |
|
47 |
-
[[17, 20, 23], 1, Detect, [nc, anchors]], # Detect(
|
48 |
]
|
|
|
5 |
|
6 |
# anchors
|
7 |
anchors:
|
|
|
|
|
8 |
- [10,13, 16,30, 33,23] # P3/8
|
9 |
+
- [30,61, 62,45, 59,119] # P4/16
|
10 |
+
- [116,90, 156,198, 373,326] # P5/32
|
11 |
|
12 |
# YOLOv5 backbone
|
13 |
backbone:
|
|
|
19 |
[-1, 9, BottleneckCSP, [256]],
|
20 |
[-1, 1, Conv, [512, 3, 2]], # 5-P4/16
|
21 |
[-1, 9, BottleneckCSP, [512]],
|
22 |
+
[-1, 1, Conv, [1024, 3, 2]], # 7-P5/32
|
23 |
[-1, 1, SPP, [1024, [5, 9, 13]]],
|
24 |
[-1, 3, BottleneckCSP, [1024, False]], # 9
|
25 |
]
|
|
|
44 |
[[-1, 10], 1, Concat, [1]], # cat head P5
|
45 |
[-1, 3, BottleneckCSP, [1024, False]], # 23 (P5/32-large)
|
46 |
|
47 |
+
[[17, 20, 23], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5)
|
48 |
]
|