添加状态分类和液面分割

This commit is contained in:
琉璃月光
2025-09-01 14:14:18 +08:00
parent 6e553f6a20
commit ad52ab9125
2379 changed files with 102501 additions and 1465 deletions

View File

@ -90,10 +90,11 @@ def labelme_to_yolo_segmentation_batch(json_dir, output_dir, target_label="夹
# ================== 用户配置区 ==================
JSON_DIR = "/home/hx/yolo/yolo11_seg/folder_end" # LabelMe JSON 文件夹路径
OUTPUT_DIR = "labels" # 输出 YOLO 标注文件夹
JSON_DIR = "/media/hx/04e879fa-d697-4b02-ac7e-a4148876ebb0/dataset/seg/dataset2/14" # LabelMe JSON 文件夹路径
OUTPUT_DIR = "/media/hx/04e879fa-d697-4b02-ac7e-a4148876ebb0/dataset/seg/dataset2/labels" # 输出 YOLO 标注文件夹
#TARGET_LABEL = "yeimian" # 只转换这个标签
TARGET_LABEL = "夹具1" # 只转换这个标签
CLASS_ID = 1 # YOLO 中该类的 ID
CLASS_ID = 0 # YOLO 中该类的 ID
IMG_SHAPE = (1440, 2506) # 图像实际尺寸 (高度, 宽度)
# ================== 执行转换 ==================