From 9a3b4c75b9a34ccec9ae6a718c2b5df6b1f0b18d Mon Sep 17 00:00:00 2001 From: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Date: Tue, 21 Jan 2025 06:43:08 +0000 Subject: [PATCH 1/2] Add MobileNetv3-Small FPN Detect config --- cfg/detect/mobilenet_v3_small-fpn.yaml | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 cfg/detect/mobilenet_v3_small-fpn.yaml diff --git a/cfg/detect/mobilenet_v3_small-fpn.yaml b/cfg/detect/mobilenet_v3_small-fpn.yaml new file mode 100644 index 0000000..addb5d9 --- /dev/null +++ b/cfg/detect/mobilenet_v3_small-fpn.yaml @@ -0,0 +1,37 @@ +# Metadata +author: Y-T-G +task: detect +keywords: [cnn, mobilenet, fpn] +description: MobileNetv3-Small pretrained backbone with YOLO11 FPN neck and Detect head. +flops: 5.9 +parameters: 5245459 +min_version: 8.3.59 + +# Model +nc: 1 +strides: [8, 16, 32] +scales: + # [depth, width, max_channels] + default: [1.00, 1.00, 1024] +backbone: + # [from, repeats, module, args] + - [-1, 1, TorchVision, [768, mobilenet_v3_small, DEFAULT, True, 2, True]] # 0 + - [0, 1, Index, [24, 4]] # (1, 40, 80, 80) - 1 + - [0, 1, Index, [48, 9]] # (1, 112, 40, 40) - 2 + - [0, 1, Index, [576, 13]] # (1, 960, 20, 20) - 3 + - [-1, 1, SPPF, [578, 5]] # (1, 960, 20, 20) - 4 +head: + - [-1, 1, nn.Upsample, [None, 2, nearest]] # (1, 960, 40, 40) - 5 + - [[-1, 2], 1, Concat, [1]] # (1, 1072, 40, 40) - 6 + - [-1, 2, C3k2, [48, False]] # (1, 112, 40, 40) - 7 + - [-1, 1, nn.Upsample, [None, 2, nearest]] # (1, 112, 80, 80) - 8 + - [[-1, 1], 1, Concat, [1]] # (1, 152, 80, 80) - 9 + - [-1, 2, C3k2, [24, False]] # (1, 40, 80, 80) - 10 + - [-1, 1, Conv, [24, 3, 2]] # (1, 40, 40, 40) - 11 + - [[-1, -5], 1, Concat, [1]] # (1, 152, 40, 40) - 12 + - [-1, 2, C3k2, [48, False]] # (1, 112, 40, 40) - 13 + - [-1, 1, Conv, [48, 3, 2]] # (1, 112, 20, 20) - 14 + - [[-1, -11], 1, Concat, [1]] # (1, 1072, 20, 20) - 15 + - [-1, 2, C3k2, [576, True]] # (1, 960, 20, 20) - 16 + - [[-7, -4, -1], 1, Detect, [nc]] # 17 + - [-1, 1, nn.Identity, []] \ No newline at end of file From 1d51ed2ba2c18f1ba08c6c8a713b0df2657930dc Mon Sep 17 00:00:00 2001 From: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Date: Tue, 21 Jan 2025 14:55:02 +0800 Subject: [PATCH 2/2] Update mobilenet_v3_small-fpn.yaml --- cfg/detect/mobilenet_v3_small-fpn.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/cfg/detect/mobilenet_v3_small-fpn.yaml b/cfg/detect/mobilenet_v3_small-fpn.yaml index addb5d9..95d3e30 100644 --- a/cfg/detect/mobilenet_v3_small-fpn.yaml +++ b/cfg/detect/mobilenet_v3_small-fpn.yaml @@ -34,4 +34,3 @@ head: - [[-1, -11], 1, Concat, [1]] # (1, 1072, 20, 20) - 15 - [-1, 2, C3k2, [576, True]] # (1, 960, 20, 20) - 16 - [[-7, -4, -1], 1, Detect, [nc]] # 17 - - [-1, 1, nn.Identity, []] \ No newline at end of file