Meet YOLO26: next-gen vision AI.

Link to this sectionRTDETRv2 与 EfficientDet:实时检测架构分析#

选择最佳的神经网络架构是任何 计算机视觉 项目中的关键决策。这份详尽的技术对比分析了两种具有影响力的目标检测模型:RTDETRv2,一种基于 Transformer 的最先进检测器,以及 EfficientDet,一种高度可扩展的卷积神经网络。我们将评估它们独特的架构、性能指标、训练方法和理想的部署场景,以帮助你为 AI 流水线做出基于数据的决策。

Link to this sectionRTDETRv2:实时检测 Transformer#

基于原始 RT-DETR 的成功,RTDETRv2 改进了基于 Transformer 的 目标检测 范式。通过优化编码器和解码器结构,它在保持实时推理速度的同时提供了高精度,有效地弥合了传统 CNN 与 Vision Transformer 之间的鸿沟。

模型详情 作者:Wenyu Lv, Yian Zhao, Qinyao Chang, Kui Huang, Guanzhong Wang, and Yi Liu
组织:Baidu 日期:2024-07-24 链接:Arxiv, GitHub, Docs

Link to this section架构与核心优势#

RTDETRv2 utilizes a hybrid architecture that pairs a potent CNN backbone (often ResNet or HGNet) with an efficient transformer decoder. The most defining characteristic of RTDETRv2 is its native ability to bypass non-maximum suppression (NMS). Traditional detectors require NMS to filter out duplicate bounding boxes, adding variable inference latency during post-processing. RTDETRv2 formulates detection as a direct set prediction problem, utilizing bipartite matching to output unique predictions.

该模型在 GPU 显存充足的服务器端部署中表现出色。其全局注意力机制提供了卓越的上下文感知能力,使其非常擅长在复杂的环境中区分重叠物体,例如自动化 安全报警系统 或密集人群监控。

Link to this section局限性#

While powerful, transformer architectures inherently require more CUDA memory during training compared to standard CNNs. Furthermore, fine-tuning RTDETRv2 can require extended training data convergence times, making rapid prototyping slightly more resource-intensive.

了解更多关于 RTDETRv2 的信息

Link to this sectionEfficientDet:可扩展且高效的 CNN#

EfficientDet introduced a family of object detection models optimized for both accuracy and efficiency across a wide spectrum of resource constraints. It remains a classic example of scalable machine vision design.

模型详情 作者:Mingxing Tan, Ruoming Pang, and Quoc V. Le
组织:Google
日期:2019-11-20
链接:Arxiv, GitHub, Docs

Link to this section架构与核心优势#

The innovation behind EfficientDet lies in two key areas: the Bi-directional Feature Pyramid Network (BiFPN) and a compound scaling method. BiFPN allows for simple and fast multi-scale feature extraction by introducing learnable weights to learn the importance of different input features, while repeatedly applying top-down and bottom-up multi-scale feature fusion. The compound scaling method uniformly scales the resolution, depth, and width of the network simultaneously.

EfficientDet models range from the ultra-lightweight D0 to the massive D7. This makes them highly versatile for edge AI deployments where developers must balance tight computational budgets with accuracy requirements, such as early mobile augmented reality applications.

Link to this section局限性#

EfficientDet 是一种依赖于锚框 (anchor box) 和传统 NMS 后处理流水线的旧架构。锚框生成过程需要仔细的 超参数调优,而 NMS 步骤可能会成为在 Raspberry Pi 等嵌入式硬件上部署的瓶颈。它还缺乏对 姿态估计旋转边界框 (OBB) 等现代任务的原生支持。

了解更多关于 EfficientDet 的信息

Link to this section性能与指标对比#

要理解这些模型之间的确切权衡,需要分析它们的吞吐量和参数效率。下表概述了现代 RTDETRv2 系列与可扩展 EfficientDet 系列的比较。

模型尺寸
(像素)
mAPval
50-95
速度
CPU ONNX
(ms)
速度
T4 TensorRT10
(ms)
参数量
(M)
FLOPs
(B)
RTDETRv2-s64048.1-5.032060
RTDETRv2-m64051.9-7.5136100
RTDETRv2-l64053.4-9.7642136
RTDETRv2-x64054.3-15.0376259
EfficientDet-d064034.610.23.923.92.54
EfficientDet-d164040.513.57.316.66.1
EfficientDet-d264043.017.710.928.111.0
EfficientDet-d364047.528.019.5912.024.9
EfficientDet-d464049.742.833.5520.755.2
EfficientDet-d564051.572.567.8633.7130.0
EfficientDet-d664052.692.889.2951.9226.0
EfficientDet-d764053.7122.0128.0751.9325.0

As seen above, RTDETRv2 achieves significantly higher mean Average Precision (mAP) at comparable parameter counts to the mid-tier EfficientDet models, heavily utilizing its transformer architecture to boost accuracy.

Link to this section应用场景与建议#

选择 RT-DETR 还是 EfficientDet 取决于你的具体项目需求、部署限制和生态系统偏好。

Link to this section何时选择 RT-DETR#

RT-DETR 在以下情况是一个强有力的选择:

  • 基于 Transformer 的检测研究: 探索注意力机制和 Transformer 架构以实现无 NMS 的端到端目标检测的项目。
  • 高精度、延迟要求宽松的场景: 将检测精度置于首位,且可以容忍稍高推理延迟的应用。
  • 大目标检测: 以中大型目标为主的场景,在这种场景下,Transformer 的全局注意力机制具有天然优势。

Link to this section何时选择 EfficientDet#

推荐使用 EfficientDet 的场景:

  • Google Cloud 和 TPU 流水线: 与 Google Cloud Vision API 或 TPU 基础设施深度集成的系统,EfficientDet 在其中具有原生优化优势。
  • 复合缩放研究: 专注于研究平衡网络深度、宽度和分辨率缩放效果的学术基准测试。
  • 通过 TFLite 进行移动端部署: 特别需要 TensorFlow Lite 导出以用于 Android 或嵌入式 Linux 设备的各类项目。

Link to this section何时选择 Ultralytics (YOLO26)#

对于大多数新项目,Ultralytics YOLO26 提供了性能和开发者体验的最佳组合:

  • 无 NMS 的边缘部署: 需要一致、低延迟推理且无需复杂非极大值抑制后处理的应用。
  • 仅 CPU 环境: 没有专用 GPU 加速的设备,YOLO26 带来的高达 43% 的 CPU 推理提速可提供决定性优势。
  • 小目标检测: 具有挑战性的场景,如 aerial drone imagery 或 IoT 传感器分析,其中 ProgLoss 和 STAL 可显著提升对极小目标的检测精度。

Link to this sectionUltralytics 的替代方案:推进最先进技术#

尽管 RTDETRv2 和 EfficientDet 各有千秋,但现代 AI 开发要求框架能够提供无缝的 开发者体验 以及领先的性能。Ultralytics 生态系统 为计算机视觉任务提供了一种更简化的方法。

如果你正在探索最先进的检测技术,新发布的 Ultralytics YOLO26 融合了 CNN 和 Transformer 的最佳特性。

为什么选择 YOLO26?

YOLO26 implements an End-to-End NMS-Free Design, bringing the deployment simplicity of RTDETRv2 to the ultra-efficient YOLO architecture. Furthermore, it introduces the MuSGD Optimizer—inspired by LLM training innovations—for superior training stability. With DFL Removal (Distribution Focal Loss removed for simplified export and better edge/low-power device compatibility), YOLO26 boasts up to 43% faster CPU inference than previous generations, making it an exceptional choice for edge computing over heavier models. Additionally, ProgLoss + STAL delivers improved loss functions with notable improvements in small-object recognition, critical for IoT, robotics, and aerial imagery.

Ultralytics Python 软件包 提供的易用性是无与伦比的。开发者可以使用直观的 API 来训练、验证和 导出模型,这些 API 封装了研究仓库通常需要的样板代码。

from ultralytics import RTDETR

# Load a pre-trained RTDETRv2 model from the Ultralytics ecosystem
model = RTDETR("rtdetr-l.pt")

# Train the model on the COCO8 dataset
results = model.train(data="coco8.yaml", epochs=100, imgsz=640)

# Export for optimized inference on TensorRT
model.export(format="engine")

Ultralytics 模型原生支持多种任务,包括 实例分割图像分类,为多样化的行业需求提供了多功能的工具包。此外,现代 Ultralytics 模型中分布焦点损失 (DFL) 的移除简化了计算图,保证了向嵌入式 NPU 和 TPU 的更平滑导出。

为了实现无缝的 数据标注 和模型管理,Ultralytics 平台 提供了一个全面的云环境来监管整个机器学习生命周期,使其成为在生产环境中部署稳健计算机视觉解决方案的首选。

评论