Print

发布时间: 2019-06-16
摘要点击次数:
全文下载次数:
DOI: 10.11834/jig.180525
2019 | Volume 24 | Number 6




    Chinagraph 2018    




  <<上一篇 




  下一篇>> 





结合细粒度特征与深度卷积网络的手绘图检索
expand article info 李宗民1, 刘秀秀1, 刘玉杰1, 李华2
1. 中国石油大学(华东)计算机与通信工程学院, 青岛 266580;
2. 中国科学院计算技术研究所智能信息处理重点实验室, 北京 100190

摘要

目的 传统的手绘图像检索方法主要集中在检索相同类别的图像,忽略了手绘图像的细粒度特征。对此,提出了一种新的结合细粒度特征与深度卷积网络的手绘图像检索方法,既注重通过深度跨域实现整体匹配,也实现细粒度细节匹配。方法 首先构建多通道混合卷积神经网络,对手绘图像和自然图像分别进行不同的处理;其次通过在网络中加入注意力模型来获取细粒度特征;最后将粗细特征融合,进行相似性度量,得到检索结果。结果 在不同的数据库上进行实验,与传统的尺度不变特征(SIFT)、方向梯度直方图(HOG)和深度手绘模型Deep SaN(sketch-a-net)、Deep 3DS(sketch)、Deep TSN(triplet sketch net)等5种基准方法进行比较,选取了Top-1和Top-10,在鞋子数据集上,本文方法Top-1正确率提升了12%,在椅子数据集上,本文方法Top-1正确率提升了11%,Top-10提升了3%,与传统的手绘检索方法相比,本文方法得到了更高的准确率。在实验中,本文方法通过手绘图像能在第1幅检索出绝大多数的目标图像,达到了实例级别手绘检索的目的。结论 提出了一种新的手绘图像检索方法,为手绘图像和自然图像的跨域检索提供了一种新思路,进行实例级别的手绘检索,与原有的方法相比,检索精度得到明显提升,证明了本文方法的可行性。

关键词

手绘图像检索; 卷积神经网络; 注意力模型; 细粒度特征; 特征融合

Sketch-based image retrieval based on fine-grained feature and deep convolutional neural network
expand article info Li Zongmin1, Liu Xiuxiu1, Liu Yujie1, Li Hua2
1. College of Computer and Communication Engineering, China University of Petroleum, Qingdao 266580, China;
2. Key Laboratory of Intelligent Information Processing, Institute of Computing Technology, Chinese Academy of Sciences, Beijing 100190, China
Supported by: National Natural Science Foundation of China (61379106, 61379082, 61227802)

Abstract

Objective Content-based image retrieval or text-based retrieval has played a major role in practical computer vision applications. In several scenarios, however, retrieval becomes a problem when sample queries are unavailable or describing them with a keyword is difficult. However, compared with text, sketches can intrinsically capture object appearance and structure. Sketches are incredibly intuitive to humans and descriptive in nature. They provide a convenient and intuitive means to specify object appearance and structure. As a query modality, they offer a degree of precision and flexibility that is missing in traditional text-based image retrieval. Closely correlated with the proliferation of touch-screen devices, sketch-based image retrieval has become an increasingly prominent research topic in recent years. Conventional sketch-based image retrieval (SBIR) principally focuses on retrieving images of the same category and disregards the fine-grained feature of sketches. However, SBIR is challenging because humans draw free-hand sketches without any reference but only focus on the salient object structures. Hence, the shapes and scales in sketches are usually distorted compared with those in natural images. To deal with this problem, studies have developed methods to bridge the domain gap between sketches and natural images for SBIR. These approaches can be roughly divided into hand-crafted and cross-domain deep learning-based methods. SBIR generates approximate sketches by extracting edge or contour maps from natural images. Afterward, hand-crafted features are extracted for sketches and edge maps of natural images, which are then fed into "bag-of-words" methods to generate representations for SBIR. The major limitation of hand-crafted methods is that the domain gap between sketches and natural images cannot be well remedied because matching edge maps to non-aligned sketches with large variations and ambiguity is difficult. For this problem, we propose a novel sketch-based image retrieval method based on fine-grained feature and deep convolutional neural network. This fine-grained SBIR (FG-SBIR) approach focuses not only on coarse holistic matching via a deep cross-domain but also on explicit accounting for fine-grained detail matching. The proposed deep convolutional neural network is designed for sketch-based image retrieval. Method Most existing SBIR studies have focused on category-level sketch-to-photo retrieval. A bag-of-words representation combined with a form of edge detection from photo images is often employed to bridge the domain gap. Previous work that attempted to address the fine-grained SBIR problem is based on a deformable part-based model and graph matching. However, the definition of fine-grained in previous work is different from ours-a sketch is considered to be a match to a photo if the objects depicted look similar. In addition, these hand-crafted feature-based approaches are inadequate in capturing the subtle intra-category and inter-instance differences, as demonstrated in our experiments. Our methods are demonstrated as follows:First, we construct a multiple branch of confusing deep convolutional neural network to perform a different deal with sketch and natural image; Three different branches are used:one sketch branch and two nature image branches. The sketch branch has four convolutional and two pooling layers, whereas the natural image branch has five and two, respectively. By adding a convolutional layer to obtain abstractive natural image features, the problem of abstraction level inconsistency is solved. Different branch designs can reduce domain differences. Second, we extract detail information by adding the attention model in the neural network. Most attention models learn an attention mask, which assigns different weights to different regions of an image. Soft attention is the most commonly used model because it is differentiable and can thus be learned end-to-end with the rest of the network. Our attention model is specifically designed for FG-SBIR in that it is robust against spatial misalignment through the shortcut connection architecture. Third, we combine coarse and fine semantic information to achieve retrieval. By combining the information, we obtain robust features. Finally, we use deep triplet loss to obtain good results. The loss is defined using the max-margin framework. Result The experiment on different benchmark datasets comprises shoe and chair datasets. We use two traditional hand-crafted feature-based models, namely, scale-invariant feature transform (SIFT) and histogram of oriented gradient (HOG), apart from three other baseline models, namely, deep SaN, deep 3D, and deep TSN, which use the deep features designed for the sketch. We utilize the ratio of correctly predicting the true match at Top1 and Top10 as the evaluation metrics. We compare the performance of our full model and the five baselines. Results prove that the proposed method obtains higher retrieval precision than the traditional methods. Our model performs the best overall in each metric and in both datasets. The improvement is particularly clear at Top1, with an approximately 12% increase. In the chair dataset, we obtain an approximately 11% increase. Moreover, we obtain an approximately 3% increase at Top10. In other words, we can acquire the right result on the first image. In the proposed method, we wish to achieve instance-level retrieval. Thus, the proposed model obtains good results in the FG-SBIR task. Conclusion The proposed sketch-based image retrieval provides a new means of thinking for the cross-domain retrieval of sketch and natural images. This sketch convolutional neural network obtains good results in sketch-based image retrieval. This task is more challenging than the well-studied category-level SBIR task, but it is also more useful for commercial SBIR adoption. Achieving fine-grained retrieval across the sketch/image gap requires a deep network learned with triplet annotation requirements. We demonstrate how to sidestep these requirements in order to achieve good performance in this new and challenging task. By introducing attention modeling and the sketch convolutional neural network, the model can concentrate on the subtle differences between local regions of a sketch and photo images and compute deep features containing fine-grained and high-level semantics. The proposed sketch neural network is suitable for FG-SIBR.

Key words

sketch-based image retrieval (SBIR); convolutional neural network; attention model; fine-grained feature; feature fusion

0 引言

随着科技的发展和进步,触摸屏技术不断完善,各种触摸屏设备逐渐进入人们的生活。随着触摸屏设备的普及,逐渐衍生出一种新的图像检索方式:基于手绘图像检索,即用户在触摸屏上画出一个物体的手绘图,系统可以根据这个手绘图从海量自然图像数据库中检索出用户想要的自然图像。

传统的基于文本的图像检索需要对检索库中的图像数据进行人工标注,会耗费大量的人力。手绘图像检索(SBIR)是用户使用手机等触摸屏设备,通过画出物体的手绘图来进行检索,更方便、描述力更强。但手绘图像检索也存在一些困难:1)用户在绘制手绘图时,由于每个人对图片的理解不同,根据自己的记忆来绘制草图,含有一定的主观色彩,加上每个人的绘画风格不同,所以会导致手绘图像的二义性,存在抽象性。2)手绘图和自然图来自不同的域,手绘图由线条和空白背景组成,没有颜色纹理等信息,要进行有效的检索,需要减小二者之间的域差异;3)目前的特征描述子对手绘图的描述力不强,需要设计对手绘图描述力强的特征描述子;4)作为一个对象实例识别问题,给定一个查询草图,通常会有很多视觉上相似的候选照片,正确的匹配与错误的匹配可能仅是某些局部差异所导致。

目前比较常用的手绘图像检索方法,先对自然图像预处理,进行边缘提取[1-2],得到边缘图像,形成一种类手绘图的图像,如图 1所示,然后进行检索。这种方法很大程度上减小了手绘图像与自然图像之间的视觉鸿沟,达到跨域检索的目的,而且目前边缘提取算法较为成熟,应用效果比较好。这样得到的边缘图虽然可以看做是类手绘图像,但是与用户手绘生成的素描图之间仍然存在较大的语义差异,主要源于手绘图像的语义抽象特性。虽然手绘图像简单,但相对自然图像而言,语义级别上更为抽象。

图 1 不同方法对彩色图像的边缘检测结果
Fig. 1 Results of different edge detection methods
((a)nature image; (b)Canny edge map; (c)Berkeley edge map; (d)sketch token edge map; (e)sketch image)

针对手绘图像与自然图像相比更抽象、内容更简洁的问题,本文提出了一种解决思路:针对手绘图像和自然图像分别设计不同的网络进行处理,得到抽象性尽可能相同的特征图。对于卷积神经网络,卷积是特征提取的过程,卷积越多,提取的特征越抽象、越丰富。按照这个思路和卷积神经网络的特点,本文设计了一种多分支混合网络模型,网络采用了3分支网络:2条自然图像分支,1条手绘图像分支,其中自然图像分支的卷积层比手绘图像分支的卷积层多1层,提取到与手绘图像抽象性相似的特征,这是网络的上层,解决手绘图像和自然图像抽象性不同的问题。网络的下层是两分支权值共享的siamese网络[3],加入注意力模型(attention model),提取细粒度特征,进一步提高检索精度。

1 相关工作

1.1 手绘图像检索

长期以来,基于内容的图像检索一直是计算机视觉研究的一个问题,尽管增强了各种查询和交互模式,但主要研究焦点仍然停留在基于文本的查询上。用文字描述复杂物体的外观很麻烦,而用简单的手绘草图可以表达许多文字,提供了一种更具表现力的图像搜索手段。基于手绘图的图像检索技术从20世纪90年代开始起步,早期的方法主要集中在特征上,尽管取得了一些成功[4-5],但只能用于相对准确的草图。Hu等人[6]对SBIR上传统的特征描述符的性能进行了比较全面的实验,发现现有的描述符仍然存在跨域的限制。

为了解决手绘检索的图像跨域匹配问题,Cao等人[7]采用IOCM(inner & outer chord matrix)描述子,使用倒排索引结构进行检索,解决了手绘图像在百万级图像库中检索的准确性和实时性问题。Eitz等人[8]提出一种手绘草图检索系统的评价标准和适用于轮廓图像的SHOG(sketched histogram of oriented gradients)特征,采用倒排索引结构提高检索速度及精度。Sun等人[9]通过计算向量之间的汉明距离作为相似性度量标准进行图像检索,适用于大规模图像数据检索。随着深度学习的发展,基于深度学习[10-11]的特征学习方法一直备受关注,与传统的人工方法生成特征相比,深度学习利用大量的数据学习特征,能够表达更丰富的图像信息。基于深度学习的优势,逐渐用于手绘图像的检索之中,Yu等人[12]通过深度学习框架进行跨域手绘图像检索,利用手绘图像笔画的顺序,构建多尺度多通道深度网络。针对手绘图像和自然图像跨域建模的方法,大多采用了比较新型的深度学习框架及模型。如Seddati等人[13]提出的Quardruplet network网络框架以及Bui等人[14]提出的3元损失模型框架。随着手绘检索数据集的不断增大,需要不断提高手绘检索速度以适应大数据集上的手绘检索,Liu等人[15]和Shen等人[16]都提出了一种在手绘网络中加入哈希的思想,大大提高了检索速度。

1.2 细粒度手绘图像检索

目前大多数手绘检索关注的是类级别的,输入一幅手绘图像,检索结果是具体的某一类自然图像而不能具体到某一幅图像。但在实际应用中,检索出具体某一幅图像才是大多数用户所需求的,基于这种需求逐渐产生了细粒度手绘检索的研究。

细粒度手绘检索在手绘检索的基础上,对结果要求更精细,往往通过一些细粒度特征进行检索。细粒度手绘检索首先由Li等人[17]提出,通过DPM(deformable part model)和图形匹配来实现,将姿态定义为细粒度特征进行检索。随着深度学习的发展,细粒度手绘检索问题逐渐可以通过深度学习来解决[18-19],通过学习手绘图像和自然图像共同的特征,实现跨域匹配。Wang等人[20]提出了一个深度排序模型,通过学习排序图像3元组,直接从图像中学习细粒度图像相似度。与普通手绘检索相比,细粒度手绘检索的类别区分更精细,用普通手绘数据集进行细粒度的检索效果并不好,但由于目前手绘数据集构建较为麻烦,需要人工绘制手绘图,包含的主观性较大,需要多种规则限制,工作量大。针对这些问题,Li等人[21]构建了一种细粒度手绘数据集,通过数据增强来扩展数据集,并将HOG特征、结构特征、语义特征通过3视图典型相关分析(CCA)生成联合表征,增加特征的鲁棒性。但构建的只是鞋子数据集,实验局限性大。针对这个问题,Song等人[22]构建了3个细粒度数据集,在多通道网络[12]基础上加入注意力机制并构建了新的HOLEF(high-order learnable energy function)损失,虽然精度提升了,但检索耗时增加了一倍,效率降低。

1.3 注意力模型(AM)

注意力感知方法捕捉模型在执行特定任务时应该关注位置,注意力模型广泛应用在图像分类[23-24]、图像标注[25]、图像问答[26]、视频动作识别[27]等视觉领域。在视觉领域中存在各种类型的注意力模型,软注意模型是最常用的一种,可以与网络的其他部分进行端到端的学习。大多数软注意模型学习的是一个注意掩码,它为图像的不同区域分配不同的权重。注意力越高的地方,权重越大。在图像标注方面,Xu等人[28]提出了图像标注的两种注意力方式:由增强学习训练的“硬”注意机制和由标准反向传播方法训练的“软”注意机制。除了使用软注意机制和硬注意机制得到不同的图像标注效果外,还可以采用多种注意力模型叠加的方式进行处理,Yang等人[29]构建堆叠式注意网络,采取多个步骤逐步将注意力集中在相关区域,并为图像问答带来更好的答案。Sharma等人[27]提出了一种基于软注意的动作识别模型,该模型使用具有长时间短记忆(LSTM)[30]单元的递归神经网络来获得空间和时间信息。本文将注意力模型加入到手绘图像检索网络中,在全局特征的基础上加入细粒度特征,从而实现更精细的检索。Laskar等人[31]提出了一种空间注意力模型来提高对图中目标的注意力,增强显著性。

2 本文方法

针对手绘图像检索面临的挑战,即手绘图像与自然图像之间的视觉鸿沟,本文的最终目标是在同一视觉域中计算自然图像与手绘图像特征之间的距离,进行细粒度图像检索。为了提高检索精度,解决自然图像与手绘图像相比更复杂的问题,提出了一种深度混合卷积神经网络(MSCNN),整体流程如图 2所示。其中,网络可以分为两部分:第1部分是1个3分支的卷积神经网络,分别是1条手绘图像网络分支和2条自然图像网络分支;第2部分是加入了注意力模型的2分支权值共享的卷积神经网络,通过加入注意力机制来提取细粒度特征。全局特征和细粒度特征组合得到最终的深度特征,最后对特征进行相似性度量获得检索结果。

图 2 本文方法框架图
Fig. 2 Framework of the proposed model

2.1 MSCNN

手绘图由用户勾勒的线条和空白背景组成,抽象性强,特征集中在边缘轮廓上,没有色彩和纹理等复杂特征,受背景干扰度小。而在庞大的图像数据库中,图像由彩色像素组成,不仅有色彩和纹理等复杂特征,背景也很复杂。所以与手绘图相比,自然图像在特征提取上更复杂、更困难。如果用同一个网络结构对手绘图像和自然图像进行特征提取,提取出的手绘图像的特征会比自然图像的特征更抽象,导致手绘图像和自然图像的跨域检索问题处理起来会有很大的困难。针对这个问题,本文提出了一种用不同的网络结构对手绘图像和自然图像分别处理的思想。

首先输入3幅图像:手绘图像、正样本自然图像和负样本自然图像。组成3元组图像对{$(\mathit{\boldsymbol{s}}_{i}, \mathit{\boldsymbol{p}}^{+}_{i}, \mathit{\boldsymbol{p}}^{-}_{i})$}$^{N}_{i=1}$,其中正样本自然图像与手绘图像的相似度大于负样本自然图像与手绘图像的相似度。将这3幅图像分别输入不同的分支中,手绘图像分支Net_S由4层卷积层和2层池化层组成,自然图像分支Net_N由5层卷积层和2层池化层组成。随着卷积层数的增加,特征的抽象性增大,对于自然图像,需要提取更抽象的特征与手绘特征进行匹配。所以在Net_N的第4层增加了1层卷积层,在不影响输出特征图大小的前提下,提高输出特征的抽象性,准确率提升1%,但如果继续增加卷积层,准确率反而下降,所以本文选择仅增加了1层。网络上层的具体参数如表 1所示,其中第1层卷积使用15×15像素的卷积核,由于手绘图像缺少纹理信息,用较大一些的卷积核更适合草图建模,有助于捕获更多的结构化上下文信息,所以在网络中使用15×15的滤波器。在池化层中,传统的卷积神经网络(CNN)采用的最大池是2×2大小、步长为2,池化窗口没有重叠。为了提高准确性,使辨识度更高,对池化层进行重叠[10],采用3×3大小、步长为2的最大池,不需要额外的计算量,且能带来1%的改进。

表 1 多分支注意力网络上层的参数
Table 1 Configuration of the top multi-branch network

下载CSV
网络 输入类型 滤波器大小 步长 扩充边缘 输出/像素
Net_S
手绘图像
输入 255×255
L1 卷积 15×15 3 0 64×71×71
池化 3×3 2 0 64×35×35
L2 卷积 5×5 1 0 128×31×31
池化 3×3 2 0 128×15×15
L3 卷积 3×3 1 1 256×15×15
L4 卷积 3×3 1 1 256×15×15
Net_N自然图像 L1 卷积 15×15 3 0 64×71×71
池化 3×3 2 0 64×35×35
L2 卷积 5×5 1 0 128×31×31
池化 3×3 2 0 128×15×15
L3 卷积 3×3 1 1 256×15×15
L4 卷积 3×3 1 1 256×15×15
卷积 3×3 1 1 256×15×15

2.2 注意力模型(AM)

在手绘图检索中,检索出的结果通常有很多候选自然图像,这些图像有些与目标图像相似,有些差距很大,如图 3所示。

图 3 部分自然图像检索结果
Fig. 3 Retrieval results of the photo
((a)sketch image; (b)retrieval results)

图 3(a)是输入的手绘图像,图 3(b)是检索出的3幅自然图像。从图 3可以看出,检索出的第1、第3幅自然图像与手绘图像相似,绿色方框中的第2幅图像与目标图像差距很大,其中红色区域是检索误差最大的部分。出现这种现象最主要的原因是局部区域的检索失误。手绘图像具有二义性,对同一对象,不同人绘制的手绘图像是不同的。手绘图像是由用户勾勒的一些简单线条组成的,由于带有主观色彩,一些局部线条的偏移可能会导致最终检索结果的失误。如何提取这些局部细粒度特征是解决这个问题的关键,本文使用注意力模型(AM)来解决这个问题。AM通过提取检索任务中的感兴趣区域,获取局部区域的细粒度特征,进一步提高检索精度,减小局部区域的检索误差。

本文网络框架中的注意力模型采用软注意范式,软注意模块将特征图作为输入并生成注意掩码,然后使用该掩码重新对输入特征图进行加权来获得注意力特征图,该特征图被输入到网络的下一层。在模型中,注意力模块被添加到每个网络分支的第5层卷积层和池化层之后。其中注意力特征图与中间特征图相结合而不是与输入图像相结合,主要原因有两个:

1) 注意力特征图的高度和宽度与图像特征图相同,在CNN中,特征图的高度和宽度均小于输入图像的高度和宽度,并且预测较小注意力特征图的任务更简单。

2) 将注意力特征图与输入图像组合会导致图像出现额外的假边缘,这可能导致通过较低层的错误响应。在低级特征提取后使用特征映射可以避免这种影响。

注意力模型的整体结构如图 4所示。

图 4 注意力模型(AM)结构
Fig. 4 Attention model architecture

具体而言,定义$ \mathit{\boldsymbol{f}}_{i}∈{\bf R}^{H×W×C}$是第$i$幅图像的特征图,$H$、$W$、$C$分别是特征映射的高度、权重和通道数。在注意力模型中,包含两层卷积核大小为1×1像素的卷积层,在通道数不变的情况下,减少参数量,增加非线性变换。在第1步中,特征图通过1×1大小的卷积核映射到掩码$m_{i}∈{\bf R}^{H×W×1}$,然后掩码$m_{i}$通过softmax层,输出$ \mathit{\boldsymbol{p}}_{i}$,定义为

$ p_{i}(h, w)=\frac{\mathrm{e}^{m_{i}(h, w)}}{\sum\limits_{h=1}^{H} \sum\limits_{w=1}^{W} \mathrm{e}^{m_{i}(h, w)}} $ (1)

式中,$m_{i}(h, w)$和$p_{i}(h, w)$分别表示矩阵$ \mathit{\boldsymbol{m}}$和矩阵$ \mathit{\boldsymbol{p}}$的第$h$行和第$w$列中的值。$ \mathit{\boldsymbol{p}}_{i}$中的元素形成一个概率分布,其中$p_{i}(h, w)>0$, $∑p_{i}(h, w)=1$。

2.3 损失函数

在本文中,手绘图像$ \mathit{\boldsymbol{s}}_{i}$与自然图像$ \mathit{\boldsymbol{p}}_{i}$之间的特征距离的度量方式是欧氏距离。损失函数定义为

$ L=\arg \min \sum\limits_{i}\left(d\left( \mathit{\boldsymbol{s}}, \mathit{\boldsymbol{p}}^{+}\right)-d\left( \mathit{\boldsymbol{s}}, \mathit{\boldsymbol{p}}^{-}\right)+T\right) $ (2)

式中,$ \mathit{\boldsymbol{s}}$表示手绘图像,$ \mathit{\boldsymbol{p}}^{+}$表示正样本自然图像,$ \mathit{\boldsymbol{p}}^{-}$表示负样本自然图像,$T$表示特定阈值,$d(·, ·)$度量的是两个图像特征向量的欧氏距离的大小。

3 实验分析与结果

3.1 实验环境

实验在MATLAB2015和Tensor-Flow1.0平台上进行。

3.2 基准数据库

在QMUL-Shoe和QMUL-Chair[18]两个数据库上对本文方法进行评估,这两个数据库分别包含419对鞋子手绘—自然图像对和297对椅子手绘—自然图像对。分别用QMUL-Shoe中的304个和QMUL-Chair中的200个手绘—自然图像对进行训练,剩余的图像对用于测试。分别产生13 680个QMUL-Shoe训练样例和9 000个QMUL-Chair训练样例。在进行实验之前,使用边缘强度来裁剪自然图像和手绘图像,然后将所有裁剪的自然图像和手绘图像调整为256×256像素。

3.3 实验对比方法

为验证本文提出的MSCNN方法的有效性,选择了2种普通特征和3种深度特征进行比较。普通特征包括SIFT和HOG,其中HOG特征经常用于手绘图像识别和手绘图像检索问题,是在深度特征出现之前最常用的一种手绘特征。3种深度特征包括Deep SaN[12],Deep 3DS[29]和Deep TSN[18],其中Deep SaN方法通过Sketch-a-Net[12]提取手绘图像和自然图像的特征,Deep 3DS使用的是Yang等人[29]最新提出的用来提取特征的深度网络,与本文的任务和模型存在一定程度的相似,但它是针对类级别的检索,而本文是针对样例级别的检索。Deep TSN是针对SBIR首次提出的端对端的深度模型,使用的是3分支权值共享的网络模型。

3.4 评价标准

本文采用Top-1准确率和Top-10准确率作为评价标准。

3.5 实验分析

根据评价标准进行对比实验,不同方法在QMUL-Shoe和QMUL-Chair两个数据库上的准确率对比如表 2表 3所示。

表 2 不同方法在QMUL-Shoe上的准确率对比
Table 2 Comparative results on QMUL-Shoe

下载CSV
/%
方法 Top-1准确率 Top-10准确率
SIFT 15.27 66.10
HOG 17.39 67.83
Deep SaN 20.00 62.61
Deep 3DS 5.22 21.74
Deep TSN 52.17 92.17
MSCNN 63.69 95.85
注:加粗字体表示最优结果。

表 3 不同方法在QMUL-Chair上的准确率对比
Table 3 Comparative results on QMUL-Chair

下载CSV
/%
方法 Top-1准确率 Top-10准确率
SIFT 20.62 59.31
HOG 28.87 67.01
Deep SaN 42.42 82.47
Deep 3DS 6.19 26.80
Deep TSN 72.16 98.96
MSCNN 82.73 96.82
注:加粗字体表示最优结果。

表 2表 3可以看出,基于深度特征方法的效果明显优于基于传统特征方法的效果。但是Deep 3DS的效果却比传统特征方法差,主要是因为Deep 3DS是针对3维模型的方法,而所用的自然图像是通过3维模型的2维投影得到的。

自然图像与真实图像之间会有一定程度的误差,而细粒度检索需要对局部区域进行精准匹配,所以Deep 3DS不适合细粒度手绘检索的任务。MSCNN先通过3分支网络对手绘图像和自然图像分别处理,然后将特征图输入到加入AM的2分支权值共享网络进行局部关注度增强,进而提高局部区域的匹配精度,效果明显优于其他方法,尤其是Top-1准确率,在两个数据集上比其他方法至少提高了9%。因为本文方法是针对实例级别的手绘检索提出的,希望检索出的第1幅自然图像就是目标图像,所以在Top-1上的优势体现的更明显,说明本文方法更有效。

表 4是本文方法加入注意力模型和不加注意力模型分别在QMUL-Shoe和QMUL-Chair上的Top-1准确率。

表 4 注意力模型在不同数据集上的效果
Table 4 Contributions of the attention model on different databases

下载CSV
/%
方法 QMUL-Shoe QMUL-Chair
MSCNN(不加AM) 58.10 78.23
MSCNN(加AM) 63.69 82.73
注:加粗字体表示最优结果。

图 5是采用本文方法对QMUL-Shoe和QMUL-Chair数据集的手绘图像检索效果。图 5(a)是输入的手绘图像,图 5(b)是检索出的Top-6自然场景图像,其中红色框中的自然图像为目标图像。根据检索结果发现,用本文方法进行检索,目标图像能在第1幅或第2幅图像中检索出来,能很好地实现根据用户输入的手绘图像进行实例级检索的任务。在检索速度上,检索一次需要大约30 ms,与已有的手绘检索方法的检索速度基本一致。本文方法在提升手绘检索精度的基础上,没有降低检索速度,是可行有效的。

图 5 本文方法的检索结果
Fig. 5 Retrieval results of proposed model ((a)sketch images; (b)retrieval results)

4 结论

针对手绘图像检索提出了一种混合式的卷积神经网络,很好地实现了细粒度手绘图像检索,为手绘图像和自然图像的跨域检索提供了一种新思路。实验展示了本文方法在QMUL-Shoe和QMUL-Chair数据集上的检索准确率。与原有的手绘检索方法相比,Top-1分别提升了9%和10%,检索精度得到明显提升, 设置了消融实验,加入注意力机制后检索精度提高约5%,并且从前6幅检索到的自然图像可以看出,目标图像能在第1幅或第2幅检索出来,证明了本文方法的可行性。

但在QMUL-Chair的Top-10准确率中,检索结果降低,主要是因为本文方法针对的是实例级别的检索,目的是在第1幅图像中检索出目标图像,所以更注重局部精度。同时,由于每个人的绘画风格不同,局部的错误可能会导致最终检索结果出错,椅子的线条少,部分用户绘画时,局部的偏移会导致检索结果发生很大变化。

未来主要工作是继续研究手绘检索的新方法,改进手绘检索网络,不仅仅局限于个别的数据集,提高细粒度手绘网络的适用性,进一步提高检索速度。

参考文献

  • [1] Canny J. A computational approach to edge detection[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 1986, PAMI-8(6): 679–698. [DOI:10.1109/TPAMI.1986.4767851]
  • [2] Martin D R, Fowlkes C C, Malik J. Learning to detect natural image boundaries using local brightness, color, and texture cues[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2004, 26(5): 530–549. [DOI:10.1109/TPAMI.2004.1273918]
  • [3] Zagoruyko S, Komodakis N. Learning to compare image patches via convolutional neural networks[C]//Proceedings of 2017 IEEE Conference on Computer Vision and Pattern Recognition, 2015: 4353-4361.[DOI: 10.1109/CVPR.2015.7299064]
  • [4] Eitz M, Hildebrand K, Boubekeur T, et al. A descriptor for large scale image retrieval based on sketched feature lines[C]//The 6th Eurographics Symposium on Sketch-Based Interfaces and Modeling. New Orleans, Louisiana: ACM, 2009: 9-36.[DOI: 10.1145/1572741.1572747]
  • [5] Hu R, Barnard M, Collomosse J. Gradient field descriptor for sketch based retrieval and localization[C]//Proceedings of 2010 IEEE International Conference on Image Processing. Hong Kong, China: IEEE, 2010: 1025-1028.[DOI: 10.1109/ICIP.2010.5649331]
  • [6] Hu R, Collomosse J. A performance evaluation of gradient field HOG descriptor for sketch based image retrieval[J]. Computer Vision and Image Understanding, 2013, 117(7): 790–806. [DOI:10.1016/j.cviu.2013.02.005]
  • [7] Cao Y, Wang C H, Zhang L Q, et al. Edgel index for large-scale sketch-based image search[C]//CVPR 2011. Colorado Springs, CO: IEEE, 2011: 761-768.[DOI: 10.1109/CVPR.2011.5995460].
  • [8] Eitz M, Hildebrand K, Boubekeur T, et al. Sketch-based image retrieval:benchmark and bag-of-features descriptors[J]. IEEE Transactions on Visualization and Computer Graphics, 2011, 17(11): 1624–1636. [DOI:10.1109/TVCG.2010.266]
  • [9] Sun X H, Wang C H, Xu C, et al. Indexing billions of images for sketch-based retrieval[C]//Proceedings of the 21st ACM International Conference on Multimedia. Barcelona, Spain: ACM, 2013: 233-242.[DOI: 10.1145/2502081.2502281]
  • [10] Krizhevsky A, Sutskever I, Hinton G E. ImageNet classification with deep convolutional neural networks[C]//Proceedings of the 25th International Conference on Neural Information Processing Systems. Lake Tahoe, Nevada: ACM, 2012: 1097-1105.[DOI: 10.1145/3065386]
  • [11] Szegedy C, Liu W, Jia Y Q, et al. Going deeper with convolutions[C]//Proceedings of 2015 IEEE Conference on Computer Vision and Pattern Recognition. Boston, MA, USA: IEEE Computer Society Press, 2015: 1-9.[DOI: 10.1109/CVPR.2015.7298594]
  • [12] Yu Q, Yang Y X, Song Y Z, et al. Sketch-a-net that beats humans[C]//Proceedings of the British Machine Vision Conference, 2015: 7.1-7.12.[DOI: 10.5244/c.29.7]
  • [13] Seddati O, Dupont S, Mahmoudi S. Quadruplet networks for sketch-based image retrieval[C]//Proceedings of 2017 ACM on International Conference on Multimedia Retrieval. Bucharest, Romania: ACM Press, 2017: 184-191.[DOI: 10.1145/3078971.3078985]
  • [14] Bui T, Ribeiro L, Ponti M, et al. Generalisation and sharing in triplet convnets for sketch based visual search[EB/OL].[2018-08-20]. https://arxiv.org/pdf/1611.05301.pdf.
  • [15] Liu L, Shen F M, Shen Y M, et al. Deep sketch hashing: fast free-hand sketch-based image retrieval[C]//Proceedings of 2017 IEEE Conference on Computer Vision and Pattern Recognition. Honolulu, HI, USA: IEEE, 2017: 2298-2307.[DOI: 10.1109/CVPR.2017.247]
  • [16] Shen Y M, Liu L, Shen F M, et al. Zero-shot sketch-image hashing[C]//Proceedings of 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Salt Lake City, UT, USA: IEEE, 2018: 3598-3607.[DOI: 10.1109/CVPR.2018.00379]
  • [17] Li Y, Hospedales T M, Song Y Z, et al. Fine-grained sketch-based image retrieval by matching deformable part models[C]//Proceedings of British Machine Vision Conference, 2014: 1-12. http://www.eecs.qmul.ac.uk/~tmh/papers/li2014sbirDpm.pdf
  • [18] Sangkloy P, Burnell N, Ham C, et al. The sketchy database:learning to retrieve badly drawn bunnies[J]. ACM Transactions on Graphics, 2016, 35(4): #119. [DOI:10.1145/2897824.2925954]
  • [19] Yu Q, Liu F, Song Y Z, et al. Sketch me that shoe[C]//Proceedings of 2016 IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas, NV: IEEE, 2016: 799-807.[DOI: 10.1109/CVPR.2016.93]
  • [20] Wang J, Song Y, Leung T, et al. Learning fine-grained image similarity with deep ranking[C]//Proceedings of 2014 IEEE Conference on Computer Vision and Pattern Recognition. Columbus, OH, USA: IEEE, 2014: 1386-1393.[DOI: 10.1109/CVPR.2014.180]
  • [21] Li K, Pang K Y, Song Y Z, et al. Fine-grained sketch-based image retrieval: the role of part-aware attributes[C]//Proceedings of 2016 IEEE Winter Conference on Applications of Computer Vision. Lake Placid, NY, USA: IEEE, 2016: 1-9.[DOI: 10.1109/WACV.2016.7477615]
  • [22] Song J F, Yu Q, Song Y Z, et al. Deep spatial-semantic attention for fine-grained sketch-based image retrieval[C]//Proceedings of 2017 IEEE International Conference on Computer Vision. Venice, Italy: IEEE, 2017: 5552-5561.[DOI: 10.1109/ICCV.2017.592]
  • [23] Mnih V, Heess N, Graves A, et al. Recurrent models of visual attention[C]//Proceedings of the 27th International Conference on Neural Information Processing Systems. Montreal, Canada: ACM, 2014. https://arxiv.org/abs/1406.6247
  • [24] Sermanet P, Frome A, Real E. Attention for fine-grained categorization[EB/OL].[2018-08-20]. https://arxiv.org/pdf/1412.7054.pdf.
  • [25] Lu J S, Xiong C M, Parikh D, et al. Knowing when to look: adaptive attention via a visual sentinel for image captioning[C]//Proceedings of 2017 IEEE Conference on Computer Vision and Pattern Recognition, 2017: 3242-3250.[DOI: 10.1109/CVPR.2017.345]
  • [26] Fukui A, Park D H, Yang D, et al. Multimodal compact bilinear pooling for visual question answering and visual grounding[EB/OL].[2018-08-20]. https://arxiv.org/pdf/1606.01847.pdf.
  • [27] Sharma S, Kiros R, Salakhutdinov R. Action recognition using visual attention[EB/OL].[2018-08-20]. https://arxiv.org/pdf/1511.04119.pdf.
  • [28] Xu K, Ba J, Kiros R, et al. Show, attend and tell: neural image caption generation with visual attention[C]//Proceedings of the 32nd International Conference on Machine Learning, 2015: 2048-2057. https://arxiv.org/abs/1502.03044
  • [29] Yang Z C, He X D, Gao J F, et al. Stacked attention networks for image question answering[C]//Proceedings of 2016 IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas, NV, USA: IEEE, 2016: 21-29.[DOI: 10.1109/CVPR.2016.10]
  • [30] Sundermeyer M, Schlüter R, Ney H. LSTM neural networks for language modeling[C]//Proceedings of the 13th Annual Conference of the International Speech Communication Association. Portland, OR, USA: ISCA, 2012: 601-608. https://blog.csdn.net/qq_32113189/article/details/79475049
  • [31] Laskar Z, Kannala J. Context aware query image representation for particular object retrieval[C]//Proceedings of the 20th Scandinavian Conference. Tromsø, Norway: Springer, 2017: 88-99.[DOI: 10.1007/978-3-319-59129-2_8]