-
Notifications
You must be signed in to change notification settings - Fork 0
/
augment_datasets.py
53 lines (47 loc) · 1.46 KB
/
augment_datasets.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import shutil
from generators.augment_datasets import augment_datasets as augment_sets
from generators.mix_datasets import mix_datasets as mix_all
from generators.mix_datasets_reduced_slope import mix_datasets_reduced_slope
from generators.mix_datasets_custom import mix_datasets_selected
from consts import MIX_PATH
def augment_datasets():
print('Please select one of the following options:')
print('1. Augment mixed datasets.')
print('2. Augment all datasets.')
print('3. Augment the datasets with less slope.')
print('4. Custom augmentation.')
print('5. Exit.')
option = input('Input the number of the selected option: ')
# Augment mixed the datasets
if option == '1':
print('-' * 70)
augment_sets()
print('-' * 70)
# Augment all the datasets
elif option == '2':
print('-' * 70)
shutil.rmtree(MIX_PATH)
mix_all()
augment_sets()
print('-' * 70)
# Augment the datasets with less slope
elif option == '3':
print('-' * 70)
shutil.rmtree(MIX_PATH)
mix_datasets_reduced_slope()
augment_sets()
print('-' * 70)
# Custom augmentation
elif option == '4':
print('-' * 70)
shutil.rmtree(MIX_PATH)
mix_datasets_selected()
augment_sets()
print('-' * 70)
# Exit
else:
return False
print('Data augmented successfully.')
print('-' * 70)
print('-' * 70)
return True