CN105469376A - Method and device for determining picture similarity - Google Patents

Method and device for determining picture similarity Download PDF

Info

Publication number
CN105469376A
CN105469376A CN201410393684.6A CN201410393684A CN105469376A CN 105469376 A CN105469376 A CN 105469376A CN 201410393684 A CN201410393684 A CN 201410393684A CN 105469376 A CN105469376 A CN 105469376A
Authority
CN
China
Prior art keywords
picture
layer
proper vector
similarity
feature extraction
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.)
Granted
Application number
CN201410393684.6A
Other languages
Chinese (zh)
Other versions
CN105469376B (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201410393684.6A priority Critical patent/CN105469376B/en
Publication of CN105469376A publication Critical patent/CN105469376A/en
Application granted granted Critical
Publication of CN105469376B publication Critical patent/CN105469376B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a method and a device for determining picture similarity, wherein the method and the device belong to the communication field. The method comprises the steps of training a neural network model through utilizing training data and obtaining a picture characteristic extracting model; inputting a first picture and a second picture into the picture characteristic extracting model, and obtaining the characteristic vector of a first picture and the characteristic vector of a second picture on each layer in which an output neuron is used as a characteristic; calculating the similarity between the characteristic vector of the first picture and the characteristic vector of the second picture on each layer; and calculating for obtaining the similarity between the first picture and the second picture according to the similarity between the characteristic vector of the first picture and the characteristic vector of the second picture on each layer. The device comprises a training module, a characteristic extracting module, a first calculating module and a second calculating module. The method and the device have advantages of realizing automatic characteristic extraction based on the picture characteristic extraction model, realizing no requirement for manual operation, greatly saving manpower and time, and improving efficiency in determining the similarity.

Description

Determine the method and apparatus of picture analogies degree
Technical field
The present invention relates to the communications field, particularly a kind of method and apparatus determining picture analogies degree.
Background technology
Along with the development of Internet technology, the application of effect advertisement gets more and more.Effect advertisement refers to that advertiser only needs the advertisement of paying for measurable result.Effect advertisement is widely used in electric business website, social platform or Mobile solution etc.The content overwhelming majority of effect advertisement is picture, has become realize the requisite technological means of service logic based on the feature extraction of picture and Similarity Measure.
At present, common picture analogies degree computing method are as follows: first do feature extraction to picture, as GIST feature; Then abstract is done, as cluster to some local feature; Again these characteristic functionals are turned to proper vector; Similarity formula such as Euclidean distance formulae discovery is finally utilized to obtain picture analogies degree.
But in said method, feature extraction is all based on manual realization, needs personnel to possess stronger professional knowledge, higher to the requirement of personnel, and the whole process need at substantial time, and efficiency is lower.
Summary of the invention
In view of this, embodiments provide a kind of method and apparatus determining picture analogies degree, to realize automatically extracting feature, improve the efficiency determining similarity.Described technical scheme is as follows:
On the one hand, provide a kind of method determining picture analogies degree, described method comprises:
Training data neural network training model is used to obtain picture feature extraction model;
First picture and second picture are inputed to described picture feature extraction model, obtains output neuron as the proper vector of the first picture described on each layer of feature and the proper vector of described second picture;
Similarity between the proper vector of described first picture and the proper vector of described second picture is calculated respectively to described each layer;
According to the similarity between the proper vector of the first picture described on described each layer and the proper vector of described second picture, calculate the similarity of described first picture and second picture.
On the other hand, provide a kind of device determining picture analogies degree, described device comprises:
Training module, obtains picture feature extraction model for using training data neural network training model;
Characteristic extracting module, for the first picture and second picture are inputed to described picture feature extraction model, obtains output neuron as the proper vector of the first picture described on each layer of feature and the proper vector of described second picture;
First computing module, for calculating the similarity between the proper vector of described first picture and the proper vector of described second picture respectively to described each layer;
Second computing module, for according to the similarity between the proper vector of the first picture described on described each layer and the proper vector of described second picture, calculates the similarity of described first picture and second picture.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is: use training data neural network training model to obtain picture feature extraction model; First picture and second picture are inputed to described picture feature extraction model, obtains output neuron as the proper vector of the first picture described on each layer of feature and the proper vector of described second picture; Similarity between the proper vector of described first picture and the proper vector of described second picture is calculated respectively to described each layer; According to the similarity between the proper vector of the first picture described on described each layer and the proper vector of described second picture, calculate the similarity of described first picture and second picture; Wherein, achieve the Automatic Extraction of feature based on picture feature extraction model, without the need to relying on craft, dramatically saves on manpower and time, improve the efficiency determining similarity.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the method flow diagram of the determination picture analogies degree that one embodiment of the invention provides;
Fig. 2 is the method flow diagram of the determination picture analogies degree that another embodiment of the present invention provides;
Fig. 3 is the structural representation of the degree of depth convolutional neural networks that another embodiment of the present invention provides;
Fig. 4 is the visualization feature schematic diagram of the convolutional layer that another embodiment of the present invention provides;
Fig. 5 (a) ~ (d) is the result of calculation schematic diagram of the picture analogies degree that another embodiment of the present invention provides;
Fig. 6 (a) ~ (c) is the schematic diagram of the picture classification that another embodiment of the present invention provides;
Fig. 7 is the structure drawing of device of the determination picture analogies degree that another embodiment of the present invention provides;
Fig. 8 is the structure drawing of device of the determination picture analogies degree that another embodiment of the present invention provides;
Fig. 9 is the server architecture figure that another embodiment of the present invention provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
See Fig. 1, one embodiment of the invention provides a kind of method determining picture analogies degree, comprising:
101: use training data neural network training model to obtain picture feature extraction model.
Neural network (NeuralNetworks, NN) be connected to each other widely by a large amount of, simple processing unit (being called neuron) and the complex networks system that formed, it reflects many essential characteristics of human brain function, is the non-linear dynamic learning system of a high complexity.Neural network model has large-scale parallel, distributed storage and process, self-organization, self-adaptation and self-learning ability, be particularly suitable for processing need to consider simultaneously many factors and condition, out of true and fuzzy information-processing problem.
In the present embodiment, described training data can be picture, and the type of picture is not limit, as can picture in the picture of Shi electricity firm industry or ImageNet database etc.
102: the first picture and second picture are inputed to this picture feature extraction model, obtain output neuron as the proper vector of this first picture on each layer of feature and the proper vector of this second picture.
Wherein, the first picture and second picture are any two pictures, and the method provided by the present embodiment determines the similarity of the first picture and second picture.
103: the similarity between the proper vector of this first picture and the proper vector of this second picture is calculated respectively to this each layer.
In the present embodiment, described output neuron is as each layer of feature usually by multilayer, then every one deck wherein can obtain the proper vector of the first picture, also can obtain the proper vector of second picture.
Such as, output neuron having three layers altogether as feature in feature extraction model, A layer, B layer and C layer, then the proper vector Vb1 can obtain proper vector Va1 that the first picture exports at A layer after the first picture being inputted this model, exporting at B layer and the proper vector Vc1 exported at C layer; The proper vector Vb2 can obtain proper vector Va2 that second picture exports at A layer after second picture being inputted this model, exporting at B layer and the proper vector Vc2 exported at C layer.When calculating the similarity of proper vector, the similarity of the similarity of Va1 and Va2, the similarity of Vb1 and Vb2 and Vc1 and Vc2 can be calculated respectively.
104: according to the similarity between the proper vector of this first picture on this each layer and the proper vector of this second picture, calculate the similarity of this first picture and second picture.
Here can adopt regression algorithm to calculate the similarity of two pictures, the similarity between the proper vector that each layer calculates can get different weights, the result of calculation of picture analogies degree can be made more accurate, improve computational accuracy by adjustment weighted value.
In the present embodiment, the similarity characterization of picture is the floating number between [0,1], and the larger expression of numerical value is more similar, and the less expression of numerical value is more dissimilar.
In the present embodiment, optionally, described use training data neural network training model obtains picture feature extraction model, can comprise:
Use training data based on back-propagation algorithm training degree of depth convolutional neural networks model, obtain picture feature extraction model; Or,
Use training data training degree of depth autocoder, obtain picture feature extraction model.
Further, described use training data, based on back-propagation algorithm training degree of depth convolutional neural networks model, obtains picture feature extraction model, can comprise:
Choose degree of depth convolutional neural networks model, described degree of depth convolutional neural networks model comprises M layer convolutional layer and the full articulamentum of N layer;
In M+N layer, choose the K layer of specifying do feature extraction, export as proper vector using the neuron of this K layer;
Use training data to train this degree of depth convolutional neural networks model based on back-propagation algorithm, obtain the picture feature extraction model with K proper vector.
In the present embodiment, preferably, described K layer is full articulamentum, or comprises convolutional layer and full articulamentum.
In the present embodiment, optionally, described similarity between the proper vector of this first picture and the proper vector of this second picture is calculated respectively to this each layer, can comprise:
Use cosine-algorithm, Jaccard algorithm or Pearson algorithm, the similarity between the proper vector of this first picture and the proper vector of this second picture is calculated respectively to this each layer.
In the present embodiment, optionally, the similarity between the described proper vector according to this first picture on this each layer and the proper vector of this second picture, calculates the similarity of this first picture and second picture, can comprise:
Use linear regression algorithm or logistic regression algorithm, according to the similarity between the proper vector of this first picture on this each layer and the proper vector of this second picture, calculate the similarity of this first picture and second picture.
The said method that the present embodiment provides, uses training data neural network training model to obtain picture feature extraction model; First picture and second picture are inputed to described picture feature extraction model, obtains output neuron as the proper vector of the first picture described on each layer of feature and the proper vector of described second picture; Similarity between the proper vector of described first picture and the proper vector of described second picture is calculated respectively to described each layer; According to the similarity between the proper vector of the first picture described on described each layer and the proper vector of described second picture, calculate the similarity of described first picture and second picture; Wherein, achieve the Automatic Extraction of feature based on picture feature extraction model, without the need to relying on craft, dramatically saves on manpower and time, improve the efficiency determining similarity.
See Fig. 2, another embodiment of the present invention provides a kind of method determining picture analogies degree, and the method comprises:
201: use training data based on back-propagation algorithm training degree of depth convolutional neural networks model, obtain picture feature extraction model.
Wherein, degree of depth convolutional neural networks (deepconvolutionalneuralnetwork) is a kind of artificial neural network, is also a kind of machine learning model having supervision of the degree of depth, one of representative method of degree of depth study.Degree of depth study (deeplearning) is a branch of machine learning, and it is attempted the multilayer learnt out feature or concept and expresses, and forms more abstract high-level characteristic, to find that the distributed nature of data represents by combination low-level feature.
Back-propagation algorithm (BackPropagation, BP) is a kind of supervised learning algorithm, is often used to training multi-layer perception(MLP) and feedforward neural network.In the present embodiment, back-propagation algorithm is used to train degree of depth convolutional neural networks model.Back-propagation algorithm mainly comprises two links: excitation is propagated and weight upgrades, and repeatedly carries out loop iteration by these two links, until the response of this model to input reaches predetermined target zone.
The advantage of degree of depth convolutional neural networks is used to be, it can directly use picture as the input of network, avoid the preprocessing process of series of complex during artificial extraction feature, the mode that explicit features extracts is converted into the feature extraction of implicit expression, dramatically saves on the time, improve the efficiency of feature extraction.In addition, this network structure has height unchangeability to translation, proportional zoom, inclination or other forms of distortion.
In addition, this step can also be replaced by following steps:
Use training data training degree of depth autocoder, obtain picture feature extraction model.
Wherein, degree of depth autocoder (deepautoencoder) is a kind of unsupervised degree of depth learning method, also belongs to neural network, and it carrys out training pattern by reappearing input signal as far as possible, can be used for doing feature extraction.
202: the first picture and second picture are inputed to this picture feature extraction model, obtain output neuron as the proper vector of this first picture on each layer of feature and the proper vector of this second picture.
203: use cosine-algorithm, Jaccard Jie Kade algorithm or Pearson Pearson came algorithm, the similarity between the proper vector of this first picture and the proper vector of this second picture is calculated respectively to this each layer.
Wherein, cosine-algorithm (cosinesimilarity) is the similarity that cosine value by measuring two inner product of vectors space angles measures between them.Jaccard algorithm and Pearson algorithm are also all the algorithms calculating similarity, do not do too much explanation herein.Be described for cosine-algorithm below, this algorithm can represent with following formula:
Sim layern=cosine(fV ni,fV nj);
Wherein, i and j represents any two different pictures, and n represents the number of plies in degree of depth convolutional neural networks, fv nirepresent the proper vector that picture i extracts in n-th layer, fv njrepresent the proper vector that picture j extracts in n-th layer, sim layernsimilarity between the proper vector representing these two pictures in n-th layer.
204: use linear regression algorithm or logistic regression algorithm, according to the similarity between the proper vector of this first picture on this each layer and the proper vector of this second picture, calculate the similarity of this first picture and second picture.
Wherein, linear regression algorithm and logistic regression algorithm are all the algorithms for returning calculating, do not repeat herein, and certainly, under other embodiment, also can adopt other regression algorithm, the present embodiment is not specifically limited this.Be specifically described for linear regression algorithm below, this linear regression algorithm can represent with following formula:
similarity = Σ k = 1 m W k × sim layerk ;
Wherein, m represents the number of plies doing feature extraction of specifying in degree of depth convolutional neural networks, and k is any layer in m layer, k=1 ..., m, sim layerkfor the similarity between the proper vector of two pictures that k layer calculates, W kfor with this sim layerkcorresponding weight, similarity represents the similarity between these two pictures, belongs to [0,1] interval, and it is more similar to be worth larger expression, and the similarity of identical picture is 1.Described weight can be arranged according to the test result of test data, and the present embodiment is not specifically limited this.
In said method, step 201 can specifically comprise:
Choose degree of depth convolutional neural networks model, described degree of depth convolutional neural networks model comprises M layer convolutional layer and the full articulamentum of N layer; In M+N layer, choose the K layer of specifying do feature extraction, export as proper vector using the neuron of this K layer; Use training data to train this degree of depth convolutional neural networks model based on back-propagation algorithm, obtain the picture feature extraction model with K proper vector.
Preferably, described K layer is full articulamentum, or comprises convolutional layer and full articulamentum.In the present embodiment, convolutional layer includes but not limited to: convolution, RectifiedLinearUnits (neural network excitation function), max-pooling (the lower methods of sampling) or normalization (standardization) etc., the present embodiment is not specifically limited this.In order to improve the computational accuracy of similarity, described K layer can be selected to comprise convolutional layer and full articulamentum.
Such as, see Fig. 3, it is the structural representation of the degree of depth convolutional neural networks that one embodiment of the invention provides.Wherein, left end is input end, and right-hand member is output terminal, comprises five layers of convolutional layer and three layers of full articulamentum from left to right successively.Input end is original image, and output terminal is the proper vector of picture.For each layer network, concrete network parameter can be pre-set, so that according to the parameter training model arranged.The present embodiment is not specifically limited the parameter arranged, and is described for table 1.
Table 1
Wherein, the picture of input is scaled to 227*227 pixel size, point RGB tri-color dimension inputs.Ground floor is convolutional layer to layer 5 L1 ~ L5, and layer 6 is full articulamentum to the 8th layer of L6 ~ L8.For ground floor, the size of convolution filter is 11*11, and convolution stride is 4, and this layer has 96 convolution filters, and the output of this layer is the picture of 96 55*55 sizes.After ground floor convolutional filtering, also perform ReLUs operation and Max-Pooling operation.Above-mentioned three full articulamentums are equivalent to three layers of full Connection Neural Network sorter of adding on the basis of five layers of convolutional layer.The neuron number of layer 6 and layer 7 is 4096, and the neuron number of the 8th layer is 1000, is equivalent to 1000 picture classifications of training objective.
In said structure, specify and extract the number of plies of feature and do not limit, as can be layer 6 to the 8th layer, or third layer is to layer 7 etc.Preferably, layer 5 can be chosen and do feature extraction to the 8th layer, namely comprise a convolutional layer and three full articulamentums.This feature of four layers exported and be designated as four vectors respectively, the dimension of these four proper vectors is respectively 43264 (=256*13*13), 4096,4096,1000.
In the present embodiment, convolutional layer belongs to low layer, and full articulamentum belongs to high-rise.The feature of low layer can characterize the minutia of picture, as texture, displacement, edge etc.Such as, see Fig. 4, for the original image in figure, can obtain according to above-mentioned network structure the picture feature that convolutional layer ground floor L1, second layer L2 and third layer L3 as shown in the figure characterize, what can find out that these features reflect is the minutia of picture.High-rise feature can characterize the semantic feature of picture, as scene, classification etc.Therefore, when specifying K layer not only to comprise convolutional layer but also comprised full articulamentum, the feature extracted is more accurate, the picture analogies degree calculated not only can catch the detail differences of picture, the more important thing is can from semantically understanding picture, therefore, the calculating of picture analogies degree is more accurate, and accuracy rate can reach significant lifting.
In order to the accuracy of the said method calculating similarity that the present embodiment provides is described better.Provide concrete examples prove below.See Fig. 5, it is the picture analogies degree result of calculation schematic diagram that another embodiment of the present invention provides.Wherein, in two pictures of Fig. 5 (a), two personages are the same, but stance and word are annotated and commented on different, and the picture analogies degree similarity=0.641919076443 calculated, visible similarity is still very high.Not high from picture pixels similarity in two pictures of Fig. 5 (b), but understand angle from picture, both women's shoes, should have certain similarity, the result of calculating is similarity=0.492526054382.In two pictures of Fig. 5 (c) drafting of personage and position all different, but owing to being same personage, so there is certain similarity, the result of calculating is similarity=0.509093165398.Be all the half body head portrait of a schoolgirl in two pictures of Fig. 5 (d), but one is game emphatically, another focuses on clothes, so similarity-rough set is low, the result of calculating is similarity=0.216924488544.As can be seen from these simple examples, method provided by the invention, while catching picture detail, more can understand picture, so the picture analogies degree calculated is more reasonable.
In addition, it is worth mentioning that, in the present embodiment, training degree of depth convolutional neural networks model can obtain picture classification model, if specify the layer extracting feature in the process of this training, then also can train while obtaining picture classification model and obtain picture feature extraction model.Therefore, in training, create picture classification model and feature extraction model simultaneously.Wherein, described picture classification model can be used for classifying to picture, and has good precision.
Such as, from the picture classification training data patting net and get a large amount of electric firm industry, the picture classification training data of 1000 classifications of the whole industry is got from ImageNet.Utilize these classification based training data, trained degree of depth convolutional neural networks model respectively based on the training platform Caffe that increases income, obtain Paipai electricity firm's industry picture classification model and ImageNet picture classification model.Respectively the picture of above-mentioned acquisition is tested with these two models, Figure 6 shows that the test result of three pictures wherein.Fig. 6 (a) and (b) are the examples patting electric firm industry picture classification device, and Fig. 6 (c) is the example of ImageNet picture classification device.Having 5 specific names below each picture, is successively Top1 ~ Top5 according to rank.The data of each classification right are the probability that this picture calculated belongs to this classification.The probability belonging to first classification rank " Designer Men's Wear " as the picture in Fig. 6 (a) is 0.910874903202.As can be seen from figure, three pictures adhere to the probability of 5 classifications separately, and the accuracy rate that the result of Paipai electricity firm industry picture classification device classification belongs to Top1 classification can reach 50%, and the accuracy rate belonging to Top1 ~ Top5 classification can reach 85%; The accuracy rate that the result that ImageNet picture classification device is classified belongs to Top1 classification can reach 40%, and the accuracy rate belonging to Top1 ~ Top5 classification can reach 80%.
The said method that the present embodiment provides, uses training data neural network training model to obtain picture feature extraction model; First picture and second picture are inputed to described picture feature extraction model, obtains output neuron as the proper vector of the first picture described on each layer of feature and the proper vector of described second picture; Similarity between the proper vector of described first picture and the proper vector of described second picture is calculated respectively to described each layer; According to the similarity between the proper vector of the first picture described on described each layer and the proper vector of described second picture, calculate the similarity of described first picture and second picture; Wherein, achieve the Automatic Extraction of feature based on picture feature extraction model, without the need to relying on craft, dramatically saves on manpower and time, improve the efficiency determining similarity.
See Fig. 7, another embodiment of the present invention provides a kind of device determining picture analogies degree, comprising:
Training module 701, obtains picture feature extraction model for using training data neural network training model;
Characteristic extracting module 702, for the first picture and second picture are inputed to this picture feature extraction model, obtains output neuron as the proper vector of this first picture on each layer of feature and the proper vector of this second picture;
First computing module 703, for calculating the similarity between the proper vector of this first picture and the proper vector of this second picture respectively to this each layer;
Second computing module 704, for according to the similarity between the proper vector of this first picture on this each layer and the proper vector of this second picture, calculates the similarity of this first picture and second picture.
See Fig. 8, in the present embodiment, optionally, described training module 701 can comprise:
First training unit 701a, for using training data based on back-propagation algorithm training degree of depth convolutional neural networks model, obtains picture feature extraction model; Or,
Second training unit 701b, for using training data to train degree of depth autocoder, obtains picture feature extraction model.
In the present embodiment, optionally, described first training unit may be used for:
Choose degree of depth convolutional neural networks model, this degree of depth convolutional neural networks model comprises M layer convolutional layer and the full articulamentum of N layer;
In M+N layer, choose the K layer of specifying do feature extraction, export as proper vector using the neuron of this K layer;
Use training data to train this degree of depth convolutional neural networks model based on back-propagation algorithm, obtain the picture feature extraction model with K proper vector.
Preferably, described K layer is full articulamentum, or comprises convolutional layer and full articulamentum.
In the present embodiment, optionally, described first computing module 703 can comprise:
First computing unit, for using cosine-algorithm, Jaccard algorithm or Pearson algorithm, calculates the similarity between the proper vector of this first picture and the proper vector of this second picture respectively to this each layer.
In the present embodiment, optionally, described second computing module 704 can comprise:
Second computing unit, for using linear regression algorithm or logistic regression algorithm, according to the similarity between the proper vector of this first picture on this each layer and the proper vector of this second picture, calculates the similarity of this first picture and second picture.
The said apparatus that the present embodiment provides can perform the method that above-mentioned either method embodiment provides, and process refers to the description in embodiment of the method, does not repeat herein.
The said apparatus that the present embodiment provides, uses training data neural network training model to obtain picture feature extraction model; First picture and second picture are inputed to described picture feature extraction model, obtains output neuron as the proper vector of the first picture described on each layer of feature and the proper vector of described second picture; Similarity between the proper vector of described first picture and the proper vector of described second picture is calculated respectively to described each layer; According to the similarity between the proper vector of the first picture described on described each layer and the proper vector of described second picture, calculate the similarity of described first picture and second picture; Wherein, achieve the Automatic Extraction of feature based on picture feature extraction model, without the need to relying on craft, dramatically saves on manpower and time, improve the efficiency determining similarity.
Another embodiment of the present invention provides a kind of server, and this server may be used for the method performing the determination picture analogies degree provided in above-described embodiment.See Fig. 9, this server 1900 can produce larger difference because of configuration or performance difference, one or more central processing units (centralprocessingunits can be comprised, CPU) 1922 (such as, one or more processors) and storer 1932, one or more store the storage medium 1930 (such as one or more mass memory units) of application program 1942 or data 1944.Wherein, storer 1932 and storage medium 1930 can be of short duration storages or store lastingly.The program being stored in storage medium 1930 can comprise one or more modules (diagram does not mark), and each module can comprise a series of command operatings in server.Further, central processing unit 1922 can be set to communicate with storage medium 1930, and server 1900 performs a series of command operatings in storage medium 1930.
Server 1900 can also comprise one or more power supplys 1926, one or more wired or wireless network interfaces 1950, one or more IO interface 1958, and/or, one or more operating system 1941, such as WindowsServerTM, MacOSXTM, UnixTM, LinuxTM, FreeBSDTM etc.
Specifically in the present embodiment, be configured to perform described more than one or one routine package containing the instruction for carrying out following operation by more than one or one processor:
Training data neural network training model is used to obtain picture feature extraction model;
First picture and second picture are inputed to described picture feature extraction model, obtains output neuron as the proper vector of the first picture described on each layer of feature and the proper vector of described second picture;
Similarity between the proper vector of described first picture and the proper vector of described second picture is calculated respectively to described each layer;
According to the similarity between the proper vector of the first picture described on described each layer and the proper vector of described second picture, calculate the similarity of described first picture and second picture.
Wherein, described use training data neural network training model obtains picture feature extraction model, comprising:
Use training data based on back-propagation algorithm training degree of depth convolutional neural networks model, obtain picture feature extraction model; Or,
Use training data training degree of depth autocoder, obtain picture feature extraction model.
Wherein, described use training data, based on back-propagation algorithm training degree of depth convolutional neural networks model, obtains picture feature extraction model, comprising:
Choose degree of depth convolutional neural networks model, described degree of depth convolutional neural networks model comprises M layer convolutional layer and the full articulamentum of N layer;
In M+N layer, choose the K layer of specifying do feature extraction, export as proper vector using the neuron of described K layer;
Use training data to train described degree of depth convolutional neural networks model based on back-propagation algorithm, obtain the picture feature extraction model with K proper vector.
Wherein, described K layer is full articulamentum, or comprises convolutional layer and full articulamentum.
Wherein, described similarity between the proper vector of described first picture and the proper vector of described second picture is calculated respectively to described each layer, comprising:
Use cosine-algorithm, Jie Kade algorithm or Pearson came algorithm, the similarity between the proper vector of described first picture and the proper vector of described second picture is calculated respectively to described each layer.
Wherein, the similarity between the described proper vector according to the first picture described on described each layer and the proper vector of described second picture, calculates the similarity of described first picture and second picture, comprising:
Use linear regression algorithm or logistic regression algorithm, according to the similarity between the proper vector of the first picture described on described each layer and the proper vector of described second picture, calculate the similarity of described first picture and second picture.
The above-mentioned server that the present embodiment provides, uses training data neural network training model to obtain picture feature extraction model; First picture and second picture are inputed to described picture feature extraction model, obtains output neuron as the proper vector of the first picture described on each layer of feature and the proper vector of described second picture; Similarity between the proper vector of described first picture and the proper vector of described second picture is calculated respectively to described each layer; According to the similarity between the proper vector of the first picture described on described each layer and the proper vector of described second picture, calculate the similarity of described first picture and second picture; Wherein, achieve the Automatic Extraction of feature based on picture feature extraction model, without the need to relying on craft, dramatically saves on manpower and time, improve the efficiency determining similarity.
Another embodiment of the present invention provides a kind of non-volatile readable storage medium, one or more module (programs) is stored in this storage medium, when this one or more module is employed in a device, this equipment can be made to perform the instruction (instructions) of following steps:
Training data neural network training model is used to obtain picture feature extraction model;
First picture and second picture are inputed to described picture feature extraction model, obtains output neuron as the proper vector of the first picture described on each layer of feature and the proper vector of described second picture;
Similarity between the proper vector of described first picture and the proper vector of described second picture is calculated respectively to described each layer;
According to the similarity between the proper vector of the first picture described on described each layer and the proper vector of described second picture, calculate the similarity of described first picture and second picture.
Wherein, described use training data neural network training model obtains picture feature extraction model, comprising:
Use training data based on back-propagation algorithm training degree of depth convolutional neural networks model, obtain picture feature extraction model; Or,
Use training data training degree of depth autocoder, obtain picture feature extraction model.
Wherein, described use training data, based on back-propagation algorithm training degree of depth convolutional neural networks model, obtains picture feature extraction model, comprising:
Choose degree of depth convolutional neural networks model, described degree of depth convolutional neural networks model comprises M layer convolutional layer and the full articulamentum of N layer;
In M+N layer, choose the K layer of specifying do feature extraction, export as proper vector using the neuron of described K layer;
Use training data to train described degree of depth convolutional neural networks model based on back-propagation algorithm, obtain the picture feature extraction model with K proper vector.
Wherein, described K layer is full articulamentum, or comprises convolutional layer and full articulamentum.
Wherein, described similarity between the proper vector of described first picture and the proper vector of described second picture is calculated respectively to described each layer, comprising:
Use cosine-algorithm, Jie Kade algorithm or Pearson came algorithm, the similarity between the proper vector of described first picture and the proper vector of described second picture is calculated respectively to described each layer.
Wherein, the similarity between the described proper vector according to the first picture described on described each layer and the proper vector of described second picture, calculates the similarity of described first picture and second picture, comprising:
Use linear regression algorithm or logistic regression algorithm, according to the similarity between the proper vector of the first picture described on described each layer and the proper vector of described second picture, calculate the similarity of described first picture and second picture.
The above-mentioned non-volatile readable storage medium that the present embodiment provides, uses training data neural network training model to obtain picture feature extraction model; First picture and second picture are inputed to described picture feature extraction model, obtains output neuron as the proper vector of the first picture described on each layer of feature and the proper vector of described second picture; Similarity between the proper vector of described first picture and the proper vector of described second picture is calculated respectively to described each layer; According to the similarity between the proper vector of the first picture described on described each layer and the proper vector of described second picture, calculate the similarity of described first picture and second picture; Wherein, achieve the Automatic Extraction of feature based on picture feature extraction model, without the need to relying on craft, dramatically saves on manpower and time, improve the efficiency determining similarity.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of non-volatile readable storage medium, described non-volatile readable storage medium can be ROM (read-only memory), disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (12)

1. determine a method for picture analogies degree, it is characterized in that, described method comprises:
Training data neural network training model is used to obtain picture feature extraction model;
First picture and second picture are inputed to described picture feature extraction model, obtains output neuron as the proper vector of the first picture described on each layer of feature and the proper vector of described second picture;
Similarity between the proper vector of described first picture and the proper vector of described second picture is calculated respectively to described each layer;
According to the similarity between the proper vector of the first picture described on described each layer and the proper vector of described second picture, calculate the similarity of described first picture and second picture.
2. method according to claim 1, is characterized in that, described use training data neural network training model obtains picture feature extraction model, comprising:
Use training data based on back-propagation algorithm training degree of depth convolutional neural networks model, obtain picture feature extraction model; Or,
Use training data training degree of depth autocoder, obtain picture feature extraction model.
3. method according to claim 2, is characterized in that, described use training data, based on back-propagation algorithm training degree of depth convolutional neural networks model, obtains picture feature extraction model, comprising:
Choose degree of depth convolutional neural networks model, described degree of depth convolutional neural networks model comprises M layer convolutional layer and the full articulamentum of N layer;
In M+N layer, choose the K layer of specifying do feature extraction, export as proper vector using the neuron of described K layer;
Use training data to train described degree of depth convolutional neural networks model based on back-propagation algorithm, obtain the picture feature extraction model with K proper vector.
4. method according to claim 3, is characterized in that, described K layer is full articulamentum, or comprises convolutional layer and full articulamentum.
5. method according to claim 1, is characterized in that, describedly calculates similarity between the proper vector of described first picture and the proper vector of described second picture respectively to described each layer, comprising:
Use cosine-algorithm, Jie Kade algorithm or Pearson came algorithm, the similarity between the proper vector of described first picture and the proper vector of described second picture is calculated respectively to described each layer.
6. method according to claim 1, is characterized in that, the similarity between the described proper vector according to the first picture described on described each layer and the proper vector of described second picture, calculates the similarity of described first picture and second picture, comprising:
Use linear regression algorithm or logistic regression algorithm, according to the similarity between the proper vector of the first picture described on described each layer and the proper vector of described second picture, calculate the similarity of described first picture and second picture.
7. determine a device for picture analogies degree, it is characterized in that, described device comprises:
Training module, obtains picture feature extraction model for using training data neural network training model;
Characteristic extracting module, for the first picture and second picture are inputed to described picture feature extraction model, obtains output neuron as the proper vector of the first picture described on each layer of feature and the proper vector of described second picture;
First computing module, for calculating the similarity between the proper vector of described first picture and the proper vector of described second picture respectively to described each layer;
Second computing module, for according to the similarity between the proper vector of the first picture described on described each layer and the proper vector of described second picture, calculates the similarity of described first picture and second picture.
8. device according to claim 7, is characterized in that, described training module comprises:
First training unit, for using training data based on back-propagation algorithm training degree of depth convolutional neural networks model, obtains picture feature extraction model; Or,
Second training unit, for using training data to train degree of depth autocoder, obtains picture feature extraction model.
9. device according to claim 8, is characterized in that, described first training unit is used for:
Choose degree of depth convolutional neural networks model, described degree of depth convolutional neural networks model comprises M layer convolutional layer and the full articulamentum of N layer;
In M+N layer, choose the K layer of specifying do feature extraction, export as proper vector using the neuron of described K layer;
Use training data to train described degree of depth convolutional neural networks model based on back-propagation algorithm, obtain the picture feature extraction model with K proper vector.
10. device according to claim 9, is characterized in that, described K layer is full articulamentum, or comprises convolutional layer and full articulamentum.
11. devices according to claim 7, is characterized in that, described first computing module comprises:
First computing unit, for using cosine-algorithm, Jie Kade algorithm or Pearson came algorithm, calculates the similarity between the proper vector of described first picture and the proper vector of described second picture respectively to described each layer.
12. devices according to claim 7, is characterized in that, described second computing module comprises:
Second computing unit, for using linear regression algorithm or logistic regression algorithm, according to the similarity between the proper vector of the first picture described on described each layer and the proper vector of described second picture, calculate the similarity of described first picture and second picture.
CN201410393684.6A 2014-08-12 2014-08-12 The method and apparatus for determining picture similarity Active CN105469376B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410393684.6A CN105469376B (en) 2014-08-12 2014-08-12 The method and apparatus for determining picture similarity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410393684.6A CN105469376B (en) 2014-08-12 2014-08-12 The method and apparatus for determining picture similarity

Publications (2)

Publication Number Publication Date
CN105469376A true CN105469376A (en) 2016-04-06
CN105469376B CN105469376B (en) 2019-10-25

Family

ID=55607037

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410393684.6A Active CN105469376B (en) 2014-08-12 2014-08-12 The method and apparatus for determining picture similarity

Country Status (1)

Country Link
CN (1) CN105469376B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106251292A (en) * 2016-08-09 2016-12-21 央视国际网络无锡有限公司 A kind of photo resolution method for improving
CN107729931A (en) * 2017-10-09 2018-02-23 北京京东尚科信息技术有限公司 Picture methods of marking and device
CN107801090A (en) * 2017-11-03 2018-03-13 北京奇虎科技有限公司 Utilize the method, apparatus and computing device of audio-frequency information detection anomalous video file
CN108242046A (en) * 2016-12-27 2018-07-03 阿里巴巴集团控股有限公司 Image processing method and relevant device
CN108509466A (en) * 2017-04-14 2018-09-07 腾讯科技(深圳)有限公司 A kind of information recommendation method and device
WO2018205715A1 (en) * 2017-05-08 2018-11-15 京东方科技集团股份有限公司 Medical image representation-generating system, training method therefor and representation generation method
CN109389745A (en) * 2018-08-29 2019-02-26 广州伊思高科技有限公司 A kind of intelligent goods selling equipment and method based on image procossing
CN111061586A (en) * 2019-12-05 2020-04-24 深圳先进技术研究院 Container cloud platform anomaly detection method and system and electronic equipment
CN111291765A (en) * 2018-12-07 2020-06-16 北京京东尚科信息技术有限公司 Method and device for determining similar pictures
CN111381573A (en) * 2018-12-27 2020-07-07 北京安控科技股份有限公司 Method and system for predicting safety of industrial control system
CN112036501A (en) * 2020-09-04 2020-12-04 深圳壹账通智能科技有限公司 Image similarity detection method based on convolutional neural network and related equipment thereof
WO2021244138A1 (en) * 2020-06-04 2021-12-09 Oppo广东移动通信有限公司 Dial generation method and apparatus, electronic device and computer-readable storage medium
WO2023221273A1 (en) * 2022-05-16 2023-11-23 宝德计算机***股份有限公司 Server pressure testing method and device, and computer storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107341509B (en) * 2017-06-29 2020-12-04 北京小米移动软件有限公司 Convolutional neural network training method and device and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101706964A (en) * 2009-08-27 2010-05-12 北京交通大学 Color constancy calculating method and system based on derivative structure of image
CN103020645A (en) * 2013-01-06 2013-04-03 深圳市彩讯科技有限公司 System and method for junk picture recognition
CN103366180A (en) * 2013-06-14 2013-10-23 山东大学 Cell image segmentation method based on automatic feature learning

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101706964A (en) * 2009-08-27 2010-05-12 北京交通大学 Color constancy calculating method and system based on derivative structure of image
CN103020645A (en) * 2013-01-06 2013-04-03 深圳市彩讯科技有限公司 System and method for junk picture recognition
CN103366180A (en) * 2013-06-14 2013-10-23 山东大学 Cell image segmentation method based on automatic feature learning

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张玲: "《基于内容图像检索***的研究》", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106251292A (en) * 2016-08-09 2016-12-21 央视国际网络无锡有限公司 A kind of photo resolution method for improving
CN106251292B (en) * 2016-08-09 2019-04-16 央视国际网络无锡有限公司 A kind of photo resolution method for improving
CN108242046A (en) * 2016-12-27 2018-07-03 阿里巴巴集团控股有限公司 Image processing method and relevant device
CN108509466A (en) * 2017-04-14 2018-09-07 腾讯科技(深圳)有限公司 A kind of information recommendation method and device
US11024066B2 (en) 2017-05-08 2021-06-01 Boe Technology Group Co., Ltd. Presentation generating system for medical images, training method thereof and presentation generating method
WO2018205715A1 (en) * 2017-05-08 2018-11-15 京东方科技集团股份有限公司 Medical image representation-generating system, training method therefor and representation generation method
CN107729931A (en) * 2017-10-09 2018-02-23 北京京东尚科信息技术有限公司 Picture methods of marking and device
CN107801090A (en) * 2017-11-03 2018-03-13 北京奇虎科技有限公司 Utilize the method, apparatus and computing device of audio-frequency information detection anomalous video file
CN109389745A (en) * 2018-08-29 2019-02-26 广州伊思高科技有限公司 A kind of intelligent goods selling equipment and method based on image procossing
CN111291765A (en) * 2018-12-07 2020-06-16 北京京东尚科信息技术有限公司 Method and device for determining similar pictures
CN111381573A (en) * 2018-12-27 2020-07-07 北京安控科技股份有限公司 Method and system for predicting safety of industrial control system
CN111381573B (en) * 2018-12-27 2021-07-09 北京安控科技股份有限公司 Method and system for predicting safety of industrial control system
CN111061586A (en) * 2019-12-05 2020-04-24 深圳先进技术研究院 Container cloud platform anomaly detection method and system and electronic equipment
CN111061586B (en) * 2019-12-05 2023-09-19 深圳先进技术研究院 Container cloud platform anomaly detection method and system and electronic equipment
WO2021244138A1 (en) * 2020-06-04 2021-12-09 Oppo广东移动通信有限公司 Dial generation method and apparatus, electronic device and computer-readable storage medium
CN112036501A (en) * 2020-09-04 2020-12-04 深圳壹账通智能科技有限公司 Image similarity detection method based on convolutional neural network and related equipment thereof
WO2023221273A1 (en) * 2022-05-16 2023-11-23 宝德计算机***股份有限公司 Server pressure testing method and device, and computer storage medium

Also Published As

Publication number Publication date
CN105469376B (en) 2019-10-25

Similar Documents

Publication Publication Date Title
CN105469376A (en) Method and device for determining picture similarity
Ale et al. Deep learning based plant disease detection for smart agriculture
Li et al. Localizing and quantifying damage in social media images
CN111860588B (en) Training method for graphic neural network and related equipment
CN112418392A (en) Neural network construction method and device
CN111046916A (en) Motor fault diagnosis method and system based on void convolution capsule network
CN112990211A (en) Neural network training method, image processing method and device
Lu et al. A novel feature extraction method using deep neural network for rolling bearing fault diagnosis
CN107330750A (en) A kind of recommended products figure method and device, electronic equipment
CN110222718B (en) Image processing method and device
CN111339935B (en) Optical remote sensing picture classification method based on interpretable CNN image classification model
CN108121702A (en) Mathematics subjective item reads and appraises method and system
CN111047078B (en) Traffic characteristic prediction method, system and storage medium
CN107729901A (en) Method for building up, device and the image processing method and system of image processing model
CN113095370A (en) Image recognition method and device, electronic equipment and storage medium
CN104408470A (en) Gender detection method based on average face preliminary learning
WO2022111387A1 (en) Data processing method and related apparatus
CN106997373A (en) A kind of link prediction method based on depth confidence network
Li et al. Localizing and quantifying infrastructure damage using class activation mapping approaches
CN112488963A (en) Method for enhancing crop disease data
CN112749663A (en) Agricultural fruit maturity detection system based on Internet of things and CCNN model
Monigari et al. Plant leaf disease prediction
WO2022100607A1 (en) Method for determining neural network structure and apparatus thereof
CN107633527A (en) Target tracking method and device based on full convolutional neural networks
CN110839242A (en) Abnormal number identification method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant