note:
#导入对路径操作的库
import sys
import os
#图像路径
root_path = 'home/ll/'
#将每个图像的路径保存为txt
fns = os.listdir(root_path)
with open('image_list.txt', 'w') as f:
for fn in fns:
path = os.path.join(root_path, fn)
f.wirte('{}\n'.format(path))
print path