As an essential part of artificial intelligence, many works focus on image processing which is the branch of computer vision. Nevertheless, image localization faces complex challenges in image processing with image data increases. At the same time, quantum computing has the unique advantages of improving computing power and reducing energy consumption. So, combining the advantage of quantum computing is necessary for studying the quantum image localization algorithms. At present, many quantum image localization algorithms have been proposed, and their efficiency is theoretically higher than the corresponding classical algorithms. But, in quantum computing experiments, quantum gates in quantum computing hardware need to work at very low temperatures, which brings great challenges to experiments. This paper proposes a single-photon-based quantum image localization algorithm based on the fundamental theory of single-photon image classification. This scheme realizes the operation of the mixed national institute of standards and technology database (MNIST) quantum image localization by a learned transformation for non-noise condition, noisy condition, and environmental attack condition, respectively. Compared with the regular use of entanglement between multi-qubits and low-temperature noise reduction conditions for image localization, the advantage of this method is that it does not deliberately require low temperature and entanglement resources, and it improves the lower bound of the localization success rate. This method paves a way to study quantum computer vision.
In recent decades, with the development of information technology and computer hardware, the computing power of computers has been dramatically improved. The current application of artificial intelligence in various fields makes our life more intelligent. Image processing is widely studied as an essential branch of computer vision, such as image classification, object recognition, and semantic segmentation. However, the explosive growth of today’s data makes the performance of classical computers unable to meet the status quo of image processing. Therefore, numerous researchers invest in exploring efficient computer performance, such as very large scale integration technology and microprocessor technology [
As a new heuristic theory and technology, quantum computing has attracted significant attention in some fields in recent years. It benefits from quantum computers’ powerful parallel computing capabilities [
Sometimes in some image processing scenarios, we usually need to identify [
This paper shows a single-photon-based quantum image localization method. Firstly, we perform a preprocessing on the image data, including but not limited to encoding labels, normalizing image pixels, generating a quantum state, etc. Secondly, a learned transformation is introduced to redistribute the amplitudes that make up the spatial part of the photon’s wave function [
This paper is organized: The framework of the localization system is described in Section 2. Section 3 shows an example that describes the definition of the localization on the specific MNIST images in mathematics. In Section 4, we give three cases for experimental analysis of quantum image localization and draw some conclusions. In Section 5, we conclude this paper.
Here, we establish an overall framework for a quantum image localization system (QILS) to achieve single-photon image localization, as shown in
Inspired by Thomas Fischbacher and Luciano Sbaiz, we propose a new theory to realize image localization (the more details see Supplementary Files). Based on the above theory and considering the three cases and reasons: ideal situation, the noise-only situation, and the environmental attack situation to conduct relevant experiments.
Reason for the ideal situation: When doing experiments, ignoring all external factors that are not relevant to the experiment helps to detect whether the algorithm is achievable. Reason for the noise-only situation: Due to the development of image positioning in various fields, its accuracy becomes particularly essential, such as computed tomography (CT) images in the medical field [ Reasons for environmental attack situations: In practical application scenarios, modern learning algorithms may be subject to various adversarial attacks, including poisoning during model updates, model stealing, and test data evasion attacks [
In this paper, we use the TensorFlow framework, which can be used for various machine learning and deep learning, such as speech recognition or image recognition [ Prepare the image to be positioned based on the MNIST dataset [
We call the original MNIST image a small image and the generated image localized to a large image. A number is randomly selected from the sequence of numbers 0–17 as the row label of the small image in the large image (Do the same for column label). In this way, each MNIST image will be put into a blank image of The loading data stage:
First, this paper divides the images containing MNIST data into two parts: a training set and test set. Each part contains After that, the divided test set and data set are randomly shuffled in batches, and then the image data of each batch is trained. The preprocessing stage:
Since the picture is a grayscale image containing handwritten numbers, its pixels are The predicted position coordinates are (0, 0) to (18, 18). The M dimension needs to be divisible by the total number of positions C, that is, 784 needs to be divisible by 18. Since it is not divisible, the Hilbert space here needs to be filled to a larger Hilbert space. We extend vector The coefficient of the photon quantum state is proportional to the square root of the picture’s brightness, and each element on the pixel with One-Hot encoding is performed on the row and column labels of the image. In this stage, case 1 is fine as above, but cases 2 and 3 need to introduce noise. Simulation of noisy images: Add random numbers as noise to images containing predicted image locations [ The predicting row or column stage:
For case 1 (see
The probability corresponding to this segment can be:
By analogy, this operation is performed for each segment. And the probability of each segment is placed in an output list so that a list of numbers of predicted rows can be obtained. In the same way, after arranging the picture pixels in columns and filling them into a one-dimensional vector of 792 pixels, a list of numbers for the predicted column can be obtained after the above operations.
For case 2 (see
Similarly, this operation is performed for each segment, and the probability of each segment is placed in an output list so that a list of numbers of predicted rows can be obtained. In the same way, after arranging the picture pixels in columns and filling them into a one-dimensional vector of 792 pixels, a list of numbers for the predicted column can be obtained after the above operations.
For case 3 (see
The probabilities obtained for each segment are put into an output list, which is a numerical list of predicted rows. Similarly, the picture pixels are arranged in columns and then filled into a one-dimensional vector of 792 pixels. After the above operations, the number list of the predicted columns can be obtained.
The training data stage:
The TensorFlow framework can access the entire calculation process, and it has a large number of built-in optimization algorithms. In this paper, an optimizer used a gradient descent algorithm is selected to update the value of the loss function and parameter
Here P represents the predicted location label, and T represents the true location label. It can be seen that four main quantities directly affect the squared difference loss function, namely, One-Hot encodings corresponding to row labels and column labels and output sequences of predicted rows and columns. The indirect influence is the
Every 100 pictures are a batch. When the position of 100 pictures is predicted, the predicted localization result of each picture and the accuracy of the prediction of 100 pictures will be simulated.
Under ideal conditions, we use a gradient descent optimizer to optimize the single-photon quantum image localization model.
For noisy situations, add random numbers to the image to simulate positional noise. A single-photon quantum image localization model can predict the exact location of an image. The localization accuracy of the model in the presence of noise is shown in
If the environment attacks the quantum image localization model, the integrity of the learning process during the training stage will be compromised. In the case of adding noise, we use the operation of randomly selecting 44 data as a segment to simulate the situation where the model is attacked. The localization accuracy of the model with noise and environmental attacks is shown in
Our model can obtain better image localization results by discussing the above three cases. These results stem from: 1. The performance indicators concerned in this paper are the possibility of correct localization and the output of the localization. 2. In model training, the squared difference loss function for gradient descent is used to achieve the optimal model. 3. When the program is compiled, the specific loss value of the squared loss function can be obtained every ten times of prediction position calculation. As the loss value of the squared difference loss function gets smaller and smaller, the predicted location result gets closer and closer to the correct location label.
Here, to show the relevant comparison of these three cases, we put the results in
Training steps | Situations | ||
---|---|---|---|
Ideal training | Only noise | Environmental attack | |
10 | 87% | 8% | 2% |
20 | 95% | 10% | 3% |
90 | 99% | 66% | 19% |
200 | 100% | 89% | 41% |
300 | 100% | 96% | 65% |
500 | 100% | 99% | 75% |
1000 | 100% | 100% | 85% |
1500 | 100% | 100% | 90% |
1700 | 100% | 100% | 95% |
This paper proposes a quantum image localization method based on a single photon and studies the localization problem of single-photon and quantum computing for pictures containing MNIST images. Two main results are obtained: One is successful in establishing a new quantum image localization model based on the single-photon image classification method for the first time. The other is to introduce a transition matrix U in the quantum state of a single photon. Through theoretical analysis and numerical experiments, it is found that the conversion unit can improve the localization accuracy of the image. Most of the previous research on quantum image localization focused on a single environmental condition, lacking a comprehensive analysis of the system’s predictive ability under multiple physical conditions. This paper discusses the localization capability of QILS in three different situations, which has practical significance and excellent reference value for the application of quantum image localization. In general, this model helps us understand more complex quantum image localization systems and study high-dimensional image localization location characteristics.