mirror of
https://git.mirrors.martin98.com/https://github.com/xuebinqin/U-2-Net
synced 2025-08-17 12:15:53 +08:00
new
This commit is contained in:
parent
2467db76f7
commit
10b9b6767f
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user