当前位置:网站首页>非局部均值滤波(NON-LOCAL-mean)/注意力机制
非局部均值滤波(NON-LOCAL-mean)/注意力机制
2022-07-23 18:37:00 【xx_xjm】
一:非局部均值
均值滤波:以目标像素点x为中心,对其半径为r的范围内的像素加权求和取平均作为像素点x滤波后的值
非局部均值滤波:均值滤波是对目标像素点x范围内的像素点加权求和,但这个权重是人为设定的,一般就是取1,也就是说这个范围内的像素点对中心点x的影响是相同的,这明显不对。那各个像素点对中心点x的权重应该怎么设置呢?非局部均值滤波其实就是计算不同位置像素点对中心点x的影响权重,再进行加和取平均。这个权重怎么计算呢?
先参考下文:非局部均值滤波(一)_浅浅雨墨的博客-CSDN博客_非局部均值滤波
文章中已经讲的很清楚了,但有一个问题我觉得说的不是太好,他这里把图片大小设置为7*7,而搜索框也是7*7,就不太好理解,我这里补充一下。
我们可以把图片大小设置为256*256,这样我们设置搜索框为7*7,领域块设置为3*3;也就是说我们需要计算搜索框7*7内49个像素点对搜索框中心点x的影响权重,这个权重的计算方式是通过搜索框内每个点的领域快与中心点的领域快来计算的
二:注意力机制
注意力机制可以分为两种:一种是软注意力机制,一种是硬注意力机制,简单的理解可以认为软注意力学习到的注意力是连续的[0,1]之间的概率值,而硬注意力机制学习到的注意力只能是0,或者1。一般我们用的都是软注意力,而硬注意力一般需要用强化学习来得到。
参考自:Attention(注意力)机制 - 简书 (jianshu.io)
注意力机制的分类 | Soft Attention和Hard Attention_Ftwhale的博客-CSDN博客_注意力机制分类
CV中的Attention机制总结_一直特立独行的猫1994的博客-CSDN博客_cv中的attention
软注意力机制:比如计算通道之间的注意力关系,比较有代表性的就是SENet;或者是区域之间的注意力,通道注意力,空间注意力等。
硬注意力机制:计算点对点的注意力,代表性的就是Non-local Neural Networks这篇论文,是self-attention的一种典型应用,其思想是源于我们上面说的非局部均值滤波。
再着重一点:注意力我们可以理解为一种计算元素与元素之间相互影响因子的方式,而non-local是一种计算的方式:比如在论文“Camouflflaged Object Segmentation with Distraction Mining ”中所提到的这样:
边栏推荐
- ACM mm 2022 oral | dig: the new framework of self-monitoring character recognition refreshes the recognition performance of 11 public scene character data sets, with an average improvement of 5%
- [hero planet July training leetcode problem solving daily] 23rd dictionary tree
- Energy principle and variational method note 12: minimum potential energy principle
- selenium中元素定位正确但是操作失败,6种解决办法全稿定
- PowerCLi 将虚拟机从Host01主机移动到Host02主机
- Paddle implementation, multidimensional time series data enhancement, mixup (using beta distribution to make continuous random numbers)
- PowerCLi 管理VMware vCenter 批量部署导出导入
- Powercli add esxi host to vCenter
- 安全停止nodeos
- 梅科尔工作室-华为14天鸿蒙设备开发实战笔记五
猜你喜欢

According to the e-commerce written on the resume, how does redis realize inventory deduction and prevent oversold?

PowerCLi 添加esxi主机到vCenter

三维点云课程(七)——特征点描述

Powercli add esxi host to vCenter

Energy principle and variational method note 16: solution of virtual displacement principle

web安全入门-ssh测试与防御

梅科尔工作室-华为14天鸿蒙设备开发实战笔记四

Leetcode 238. 除自身以外数组的乘积

AtCoder Regular Contest 144【VP记录】

C language leak detection and filling (1)
随机推荐
【ASP.NET Core】选项模式的相关接口
Construction deployment scheme of GPS Beidou clock server (NTP network clock system)
Leetcode 238. 除自身以外数组的乘积
Whether the R language test sample conforms to normality (whether the test sample is from a normally distributed population): SF of nortest package is used The test function verifies whether the sampl
Sui of the public chain (New Public chain project established by former Facebook /meta employees)
Leetcode 238. 除自身以外数组的乘积
Latex(katex)csdn 希腊字母表示,数学符号,集合符号,特殊标记
我在代码里面故意留个漏洞,违法吗?
Solutions to SecureCRT garbled code problem [easy to understand]
编译器LLVM-MLIR-Intrinics-llvm backend-instruction
Codeforces Round #809 (Div. 2)【VP记录】
R language ggplot2 visualization: use ggplot2 to visualize the scatter diagram, and use the theme of ggpubr package_ The classic2 function sets the visual image to classic theme with axis lines
Energy principle and variational method note 18: virtual force principle
搭建自己的目标检测环境,模型配置,数据配置 MMdetection
C language leak detection and filling (1)
什么是弱网测试?为什么要进行弱网测试?怎么进行弱网测试?「建议收藏」
深入浅出边缘云 | 1. 概述
Basic process of process scheduling
Four rotor aircraft 1 - structure and control principle
[深入研究4G/5G/6G专题-40]: URLLC-11-《3GPP URLLC相关协议、规范、技术原理深度解读》-5-5G Qos原理与架构: 切片、PDU会话、QosFlow、5QI、DRB