Update augmentor.py

This commit is contained in:
Gangwei Xu 2023-03-12 20:21:31 +08:00 committed by GitHub
parent e651d84ed8
commit 21243dfb11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,7 +84,6 @@ class FlowAugmentor:
# asymmetric
if np.random.rand() < self.asymmetric_color_aug_prob:
#print("#####44444", img1.shape)
img1 = np.array(self.photo_aug(Image.fromarray(img1)), dtype=np.uint8)
img2 = np.array(self.photo_aug(Image.fromarray(img2)), dtype=np.uint8)
@ -128,8 +127,6 @@ class FlowAugmentor:
scale_x = np.clip(scale_x, min_scale, None)
scale_y = np.clip(scale_y, min_scale, None)
# print("####22222", flow.shape, scale_x, scale_y)
if np.random.rand() < self.spatial_aug_prob:
# rescale the images
img1 = cv2.resize(img1, None, fx=scale_x, fy=scale_y, interpolation=cv2.INTER_LINEAR)