Quellcode durchsuchen

debug YOLOv5BaseTransform

yjh0410 vor 2 Jahren
Ursprung
Commit
c605d135a5
3 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen
  1. 1 1
      README.md
  2. 1 1
      dataset/data_augment/yolov5_augment.py
  3. 3 3
      dataset/voc.py

+ 1 - 1
README.md

@@ -114,7 +114,7 @@ python train.py --cuda -d coco --root path/to/COCO -v yolov1 -bs 16 --max_epoch
 | YOLOv8-Small  | CSP-ELANNet-Small  |  640  |  √   |  300  |       |                        |                   |  |
 | YOLOv8-Medium | CSP-ELANNet-Medium |  640  |  √   |  300  |       |                        |                   |  |
 | YOLOv8-Large  | CSP-ELANNet-Large  |  640  |  √   |  300  |       |                        |                   |  |
-| YOLOv8-Huge   | CSP-ELANNet-Large  |  640  |  √   |  300  |       |                        |                   |  |
+| YOLOv8-Huge   | CSP-ELANNet-Huge   |  640  |  √   |  300  |       |                        |                   |  |
 
 *All models are trained with ImageNet pretrained weight (IP). All FLOPs are measured with a 640x640 image size on COCO val2017. The FPS is measured with batch size 1 on 3090 GPU from the model inference to the NMS operation.*
 

+ 1 - 1
dataset/data_augment/yolov5_augment.py

@@ -389,7 +389,7 @@ class YOLOv5BaseTransform(object):
         img_h0, img_w0 = image.shape[:2]
 
         r = self.img_size / max(img_h0, img_w0)
-        r = min(r, 1.0) # only scale down, do not scale up (for better val mAP)
+        # r = min(r, 1.0) # only scale down, do not scale up (for better val mAP)
         if r != 1: 
             new_shape = (int(round(img_w0 * r)), int(round(img_h0 * r)))
             img = cv2.resize(image, new_shape, interpolation=cv2.INTER_LINEAR)

+ 3 - 3
dataset/voc.py

@@ -256,7 +256,7 @@ if __name__ == "__main__":
     
     args = parser.parse_args()
 
-    is_train = True
+    is_train = False
     img_size = 640
     yolov5_trans_config = {
         'aug_type': 'yolov5',
@@ -299,12 +299,12 @@ if __name__ == "__main__":
         'mosaic_prob': 0.0,
         'mixup_prob': 0.0
     }
-    transform = build_transform(img_size, yolox_trans_config, is_train)
+    transform = build_transform(img_size, yolov5_trans_config, is_train)
 
     dataset = VOCDetection(
         img_size=img_size,
         data_dir=args.root,
-        trans_config=yolox_trans_config,
+        trans_config=yolov5_trans_config,
         transform=transform,
         is_train=is_train
         )