An Online Hashing Algorithm for Image Retrieval Based on Optical-Sensor Network
Abstract
:1. Introduction
- Extract the manifold structure of high-dimensional data using Laplacian Eigenmaps, thus constructing an anchor hash model.
- Construct an asymmetric-graph regularization term to constrain the learning process of hash codes using the balanced similarity between current arriving data and previous data sets.
- Integrate the anchor hash model and the asymmetric graph regularization with a seamless formulation to learn global and local dual-semantic information, then use the alternating-iteration algorithm to solve the optimization issue and obtain high retrieval accuracy by performing a large number of experiments.
2. Related Work
3. The Proposed Method
3.1. Notations
3.2. Manifold Learning
3.2.1. Laplacian Eigenmaps
3.2.2. Anchor Graph Hashing
3.3. Global-Balanced Similarity
3.3.1. Similarity
3.3.2. Balanced Similarity
3.4. Overall Formulation
3.5. Alternating Optimization
- Wt-step: fix , , , then learn hash weights . The second term in Equation (12) is eliminated, and the objective function becomes:
- -step: fix , , , the second term in Equation (12) is retained and the formula becomes:
- -step: fix , , , the first and the fourth term in Equation (12) are eliminated, and the corresponding sub-problem is:
- -step: fix , , , only the first term remains in Equation (12), and it is transformed into the formula, as follows:
Algorithm 1 the online hashing preserving local features and global-balanced similarity |
Input: training samples, ; labels ; code length, ; the number of sample batches, ; divisors ,. |
Output: hash codes and the mapping matrix . |
Initialize with the normal Gaussian distribution |
while do Denote the newly arrived data as |
Set , |
Compute anchor points by means of -means clustering |
Obtain anchor graph via Equation (5) and compute the global-balanced similarity matrix by labels |
Update , , via Equation (17), Equation (19) and Equation (27), respectively |
while becomes k do |
Update via Equation (25) end while end while Set and calculate |
Return, |
3.6. Computational Complexity
4. Experiments
4.1. Datasets
4.2. Experimental Setting
4.2.1. Parameter Setting
4.2.2. Evaluation Protocols
4.2.3. Compared Methods
4.3. Results and Discussion
4.4. Parameter Sensitivity
4.5. Limitations and Potential Improvements
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Masood, F.; Masood, J.; Zahir, H.; Driss, K.; Mehmood, N.; Farooq, H.S. Novel approach to evaluate classification algorithms and feature selection filter algorithms using medical data. J. Comput. Cogn. Eng. 2022, 2, 1–11. [Google Scholar]
- Zhang, H.; Xu, C.; Shi, C.; Bi, H.; Li, Y.; Mian, S. HSCA-Net: A Hybrid Spatial-Channel Attention Network in Multiscale Feature Pyramid for Document Layout Analysis. J. Artif. Intell. Technol. 2022, 3, 10–17. [Google Scholar] [CrossRef]
- Zheng, M.; Zhi, K.; Zeng, J.; Tian, C.; You, L. A hybrid CNN for image denoising. J. Artif. Intell. Technol. 2022, 2, 93–99. [Google Scholar] [CrossRef]
- Latif, A.; Rasheed, A.; Sajid, U.; Ahmed, J.; Ali, N.; Ratyal, N.I.; Zafar, B.; Dar, S.H.; Sajid, M.; Khalil, T. Content-Based Image Retrieval and Feature Extraction: A Comprehensive Review. Math. Probl. Eng. 2019, 2019, 9658350. [Google Scholar] [CrossRef]
- Bani, N.T.; Fekri-Ershad, S. Content-based image retrieval based on combination of texture and colour information extracted in spatial and frequency domains. Electron. Libr. 2019, 37, 650–666. [Google Scholar] [CrossRef]
- Indyk, P.; Motwani, R. Approximate nearest neighbors: Towards removing the curse of dimensionality. In Proceedings of the Thirtieth Annual ACM Symposium on Theory of Computing, Dallas, TX, USA, 24–26 May 1998; pp. 604–613. [Google Scholar]
- Gionis, A.; Indyk, P.; Motwani, R. Similarity search in high dimensions via hashing. In Proceedings of the 25th International Conference on Very Large Data Bases, San Francisco, CA, USA, 7–10 September 1999; Volume 99, pp. 518–529. [Google Scholar]
- Martínez, S.; Gérard, S.; Cabot, J. Efficient model similarity estimation with robust hashing. Softw. Syst. Model. 2022, 21, 337–361. [Google Scholar] [CrossRef]
- Weng, Z.; Zhu, Y. Online hashing with bit selection for image retrieval. IEEE Trans. Multimed. 2020, 23, 1868–1881. [Google Scholar] [CrossRef]
- Lai, Z.; Chen, Y.; Wu, J.; Wong, W.K.; Shen, F. Jointly sparse hashing for image retrieval. IEEE Trans. Image Process. 2018, 27, 6147–6158. [Google Scholar] [CrossRef]
- Liu, X.; Yi, J.; Cheung, Y.-M.; Xu, X.; Cui, Z. Omgh: Online manifold-guided hashing for flexible cross-modal retrieval. IEEE Trans. Multimed. 2022, 8, 99. [Google Scholar] [CrossRef]
- Charikar, M.S. Similarity estimation techniques from rounding algorithms. In Proceedings of the Thiry-Fourth Annual ACM Symposium on Theory of Computing, Montreal, QC, USA, 21–28 May 2002; pp. 380–388. [Google Scholar]
- Ding, K.; Huo, C.; Fan, B.; Xiang, S.; Pan, C. In defense of locality-sensitive hashing. IEEE Trans. Neural Netw. Learn. Syst. 2016, 29, 87–103. [Google Scholar] [CrossRef]
- Datar, M.; Immorlica, N.; Indyk, P.; Mirrokni, V.S. Locality-sensitive hashing scheme based on p-stable distributions. In Proceedings of the Twentieth Annual Symposium on Computational Geometry, Brooklyn, NY, USA, 8–11 June 2004; pp. 253–262. [Google Scholar]
- Chum, O.; Philbin, J.; Zisserman, A. Near duplicate image detection: Min-hash and tf-idf weighting. Bmvc 2008, 810, 812–815. [Google Scholar]
- Kulis, B.; Grauman, K. Kernelized locality-sensitive hashing for scalable image search. In Proceedings of the 2009 IEEE 12th International Conference on Computer Vision, Kyoto, Japan, 29 September–2 October 2009; pp. 2130–2137. [Google Scholar]
- Weiss, Y.; Torralba, A.; Fergus, R. Spectral hashing. In Proceedings of the 21st International Conference on Neural Information Processing Systems, Ser. NIPS’08, Washington, DC, USA, 8 December 2008; Curran Associates Inc.: Red Hook, NY, USA, 2008; pp. 1753–1760. [Google Scholar]
- Liu, W.; Wang, J.; Kumar, S.; Chang, S.-F. Hashing with graphs. In Proceedings of the 28th International Conference on International Conference on Machine Learning, Ser. ICML’11, Washington, DC, USA, 28 June–2 July 2011; Omnipress: Madison, WI, USA, 2011; pp. 1–8. [Google Scholar]
- Gong, Y.; Lazebnik, S.; Gordo, A.; Perronnin, F. Iterative quantization: A procrustean approach to learning binary codes for large-scale image retrieval. IEEE Trans. Pattern Anal. Mach. Intell. 2012, 35, 2916–2929. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Liu, W.; Wang, J.; Ji, R.; Jiang, Y.-G.; Chang, S.-F. Supervised hashing with kernels. In Proceedings of the 2012 IEEE Conference on Computer Vision and Pattern Recognition, Providence, RI, USA, 16–21 June 2012; pp. 2074–2081. [Google Scholar]
- Zhang, P.; Zhang, W.; Li, W.-J.; Guo, M. Supervised hashing with latent factor models. In Proceedings of the 37th international ACM SIGIR Conference on Research & Development in Information Retrieval, Gold Coast, QLD, Australia, 6–11 July 2014; pp. 173–182. [Google Scholar]
- Xia, R.; Pan, Y.; Lai, H.; Liu, C.; Yan, S. Supervised hashing for image retrieval via image representation learning. In Proceedings of the Twenty-Eighth AAAI Conference on Artificial Intelligence, Québec City, QC, Canada, 27–31 July 2014. [Google Scholar]
- Lin, G.S.; Shen, C.H.; Shi, Q.F.; Van den Hengel, A.; Suter, D. Fast supervised hashing with decision trees for high-dimensional data. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Columbus, OH, USA, 23–28 June 2014; pp. 1963–1970. [Google Scholar]
- Huang, L.-K.; Yang, Q.; Zheng, W.-S. Online hashing. In Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI), Beijing, China, 3–9 August 2013; pp. 1422–1428. [Google Scholar]
- Huang, L.-K.; Yang, Q.; Zheng, W.-S. Online hashing. IEEE Trans. Neural Netw. Learn. Syst. 2018, 29, 2309–2322. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Wang, L.; Wang, Q.; Wang, D.; Wan, B.; Shang, B. Online matrix factorization hashing for large-scale image retrieval. In Proceedings of the Big Data: 6th CCF Conference, Big Data 2018, Xi’an, China, 11–13 October 2018; Xu, Z., Gao, X., Miao, Q., Zhang, Y., Bu, J., Eds.; Springer: Singapore, 2018; pp. 124–134. [Google Scholar]
- Lin, M.B.; Ji, R.R.; Chen, S.; Sun, X.S.; Lin, C.-W. Similarity-preserving linkage hashing for online image retrieval. IEEE Trans. Image Process. 2020, 29, 5289–5300. [Google Scholar] [CrossRef] [PubMed]
- Yi, J.; Liu, X.; Cheung, Y.-M.; Xu, X.; Fan, W.; He, Y. Efficient online label consistent hashing for large-scale cross-modal retrieval. In Proceedings of the 2021 IEEE International Conference on Multimedia and Expo (ICME), Shenzhen, China, 5–9 July 2021; pp. 1–6. [Google Scholar]
- Zhan, Y.-W.; Luo, X.; Sun, Y.; Wang, Y.; Chen, Z.-D.; Xu, X.-S. Weakly-supervised online hashing. In Proceedings of the 2021 IEEE International Conference on Multimedia and Expo (ICME), Shenzhen, China, 5–9 July 2021; pp. 11–16. [Google Scholar]
- Chen, X.; Yang, H.; Zhao, S.; King, I.; Lyu, M.R. Making online sketching hashing even faster. IEEE Trans. Knowl. Data Eng. 2021, 33, 1089–1101. [Google Scholar] [CrossRef]
- Lin, H.; Meng, M.; Wu, J. Online robust specific and consistent hashing. In Proceedings of the 2022 IEEE International Conference on Multimedia and Expo (ICME), Taipei, Taiwan, 18–22 July 2022; pp. 1–6. [Google Scholar]
- Cakir, F.; Sclaroff, S. Adaptive hashing for fast similarity search. In Proceedings of the 2015 IEEE International Conference on Computer Vision (ICCV), Santiago, Chile, 7–13 December 2015; pp. 1044–1052. [Google Scholar]
- Cakir, F.; Bargal, S.A.; Sclaroff, S. Online supervised hashing. Comput. Vis. Image Underst. 2017, 156, 162–173. [Google Scholar] [CrossRef] [Green Version]
- Cakir, F.; He, K.; Bargal, S.A.; Sclaroff, S. Mihash: Online hashing with mutual information. In Proceedings of the 2017 IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017. [Google Scholar]
- Lin, M.B.; Ji, R.R.; Liu, H.; Sun, X.S.; Wu, Y.J.; Wu, Y.S. Towards optimal discrete online hashing with balanced similarity. In Proceedings of the 33rd AAAI Conference on Artificial Intelligence (AAAI 2019), Honolulu, HI, USA, 28–29 January 2019; pp. 8722–8729. [Google Scholar]
- Lin, M.B.; Ji, R.R.; Liu, H.; Wu, Y.J. Supervised online hashing via hadamard codebook learning. In Proceedings of the 2018 ACM Multimedia Conference, Seoul, Republic of Korea, 22–26 October 2018. [Google Scholar]
- Lin, M.B.; Ji, R.R.; Liu, H.; Sun, X.S.; Chen, S.; Tian, Q. Hadamard matrix guided online hashing. Int. J. Comput. Vis. 2020, 128, 2279–2306. [Google Scholar] [CrossRef]
- Leng, C.; Wu, J.; Cheng, J.; Bai, X.; Lu, H. Online sketching hashing. In Proceedings of the IEEE Conference on Computer Vision & Pattern Recognition, Boston, MA, USA, 7–12 June 2015; pp. 2503–2511. [Google Scholar]
- Chen, X.; King, I.; Lyu, M.R. Frosh: Faster online sketching hashing. In Proceedings of the Thirty-Third Conference on Uncertainty in Artificial Intelligence, UAI 2017, Sydney, Australia, 11–15 August 2017; pp. 1–10. [Google Scholar]
- Jin, L.; Shu, X.; Li, K.; Li, Z.; Qi, G.-J.; Tang, J. Deep ordinal hashing with spatial attention. IEEE Trans. Image Process. 2019, 28, 2173–2186. [Google Scholar] [CrossRef] [Green Version]
- He, S.; Ye, G.; Hu, M.; Yang, Y.; Shen, F.; Shen, H.T.; Li, X. Learning binary codes with local and inner data structure. Neurocomputing 2018, 282, 32–41. [Google Scholar] [CrossRef]
- Ji, R.; Liu, H.; Cao, L.; Liu, D.; Wu, Y.; Huang, F. Toward optimal manifold hashing via discrete locally linear embedding. IEEE Trans. Image Process. 2017, 26, 5411–5420. [Google Scholar] [CrossRef]
- Zhang, J.; Peng, Y. Ssdh: Semi-supervised deep hashing for large scale image retrieval. IEEE Trans. Circuits Syst. Video Technol. 2017, 29, 212–225. [Google Scholar] [CrossRef] [Green Version]
- Wang, G.; Hu, Q.; Cheng, J.; Hou, Z. Semi-supervised generative adversarial hashing for image retrieval. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 17–24 May 2018; pp. 469–485. [Google Scholar]
- Lai, H.; Yan, P.; Shu, X.; Wei, Y.; Yan, S. Instance-aware hashing for multi-label image retrieval. IEEE Trans. Image Process. 2016, 25, 2469–2479. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Ma, Q.; Bai, C.; Zhang, J.; Liu, Z.; Chen, S. Supervised learning based discrete hashing for image retrieval. Pattern Recognit. 2019, 92, 156–164. [Google Scholar] [CrossRef]
- Chen, J.; Li, Y.; Lu, H. Online self-organizing hashing. In Proceedings of the 2016 IEEE International Conference on Multimedia and Expo (ICME), Seattle, WA, USA, 11–15 July 2016; pp. 1–6. [Google Scholar]
- Gong, Y.; Lazebnik, S. Iterative quantization: A procrustean approach to learning binary codes. In Proceedings of the CVPR 2011, Springs, CO, USA, 20–25 June 2011; pp. 817–824. [Google Scholar]
- Kang, W.-C.; Li, W.-J.; Zhou, Z.-H. Column sampling based discrete supervised hashing. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, Ser. AAAI’16, Phoenix, AZ, USA, 12–17 February 2016; pp. 1230–1236. [Google Scholar]
- Shen, F.; Shen, C.; Liu, W.; Shen, H.T. Supervised discrete hashing. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Boston, MA, USA, 7–12 June 2015; pp. 37–45. [Google Scholar]
- Torralba, A.; Fergus, R.; Freeman, W.T. 80 million tiny images: A large data set for nonparametric object and scene recognition. IEEE Trans. Pattern Anal. Mach. Intell. 2008, 30, 1958–1970. [Google Scholar] [CrossRef] [PubMed]
- Chen, C.; Wang, X.Q.; Chen, X.; Lan, R.S.; Liu, Z.B.; Luo, X.N. Discriminative Similarity-Balanced Online Hashing for Supervised Image Retrieval. Sci. Program. 2022, 2022, 2809222. [Google Scholar] [CrossRef]
Symbol | Notations |
---|---|
input data at stage | |
data existing before stage | |
labels of | |
labels of | |
hash codes learned for | |
hash codes learned for . | |
hashing projection matrix at the age | |
dimension of all input data | |
newly arrived data at the stage | |
k | dimension of every hash code |
labels of | |
N | amount of input data |
binary codes generated for | |
amount of input data at the stage |
Parameter | CIFAR-10 | MNIST | Places205 |
---|---|---|---|
0.05 | 0.05 | 0.05 | |
0.6 | 0.6 | 0.8 | |
0.3 | 0.3 | 0.3 | |
1.2 | 1.2 | 1 | |
0.2 | 0.2 | 0 | |
5000 | 10,000 | 10,000 |
mAP | Precision@H2 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Methods | 8-bit | 16-bit | 32-bit | 48-bit | 64-bit | 128-bit | 8-bit | 16-bit | 32-bit | 48-bit | 64-bit | 128-bit |
OKH | 0.100 | 0.134 | 0.223 | 0.252 | 0.268 | 0.350 | 0.100 | 0.175 | 0.100 | 0.452 | 0.175 | 0.372 |
SketchHash | 0.248 | 0.301 | 0.302 | 0.327 | - | - | 0.256 | 0.431 | 0.385 | 0.059 | - | - |
AdaptHash | 0.116 | 0.138 | 0.216 | 0.297 | 0.305 | 0.293 | 0.114 | 0.254 | 0.185 | 0.093 | 0.166 | 0.164 |
OSH | 0.123 | 0.126 | 0.129 | 0.131 | 0.127 | 0.125 | 0.120 | 0.123 | 0.137 | 0.117 | 0.083 | 0.038 |
BSODH | 0.564 | 0.604 | 0.689 | 0.656 | 0.709 | 0.711 | 0.305 | 0.582 | 0.691 | 0.697 | 0.690 | 0.602 |
DSBOH | 0.556 | 0.669 | 0.703 | 0.696 | 0.720 | 0.727 | 0.411 | 0.730 | 0.737 | 0.655 | 0.552 | 0.371 |
Ours | 0.589 | 0.673 | 0.722 | 0.730 | 0.735 | 0.742 | 0.366 | 0.662 | 0.733 | 0.721 | 0.675 | 0.541 |
mAP | Precision@H2 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Methods | 8-bit | 16-bit | 32-bit | 48-bit | 64-bit | 128-bit | 8-bit | 16-bit | 32-bit | 48-bit | 64-bit | 128-bit |
OKH | 0.100 | 0.155 | 0.224 | 0.273 | 0.301 | 0.404 | 0.100 | 0.220 | 0.457 | 0.724 | 0.522 | 0.124 |
SketchHash | 0.257 | 0.312 | 0.348 | 0.369 | - | - | 0.261 | 0.596 | 0.691 | 0.251 | - | - |
AdaptHash | 0.138 | 0.207 | 0.319 | 0.318 | 0.292 | 0.208 | 0.153 | 0.442 | 0.535 | 0.335 | 0.163 | 0.168 |
OSH | 0.130 | 0.144 | 0.130 | 0.148 | 0.146 | 0.143 | 0.131 | 0.146 | 0.192 | 0.134 | 0.109 | 0.019 |
BSODH | 0.593 | 0.700 | 0.747 | 0.743 | 0.766 | 0.760 | 0.308 | 0.709 | 0.826 | 0.804 | 0.814 | 0.643 |
DSBOH | 0.596 | 0.721 | 0.759 | 0.751 | 0.781 | 0.781 | 0.403 | 0.803 | 0.849 | 0.788 | 0.651 | 0.415 |
Ours | 0.622 | 0.728 | 0.756 | 0.758 | 0.788 | 0.789 | 0.418 | 0.757 | 0.846 | 0.796 | 0.761 | 0.487 |
mAP | Precision@H2 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Methods | 8-bit | 16-bit | 32-bit | 48-bit | 64-bit | 128-bit | 8-bit | 16-bit | 32-bit | 48-bit | 64-bit | 128-bit |
OKH | 0.018 | 0.033 | 0.122 | 0.048 | 0.114 | 0.258 | 0.007 | 0.010 | 0.026 | 0.017 | 0.217 | 0.075 |
SketchHash | 0.052 | 0.120 | 0.202 | 0.242 | - | - | 0.017 | 0.066 | 0.220 | 0.176 | - | - |
AdaptHash | 0.028 | 0.097 | 0.195 | 0.223 | 0.222 | 0.229 | 0.009 | 0.051 | 0.012 | 0.185 | 0.021 | 0.022 |
OSH | 0.018 | 0.021 | 0.022 | 0.032 | 0.043 | 0.164 | 0.007 | 0.009 | 0.012 | 0.023 | 0.030 | 0.059 |
BSODH | 0.035 | 0.174 | 0.250 | 0.273 | 0.308 | 0.337 | 0.009 | 0.101 | 0.241 | 0.246 | 0.212 | 0.101 |
DSBOH | 0.046 | 0.154 | 0.240 | 0.286 | 0.313 | 0.347 | 0.011 | 0.089 | 0.264 | 0.175 | 0.119 | 0.037 |
Ours | 0.043 | 0.187 | 0.251 | 0.282 | 0.296 | 0.323 | 0.013 | 0.110 | 0.244 | 0.254 | 0.213 | 0.098 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Chen, X.; Li, Y.; Chen, C. An Online Hashing Algorithm for Image Retrieval Based on Optical-Sensor Network. Sensors 2023, 23, 2576. https://doi.org/10.3390/s23052576
Chen X, Li Y, Chen C. An Online Hashing Algorithm for Image Retrieval Based on Optical-Sensor Network. Sensors. 2023; 23(5):2576. https://doi.org/10.3390/s23052576
Chicago/Turabian StyleChen, Xiao, Yanlong Li, and Chen Chen. 2023. "An Online Hashing Algorithm for Image Retrieval Based on Optical-Sensor Network" Sensors 23, no. 5: 2576. https://doi.org/10.3390/s23052576
APA StyleChen, X., Li, Y., & Chen, C. (2023). An Online Hashing Algorithm for Image Retrieval Based on Optical-Sensor Network. Sensors, 23(5), 2576. https://doi.org/10.3390/s23052576