python实现labelme_json_to_dataset批量处理
讲解
1、库:os
2、代码效果:实现labelme_json_to dataset批量处理
代码
import os
def labelme_bothall(path):
path = path
folders = os.listdir(path)
folders_name = []
for folder in folders:
folder = folder.split('.')[0]
folders_name.append(str(folder))
line = "conda activate TF2.1"
os.system(line)
for name in folders_name:
line = "labelme_json_to_dataset "
line = line + path + '/' + name + ".json"
result = os.system(line)
if __name__ == "__main__":
labelme_bothall(r"")#json所在文件夹路径
运行结果
提取前
运行过程
运行结果