Abstract
Enlightened by quantum computing theory, a quantum K-Nearest-Neighbor image classification algorithm with the K-L transform is proposed. Firstly, the image features are extracted by the K-L transform. Then the image features are mapped into quantum states by quantum coding. Next, the Hamming distance between image features is computed and utilized to express the similarity of the image. Afterward, the image is classified by a new distance-weighted k value classification method. Finally, the classification results of the image are obtained by measuring the quantum state. Theoretical analysis shows that the presented quantum K-Nearest-Neighbor image classification algorithm could reduce the time complexity. Simulation experiments based on MNIST, Fashion-MNIST and CIFAR-10 data sets demonstrate that the proposed quantum K-Nearest-Neighbor algorithm has relatively higher classification accuracy.
Similar content being viewed by others
Data Availability
None.
References
Lepistö, L., Kunttu, I., Visa, A.J.: Rock image classification using color features in Gabor space. J. Electron. Imaging. 14(4), 040503 (2005)
Salvador, E., Cavallaro, A., Ebrahimi, T.: Shadow identification and classification using invariant color models. 2001 IEEE Int. Conf. Acoust, Speech, and Signal Process. 3(1), 1545–1548 (2001)
Ojala, T., Pietikäinen, M., Harwood, D.: A comparative study of texture measures with classification based on featured distributions. Pattern Recogn. 29(1), 51–59 (1996)
Arivazhagan, S., Ganesan, L.: Texture classification using wavelet transform. Pattern Recogn. Lett. 24(9), 1513–1521 (2003)
Fauvel, M., Tarabalka, Y., Benediktsson, J.A., Chanussot, J., Tilton, J.C.: Advances in spectral-spatial classification of hyperspectral images. Proc. IEEE. 101(3), 652–675 (2012)
Penatti, A.B., Silva, F.B., Valle, E., Gouet, V., Torres, R.: Visual word spatial arrangement for image retrieval and classification. Pattern Recogn. 47(2), 705–720 (2014)
Rebentrost, P., Mohseni, M., LIoyd, S.: Quantum support vector machine for big data classification. Phys. Rev. Lett. 113(13), 130503 (2014)
Demidova, L., Nikulchev, E.V., Sokolova, Y.: Big data classification using the SVM classifiers with the modified particle swarm optimization and the SVM ensembles. Int. J. Adv. Comput. Sci. Appl. 7(5), 070541 (2016)
Zhao, Z.K., Pozas, A.J., Rebentrost, P., Wittek, P.: Bayesian deep learning on a quantum computer. Quantum Mach. Intell. 1(1), 41–51 (2019)
Farid, D.M., Zhang, L., Rahman, C.M., Hossain, M.A., Strachan, R.: Hybrid decision tree and naive Bayes classifiers for multi-class classification tasks. Expert Syst. Appl. 41(4), 1937–1946 (2014)
Lu, S.F., Braunstein, S.L.: Quantum decision tree classifier. Quantum Inf. Process. 13(3), 757–770 (2014)
Yang, J.M., Yu, P.T., Kuo, B.C.: A nonparametric feature extraction and its application to nearest neighbor classification for hyperspectral image data. IEEE Trans. Geosci. Remote Sens. 48(3), 1279–1293 (2010)
Zhao, W.Z., Du, S.H.: Spectral-spatial feature extraction for hyperspectral image classification: a dimension reduction and deep learning approach. IEEE Trans. Geosci. Remote Sens. 54(8), 4544–4554 (2016)
Wu, J.J., Yu, Y.N., Huang, C., Yu, K.: Deep multiple instance learning for image classification and auto-annotation. 2015 Proc. IEEE Conf. Comput. Vis. Pattern Recognit., 3460–3469 (2015). Boston, MA
Roodposhti, M.S., Aryal, J., Lucieer, A., Bryan, B.A.: Uncertainty assessment of hyperspectral image classification: deep learning vs. random forest. Entropy. 21(1), 78 (2019)
Mou, L.C., Ghamisi, P., Zhu, X.X.: Unsupervised spectral-spatial feature learning via deep residual conv-deconv network for hyperspectral image classification. IEEE Trans. Geosci. Remote Sens. 56(1), 391–406 (2018)
Zhu, L., Chen, Y.S., Ghamisi, P., Benediktsson, J.A.: Generative adversarial networks for hyperspectral image classification. IEEE Trans. Geosci. Remote Sens. 56(9), 5046–5063 (2018)
Bishwas, A.K., Mani, A., Palade, V.: An all-pair quantum SVM approach for big data multiclass classification. Quantum Inf. Process. 17(10), 282 (2018)
Deng, Z.Y., Zhu, X.S., Cheng, D.B., Zong, M., Zhang, S.C.: Efficient KNN classification algorithm for big data. Neurocomputing. 195, 143–148 (2016)
Shankar, V.G., Devi, B., Srivastava, S.: Dataspeak: data extraction, aggregation, and classification using big data novel algorithm. Compu. Commun. Signal Process. 810, 143–155 (2019)
Gael, S., Alex, M., Ramon, M.T., John, C., Emilio, B.: Unsupervised classification of quantum data. Phys. Rev. X. 9(4), 041029 (2019)
Li, Y.Y., Xiao, J.J., Chen, Y.Q., Jiao, L.C.: Evolving deep convolutional neural networks by quantum behaved particle swarm optimization with binary encoding for image classification. Neurocomputing. 362, 156–165 (2019)
Wang, K.K., Xiao, L., Yi, W., Ran, S.J., Xue, P.: Quantum image classifier with single photons. Quantum Physics, arXiv: quant-ph/2003.08551 (2020)
Tiwari, P., Melucci, M.: Towards a quantum-inspired binary classifier. IEEE Access. 7, 42354–42372 (2019)
Henderson, M., Shakya, S., Pradhan, S., Cook, T.: Quanvolutional neural networks: powering image recognition with quantum circuits. Quantum Mach. Intell. 2, 1–9 (2020)
Chen, H.Y., Miao, F., Shen, X.: Hyperspectral remote sensing image classification with CNN based on quantum genetic-optimized sparse representation. IEEE Access. 8, 99900–99909 (2020)
Yu, L., Han, Y.F., Mu, L.L.: Improved quantum evolutionary particle swarm optimization for band selection of hyperspectral image. Remote Sens. Lett. 11(9), 866–875 (2020)
Kerenidis, I., Luongo, A.: Classification of the MNIST data set with quantum slow feature analysis. Phys. Rev. A. 101(6), 062327 (2020)
Zhang, Y., Lu, K., Xu, K., Gao, Y.H., Wilson, R.: Local feature point extraction for quantum images. Quantum Inf. Process. 14(5), 1573–1588 (2015)
Ostaszewski, M., Sadowski, P., Gawron, P.: Quantum image classification using principal component analysis. Theor. Appl. Inf. Technol. 27(1), 1–12 (2015)
Youssry, A., Rafei, A., Elramly, S.: A quantum mechanics-based framework for image processing and its application to image segmentation. Quantum Inf. Process. 14(10), 3613–3638 (2015)
Schuld, M., Sinayskiy, I., Petruccione, F.: Quantum computing for pattern classification. 2014 Pac. Rim Int. Conf. Artif. Intell. 8862, 208–220 (2014)
Ruan, Y., Chen, H.W., Tan, J.N., Li, X.: Quantum computation for large-scale image classification. Quantum Inf. Process. 15(10), 4049–4069 (2016)
Ruan, Y., Xue, X.L., Liu, H., Tan, J.N., Li, X.: Quantum algorithm for K-nearest neighbors classification based on the metric of hamming distance. Int. J. Theor. Phys. 56(11), 3496–3507 (2017)
Kaye, P.: Reversible addition circuit using one ancillary bit with application to quantum computing. Quantum Physics, arXiv: quant-ph/0408173, (2004)
Dang, Y.J., Jiang, N., Hu, H., Ji, Z.X., Zhang, W.Y.: Image classification based on quantum K-nearest-neighbor algorithm. Quantum Inf. Process. 17(9), 239 (2018)
Wang, Y.X., Wang, R.J., Li, D.F., Adu, D., Tian, K.B., Zhu, Y.X.: Improved handwritten digit recognition using quantum K-nearest-neighbor algorithm. Int. J. Theor. Phys. 58(7), 2331–2340 (2019)
Cappelli, R., Maltoni, D.: Multispace K-L for pattern representation and classification. IEEE Trans. Pattern Anal. Mach. Intell. 23(9), 977–996 (2001)
Norouzi, M., Fleet, D.J., Salakhutdinov, R.R.: Hamming distance metric learning. Adv. Neural Inf. Proces. Syst., 1061–1069 (2012)
Gou, J.P., Du, L., Xiong, T.: A new distance-weighted K-nearest neighbor classifier. J. Inf. Comput. Sci. 9(6), 1429–1436 (2012)
Zhang, Y., Lu, K., Gao, Y.H., Wang, M.: NEQR: a novel enhanced quantum representation of digital images. Quantum Inf. Process. 12(8), 2833–2860 (2013)
Wiebe, N., Kapoor, A., Svore, K.M.: Quantum nearest-neighbor algorithms for machine learning. Quantum Inf. Comput. 15(3), 318–358 (2015)
Lloyd, S., Mohseni, M., Rebentrost, P.: Quantum algorithms for supervised and unsupervised machine learning. Quantum Physics, arXiv: quant-ph/1307.0411 (2013)
Acknowledgements
This work is supported by the National Natural Science Foundation of China (Nos. 61871205 and 61561033) and the Foundation of Guizhou Provincial Key Laboratory of Public Big Data (No. 2019BDKFJJ001).
Code Availability
The data can be available from the corresponding author.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of Interest
There are no Conflicts of interest or Competing interests involved.
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Zhou, NR., Liu, XX., Chen, YL. et al. Quantum K-Nearest-Neighbor Image Classification Algorithm Based on K-L Transform. Int J Theor Phys 60, 1209–1224 (2021). https://doi.org/10.1007/s10773-021-04747-7
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10773-021-04747-7