Skip to content

Commit 923bd90

Browse files
Add random affine transformation to training data as augmentation.
1 parent dcdeec7 commit 923bd90

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

train.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def create_dataloader(args: Namespace, verbose: bool = False) -> Dict[str, DataL
8282
'train': transforms.Compose([
8383
transforms.Resize((width, height)),
8484
transforms.ColorJitter(brightness=0.2, contrast=0.2, saturation=0.5, hue=0.5),
85+
transforms.RandomAffine(degrees=10, translate=(0.05, 0.05), scale=(0.95, 1.05), shear=10),
8586
transforms.ToTensor(),
8687
transforms.Normalize([0.6205, 0.6205, 0.6205], [0.1343, 0.1343, 0.1343])
8788
]),

0 commit comments

Comments
 (0)