Skip to content

Commit

Permalink
Bug Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
devbruce committed Aug 9, 2019
1 parent c895a54 commit bf75ad0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CutMixImageDataGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ def __next__(self):

X = X_1
for i in range(reshape_size):
cut_size = int(self.img_size * cut_ratio[i])
x1 = random.randint(0, (self.img_size-1) - cut_size)
cut_size = int((self.img_size-1) * cut_ratio[i])
y1 = random.randint(0, (self.img_size-1) - cut_size)
x2 = x1 + cut_size
x1 = random.randint(0, (self.img_size-1) - cut_size)
y2 = y1 + cut_size
x2 = x1 + cut_size
cut_arr = cut_img[i][y1:y2, x1:x2]
cutmix_img = X_1[i]
cutmix_img[y1:y2, x1:x2] = cut_arr
Expand Down

0 comments on commit bf75ad0

Please sign in to comment.