Spaces:
Sleeping
Sleeping
Update data_utils.py
Browse files- data_utils.py +3 -8
data_utils.py
CHANGED
|
@@ -44,15 +44,10 @@ class HFDatasetWrapper(Dataset):
|
|
| 44 |
def get_train_transform():
|
| 45 |
return transforms.Compose(
|
| 46 |
[
|
| 47 |
-
transforms.
|
| 48 |
transforms.RandomHorizontalFlip(p=0.5),
|
| 49 |
-
transforms.RandomVerticalFlip(p=0.
|
| 50 |
-
transforms.RandomRotation(degrees=
|
| 51 |
-
transforms.ColorJitter(
|
| 52 |
-
brightness=0.2,
|
| 53 |
-
contrast=0.2,
|
| 54 |
-
saturation=0.1,
|
| 55 |
-
),
|
| 56 |
transforms.ToTensor(),
|
| 57 |
transforms.Normalize(
|
| 58 |
mean=(0.485, 0.456, 0.406),
|
|
|
|
| 44 |
def get_train_transform():
|
| 45 |
return transforms.Compose(
|
| 46 |
[
|
| 47 |
+
transforms.Resize((IMAGE_SIZE, IMAGE_SIZE)),
|
| 48 |
transforms.RandomHorizontalFlip(p=0.5),
|
| 49 |
+
transforms.RandomVerticalFlip(p=0.5),
|
| 50 |
+
transforms.RandomRotation(degrees=5),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
transforms.ToTensor(),
|
| 52 |
transforms.Normalize(
|
| 53 |
mean=(0.485, 0.456, 0.406),
|