Ver Fonte

release RTCDet-N

yjh0410 há 2 anos atrás
pai
commit
02d71f7bb1
2 ficheiros alterados com 58 adições e 2 exclusões
  1. 56 0
      config/model_config/rtcdet_config.py
  2. 2 2
      models/detectors/rtcdet/README.md

+ 56 - 0
config/model_config/rtcdet_config.py

@@ -226,6 +226,62 @@ rtcdet_cfg = {
         'trainer_type': 'rtcdet',
     },
 
+    'rtcdet_m':{
+        # ---------------- Model config ----------------
+        ## Backbone
+        'backbone': 'elannet_v2',
+        'pretrained': False,
+        'bk_act': 'silu',
+        'bk_norm': 'BN',
+        'bk_depthwise': False,
+        'width': 0.75,
+        'depth': 0.67,
+        'stride': [8, 16, 32],  # P3, P4, P5
+        'max_stride': 32,
+        'reg_max': 16,
+        ## Neck: SPP
+        'neck': 'sppf',
+        'neck_expand_ratio': 0.5,
+        'pooling_size': 5,
+        'neck_act': 'silu',
+        'neck_norm': 'BN',
+        'neck_depthwise': False,
+        ## Neck: PaFPN
+        'fpn': 'rtcdet_pafpn',
+        'fpn_reduce_layer': 'conv',
+        'fpn_downsample_layer': 'dsblock',
+        'fpn_core_block': 'elan_block',
+        'fpn_branch_depth': 3,
+        'fpn_expand_ratio': 0.5,
+        'fpn_act': 'silu',
+        'fpn_norm': 'BN',
+        'fpn_depthwise': False,
+        ## Head
+        'head': 'decoupled_head',
+        'head_act': 'silu',
+        'head_norm': 'BN',
+        'num_cls_head': 2,
+        'num_reg_head': 2,
+        'head_depthwise': False,
+        # ---------------- Train config ----------------
+        ## Input
+        'multi_scale': [0.5, 1.25], # 320 -> 800
+        'trans_type': 'yolox_medium',
+        # ---------------- Assignment config ----------------
+        ## Matcher
+        'matcher': {'center_sampling_radius': 2.5,
+                    'topk_candidate': 10},
+        # ---------------- Loss config ----------------
+        ## Loss weight
+        'ema_update': False,
+        'loss_box_aux': True,
+        'loss_cls_weight': 1.0,
+        'loss_box_weight': 5.0,
+        'loss_dfl_weight': 1.0,
+        # ---------------- Train config ----------------
+        'trainer_type': 'rtcdet',
+    },
+
     'rtcdet_l':{
         # ---------------- Model config ----------------
         ## Backbone

+ 2 - 2
models/detectors/rtcdet/README.md

@@ -2,7 +2,7 @@
 
 |   Model  | Scale | Batch | AP<sup>test<br>0.5:0.95 | AP<sup>test<br>0.5 | AP<sup>val<br>0.5:0.95 | AP<sup>val<br>0.5 | FLOPs<br><sup>(G) | Params<br><sup>(M) | Weight |
 |----------|-------|-------|-------------------------|--------------------|------------------------|-------------------|-------------------|--------------------|--------|
-| RTCDet-N |  640  | 8xb16 |                         |                    |                        |                   |                   |                    |  |
+| RTCDet-N |  640  | 8xb16 |                         |                    |          36.6          |       54.6        |       8.2         |       2.1          | [ckpt](https://github.com/yjh0410/PyTorch_YOLO_Tutorial/releases/download/yolo_tutorial_ckpt/rtcdet_n_coco.pth) |
 | RTCDet-T |  640  | 8xb16 |          41.9           |        60.6        |          41.6          |       60.1        |       17.9        |       4.7          | [ckpt](https://github.com/yjh0410/PyTorch_YOLO_Tutorial/releases/download/yolo_tutorial_ckpt/rtcdet_t_coco.pth) |
 | RTCDet-S |  640  | 8xb16 |          45.2           |        64.0        |          44.7          |       63.7        |       31.5        |       8.4          | [ckpt](https://github.com/yjh0410/PyTorch_YOLO_Tutorial/releases/download/yolo_tutorial_ckpt/rtcdet_s_coco.pth) |
 | RTCDet-M |  640  | 8xb16 |                         |                    |                        |                   |                   |                    |  |
@@ -14,7 +14,7 @@
 | RTCDet-P |  320  | 8xb16 |                         |                    |                        |                   |                   |                    |  |
 | RTCDet-P |  416  | 8xb16 |                         |                    |                        |                   |                   |                    |  |
 | RTCDet-P |  512  | 8xb16 |                         |                    |                        |                   |                   |                    |  |
-| RTCDet-P |  640  | 8xb16 |                         |                    |                        |                   |                   |                    |  |
+| RTCDet-P |  640  | 8xb16 |                         |                    |                        |                   |       4.05        |        1.07        |  |
 
 - For training, we train my RTCDet series series with 300 epochs on COCO.
 - For data augmentation, we use the large scale jitter (LSJ), Mosaic augmentation and Mixup augmentation, following the setting of [YOLOX](https://github.com/ultralytics/yolov5), but we remove the rotation transformation which is used in YOLOX's strong augmentation.