first commit
This commit is contained in:
1 parent
ae53e9eac5
commit
91cbd01126
514 files changed
+55625
-2203
No files matched your search
Executable
+21
@@ -0,0 +1,21 @@
|
||||
import os
|
||||
in_path = "/data/DataManagement/Project/001_cuihu/CAS_CuihuBird/CDB_Cuihubird/ImageSets/Main/test.txt"
|
||||
out_path = "/data/DataManagement/Project/001_cuihu/CAS_CuihuBird/CDB_Cuihubird/ImageSets/Main/test1.txt"
|
||||
def change(in_path,out_path):
|
||||
new = []
|
||||
f = open(in_path,'r')
|
||||
lines = f.readlines()
|
||||
for line in lines:
|
||||
line = line.strip('\n')
|
||||
line = "./images/{}.jpg".format(line)+" "+"./Annotations/{}.xml".format(line)+"\n"
|
||||
new.append(line)
|
||||
# while(line):
|
||||
# line = f.readline().replace("\n","")
|
||||
# line = "./images/{}".format(line) + " " + "./Annotations/{}".format(line) +"\n"
|
||||
# print(line)
|
||||
# new.append(line)
|
||||
handle = open(out_path, 'a')
|
||||
handle.writelines(new)
|
||||
|
||||
if __name__ == '__main__':
|
||||
change(in_path,out_path)
|
||||
Reference in new issue
Block a user