-
Notifications
You must be signed in to change notification settings - Fork 0
/
data_aug.py
35 lines (32 loc) · 1014 Bytes
/
data_aug.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import cv2
import glob
i = 1
for data in glob.glob("./data/donburi/*"):
image = cv2.imread(data)
flip_image = cv2.flip(image, 1)
cv2.imwrite('./data/donburi/flip' + str(i) + '.jpg', flip_image)
i += 1
i = 1
# for data in glob.glob("./data/metal_cont/*"):
# image = cv2.imread(data)
# flip_image = cv2.flip(image, 1)
# cv2.imwrite('./data/metal_cont/flip' + str(i) + '.jpg', flip_image)
# i += 1
i = 1
# for data in glob.glob("./data/smartsnap/*"):
# image = cv2.imread(data)
# flip_image = cv2.flip(image, 1)
# cv2.imwrite('./data/smartsnap/flip' + str(i) + '.jpg', flip_image)
# i += 1
i = 1
for data in glob.glob("./data/rice/*"):
image = cv2.imread(data)
flip_image = cv2.flip(image, 1)
cv2.imwrite('./data/rice/flip' + str(i) + '.jpg', flip_image)
i += 1
i = 1
# for data in glob.glob("./data/soup_s/*"):
# image = cv2.imread(data)
# flip_image = cv2.flip(image, 1)
# cv2.imwrite('./data/soup_s/flip' + str(i) '.jpg', flip_image)
# i += 1