ChristopherSTAN
commited on
Commit
•
4503d80
1
Parent(s):
0bd619b
Delete organize_VOC.py
Browse files- data/organize_VOC.py +0 -47
data/organize_VOC.py
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
print(os.path.exists('../data/train.txt'))
|
2 |
-
f = open('../data/train.txt', 'r')
|
3 |
-
lines = f.readlines()
|
4 |
-
|
5 |
-
for line in lines:
|
6 |
-
#print(line.split('/')[-1][:-1])
|
7 |
-
line = "/".join(line.split('/')[2:])
|
8 |
-
|
9 |
-
if (os.path.exists(line[:-1])):
|
10 |
-
os.system("cp "+ line[:-1] + " VOC/images/train")
|
11 |
-
|
12 |
-
print(os.path.exists('../data/train.txt'))
|
13 |
-
f = open('../data/train.txt', 'r')
|
14 |
-
lines = f.readlines()
|
15 |
-
|
16 |
-
for line in lines:
|
17 |
-
#print(line.split('/')[-1][:-1])
|
18 |
-
line = "/".join(line.split('/')[2:])
|
19 |
-
line = line.replace('JPEGImages', 'labels')
|
20 |
-
line = line.replace('jpg', 'txt')
|
21 |
-
#print(line)
|
22 |
-
if (os.path.exists(line[:-1])):
|
23 |
-
os.system("cp "+ line[:-1] + " VOC/labels/train")
|
24 |
-
|
25 |
-
print(os.path.exists('../data/2007_test.txt'))
|
26 |
-
f = open('../data/2007_test.txt', 'r')
|
27 |
-
lines = f.readlines()
|
28 |
-
|
29 |
-
for line in lines:
|
30 |
-
#print(line.split('/')[-1][:-1])
|
31 |
-
line = "/".join(line.split('/')[2:])
|
32 |
-
|
33 |
-
if (os.path.exists(line[:-1])):
|
34 |
-
os.system("cp "+ line[:-1] + " VOC/images/val")
|
35 |
-
|
36 |
-
print(os.path.exists('../data/2007_test.txt'))
|
37 |
-
f = open('../data/2007_test.txt', 'r')
|
38 |
-
lines = f.readlines()
|
39 |
-
|
40 |
-
for line in lines:
|
41 |
-
#print(line.split('/')[-1][:-1])
|
42 |
-
line = "/".join(line.split('/')[2:])
|
43 |
-
line = line.replace('JPEGImages', 'labels')
|
44 |
-
line = line.replace('jpg', 'txt')
|
45 |
-
#print(line)
|
46 |
-
if (os.path.exists(line[:-1])):
|
47 |
-
os.system("cp "+ line[:-1] + " VOC/labels/val")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|