Unverified 提交 0ab303b0 authored 作者: Glenn Jocher's avatar Glenn Jocher 提交者: GitHub

Remove `else:` from load_image() (#8692)

上级 916bdb1d
...@@ -682,8 +682,7 @@ class LoadImagesAndLabels(Dataset): ...@@ -682,8 +682,7 @@ class LoadImagesAndLabels(Dataset):
interp = cv2.INTER_LINEAR if (self.augment or r > 1) else cv2.INTER_AREA interp = cv2.INTER_LINEAR if (self.augment or r > 1) else cv2.INTER_AREA
im = cv2.resize(im, (int(w0 * r), int(h0 * r)), interpolation=interp) im = cv2.resize(im, (int(w0 * r), int(h0 * r)), interpolation=interp)
return im, (h0, w0), im.shape[:2] # im, hw_original, hw_resized return im, (h0, w0), im.shape[:2] # im, hw_original, hw_resized
else: return self.ims[i], self.im_hw0[i], self.im_hw[i] # im, hw_original, hw_resized
return self.ims[i], self.im_hw0[i], self.im_hw[i] # im, hw_original, hw_resized
def cache_images_to_disk(self, i): def cache_images_to_disk(self, i):
# Saves an image as an *.npy file for faster loading # Saves an image as an *.npy file for faster loading
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论