浏览代码

debug YOLOv5BaseTransform

yjh0410 2 年之前
父节点
当前提交
71fc6bab2c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      dataset/data_augment/yolov5_augment.py

+ 1 - 1
dataset/data_augment/yolov5_augment.py

@@ -392,7 +392,7 @@ class YOLOv5BaseTransform(object):
         # 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)
+            img = cv2.resize(image, new_shape, interpolation=cv2.INTER_LINEAR)
         else:
             img = image