Skip to content

Commit

Permalink
Disabled mosaic aug for now
Browse files Browse the repository at this point in the history
Mosaic aug would work better if UOLO returns mask of the inital size. First we run experiments with current network.
  • Loading branch information
manole-alexandru committed Apr 15, 2023
1 parent b165524 commit 19b1bc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/dataloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ def __getitem__(self, index):

hyp = self.hyp
mosaic = self.mosaic and random.random() < hyp['mosaic']
if mosaic:
if False #mosaic:
# Load mosaic
img, labels, seg = self.load_mosaic(index)
shapes = None
Expand Down Expand Up @@ -694,7 +694,7 @@ def __getitem__(self, index):
perspective=hyp['perspective'])
seg, _, _ = random_perspective(seg, labels, degrees=hyp['degrees'], translate=hyp['translate'], scale=hyp['scale'],
shear=hyp['shear'], perspective=hyp['perspective'], random_parameters=random_parameters)

cv2.imwrite('runs/image' + str(index) + '.jpg', img)
cv2.imwrite('runs/mask' + str(index) + '.png', seg)
nl = len(labels) # number of labels
Expand Down

0 comments on commit 19b1bc7

Please sign in to comment.