NIST: An Image Classification Network to Image Semantic Retrieval

by   Le Dong, et al.
NetEase, Inc

This paper proposes a classification network to image semantic retrieval (NIST) framework to counter the image retrieval challenge. Our approach leverages the successful classification network GoogleNet based on Convolutional Neural Networks to obtain the semantic feature matrix which contains the serial number of classes and corresponding probabilities. Compared with traditional image retrieval using feature matching to compute the similarity between two images, NIST leverages the semantic information to construct semantic feature matrix and uses the semantic distance algorithm to compute the similarity. Besides, the fusion strategy can significantly reduce storage and time consumption due to less classes participating in the last semantic distance computation. Experiments demonstrate that our NIST framework produces state-of-the-art results in retrieval experiments on MIRFLICKR-25K dataset.


page 1

page 4


Hierarchy-based Image Embeddings for Semantic Image Retrieval

Deep neural networks trained for classification have been found to learn...

Semantics Preserving Hierarchy based Retrieval of Indian heritage monuments

Monument classification can be performed on the basis of their appearanc...

VLASE: Vehicle Localization by Aggregating Semantic Edges

In this paper, we propose VLASE, a framework to use semantic edge featur...

Class-Weighted Convolutional Features for Visual Instance Search

Image retrieval in realistic scenarios targets large dynamic datasets of...

Image Retrieval And Classification Using Local Feature Vectors

Content Based Image Retrieval(CBIR) is one of the important subfield in ...

Inverted Semantic-Index for Image Retrieval

This paper addresses the construction of inverted index for large-scale ...

A Semantic Indexing Structure for Image Retrieval

In large-scale image retrieval, many indexing methods have been proposed...

1 Introduction

Image retrieval has long been a challenging task in computer vision, especially when the image amount gets continually increasing. The semantic gap between the low-level visual features and high-level semantics

[1] and the intention gap between user’s search intent and the query [3, 10] have long been a big challenge. Numerous efforts have been made to counter this significant challenge, among which the convolutional neural network (CNN) has recently demonstrated impressive progress. Due to the extensive use of CNN, a lot of networks based on CNN obtained extremely high accuracy. Therefore, we leverage a successful classification network called GoogleNet [8] to generate semantic information of input images. For us, excellent classification results is the first step of the accurate image retrieval due to the exact semantic information has significant influence on feature representation.

Figure 1: NIST framework.

In this paper, we introduce a classification network to image semantic retrieval (NIST) framework based on deep learning to learn the probability of classification results, fuse the semantic feature matrix and use the matrix to compute the similarity between multi-label images in the semantic space. Figure 1 illustrates the NIST framework of three parts. Particularly, given a query image, our goal is to use several representative dimensions and the corresponding probabilities outputing from GoogleNet to represent the semantic information. Note that each semantic concept is viewed as a class, one or more classifiers are trained from the training data. Meanwhile, we use the probability of class to evaluate the integrating degree between input image and the class of the current dimension. After generating these structured outputs from the classification network, we leverage these results to construct a semantic feature matrix contains the serial number and corresponding probability of each class. When comparing two images, we firstly choose

classes with the top highest probabilities to be a new matrix and then fuse the two matrixes by our fusion strategy to obtain a 3-dimensional matrix. Finally, we compute the similarity of two images by the semantic distance computation algorithm.

The contributions of this paper can be concluded as follows: (1) offering a train of thoughts from a convolutional neural network which efficiently process classification tasks to image semantic retrieval, designing a semantic distance computation algorithm according to semantic feature extracted from CNN; (2) proposing an efficient semantic feature. The feature matrix only uses less than 100 features to represent the semantic information of images, having significant influence on storage saving, time consumption and match efficiency. This new feature matrix can fuse with other image features to improve the retrieval accuracy.

2 Our Approach

In general, a semantic feature matrix is treated as a mapping that represents an input onto a matrix including the serial number of each class and corresponding probabilities. Assume that we are given a set of class labels , our goal is to learn a set of probabilities of each class that generates semantic feature matrix .

2.1 Classification Network

In recent years, the quality of image classification has been progressing at a dramatic pace mainly due to the advances of deep learning, more concretely convolutional networks [6]

. Among which the GoogleNet obtains a top-5 error of 6.67% on both the validation and testing data, ranking the first among other participants in the ImageNet Large-Scale Visual Recognition Challenge 2014 (ILSVRC14). In our work, we leverage the GoogleNet to train our data and obtain the classification results.

We leverage the classification results obtained from GoogleNet containing the serial number of each class ranking from 1 to 1000, and the corresponding probabilities denoted as to represent the semantic information of input image. Note that each serial number of class has a probability to represent the similar degree between input image and the current class. Giving each class an unique serial number and using the serial number sequence and corresponding probabilities to construct a 2-dimensional matrix .

2.2 Semantic Feature Extraction and Fusion

The classification results have shown the semantic information of input images, whereas some low possibility classes are insignificant to semantic representation. Chose some highest probability classes left can not only save storage, but also reduce the computation time of semantic distance. By experimental validation illustrated in Figure 2, we find that choose 60 classes may have the most desirable experiment results. So we rank the probabilities of 1000 classes, and extract top 60 highest probability classes and its corresponding probabilities to form a new matrix which compactly denotes the semantic information of images.

Serial number of classes 1 2 i 1000
Table 1: Semantic feature matrix of input images.

When comparing two images, we firstly merge the two compact semantic feature matrix to form a new 3-dimensional matrix. First, we compare the serial number of classes of two images. If the number of the same serial number between two images is less than 10, we may think these two images have low similarity thus do not need to merge and compute the similarity between them. After the first coarse filter, the process of merging the two matrix is a recursion followed by the following steps: (1) If they have the same serial number, just merge the serial number and write the corresponding probability in the second and third row in the matrix, respectively. (2) If the serial number is not the same, write the serial number in a new column vector with the probability in the corresponding row for which image has this serial number. And write the probability with 0 in the row for which image does not have this serial number of class. (3) For each serial number, repeat the second and third step.

2.3 Semantic Distance Computation

After the process of fusing two compared images, we get a matrix containing the serial number and corresponding probabilities of these 60 classes. Our fusion strategy may bring some probability with 0, this will cause negative influence on semantic distance computation. Considering some extreme cases, we add parameter to increase the positive influence of semantic distance, and add parameter to alleviate the negative influence at the same time. For instance, if two images have a lot of identical classes, meanwhile the probability of each class is relative high as the same as another one, these two images can get a relatively high semantic distance. Or the probability of each class is different with another one to a large extent, the semantic distance between two images may affect by negative influences.

Particularly, we use datum in the matrix to compute the semantic distance between two images by the following distance algorithm:

where is obtained by counting the number of classes in the matrix, ranging from 60 to 120. and represent the probability of two images in the same serial number of class, respectively. Weight and are got by experimental validation. is used to normalize the similarity and alleviate the big gap existing in the probabilities of the same class of two images.

3 Experimental Evaluation

We evaluate the performance of NIST framework on the multi-label benchmark dataset MIRFLICKR-25K [4]. We present quantitative evaluations in terms of ranking measures and compare NIST with unsupervised methods iterative quantization (ITQ) [2] and spectral hashing (SH) [9], and supervised methods CCA-ITQ [2], hamming distance metric learning (HDML) [7] using multi-label and ranking information, respectively. Normalized Discounted Cumulative Gain (NDCG) [5] and Average Cumulative Gain (ACG) [5] are used as metrics to evaluate our NIST framework. More particular experimental and parameter settings are presented in subsequent sections.

3.1 Dataset

The MIRFLICKR-25K dataset consists of 25,000 images collected from the social photography site through the public API. For each image, it has a description tag text file, a camera information file and a copyright license file. All images are annotated for 24 semantic concepts including various scenes and objects categories such as sky, water, beach and dog. All 25,000 images are used as the database for testing queries and retrieval due to the very successful GoogleNet has been well trained. Following [8], a 1000-dimensional feature vector for each image is extracted by GoogleNet, which will be used for the process of feature fusion and compared methods.

3.2 Evaluation Criteria

Compared with the deep semantic ranking based hashing (DSRH) framework [11] using deep convolutional neural network to construct hash functions to learn directly from images, NIST use CNN to obtain classification results and propose the semantic distance algorithm to compute the similarity of two images. In our experiments, NDCG and ACG are used to measure the ranking quality of retrieved database points in order to compare with these image semantic retrieval methods based on hash function.

NDCG is a popular measurement in the information retrieval community, it evaluates the ranking of data points by penalizing errors in higher ranked items more strongly. NDCG is defined as:

where is the truncated position in a ranking list, is a normalization constant to ensure that the NDCG score for the correct ranking is one, and is the similarity level of the database point in the ranking list.

ACG is calculated by taking the average of the similarity levels of data points within top- positions and it is equivalent to the precision weighted by the similarity level of each data point. ACG is defined as:

where is also the truncated position in a ranking list, is the similarity level of the database point in the ranking list. In our experiment, we set .

3.3 The Effect of Parameters

We discuss the parameter which means the truncated position in the ranking list of 1000-dimensional feature vector for each image extracted by GoogleNet. We set , considering the biger we set, the more storage and computation consumption we may cost. Figure 2 shows the results of the influence of different on retrieval accuracy in the ranking measurements. We can observe that with the increase of , the retrieval accuracy increases at the same time. It’s obvious that NIST obtains the best performance at , and the accuracy increases are tiny when range from 50 to 60 both in NDCG and ACG. This is because of that the probabilities in semantic feature matrix which smaller than the top 60 is very small, having less significant in representing the semantic information of images. According to this, we just set in the following experiments.

To analyze the relevant between performance of NIST and the value of /, we validate the influence of different values on retrieval accuracy in the experiments. The results in the ranking measurements are showed in Figure 3. As mentioned before, and are used to increase the positive influence and reduce the negative influence respectively, so we think should much bigger than . So we set the . From the experimental results, we can observe that with the increase of the value of raging from 2000 to 10000, a big rising of retrieval accuracy is apparent. But from 10000 to 50000, there is a little rise of accuracy when using ACG as the measurement. However, there is a decrease of accuracy when using NDCG as the measurement. Therefore, when the value of / is 10000, we can get the best performance. So we just set /=10000 in the following experiment.

Figure 2: The effect of .
Figure 3: The effect of /.

3.4 Comparison

We also compare the proposed NIST framework with other hash methods based on hand-crafted features and DSRH framework which based on CNN. Table 2 illustrates the scores of these methods using NDCG and ACG as metrics. We can observe that the performance of NIST is better than other methods based on hand-crafted features in all cases. However, it’s obvious that NIST has some gaps between DSRH framework in retrieval accuracy.

Method Ours DSRH-64bits [11] CCA-ITQ-64bits [2] HDML-64bits [7] SH-64bits [9]
NDCG@100 46.92% 50.41% 31.15% 22.03% 18.54%
ACG@100 2.87 3.16 2.3 1.75 1.46
Table 2: Comparison of retrieval accuracy of different methods on MIRFLICKR-25K.

There are some important factors causing the gap between NIST and the DSRH. Due to some sematic tags used in the test set such as night, transport, plant life have not trained in the training set, and we have not retraining the network by using the MIRFLICKR-25K dataset. The classification network GoogleNet we chose put more emphasis on single-label classification tasks, having more disadvantages on multi-label classification tasks. According to this, we can guess that a multi-label classification network may bring us much better accuracy. However, experiments show that it’s reasonable for our novel NIST framework using classification results to obtain sematic information of compared images.

3.5 Discussion

In the process of using GoogleNet to classify the images from MIRFLICKR-25K dataset, we find that single label images can get a more accurate classification result getting from GoogleNet. However, multi-label images’ classification results are not accurate enough. Particularly, NIST is relatively depending on the classification network. We choose 100 images of the worst retrieval results obtained by NDCG measurement as input images, when using GoogleNet to classify these images, the results show that there are only 3 images’ classification results are reasonable, the classification results of other 97 images having a big gap from the groundtruth. If we only choose the 100 best retrieval results as input images and use GoogleNet to classify, the retrieval accuracy may larger than 85% by NDCG measurement. This increases in accuracy obviously demonstrate that NIST is reasonable, but it needs a more accurate multi-label classification network. In future work, we may train a classification network having advantages in both single label and multi-label images.

Figure 4: Three sample queries from the MIRFLICKR-25K dataset and their corresponding retrieval results.

4 Conclusions

In this paper, we propose a new NIST framework for image semantic retrieval. Pursuing the compactness without compromising the retrieval accuracy, the fusion strategy and sematic distance computation algorithm are designed to accomplish NIST framework in a straightforward manner. Experiments demonstrate that NIST framework show its reasonability and expansibility on the semantic retrieval tasks. In future work, we would like to use a multi-label classification network to obtain more accurate classification results.


  • [1] R. Datta, D. Joshi, J. Li, and J. Z. Wang. Image retrieval: Ideas, influences, and trends of the new age. ACM Computing Surveys (CSUR), 40(2):5, 2008.
  • [2] Y. Gong, S. Lazebnik, A. Gordo, and F. Perronnin. Iterative quantization: A procrustean approach to learning binary codes for large-scale image retrieval. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(12):2916–2929, 2013.
  • [3] A. Hanjalic, C. Kofler, and M. Larson. Intent and its discontents: the user at the wheel of the online video search engine. In Proceedings of the 20th ACM international conference on Multimedia, pages 1239–1248. ACM, 2012.
  • [4] M. J. Huiskes and M. S. Lew. The mir flickr retrieval evaluation. In Proceedings of the 1st ACM international conference on Multimedia information retrieval, pages 39–43. ACM, 2008.
  • [5] K. Jarvelin and J. Kekalainen. Ir evaluation methods for retrieving highly relevant documents. In Proceedings of the 23rd annual international ACM SIGIR conference on Research and development in information retrieval, pages 41–48. ACM, 2000.
  • [6] Y. LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Backpropagation applied to handwritten zip code recognition. Neural computation, 1(4):541–551, 1989.
  • [7] M. Norouzi, D. J. Fleet, and R. R. Salakhutdinov. Hamming distance metric learning. In Advances in neural information processing systems, pages 1061–1069, 2012.
  • [8] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In

    Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition

    , pages 1–9, 2015.
  • [9] Y. Weiss, A. Torralba, and R. Fergus. Spectral hashing. In Advances in neural information processing systems, pages 1753–1760, 2009.
  • [10] Z. J. Zha, L. Yang, T. Mei, M. Wang, and Z. Wang. Visual query suggestion. Acm Transactions on Multimedia Computing Communications and Applications, 6(3):15–24, 2009.
  • [11] F. Zhao, Y. Huang, L. Wang, and T. Tan. Deep semantic ranking based hashing for multi-label image retrieval. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1556–1564, 2015.