yjh0410 2 年之前
父节点
当前提交
3cc89559b1
共有 3 个文件被更改,包括 7 次插入14 次删除
  1. 2 2
      README.md
  2. 2 2
      config/model_config/yolov7_config.py
  3. 3 10
      engine.py

+ 2 - 2
README.md

@@ -143,8 +143,8 @@ python train.py --cuda -d coco --root path/to/COCO -m yolov1 -bs 16 --max_epoch
 
 | 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 |
 |----------|-------|-------|-------------------------|--------------------|------------------------|-------------------|-------------------|--------------------|--------|
-| YOLOvx-N |  640  | 4xb32 |                         |                    |                        |                   |      9.1          |        2.4         |  |
-| YOLOvx-T |  640  | 4xb32 |                         |                    |                        |                   |      18.9         |        5.1         |  |
+| YOLOvx-N |  640  | 8xb16 |                         |                    |                        |                   |      9.1          |        2.4         |  |
+| YOLOvx-T |  640  | 8xb16 |                         |                    |                        |                   |      18.9         |        5.1         |  |
 | YOLOvx-S |  640  | 8xb16 |                         |                    |                        |                   |      33.6         |        9.0         |  |
 | YOLOvx-M |  640  | 8xb16 |         48.3            |        67.0        |          48.1          |        66.9       |      87.4         |        23.6        | [ckpt](https://github.com/yjh0410/PyTorch_YOLO_Tutorial/releases/download/yolo_tutorial_ckpt/yolovx_m_coco.pth) |
 | YOLOvx-L |  640  | 8xb16 |         50.2            |        68.6        |          50.0          |        68.4       |      176.6        |        47.6        | [ckpt](https://github.com/yjh0410/PyTorch_YOLO_Tutorial/releases/download/yolo_tutorial_ckpt/yolovx_l_coco.pth) |

+ 2 - 2
config/model_config/yolov7_config.py

@@ -36,7 +36,7 @@ yolov7_cfg = {
         # ---------------- Train config ----------------
         ## input
         'trans_type': 'yolov5_nano',
-        'multi_scale': [0.5, 1.25], # 320 -> 800
+        'multi_scale': [0.5, 1.5], # 320 -> 960
         # ---------------- Assignment config ----------------
         ## matcher
         'matcher': {'center_sampling_radius': 2.5,
@@ -134,7 +134,7 @@ yolov7_cfg = {
         # ---------------- Train config ----------------
         ## input
         'trans_type': 'yolov5_huge',
-        'multi_scale': [0.5, 1.25], # 320 -> 640
+        'multi_scale': [0.5, 1.25], # 320 -> 800
         # ---------------- Assignment config ----------------
         ## matcher
         'matcher': {'center_sampling_radius': 2.5,

+ 3 - 10
engine.py

@@ -37,10 +37,7 @@ class Yolov8Trainer(object):
         self.world_size = world_size
         self.heavy_eval = False
         self.second_stage = False
-        """
-            The below hyperparameters refer to YOLOv8.
-        """
-
+        # ---------------------------- Hyperparameters refer to YOLOv8 ----------------------------
         self.optimizer_dict = {'optimizer': 'sgd', 'momentum': 0.937, 'weight_decay': 5e-4, 'lr0': 0.01}
         self.ema_dict = {'ema_decay': 0.9999, 'ema_tau': 2000}
         self.lr_schedule_dict = {'scheduler': 'linear', 'lrf': 0.01}
@@ -361,9 +358,7 @@ class YoloxTrainer(object):
         self.no_aug_epoch = args.no_aug_epoch
         self.heavy_eval = False
         self.second_stage = False
-        """
-            The below hyperparameters refer to YOLOX: https://github.com/open-mmlab/mmyolo/tree/main/configs/rtmdet.
-        """
+        # ---------------------------- Hyperparameters refer to YOLOX ----------------------------
         self.optimizer_dict = {'optimizer': 'sgd', 'momentum': 0.9, 'weight_decay': 5e-4, 'lr0': 0.01}
         self.ema_dict = {'ema_decay': 0.9999, 'ema_tau': 2000}
         self.lr_schedule_dict = {'scheduler': 'cosine', 'lrf': 0.05}
@@ -670,9 +665,7 @@ class RTMTrainer(object):
         self.clip_grad = 35
         self.heavy_eval = False
         self.second_stage = False
-        """
-            The below hyperparameters refer to RTMDet: https://github.com/open-mmlab/mmyolo/tree/main/configs/rtmdet.
-        """
+        # ---------------------------- Hyperparameters refer to RTMDet ----------------------------
         self.optimizer_dict = {'optimizer': 'adamw', 'momentum': None, 'weight_decay': 5e-2, 'lr0': 0.001}
         self.ema_dict = {'ema_decay': 0.9998, 'ema_tau': 2000}
         self.lr_schedule_dict = {'scheduler': 'linear', 'lrf': 0.01}