YOLO框架下(ultralytics) RTDETE 与 YOLOv8 目标检测对比

本文对比了在YOLO框架(ultralytics)下,RTDETE和YOLOv8在l与s模型上的训练与检测效果。相同数据集下,RTDETE-s在某些类别上表现出更高准确率和召回率,但存在过检现象;而YOLOv8-s在数据量较小的情况下能取得较好效果,但可能有过检和漏检问题。RTDETE对小目标和遮挡目标检测表现更优,但过检可通过调整conf过滤,误检可能需要更多数据训练来改善。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

YOLO框架下(ultralytics) RTDETE 与 YOLOv8 目标检测对比

0 前言:

0.1 相同训练数据集和相同测试数据集下,采用RTDETE 与 YOLOv8 训练。

0.2 本人拉的ultralytics8.1的分支版本。

0.3 本次对比了l和s的模型,其中l的模型采用了预训练权重,s的模型无预训练权重。可以通过训练命令查看相关参数。

0.4 相关命令

git https://github.com/ultralytics/ultralytics.git

1 RTDETE 训练l模型

1.1 数据配置:

cp /ultralytics/cfg/datasets/coco8.yaml /ultralytics/cfg/datasets/rtdetr_coco8.yaml

/ultralytics/cfg/datasets/rtdetr_coco8.yaml如下:与YOLO训练格式是一致的

#######"""ultralytics/cfg/datasets/rtdetr_coco8.yaml"""
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
path: /media/user/mydata/datadqdetr  # dataset root dir
train: images/train  # train images (relative to 'path') 4 images
val: images/val  # val images (relative to 'path') 4 images
test:  # test images (optional)

names:
 0: pedes
 1: car
 2: bus
 3: truck
 4: bike
 5: moto
 6: tricycle
 7: coni
 8: warn
 9: tralight
 10: specialVehicle

1.2 模型配置

此处使用rtdetr-l.yaml 对应的预训练模型进行训练, 这里训练用的是预训练权重,所以此处的配置文件其实没什么用,不过nc习惯跟自己模型的类型数据一致

/ultralytics/cfg/models/rt-detr/rtdetr-l.yaml  

修改模型文件的nc与自己的类别数目匹配,其它不变

# Parameters
nc: 11  # number of classes
scales: # model compound scaling constants, i.e. 'model=yolov8n-cls.yaml' will call yolov8-cls.yaml with scale 'n'
  # [depth, width, max_channels]
  l: [1.00, 1.00, 1024]

1.3 训练命令(rtdetr-l.pt 65M)

yolo train model=./cfg/models/rt-detr/rtdetr-l.pt data=./cfg/datasets/rtdetr_coco8.yaml epochs=200 imgsz=960  batch=8 amp=False  name=train/exp

训练结果

在这里插入图片描述

1.4 测试命令

yolo task=detect mode=predict model=./runs/detect/train/rtdetr_l_200_960_b8/weights/best.pt source= ../imgste
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

爱吃油淋鸡的莫何

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值