When given a query image of an object, we are interested in finding images containing the same object from a large-scale database based on Content-based image retrieval (CBIR). The key step of CBIR is to generate an image representation, which involves aggregating patch-level feature descriptors into a single fixed-length image-level vector. Most state-of-the-art representations are based on hand-crafted features (e.g. SIFT 2] features.
The pioneer image representation model based on hand-crafted features is bag-of-word (BoW) , which maps each feature into a visual word and consequently represents an image as a high-dimensional sparse vector. BoW makes a celebrated success in CBIR, and numerous works [4, 5, 6, 7, 8] adopt this model for the purpose of searching similar images. Although BoW has attracted great attention, it suffers two major drawbacks on large-scale retrieval: search efficiency and memory cost [9, 10]. An alternative solution is to aggregate local descriptors into a mid-size vector, e.g. Fisher vectors , Vector of locally aggregated descriptors , and etc [12, 13].
Recently, the focus of image retrieval has shifted from hand-crafted features to CNN-based ones since the discriminative power of the latter are much stronger. Early works [14, 15, 16] consider the outputs of last fully-connected layer as global representations. After that, most recent works with superior performances, such as SPoC , R-MAC  and CroW 
, overall first employ the outputs of deep convolutional layer as local features, and then aggregate them into the global representation. Specifically, SPoC leverages centering prior to aggregate features output from the last convolutional layer with sum-pooling. It’s worth noting the assumed centering prior that RoI is located at the geometric center of an image is probably not true for many images. Simply speaking, R-MAC first derives representations for image regions by performing max-pooling on the convolutional layer activations over the corresponding regions, and then calculates the image representation by aggregating region vectors with sum-pooling. Similar to SPoC, CroW also favors sum-pooling to directly aggregate convolutional layer features. The major difference between them is CroW employs a more effective cross-dimensional weighting strategy to weight deep features. In more detail, besides performing spatial-wise weighting on feature maps, CroW also employs a channel-wise weighting to jointly boost discriminative power of features.
In this paper, we present an unsupervised deep feature weighting method to improve image representations. Our method is somewhat similar to CroW as we both perform spatial- and channel-wise weighting for each feature, but there are at least two distinct differences between them. First, our spatial weighting strategy, which extends SPoC by adaptively determining the center point of RoI, assigns larger weights to RoI features with an adaptive Gaussian (aGaussian) filter, while CroW leverages aggregated spatial response map to compute spatial-wise weight for each feature. Second, the proposed element-value sensitive channel (eChannel) weighting strategy obtains channel weights based on aggregating the product values of feature maps and aGaussian, while CroW derives channel weights with the sparsity of feature maps. To summarize, our contributions are two-fold:
We design a strategy to adaptively determine the center point of RoI, and then incorporates this prior into Gaussian filter for assigning larger weights to RoI features.
We design an eChannel weighting vector by aggregating the product values of feature maps and aGaussian for easing the intra-image visual burstiness .
The organization of this paper is as follows. We review recent advances of CBIR, and outline our contributions in this section. Section 2 describes our two weighting strategies in detail. We support our method by extensive experiments in Section 3. Finally, we conclude our paper briefly in Section 4.
Let be the feature tensor extracted from the deep convolutional layer, which consists of feature maps (each having width and height ). Let and denote the spatial weighting matrix and the channel weight vector, respectively. We summarize the aggregation framework in Algorithm 1, where denotes element-wise product between vectors. In the following, we discuss our strategies of obtaining and in detail.
2.2 Adaptive Gaussian filter for spatial weighting
For effective object retrieval, it is better to pay more attention to RoI. In other words, The aggregation process should distinguish features of RoI and cluttered regions by assigning different weights to them:
denotes the weighting function. This function should assign large weights to RoI, and small weights to other regions. Accordingly, the probability density of Gaussian distribution can be selected for the purpose:
denote the standard deviation and center (mean value) of Gaussian distribution, respectively. For, we can set it to be the half distance between the geometrical center of the feature map and the farthest boundary.The problem arising here is how to determine .
To determine , we first introduce the matrix of aggregated response from all channels per spatial location:
As an important finding, we notice contains the semantic information of the raw image. Fig.1 displays heat maps of for some randomly selected images, where high and low values are denoted in red and blue, respectively. It clearly shows the large responses of correspond to salient regions. We sort out all regions and assign geometrical center of top large responses to be the center of Gaussian distribution. Therefore, the center can be adaptively selected by .
Fig.1 shows geometrical centers obtained with three different values. As displayed in Fig.1, centers determined by the top 10% large responses are more agreed with human vision perception. Besides, experiment results will further show that can give promising performance.
2.3 Element-value sensitive channel weighting
BoW is a classical model for CBIR, where retrieval accuracy can be effectively boosted by inverse document frequency (idf) weighting. In the domain of deep feature based CBIR, different filters usually activate different semantic content and generate corresponding feature maps. Inspired by the success of idf weighting, we want to differentiate channels in an image (Note that the standard idf weighting in the case of BoW is computed on a database) and expect that channels with small aggregated values of feature maps are boosted. Accordingly, it is necessary to design channel weighting for deep convolutional features.
Kalantidis et.al  proposed a channel weighting strategy based on the sparsity of feature maps. However, a feature map is a real-value but not a binary matrix. The element-value on each spatial location denotes the intensity of activation of the filter, therefore the sparsity does not make full use of all available information. Here, we propose a method to derive a new channel weighting based on element-value. It is expected that similar images will have similar Gaussian filter responses for a given feature. For each channel, the item can be calculated as follows:
Obviously, the term is computed by summing the element-value of each feature map after Gaussian filtering.
To compare with sparsity-sensitive weighting, we concatenate all into a dimensional vector . Fig.3
displays the pair-wise correlation of different vectors for all the images from the query set of the Paris6K dataset. This dataset contains 55 images, where each 5 images corresponds to a landmark of Paris and therefore images can be classified into 11 classes. As shown in Fig.3, both sparsity sensitive (Fig.3a) and our element-value sensitive vectors (Fig.3b) are highly correlated for images of a same landmark, but vectors computed by our strategy are less correlated than ones computed by the sparsity for images of different landmarks. Therefore, the information of the element-value sensitive vector is more discriminative than that of the sparsity sensitive vector. Besides, the feature with small average element-value could provide important information if, for example, only a small part of features have small average element-values for images in the same class. Hence, the element-value related term is used to replace the sparsity to compute channel weight as follows:
where a small constant is added for numerical stability.
As the BoW model, deep convolutional features also suffer from the problem of visual burstiness . The introduction of channel weighting can alleviate this issue. Actually, channels with large average aggregated values correspond to CNN filters that give large response in many image regions. This implies there are some visual elements, which are spatial recurring and can negatively affect the retrieval accuracy. In our method, small weights can be assigned to channels of such bursty CNN filters. Experiment results will illustrate its effectiveness for image retrieval.
3.1 Experimental Setting
Our method is evaluated on five benchmark datasets, i.e., Oxford5K  ( building photos with queries including landmarks), Paris6K  ( building photos with queries including landmarks), Oxford105K, Paris106K, and INRIA Holidays  ( holiday photos with queries). Oxford105K and Paris106K are the extensions of Oxford5K  and Paris6K  respectively, by adding other distracted K images collected from Flickr. We employ the standard protocol consisting with other methods, i.e, using the cropped queries in Oxford5K(105K) and Paris6K(106K), adopting upright version of the images in Holidays. All deep features are extracted from the pool5 layer of the VGG16 
pre-trained in ImageNet, so the number of channels is. The retrieval performance is measured by the mean Average Precision (mAP), which is defined as the average percentage of same class images in all retrieved images after evaluating all queries. Additionally, to fairly compare with other methods, we learn whitening parameters on Paris6K when testing on Oxford5K(105K), learn whitening parameters on Oxford5K when testing on Paris6K(106K) and INRIA Holidays.
3.2 Impact of the parameter
The proposed method has only one parameter that need to be evaluated, i.e., , determining the center of the spatial weighting matrix. In Section 2.2, we mentioned the large responses of correspond to salient regions. However, ”large” is a vague concept. Someone may think top responses in are large, while others may think top 50% responses in are large. As different values of would lead to different geometrical centers of the spatial weighting matrix, we empirically determine the value of in practice.
Table 1 shows the retrieval performance of Oxford5K  in selecting different values of . In this experiment, we only apply aGaussian weighting without the eChannel weighting. According to Table 1, the excellent retrieval performance can be preserved when is between 10% and 20%. While the retrieval performance begins to fall when is larger than 50%. Therefore, considering the trade-off between retrieval efficiency and accuracy, we empirically set , which is also consistent with the results shown in Fig.1.
3.3 Impact of different weighting schemes
In our method, the aGuassian and eChannel weighting strategies are proposed to co-weight the deep convolutional features, and their effectiveness should be verified by the experiment. For spatial weighting, we compare the aGuassian weighting with the normal Gaussian (nGaussian) weigthing, which corresponds the aGaussian weighting with . For channel weighting, we compare the eChannel weigthing with the sparsity channel (sChannel) weighting. As the spatial and channel weight are independently, they can be individually or simultaneously applied to deep convolutional features. Six groups of weighting combination are tested on Oxford5K under different for image retrieval. Fig.4 displays the retrieval accuracy for these groups of combination. As we can see, both aGaussian and eChannel weighting can improve the accuracy of image retrieval. What’s more, the combination of them can further contribute to the improvement of retrieval accuracy. Therefore, both the proposed weighting are validated for the aggregation of convolutional features.
3.4 Comparison with the-state-of-the-art
Table 2 compares the retrieval performance of the proposed method with several relevant methods without fine-tuning, namely CroW , Neural code , R-MAC , SPoC  and Razavian et al . As shown, we compare them on five benchmark datasets with different dimensions. According to the table, our method can achieve overall the best performance among the compared methods. Particularly, in the datasets of Oxford5K(105K) and Holidays, the proposed method is at least accurate compared with the other methods using dimensional features. Fig. 5 illustrates several randomly selected retrieval results of the Paris6K.
|Neural code ||512||–||55.7||–||52.2||78.9|
|Neural code ||256||–||55.7||–||52.4||78.9|
|Neural code ||128||–||55.7||–||52.3||78.9|
We also compare our method with a fine-tuned method NetVLAD . According to Table 2, one can find that our method outperforms NetVLAD on all the test datasets with diverse dimensions by a significant margin. When comparing with the best reported results of other very recent two fine-tuning works [23, 24], our results seem not optimal. However, these fine-tuning methods [22, 23, 24] heavily rely on manual annotation and training correction. Therefore, advantages of our method can be further highlighted for the problems where the fine-tuning methods cannot work well.
In this paper, we propose an unsupervised aggregation method for image retrieval using convolutional features. The key characteristics is that we design an adaptive Gaussian filter and an element-value sensitive channel vector to co-weight deep convolutional features extracted from the pre-trained CNN. The former can highlight the retrieval objects of the image and the latter can ease the burstiness phenomenon in deep local features. We analyze the motivation of these weighting schemes and prove their effectiveness by experiments.
Experiments on five benchmark datasets demonstrate our method outperforms other very recent aggregation methods based on off-the-shelf deep features without needing a long dimension vector to represent each image. It is worth noting our unsupervised aggregation method is quite suitable and effective under the situation where the related training dataset is difficult to collect and the retrieval dataset is quite large which requires a lot of storage space.
This work was supported by National Natural Science Foundation of China (NSFC) (Grant Nos. 61603289 and 61573273); China Postdoctoral Science Foundation (Grant No. 2016M602823); Postdoctoral Science Foundation of Shaanxi; and Fundamental Research Funds for the Central Universities (Grant No. xjj2017118).
-  Lowe DG, “Distinctive image features from scale-invariant keypoints,” IJCV, 2004.
-  Krizhevsky A, Sutskever I, and Hinton GE, “Imagenet classification with deep convolutional neural networks,” in NIPS, 2012.
-  Sivic J and Zisserman A, “Video google: A text retrieval approach to object matching in videos,” in ICCV, 2003.
-  Philbin J, Chum O, Isard M, Sivic J, and Zisserman A, “Object retrieval with large vocabularies and fast spatial matching,” in CVPR, 2007.
-  Philbin J, Chum O, Isard M, Sivic J, and Zisserman A, “Lost in quantization: Improving particular object retrieval in large scale image databases,” in CVPR, 2008.
-  Jégou H, Douze M, and Schmid C, “Improving bag-of-features for large scale image search,” IJCV, 2010.
-  Pang S, Xue J, Tian Q, and Zheng N, “Exploiting local linear geometric structure for identifying correct matches,” CVIU, 2014.
-  Arandjelović R and Zisserman A, “Three things everyone should know to improve object retrieval,” in CVPR, 2012.
-  Jégou H, Douze M, Schmid C, and Pérez P, “Aggregating local descriptors into a compact image representation,” in CVPR, 2010.
-  Li Z, Zhang X, Müller H, and Zhang S, “Large-scale retrieval for medical image analytics: A comprehensive review,” Medical Image Analysis, 2017.
-  Perronnin F, Liu Y, Sánchez J, and Poirier H, “Large-scale image retrieval with compressed fisher vectors,” in CVPR, 2010.
-  N Murray, H Jégou, F Perronnin, and A Zisserman, “Interferences in match kernels,” TPAMI, 2017.
-  Pang S, Zhang W, Zhu L, Zhu J, and Xue J, “Beyond sum and weighted aggregation: An efficient mixed aggregation method with multiple weights for image search,” in ACM’MM Thematic Workshops, 2017.
-  Babenko A, Slesarev A, Chigorin A, and Lempitsky V, “Neural codes for image retrieval,” in ECCV, 2014.
-  Gong Y, Wang L, Guo R, and Lazebnik S, “Multi-scale orderless pooling of deep convolutional activation features,” in ECCV, 2014.
-  AS Razavian, Azizpour H, Sullivan J, and Carlsson S, “CNN features off-the-shelf: an astounding baseline for recognition,” in CVPR, 2014.
-  Artem Babenko and Lempitsky V, “Aggregating local deep features for image retrieval,” in ICCV, 2015.
-  Tolias G, Sicre R, and Jégou H, “Particular object retrieval with integral max-pooling of cnn activations,” in ICCV, 2016.
-  Kalantidis Y, Mellina C, and Osindero S, “Cross-dimensional weighting for aggregated deep convolutional features,” in ECCV workshops, 2016.
-  Hervé Jégou, Matthijs Douze, and Cordelia Schmid, “On the burstiness of visual elements,” in CVPR, 2009.
-  Simonyan K and Zisserman A, “Very deep convolutional networks for large-scale image recognition,” arXiv preprint arXiv:1409.1556, 2014.
-  Arandjelovic R, Torii P, Gronatand A, Pajdla T, and Sivic J, “NetVLAD: CNN architecture for weakly supervised place recognition,” in CVPR, 2016.
-  Radenović F, Tolias G, and Chum O, “CNN image retrieval learns from BoW: Unsupervised fine-tuning with hard examples,” in ECCV, 2016.
-  Gordo A, Almazán J, Revaud J, and Larlus D, “Deep image retrieval: Learning global representations for image search,” in ECCV, 2016.