yolov13

iMoonLabAGPL-3.0更新放缓

YOLOv13 的官方实现,用超图增强的自适应视觉感知提升实时目标检测精度,适合需要落地部署检测模型的场景。

Implementation of "YOLOv13: Real-Time Object Detection with Hypergraph-Enhanced Adaptive Visual Perception".

yolov13发布于 2025-06-22 08:55 UTC1,713star179fork同步于 2026-11-07 07:30 UTC

怎么上手

由 README 提炼,执行前请确认
wget https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.3/flash_attn-2.7.3+cu11torch2.2cxx11abiFALSE-cp311-cp311-linux_x86_64.whl
conda create -n yolov13 python=3.11
conda activate yolov13
pip install -r requirements.txt
pip install -e .
硬件要求按 README 说明

README 未说明显存要求;训练示例使用 device="0,1,2,3" 多卡,并支持 Flash Attention 加速;另提到可转换为华为昇腾(OM)与瑞芯微(RKNN)格式。

昇腾 / Ascend
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

基于超图增强视觉感知的实时目标检测模型,提供 N/S/L/X 四个规模

YOLOv13 的官方实现,用超图增强的自适应视觉感知提升实时目标检测精度,适合需要落地部署检测模型的场景。

核心能力

  • 用 HyperACE 把多尺度特征图像素当作超图顶点建模高阶关联
  • FullPAD 通过三条独立通道把增强特征分发到骨干、颈部与头部
  • 用深度可分离卷积块替换大核卷积以降低参数量和计算量
  • 支持 Flash Attention 加速,并可导出 ONNX 或 TensorRT engine
  • 基于 Ultralytics 接口,可直接用 YOLO 类完成训练、验证与预测

容易踩的坑

需先手动下载与 cu11、torch2.2、cp311 匹配的 flash-attn wheel,版本不匹配会装不上;权重需从 Releases 单独下载 yolov13n/s/l/x.pt;训练需自备 coco.yaml 数据集配置,且不同规模要改 scale、mixup、copy_paste 参数。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

1 个版本yolov13
  1. yolov13YOLOv13 Model Weights最新正式版2025-06-22 · 2025-06-22 08:55 UTC

    这个版本没有写更新说明。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    arXiv iMoonLab HyperAI Demo

    Updates

    Technical Briefing 💡

    Introducing YOLOv13—the next-generation real-time detector with cutting-edge performance and efficiency. YOLOv13 family includes four variants: Nano, Small, Large, and X-Large, powered by:

    • HyperACE: Hypergraph-based Adaptive Correlation Enhancement

      • Treats pixels in multi-scale feature maps as hypergraph vertices.
      • Adopts a learnable hyperedge construction module to adaptively exploring high-order correlations between vertices.
      • A message passing module with linear complexity is leveraged to effectively aggregate multi-scale features with the guidance of high-order correlations to achieve effective visual perception of complex scenarios.
    • FullPAD: Full-Pipeline Aggregation-and-Distribution Paradigm

      • Uses the HyperACE to aggregate multi-scale features of the backbone and extract high-order correlations in the hypergraph space.
      • FullPAD paradigm further leverages three separate tunnels to forward these correlation-enhanced features to the connection between the backbone and neck, the internal layers of the neck, and the connection between the neck and head, respectively. In this way, YOLOv13 achieves fine‑grained information flow and representational synergy across the entire pipeline.
      • FullPAD significantly improves gradient propagation and enhances the detection performance.
    • Model Lightweighting via DS-based Blocks

      • Replaces large-kernel convolutions with blocks building based on depthwise separable convolutions (DSConv, DS-Bottleneck, DS-C3k, DS-C3k2), preserving receptive field while greatly reducing parameters and computation.
      • Achieves faster inference speed without sacrificing accuracy.

    YOLOv13 seamlessly combines hypergraph computation with end-to-end information collaboration to deliver a more accurate, robust, and efficient real-time detection solution.

    Main Results 🏆

    1. MS COCO Benchmark

    Table 1. Quantitative comparison with other state-of-the-art real-time object detectors on the MS COCO dataset

    MethodFLOPs (G)Parameters(M)AP50:95valAP50valAP75valLatency (ms)
    YOLOv6-3.0-N11.44.737.052.7–2.74
    Gold-YOLO-N12.15.639.655.7–2.97
    YOLOv8-N8.73.237.452.640.51.77
    YOLOv10-N6.72.338.553.841.71.84
    YOLO11-N6.52.638.654.241.61.53
    YOLOv12-N6.52.640.156.043.41.83
    YOLOv13-N6.42.541.657.845.11.97
    YOLOv6-3.0-S45.318.544.361.2–3.42
    Gold-YOLO-S46.021.545.462.5–3.82
    YOLOv8-S28.611.245.061.848.72.33
    RT-DETR-R1860.020.046.563.8–4.58
    RT-DETRv2-R1860.020.047.964.9–4.58
    YOLOv9-S26.47.146.863.450.73.44
    YOLOv10-S21.67.246.363.050.42.53
    YOLO11-S21.59.445.862.649.82.56
    YOLOv12-S21.49.347.164.251.02.82
    YOLOv13-S20.89.048.065.252.02.98
    YOLOv6-3.0-L150.759.651.869.2–9.01
    Gold-YOLO-L151.775.151.868.9–10.69
    YOLOv8-L165.243.753.069.857.78.13
    RT-DETR-R50136.042.053.171.3–6.93
    RT-DETRv2-R50136.042.053.471.6–6.93
    YOLOv9-C102.125.353.070.257.86.64
    YOLOv10-L120.324.453.270.157.27.31
    YOLO11-L86.925.352.369.255.76.23
    YOLOv12-L88.926.453.070.057.97.10
    YOLOv13-L88.427.653.470.958.18.63
    YOLOv8-X257.868.254.071.058.812.83
    RT-DETR-R101259.076.054.372.7–13.51
    RT-DETRv2-R101259.076.054.372.8–13.51
    YOLOv10-X160.429.554.471.359.310.70
    YOLO11-X194.956.954.271.059.111.35
    YOLOv12-X199.059.154.471.159.312.46
    YOLOv13-X199.264.054.872.059.814.67

    2. Visualizations

    Visualization examples of YOLOv10-N/S, YOLO11-N/S, YOLOv12-N/S, and YOLOv13-N/S.

    Representative visualization examples of adaptive hyperedges. The hyperedges in the first and second columns mainly focus on the high-order interactions among objects in the foreground. The third column mainly focuses on the high-order interactions between the background and part of the foreground. The visualization of these hyperedges can intuitively reflect the high-order visual associations modeled by the YOLOv13.

    Quick Start 🚀

    1. Install Dependencies

    wget https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.3/flash_attn-2.7.3+cu11torch2.2cxx11abiFALSE-cp311-cp311-linux_x86_64.whl
    conda create -n yolov13 python=3.11
    conda activate yolov13
    pip install -r requirements.txt
    pip install -e .
    

    YOLOv13 suppports Flash Attention acceleration.

    2. Validation

    YOLOv13-N YOLOv13-S YOLOv13-L YOLOv13-X

    Use the following code to validate the YOLOv13 models on the COCO dataset. Make sure to replace {n/s/l/x} with the desired model scale (nano, small, plus, or ultra).

    from ultralytics import YOLO
    
    model = YOLO('yolov13{n/s/l/x}.pt')  # Replace with the desired model scale
    

    3. Training

    Use the following code to train the YOLOv13 models. Make sure to replace yolov13n.yaml with the desired model configuration file path, and coco.yaml with your coco dataset configuration file.

    from ultralytics import YOLO
    
    model = YOLO('yolov13n.yaml')
    
    # Train the model
    results = model.train(
      data='coco.yaml',
      epochs=600, 
      batch=256, 
      imgsz=640,
      scale=0.5,  # S:0.9; L:0.9; X:0.9
      mosaic=1.0,
      mixup=0.0,  # S:0.05; L:0.15; X:0.2
      copy_paste=0.1,  # S:0.15; L:0.5; X:0.6
      device="0,1,2,3",
    )
    
    # Evaluate model performance on the validation set
    metrics = model.val('coco.yaml')
    
    # Perform object detection on an image
    results = model("path/to/your/image.jpg")
    results[0].show()
    
    

    4. Prediction

    Use the following code to perform object detection using the YOLOv13 models. Make sure to replace {n/s/l/x} with the desired model scale.

    from ultralytics import YOLO
    
    model = YOLO('yolov13{n/s/l/x}.pt')  # Replace with the desired model scale
    model.predict()
    

    5. Export

    Use the following code to export the YOLOv13 models to ONNX or TensorRT format. Make sure to replace {n/s/l/x} with the desired model scale.

    from ultralytics import YOLO
    model = YOLO('yolov13{n/s/l/x}.pt')  # Replace with the desired model scale
    model.export(format="engine", half=True)  # or format="onnx"
    

    Related Projects 🔗

    • The code is based on Ultralytics. Thanks for their excellent work!
    • Other wonderful works about Hypergraph Computation:
      • "Hypergraph Neural Networks": [paper] [code]
      • "HGNN+: General Hypergraph Nerual Networks": [paper] [code]
      • "SoftHGNN: Soft Hypergraph Neural Networks for General Visual Recognition": [paper] [code]

    Cite YOLOv13 📝

    @article{yolov13,
      title={YOLOv13: Real-Time Object Detection with Hypergraph-Enhanced Adaptive Visual Perception},
      author={Lei, Mengqi and Li, Siqi and Wu, Yihong and et al.},
      journal={arXiv preprint arXiv:2506.17733},
      year={2025}
    }