CN106650808A - Image classification method based on quantum nearest-neighbor algorithm - Google Patents

Image classification method based on quantum nearest-neighbor algorithm Download PDF

Info

Publication number
CN106650808A
CN106650808A CN201611187225.8A CN201611187225A CN106650808A CN 106650808 A CN106650808 A CN 106650808A CN 201611187225 A CN201611187225 A CN 201611187225A CN 106650808 A CN106650808 A CN 106650808A
Authority
CN
China
Prior art keywords
image
quantum
state
algorithm
quantum state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201611187225.8A
Other languages
Chinese (zh)
Inventor
姜楠
党义杰
赵娜
虎皓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing University of Technology
Original Assignee
Beijing University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing University of Technology filed Critical Beijing University of Technology
Priority to CN201611187225.8A priority Critical patent/CN106650808A/en
Publication of CN106650808A publication Critical patent/CN106650808A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24147Distances to closest patterns, e.g. nearest neighbour classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses an image classification method based on a quantum nearest-neighbor algorithm. The method comprises the steps of: marking and classifying a certain proportion of images, preprocessing the images and extracting characteristic vectors of the images for classification; respectively preparing the characteristic vectors obtained from a testing image and a training image into quantum states; adopting a swap test algorithm for the two quantum states, and calculating a distance between the characteristic vectors extracted from the testing image and the training image; adopting AE (Amplitude Estimation) and majority voting algorithms for the quantum states of the obtained distances, and outputting the quantum states of the distances for searching; and adopting a minimum search algorithm for the quantum states of the distances. In the order of the quantum states of the distances, a minimum distance is searched and a category of the testing image is determined. By use of the technical scheme of the invention, operations needed by distance calculation and a searching algorithm in the image classification process are reduced.

Description

A kind of image classification method based on quantum nearest neighbor algorithm
Technical field
The present invention relates to quantum image processing field, more particularly to a kind of image classification side based on quantum nearest neighbor algorithm Method.
Background technology
Quantum computer carrys out storage information by quantum bit.Different from classical bit, quantum bit has two distinguishing features: One is superposition, and two is to tangle.
Superposition refers to it must is that a quantum bit can be while store 0 and 1.In quantum computer 0 and 1 and classic computer In 0 and 1 also have difference, state is called in quantum computer | 0>And state | 1>.It is existing in superposition state | 0>, have again | 1>, table It is shown as α | 0>+β|1>, wherein α22=1, and | 0>With | 1>Shared proportion is respectively α2And β2.Multiple quantum bits can also Superposition, such as two quantum bits can be stored simultaneously | and 00>, | 01>, | 10>, | 11>Four states, are expressed as α | and 00>+β| 01>+γ|10>+λ11>, wherein α2222=1, and | 00>, | 01>, | 10>, | 11>Proportion is respectively α22, γ22
Tangle refer to must be the storage of two quantum bits state between interactive phenomenon.Such as two quantum bit institutes The state at place isIf that first quantum bit is in | 0>State, then second quantum bit also Surely it is in | 0>State;If first quantum bit is in | 1>State, then second quantum bit be also necessarily in | 1>Shape State.Now, two quantum bit tied up in knots, or being at | 0>State, or being at | 1>State.Multiple quantum ratios Spy can also tangle.
It is superimposed and tangles the massive parallelism for having the advantage that quantum computer.One one is needed in classic computer The individual problem to process, because superposition is stored together on quantum computer, only processing once just can solve.Even if excellent again Elegant algorithm cannot also realize that the efficiency that quantum calculation brings is improved.In recent years, there are the utilization Quantum Properties of many maturations To solve the algorithm of particular problem, such as solve the Shor quantum algorithms of big number factorisation and solve to be searched in unordered list to ask The Grover searching algorithms of topic.These algorithms not only demonstrate the efficient of quantum calculation, and to solve the problems, such as more complicated establishing Basis is determined.These Quantum Methods are actively applied in actual task, the efficiency for improving actual task is quantum calculation research One of important process content.
Machine learning seeks to the learning behavior for enabling a computer to simulate people, and automatically by study knowledge and skill are obtained Can, performance is constantly improved, ego integrity is realized, what machine learning was studied is how to make machine pass through identification and using existing Knowledge is obtaining new knowledge and new technical ability.As an important research field of artificial intelligence, the research work master of machine learning To carry out these three basic sides around learning mechanic, learning method and oriented mission.Through semicentennial development, engineering The algorithm of habit emerges in an endless stream, and, to more complicated k nearest neighbor algorithm, the neutral net from last century is to this for the nearest neighbor algorithm from basis The deep learning for quickly growing for several years, also support vector machine, Naive Bayes Classifier scheduling algorithm.Researcher improve with Constantly ploughing and weeding, achieves great successes, in image classification identification, machine translation, speech recognition etc. on the road that development is gone forward side by side Numerous areas have extensive demand and application.Although the precision of algorithm is at a relatively high, the lifting of efficiency be it is difficult, For being based on the algorithm trained, the data of TB are gone up easily, the calculating time required for such training that completes well imagines.I.e. Just the amount of calculation of those algorithms that need not be trained is also surprising.Borrow the so efficient computation model of quantum calculation necessarily Machine learning improves efficiency, the only way which must be passed of further development.Particularly machine learning algorithm and quantum calculation set in recent years Achievement continuously emerge and perfect, successively occur in that the quantum version of the machine learning algorithm of main flow, such as the support based on quantum Vector machine, based on the decision tree of quantum, quantum nearest neighbor algorithm, neutral net based on quantum etc..With the succinct quantum of process As a example by nearest neighbor algorithm, summarize nearest neighbor algorithm the step of it is as follows:
1) characteristic vector u of test data and characteristic vector v of M training data are extracted respectively.
2) calculate characteristic vector u and M v apart from d.Distance between characteristic vector is that effectively two data of description are similar Index, conventional has inner product distance, Euclidean distance etc..
3) all minima apart from d are searched for, divides classification, complete classification.Understand all of sequence apart from d compositions {d1,d2,…,dMIt is unordered.
Wherein step 2 and step 3 are the poorly efficient of complexity using classical calculating, it is possible to use quantum algorithm is changed Enter.The calculating of distance in step 2, by taking the calculating of inner product distance as an example, cannot optimize in traditional counting, and its complexity is straight Connect the number for depending on element in characteristic vector.And Buhrman et al. is carried when fingerprint matching is solved the problems, such as using quantum calculation The swap test algorithms for going out are proved to effectively improve the efficiency for calculating inner product distance.Similarly, the sequence in step 3 It is unordered, even if using outstanding classical calculation, complexity also can only achieve O (M).And D ü rr andPropose One kind is down to the complexity of search minimum range based on the improved quantum searching minimum value-based algorithms of GroverObvious Jing The optimization of the two key steps is crossed, the overall performance of algorithm is obviously improved.Microsoft Research to these work done summary and Perfect, it is proposed that a kind of more complete algorithm, i.e. quantum nearest neighbor algorithm (QNN), and combination differentiates the description of handwritten word parity problem The overall picture of algorithm.General thought is summarized as follows:Test image and training image are expressed as into one-dimensional vector, the value in vector is The element of image.The vector of classical information is prepared into into quantum initial state using H doors, T doors and CNOT gate, using swap test Method calculates inner product distance, and then the result of amplitude estimation (Amplitude Estimation, AE) is substituted into into most ballots (Majorty Voting) algorithm, with the quantum expression that higher efficiency and less error obtain distance, finally using D ü rrMinimum Finding Algorithm search minimum range, test image is divided into into Search Results subscript pair In the classification answered, complete to this task.Experimental data shows, when error precision ∈=10-5, when training sample accounting is higher than 0.2, Precision can generally reach 95%.It can be seen that quantum nearest neighbor algorithm has performance good, the advantage of high precision.
Classics that image classification develops with machine learning and important task.Image classification is referred to according to each leisure The different characteristic reflected in image information, the image processing method that different classes of target is made a distinction.It is using calculating Machine carries out quantitative analyses to image, and each pixel in image or image or region are incorporated into as a certain in several classifications It is individual, to replace the visual determination of people.Image classification scheme using the machine learning method of traditional counting is fairly perfect, and hundred Degree picture searching is exactly a great representational application.These schemes are equally limited to the machine learning algorithm that they use Traditional counting, for comparing quantum calculation, performance is also to be hoisted.On the other hand, the machine learning algorithm of quantum version Although it has been proposed that but the application scheme towards specific tasks be also short of.Therefore it is proposed that a kind of perfect based on amount The image classification algorithms of sub- nearest neighbor algorithm are applied to image classification task using the nearest neighbor algorithm of quantum calculated version, further carry The performance of hi-vision classification.
The content of the invention
It is an object of the invention to provide a kind of efficient image classification method, by the nearest neighbor algorithm of quantum, reduces figure As distance is calculated and the operation needed for searching algorithm in categorizing process.
The innovative point of the present invention is, to image processing field, specifically to apply quantum nearest neighbor algorithm using the method for quantum Solve the problems, such as image classification.
To achieve these goals, the present invention adopts the following technical scheme that, before algorithm starts, by image collection Parts of images handmarking classifies, as training image, with the image that an image to be tested constitutes an image classification task Set.
A kind of image classification method based on quantum nearest neighbor algorithm, including:
Step S1, by the classification of a certain proportion of image tagged, image carries out pretreatment, and extracting image is used for the feature of classification Vector.
Step S2, the characteristic vector obtained by test image, training image is prepared into into respectively quantum state.
Step S3, the spy that two quantum state application swap test algorithms, calculating are extracted from test image and training image Levy distance between vector.
Step S4, by the quantum state application AE and majority voting algorithm of the distance for obtaining, export distance for search Quantum state.
Step S5, the quantum state application minima searching algorithm adjusted the distance.In the quantum state sequence of distance, search is minimum Distance, determines the classification of test image.
Preferably, step S1 specifically includes following steps:
Step S1.1, the color feature vector for extracting image in image collection.Image is switched to into HSV space by rgb space, Structuring one-dimensional characteristic vector after non-uniform quantizing is carried out, the color feature vector of image is obtained.
Step S1.2, image in set is converted into into gray level image by RGB color image, the gray scale for calculating four direction is total to Raw matrix, calculates the parameter value in each direction, and obtains meansigma methodss and standard deviation, obtains the texture feature vector of image.
Step S1.3, two category feature vectors are normalized after, two category features of same image vector is pressed into a definite proportion Example is added, ratio and for 1, and normalization is still met after addition.
Preferably, step S2 specifically includes following steps:
Step S2.1, initial overlaying state is prepared using H doors, T doors, CNOT gate and R doors.
Step S2.2, successively to original state application Oracle F, Oracle O operations, by classical eigenvector information In storing quantum state.
Step S2.3, the specific R doors of the quantum state application to tentatively obtaining.
Step S2.4, use OracleUnderstand the information of ancillary qubit, obtain storing the final amount of characteristic vector Sub- state.
Preferably, step S3 is specially:
During quantum state is prepared, the information in vector is stored in the amplitude of quantum state, by a tenth of the twelve Earthly Branches square The swap operation of battle array is realized being stored in the calculating of included angle cosine distance between the vector on quantum state amplitude;Quantum state | Ψ>With | φ>It is changed into after the operation of SWAP doorsFirst quantum bit of last each superposition state A H is carried out again behind the door, and total evolution of quantum state is It is designated asShould First quantum bit of quantum state is the similarity of two images that 1 probability as needs to ask, i.e.,Described image Similarity is distance between the characteristic vector extracted from test image and training image.
Preferably, step S4 specifically includes following steps:
Step S4.1, the quantum state result application AE algorithms to swap test.
Step S4.2, by the output application majority voting algorithm of AE, obtain for search for minimum range apart from quantum state.
Preferably, step S5 specifically includes following steps:
Step S5.1, the quantum state of all distances is prepared into into superposition state.
Step S5.2, the minima searching algorithm that will be based on Grover apart from superposition state application search for minima, obtain most Subscript i of little value.
Step S5.3, partition testing image are designated as in the classification of the training image of i under.
The image classification scheme of quantum nearest neighbor algorithm of the present invention, to small part image classification is manually marked, used as training figure Picture, and the image collection of an image classification is constituted with an image to be tested.Image in image collection carries out pretreatment, Produce color feature vector and texture feature vector;Then the characteristic vector normalized for obtaining is input to into quantum computer In;And then the inner product distance of characteristic vector is calculated on quantum computer, and prepare the amount of distance with AE and majority voting algorithm Sub- state;Finally search for minimum range, output image generic with quantum minima searching algorithm.
Description of the drawings
Fig. 1 is the flow chart of the image classification scheme of quantum nearest neighbor algorithm of the present invention;
Fig. 2 is that color feature vector extracts flow process;
Fig. 3 is texture feature vector extraction process;
Fig. 4 is quantum state preparation flow;
Fig. 5 is apart from calculating process;
Fig. 6 is apart from quantum state preparation process for search;
Fig. 7 is detection range minima process
Specific embodiment
In order that the objects, technical solutions and advantages of the present invention become apparent from, below in conjunction with accompanying drawing, the present invention is carried out It is further to describe in detail.It should be appreciated that described herein be embodied as only to explain the present invention, it is not used to limit The present invention.
Fig. 1 is a kind of handling process of the image classification scheme based on quantum nearest neighbor algorithm of the present invention.Algorithm starts front right Parts of images handmarking classifies, and as training image, and the image of an image classification task is constituted with a test image Set.This algorithm is made up of 5 steps:Carry out pretreatment to image first, produce color feature vector and texture feature vector And two category features vector is normalized by a certain percentage and is merged;Then the characteristic vector for obtaining is input to into quantum calculation Quantum state is prepared in machine;And then calculate on quantum computer the inner product of testing feature vector and all training feature vectors away from From, and provide the quantum state of distance with AE and majority voting algorithm;Finally with quantum minima searching algorithm in unordered distance Minimum range, output image generic are searched in sequence.Wherein feature extraction is completed in classic computer, distance calculate and Detection range minima is completed on quantum computer, and the preparation of quantum state is the conversion for having classic computer to quantum computer Interface.
Fig. 2 gives color feature vector extraction process.Image zooming-out color feature vector in image collection is used for The calculating of distance.Coloured image is converted to into HSV space by rgb space, the description to image by tri- components of HSV is obtained, point Hue, saturation, intensity is not represented.Hsv color space can better reflect perception and distinguishing ability of the people to color, very The image similarity for being suitably based on color compares.
Non-uniform quantizing is carried out to the sensitivity of different components according to human eye, will tone H spaces be divided into 8 parts, saturation Degree S and brightness V spaces are divided into 3 parts.3 color component synthesizing one-dimensional characteristic vector G after by quantization.Detailed process:9 times of H Component and 3 times of S components and 1 times of V component, summation obtains G.So, tri- components of H, S, V are distributed on a n dimensional vector n Come, the span of G is [0,1 ..., 71].
The number of pixels of each G-value in statistical picture, obtains the color histogram of image.In order to match different size of figure Picture, to rectangular histogram normalization, i.e., divided by the number N of image pixel.So far just obtain can be used to prepare the normalized of quantum state Color feature vector.
Fig. 3 is the extraction process of texture feature vector.To the image zooming-out texture feature vector in image collection be used for away from From calculating.Each RGB color image is converted into into gray level image, each pixel only one of which value is [0,1 ..., 255] Gray value is sampled.
The gray level co-occurrence matrixes on four direction are calculated with the gray level image for obtaining.Gray level co-occurrence matrixes are a N × N Matrix, herein N=256.Take in image any point (x, y) and deviate its another point (x+a, y+b), if this to gray scale It is worth for (g1,g2).Mobile (x, y) obtains various (g1,g2) value, the combination of N × N kinds is had, count every kind of (g1,g2) value occur time Number just obtains gray level co-occurrence matrixes.
Entropy, contrast, correlation, four parameters of energy are tried to achieve respectively.Then the meansigma methodss and standard deviation of four eigenvalues are calculated. Finally to texture feature vector normalized, obtain can be used for the normalized texture feature vector for preparing quantum state.
So far the extraction of two kinds of features of all images is completed, and is given with normalized vector form.To same image Two category features vector is multiplied by respectively a and is added after b, wherein a and b's and for 1, according to different situation and with using different ratios Example, reaches the effect of optimization, and here a and b take 0.5, i.e. two classes vector constitutes new vector with 0.5 ratio.Make the vector In maximum be rmaxAnd vectorial nonzero element is not more than d.
Fig. 4 .a are the flow processs for preparing quantum state.Test vector is made to be v0, training vector is vj(j=1,2 ..., M).It is classical Characteristic vector through 5 step operation preparations into quantum state, the quantum state of training image is expressed as | Ψ>, the quantum state of test image It is expressed as | φ>.
The CMP that the circuit of Fig. 4 .b substitutes into Fig. 4 .c is completed into the first step operation of quantum state preparation jointly, state is obtainedJ represents the subscript of training image, and i represents the subscript of the element in j-th image feature vector.
Operation Oracle F are provided using quantum computer, makes to be stored i-th in characteristic vector on the 3rd quantum bit The subscript of the individual element that is not zero, obtainsUsing the operation Oracle O that quantum computer is provided, make Obtain subscript in the characteristic vector that j-th image is stored on the 4th quantum bit and the element value for determining is operated by F, obtain quantum StateWherein vj,f(j,i)Represent i-th nonzero element of j-th vector.Successively to last Quantum bit applicationAnd Rz(2Φjf(ji)) operation, finally applyOperation understands ancillary qubit | vj,f(j,i)>In information, obtain final quantum state.The quantum state of test image characteristic vector | Ψ>It is stored asThe quantum state of training image characteristic vector | φ>Deposit Chu WeiWhereinIt is the conjugation of Oracle O.
Fig. 5 is inner product apart from calculating process.During quantum state is prepared, the information in vector is stored in quantum state Amplitude in, included angle cosine distance between the vector being stored on quantum state amplitude is realized by the swap operation of unitary matrice Calculating.SWAP doors in figure, i.e. swap gate, realize | α>|β>Arrive | β>|α>Conversion.First quantum bit is through first time H door After be changed intoThen it controls the operation of SWAP doors as control bit.Quantum state | Ψ>With | φ>Through SWAP doors Operation after be changed intoFirst quantum bit of last each superposition state carries out again a H door Afterwards, total evolution of quantum state is It is designated as | γ>.The quantum state first Individual quantum bit is the similarity of two images that 1 probability as needs to ask, i.e.,The similarity of described image be from Distance between the characteristic vector that test image and training image are extracted.
Fig. 6 .a are the quantum state set-up procedures that inner product result of calculation is used for search.The amount that conversation test step is obtained Sub- stateUsing amplitude estimation algorithm, storage is dumped on quantum bit with the similarity information in amplitude;And then will obtain State application majority voting algorithm, complete search for preparation.
Fig. 6 .b are the layouts of amplitude estimation (AE).FLIt is L dimension Fourier transformations,It is inverse Fourier transform, QjIt is to receive The Grover iterative operations of control.Enter AE algorithms and obtain shape such asQuantum state, wherein y mono- two enters System, for encoding the estimated value of P (0), | y>It is orthogonal to | y>So that<y|y>=0.
The process of majority voting algorithm is described in Fig. 6 .a.Through AE algorithms, by training image and test image Similarity information is transferred to quantum bit by quantum state amplitude | y>.Prepare the superposition state of k copy, obtain state Using a computing averaged so that | x1>…|xk>|0>It is changed intoWhereinIt is [x1,…,xk] average.The all superposition states for obtaining are divided into into two set, | Ψ>It is y to represent average, | φ>Represent average It is not equal to y.So obtain new quantum state expression formula, i.e.,In this algorithm, the application of AE is causedAnd Hoeffding inequality shows, when k is sufficiently large, thenProbability it is also sufficiently large.Then apply To the first depositor of quantum state, the quantum state for search is obtained Because<y|y>=0, so | φ;y>Just give | φ>|y>.If | | it is a binomial computing,Value be less than or equal toAnd then be less than or equal toAlso imply that P (y) Less than or equal to 1- | A |2, so as to be less than or equal to Δ.So far, similarity is transferred in quantum bit last in quantum state, complete Into the preparation of the quantum state for range search.
Fig. 7 is the process for searching for minima distance.Using D ü rrMinimum range searching algorithm.First, will be all M distance of description similarity is prepared into superposition state, obtains quantum stateAs search sequence.Then, at random Select subscript i as threshold values, i is less than or equal to M-1;Initialization internal memoryWherein T [j]<T[i];Using Grover searching algorithms;Observe the first quantum bit, make i ' as output result, if T (i ') be less than T (i), using i ' as New Threshold cycle previous step, until circulationIt is secondary, export the subscript that subscript i is minimum range.Test image is drawn Divide and be designated as under in the classification of the training image of i, complete image classification.

Claims (6)

1. a kind of image classification method based on quantum nearest neighbor algorithm, it is characterised in that include:
Step S1, by the classification of a certain proportion of image tagged, image carries out pretreatment, extract image be used for the feature of classification to Amount;
Step S2, the characteristic vector obtained by test image, training image is prepared into into respectively quantum state;
Step S3, to two quantum state application swap test algorithms, calculate the feature extracted from test image and training image to Distance between amount;
Step S4, by the quantum state application AE and majority voting algorithm of the distance for obtaining, export the quantum of the distance for search State;
Step S5, the quantum state application minima searching algorithm adjusted the distance.In the quantum state sequence of distance, most narrow spacing is searched for From determining the classification of test image.
2. the image classification method of quantum nearest neighbor algorithm is based on as claimed in claim 1, it is characterised in that step S1 is specifically wrapped Include following steps:
Step S1.1, the color feature vector for extracting image in image collection.Image is switched to into HSV space by rgb space, is carried out Structuring one-dimensional characteristic vector after non-uniform quantizing, obtains the color feature vector of image;
Step S1.2, image in set is converted into into gray level image by RGB color image, calculates the gray scale symbiosis square of four direction Battle array, calculates the parameter value in each direction, and obtains meansigma methodss and standard deviation, obtains the texture feature vector of image;
Step S1.3, two category feature vectors are normalized after, by two category features of same image vector phase by a certain percentage Plus, ratio and for 1 still meets normalization after addition.
3. the image classification method of quantum nearest neighbor algorithm is based on as claimed in claim 1, it is characterised in that step S2 is specifically wrapped Include following steps:
Step S2.1, initial overlaying state is prepared using H doors, T doors, CNOT gate and R doors.
Step S2.2, successively to original state application Oracle F, Oracle O operations, classical eigenvector information is stored To in quantum state;
Step S2.3, the specific R doors of the quantum state application to tentatively obtaining.
Step S2.4, use OracleUnderstand the information of ancillary qubit, obtain storing the final quantum state of characteristic vector.
4. the image classification method of quantum nearest neighbor algorithm is based on as claimed in claim 1, it is characterised in that step S3 is concrete For:
During quantum state is prepared, the information in vector is stored in the amplitude of quantum state, by unitary matrice Swap operation is realized being stored in the calculating of included angle cosine distance between the vector on quantum state amplitude;Quantum state | Ψ>With | φ>Jing It is changed into after the operation for crossing SWAP doorsFirst quantum bit of last each superposition state is carried out again Behind the door, total evolution of quantum state is H It is designated as | γ>, the quantum First quantum bit of state is the similarity of two images that 1 probability as needs to ask, i.e.,Described image it is similar Degree is distance between the characteristic vector extracted from test image and training image.
5. the image classification method of quantum nearest neighbor algorithm is based on as claimed in claim 1, it is characterised in that step S4 is specifically wrapped Include following steps:
Step S4.1, the quantum state result application AE algorithms to swap test;
Step S4.2, by the output application majority voting algorithm of AE, obtain for search for minimum range apart from quantum state.
6. the image classification method of quantum nearest neighbor algorithm is based on as claimed in claim 1, it is characterised in that step S5 is specifically wrapped Include following steps:
Step S5.1, the quantum state of all distances is prepared into into superposition state;
Step S5.2, the minima searching algorithm that will be based on Grover apart from superposition state application search for minima, obtain minima Subscript i;
Step S5.3, partition testing image are designated as in the classification of the training image of i under.
CN201611187225.8A 2016-12-20 2016-12-20 Image classification method based on quantum nearest-neighbor algorithm Pending CN106650808A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611187225.8A CN106650808A (en) 2016-12-20 2016-12-20 Image classification method based on quantum nearest-neighbor algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611187225.8A CN106650808A (en) 2016-12-20 2016-12-20 Image classification method based on quantum nearest-neighbor algorithm

Publications (1)

Publication Number Publication Date
CN106650808A true CN106650808A (en) 2017-05-10

Family

ID=58834314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611187225.8A Pending CN106650808A (en) 2016-12-20 2016-12-20 Image classification method based on quantum nearest-neighbor algorithm

Country Status (1)

Country Link
CN (1) CN106650808A (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108875675A (en) * 2018-06-28 2018-11-23 西南科技大学 A kind of intelligent fruits recognition methods can be applied to supermarket self-checkout system
CN109740758A (en) * 2019-01-09 2019-05-10 电子科技大学 A kind of kernel method based on quantum calculation
CN110288634A (en) * 2019-06-05 2019-09-27 成都启泰智联信息科技有限公司 A kind of method for tracking target based on Modified particle swarm optimization algorithm
CN110991648A (en) * 2019-12-16 2020-04-10 北京百度网讯科技有限公司 Gaussian distribution quantum state determination method and device and electronic equipment
CN111368920A (en) * 2020-03-05 2020-07-03 中南大学 Quantum twin neural network-based binary classification method and face recognition method thereof
CN111582210A (en) * 2019-07-09 2020-08-25 沈阳工业大学 Human body behavior recognition method based on quantum neural network
US20200349453A1 (en) * 2019-05-01 2020-11-05 1Qb Information Technologies Inc. Method and system for solving a dynamic programming problem
CN112633509A (en) * 2020-12-08 2021-04-09 北京百度网讯科技有限公司 Method for determining distance between quantum data and quantum device
CN112651418A (en) * 2020-05-25 2021-04-13 腾讯科技(深圳)有限公司 Data classification method, classifier training method and system
CN113159324A (en) * 2021-02-26 2021-07-23 山东英信计算机技术有限公司 Quantum equipment calibration method, device, equipment and medium
CN113379056A (en) * 2021-06-02 2021-09-10 北京百度网讯科技有限公司 Quantum state data processing method and device, electronic equipment and storage medium
CN113434723A (en) * 2021-05-26 2021-09-24 中国电子技术标准化研究院 Image retrieval method, device and medium based on quantum Grover algorithm
CN113704707A (en) * 2021-08-26 2021-11-26 湖南天河国云科技有限公司 Block chain-based audio tamper-proof method and device
CN113743457A (en) * 2021-07-29 2021-12-03 暨南大学 Quantum density peak value clustering method based on quantum Grover search technology
CN114187598A (en) * 2020-08-25 2022-03-15 合肥本源量子计算科技有限责任公司 Handwritten digit recognition method, system, device and computer readable storage medium
WO2023010694A1 (en) * 2021-08-02 2023-02-09 腾讯科技(深圳)有限公司 Quantum state preparation circuit generation method and apparatus, chip, device, and program product
CN116229794A (en) * 2023-05-09 2023-06-06 国开启科量子技术(北京)有限公司 Demonstration device and method for simulating quantum algorithm
CN116521918A (en) * 2023-05-08 2023-08-01 西南交通大学 Method for quickly searching similarity graph
WO2024109593A1 (en) * 2022-11-22 2024-05-30 中移(苏州)软件技术有限公司 Quantum generative adversarial network-based image generation method and apparatus
CN116521918B (en) * 2023-05-08 2024-07-09 西南交通大学 Method for quickly searching similarity graph

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105960651A (en) * 2013-12-05 2016-09-21 微软技术许可有限责任公司 A method and system for computing distance measures on a quantum computer

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105960651A (en) * 2013-12-05 2016-09-21 微软技术许可有限责任公司 A method and system for computing distance measures on a quantum computer

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
NATHAN WIEBE: "Quantum Nearest-Neighbor Algorithms for Machine Learning", 《EPRINT ARXIV》 *
王兰莎: "HSV颜色空间及纹理特征映射方法研究", 《图像图形技术研究与应用》 *
陈汉武 等: "量子 K - 近邻算法", 《东南大学学报》 *
高越: "量子K近邻算法研究", 《中国优秀硕士学位论文全文数据库》 *

Cited By (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108875675A (en) * 2018-06-28 2018-11-23 西南科技大学 A kind of intelligent fruits recognition methods can be applied to supermarket self-checkout system
CN109740758A (en) * 2019-01-09 2019-05-10 电子科技大学 A kind of kernel method based on quantum calculation
CN109740758B (en) * 2019-01-09 2023-04-07 电子科技大学 Quantum computation-based nuclear method
US20200349453A1 (en) * 2019-05-01 2020-11-05 1Qb Information Technologies Inc. Method and system for solving a dynamic programming problem
CN110288634A (en) * 2019-06-05 2019-09-27 成都启泰智联信息科技有限公司 A kind of method for tracking target based on Modified particle swarm optimization algorithm
CN111582210A (en) * 2019-07-09 2020-08-25 沈阳工业大学 Human body behavior recognition method based on quantum neural network
CN110991648A (en) * 2019-12-16 2020-04-10 北京百度网讯科技有限公司 Gaussian distribution quantum state determination method and device and electronic equipment
CN110991648B (en) * 2019-12-16 2024-01-23 北京百度网讯科技有限公司 Gaussian distribution quantum state determination method and device and electronic equipment
CN111368920A (en) * 2020-03-05 2020-07-03 中南大学 Quantum twin neural network-based binary classification method and face recognition method thereof
CN111368920B (en) * 2020-03-05 2024-03-05 中南大学 Quantum twin neural network-based classification method and face recognition method thereof
CN112651418A (en) * 2020-05-25 2021-04-13 腾讯科技(深圳)有限公司 Data classification method, classifier training method and system
CN114187598B (en) * 2020-08-25 2024-02-09 本源量子计算科技(合肥)股份有限公司 Handwriting digital recognition method, handwriting digital recognition equipment and computer readable storage medium
CN114187598A (en) * 2020-08-25 2022-03-15 合肥本源量子计算科技有限责任公司 Handwritten digit recognition method, system, device and computer readable storage medium
CN112633509A (en) * 2020-12-08 2021-04-09 北京百度网讯科技有限公司 Method for determining distance between quantum data and quantum device
CN113159324A (en) * 2021-02-26 2021-07-23 山东英信计算机技术有限公司 Quantum equipment calibration method, device, equipment and medium
CN113159324B (en) * 2021-02-26 2023-11-07 山东英信计算机技术有限公司 Quantum device calibration method, device and medium
CN113434723B (en) * 2021-05-26 2023-10-10 中国电子技术标准化研究院 Image retrieval method, device and medium based on quantum Grover algorithm
CN113434723A (en) * 2021-05-26 2021-09-24 中国电子技术标准化研究院 Image retrieval method, device and medium based on quantum Grover algorithm
CN113379056A (en) * 2021-06-02 2021-09-10 北京百度网讯科技有限公司 Quantum state data processing method and device, electronic equipment and storage medium
CN113379056B (en) * 2021-06-02 2023-10-31 北京百度网讯科技有限公司 Quantum state data processing method and device, electronic equipment and storage medium
CN113743457B (en) * 2021-07-29 2023-07-28 暨南大学 Quantum density peak clustering method based on quantum Grover search technology
CN113743457A (en) * 2021-07-29 2021-12-03 暨南大学 Quantum density peak value clustering method based on quantum Grover search technology
JP7389268B2 (en) 2021-08-02 2023-11-29 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 Quantum state preparation circuit generation method, device, chip, equipment and program
WO2023010694A1 (en) * 2021-08-02 2023-02-09 腾讯科技(深圳)有限公司 Quantum state preparation circuit generation method and apparatus, chip, device, and program product
CN113704707A (en) * 2021-08-26 2021-11-26 湖南天河国云科技有限公司 Block chain-based audio tamper-proof method and device
WO2024109593A1 (en) * 2022-11-22 2024-05-30 中移(苏州)软件技术有限公司 Quantum generative adversarial network-based image generation method and apparatus
CN116521918A (en) * 2023-05-08 2023-08-01 西南交通大学 Method for quickly searching similarity graph
CN116521918B (en) * 2023-05-08 2024-07-09 西南交通大学 Method for quickly searching similarity graph
CN116229794B (en) * 2023-05-09 2023-08-18 国开启科量子技术(北京)有限公司 Demonstration device and method for simulating quantum algorithm
CN116229794A (en) * 2023-05-09 2023-06-06 国开启科量子技术(北京)有限公司 Demonstration device and method for simulating quantum algorithm

Similar Documents

Publication Publication Date Title
CN106650808A (en) Image classification method based on quantum nearest-neighbor algorithm
Mishkin et al. Repeatability is not enough: Learning affine regions via discriminability
Shao et al. Performance evaluation of deep feature learning for RGB-D image/video classification
Varga et al. Fully automatic image colorization based on Convolutional Neural Network
WO2018052587A1 (en) Method and system for cell image segmentation using multi-stage convolutional neural networks
Xiao et al. A fast method for particle picking in cryo-electron micrographs based on fast R-CNN
CN111814845B (en) Pedestrian re-identification method based on multi-branch flow fusion model
Shen et al. Deep cross residual network for HEp-2 cell staining pattern classification
Chakravorty et al. Image processing technique to detect fish disease
CN107862680B (en) Target tracking optimization method based on correlation filter
Cai et al. Rgb-d scene classification via multi-modal feature learning
Konukoglu et al. Neighbourhood approximation forests
Chen et al. A convolutional neural network with dynamic correlation pooling
Sardeshmukh et al. Crop image classification using convolutional neural network
Porebski et al. Comparison of color imaging vs. hyperspectral imaging for texture classification
Salhi et al. Color-texture image clustering based on neuro-morphological approach
Zhang et al. Identification of stored grain pests by modified residual network
Mehraj et al. Human recognition using ear based deep learning features
Peng Combine color and shape in real-time detection of texture-less objects
Mayo et al. Experiments with multi-view multi-instance learning for supervised image classification
Singh et al. Wavelet based histogram of oriented gradients feature descriptors for classification of partially occluded objects
CN105975921B (en) Pedestrian detection method based on local feature symbiosis and Partial Least Squares
Mishkin et al. Learning discriminative affine regions via discriminability
El Alami et al. Color face recognition by using quaternion and deep neural networks
Chandraprabha et al. Texture feature extraction for batik images using glcm and glrlm with neural network classification

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20170510

RJ01 Rejection of invention patent application after publication