1、完整代码
import os
import json
import time
import numpy as np
from tqdm import tqdm
from threading import Thread
def ConvertOne(labelme_dir, save_dir, json_file, classes, del_class):
json_file_path = os.path.join(labelme_dir, json_file)
yolo_save_path = os.path.join(save_dir, json_file.replace(".json", ".txt"))
yolo_label_file = open(yolo_save_path, "w+")
with open(json_file_path, "r") as jf:
labelme_labels = json.load(jf)
# # 根据标注时的形状取出标签
# polygons =