YOLOv11涨点改进 | 独家创新-注意力改进篇 | ECCV 2024 | YOLOv11引入AgentAttention代理注意力模块,兼顾 Softmax 和线性注意力优点,提高检测精度

一、本文介绍

🔥本文给大家介绍使用Agent Attention模块改进YOLOv11网络模型。其主要作用是通过引入高效的代理token来减少计算复杂度,同时保留全局上下文建模能力。相比传统的Softmax注意力,Agent Attention通过代理token聚合并广播信息,从而降低了模型在处理高分辨率图像时的计算负担,并显著提高了推理速度。其优势在于保持了目标检测中的全局信息处理能力,同时加速了生成过程,特别是在高分辨率场景下,可以提高检测精度、减少内存消耗,并提升处理速度。

展示部分YOLOv11改进后的网络结构图、供小伙伴自己绘图参考:

🚀 创新改进结构图:  yolov11n_AgentAttention.yaml

专栏改进目录:YOLOv11改进专栏包含卷积、主干网络、各种注意力机制、检测头、损失函数、Neck改进、小目标检测、二次创新模块、C2PSA/C3k2二次创新改进、全网独家创新等创新点改进

全新YOLOv11-发论文改进专栏链接:全新YOLOv11创新改进高效涨点+永久更新中(至少500+改进)+高效跑实验发论文

本文目录

一、本文介绍

二、Agent Attention模块介绍

2.1 Agent Attention模块结构图

2.2 Agent Attention模块的作用:

2.3 Agent Attention模块的优势:

2.4 Agent Attention模块的原理:

三、完整核心代码

 四、手把手教你配置模块和修改task.py文件

1.首先在ultralytics/nn/newsAddmodules创建一个.py文件

2.在ultralytics/nn/newsAddmodules/__init__.py中引用

3.修改task.py文件

五、创建涨点yaml配置文件

🚀 创新改进1 : yolov11n_AgentAttention.yaml

🚀 创新改进2 : yolov11n_C2PSA_AgentAttention.yaml

六、正常运行

二、Agent Attention模块介绍

摘要:注意力模块是Transformer架构的核心组件。虽然全局注意力机制具有强大的表征能力,但其过高的计算成本限制了其在多种场景中的应用。本文提出了一种新型注意力范式——代理注意力(Agent Attention),旨在实现计算效率与表征能力之间的最佳平衡。具体而言,代理注意力通过引入四元组(Q,A,K,V)的形式,在传统注意力模块中新增了一组代理标记A。这些代理标记首先作为查询标记Q的代理,从K和V中聚合信息,随后将信息反馈给Q。由于代理标记的数量可以设计得远少于查询标记数量,代理注意力在保持全局上下文建模能力的同时,显著优于广泛采用的Softmax注意力机制。有趣的是,我们证明了所提出的代理注意力等同于线性注意力的广义形式。因此,代理注意力实现了软性线性注意力的强大性能与线性注意力高效性的无缝融合。大量实验表明,代理注意力在各类视觉Transformer架构及图像分类、目标检测、语义分割、图像生成等多样化视觉任务中均展现出优异效果。值得注意的是,得益于其线性注意力特性,代理注意力在高分辨率场景中表现尤为突出。例如,当应用于Stable Diffusion时,我们的注意力机制无需额外训练即可显著提升图像生成速度和质量。

YOLOv12改进专栏目录 | 本专栏持续更新500+篇内容 | 包含各种卷积、主干网络、各种注意力机制、检测头、损失函数、小目标检测改进、二次创新模块、独家创新等几百种创新点改进 《YOLOv12高效涨点改进专栏》提供500+创新改进方案,涵盖卷积、主干网络、注意力机制等模块优化,适用于检测、分割等任务。改进点来自顶会论文和个人经验,支持多种模型版本和任务场景。专栏包含详细教程、数据集增强、性能评估工具等,帮助科研人员快速实现模型优化和论文发表。提供完整运行项目和环境配置指导,适合计算机及相关专业研究人员使用,持续更新保障长期科研需求。 阅读详情

相关推荐

YOLO训练调优与问题诊断实战,从损失震荡到mAP异常的全链路排查

本文系统梳理YOLO训练中的常见问题,构建从现象到根因的诊断框架,涵盖损失不降、mAP异常、震荡与NaN等典型故障。通过监控梯度范数、正样本分布、特征图等关键信号,结合控制变量法,精准定位数据标注、学习率、增强策略、优化器配置等问题。重点解析学习率调度、梯度裁剪、EMA、混合精度训练等调优技巧,提供可复用的排查checklist与PyTorch监控代码,助力实现高效、稳定的模型训练。

QQ_778132974的博客 11

YOLO26 边缘端部署实战(四):树莓派/Jetson 落地全流程——模型瘦身、功耗与延迟平衡【剪枝、蒸馏、INT8、ONNX Runtime、DLA】

本文系统阐述YOLOv26边缘端部署全流程,针对树莓派/Jetson等低算力设备,提出“算力摸底→模型瘦身(剪枝/蒸馏/换小模型)→引擎选型→功耗延迟调优”四步方案。通过实测对比,结合剪枝、知识蒸馏与INT8量化,实现模型体积压缩50%以上,FPS提升至30+,功耗控制在15W内,附完整源码与速查表,助力工业检测模型高效落地。

王大师企业官方博客 1412

petalinux i2c的配置

1.硬件平台配置 1.内核配置 cd petalinux-config -c kernel -> Device Drivers -> I2C support -> i2C Hardware Bus support -> Xilinx I2C Controller Pressing 启用CONFIG_I2C_XILINX=y 2.修改用户设备树 cd cd project-spec/meta-user/recipes-bsp/device-tree/files/ i2c2:

u013403954的博客 4315

ipsec 加密流程(一):ipsec策略匹配

《openswan》专栏系列文章主要是记录openswan源码学习过程中的笔记。 Author: Toney Email: vip_13031075266@163.com Date: 2020.11.22 Copyright: 未经同意不得转载!!! Version:2.6.51.5 Reference:https://download.openswan.org/openswan/ 1. ipsec策略匹配流程(ipsec_tunnel_start_xmit) 注:open...

遇见你是我最美丽的意外 9124

Redis+Unity 数据库搭建

游戏中需要存放排行榜等数据,而且是实时存放,所以就涉及到数据库的问题。这里找服务器大神了解到可以用Redis来做存储,免费的效率极高。

chaixinke的专栏 880

手教你如何使用Simulink和相关工具箱模拟和实现无人机的多机接力信号中继的建模

扩大通信范围:单架无人机的通信能力有限,通过多机接力的方式可以显著扩展通信覆盖范围。提高可靠性:当某架无人机出现故障或电量不足时,其他无人机可以接管其任务,确保通信不中断。适应复杂环境:在山区、森林等复杂地形中,多机接力可以绕过障碍物,建立稳定的通信链路。使用Communications Toolbox中的模块来模拟无线通信链路。例如,可以使用模块模拟噪声信道,或者使用模块计算信号衰减。matlab深色版本。

MHD0815的博客 769

qt5.14.2+vs2019配置msvc2017编译器

qt5.14.2+vs2019配置msvc2017编译器 在使用qt编译程序时此前一直使用的是自带的MinGW 32-bit和64-bit,现在想使用msvc编译器。本次使用的是qt5.14.2,vs2019,需要配置msvc2017的32-bit和64-bit编译器。 1、首先安装好qt5.14.2和vs2019,其次在visual studio installer选择修改,然后选择msvc2017对应的组件,本次安装的是这两个 2、打开qt creator的工具–选项–kits–编译器,选择Manu

bangtanhui的博客 1万+

wsl2 配置ubuntu 固定ip

wsls ubuntu 设置固定ip

musk1212的博客 2623

059、肤色还原专项调优:记忆色、颜色偏好建模与主观评价标准

文章摘要:肤色还原调优的技术挑战与实践经验 本文系统探讨了手机影像中肤色还原的技术难点与解决方案。通过实际案例揭示了肤色还原的本质是记忆色与颜色偏好的博弈,而非单纯的技术指标达标。文章详细分析了记忆色的三大特性(高饱和、地域差异、场景依赖)和颜色偏好的数学建模方法,提出了基于YCbCr/Lab空间的参数化模型和代价函数设计。在评价体系方面,强调主观评价的重要性,并分享了专家评审、用户调研、场景覆盖的三级验证方法。最后总结了实战中的关键经验,包括肤色检测优化、过渡处理、动态范围管理及视频/拍照差异策略。文章指

sundong_81的博客 252

11.8 LangGraph生产级AI Agent开发:从节点定义到高并发架构的终极指南

本文介绍了如何使用 LangGraph 构建生产级 AI Agent,重点解析了 LangGraph 的核心设计、节点与边的实现方法论、生产级实现技巧以及性能优化策略。LangGraph 通过图结构抽象复杂 AI 工作流,核心组件包括节点、边、状态和检查点。节点通过 Python 函数封装原子业务逻辑,边通过条件分支实现动态工作流。生产级实现技巧包括状态管理、多会话控制和错误处理机制。性能优化策略涉及并行执行和缓存机制设计。文章还提供了旅行规划 Agent 的实战案例和常见问题解决方案,帮助开发者构建高效、

yonggeit的博客 3272

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: YOLOv11涨点改进 | 独家创新、细节涨点改进篇 | AAAI 2025 | 将 CEM 颜色增强模块引入 YOLOv11 ,目标检测不再惧怕雾天和低光检测、小目标检测、遥感目标检测高效涨点
下一篇: YOLOv11涨点改进 | 全网独家创新、细节涨点改进篇 | ICML 2024 | YOLOv11引入ICB交互式卷积模块和ASB自适应频谱模块,助力目标检测、异常检测有效涨点、含多种创新改进点
Ai缝合怪 博士
博客等级 码龄7年 2963粉丝 1907原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值