import sys
import os
data_dir = "/home/lab305/caffe-ssd/data/ssd/data/"
label_dir = "/home/lab305/caffe-ssd/data/ssd/label/"
file_list = []
write_file_name = 'test.txt'
write_file = open(write_file_name, "a")
tt=os.listdir(label_dir)
for file in tt:
if file.endswith(".xml"):
write_name = data_dir + file.rstrip('.xml') + ".jpg"
xml_name = label_dir + file
file_list.append(write_name)
write_file.write(write_name + ' ' + xml_name + '\n')
write_file.close()