图片打标签代码(python)(深度学习需要用到!)
给包含在文件夹下的图片加标签(python) 千次阅读 2019-03-16 10:27:36 #!/usr/bin/env python import sys import os.path if __name__ == "__main__": #if len(sys.argv) != 2: # print "usage: create_csv <base_path>" # sys.exit(1) #BASE_PATH=sys.argv[1] BASE_PATH="E:/k" SEPARATOR=";" fh = open("C:\\Users\\lbn\\Desktop\\aa.txt",'w') for dirname, dirnames, filenames in os.walk(BASE_PATH): for subdirname in dirnames: subjec