From 71d65130353ffbe1394c525bf73f28e880c77cb0 Mon Sep 17 00:00:00 2001 From: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Date: Tue, 21 Jan 2025 06:17:55 +0000 Subject: [PATCH] Reformat Swin-T config --- cfg/detect/swin_t-fpn.yaml | 44 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/cfg/detect/swin_t-fpn.yaml b/cfg/detect/swin_t-fpn.yaml index ef9ed85..a493dcc 100644 --- a/cfg/detect/swin_t-fpn.yaml +++ b/cfg/detect/swin_t-fpn.yaml @@ -1,7 +1,7 @@ # Metadata author: Y-T-G task: detect -keywords: [transformer, swin] +keywords: [transformer, swin, fpn] description: Swin-T pretrained backbone with YOLO11 FPN neck and Detect head. flops: 73.7 parameters: 40200397 @@ -16,25 +16,25 @@ scales: default: [1.00, 1.00, 1024] backbone: # [from, repeats, module, args] - - [-1, 1, 'TorchVision', [768, 'swin_t', 'DEFAULT', True, 5, True]] # 0 - - [0, 1, 'Index', [192, 4]] # (1, 80, 80, 192) - 1 - - [-1, 1, 'torchvision.ops.Permute', [[0, 3, 1, 2]]] # (1, 192, 80, 80) - 2 - - [0, 1, 'Index', [384, 6]] # (1, 40, 40, 384) - 3 - - [-1, 1, 'torchvision.ops.Permute', [[0, 3, 1, 2]]] # (1, 384, 40, 40) - 4 - - [0, 1, 'Index', [768, 8]] # (1, 20, 20, 768) - 5 - - [-1, 1, 'torchvision.ops.Permute', [[0, 3, 1, 2]]] # (1, 768, 20, 20) - 6 - - [-1, 1, 'SPPF', [768, 5]] # (1, 768, 20, 20) - 7 + - [-1, 1, TorchVision, [768, swin_t, DEFAULT, True, 5, True]] # 0 + - [0, 1, Index, [192, 4]] # (1, 80, 80, 192) - 1 + - [-1, 1, torchvision.ops.Permute, [[0, 3, 1, 2]]] # (1, 192, 80, 80) - 2 + - [0, 1, Index, [384, 6]] # (1, 40, 40, 384) - 3 + - [-1, 1, torchvision.ops.Permute, [[0, 3, 1, 2]]] # (1, 384, 40, 40) - 4 + - [0, 1, Index, [768, 8]] # (1, 20, 20, 768) - 5 + - [-1, 1, torchvision.ops.Permute, [[0, 3, 1, 2]]] # (1, 768, 20, 20) - 6 + - [-1, 1, SPPF, [768, 5]] # (1, 768, 20, 20) - 7 head: - - [-1, 1, 'nn.Upsample', ['None', 2, 'nearest']] # (1, 768, 40, 40) - 8 - - [[-1, 4], 1, 'Concat', [1]] # (1, 1152, 40, 40) - 9 - - [-1, 2, 'C3k2', [384, False]] # (1, 384, 40, 40) - 10 - - [-1, 1, 'nn.Upsample', ['None', 2, 'nearest']] # (1, 384, 80, 80) - 11 - - [[-1, 2], 1, 'Concat', [1]] # (1, 576, 80, 80) - 12 - - [-1, 2, 'C3k2', [192, False]] # (1, 192, 80, 80) - 13 - - [-1, 1, 'Conv', [192, 3, 2]] # (1, 192, 40, 40) - 14 - - [[-1, -5], 1, 'Concat', [1]] # (1, 576, 40, 40) - 15 - - [-1, 2, 'C3k2', [384, False]] # (1, 384, 40, 40) - 16 - - [-1, 1, 'Conv', [384, 3, 2]] # (1, 384, 20, 20) - 17 - - [[-1, -11], 1, 'Concat', [1]] # (1, 1152, 20, 20) - 18 - - [-1, 2, 'C3k2', [768, True]] # (1, 768, 20, 20) - 19 - - [[-7, -4, -1], 1, 'Detect', ['nc']] # 20 + - [-1, 1, nn.Upsample, [None, 2, nearest]] # (1, 768, 40, 40) - 8 + - [[-1, 4], 1, Concat, [1]] # (1, 1152, 40, 40) - 9 + - [-1, 2, C3k2, [384, False]] # (1, 384, 40, 40) - 10 + - [-1, 1, nn.Upsample, [None, 2, nearest]] # (1, 384, 80, 80) - 11 + - [[-1, 2], 1, Concat, [1]] # (1, 576, 80, 80) - 12 + - [-1, 2, C3k2, [192, False]] # (1, 192, 80, 80) - 13 + - [-1, 1, Conv, [192, 3, 2]] # (1, 192, 40, 40) - 14 + - [[-1, -5], 1, Concat, [1]] # (1, 576, 40, 40) - 15 + - [-1, 2, C3k2, [384, False]] # (1, 384, 40, 40) - 16 + - [-1, 1, Conv, [384, 3, 2]] # (1, 384, 20, 20) - 17 + - [[-1, -11], 1, Concat, [1]] # (1, 1152, 20, 20) - 18 + - [-1, 2, C3k2, [768, True]] # (1, 768, 20, 20) - 19 + - [[-7, -4, -1], 1, Detect, [nc]] # 20