Skip to content

Commit 89dbdc7

Browse files
committed
feat(augment): add recompute and border
1 parent bc1bd35 commit 89dbdc7

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

deepem/data/augment/pinky_basil/aug_mip1_v3.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
from augmentor import *
22

33

4-
def get_augmentation(is_train, box=None, missing=7, blur=7, lost=True,
5-
random=False, **kwargs):
4+
def get_augmentation(
5+
is_train,
6+
box=None,
7+
missing=7,
8+
blur=7,
9+
lost=True,
10+
random=False,
11+
recompute=False,
12+
border=False,
13+
**kwargs
14+
):
615
augs = list()
716

817
# Box
@@ -72,7 +81,15 @@ def get_augmentation(is_train, box=None, missing=7, blur=7, lost=True,
7281
if is_train:
7382
augs.append(Warp(skip=0.3, do_twist=False, rot_max=45.0, scale_max=1.1))
7483

84+
# Recompute connected components
85+
if recompute:
86+
augs.append(Label())
87+
7588
# Flip & rotate
7689
augs.append(FlipRotate())
7790

91+
# Create border
92+
if border:
93+
augs.append(Border())
94+
7895
return Compose(augs)

0 commit comments

Comments
 (0)