Skip to content

Commit

Permalink
Update MixUp augmentation alpha=beta=32.0 (#3455)
Browse files Browse the repository at this point in the history
Per VOC empirical results #3380 (comment) by @developer0hye
  • Loading branch information
glenn-jocher committed Jun 4, 2021
1 parent 4aa2959 commit 8e3b4a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def __getitem__(self, index):
# MixUp https://arxiv.org/pdf/1710.09412.pdf
if random.random() < hyp['mixup']:
img2, labels2 = load_mosaic(self, random.randint(0, self.n - 1))
r = np.random.beta(8.0, 8.0) # mixup ratio, alpha=beta=8.0
r = np.random.beta(32.0, 32.0) # mixup ratio, alpha=beta=32.0
img = (img * r + img2 * (1 - r)).astype(np.uint8)
labels = np.concatenate((labels, labels2), 0)

Expand Down

0 comments on commit 8e3b4a0

Please sign in to comment.