Skip to content

Commit e107ec1

Browse files
authored
Merge pull request #52 from Y-T-G/staging
Add Swin-T FPN and MobileNetv3 FPN configs
2 parents 2d80a5c + 90406c2 commit e107ec1

21 files changed

+272
-14
lines changed

.github/workflows/pr.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
jobs:
1010
validate-yaml:
11+
if: github.head_ref != 'staging'
1112
runs-on: ubuntu-latest
1213
permissions:
1314
pull-requests: write

cfg/classify/convnext_tiny.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ nc: 1
1313
strides: [32]
1414
backbone:
1515
# [from, repeats, module, args]
16-
- [-1, 1, TorchVision, [768, "convnext_tiny", "DEFAULT", True, 2]] # (1, 768, 20, 20) - 0
16+
- [-1, 1, TorchVision, [768, convnext_tiny, DEFAULT, True, 2]] # (1, 768, 20, 20) - 0
1717

1818
head:
1919
- [-1, 1, Classify, [nc]]

cfg/classify/efficientnet_b0.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ nc: 1
1313
strides: [32]
1414
backbone:
1515
# [from, repeats, module, args]
16-
- [-1, 1, TorchVision, [1280, "efficientnet_b0", "DEFAULT", True, 2]] # (1, 1280, 20, 20) - 0
16+
- [-1, 1, TorchVision, [1280, efficientnet_b0, DEFAULT, True, 2]] # (1, 1280, 20, 20) - 0
1717

1818
head:
1919
- [-1, 1, Classify, [nc]]

cfg/classify/mobilenet_v3_large.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ nc: 1
1313
strides: [32]
1414
backbone:
1515
# [from, repeats, module, args]
16-
- [-1, 1, TorchVision, [960, "mobilenet_v3_large", "DEFAULT", True, 2]] # (1, 960, 20, 20) - 0
16+
- [-1, 1, TorchVision, [960, mobilenet_v3_large, DEFAULT, True, 2]] # (1, 960, 20, 20) - 0
1717

1818
head:
1919
- [-1, 1, Classify, [nc]]

cfg/classify/swin_t.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ nc: 1
1313
strides: [32]
1414
backbone:
1515
# [from, repeats, module, args]
16-
- [-1, 1, TorchVision, [768, "swin_t", "DEFAULT", True, 3]] # (1, 768, 20, 20) - 0
16+
- [-1, 1, TorchVision, [768, swin_t, DEFAULT, True, 3]] # (1, 768, 20, 20) - 0
1717

1818
head:
1919
- [-1, 1, Classify, [nc]]

cfg/detect/convnext_tiny.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ nc: 1
1313
strides: [8, 16, 32]
1414
backbone:
1515
# [from, repeats, module, args]
16-
- [-1, 1, TorchVision, [768, "convnext_tiny", "DEFAULT", True, 2, True]]
16+
- [-1, 1, TorchVision, [768, convnext_tiny, DEFAULT, True, 2, True]]
1717
- [0, 1, Index, [192, 4]] # (1, 192, 80, 80) - 1
1818
- [0, 1, Index, [384, 6]] # (1, 384, 40, 40) - 2
1919
- [0, 1, Index, [768, 8]] # (1, 768, 20, 20) - 3
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Metadata
2+
author: Y-T-G
3+
task: detect
4+
keywords: [cnn, mobilenet, fpn]
5+
description: MobileNetv3-Large pretrained backbone with YOLO11 FPN neck and Detect head.
6+
flops: 16.3
7+
parameters: 14505363
8+
min_version: 8.3.59
9+
discussion: https://github.com/Y-T-G/community/discussions/51
10+
11+
# Model
12+
nc: 1
13+
strides: [8, 16, 32]
14+
scales:
15+
# [depth, width, max_channels]
16+
default: [1.00, 1.00, 1024]
17+
backbone:
18+
# [from, repeats, module, args]
19+
- [-1, 1, TorchVision, [768, mobilenet_v3_large, DEFAULT, True, 2, True]] # 0
20+
- [0, 1, Index, [40, 7]] # (1, 40, 80, 80) - 1
21+
- [0, 1, Index, [112, 13]] # (1, 112, 40, 40) - 2
22+
- [0, 1, Index, [960, 17]] # (1, 960, 20, 20) - 3
23+
- [-1, 1, SPPF, [960, 5]] # (1, 960, 20, 20) - 4
24+
head:
25+
- [-1, 1, nn.Upsample, [None, 2, nearest]] # (1, 960, 40, 40) - 5
26+
- [[-1, 2], 1, Concat, [1]] # (1, 1072, 40, 40) - 6
27+
- [-1, 2, C3k2, [112, False]] # (1, 112, 40, 40) - 7
28+
- [-1, 1, nn.Upsample, [None, 2, nearest]] # (1, 112, 80, 80) - 8
29+
- [[-1, 1], 1, Concat, [1]] # (1, 152, 80, 80) - 9
30+
- [-1, 2, C3k2, [40, False]] # (1, 40, 80, 80) - 10
31+
- [-1, 1, Conv, [40, 3, 2]] # (1, 40, 40, 40) - 11
32+
- [[-1, -5], 1, Concat, [1]] # (1, 152, 40, 40) - 12
33+
- [-1, 2, C3k2, [112, False]] # (1, 112, 40, 40) - 13
34+
- [-1, 1, Conv, [112, 3, 2]] # (1, 112, 20, 20) - 14
35+
- [[-1, -11], 1, Concat, [1]] # (1, 1072, 20, 20) - 15
36+
- [-1, 2, C3k2, [960, True]] # (1, 960, 20, 20) - 16
37+
- [[-7, -4, -1], 1, Detect, [nc]] # 17
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Metadata
2+
author: Y-T-G
3+
task: detect
4+
keywords: [cnn, mobilenet, fpn]
5+
description: MobileNetv3-Small pretrained backbone with YOLO11 FPN neck and Detect head.
6+
flops: 5.9
7+
parameters: 5245459
8+
min_version: 8.3.59
9+
discussion: https://github.com/Y-T-G/community/discussions/53
10+
11+
# Model
12+
nc: 1
13+
strides: [8, 16, 32]
14+
scales:
15+
# [depth, width, max_channels]
16+
default: [1.00, 1.00, 1024]
17+
backbone:
18+
# [from, repeats, module, args]
19+
- [-1, 1, TorchVision, [768, mobilenet_v3_small, DEFAULT, True, 2, True]] # 0
20+
- [0, 1, Index, [24, 4]] # (1, 40, 80, 80) - 1
21+
- [0, 1, Index, [48, 9]] # (1, 112, 40, 40) - 2
22+
- [0, 1, Index, [576, 13]] # (1, 960, 20, 20) - 3
23+
- [-1, 1, SPPF, [578, 5]] # (1, 960, 20, 20) - 4
24+
head:
25+
- [-1, 1, nn.Upsample, [None, 2, nearest]] # (1, 960, 40, 40) - 5
26+
- [[-1, 2], 1, Concat, [1]] # (1, 1072, 40, 40) - 6
27+
- [-1, 2, C3k2, [48, False]] # (1, 112, 40, 40) - 7
28+
- [-1, 1, nn.Upsample, [None, 2, nearest]] # (1, 112, 80, 80) - 8
29+
- [[-1, 1], 1, Concat, [1]] # (1, 152, 80, 80) - 9
30+
- [-1, 2, C3k2, [24, False]] # (1, 40, 80, 80) - 10
31+
- [-1, 1, Conv, [24, 3, 2]] # (1, 40, 40, 40) - 11
32+
- [[-1, -5], 1, Concat, [1]] # (1, 152, 40, 40) - 12
33+
- [-1, 2, C3k2, [48, False]] # (1, 112, 40, 40) - 13
34+
- [-1, 1, Conv, [48, 3, 2]] # (1, 112, 20, 20) - 14
35+
- [[-1, -11], 1, Concat, [1]] # (1, 1072, 20, 20) - 15
36+
- [-1, 2, C3k2, [576, True]] # (1, 960, 20, 20) - 16
37+
- [[-7, -4, -1], 1, Detect, [nc]] # 17

cfg/detect/resnet101.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ nc: 1
1313
strides: [8, 16, 32]
1414
backbone:
1515
# [from, repeats, module, args]
16-
- [-1, 1, TorchVision, [768, "resnet101", "DEFAULT", True, 2, True]]
16+
- [-1, 1, TorchVision, [768, resnet101, DEFAULT, True, 2, True]]
1717
- [0, 1, Index, [512, 6]] # (1, 512, 80, 80) - 1
1818
- [0, 1, Index, [1024, 7]] # (1, 1024, 40, 40) - 2
1919
- [0, 1, Index, [2048, 8]] # (1, 2048, 20, 20) - 3

cfg/detect/swin_t-fpn.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Metadata
2+
author: Y-T-G
3+
task: detect
4+
keywords: [transformer, swin, fpn]
5+
description: Swin-T pretrained backbone with YOLO11 FPN neck and Detect head.
6+
flops: 73.7
7+
parameters: 40200397
8+
min_version: 8.3.64
9+
discussion: https://github.com/Y-T-G/community/discussions/41
10+
11+
# Model
12+
nc: 1
13+
strides: [8, 16, 32]
14+
scales:
15+
# [depth, width, max_channels]
16+
default: [1.00, 1.00, 1024]
17+
backbone:
18+
# [from, repeats, module, args]
19+
- [-1, 1, TorchVision, [768, swin_t, DEFAULT, True, 5, True]] # 0
20+
- [0, 1, Index, [192, 4]] # (1, 80, 80, 192) - 1
21+
- [-1, 1, torchvision.ops.Permute, [[0, 3, 1, 2]]] # (1, 192, 80, 80) - 2
22+
- [0, 1, Index, [384, 6]] # (1, 40, 40, 384) - 3
23+
- [-1, 1, torchvision.ops.Permute, [[0, 3, 1, 2]]] # (1, 384, 40, 40) - 4
24+
- [0, 1, Index, [768, 8]] # (1, 20, 20, 768) - 5
25+
- [-1, 1, torchvision.ops.Permute, [[0, 3, 1, 2]]] # (1, 768, 20, 20) - 6
26+
- [-1, 1, SPPF, [768, 5]] # (1, 768, 20, 20) - 7
27+
head:
28+
- [-1, 1, nn.Upsample, [None, 2, nearest]] # (1, 768, 40, 40) - 8
29+
- [[-1, 4], 1, Concat, [1]] # (1, 1152, 40, 40) - 9
30+
- [-1, 2, C3k2, [384, False]] # (1, 384, 40, 40) - 10
31+
- [-1, 1, nn.Upsample, [None, 2, nearest]] # (1, 384, 80, 80) - 11
32+
- [[-1, 2], 1, Concat, [1]] # (1, 576, 80, 80) - 12
33+
- [-1, 2, C3k2, [192, False]] # (1, 192, 80, 80) - 13
34+
- [-1, 1, Conv, [192, 3, 2]] # (1, 192, 40, 40) - 14
35+
- [[-1, -5], 1, Concat, [1]] # (1, 576, 40, 40) - 15
36+
- [-1, 2, C3k2, [384, False]] # (1, 384, 40, 40) - 16
37+
- [-1, 1, Conv, [384, 3, 2]] # (1, 384, 20, 20) - 17
38+
- [[-1, -11], 1, Concat, [1]] # (1, 1152, 20, 20) - 18
39+
- [-1, 2, C3k2, [768, True]] # (1, 768, 20, 20) - 19
40+
- [[-7, -4, -1], 1, Detect, [nc]] # 20

0 commit comments

Comments
 (0)