-
Notifications
You must be signed in to change notification settings - Fork 0
/
prep_data.py
35 lines (30 loc) · 886 Bytes
/
prep_data.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
from data_prep.data_utils import sort_veg_imgs_to_test, pickle_veg_data
from data_prep.img_extract import crisscross
from data_prep.lbl_utils import get_sorted_veg_from_excel
if __name__ == "__main__":
while True:
print('Can chain cmds(ex. esp, ep)')
print('Extract imgs(e)\nSort Imgs(s)'
'\nPixel Data(p)\nComplete(c)\nQuit(q)')
inp = input('->: ')
if inp == 'q':
print('Good bye!')
break
valid = False
if inp.__contains__('c'):
valid = True
crisscross()
sort_veg_imgs_to_test()
pickle_veg_data()
else:
if inp.__contains__('e'):
valid = True
crisscross()
if inp.__contains__('s'):
valid = True
sort_veg_imgs_to_test()
if inp.__contains__('p'):
valid = True
pickle_veg_data()
if not valid:
print('Invalid cmd.')