Content-based image retrieval speedup

11/26/2019 ∙ by Sadegh Fadaei, et al. ∙ 0

Content-based image retrieval (CBIR) is a task of retrieving images from their contents. Since retrieval process is a time-consuming task in large image databases, acceleration methods can be very useful. This paper presents a novel method to speed up CBIR systems. In the proposed method, first Zernike moments are extracted from query image and an interval is calculated for that query. Images in database which are out of the interval are ignored in retrieval process. Therefore, a database reduction occurs before retrieval which leads to speed up. It is shown that in reduced database, relevant images to query image are preserved and irrelevant images are throwed away. Therefore, the proposed method speed up retrieval process and preserve CBIR accuracy, simultaneously.



There are no comments yet.


page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

I Introduction

Content-based image retrieval (CBIR) is retrieving images based on their structural and conceptual characteristics without needing for manual annotation. CBIR is among important fields in image processing with applications including art collections, crime prevention, architectural and engineering design, geographical information, intellectual property, medical diagnosis, face finding, textiles industry, photograph archives, military, retail catalogs and remote sensing systems[1]

. Feature extraction and retrieval are two main steps in CBIR. For large databases, retrieval phase is very time-consuming especially for cases with complicated measures for image similarity evaluation. Due to the increasing the size of image databases, research in the field of CBIR systems has gained high attention


Many CBIR systems have been proposed in recent years. In [3], a fast CBIR system based on a fusion of weighted color, texture, chromaticity moments, color percentile, and local binary pattern (LBP) was proposed followed by a supervised query image classification and retrieval model. In [4]

, a normalization method as linear scaling to unit variance was proposed for feature vector equalization. Based on this method, equal-average K nearest neighbor search (EKNNS) method was used to find the first K nearest neighbors of the query. These neighbors were considered as retrieved images. In

[5], a CBIR system containing two steps image indexation and image retrieving was proposed. In the first step, MapReduce distributed model on Spark and Tachyon memory-centric distributed storage system were used to speed up the indexation task. In the second step, parallel k-Nearest Neighbors (k-NN) MapReduce model was implemented under Apache Spark. In [6], a plane semantic ball (PSB) in graphics processing unit (GPU) was developed as adaptive index structure which could reduce the computational tasks of retrieval process parallel accelerated scheme. In PSB, a collection of pivots are used for representing semantics as well as multiple balls to cover more informative reference features in image which all are executed on GPU efciently. In [7], a method for CBIR acceleration was proposed on the RDISK machine. This machine uses the philosophy of smart-disks and is considered as a cluster of FPGA-enhanced hard-drives. The proposed platform combined coarse and fine grain parallelism in cluster nodes and programmable logic devices.

This work extends our previous researches in[10, 15, 14, 16, 12, 13] which was CBIR systems with different features and retrieval schemes. Here, the focus is speeding up the retrieval process. For this task, Zernike moments as shape features are selected and then an interval for each query image is computed which leads to exclude many irrelevant images and reduce the database in retrieval phase significantly. Although this method is proposed for Zernike features, it can be easily adapted for retrieval processes based on any feature type including color, texture and shape. The rest of this paper is organized as follows: Section II presents the proposed method. Experimental results and conclusion are discussed in sections III and IV, respectively.

Ii Proposed method

Feature extraction is a time consuming task in CBIR systems. Since features should be extracted from all images in database, this challenge rise for large databases. The main contribution of this work is to propose a method for quick eliminating of images which are irrelevant to query image. In fact, for each image query, this step is done and reduces database size significantly. For this task, a few number of features are extracted from query image and optimum intervals are calculated. All images out of these intervals are ignored in retrieval phase. Note that extraction of considered feature for database reduction should be as quick as possible. The flowchart of the proposed method is shown in Fig. 1.

Fig. 1: Flowchart of the proposed method.

In this work, Zernike moments are used. These moments are derived from orthogonal Zernike polynomials and are a set of orthogonal moments[1]. Pseudo Zernike moments are an extension of Zernike moments with useful and important features including capabilities of multi-level representation.These moments are robust against noise and image rotation. Implementation of such features are easy and fast[8] which is very important for our proposed method. Orthogonal polynomials can be represented as follows:


By considering Orthogonality property of polynomials can be decomposed as follows:


where coefficients describe Pseudo ZMs and their size are used as image features[9]. In the proposed scheme for databse reduction, it is supposed that there are image categories with image per category. For image in category , one feature is extracted and represented by . Then, two parameters and are computed from by Eq. 5.


Interval represents bounds of feature for category as shown in Fig. 2

Fig. 2: Bounds of feature in each category.

In the next step, a center and radius is calculated for each class as follows:


Then, is calculated from radius of classes:


Therefore, are computed in offline phase. In online step, by presenting query image with feature , the following interval are calculated from data in offline step.


The final interval to select relevant images from database is computed by Eq. 10.


Therefore, after computation, all images out of this interval are ignored and images in this interval are forwarded for retrieval step.

Iii Experimental Results

To show the effectiveness of the proposed method, it is evaluated on Corel-1k database which contains 1000 images with 10 categories and 100 image in each category. Here, Zernike features , and are used. First, it is shown that how much the database is reduced by the proposed method. Then, CBIR system is implemented on both the full-length database and reduced database and retrieval accuracies of two cases are compared. In all experiments, 50% of database is used for train and remaind 50% for test.

Iii-a Database reduction

In the first step, the effect of each Zernike features as well as their combination are assessed for database reduction. Table I reports values for obtained in offline phase.

TABLE I: for Zernike features and Corel-1k database.

In online phase, a query image is presented and database is reduced to a new database. Then, number of relevant images remained in new database is calculated. Also, reduction percent of new database in comparison with the main database is calculated. This experiment is done for all query images in test set (500 images) and then average remained percentage is depicted in Fig. LABEL:Redeceddatabase. In Corel-1k database, it is expected that remained percentage be as close as 100% for relevant images with query image and as close as 10% for the whole images. As it is clear from Fig. LABEL:Redeceddatabase, almost all relevant images are kept and blue line is near to 100% and meets 10% for the all images in some categories. For instance, in Fig. LABEL:Redeceddatabase(a), remained percentage in category 4 is 99.36% and 84.82% for all images and relevant images, respectively.

Fig. 3: Bars for remained percentage of relevant images and all images retrived by Zernik feature: (a), (b), (c) and (d) all features .

The percentage of remained relevant images and remained all images for each Zernike feature and all features are depicted in Fig. 4. It is clear that by all Zernike features, remained percentage of relevant images is 91.17% and remained percentage of all images is 59.16%. It means the the majority part of irrelevant images are throwed away while a high percentage of relevant images is preserved.

Fig. 4: Percentage of remained relevant images and all images with Zernike features.

Iii-B Retrieval time after database reduction

Database reduction leads to speed up in retrieval phase since retrieving images from large databases needs more time than small databases. To show that how reduced database obtained from the proposed method speed up the retrieval process, two CBIR methods proposed in[10, 11] are implemented and evaluated by the whole database and reduced database. Retrieval time for these cases are shown in Fig. 5.

Fig. 5: Retrival time with and without database reduction.

Iii-C Retrieval accuracy after database reduction

By reducing the database size, the accuracy of CBIR system is decreased since relevant images may be removed in database reduction phase. The last experiment is done to evaluate CBIR accuracy before and after database reduction by the proposed method. For this task, the accuracy of methods in [10, 11] are compared before and after database reduction in Figs. 6 and 7, respectively. It shows that database reduction does not decrease CBIR system accuracy since the majority part of relevant images are also in reduced database. In this experiment, average precisions for method [10] are 69.26% and 69.20%, respectively. These precisions for method[11] are 67.50% and 67.26% which means that precisions are preserved after database reduction.

Fig. 6: Retrival accuracy of method [10] before and after database reduction.
Fig. 7: Retrival accuracy of method [11] before and after database reduction.

Iv Conclusion

This paper presented a fast and efficient method to speed up CBIR system. The proposed method was based on an interval extracted from Zernike moments which excluded all images out of this interval before retrieval process. Experiments on Corel-1k database showed that the proposed scheme decreases retrieval time significantly with the same retrieval accuracy in comparison with existing CBIR systems. Future efforts will be directed towards proposing speed up methods with efficient intervals extracted from texture and color features which are good descriptors for images with irregular objects. Finally, an optimize combination of intervals from different features can be proposed as another future work.


  • [1] Li, Shan, Lee, Moon-Chuen and Pun, Chi-Man, ”Complex Zernike moments features for shape-based image retrieval,” IEEE Transactions on Systems, Man, and Cybernetics-Part A: Systems and Humans, vol. 39, no. 1, pp. 227–237, 2008.
  • [2] Shahbahrami, Asadollah and Juurlink, Ben, ”Optimization of content-based image retrieval functions,” 2008 Tenth IEEE International Symposium on Multimedia, pp. 607–612, 2008.
  • [3] Singh, Vibhav Prakash and Srivastava, Subodh and Srivastava, Rajeev, ”An efficient image retrieval based on fusion of fast features and query image classification,” International Journal of Rough Sets and Data Analysis (IJRSDA), vol. 4, no. 1, pp. 19–37, 2017.
  • [4] Lu, Zhe-Ming and Burkhardt, Hans and Boehmer, Sebastian, ”Fast content-based image retrieval based on equal-average k-nearest-neighbor search schemes,” Pacific-Rim Conference on Multimedia, Springer, pp. 167–174, 2006.
  • [5] Mezzoudj, Saliha, Rachid Seghir and Yassmina Saadna, ”A Parallel Content-Based Image Retrieval System Using Spark and Tachyon Frameworks,” Journal of King Saud University-Computer and Information Sciences, 2019.
  • [6] Zhu, Lei, ”Accelerating content-based image retrieval via GPU-adaptive index structure,” The Scientific World Journal, Hindawi, 2014.
  • [7] Noumsi, Auguste and Derrien, Steven and Quinton, Patrice, ”Acceleration of a content-based image-retrieval application on the RDISK cluster,” Proceedings 20th IEEE International Parallel & Distributed Processing Symposium, pp. 10–19, 2006.
  • [8] Hosaini, Seyed Jabbar and Alirezaee, Shahpour and Ahmadi, Majid and Makki and Seyed Vahab-Al Din, ”Comparison of the Legendre, Zernike and Pseudo-Zernike moments for feature extraction in iris recognition,” 2013 5th International Conference and Computational Intelligence and Communication Networks, IEEE, pp. 225–228, 2013.
  • [9] Clemente, Carmine and Pallotta, Luca and Proudler, Ian and De Maio, Antonio and Soraghan, John J and Farina, Alfonso, ”Pseudo-Zernike-based multi-pass automatic target recognition from multi-channel synthetic aperture radar,” IET Radar, Sonar & Navigation, vol. 9, no. 4, pp. 457–466, 2015.
  • [10] Sadegh Fadaei, Rassoul Amirfattahi and Mohammad Reza Ahmadzadeh, ”New content-based image retrieval system based on optimised integration of DCD, wavelet and curvelet features,” IET Image Processing, vol. 11, no. 2, pp. 89-98, 2016.
  • [11] Dubey, Shiv Ram, Satish Kumar Singh and Rajat Kumar Singh, ”Local neighbourhood-based robust colour occurrence descriptor for colour image retrieval,” IET Image Processing, vol. 9, no. 7, pp. 578-586, 2015.
  • [12]

    A. Rashno, S. Sadri, Content-based image retrieval with color and texture features in neutrosophic domain, in: 2017 3rd International Conference on Pattern Recognition and Image Analysis (IPRIA), IEEE, 2017, pp. 50–55.

  • [13]

    A. Rashno, S. Sadri, H. SadeghianNejad, An efficient content-based image retrieval with ant colony optimization feature selection schema based on wavelet and color features, in: 2015 The International Symposium on Artificial Intelligence and Signal Processing (AISP), IEEE, 2015, pp. 59–64.

  • [14] A. Rashno, F. Smarandache, S. Sadri, Refined neutrosophic sets in content-based image retrieval application, in: 2017 10th Iranian Conference on Machine Vision and Image Processing (MVIP), IEEE, 2017, pp. 197–202.
  • [15] S. Fadaei, R. Amirfattahi, M. R. Ahmadzadeh, Local derivative radial patterns: A new texture descriptor for content-based image retrieval, Signal Processing 137 (2017) 274–286.
  • [16] A. Rashno, E. Rashno, Content-based image retrieval system with most relevant features among wavelet and color features, arXiv preprint arXiv:1902.02059.