updates
This commit is contained in:
parent
2421f3e252
commit
035faa6694
|
@ -508,7 +508,7 @@ def load_image(self, index):
|
|||
img = cv2.imread(img_path) # BGR
|
||||
assert img is not None, 'Image Not Found ' + img_path
|
||||
r = self.img_size / max(img.shape) # resize image to img_size
|
||||
if (r < 1) or ((r > 1) and self.augment): # always resize down, only resize up if training with augmentation
|
||||
if self.augment and (r != 1): # always resize down, only resize up if training with augmentation
|
||||
h, w = img.shape[:2]
|
||||
return cv2.resize(img, (int(w * r), int(h * r)), interpolation=cv2.INTER_LINEAR) # _LINEAR fastest
|
||||
return img
|
||||
|
|
Loading…
Reference in New Issue