DS07_Hashing
- 格式:ppt
- 大小:761.00 KB
- 文档页数:38


第50 卷第 8 期2023年8 月Vol.50,No.8Aug. 2023湖南大学学报(自然科学版)Journal of Hunan University(Natural Sciences)基于Swin Transformer的深度有监督哈希图像检索方法苗壮,赵昕昕,李阳†,王家宝,张睿(陆军工程大学指挥控制工程学院,江苏南京 210007)摘要:在深度有监督哈希图像检索的特征提取过程中,一直由卷积神经网络架构主导,但是随着Transformer在视觉领域中的应用,Transformer替代卷积神经网络架构成为可能.为了解决现存基于Transformer的哈希方法中不能生成层次表示和计算复杂度高等问题,提出了一种基于Swin Transformer的深度有监督哈希图像检索方法.该方法以Swin Transformer网络模型为基础,在网络最后添加一个哈希层,为图像进行哈希编码.该模型中引入了局部思想和层级结构,能够有效解决上述问题.与现有的13种先进方法相比,所提方法的哈希检索性能得到大幅提升.在两个常用检索数据集CIFAR-10和NUS-WIDE上进行实验,实验结果表明:在CIFAR-10数据集上所提方法mAP最高达到98.4%,与TransHash方法相比平均提高7.1%,与VTS16-CSQ方法相比平均提高0.57%;在NUS-WIDE数据集上所提方法mAP最高达到93.6%,与TransHash方法相比平均提高18.61%,与VTS16-CSQ方法相比检索精度平均提高8.6%.关键词:哈希学习;深度学习;图像检索;Swin Transformer中图分类号:TP391 文献标志码:ADeep Supervised Hashing Image Retrieval Method Based on SwinTransformerMIAO Zhuang,ZHAO Xinxin,LI Yang†,WANG Jiabao,ZHANG Rui(Command and Control Engineering College, Army Engineering University of PLA, Nanjing 210007, China)Abstract:The feature extraction process in deep supervised Hash image retrieval has been dominated by the convolutional neural network architecture. However,with the application of Transformer in the field of vision,it becomes possible to replace the convolutional neural network architecture with Transformer. In order to address the limitations of existing Transformer-based hashing methods,such as the inability to generate hierarchical representations and high computational complexity, a deep supervised hash image retrieval method based on Swin Transformer is proposed. The proposed method utilizes the Swin Transformer network model, and incorporates a hash layer at the end of the network to generate hash encode for images. By introducing the concepts of locality and hierarchy into the model, the method effectively solve the above problems. Compared with 13 existing state-of-the-∗收稿日期:2022-06-20基金项目:国家自然科学基金资助项目(61806220), National Natural Science Foundation of China(61806220);国家重点研发计划项目(2017YFC0821905), National Key Research and Development Program of China(2017YFC0821905)作者简介:苗壮(1976―),男,辽宁辽阳人,陆军工程大学教授,博士生导师,博士† 通信联系人,E-mail:**********************文章编号:1674-2974(2023)08-0062-10DOI:10.16339/ki.hdxbzkb.2023274第 8 期苗壮等:基于Swin Transformer的深度有监督哈希图像检索方法art methods, the method proposed in this paper has greatly improved the performance of hash retrieval. Experiments are carried out on two commonly used retrieval datasets,namely CIFAR-10 and NUS-WIDE. The experimental results show that the proposed method achieves the highest mean average precision (mAP) of 98.4% on the CIFAR-10 dataset. This represents an average increase of 7.1% compared with the TransHash method and an average increase of 0.57% compared with the VTS16-CSQ method. On the NUS-WIDE dataset,the proposed method achieves the highest mAP of 93.6%. This corresponds to an average improvement of 18.61% compared with the TransHash method, and an average increase of 8.6% in retrieval accuracy compared with the VTS16-CSQ method. Key words:hash learning;deep learning;image retrieval;Swin Transformer随着互联网技术的飞速发展,高维数据呈爆炸性增长,如何高效地实现大规模信息检索已经成为表示学习领域的严峻挑战.在解决这项具有挑战性任务所提的方法中[1-4],基于哈希的方法取得了显著的成功[5].哈希方法旨在学习一个哈希函数,该函数能够将高维像素空间中的图像映射到低维汉明空间,同时保留它们在原始像素空间中的视觉相似性.根据特征提取方式的不同,现存的基于哈希方法可以分为两类,即传统方法和基于深度学习的方法.传统方法[6-8]通过手工制作的视觉描述符(例如GIST[9])来学习哈希函数.然而,其并不能准确地保留原始图像对的语义相似性,导致后续哈希函数学习过程中性能的下降.与传统的哈希方法相比,基于深度学习的哈希方法[10-11]通常可以实现显著的性能改进.基于深度学习的哈希方法包括两个阶段:第一阶段旨在学习一个能够生成图像特征表示的深度卷积神经网络(Convolutional Neural Networks, CNNs),例如AlexNet.第二阶段通过深度哈希函数将连续特征映射为二进制哈希码,并利用各种损失函数[12-16]来保留图像原始像素空间中的相似性.基于深度学习的哈希方法通过卷积神经网络[17-22]以端到端的方式来同时学习图像的特征表示和二进制哈希码,取得了较好的检索性能.例如,文献[23]提出采用成对损失的贝叶斯学习框架;文献[13]进一步提出用柯西分布代替先前的神经网络输出对数的概率生成函数,来惩罚汉明距离大于阈值的相似图像对;文献[24]开创性提出了一种针对多标签图像检索的相似矩阵.虽然上述方法取得了较好的检索性能,但是依然存在一些问题.例如,图像的二进制哈希码是由图像连续特征表示通过sign函数量化得到,由于sign函数不可导,这使得优化过程变成NP难问题.先前大多数工作[25]都采用连续松弛方法来解决该问题(使用tanh函数或sigmoid函数代替sign函数),然后在测试阶段使用sign函数直接得到最终的二进制哈希码.第一种典型的方法就是通过在损失函数中添加一个惩罚项来量化函数,这个惩罚项有助于获得sign(h)≈h.该方法还存在一些变体,如文献[23]提出DHN方法实现了同时控制量化误差和优化损失函数.文献[26]提出DCH架构,通过联合优化柯西交叉熵损失和柯西量化损失生成紧凑且集中的二进制哈希码,实现了高效的汉明空间检索.第二种方法是替代方案,它将优化问题分解为几个子问题,可以用交替最小化方法迭代求解.在这个替代过程中,反向传播只能用于一个子问题,而其他的子问题可以用其他的优化方法来解决.例如,文献[27]的最后一层输出直接限制为二进制哈希码,它保留了哈希编码的离散化这一特性,并提出了交替优化策略优化目标函数.第三种方法如HashNet[28]方法提出通过收敛的连续方法直接进行哈希码学习,从连续的相似数据中学习到准确的二进制哈希码,即使用不同的β值来使tan(βz)无限接近于sign (h).除上述三种常用方法外,还存在其他方法.例如,Greedy Hash[29]方法提出使用贪心算法在前传过程中保持对网络输出的离散约束,在反传过程中将哈希层的梯度完全传送到网络前层,进一步解决了离散优化问题并提高了哈希检索精度.在此启发下,设计了贪心非对称损失函数,该损失函数能够解决优化过程中梯度消失问题,并充分利用训练数据,提高了哈希码学习精度.近年来,Transformer[30]在自然语言处理[31-32]中取得了巨大的成功.随着Transformer在自然语言处理中的成功,许多研究人员开始探索将Transformer作为视觉任务的独立架构使用.将Transformer用于计算机视觉存在两个主要的挑战.首先,Transformer在63湖南大学学报(自然科学版)2023 年一组Token上操作,但在图像中不存在类似自然语言中的单词的自然Token.其次,图像具有较强的局部结构,而Transformer结构以同样的方式处理所有的Token,忽略了图像局部性.因此,2020年谷歌提出了Vision Transformer(ViT)[33],开创性地解决了第一个挑战,即简单地将图像分割为不重叠的块,并将每个块作为视觉Token,有效地缓解了这一问题.随后,Swin[34]和Twins[35]提出了用局部ViT来解决第二个问题.它们在非重叠窗口内进行自注意力计算以及采用局部分组的自注意力机制.这些机制引入了局部性,不仅提高了架构的性能,而且能够充分利用内存并提高计算效率.与此同时,Transformer在哈希图像检索领域中也存在一定的应用.TransHash[36]提出一种基于纯视觉Transformer的双流特征学习架构,能够同时学习图像有区别的全局和局部特征表示.然而,TransHash 未能利用在大规模数据集上预训练的Transformer模型和最新研究的目标函数.因此,文献[33]提出了用于图像检索的视觉Transformer哈希方法(VTS),该方法通过预训练的ViT模型来提取图像的连续特征表示,并在网络最后添加一个哈希模块来学习图像的二进制哈希码,并达到当前深度有监督哈希图像检索领域最先进水平.但是,研究发现ViT在特征提取阶段均保持相同的特征分辨率以及在整幅图像内计算各像素点之间的依赖关系,这导致ViT不能提取图像的多层次表示和计算复杂度高等问题.因此,尝试探索以Swin Transformer[34]为基础设计哈希骨干网,将局部思想和层级结构引入Transformer来解决上述问题,并进一步提高哈希检索性能.本文建立了一个基于Swin Transformer的深度有监督哈希图像检索方法,这是第一个以Swin Trans⁃former为基础设计的哈希学习方法.图像经过Swin Transformer能够得到深度特征表示,然而学习得到的深度特征表示是连续的,因此在测试阶段需要通过sign函数将特征表示转化为二进制哈希码.但是,由于sign函数不可导,使得优化过程变为NP难问题,这导致了次优的哈希检索性能.因此,设计了贪心非对称损失来解决此问题,并得了较好的结果.综上所述,本文主要贡献可以概括为:1)提出了一种基于Swin Transformer的深度有监督哈希图像检索方法.该方法通过将局部思想和层级结构引入Transformer来生成图像的层次表示,能够得到更好保留图像底层信息的深度特征. 2)设计了一种贪心非对称损失函数.该损失函数能够解决优化过程中梯度消失问题,并充分利用训练数据,提高哈希码学习精度.3)在两个常用检索数据集CIFAR-10和NUS-WIDE上的实验结果表明,本文方法检索性能优于其他方法.在CIFAR-10数据集上,与TransHash方法相比,当训练数据远远小于TransHash时,本文方法mAP平均提高7.1%,与VTS16-CSQ方法相比,本文方法mAP平均提高0.57%.在NUS-WIDE数据集上,与TransHash方法相比,本文方法mAP平均提高18.61%,与VTS16-CSQ方法相比,本文方法检索精度平均提高8.6%.充分验证了所提方法的有效性.1 本文方法图1为本文网络结构的总体框架,主要包含特征提取和损失函数两个阶段.本文方法的主要思路是:通过以Swin Transformer为基础设计的哈希网络对输入图像进行深度特征提取,再使用深度哈希函数生成图像的哈希编码,最后通过图像之间哈希编码的汉明距离远近来进行图像检索.1.1 特征提取以Swin Transformer为基础设计的哈希网络进行图像深度特征提取.Swin Transformer与主流的CNN 模型相似,均采用金字塔结构将模型分为不同的Stage.它包含1个Patch partition和4个Stage,每个Stage都是由Swin Transformer Block堆叠而成,如图2所示.在哈希特征提取过程中,首先将大小为H×W (224×224)的RGB图像输入哈希网络中,通过Patch partition层将图像划分成长宽均为p=4、特征维度为48的不重叠Patch,这样使得Transformer Block能够直接处理具有二维结构的图像.之后再将Patch送入各个Stage中,对其进行自注意力计算.在Stage 1中,先通过Linear embedding层将每个Patch的特征维度映射成C维,再送入Swin Transformer Block中;Stage 2、Stage 3和Stage 4相同,通过一个Patch merging 层将相邻2×2个Patch合并,来改变每个Stage中特征图的分辨率从而生成层次表示.如图2所示,Swin Transformer Block是由窗口多头自注意力机制(Window Multi-head Self-Attention,W-MSA)和滑动窗口多头自注意力机制(Shifted-Window Multi-head Self-Attention,SW-MSA)交替组成.W-MSA机制引入窗口操作将图像Patch进行非64第 8 期苗壮等:基于Swin Transformer 的深度有监督哈希图像检索方法重叠均匀划分,每个窗口包含相邻的M ×M 个Patch.这样使得每个窗口内部可以单独进行自注意力计算,能够有效降低计算量,从而解决了上述VTS 方法中计算复杂度高的问题.但是,由于W-MSA 缺乏跨窗口的连接,无法对全局特征进行建模.针对该问题,Swin Transformer 又进一步提出了SW-MSA 机制.SW-MSA 机制在W-MSA 模块划分的规则窗口中,从(ëûM /2,ëûM /2)像素开始替换第一模块中的规则窗口,这种划分方法能够引入上一模块中相邻非重叠窗口之间的连接,提高模型的全局建模能力.但是,划分后会存在许多大小不规则的窗口从而加大计算量.为了高效计算,Swin Transformer 提出使用沿左上方循环移动方式计算,如图3所示(只画出8×8的特征图在M =4的情况).在循环移动后的特征图中,一个窗口可以由几个在特征图中不相邻的子窗口组成,因此使用MASK 机制将自注意力计算限制在每个子窗口内.通过循环位移方式,窗口的数量与常规窗口保持相同.这样Swin Transformer 既可以实现相邻窗口之间的信息交流,又能够保持较少的计算量.Swin Transformer Block 的计算过程如下:z l =W-MSA(LN(z l -1))+z l -1z l =MLP (LN(z l ))+z l ,z l +1=SW-MSA(LN(z l ))+z l , z l +1=MLP (LN(z l +1))+z l +1(1)式中:z l 、z l 代表l 模块(S )W-MSA 和MLP 的输出特征.在自注意力计算过程中,通过添加一个相对位置偏置P ∈R M2×M 2来计算每个head的相似性:图1 本文网络结构图Fig.1 Network architecture of our method图2 两个连续的Swin Transformer BlocksFig.2 Two successive Swin Transformer Blocks图3 W-MSA 和SW-MSA Fig.3 W-MSA and SW-MSA65湖南大学学报(自然科学版)2023 年Attention(Q,K,V)=SoftMax(QK T/d+B)V(2)式中:Q、K、V∈R M2×d代表query、key、value矩阵;d代表Q/K的维度;M2代表一个窗口中包含的Patch 数量.为学习得到图像的哈希特征,本文以Swin Transformer模型为基础,通过在模型Stage 4后添加一个哈希层构建了一个哈希特征提取网络,来将输出特征向量映射到不同位大小的哈希码中.对于大小为224×224的查询图像x i,通过骨干网提取特征及哈希映射得到哈希特征h i:h i=f(x i,θ)(3)式中:f表示骨干网函数,θ表示Swin Transformer骨干网的参数.1.2 损失函数为了学习得到更优的哈希码,设计了一个损失函数,可表示为:L=L1+λL2,其中L1为贪心损失[37],L2为非对称成对损失[38],λ为超参数.贪心损失L1能够解决优化过程中的梯度消失问题,非对称成对损失L2能够使训练过程充分利用数据集合的标签信息,有效地训练网络.具体的贪心损失L1如式(4)所示,B表示图像哈希码集合,H表示图像深度特征集合:L1=loss(B)+α||H-sign(H)||p p(4)为了得到图像的哈希编码,通常会在哈希编码层后面使用sign函数将深度特征映射为二值化哈希码.但由于sign函数不可导,会使优化过程变为NP 难问题.传统方法使用tanh函数或sigmoid函数进行松弛,这样虽然能够训练网络,但会产生次优解.为了更好地解决这个问题,本文的贪心损失L1提出利用贪心算法解决离散优化问题.贪心算法认为离连续最优解最近的离散点,就是所希望得到的离散最优解.算法过程如表1所示.非对称成对损失如式(5)所示,它的作用是:在训练过程中,采用非对称策略训练网络.这样不仅能够充分利用数据集合的监督信息,而且也可以高效训练网络.所谓非对称策略是指,采用不同的方式来处理查询图像和数据集合图像.对于查询图像,通过骨干网进行深度特征提取,再使用深度哈希函数生成查询图像的哈希码;而对于数据集合图像,它的哈希码则是直接学习得到.minθ,V L2(θ,V)=∑i=1m∑j=1n[tanh(f(x i,θ))T v j-c S ij]2(5)式中:S ij表示相似矩阵,V表示数据集合图像.损失函数部分具体过程可参考文献[37]和文献[38].2 实验2.1 数据集本文在CIFAR-10[39]和NUS-WIDE[37]这两个常用的图像检索数据集上进行实验.CIFAR-10数据集是一个单标签图像数据集,共包含10个类,每类包含6 000个样本,总共有60 000张彩色图像,图像大小为32×32.对于CIFAR-10数据集,如果两张图像标签相同,那么将两张图像视为相似对.NUS-WIDE数据集是一个多标签图像数据集,共包含81个类,总共有269 648张图像.本文选择了195 834张属于21个最常见的类的图像进行实验.对于NUS-WIDE数据集,如果两张图像至少共享一个公共标签,那么它们将被定义为相似对.2.2 实验设置全部实验均基于PyTorch 1.7深度学习框架,使用2块Geforce RTX 2080 Ti显卡进行测试.在数据处理上,将所有图像的大小首先调整到256×256.然后对于训练图像,采用标准的图像增广技术,包括随机表1 贪心算法原理Tab.1 The principle of greedy algorithm训练集X以及神经网络f(θ),θ表示神经网络参数,H为图像的特征表示,B为图像哈希码- H i=f(X,θ).- B=sign(H). [前向传播过程]- 计算贪心损失L1:L1=loss(B)+α||H-sign(H)||p ploss可以是任何类型损失,这里loss为交叉熵损失- 计算∂L1∂B=∂loss∂B- 令∂loss∂H=∂loss∂B[后传过程]- 计算∂L1∂H=∂loss∂H+α∂||H-sign(H)||p p∂H=∂loss∂B+α||H-sign(H)||p-1p-1- 计算∂L1∂θ=∂L1∂H×∂H∂θ- 更新网络参数66第 8 期苗壮等:基于Swin Transformer的深度有监督哈希图像检索方法水平翻转和随机裁剪,其中随机裁剪大小为224.对于测试图像,只应用裁剪大小为224的中心裁剪.在参数设置上,Batch Size设置为128,采用Adam优化器,学习率为0.000 1,权重衰减值为0.000 01,训练次数设置为150.在数据集划分上,CIFAR-10数据集的划分与TransHash[36]设置相同,随机从每类中抽取500张,总共5 000张作为训练集;再随机从每类中抽取100张,共1 000张作为查询集;除查询集外的59 000张图像作为数据库集合.由于实验条件有限,对于NUS-WIDE数据集,除训练集和查询集外,其他设置均与TransHash设置相同.NUS-WIDE数据集从数据集合中随机抽取2 000张作为训练集;再随机抽取1 000张作为查询集;除查询集外的其他图像作为数据库集合.在评价指标选取上,本文选择图像检索中最常用的评价指标:mAP (mean Average Precision)和P‒R(Precision‒Recall).2.3 实验结果与分析实验在CIFAR‒10和NUS‒WIDE数据集上进行,与13种哈希方法进行了比较,其中包括4种传统哈希学习方法:SH[8]、ITQ[40]、KSH[40]、BRE[41];9种深度哈希学习方法:DSH[16]、DHN[23]、HashNet[28]、DCH[13]、IDHN[24]、DPN[14]、TransHash[36]、VTS16‒CSQ[33]和DPLAH[42].哈希检索性能如表2所示,其中加粗表示最优值,下画线表示次优值.除VTS16‒CSQ方法外,其他12种方法结果均取自TransHash[36]和DPLAH[42].其中TransHash是首个将Transformer应用于深度有监督哈希图像检索的方法,VTS16-CSQ是基于Transformer模型的哈希检索方法中检索精度最高的方法.虽然TransHash是首个将Transformer应用到深度有监督哈希图像中的方法,但是该方法与最先进的基于卷积神经网络的方法[43]相比仍然存在较大的劣势.由于实验条件有限,在NUS-WIDE数据集上本文只使用TransHash五分之一的数据进行训练,而在CIFAR-10上则与TransHash设置一样.虽然在训练集设置上与TransHash相比有较大的劣势,但实验结果表明,本文方法仍在两个数据集上不同比特条件下均表现出最优异的检索性能.在CIFAR-10数据集上mAP最高达到98.4%,与TransHash相比平均提高7.1%,与VTS16-CSQ相比平均提高0.57%;在NUS-WIDE数据集上mAP最高达到93.6%,与最先进的基于CNN的哈希方法[43]相比平均提高3.8%,与TransHash 和VTS16-CSQ方法相比分别平均提高18.6%和8.6%.传统的非深度哈希方法因为使用手工特征而不能达到较好的检索性能,深度有监督哈希方法通过机器学习技术能够获得更具有辨别性的哈希特征并取得了较高的检索结果.然而,本文所提方法比现有的深度有监督哈希方法性能更优.在NUS-WIDE数据集上,于训练集不足VTS16-CSQ方法1/5的情况下取得了93.6%的检索精度,比目前本领域最先进表2 在CIFAR-10和NUS-WIDE上图像检索精度对比Tab.2 Comparison of the retrieval accuracy on CIFAR-10 and NUS-WIDEMethods SH[8]ITQ[39]KSH[40]BRE[41]DSH[16]DHN[23]HashNet[28]DCH[13]IDHN[24]DPN[14]DPLAH[42]TransHash[36]VTS16-CSQ[33]OursCIFAR-10 (mAP@54000)16 bits————0.614 50.654 40.510 50.668 00.541 90.825 00.938 00.907 50.979 00.984 032 bits————0.68150.67110.62780.69360.56950.8380—0.910 80.979 00.984 048 bits————0.632 80.692 10.663 10.680 70.589 50.830 00.960 00.914 1—0.983 064 bits————0.691 00.673 70.682 60.677 50.597 20.829 00.958 00.916 60.976 00.982 0NUS-WIDE (mAP@5000)16 bits0.405 80.508 60.356 10.502 70.633 80.647 10.682 10.703 60.699 9—0.885 00.726 30.819 00.913 032 bits0.420 90.542 50.332 70.529 00.650 70.672 50.695 30.717 80.714 9——0.739 30.846 00.927 048 bits0.421 10.558 00.312 40.547 50.666 40.698 10.719 30.710 60.722 5—0.918 00.753 2—0.936 064 bits0.410 40.561 10.336 80.554 60.685 60.702 70.734 10.705 60.725 6—0.923 00.748 80.853 00.936 067湖南大学学报(自然科学版)2023 年的方法(VTS16-CSQ )的检索性能提高了8.6%,与基于卷积神经网络的方法(IDHN )相比,检索性能提高了20.19%.在CIFAR-10和NUS-WIDE 数据集上的P ‒R 曲线如图4和图5所示.P -R 曲线与横坐标轴所围面积越大,则表示该方法性能越好.从图中可以看出,本文方法P -R 曲线一直位于其他方法的上方,再一次证明本文方法检索性能的优越性.本文方法能够取得比较优异的检索结果原因如下:首先,设计的基于Swin Transformer 的哈希特征骨干网不仅能够捕获图像的局部信息,而且能够使局部信息之间产生联系,增大感受野获得图像之间的远程依赖关系,因此能够得到更好地保留图像底层信息的哈希特征.其次,设计的贪心非对称损失函数,通过贪心原理能够更好地解决优化过程中的离散优化问题,也能通过非对称方式训练网络,充分利用数据集合中的监督信息.2.4 消融实验我们设计了详细的消融实验来证明所提方法每一部分的有效性.对6种哈希方法(DSH [16]、Hash⁃Net [28]、GreedyHash [29]、IDHN [24]、CSQ [44]、DPN [14])在5种不同哈希骨干网(AlexNet [18]、ResNet50[14]、VTS32[33]、VTS16[33]和本文创建的哈希骨干网)上的性能表现进行了评估.在CIFAR-10和NUS-WIDE 数据集上16和64比特下的检索结果如表3和表4所示,其中黑色加粗表示相同损失函数在不同的骨干网上的最优值,黑色下画线表示次优值;红色加粗表示相同骨干网在不同损失函数下的最优值,红色下画线表示次优值.为了证明所提哈希骨干网的有效性,在5种不同的哈希骨干网中使用相同的损失函数进行了实验(表3和表4纵列所示).实验结果表明,各个损失函数在所提骨干网上的检索性能均能优于在其他骨干网上的检索性能,证明了所提骨干网的有效性.如表3所示,在CIFAR-10数据集上16和64比特下,与AlexNet 网络相比mAP 分别平均提高了20.3%和15.6%;与ResNet50网络相比mAP 分别平均提高了19%和14.6%.如表4所示,在NUS-WIDE 数据集上16和64比特下,与AlexNet 网络相比mAP 分别平均提高了7.81%和4.8%;与ResNet50网络相比mAP 分别平均提高了6.3%和5.55%.图4 CIFAR-10 P -R 曲线Fig.4 P -Rcurves of CIFAR-10图5 NUS-WIDE P -R 曲线Fig.5 P -R curves of NUS-WIDE表3 在CIFAR-10上图像检索精度对比Tab.3 Comparison of the retrieval accuracy on CIFAR-10骨干网AlexNet [18]ResNet50[14]VTS32[33]VTS16[33]Our backboneDSH[16]16 bit 0.7350.6910.9300.9800.94964 bit 0.7850.5240.9530.9740.952HashNet[28]16 bit 0.6510.5550.9620.9780.91964 bit 0.7980.8800.9560.9830.930GreedyHash[29]16 bit 0.7610.8150.9480.9700.97164 bit 0.8160.8630.9430.9800.980IDHN[24]16 bit 0.7590.7560.9590.9760.93464 bit 0.7670.8650.9600.9840.949CSQ[44]16 bit 0.7590.8360.9600.9790.92064 bit 0.7830.8370.9560.9760.924DPN[14]16 bit 0.7350.8200.9510.9740.92264 bit 0.7790.8200.9500.9750.932Our loss 16 bit 0.9370.963——0.98364 bit 0.9470.962——0.98268第 8 期苗壮等:基于Swin Transformer 的深度有监督哈希图像检索方法与VTS 网络相比,本文骨干网在NUS-WIDE 数据集上表现出优异的检索性能,达到目前检索领域最先进的水平.然而,在CIFAR-10数据集上,所提方法次优于基于VTS 的哈希方法性能,分析原因如下:首先,本文的哈希骨干网是以Swin Transformer 在ImageNet 上的预训练模型为基础构建的,由于CIFAR-10中的图像与ImageNet 中的部分图像属性相似,导致在CIFAR-10数据集上再训练出现过拟合现象;其次,基于VTS 的哈希方法的骨干网是以Vi⁃sion Transformer 为基础构建的,与本文所使用的Swin Transformer 在参数量和计算成本上存在巨大的差异.为了进一步证明所提损失函数的有效性,在7种不同的损失函数下使用相同的骨干网进行实验(表3和表4横行所示).如表3所示,AlexNet 网络在GreedyHash 损失函数下能够达到次优值,而在所提贪心非对称损失条件下能够达到最优值;ResNet50网络在HashNet 和CSQ 损失下分别取得次优值,而在所提贪心非对称损失条件下能够达到最优值;所提骨干网在GreedyHash 损失函数下能够达到次优值,而在所提贪心非对称损失下能够达到最优.同理,表4也存在上述情况.进一步证明了所提的贪心非对称损失的有效性.2.5 特征可视化本节对该哈希特征提取网络的4个阶段所得到的特征图进行可视化.如图6所示,随机选取两张图像对每个阶段产生的特征图进行可视化,可以发现:特征提取初期,骨干网更加偏向于提取图像的纹理层特征;特征提取最后阶段,骨干网更加偏向于提取图像的语义特征,得到的特征信息更加聚焦于图像中的目标.这进一步说明Swin Transformer 能够更好地提取图像的深度特征.3 结 论本方法以预训练的Swin Transformer 模型为基础,提出了一个基于视觉Transformer 的哈希特征提取网络.同时,提出贪心非对称损失以端到端的方式进行训练并指导图像哈希码的学习.我们注意到,在不同的检索框架下,所提出的骨干网的性能在两个表4 在NUS-WIDE 上图像检索精度对比Tab.4 Comparison of the retrieval accuracy on NUS-WIDE骨干网AlexNet [18]ResNet50[14]VTS32[33]VTS16[33]Our backboneDSH[16]16 bit 0.7750.7710.7960.7980.80464 bit 0.8080.7910.8290.8290.831HashNet[28]16 bit 0.7520.7680.7760.7920.84664 bit 0.8450.8390.8620.8730.874GreedyHash[29]16 bit 0.7480.7560.7580.7620.90864 bit 0.8000.7880.7980.7860.932IDHN[24]16 bit 0.7910.8090.8330.8410.84164 bit 0.8130.7940.8410.8510.842CSQ[44]16 bit 0.7800.7930.8240.8190.84564 bit 0.8340.8380.8610.8530.875DPN[14]16 bit 0.7500.7890.8020.7970.82164 bit 0.8350.8400.8610.8460.869Our loss 16 bit 0.8820.908——0.91364 bit 0.9250.936——0.936(a ) 原图 (b ) Stage 1 (c ) Stage 2 (d ) Stage 3 (e ) Stage 4图6 特征图可视化Fig.6 Visualization of feature maps69湖南大学学报(自然科学版)2023 年常用数据集上均优于AlexNet和ResNet骨干网.此外,该模型的性能还优于目前所有的基于Trans⁃former的哈希方法,且检索性能达到目前领域的最先进水平.参考文献[1]FU C,XIANG C,WANG C X,et al.Fast approximate nearest neighbor search with the navigating spreading-out graph[J].Proceedings of the VLDB Endowment,2019,12(5):461-474.[2]GE T Z,HE K M,KE Q F,et al.Optimized product quantization for approximate nearest neighbor search[C]//2013 IEEEConference on Computer Vision and Pattern Recognition.Portland,OR,USA:IEEE,2013:2946-2953.[3]JÉGOU H,DOUZE M,SCHMID C.Product quantization for nearest neighbor search[J].IEEE Transactions on PatternAnalysis and Machine Intelligence,2011,33(1):117-128.[4]MALKOV Y A,YASHUNIN D A.Efficient and robust approximate nearest neighbor search using hierarchical navigablesmall world graphs[J].IEEE Transactions on Pattern Analysisand Machine Intelligence,2020,42(4):824-836.[5]LI Y,MIAO Z A,HE M,et al.Deep attention residual hashing [J].IEICE Transactions on Fundamentals of Electronics,Communications and Computer Sciences,2018,E101,A(3):654-657.[6]CHARIKAR M S.Similarity estimation techniques from rounding algorithms[C]//Proceedings of the Thirty-fourth Annual ACMSymposium on Theory of Computing. Montreal,Quebec,Canada,New York:ACM,2002:380-388.[7]INDYK P,MOTWANI R,RAGHAVAN P,et al.Locality-preserving hashing in multidimensional spaces[C]//Proceedings ofthe Twenty-ninth Annual ACM Symposium on Theory ofComputing.El Paso,Texas,USA,New York:ACM,1997:618-625.[8]WEISS Y,TORRALBA A,FERGUS R. Spectral hashing [C]// Proceedings of 22th Annual Conference on Neural InformationProcessing Systems. Red Hook: Curran Associates, 2008: 1753-1760.[9]OLIVA A,TORRALBA A.Modeling the shape of the scene:a holistic representation of the spatial envelope[J].InternationalJournal of Computer Vision,2001,42(3):145-175.[10]LIONG V E,LU J W,WANG G,et al.Deep hashing for compact binary codes learning[C]//2015 IEEE Conference on ComputerVision and Pattern Recognition (CVPR).Boston,MA:IEEE,2015:2475-2483.[11]XIA H K, PAN Y, LAI H J, et al. Supervised hashing for image retrieval via image representation learning [C]// Proceedings ofthe 28th AAAI Conference on Artificial Intelligence. Menlo Park:AAAI, 2014: 2156-2162.[12]CAKIR F,HE K,BARGAL S A,et al.Hashing with mutualinformation[J].IEEE Transactions on Pattern Analysis andMachine Intelligence,2019,41(10):2424-2437.[13]CAO Y,LONG M S,LIU B,et al.Deep cauchy hashing for hamming space retrieval[C]//2018 IEEE/CVF Conference onComputer Vision and Pattern Recognition.Salt Lake City,UT,USA:IEEE,2018:1229-1237.[14]FAN L X,NG K W,JU C,et al.Deep polarized network for supervised learning of accurate binary hashing codes[C]//Proceedings of the Twenty-Ninth International Joint Conferenceon Artificial Intelligence.Yokohama,Japan,California:International Joint Conferences on Artificial IntelligenceOrganization,2020:825-831.[15]HE K,CAKIR F,BARGAL S A,et al.Hashing as tie-aware learning to rank[C]//2018 IEEE/CVF Conference on ComputerVision and Pattern Recognition. Salt Lake City,UT,USA:IEEE,2018:4023-4032.[16]LIU H M,WANG R P,SHAN S G,et al.Deep supervised hashing for fast image retrieval[C]//2016 IEEE Conference onComputer Vision and Pattern Recognition (CVPR). Las Vegas,NV,USA:IEEE,2016:2064-2072.[17]LECUN Y,BOTTOU L,BENGIO Y,et al.Gradient-based learning applied to document recognition[J].Proceedings of theIEEE,1998,86(11):2278-2324.[18]KRIZHEVSKY A,SUTSKEVERU I,HINTON G E. ImageNet classification with deep convolutional neural networks [C]//Proceedings of Advances in Neural Information Processing System.Red Hook: Curran Associates, 2012: 1106-1114.[19]SIMONYAN K,ZISSERMAN A.Very deep convolutional networks for large-scale image recognition[J].eprint arXiv:1409.1556[20]SZEGEDY C,LIU W,JIA Y Q,et al.Going deeper with convolutions[C]//2015 IEEE Conference on Computer Vision andPattern Recognition (CVPR).Boston,MA,USA:IEEE,2015:1-9.[21]HE K M,ZHANG X Y,REN S Q,et al.Deep residual learning for image recognition[C]//2016 IEEE Conference on ComputerVision and Pattern Recognition (CVPR).Las Vegas,NV,USA:IEEE,2016:770-778.[22]TAN M X,LE Q V.EfficientNet:rethinking model scaling for convolutional neural networks[EB/OL].2019:arXiv:1905.11946.https://arxiv.org/abs/1905.11946.[23]ZHU H,LONG M S,WANG J M,et al.Deep hashing network for efficient similarity retrieval[C]// Proceedings of the ThirtiethAAAI Conference on Artificial Intelligence. Menlo Park:AAAI,2016: 2415-2421.[24]ZHANG Z,ZOU Q,LIN Y W,et al.Improved deep hashing with soft pairwise similarity for multi-label image retrieval[J].IEEETransactions on Multimedia,2020,22(2):540-553.[25]LI Y,MIAO Z,WANG J B,et al.Deep discriminative supervised hashing via Siamese network[J]. IEICE Transactions onInformation and Systems,2017,E100,D(12):3036-3040.[26]CAO Y,LIU B,LONG M S,et al.HashGAN:deep learning to70。
halcon 实现哈希函数-回复如何在Halcon中实现哈希函数哈希函数(hash function)是一种能将任意长度的输入数据映射成固定长度输出的函数。
在计算机领域中,哈希函数被广泛运用于数据结构、密码学和网络安全等领域。
本文将介绍如何在Halcon中实现一个简单的哈希函数。
第一步:选择合适的哈希算法Halcon中并没有内置的哈希函数,因此我们需要选择一个合适的哈希算法。
常用的哈希算法包括MD5、SHA-1和SHA-256等。
在选择哈希算法时,我们需要考虑其安全性、速度和实现复杂度等因素。
假设我们选择的哈希算法是MD5。
第二步:了解MD5算法的基本原理MD5(Message Digest Algorithm 5)是由美国密码学家罗纳德·李维斯特(Ronald L. Rivest)于1991年提出的一种哈希函数。
它能将任意长度的输入数据映射成128位的哈希值。
MD5算法基于分组计算,对输入数据以512位(64个字节)为一组进行处理,并通过四轮的变换操作得到最终的哈希值。
第三步:借助外部函数库实现MD5算法由于Halcon本身不支持MD5算法,我们可以借助外部的函数库来实现。
在这里,我们选择常用的cryptlib函数库(第四步:安装和配置cryptlib首先,我们需要下载cryptlib函数库的源代码,并将其编译成动态链接库(或静态链接库)。
在Halcon中,我们需要配置好函数库的路径,以便在代码中正确引用。
第五步:编写Halcon代码实现哈希函数在Halcon代码中,我们可以使用外部函数接口(External Procedure Interface)来调用cryptlib函数库中的MD5实现。
以下是一个示例代码:cpp* 首先,将外部函数库加载到Halcon中* ExampleCryptLibPath为cryptlib的路径,需根据实际情况修改load_proc('ExampleCryptLibPath/libcryptlib.so','cryptlib_MD5_Initialize', [Key : Inp:Pointer, ID : Inp:Pointer, ...) : Outp)load_proc('ExampleCryptLibPath/libcryptlib.so','cryptlib_MD5_Final', [Key : Inp:Pointer, ...): Outp)* 然后,定义MD5哈希函数define_hash_function_3d('MD5', Input:Image, Output:Image,'Md5Hash', [Key : Inp:utf8] , 'Md5Package', [MD5Package : Outp:Pointer])* 最后,实现MD5哈希函数procedure Md5Hash(Input:Image, Output:Image)* 调用外部函数库的MD5实现Md5Package := cryptlib_MD5_Initialize('')cryptlib_MD5_Final(Md5Package)endprocedure在上述代码中,我们首先加载了cryptlib函数库,并定义了一个MD5哈希函数。
Synology DiskStation DS918+ is a 4-bay NAS designed for small and medium-sized businesses and IT enthusiasts. Powered by a new quad-core processor, DS918+ provides outstanding performance and data encryption acceleration along with real-time transcoding of 4K Ultra HD source contents. Synology DS918+ is backed by Synology’s 3-year limited warranty.DiskStationDS918+Highlights• Powerful and scalable 4-bay NAS for growing businesses• Encrypted sequential throughput at over 225 MB/s reading and 221 MB/s writing 1• Quad-core processor with AES-NI hardware encryption engine• 4GB DDR3L-1866 memory, expandable up to 8GB• Dedicated M.2 NVMe SSD slots for system cache support• Dual 1GbE LAN with failover and Link Aggregation support• Scalable up to 9 drives with Synology DX5172• Advanced Btrfs file system offering 65,000 system-wide snapshots and 1,024 snapshots per shared folder • Dual-channel H.265/H.264 4K video transcoding on the fly 3High-speed Scalable Storage ServerSynology DS918+ is a 4-bay network attached storage solution equipped with an quad-core processor and 4GB DDR3L memory (expandable up to 8GB). With Link Aggregation enabled, DS918+ delivers great sequential throughput performance at over 226 MB/s reading and 222 MB/s writing 1. With AES-NI hardware accelerated encryption, DS918+ delivers encrypted data throughput at over 225 MB/s reading and 221 MB/s writing 1. DS918+ newly supports M.2 NVMe 2280 SSDs , allowing fast system cache creation without occupying internal drive bays.DS918+ can supp ort up to 9 drives when connected to one Synology DX5172 expansion unit. Storage capacity can be expanded according to your business needs with minimal effort.Btrfs: Next Generation Storage EfficiencyDS918+ introduces the Btrfs file system , bringing the most advanced storage technologies to meet the management needs of modern businesses:• Built-in data integrity check detects data and file system corruption with data and meta-data checksums and improves the overall stability.• Flexible Shared Folder/User Quota System provides comprehensive quota control over all user accounts and shared folders.• Advanced snapshot technology with customizable backup schedule allows up to 1,024 copies of shared folder backups in a minimum 5-minute interval without occupying huge storage capacity and system resources.• File or folder level data restoration brings huge conveniences and saves time for users who wish to restore only a specific file or folder.• File self-healing : Btrfs file system can auto-detect corrupted files with mirroredmetadata, and recover broken data using the supported RAID volumes, which include RAID1, 5, 6, and 10.Comprehensive Business ApplicationsPowered by the innovative Synology DiskStation Manager (DSM), DS918+ comes fully-equipped with applications and features designed specifically for small or growing businesses:• Windows® AD and LDAP support allow easy integration with existing business directory services, without needing to recreate user accounts.• Windows ACL support provides fine-grained access control and efficient privilege settings, allowing DS918+ to fit seamlessly into current infrastructure.• Internet file access is simplified by the encrypted FTP server and Synology File Station , a web-based file explorer. HTTPS, firewall, and IP auto-block support ensure file sharing over the Internet is protected with a high level of security.• Application Privileges controls access to applications and packages based on each individual account, user group, or IP address.• MailPlus allows your business to set up a secure, reliable, and private mail server while giving your employees a modern mail client for receiving and sending messages.• The powerful Collaboration Suite integrates Synology Office , Calendar , and Chat , ensuring secure and effective private communications and allowing your organizations to easily manage and control relevant contents.Virtualization SolutionsSynology’s Virtual Machine Manager opens up abundant possibilities, allowing you to set up and run various virtual machines, including Windows , Linux , and Virtual DSM . You can also test new software versions in a sandbox environment, isolate yourcustomers' machines, and increase the flexibility of your DS918+ with reduced hardware deployment and maintenance costs.Synology iSCSI storage fully supports most of the virtualization solutions, enhancing work efficiency with an intuituve management interface. VMware vSphere™ 6.5 and VAAI integration help offload storage operations and optimize computation efficiency. Windows Offloaded Data Transfer (ODX) speeds up data transfer and migration rate, while OpenStack Cinder support transforms your Synology NAS into a block-based storage component.4K Ultra HD Multimedia LibrarySynology DiskStation DS918+ features real-time transcoding for up to 2 channels of H.264/H.265 4K videos at the same time, bringing more powerful support to thelatest multimedia formats and contents. With Video Station , you can organize personal digital video library with comprehensive media information, and watch 4K Ultra HD movies and films. The intuitive design of Photo Station allows you to effortlessly organize photos into customized categories, smart albums and blog posts, and link them to social networking websites within a few clicks. Audio Station comes with Internet radio and lossless audio formats support, and provides music playback viaDLNA and AirPlay®-compliant devices.Virtual Machine Manager Virtual Machine Manager implements various virtualization solutions, allowing you to manage multiple virtual machines on your DS918+, including Windows , Linux , and Virtual DSM.Synology Collaboration SuiteA powerful and secure private cloud solution for business collaboration and organization, offering intuitive yet effective management options.Hardware OverviewTechnical SpecificationsHardwareCPUIntel Celeron J3455 quad-core 1.5GHz, burst up to 2.3GHz Hardware encryption engine Yes (AES-NI)Hardware transcoding engine • Supported codecs: H.264 (AVC), H.265 (HEVC), MPEG-2, VC-1• Maximum resolution: 4K (4096 x 2160)• Maximum frames per second (FPS): 30Memory4 GB DDR3L SO-DIMM (expandable up to 8 GB)Compatible drive type • 4 x 3.5" or 2.5" SATA SSD/HDD (drives not included)• 2 x M.2 NVMe 2280 SSD (drives not included)External port • 2 x USB 3.0 port • 1 x eSATA port Size (HxWxD)166 x 199 x 223 mm Weight 2.28 kg LAN2 x 1GbE (RJ-45)Wake on LAN/WAN Yes Scheduled power on/off YesSystem fan2 (92 x 92 x 25 mm)AC input power voltage 100V to 240V AC Power frequency 50/60Hz, single phase Operating temperature 5°C to 40°C (40°F to 104°F)Storage temperature -20°C to 60°C (-5°F to 140°F)Relative humidity5% to 95% RH Maximum operating altitude5,000 m (16,400 ft)1Status indicator2Drive status indicator 3Drive tray lock 4USB 3.0 port 5Power button and indicator 6Drive tray 71GbE RJ-45 port 8Reset button9eSATA port 10Power port11Fan12Kensington Security Slot13USB 3.0 port14M.2 NVMe SSD slot (bottom side)6General DSM SpecificationNetworking protocol SMB, AFP, NFS, FTP, WebDAV, CalDAV, iSCSI, Telnet, SSH, SNMP, VPN (PPTP, OpenVPN ™, L2TP)File system • Internal: Btrfs, ext4• External: Btrfs, ext4, ext3, FAT, NTFS, HFS+, exFAT4Supported RAID type Synology Hybrid RAID (SHR), Basic, JBOD, RAID 0, RAID 1, RAID 5, RAID 6, RAID 10Storage management • Maximum internal volumes: 512• Maximum iSCSI targets: 32• Maximum iSCSI LUNs: 256• iSCSI LUN clone/snapshot supportSSD cache SSD read-write cache supportFile sharing capability • Maximum local user accounts: 2,048• Maximum local groups: 256• Maximum shared folders: 512• Maximum concurrent SMB/NFS/AFP/FTP connections: 1,000Privilege Windows Access Control List (ACL), application privilegeDirectory service Windows® AD integration: Domain users login via SMB/NFS/AFP/FTP/File Station, LDAP integration Virtualization VMware vSphere® 6.5, Microsoft Hyper-V®, Citrix®, OpenStack®Security Firewall, encrypted shared folder, SMB encryption, FTP over SSL/TLS, SFTP, rsync over SSH, login auto block, Let's Encrypt support, HTTPS (Customizable cipher suite)Supported client Windows 7 and 10, Mac OS X® 10.11 onwardsSupported browser Chrome®, Firefox®, Internet Explorer® 10 onwards, Safari® 10 onwards; Safari (iOS 10 onwards), Chrome (Android™ 6.0 onwards)Interface Language English, Deutsch, Français, Italiano, Español, Dansk, Norsk, Svensk, Nederlands, Русский, Polski, Magyar, Português do Brasil, Português Europeu, Türkçe, Český,Packages and ApplicationsFile Station Virtual drive, remote folder, Windows ACL editor, compressing/extracting archived files, bandwidth control for specific users or groups, creating sharing links, transfer logsFTP Server Bandwidth control for TCP connections, custom FTP passive port range, anonymous FTP, FTP SSL/TLS and SFTP protocol, boot over the network with TFTP and PXE support, transfer logsUniversal Search Offer global search into applications and filesHyper Backup Support local backup, network backup, and backup data to public clouds Active Backup for Server Centralize data backup for Windows and Linux servers without client installationBackup tools DSM configuration backup, macOS Time Machine support, Cloud Station Backup Shared folder sync - maximum tasks: 8Cloud Station Suite Sync data between multiple platforms by installing the client utilities on Windows, Mac, Linux, Android and iOS devices, while retaining up to 32 historical versions of filesMaximum concurrent file transfers: 1,000Cloud Sync One or two-way synchronization with public cloud storage providers including Amazon Drive, Amazon S3-compatible storage, Baidu cloud, Box, Dropbox, Google Cloud Storage, Google Drive, hubiC, MegaDisk, Microsoft OneDrive, OpenStack Swift-compatible storage, WebDAV servers, Yandex DiskSurveillance Station Maximum IP cameras: 40 (total of 1,200 FPS at 720p, H.264) (includes two free camera licenses; additional cameras require the purchasing of additional licenses)Virtual Machine Manager Deploy and run various virtual machines on Synology NAS, including Windows, Linux, or Virtual DSM High Availability Manager Reduce service downtime by setting up two identical NAS into one high-availability clusterSnapshot Replication • Maximum replications: 64• Maximum shared folder snapshots: 1,024• Maximum system snapshots: 65,536Active Directory Server A flexible and cost-effective domain controller solutionVPN Server Maximum connections: 20, supported VPN protocol: PPTP, OpenVPN™, L2TP/IPSecMailPlus Server Secure, reliable, and private mail solution with high-availability, load balancing, security and filtering design (Includes 5 free email account licenses; additional accounts require the purchasing of additional licenses)MailPlus Intuitive webmail interface for MailPlus Server, customizable mail labels, filters, and user interfaceCollaboration tools • Chat maximum users: 1,500• Office maximum users: 200, maximum simultaneous editing users: 80• Calendar: support CalDAV and access via mobile devicesNote Station Rich-text note organization and versioning, encryption, sharing, media embedding and attachmentsStorage Analyzer Volume and quota usage, total size of files, volume usage and trends based on past usage, size of shared folders, largest/most/least frequently modified filesAntivirus Essential Full system scan, scheduled scan, white list customization, virus definition auto updateSYNOLOGY INC.Synology is dedicated to taking full advantage of the latest technologies to bring businesses and home users reliable and affordable ways to centralize data storage, simplify data backup, share and sync files across different platforms, and access data on-the-go. Synology aims to deliver products with forward-thinking features and the best in class customer services.Copyright © 2017, Synology Inc. All rights reserved. Synology, the Synology logo are trademarks or registered trademarks of Synology Inc. Other product and company names mentioned herein may be trademarks of their respective companies. Synology may make changes to specification and product descriptions at anytime, without notice.DS918+-2017-ENU-REV003Headqu artersSynology Inc. 3F-3, No. 106, Chang An W. Rd., Taipei, Taiwan Tel: +886 2 2552 1814 Fax: +886 2 2552 1824ChinaSynology Shanghai 200070, Room 516, No. 638 Hengfeng Rd., Zhabei Dist. Shanghai, ChinaUnited KingdomSynology UK Ltd.Unit C, Denbigh WestBusiness Park, Third AvenueBletchley, Milton KeynesMK1 1DH, UKTel: +44 1908 366380GermanySynology GmbHGrafenberger Allee125 40237 DüsseldorfDeutschlandTel: +49 211 9666 9666North & South AmericaSynology America Corp.3535 Factoria Blvd SE #200Bellevue, WA 98006, USATel: +1 425 818 1587FranceSynology France SARL39 rue Louis Blanc, 92400Courbevoie, FranceTel: +33 147 176288Download Station Supported download protocols: BT, HTTP, FTP, NZB, eMule, Thunder, FlashGet, QQDL Maximum concurrent download tasks: 80Web Station Virtual host (up to 30 websites), PHP/MariaDB®, 3rd-party applications supportOther packages Video Station, Photo Station, Audio Station, DNS Server, RADIUS Server, iTunes® Server, Log Center, additional 3rd-party packages are available in Package CenteriOS/Android™ applications DS audio, DS cam, DS cloud, DS file, DS finder, DS get, DS note, DS photo, DS video, MailPlus Windows Phone® applications DS audio, DS file, DS finder, DS get, DS photo, DS videoEnvironment and PackagingEnvironment safety RoHS compliantPackage content • DS918+ main unit x 1• Quick Installation Guide x 1• Accessory pack x 1• AC power adapter x 1• RJ-45 LAN cable x 2Optional accessories • D3NS1866L-4G• Expansion Unit DX517• VisualStation VS360HD, VS960HD • Surveillance Device License Pack • MailPlus License PackWarranty 3 years*Model specifications are subject to change without notice. Please refer to for the latest information.1. Performance figures may vary depending on environment, usage, and configuration.2. DS918+ supports one Synology DX517, sold separately.3. DS918+ can transcode 4K video to 1080p or lower. The maximum number of concurrent video transcoding channels supported may vary depending on the video codec, resolution,bitrate and FPS.4. exFAT Access is purchased separately in Package Center.。
收稿日期:3作者简介:孙锐(6),男,浙江余姚人,副研究员,博士,主要研究方向为多媒体安全,图像处理与理解。
2010年工程图学学报2010第2期J OURNAL OF ENG INEERING GRAPHICSNo.2基于图像正则化的抗几何变换的感知哈希算法孙锐1,闫晓星2,丁志中1(1.合肥工业大学计算机与信息学院,安徽合肥230009;2.合肥工业大学光电技术研究院,安徽合肥230009)摘要:图像哈希在内容认证、数据库搜索和水印等领域有广泛的应用。
该文提出的新的抗几何变换的感知哈希方法包括三个主要阶段:第一阶段通过图像正则化过程获得一个对任意仿射变换具有不变性的正则图像;第二阶段对随机选择的多个子图像进行小波变换产生一个包括图像主要特征的副图像;第三阶段采用奇异值分解捕获图像的局部感知成分并生成最终哈希。
仿真实验表明算法有效抵抗了几何变换、压缩等感知保持操作,内容篡改也被正确检测。
批量实验也证明算法有较好的稳健性和抗误分类能力。
关键词:计算机应用;感知哈希;图像正则化;几何变换;图像认证中图分类号:TP 391.41文献标识码:A文章编号:1003-0158(2010)02-0116-07Robust Perceptual Hashing Algorithm to Geometric Distor tionsBased on Image NormalizationSUN Rui 1,YAN Xiao-xing 2,DING Zhi-zhong 1(1.School of Computer and Information,Hefei Universi ty of Technology,Hefei Anhui 230009,China;2.Academy of Optoelectronic Technology,Hefei Uni versity of Technology,Hefei Anhui 230009,China )Abstr act:Image hashing functions have extensive applications in content authentication,database search and watermarking,etc.A novel perceptual hashing algorithm is developed which is robust to geometric distortions.The algorithm includes three stages:the first stage obtains the image that is invariant to any affine transforms through a normalization procedure;the second stage applies discrete wavelet transform to pseudo-randomly select sub-images to obtain secondary image including main features;the third stage uses singular value decomposing to capture local perceptual features and to get the final hash.The experiments show the method withstands perceptually preserved manipulations including geometric distortions,compression,and common signal processing operations.The content changes are also can be detected accurately.Thus the proposed method achieves perceptual robustness while avoiding misclassification.K ey wor ds:computer application;perceptual Hashing;image normalization;geometric distortions;image authentication2008-10-1197-图像哈希是图像内容或特征的一种简洁表示,即使两幅感知相近的图像在数值上有不同的表示,感知哈希函数也使它们产生相同或相近的哈希序列,这是感知哈希技术与传统密码学中的哈希的显著区别。