onipot commited on
Commit
dd4f531
1 Parent(s): a254402

update augs

Browse files
Files changed (1) hide show
  1. yolov5/detect.py +2 -1
yolov5/detect.py CHANGED
@@ -38,6 +38,8 @@ test_random_transforms = torchvision.transforms.Compose([
38
  torchvision.transforms.RandomGrayscale(p=0.4),
39
  torchvision.transforms.RandomPerspective(0.4, p=0.4),
40
  torchvision.transforms.RandomAdjustSharpness(2),
 
 
41
  torchvision.transforms.Normalize((0.485, 0.456, 0.406), (0.229, 0.224, 0.225)),
42
  torchvision.transforms.Resize((224, 224)),
43
  ])
@@ -96,7 +98,6 @@ def predict(
96
  # Process predictions
97
  preds = []
98
 
99
-
100
  for i, det in enumerate(pred): # per image
101
 
102
  # im0 = im0.copy()
 
38
  torchvision.transforms.RandomGrayscale(p=0.4),
39
  torchvision.transforms.RandomPerspective(0.4, p=0.4),
40
  torchvision.transforms.RandomAdjustSharpness(2),
41
+ torchvision.transforms.RandomAffine(degrees=0, translate=None, scale=(0.9, 1.0)),
42
+ torchvision.transforms.RandomHorizontalFlip(),
43
  torchvision.transforms.Normalize((0.485, 0.456, 0.406), (0.229, 0.224, 0.225)),
44
  torchvision.transforms.Resize((224, 224)),
45
  ])
 
98
  # Process predictions
99
  preds = []
100
 
 
101
  for i, det in enumerate(pred): # per image
102
 
103
  # im0 = im0.copy()