This commit is contained in:
Nathan Qin 2020-05-27 21:32:59 -06:00
parent 2467db76f7
commit 10b9b6767f

View File

@ -85,6 +85,10 @@ class RandomCrop(object):
def __call__(self,sample):
imidx, image, label = sample['imidx'], sample['image'], sample['label']
if random.random() >= 0.5:
image = image[::-1]
label = label[::-1]
h, w = image.shape[:2]
new_h, new_w = self.output_size