-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtransforms.py
More file actions
24 lines (21 loc) · 762 Bytes
/
Copy pathtransforms.py
File metadata and controls
24 lines (21 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#Transforms consist of resizing images and flipping
#Bbox parameters will be in pascal and not coco format
# For Train Data
def getTrainTransform():
return A.Compose([
A.Resize(height=512, width=512, p=1),
A.Flip(0.5),
ToTensorV2(p=1.0)
], bbox_params={'format': 'pascal_voc', 'label_fields': ['labels']})
# For Validation Data
def getValTransform():
return A.Compose([
A.Resize(height=512, width=512, p=1),
ToTensorV2(p=1.0)
], bbox_params={'format': 'pascal_voc', 'label_fields': ['labels']})
# For Test Data
def getTestTransform():
return A.Compose([
A.Resize(height=512, width=512, p=1),
ToTensorV2(p=1.0)
], bbox_params={'format': 'pascal_voc', 'label_fields': ['labels']})