无人机巡检系统 - 智慧交通基础设施监测 - 小目标/密集目标检测(如裂缝、垃圾) - 多类别路面病害联合检测 智慧交通高清无人机视角高速路面损害检测数据集
航拍无人机视角高速路面损害检测数据集,3349张

yolo,voc,coco标注方式
图像尺寸:1152*2048
类别数量:6类
训练集图像数量:3153; 验证集图像数量:157; 测试集图像数量:39
类别名称: 每一类图像数 ,每一类标注数
Cracks - 裂缝:446, 815
Waterlogging - 积水:1208, 2091
Ravelling - 松散:459, 869
Muddy_road - 泥泞道路:952, 2084
Road_side_garbage - 道路旁垃圾:329, 429
Potholes - 坑洼:663, 1352
image num: 3349
以下是航拍无人机视角高速路面损害检测数据集的完整信息表格:
| 属性 | 详情 |
|---|---|
| 数据集名称 | Aerial UAV Highway Pavement Damage Detection Dataset |
| 采集视角 | 无人机航拍(俯视高速道路场景) |
| 图像总数 | 3,349 张 |
| 图像分辨率 | 1152 × 2048 像素 |
| 标注格式支持 | YOLO、VOC、COCO(三者均提供) |
| 任务类型 | 目标检测(Bounding Box) |
| 类别数量 | 6 类 |

📊 类别详细统计表
| 类别英文名 | 中文名称 | 包含该类别的图像数量 | 该类别的标注实例总数 |
|---|---|---|---|
| Cracks | 裂缝 | 446 | 815 |
| Waterlogging | 积水 | 1,208 | 2,091 |
| Ravelling | 松散 | 459 | 869 |
| Muddy_road | 泥泞道路 | 952 | 2,084 |
| Road_side_garbage | 道路旁垃圾 | 329 | 429 |
| Potholes | 坑洼 | 663 | 1,352 |
✅ 总计图像数:3,349(与各图像数之和不等,因单张图像可含多个类别)
✅ 总标注实例数:7,640

📁 数据集划分
| 子集 | 图像数量 |
|---|---|
| 训练集(train) | 3,153 |
| 验证集(val) | 157 |
| 测试集(test) | 39 |
| 总计 | 3,349 |
该数据集适用于:
- 无人机巡检系统
- 智慧交通基础设施监测
- 小目标/密集目标检测(如裂缝、垃圾)
- 多类别路面病害联合检测

1、

航拍无人机视角高速路面损害检测数据集(6类,3349张图像,分辨率1152×2048)的完整 YOLOv8 训练代码与配置方案,支持 YOLO 格式标注(推荐),并兼容你已有的 VOC/COCO 标注。
✅ 一、环境准备
pip install ultralytics opencv-python numpy pandas tqdm ultralytics 是官方 YOLOv8 库,原生支持 YOLO、COCO、VOC(需转换)格式。✅ 二、数据组织结构(YOLO 格式)
假设你的数据已按以下结构存放:
HighwayDamageDataset/ ├── images/ │ ├── train/ # 3153 张 │ ├── val/ # 157 张 │ └── test/ # 39 张 └── labels/ ├── train/ ├── val/ └── test/ 每张图像 xxx.jpg 对应一个 xxx.txt,内容为:
<class_id> <x_center> <y_center> <width> <height> # 归一化到 [0,1] 🔁 若你只有 VOC 或 COCO 标注,文末提供自动转换脚本。
✅ 三、YOLO 配置文件:highway_damage.yaml
# highway_damage.yamltrain: ./HighwayDamageDataset/images/train val: ./HighwayDamageDataset/images/val test: ./HighwayDamageDataset/images/test nc:6# 类别数names:- Cracks # 裂缝- Waterlogging # 积水- Ravelling # 松散- Muddy_road # 泥泞道路- Road_side_garbage # 道路旁垃圾- Potholes # 坑洼💡 中文名可保留,但建议英文命名以避免部分工具兼容问题。推理时可通过映射显示中文。
✅ 四、训练脚本:train_highway.py
# train_highway.pyfrom ultralytics import YOLO import os defmain():# 创建输出目录 os.makedirs("runs/highway_damage", exist_ok=True)# 加载预训练模型(推荐 yolov8s 或 yolov8m) model = YOLO('yolov8s.pt')# 可替换为 'yolov8m.pt' / 'yolov8l.pt'# 开始训练 results = model.train( data='highway_damage.yaml',# 数据配置文件 epochs=150,# 推荐 100~200(根据收敛调整) imgsz=1024,# 输入尺寸(略小于原图 1152x2048,节省显存) batch=8,# 根据 GPU 显存调整(24GB 可用 12~16) name='yolov8s_highway_1024', project='runs/highway_damage', device=0,# GPU ID(多卡可用 [0,1]) workers=8, cache=False,# 内存充足可设 True 加速 optimizer='AdamW', lr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.0005, warmup_epochs=3, patience=30,# 早停:验证损失不再下降则停止 save=True, save_period=10, verbose=True, plots=True,# 生成训练曲线、PR 曲线等 hsv_h=0.015,# 增强:色调 hsv_s=0.7,# 饱和度 hsv_v=0.4,# 亮度 degrees=10.0,# 旋转增强(±10°) translate=0.1,# 平移 scale=0.5,# 缩放(0.5~1.5) shear=2.0,# 剪切 perspective=0.001,# 透视变换 flipud=0.0,# 上下翻转(航拍不建议) fliplr=0.5,# 左右翻转(合理) mosaic=1.0,# Mosaic 增强(对小目标有效) mixup=0.1,# MixUp)print(f"✅ 训练完成!最佳模型路径:{results.save_dir}/weights/best.pt")if __name__ =='__main__': main()✅ 五、命令行快速训练(替代方式)
yolo detect train \data=highway_damage.yaml \model=yolov8s.pt \epochs=150\imgsz=1024\batch=8\name=yolov8s_highway_1024 \project=runs/highway_damage \device=0\optimizer=AdamW \patience=30\hsv_h=0.015hsv_s=0.7hsv_v=0.4\degrees=10fliplr=0.5mosaic=1.0✅ 六、关键训练建议
| 项目 | 建议 |
|---|---|
| 输入尺寸 | 使用 imgsz=1024(保持长宽比,YOLO 自动填充)若 GPU 允许,可尝试 1280 提升小目标召回 |
| Batch Size | 8~16(2048 宽图显存占用高) |
| 数据增强 | 启用 mosaic、fliplr、hsv;禁用 flipud(航拍上下方向有意义) |
| 类别不平衡 | “积水”和“泥泞道路”样本多,“垃圾”较少 → 可开启 class_weights(需自定义) |
| 评估重点 | 关注 [email protected] 和 小目标 AP(裂缝、垃圾) |
✅ 七、VOC / COCO 转 YOLO 脚本(如需要)
▶ 如果你有 VOC 格式(XML):
# voc2yolo.pyimport os import xml.etree.ElementTree as ET from pathlib import Path class_names =["Cracks","Waterlogging","Ravelling","Muddy_road","Road_side_garbage","Potholes"]defconvert_voc_to_yolo(voc_dir, yolo_dir, image_dir): os.makedirs(yolo_dir, exist_ok=True)for xml_file in Path(voc_dir).glob("*.xml"): tree = ET.parse(xml_file) root = tree.getroot() img_w =int(root.find('size/width').text) img_h =int(root.find('size/height').text) lines =[]for obj in root.findall('object'): cls_name = obj.find('name').text if cls_name notin class_names:continue cls_id = class_names.index(cls_name) bndbox = obj.find('bndbox') xmin =int(bndbox.find('xmin').text) ymin =int(bndbox.find('ymin').text) xmax =int(bndbox.find('xmax').text) ymax =int(bndbox.find('ymax').text) x_center =(xmin + xmax)/2/ img_w y_center =(ymin + ymax)/2/ img_h width =(xmax - xmin)/ img_w height =(ymax - ymin)/ img_h lines.append(f"{cls_id}{x_center:.6f}{y_center:.6f}{width:.6f}{height:.6f}")withopen(os.path.join(yolo_dir, xml_file.stem +'.txt'),'w')as f: f.write('\n'.join(lines))# 使用示例 convert_voc_to_yolo('annotations/voc/train','labels/train','images/train')▶ 如果你有 COCO 格式(JSON):
YOLOv8 原生支持 COCO,只需在 highway_damage.yaml 中指定:
train: path/to/coco/train.json val: path/to/coco/val.json 但需确保类别顺序与 names 一致。
✅ 八、推理与部署示例
from ultralytics import YOLO model = YOLO('runs/highway_damage/yolov8s_highway_1024/weights/best.pt') results = model('test_image.jpg')# 显示结果(含中文标签) chinese_names ={"Cracks":"裂缝","Waterlogging":"积水","Ravelling":"松散","Muddy_road":"泥泞道路","Road_side_garbage":"道路旁垃圾","Potholes":"坑洼"}for r in results: boxes = r.boxes for box in boxes: cls_name = model.names[int(box.cls)]print(f"检测到:{chinese_names.get(cls_name, cls_name)}")📌 注意:由于图像宽高比极端(1152×2048 ≈ 9:16 竖屏),YOLO 会自动 padding 成正方形。若想保留原始比例,可考虑 滑动窗口裁剪 或使用 YOLOv8-OBB(但本任务无需旋转框)。