Skip to content

Commit

Permalink
add hornet
Browse files Browse the repository at this point in the history
  • Loading branch information
iscyy committed Aug 18, 2022
1 parent bc457cb commit 1f83dbe
Show file tree
Hide file tree
Showing 22 changed files with 459 additions and 30 deletions.
Binary file modified .DS_Store
Binary file not shown.
43 changes: 43 additions & 0 deletions configs/backbone/yolov5_convnext_base.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license

# Parameters
nc: 80 # number of classes
depth_multiple: 0.33 # model depth multiple
width_multiple: 0.50 # layer channel multiple
anchors:
- [10,13, 16,30, 33,23] # P3/8
- [30,61, 62,45, 59,119] # P4/16
- [116,90, 156,198, 373,326] # P5/32

# YOLOv5 backbone
# [128, 256, 512, 1024]
backbone:
[[-1, 1, ConvNeXt, [128, 0, [3, 3, 27, 3], 128]],
[-1, 1, ConvNeXt, [256, 1, [3, 3, 27, 3], 128]],
[-1, 1, ConvNeXt, [512, 2, [3, 3, 27, 3], 128]],
[-1, 1, ConvNeXt, [1024, 3, [3, 3, 27, 3], 128]],
]

# YOLOv5 head
head:
[[-1, 1, Conv, [1024, 1, 1]],
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
[[-1, 2], 1, Concat, [1]],
[-1, 3, C3, [1024, False]],

[-1, 1, Conv, [512, 1, 1]],
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
[[-1, 1], 1, Concat, [1]],
[-1, 3, C3, [512, False]],

[-1, 1, Conv, [512, 3, 2]],
[[-1, 8], 1, Concat, [1]],
[-1, 3, C3, [1024, False]],

[-1, 1, Conv, [1024, 3, 2]],
[[-1, 4], 1, Concat, [1]], # cat head P5
[-1, 3, C3, [1024, False]], # 23 (P5/32-large)

[[11, 14, 17], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5)
]

8 changes: 4 additions & 4 deletions configs/backbone/yolov5_convnext_large.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ anchors:
# YOLOv5 backbone
# [from, number, module, args]
backbone:
[[-1, 1, ConvNeXt, [192, 0, 3, [3, 3, 27, 3], [192, 384, 768, 1536]]],
[-1, 1, ConvNeXt, [384, 1, 3, [3, 3, 27, 3], [192, 384, 768, 1536]]],
[-1, 1, ConvNeXt, [768, 2, 3, [3, 3, 27, 3], [192, 384, 768, 1536]]],
[-1, 1, ConvNeXt, [1536, 3, 3, [3, 3, 27, 3], [192, 384, 768, 1536]]],
[[-1, 1, ConvNeXt, [192, 0, [3, 3, 27, 3], 192]],
[-1, 1, ConvNeXt, [384, 1, [3, 3, 27, 3], 192]],
[-1, 1, ConvNeXt, [768, 2, [3, 3, 27, 3], 192]],
[-1, 1, ConvNeXt, [1536, 3, [3, 3, 27, 3], 192]],
]

# YOLOv5 head
Expand Down
9 changes: 4 additions & 5 deletions configs/backbone/yolov5_convnext_small.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ anchors:
- [116,90, 156,198, 373,326] # P5/32

# YOLOv5 backbone
# [from, number, module, args]
backbone:
[[-1, 1, ConvNeXt, [96, 0, 3, [3, 3, 27, 3], [96, 192, 384, 768]]],
[-1, 1, ConvNeXt, [192, 1, 3, [3, 3, 27, 3], [96, 192, 384, 768]]],
[-1, 1, ConvNeXt, [384, 2, 3, [3, 3, 27, 3], [96, 192, 384, 768]]],
[-1, 1, ConvNeXt, [768, 3, 3, [3, 3, 27, 3], [96, 192, 384, 768]]],
[[-1, 1, ConvNeXt, [96, 0, [3, 3, 27, 3], 96]],
[-1, 1, ConvNeXt, [192, 1, [3, 3, 27, 3], 96]],
[-1, 1, ConvNeXt, [384, 2, [3, 3, 27, 3], 96]],
[-1, 1, ConvNeXt, [768, 3, [3, 3, 27, 3], 96]],
]

# YOLOv5 head
Expand Down
10 changes: 5 additions & 5 deletions configs/backbone/yolov5_convnext_tiny.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ anchors:
- [116,90, 156,198, 373,326] # P5/32

# YOLOv5 backbone
# [from, number, module, args]
# 96 -> [96, 192, 384, 768]
backbone:
[[-1, 1, ConvNeXt, [96, 0, 3, [3, 3, 9, 3], [96, 192, 384, 768]]],
[-1, 1, ConvNeXt, [192, 1, 3, [3, 3, 9, 3], [96, 192, 384, 768]]],
[-1, 1, ConvNeXt, [384, 2, 3, [3, 3, 9, 3], [96, 192, 384, 768]]],
[-1, 1, ConvNeXt, [768, 3, 3, [3, 3, 9, 3], [96, 192, 384, 768]]],
[[-1, 1, ConvNeXt, [96, 0, [3, 3, 9, 3], 96]],
[-1, 1, ConvNeXt, [192, 1, [3, 3, 9, 3], 96]],
[-1, 1, ConvNeXt, [384, 2, [3, 3, 9, 3], 96]],
[-1, 1, ConvNeXt, [768, 3, [3, 3, 9, 3], 96]],
]

# YOLOv5 head
Expand Down
43 changes: 43 additions & 0 deletions configs/backbone/yolov5_convnext_xlarge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license

# Parameters
nc: 80 # number of classes
depth_multiple: 0.33 # model depth multiple
width_multiple: 0.50 # layer channel multiple
anchors:
- [10,13, 16,30, 33,23] # P3/8
- [30,61, 62,45, 59,119] # P4/16
- [116,90, 156,198, 373,326] # P5/32

# YOLOv5 backbone
# [from, number, module, args]
backbone:
[[-1, 1, ConvNeXt, [256, 0, [3, 3, 27, 3], 256]],
[-1, 1, ConvNeXt, [512, 1, [3, 3, 27, 3], 256]],
[-1, 1, ConvNeXt, [1024, 2, [3, 3, 27, 3], 256]],
[-1, 1, ConvNeXt, [2048, 3, [3, 3, 27, 3], 256]],
]

# YOLOv5 head
head:
[[-1, 1, Conv, [2048, 1, 1]],
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
[[-1, 2], 1, Concat, [1]],
[-1, 3, C3, [2048, False]],

[-1, 1, Conv, [1024, 1, 1]],
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
[[-1, 1], 1, Concat, [1]],
[-1, 3, C3, [1024, False]],

[-1, 1, Conv, [1024, 3, 2]],
[[-1, 8], 1, Concat, [1]],
[-1, 3, C3, [2048, False]],

[-1, 1, Conv, [2048, 3, 2]],
[[-1, 4], 1, Concat, [1]], # cat head P5
[-1, 3, C3, [2048, False]], # 23 (P5/32-large)

[[11, 14, 17], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5)
]

42 changes: 42 additions & 0 deletions configs/backbone/yolov5_hornet_base.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# YOLOAir 🚀 by 🥭, GPL-3.0 license

# Parameters
nc: 80 # number of classes
depth_multiple: 0.33 # model depth multiple
width_multiple: 0.50 # layer channel multiple
anchors:
- [10,13, 16,30, 33,23] # P3/8
- [30,61, 62,45, 59,119] # P4/16
- [116,90, 156,198, 373,326] # P5/32

# YOLO backbone
backbone:
[[-1, 1, HorNet, [128, 0, 3, [2, 3, 18, 2], 128]],
[-1, 1, HorNet, [256, 1, 3, [2, 3, 18, 2], 128]],
[-1, 1, HorNet, [512, 2, 3, [2, 3, 18, 2], 128]],
[-1, 1, HorNet, [1024, 3, 3, [2, 3, 18, 2], 128]],
]

# YOLOv5 head
head:
[[-1, 1, Conv, [1024, 1, 1]],
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
[[-1, 2], 1, Concat, [1]],
[-1, 3, C3, [1024, False]],

[-1, 1, Conv, [512, 1, 1]],
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
[[-1, 1], 1, Concat, [1]],
[-1, 3, C3, [512, False]],

[-1, 1, Conv, [512, 3, 2]],
[[-1, 8], 1, Concat, [1]],
[-1, 3, C3, [1024, False]],

[-1, 1, Conv, [1024, 3, 2]],
[[-1, 4], 1, Concat, [1]], # cat head P5
[-1, 3, C3, [1024, False]], # 23 (P5/32-large)

[[11, 14, 17], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5)
]

42 changes: 42 additions & 0 deletions configs/backbone/yolov5_hornet_large.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# YOLOAir 🚀 by 🥭, GPL-3.0 license

# Parameters
nc: 80 # number of classes
depth_multiple: 0.33 # model depth multiple
width_multiple: 0.50 # layer channel multiple
anchors:
- [10,13, 16,30, 33,23] # P3/8
- [30,61, 62,45, 59,119] # P4/16
- [116,90, 156,198, 373,326] # P5/32

# YOLO backbone
backbone:
[[-1, 1, HorNet, [192, 0, 3, [2, 3, 18, 2], 192]],
[-1, 1, HorNet, [384, 1, 3, [2, 3, 18, 2], 192]],
[-1, 1, HorNet, [768, 2, 3, [2, 3, 18, 2], 192]],
[-1, 1, HorNet, [1536, 3, 3, [2, 3, 18, 2], 192]],
]

# YOLOv5 head
head:
[[-1, 1, Conv, [1536, 1, 1]],
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
[[-1, 2], 1, Concat, [1]],
[-1, 3, C3, [1536, False]],

[-1, 1, Conv, [768, 1, 1]],
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
[[-1, 1], 1, Concat, [1]],
[-1, 3, C3, [768, False]],

[-1, 1, Conv, [768, 3, 2]],
[[-1, 8], 1, Concat, [1]],
[-1, 3, C3, [1536, False]],

[-1, 1, Conv, [1536, 3, 2]],
[[-1, 4], 1, Concat, [1]], # cat head P5
[-1, 3, C3, [1536, False]], # 23 (P5/32-large)

[[11, 14, 17], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5)
]

43 changes: 43 additions & 0 deletions configs/backbone/yolov5_hornet_small.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# YOLOAir 🚀 by 🥭, GPL-3.0 license

# Parameters
nc: 80 # number of classes
depth_multiple: 0.33 # model depth multiple
width_multiple: 0.50 # layer channel multiple
anchors:
- [10,13, 16,30, 33,23] # P3/8
- [30,61, 62,45, 59,119] # P4/16
- [116,90, 156,198, 373,326] # P5/32

# YOLO backbone
# 96[96, 192, 384, 768]
backbone:
[[-1, 1, HorNet, [96, 0, 3, [2, 3, 18, 2], 96]],
[-1, 1, HorNet, [192, 1, 3, [2, 3, 18, 2], 96]],
[-1, 1, HorNet, [384, 2, 3, [2, 3, 18, 2], 96]],
[-1, 1, HorNet, [768, 3, 3, [2, 3, 18, 2], 96]],
]

# YOLOv5 head
head:
[[-1, 1, Conv, [768, 1, 1]],
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
[[-1, 2], 1, Concat, [1]],
[-1, 3, C3, [768, False]],

[-1, 1, Conv, [384, 1, 1]],
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
[[-1, 1], 1, Concat, [1]],
[-1, 3, C3, [384, False]],

[-1, 1, Conv, [384, 3, 2]],
[[-1, 8], 1, Concat, [1]],
[-1, 3, C3, [768, False]],

[-1, 1, Conv, [768, 3, 2]],
[[-1, 4], 1, Concat, [1]], # cat head P5
[-1, 3, C3, [768, False]], # 23 (P5/32-large)

[[11, 14, 17], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5)
]

42 changes: 42 additions & 0 deletions configs/backbone/yolov5_hornet_tiny.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# YOLOAir 🚀 by 🥭, GPL-3.0 license

# Parameters
nc: 80 # number of classes
depth_multiple: 0.33 # model depth multiple
width_multiple: 0.50 # layer channel multiple
anchors:
- [10,13, 16,30, 33,23] # P3/8
- [30,61, 62,45, 59,119] # P4/16
- [116,90, 156,198, 373,326] # P5/32

# YOLO backbone
backbone:
[[-1, 1, HorNet, [64, 0, 3, [2, 3, 18, 2], 64]],
[-1, 1, HorNet, [128, 1, 3, [2, 3, 18, 2], 64]],
[-1, 1, HorNet, [256, 2, 3, [2, 3, 18, 2], 64]],
[-1, 1, HorNet, [512, 3, 3, [2, 3, 18, 2], 64]],
]

# YOLOv5 head
head:
[[-1, 1, Conv, [512, 1, 1]],
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
[[-1, 2], 1, Concat, [1]],
[-1, 3, C3, [512, False]],

[-1, 1, Conv, [256, 1, 1]],
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
[[-1, 1], 1, Concat, [1]],
[-1, 3, C3, [256, False]],

[-1, 1, Conv, [256, 3, 2]],
[[-1, 8], 1, Concat, [1]],
[-1, 3, C3, [512, False]],

[-1, 1, Conv, [512, 3, 2]],
[[-1, 4], 1, Concat, [1]], # cat head P5
[-1, 3, C3, [512, False]], # 23 (P5/32-large)

[[11, 14, 17], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5)
]

43 changes: 43 additions & 0 deletions configs/backbone/yolov5_hornet_tiny_s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# YOLOAir 🚀 by 🥭, GPL-3.0 license

# Parameters
nc: 80 # number of classes
depth_multiple: 0.33 # model depth multiple
width_multiple: 0.50 # layer channel multiple
anchors:
- [10,13, 16,30, 33,23] # P3/8
- [30,61, 62,45, 59,119] # P4/16
- [116,90, 156,198, 373,326] # P5/32

# YOLO backbone
# 96[96, 192, 384, 768]
backbone:
[[-1, 1, HorNet, [32, 0, 3, [2, 3, 18, 2], 32]],
[-1, 1, HorNet, [64, 1, 3, [2, 3, 18, 2], 32]],
[-1, 1, HorNet, [128, 2, 3, [2, 3, 18, 2], 32]],
[-1, 1, HorNet, [256, 3, 3, [2, 3, 18, 2], 32]],
]

# YOLOv5 head
head:
[[-1, 1, Conv, [256, 1, 1]],
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
[[-1, 2], 1, Concat, [1]],
[-1, 3, C3, [256, False]],

[-1, 1, Conv, [128, 1, 1]],
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
[[-1, 1], 1, Concat, [1]],
[-1, 3, C3, [128, False]],

[-1, 1, Conv, [128, 3, 2]],
[[-1, 8], 1, Concat, [1]],
[-1, 3, C3, [256, False]],

[-1, 1, Conv, [256, 3, 2]],
[[-1, 4], 1, Concat, [1]], # cat head P5
[-1, 3, C3, [256, False]], # 23 (P5/32-large)

[[11, 14, 17], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5)
]

42 changes: 42 additions & 0 deletions configs/backbone/yolov5_hornet_tiny_xs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# YOLOAir 🚀 by 🥭, GPL-3.0 license

# Parameters
nc: 80 # number of classes
depth_multiple: 0.33 # model depth multiple
width_multiple: 0.50 # layer channel multiple
anchors:
- [10,13, 16,30, 33,23] # P3/8
- [30,61, 62,45, 59,119] # P4/16
- [116,90, 156,198, 373,326] # P5/32

# YOLO backbone
backbone:
[[-1, 1, HorNet, [16, 0, 3, [2, 3, 18, 2], 16]],
[-1, 1, HorNet, [32, 1, 3, [2, 3, 18, 2], 16]],
[-1, 1, HorNet, [64, 2, 3, [2, 3, 18, 2], 16]],
[-1, 1, HorNet, [128, 3, 3, [2, 3, 18, 2], 16]],
]

# YOLOv5 head
head:
[[-1, 1, Conv, [128, 1, 1]],
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
[[-1, 2], 1, Concat, [1]],
[-1, 3, C3, [128, False]],

[-1, 1, Conv, [64, 1, 1]],
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
[[-1, 1], 1, Concat, [1]],
[-1, 3, C3, [64, False]],

[-1, 1, Conv, [64, 3, 2]],
[[-1, 8], 1, Concat, [1]],
[-1, 3, C3, [128, False]],

[-1, 1, Conv, [128, 3, 2]],
[[-1, 4], 1, Concat, [1]], # cat head P5
[-1, 3, C3, [128, False]], # 23 (P5/32-large)

[[11, 14, 17], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5)
]

Loading

0 comments on commit 1f83dbe

Please sign in to comment.