[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-72391":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},72391,"yolov12","sunsmarterjie\u002Fyolov12","sunsmarterjie","[NeurIPS 2025] YOLOv12: Attention-Centric Real-Time Object Detectors","",null,"Python",2894,422,13,121,0,3,12,30,9,29.88,"GNU Affero General Public License v3.0",false,"main",[],"2026-06-12 02:03:02","\n\n\u003Cdiv align=\"center\">\n\u003Ch1>YOLOv12\u003C\u002Fh1>\n\u003Ch3>YOLOv12: Attention-Centric Real-Time Object Detectors\u003C\u002Fh3>\n\n[Yunjie Tian](https:\u002F\u002Fsunsmarterjie.github.io\u002F)\u003Csup>1\u003C\u002Fsup>, [Qixiang Ye](https:\u002F\u002Fpeople.ucas.ac.cn\u002F~qxye?language=en)\u003Csup>2\u003C\u002Fsup>, [David Doermann](https:\u002F\u002Fcse.buffalo.edu\u002F~doermann\u002F)\u003Csup>1\u003C\u002Fsup>\n\n\u003Csup>1\u003C\u002Fsup>  University at Buffalo, SUNY, \u003Csup>2\u003C\u002Fsup> University of Chinese Academy of Sciences.\n\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Ftradeoff_turbo.svg\" width=90%> \u003Cbr>\n  Comparison with popular methods in terms of latency-accuracy (left) and FLOPs-accuracy (right) trade-offs\n\u003C\u002Fp>\n\n\u003C\u002Fdiv>\n\n[![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2502.12524-b31b1b.svg)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2502.12524) [![Hugging Face Demo](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fsunsmarterjieleaf\u002Fyolov12) \u003Ca href=\"https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Froboflow-ai\u002Fnotebooks\u002Fblob\u002Fmain\u002Fnotebooks\u002Ftrain-yolov12-object-detection-model.ipynb\">\u003Cimg src=\"https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\" alt=\"Open In Colab\">\u003C\u002Fa> [![Kaggle Notebook](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FKaggle-Notebook-blue?logo=kaggle)](https:\u002F\u002Fwww.kaggle.com\u002Fcode\u002Fjxxn03x\u002Fyolov12-on-custom-data) [![LightlyTrain Notebook](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLightlyTrain-Notebook-blue?)](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Flightly-ai\u002Flightly-train\u002Fblob\u002Fmain\u002Fexamples\u002Fnotebooks\u002Fyolov12.ipynb) [![deploy](https:\u002F\u002Fmedia.roboflow.com\u002Fdeploy.svg)](https:\u002F\u002Fblog.roboflow.com\u002Fuse-yolov12-with-roboflow\u002F#deploy-yolov12-models-with-roboflow) [![Openbayes](https:\u002F\u002Fimg.shields.io\u002Fstatic\u002Fv1?label=Demo&message=OpenBayes%E8%B4%9D%E5%BC%8F%E8%AE%A1%E7%AE%97&color=green)](https:\u002F\u002Fopenbayes.com\u002Fconsole\u002Fpublic\u002Ftutorials\u002FA4ac4xNrUCQ) \n\n## Updates\n\n- 2025\u002F06\u002F17: **Use this repo for YOLOv12 instead of [ultralytics](https:\u002F\u002Fgithub.com\u002Fultralytics\u002Fultralytics\u002Ftree\u002Fmain\u002Fultralytics\u002Fcfg\u002Fmodels\u002F12). Their implementation is inefficient, requires more memory, and has unstable training, which are fixed here!**\n  \n- 2025\u002F07\u002F01: YOLOv12's **classification** models are released, see [code](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Ftree\u002FCls).\n- 2025\u002F06\u002F04: YOLOv12's **instance segmentation** models are released, see [code](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Ftree\u002FSeg).\n\n- 2025\u002F04\u002F15: Pretrain a YOLOv12 model with [LightlyTrain](https:\u002F\u002Fdocs.lightly.ai\u002Ftrain\u002Fstable\u002Findex.html), a novel framework that lets you pretrain any computer vision model on your unlabeled data, with [YOLOv12 support](https:\u002F\u002Fdocs.lightly.ai\u002Ftrain\u002Fstable\u002Fmodels\u002Fyolov12.html). Here is also a [Colab tutorial](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Flightly-ai\u002Flightly-train\u002Fblob\u002Fmain\u002Fexamples\u002Fnotebooks\u002Fyolov12.ipynb)!\n\n- 2025\u002F03\u002F18: Some guys are interested in the heatmap. See this [issue](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Fissues\u002F74).\n\n- 2025\u002F03\u002F09: **YOLOv12-turbo** is released: a faster YOLOv12 version.\n\n- 2025\u002F02\u002F24: Blogs: [ultralytics](https:\u002F\u002Fdocs.ultralytics.com\u002Fmodels\u002Fyolo12\u002F), [LearnOpenCV](https:\u002F\u002Flearnopencv.com\u002Fyolov12\u002F). Thanks to them!\n\n- 2025\u002F02\u002F22: [YOLOv12 TensorRT CPP Inference Repo + Google Colab Notebook](https:\u002F\u002Fgithub.com\u002Fmohamedsamirx\u002FYOLOv12-TensorRT-CPP).\n\n- 2025\u002F02\u002F22: [Android deploy](https:\u002F\u002Fgithub.com\u002Fmpj1234\u002Fncnn-yolov12-android\u002Ftree\u002Fmain) \u002F [TensorRT-YOLO](https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO) accelerates yolo12. Thanks to them!\n\n- 2025\u002F02\u002F20: [Any computer or edge device?](https:\u002F\u002Fgithub.com\u002Froboflow\u002Finference)  \u002F [ONNX CPP Version](https:\u002F\u002Fgithub.com\u002Fmohamedsamirx\u002FYOLOv12-ONNX-CPP). Thanks to them! \n  \n- 2025\u002F02\u002F20: Train a yolov12 model on a custom dataset: [Blog](https:\u002F\u002Fblog.roboflow.com\u002Ftrain-yolov12-model\u002F) and [Youtube](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=fksJmIMIfXo). \u002F [Step-by-step instruction](https:\u002F\u002Fyoutu.be\u002FdO8k5rgXG0M). Thanks to them! \n\n- 2025\u002F02\u002F19: [arXiv version](https:\u002F\u002Farxiv.org\u002Fabs\u002F2502.12524) is public. [Demo](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fsunsmarterjieleaf\u002Fyolov12) is available (try [Demo2](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fsunsmarterjieleaf\u002Fyolov12_demo2) [Demo3](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fsunsmarterjieleaf\u002Fyolov12_demo3) if busy).\n\n\n\u003Cdetails>\n  \u003Csummary>\n  \u003Cfont size=\"+1\">Abstract\u003C\u002Ffont>\n  \u003C\u002Fsummary>\nEnhancing the network architecture of the YOLO framework has been crucial for a long time but has focused on CNN-based improvements despite the proven superiority of attention mechanisms in modeling capabilities. This is because attention-based models cannot match the speed of CNN-based models. This paper proposes an attention-centric YOLO framework, namely YOLOv12, that matches the speed of previous CNN-based ones while harnessing the performance benefits of attention mechanisms.\n\nYOLOv12 surpasses all popular real-time object detectors in accuracy with competitive speed. For example, YOLOv12-N achieves 40.6% mAP with an inference latency of 1.64 ms on a T4 GPU, outperforming advanced YOLOv10-N \u002F YOLOv11-N by 2.1%\u002F1.2% mAP with a comparable speed. This advantage extends to other model scales. YOLOv12 also surpasses end-to-end real-time detectors that improve DETR, such as RT-DETR \u002F RT-DETRv2: YOLOv12-S beats RT-DETR-R18 \u002F RT-DETRv2-R18 while running 42% faster, using only 36% of the computation and 45% of the parameters.\n\u003C\u002Fdetails>\n\n\n## Main Results\n\n**Turbo (default)**:\n| Model (det)                                                                              | size\u003Cbr>\u003Csup>(pixels) | mAP\u003Csup>val\u003Cbr>50-95 | Speed (ms) \u003Cbr>\u003Csup>T4 TensorRT10\u003Cbr> | params\u003Cbr>\u003Csup>(M) | FLOPs\u003Cbr>\u003Csup>(G) |\n| :----------------------------------------------------------------------------------- | :-------------------: | :-------------------:| :------------------------------:| :-----------------:| :---------------:|\n| [YOLO12n](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fturbo\u002Fyolov12n.pt) | 640                   | 40.4                 | 1.60                            | 2.5                | 6.0               |\n| [YOLO12s](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fturbo\u002Fyolov12s.pt) | 640                   | 47.6                 | 2.42                            | 9.1                | 19.4              |\n| [YOLO12m](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fturbo\u002Fyolov12m.pt) | 640                   | 52.5                 | 4.27                            | 19.6               | 59.8              |\n| [YOLO12l](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fturbo\u002Fyolov12l.pt) | 640                   | 53.8                 | 5.83                            | 26.5               | 82.4              |\n| [YOLO12x](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fturbo\u002Fyolov12x.pt) | 640                   | 55.4                 | 10.38                           | 59.3               | 184.6             |\n\n[**v1.0**](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Ftree\u002FV1.0):\n| Model (det)                                                                               | size\u003Cbr>\u003Csup>(pixels) | mAP\u003Csup>val\u003Cbr>50-95 | Speed (ms) \u003Cbr>\u003Csup>T4 TensorRT10\u003Cbr> | params\u003Cbr>\u003Csup>(M) | FLOPs\u003Cbr>\u003Csup>(G) |\n| :----------------------------------------------------------------------------------- | :-------------------: | :-------------------:| :------------------------------:| :-----------------:| :---------------:|\n| [YOLO12n](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fv1.0\u002Fyolov12n.pt) | 640                   | 40.6                 | 1.64                            | 2.6                | 6.5               |\n| [YOLO12s](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fv1.0\u002Fyolov12s.pt) | 640                   | 48.0                 | 2.61                            | 9.3                | 21.4              |\n| [YOLO12m](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fv1.0\u002Fyolov12m.pt) | 640                   | 52.5                 | 4.86                            | 20.2               | 67.5              |\n| [YOLO12l](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fv1.0\u002Fyolov12l.pt) | 640                   | 53.7                 | 6.77                            | 26.4               | 88.9              |\n| [YOLO12x](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fv1.0\u002Fyolov12x.pt) | 640                   | 55.2                 | 11.79                           | 59.1               | 199.0             |\n\n[**Instance segmentation**](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Ftree\u002FSeg):\n| Model (seg)                                                                              | size\u003Cbr>\u003Csup>(pixels) | mAP\u003Csup>box\u003Cbr>50-95 | mAP\u003Csup>mask\u003Cbr>50-95 | Speed  (ms) \u003Cbr>\u003Csup>T4 TensorRT10\u003Cbr> | params\u003Cbr>\u003Csup>(M) | FLOPs\u003Cbr>\u003Csup>(G) |\n| :------------------------------------------------------------------------------------| :--------------------: | :-------------------: | :---------------------: | :--------------------------------:| :------------------: | :-----------------: |\n| [YOLOv12n-seg](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fseg\u002Fyolov12n-seg.pt) | 640                   | 39.9                 | 32.8                  | 1.84                           | 2.8                | 9.9              |\n| [YOLOv12s-seg](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fseg\u002Fyolov12s-seg.pt) | 640                   | 47.5                 | 38.6                  | 2.84                           | 9.8                | 33.4              |\n| [YOLOv12m-seg](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fseg\u002Fyolov12m-seg.pt) | 640                   | 52.4                 | 42.3                  | 6.27                           | 21.9               | 115.1             |\n| [YOLOv12l-seg](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fseg\u002Fyolov12l-seg.pt) | 640                   | 54.0                 | 43.2                  | 7.61                          | 28.8               | 137.7             |\n| [YOLOv12x-seg](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fseg\u002Fyolov12x-seg.pt) | 640                   | 55.2                 | 44.2                  | 15.43                          | 64.5               | 308.7             |\n\n\n[**Classification**](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Ftree\u002FCls):\n| Model (cls)                                                                              | size\u003Cbr>\u003Csup>(pixels) | Acc.\u003Cbr>\u003Csup>top-1\u003Cbr> | Acc.\u003Cbr>\u003Csup>top-5\u003Cbr> | Speed  (ms) \u003Cbr>\u003Csup>T4 TensorRT10\u003Cbr> | params\u003Cbr>\u003Csup>(M) | FLOPs\u003Cbr>\u003Csup>(G) |\n| :----------------------------------------------------------------------------------------| :-------------------: | :------------: | :------------: | :-------------------------------------:| :----------------: | :---------------: |\n| [YOLOv12n-cls](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fcls\u002Fyolov12n-cls.pt) | 224             | 71.7           | 90.5           | 1.27                                   | 2.9                | 0.5               |\n| [YOLOv12s-cls](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fcls\u002Fyolov12s-cls.pt) | 224             | 76.4           | 93.3           | 1.52                                   | 7.2                | 1.5               |\n| [YOLOv12m-cls](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fcls\u002Fyolov12m-cls.pt) | 224             | 78.8           | 94.4           | 2.03                                   | 12.7               | 4.5               |\n| [YOLOv12l-cls](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fcls\u002Fyolov12l-cls.pt) | 224             | 79.5           | 94.5           | 2.73                                   | 16.8               | 6.2               |\n| [YOLOv12x-cls](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fcls\u002Fyolov12x-cls.pt) | 224             | 80.1           | 95.3           | 3.64                                   | 35.5               | 13.7              |\n\n\u003C\u002Fdetails>\n\n\n## Installation\n```\nconda create -n yolov12 python=3.11 supervision flash-attn\nconda activate yolov12\ngit clone https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12 && cd yolov12\npip install -r requirements.txt\npip install -e .\n```\n\n## Validation\n[`yolov12n`](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fturbo\u002Fyolov12n.pt)\n[`yolov12s`](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fturbo\u002Fyolov12s.pt)\n[`yolov12m`](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fturbo\u002Fyolov12m.pt)\n[`yolov12l`](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fturbo\u002Fyolov12l.pt)\n[`yolov12x`](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Freleases\u002Fdownload\u002Fturbo\u002Fyolov12x.pt)\n\n```python\nfrom ultralytics import YOLO\n\nmodel = YOLO('yolov12{n\u002Fs\u002Fm\u002Fl\u002Fx}.pt')\nmodel.val(data='coco.yaml', save_json=True)\n```\n\n## Training \n```python\nfrom ultralytics import YOLO\n\nmodel = YOLO('yolov12n.yaml')\n\n# Train the model\nresults = model.train(\n  data='coco.yaml',\n  epochs=600, \n  batch=256, \n  imgsz=640,\n  scale=0.5,  # S:0.9; M:0.9; L:0.9; X:0.9\n  mosaic=1.0,\n  mixup=0.0,  # S:0.05; M:0.15; L:0.15; X:0.2\n  copy_paste=0.1,  # S:0.15; M:0.4; L:0.5; X:0.6\n  device=\"0,1,2,3\",\n)\n\n# Evaluate model performance on the validation set\nmetrics = model.val()\n\n# Perform object detection on an image\nresults = model(\"path\u002Fto\u002Fimage.jpg\")\nresults[0].show()\n\n```\n\n## Prediction\n```python\nfrom ultralytics import YOLO\n\nmodel = YOLO('yolov12{n\u002Fs\u002Fm\u002Fl\u002Fx}.pt')\nmodel.predict()\n```\n\n## Export\n```python\nfrom ultralytics import YOLO\n\nmodel = YOLO('yolov12{n\u002Fs\u002Fm\u002Fl\u002Fx}.pt')\nmodel.export(format=\"engine\", half=True)  # or format=\"onnx\"\n```\n\n\n## Demo\n\n```\npython app.py\n# Please visit http:\u002F\u002F127.0.0.1:7860\n```\n\n\n## Acknowledgement\n\nThe code is based on [ultralytics](https:\u002F\u002Fgithub.com\u002Fultralytics\u002Fultralytics). Thanks for their excellent work!\n\n## Citation\n\n```BibTeX\n@article{tian2025yolov12,\n  title={YOLOv12: Attention-Centric Real-Time Object Detectors},\n  author={Tian, Yunjie and Ye, Qixiang and Doermann, David},\n  journal={arXiv preprint arXiv:2502.12524},\n  year={2025}\n}\n```\n\n","YOLOv12是一个基于注意力机制的实时目标检测器。该项目通过引入注意力机制，显著提升了模型在保持高速度的同时对小物体和复杂场景的检测精度。YOLOv12支持多种任务，包括分类、实例分割等，并且提供了一系列预训练模型以及与LightlyTrain框架集成的能力，使得用户能够利用未标注数据进行预训练。此项目特别适用于需要高效准确地执行目标检测的应用场景，如自动驾驶、安防监控等领域。",2,"2026-06-11 03:41:50","high_star"]