带标注的施工工人防护服数据集识别,识别率95.6%,支持yolo,coco json,pascal voc xml多种格式
数据集拆分
训练集
999图片
验证集
286图片
测试集
142图片
预处理
自动定向: 应用
调整大小: 拉伸至 640x640
增强
未进行任何增强
模型训练指标参数:

标签:
Helmet:安全帽
Vest :防护背心
Person:人
bare-arms : 裸露手臂
Gloves :防护手套
Non-Helmet:未戴安全帽
Shoes : 防护鞋

如何判断是否穿了防护背心:模型推理识别到person标签,但是没有Vest标签则没有穿防护背心
同理,其他的也是类似的。
图片和标注信息:



模型训练:
python
#如果存在版本兼容问题使用:pip install --upgrade ultralytics
from ultralytics import YOLO
# 加载预训练的 YOLOv8 模型
model = YOLO('yolov8n.pt')
# 训练模型
results = model.train(
data='data.yaml', # 数据集的配置文件路径
epochs=100, # 训练的轮数
imgsz=640 # 输入图像的大小
)
# 评估模型
metrics = model.val()
模型验证测试:
python
#需要安装pip install ultralytics
from ultralytics import YOLO
import cv2
# 加载训练好的 YOLO .pt 模型
model = YOLO('trained_yolov8n.pt') # 替换为你实际的 .pt 模型文件路径
# 定义要测试的图片路径
image_path = 'path/to/your/image.jpg' # 替换为你实际的图片文件路径
# 使用模型对图片进行预测
results = model(image_path)
# 获取预测结果
for result in results:
# 获取绘制了检测框的图片
annotated_image = result.plot()
# 显示图片
cv2.imshow("YOLOv8 Inference", annotated_image)
# 等待按键退出
cv2.waitKey(0)
# 关闭所有 OpenCV 窗口
cv2.destroyAllWindows()

推理结果:
{
"predictions": [
{
"x": 929,
"y": 416.5,
"width": 522,
"height": 717,
"confidence": 0.939,
"class": "Person",
"class_id": 3,
"detection_id": "2aaf58b6-5b99-4970-8bcd-195a0933e3cb"
},
{
"x": 854.5,
"y": 128,
"width": 175,
"height": 134,
"confidence": 0.92,
"class": "Helmet",
"class_id": 1,
"detection_id": "f0c2a9e6-e7e4-4004-aade-0dc4a04ed55c"
},
{
"x": 1108.5,
"y": 710,
"width": 105,
"height": 98,
"confidence": 0.801,
"class": "Gloves",
"class_id": 0,
"detection_id": "d601e485-f9f9-459e-982e-8b9d6b526bbc"
},
{
"x": 914.5,
"y": 459.5,
"width": 323,
"height": 375,
"confidence": 0.667,
"class": "Vest",
"class_id": 5,
"detection_id": "0d068055-d855-482c-9876-475228b0ab12"
}
]
}

推理结果:
{
"predictions": [
{
"x": 395,
"y": 312,
"width": 260,
"height": 498,
"confidence": 0.945,
"class": "Person",
"class_id": 3,
"detection_id": "4149698d-f67f-4963-8f94-bdfaadb6d710"
},
{
"x": 336.5,
"y": 485.5,
"width": 111,
"height": 87,
"confidence": 0.941,
"class": "Shoes",
"class_id": 4,
"detection_id": "7edab2c9-fe5b-42de-bd8f-8a8eca2024d1"
},
{
"x": 383,
"y": 255.5,
"width": 162,
"height": 175,
"confidence": 0.937,
"class": "Vest",
"class_id": 5,
"detection_id": "313a977d-d790-4a3e-af13-64c10377c258"
},
{
"x": 415,
"y": 513.5,
"width": 86,
"height": 95,
"confidence": 0.928,
"class": "Shoes",
"class_id": 4,
"detection_id": "5842fb52-e775-4313-ae02-50ba3245ef51"
},
{
"x": 388.5,
"y": 92.5,
"width": 129,
"height": 55,
"confidence": 0.907,
"class": "Helmet",
"class_id": 1,
"detection_id": "929759de-f18b-454e-99ff-386869fa8b29"
},
{
"x": 435.5,
"y": 371.5,
"width": 67,
"height": 45,
"confidence": 0.87,
"class": "Gloves",
"class_id": 0,
"detection_id": "6927196c-559b-4227-833c-78f038a1c470"
},
{
"x": 470.5,
"y": 311,
"width": 67,
"height": 80,
"confidence": 0.854,
"class": "bare-arms",
"class_id": 6,
"detection_id": "dddb12c7-2f82-4940-ac9f-10bce7118d77"
},
{
"x": 297.5,
"y": 292.5,
"width": 37,
"height": 69,
"confidence": 0.849,
"class": "bare-arms",
"class_id": 6,
"detection_id": "3335ca14-ab94-4f8c-baae-79c00f3a624e"
},
{
"x": 295.5,
"y": 348.5,
"width": 37,
"height": 43,
"confidence": 0.82,
"class": "Gloves",
"class_id": 0,
"detection_id": "b01223a6-159f-4cbb-92cc-dcf7060e6ee5"
}
]
}
数据集下载:
yolo 26:https://download.csdn.net/download/pbymw8iwm/92755278
yolo v12:https://download.csdn.net/download/pbymw8iwm/92755284
yolo v11:https://download.csdn.net/download/pbymw8iwm/92755280
yolo v9:https://download.csdn.net/download/pbymw8iwm/92755281
yolo v8:https://download.csdn.net/download/pbymw8iwm/92755286
yolo v7:https://download.csdn.net/download/pbymw8iwm/92755282
yolo v5:https://download.csdn.net/download/pbymw8iwm/92755279
coco json:https://download.csdn.net/download/pbymw8iwm/92755285
yolo datknet:https://download.csdn.net/download/pbymw8iwm/92755283
pascal voc xml:https://download.csdn.net/download/pbymw8iwm/92755277