Skip to content

Commit e1f0a18

Browse files
change
1 parent e6b3e57 commit e1f0a18

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

create_training_data.py

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@
1919

2020
# Defining a mirroring function for flipping wrt y
2121
def mirroring_y(data):
22-
list_of_lists = [['xmin',19],['xmax',21]]
23-
min_max_list = []
24-
for v in list_of_lists:
25-
sep_1 = v[0]
26-
a = data[v[1]].split(sep_1)[0]
27-
b = data[v[1]].split(sep_1)[1]
28-
c = data[v[1]].split(sep_1)[2]
29-
sep_2 = '<'
30-
b_1 = b.split(sep_2)[0]
31-
b_2 = b.split(sep_2)[1]
32-
b_1_1 = '>'
33-
b_1_2 = str(227 - int(b_1[1:]))
34-
changed_string = a + sep_1 + b_1_1 + b_1_2 + sep_2 + b_2 + sep_1 + c
35-
min_max_list.append(changed_string)
22+
list_of_lists = [['xmin',19],['xmax',21]]
23+
min_max_list = []
24+
for v in list_of_lists:
25+
sep_1 = v[0]
26+
a = data[v[1]].split(sep_1)[0]
27+
b = data[v[1]].split(sep_1)[1]
28+
c = data[v[1]].split(sep_1)[2]
29+
sep_2 = '<'
30+
b_1 = b.split(sep_2)[0]
31+
b_2 = b.split(sep_2)[1]
32+
b_1_1 = '>'
33+
b_1_2 = str(227 - int(b_1[1:]))
34+
changed_string = a + sep_1 + b_1_1 + b_1_2 + sep_2 + b_2 + sep_1 + c
35+
min_max_list.append(changed_string)
3636
return list((min_max_list))
3737

3838
def make_flipping_y():
@@ -56,21 +56,21 @@ def make_flipping_y():
5656

5757
# Defining a mirroring function for flipping wrt x
5858
def mirroring_x(data):
59-
list_of_lists = [['ymin',20],['ymax',22]]
60-
min_max_list = []
61-
for v in list_of_lists:
62-
sep_1 = v[0]
63-
a = data[v[1]].split(sep_1)[0]
64-
b = data[v[1]].split(sep_1)[1]
65-
c = data[v[1]].split(sep_1)[2]
66-
sep_2 = '<'
67-
b_1 = b.split(sep_2)[0]
68-
b_2 = b.split(sep_2)[1]
69-
b_1_1 = '>'
70-
b_1_2 = str(227 - int(b_1[1:]))
71-
changed_string = a + sep_1 + b_1_1 + b_1_2 + sep_2 + b_2 + sep_1 + c
72-
min_max_list.append(changed_string)
73-
return list(min_max_list)
59+
list_of_lists = [['ymin',20],['ymax',22]]
60+
min_max_list = []
61+
for v in list_of_lists:
62+
sep_1 = v[0]
63+
a = data[v[1]].split(sep_1)[0]
64+
b = data[v[1]].split(sep_1)[1]
65+
c = data[v[1]].split(sep_1)[2]
66+
sep_2 = '<'
67+
b_1 = b.split(sep_2)[0]
68+
b_2 = b.split(sep_2)[1]
69+
b_1_1 = '>'
70+
b_1_2 = str(227 - int(b_1[1:]))
71+
changed_string = a + sep_1 + b_1_1 + b_1_2 + sep_2 + b_2 + sep_1 + c
72+
min_max_list.append(changed_string)
73+
return list(min_max_list)
7474

7575

7676
def make_flipping_x():

0 commit comments

Comments
 (0)