CN109543736B - Feature comparison method and device - Google Patents

Feature comparison method and device Download PDF

Info

Publication number
CN109543736B
CN109543736B CN201811359552.6A CN201811359552A CN109543736B CN 109543736 B CN109543736 B CN 109543736B CN 201811359552 A CN201811359552 A CN 201811359552A CN 109543736 B CN109543736 B CN 109543736B
Authority
CN
China
Prior art keywords
feature
characteristic
preset
feature vector
length
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.)
Active
Application number
CN201811359552.6A
Other languages
Chinese (zh)
Other versions
CN109543736A (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.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201811359552.6A priority Critical patent/CN109543736B/en
Publication of CN109543736A publication Critical patent/CN109543736A/en
Application granted granted Critical
Publication of CN109543736B publication Critical patent/CN109543736B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/757Matching configurations of points or features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Abstract

The embodiment of the application provides a feature comparison method and a feature comparison device, which relate to the technical field of data processing, wherein the method comprises the following steps: obtaining the length of a feature vector to be compared as a first feature length; according to the first characteristic length and the length of a characteristic vector stored in a preset characteristic library, screening similar characteristic vectors of the characteristic vector to be compared from the characteristic vectors stored in the preset characteristic library, wherein the preset characteristic library is used for storing a plurality of characteristic vectors and the lengths of the plurality of characteristic vectors; and comparing the feature vector to be compared with each similar feature vector to obtain a comparison result. By applying the scheme provided by the embodiment of the application to feature comparison, the feature comparison efficiency can be improved.

Description

Feature comparison method and device
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a feature comparison method and apparatus.
Background
The objects in various application scenes can be represented by the characteristics of the objects, and based on the characteristics, when detecting whether the objects in the application scenes are known objects, the objects in the application scenes can be represented by means of characteristic comparison.
For example, in an application scenario such as entrance guard and attendance checking, after the face features of a target person are obtained, the obtained features are generally compared with each feature stored in a preset feature library, so as to determine whether the target person is a person whose information is recorded in the preset feature library.
That is, when the features obtained in the prior art are compared with the features stored in the preset feature library, feature comparison is realized in a one-by-one comparison manner. However, as the number of features stored in the preset feature library increases, the amount of calculation for comparing the obtained features with the features stored in the preset feature library one by one increases sharply, so that the efficiency of feature comparison is low.
Disclosure of Invention
An object of the embodiments of the present application is to provide a feature comparison method and apparatus, so as to improve feature comparison efficiency. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a feature comparison method, where the method includes:
obtaining the length of a feature vector to be compared as a first feature length;
according to the first characteristic length and the length of a characteristic vector stored in a preset characteristic library, screening similar characteristic vectors of the characteristic vector to be compared from the characteristic vectors stored in the preset characteristic library, wherein the preset characteristic library is used for storing a plurality of characteristic vectors and the lengths of the plurality of characteristic vectors;
and comparing the feature vector to be compared with each similar feature vector to obtain a comparison result.
In a second aspect, an embodiment of the present application provides a feature comparison apparatus, including:
the length obtaining module is used for obtaining the length of the feature vector to be compared as a first feature length;
the characteristic screening module is used for screening similar characteristic vectors of the characteristic vectors to be compared from the characteristic vectors stored in a preset characteristic library according to the first characteristic length and the length of the characteristic vectors stored in the preset characteristic library, wherein the preset characteristic library is used for storing a plurality of characteristic vectors and the lengths of the plurality of characteristic vectors;
and the result obtaining module is used for comparing the feature vector to be compared with each similar feature vector to obtain a comparison result.
In a third aspect, embodiments provide an electronic device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: the method steps described in the embodiments of the present application are implemented.
In a fourth aspect, embodiments of the present application provide a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to: the method steps described in the embodiments of the present application are implemented.
As can be seen from the above, in the scheme provided in the embodiment of the present application, after the first feature length of the feature vector to be compared is obtained, according to the first feature length and the length of the feature vector stored in the preset feature library, similar feature vectors of the feature vector to be compared are screened from the feature vectors stored in the preset feature library, and then the feature vector to be compared is compared with each similar feature vector, so as to obtain a comparison result. In addition, because the similar feature vectors are only part of the feature vectors stored in the preset feature library, the calculation amount for comparing the feature vector to be compared with each similar feature vector is far less than the calculation amount for comparing the feature vector to be compared with each feature vector in the preset feature library. Therefore, when the scheme provided by the embodiment of the application is applied to feature comparison, the efficiency of feature comparison can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a feature comparison method provided in an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a feature comparison apparatus provided in an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a schematic flow chart of a feature comparison method provided in an embodiment of the present application, where the method includes:
s101: and obtaining the length of the feature vector to be compared as a first feature length.
The feature represented by the feature vector to be compared may be a feature of an object in the image. The object can be a human face, a whole pedestrian, a vehicle, a license plate and the like.
Of course, the features represented by the feature vector to be compared are not limited to the features of the object in the image, and any features capable of being represented in a vector form are all suitable for the scheme provided by the embodiment of the present application.
In addition, the feature vector to be compared may be a multi-dimensional feature vector, that is, the feature vector to be compared may include feature information of multiple dimensions.
The length of the feature vector can be understood as the distance between the feature vector and the origin of the coordinate system where the feature vector is located, and the length of a specific feature vector can be expressed by the modulus of the feature vector.
S102: and screening similar characteristic vectors of the characteristic vectors to be compared from the characteristics stored in the preset characteristic library according to the first characteristic length and the length of the characteristic vectors stored in the preset characteristic library.
The preset feature library is used for storing a plurality of feature vectors and the lengths of the feature vectors.
Specifically, the obtaining manner of the feature vector to be compared and the obtaining manner of each feature vector stored in the preset feature library may be the same or different, and this is not limited in this application.
For example, in the field of machine learning, the feature vector stored in the preset feature library may be obtained by a convolutional neural network trained in advance for extracting image features, and correspondingly, the feature vector to be compared may also be obtained by the convolutional neural network.
The inventor finds that when the feature vector to be compared is compared with each feature vector in the preset feature library in various application scenes, the length of the feature vector matched with the feature vector to be compared is generally closer to that of the feature vector to be compared. In view of this, in an embodiment of the present application, when the similar feature vectors of the feature vectors to be compared are filtered from the feature vectors stored in the preset feature library according to the first feature length and the length of the feature vectors stored in the preset feature library, the similar feature vectors of the feature vectors to be compared may be filtered from the feature vectors stored in the preset feature library according to the following expression:
|||X||-||Y||i|≤
wherein | X | represents the first characteristic length, | Y | presents the same lengthiAnd the length of the ith feature vector in the preset feature library is represented, and the i represents the identifier of the feature vector in the preset feature library and is a first preset value.
Under the condition that the feature vector to be compared and the feature vector stored in the preset feature library are multidimensional features, the similarity degree between the two feature vectors can be represented by the distance between the feature vector to be compared and each feature vector in the preset feature library. The distance may be a euclidean distance.
Because the length of each feature vector is stored in the preset feature library, the similar feature vectors of the feature vectors to be compared can be screened out from the preset feature library quickly and efficiently.
S103: and comparing the feature vector to be compared with each similar feature vector to obtain a comparison result.
When the feature vector to be compared is compared with each similar feature vector, the similarity between the feature vector to be compared and each similar feature vector can be calculated, and the similar feature vector with the highest similarity can be considered as the feature vector consistent with the feature vector to be compared.
The calculation of the similarity between the feature vector to be compared and each similar feature vector may be a calculation of a distance, such as a euclidean distance, between the feature vector to be compared and each similar feature vector.
In an embodiment of the present application, the feature vector to be compared is compared with each similar feature vector, when a comparison result is obtained, a distance between the feature vector to be compared and each similar feature vector may be respectively calculated, a distance located in a preset distance interval in the calculated distance is selected, and a result of comparing the feature vector to be compared with each similar feature vector is obtained according to the selected distance.
The preset distance interval may represent an interval range of a distance between the feature vectors when the two feature vectors are similar. For example, the preset distance interval may be [0, 0.85], or the like.
According to the selected distance, obtaining a result of comparing the feature vector to be compared with each similar feature vector, wherein the similar feature vector corresponding to each selected distance can be used as the result of comparing the feature vector to be compared with the similar feature vector; of course, the similar feature vector corresponding to the minimum distance in the selected distances may also be used as the result of comparing the feature vector to be compared with the similar feature vector.
For example, assume that the selected distances are as follows:
distance between the feature vector to be compared and the similar feature vector A: 0.05, distance between the feature vector to be compared and the similar feature vector B: 0.1, distance between feature vector to be compared and similar feature vector C: 0.02.
in one case, the result of comparing the feature vector to be compared with the similar feature vector is: similar feature vectors A, B and C;
in another case, the result of comparing the feature vector to be compared with the similar feature vector is as follows: the similar feature vector C.
Since the dimension of the feature vector is usually different in different application scenarios, for example, the dimension of the feature vector in some scenarios is 512, the dimension of the feature vector in some scenarios is 2048, and the like, the dimension of the feature vector is different, and the value range of the length of the feature vector is also different. However, the inventor has performed statistical analysis on feature vectors in different application scenarios, and found that the lengths of the feature vectors in the same application scenario are generally uniformly distributed, that is, the lengths of the feature vectors in the same application scenario are uniformly distributed within a certain interval. In view of this, in one embodiment of the present application, the determination is made by:
and determining the maximum value and the minimum value of the length stored in the preset feature library according to the maximum value and the minimum value.
Specifically, when the maximum value and the minimum value are determined, the determination may be performed according to the following expression:
Figure GDA0002729025080000051
wherein a, b and c represent preset numerical values, total _ num represents the number of the characteristic vectors stored in the preset characteristic library, d represents a preset numerical value determined by the number range to which the total _ num belongs, and max | | YiI represents the maximum value, min Yi| | represents the above minimum value, min () represents taking the minimum value function,
Figure GDA0002729025080000052
representing the sign of the rounding-down operation.
That is, the above-mentioned base e is exponentially changed.
For example, if, in the above expression,
Figure GDA0002729025080000053
is 5, c is 10, then
Figure GDA0002729025080000054
Is 5. If in the above-mentioned expression it is stated that,
Figure GDA0002729025080000055
is 11, c is 10, then
Figure GDA0002729025080000061
Is 10.
In one embodiment of the present application, in the above expression,
Figure GDA0002729025080000062
can be in the range of [0.1, 0.15 ]]。
Alternatively, a may be 0.15, b may be-0.04, c may be 10, etc.
The number range to which total _ num belongs may be predetermined, and a predetermined value determined for each number range may be predetermined. For example, total _ num belongs to the number range of (0, 10000), the predetermined value determined by the range may be 10000, i.e., d is 10000, total _ num belongs to the number range of (0, 100000), the predetermined value determined by the range may be 20000, i.e., d is 20000, and the like.
In an embodiment of the present application, after a number range to which the number of feature vectors stored in the feature library belongs is preset, that is, the number range to which total _ num belongs, the number range may be segmented, in this case, d may be a segment length of each segment, and c may be the number of segments.
Specifically, the segment length of each segment may be preset, so that the number of segments can be calculated according to the number range and the segment length, or the number of segments may be preset, so that the segment length of each segment can be calculated according to the number range and the number of segments.
For example, assuming that the number range is (0, 100000), and the number of the preset segments is 10, the segment length of each segment may be 10000, in this case, the value of d may be 10000, and the value of c may be 10.
When the maximum value and the minimum value are determined, the difference between the maximum value and the minimum value may be directly used.
The present application is described only by way of example of the above-described determination method, but the determination method is not limited thereto.
As can be seen from the above, in the solutions provided in the above embodiments, after the first feature length of the feature vector to be compared is obtained, according to the first feature length and the length of the feature vector stored in the preset feature library, similar feature vectors of the feature vector to be compared are screened from the feature vectors stored in the preset feature library, and then the feature vector to be compared is compared with each similar feature vector, so as to obtain a comparison result. In addition, because the similar feature vectors are only part of the feature vectors stored in the preset feature library, the calculation amount for comparing the feature vector to be compared with each similar feature vector is far less than the calculation amount for comparing the feature vector to be compared with each feature vector in the preset feature library. Therefore, when the scheme provided by each embodiment is applied to feature comparison, the efficiency of feature comparison can be improved.
Corresponding to the characteristic comparison method, the embodiment of the application also provides a characteristic comparison device.
Fig. 2 is a schematic structural diagram of a feature comparison apparatus provided in an embodiment of the present application, where the apparatus includes:
a length obtaining module 201, configured to obtain a length of a feature vector to be compared as a first feature length;
a feature screening module 202, configured to screen a similar feature vector of the feature vector to be compared from feature vectors stored in a preset feature library according to the first feature length and lengths of the feature vectors stored in the preset feature library, where the preset feature library is configured to store a plurality of feature vectors and lengths of the plurality of feature vectors;
and a result obtaining module 204, configured to compare the feature vector to be compared with each similar feature vector, so as to obtain a comparison result.
In an embodiment of the present application, the feature screening module 202 is specifically configured to screen similar feature vectors of the feature vectors to be compared from the feature vectors stored in the preset feature library according to the following expression:
|||X||-||Y||i|≤
wherein | X | represents the first characteristic length, | Y | presents the first characteristic lengthiRepresenting said presetAnd the length of the ith feature vector in the feature library, wherein i represents the identifier of the feature vector in the preset feature library and is a first preset value.
In an embodiment of the present application, the apparatus may further include:
a determination module for determining;
wherein the determining module comprises:
the value determining unit is used for determining the maximum value and the minimum value of the length stored in the preset feature library;
and the determining unit is used for determining according to the maximum value and the minimum value.
In an embodiment of the application, the determining unit is specifically configured to determine according to the following expression:
Figure GDA0002729025080000081
wherein a, b and c represent preset numerical values, total _ num represents the number of the characteristic vectors stored in the preset characteristic library, d represents a preset numerical value determined by the number range to which the total _ num belongs, and max | | Yi| represents the maximum value, min | | YiAnd | | represents the minimum value, and min () represents taking the minimum value function.
In an embodiment of the present application, the result obtaining module 204 may include:
the distance calculation unit is used for calculating the distance between the feature vector to be compared and each similar feature vector respectively;
a distance selection unit for selecting a distance located in a preset distance interval from the calculated distances;
and the result obtaining unit is used for obtaining the result of comparing the feature vector to be compared with each similar feature vector according to the selected distance.
The distance calculation unit described above corresponds in this case to the distance calculation module 203 in fig. 2, that is, in this case, the distance calculation module 203 in fig. 2 for calculating the distance between the feature vector to be compared and each similar feature vector, respectively. On this basis, the distance calculating unit and the result obtaining unit correspond to the result obtaining module 204 in fig. 2, that is, in this case, the result obtaining module 204 in fig. 2 is configured to select a distance located in a preset distance interval in the calculated distances, and obtain a result of comparing the feature vector to be compared with each similar feature vector according to the selected distance.
As can be seen from the above, in the solutions provided in the above embodiments, after the first feature length of the feature vector to be compared is obtained, according to the first feature length and the length of the feature vector stored in the preset feature library, similar feature vectors of the feature vector to be compared are screened from the feature vectors stored in the preset feature library, and then the feature vector to be compared is compared with each similar feature vector, so as to obtain a comparison result. In addition, because the similar feature vectors are only part of the feature vectors stored in the preset feature library, the calculation amount for comparing the feature vector to be compared with each similar feature vector is far less than the calculation amount for comparing the feature vector to be compared with each feature vector in the preset feature library. Therefore, when the scheme provided by each embodiment is applied to feature comparison, the efficiency of feature comparison can be improved.
Corresponding to the characteristic comparison method, the embodiment of the application also provides the electronic equipment.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application, where the electronic device includes: a processor 301 and a machine-readable storage medium 302, the machine-readable storage medium 302 storing machine-executable instructions executable by the processor 301, the processor 301 caused by the machine-executable instructions to: the steps of the feature comparison method provided by the embodiment of the application are realized.
In one embodiment of the present application, there is provided a feature comparison method, including:
obtaining the length of a feature vector to be compared as a first feature length;
according to the first characteristic length and the length of the characteristic vectors stored in a preset characteristic library, screening similar characteristic vectors of the characteristic vectors to be compared from the characteristic vectors stored in the preset characteristic library, wherein the preset characteristic library is used for storing a plurality of characteristic vectors and the length of the plurality of characteristic vectors;
and comparing the feature vector to be compared with each similar feature vector to obtain a comparison result.
It should be noted that other embodiments of the feature comparison method implemented by the processor 301 through machine executable instructions are the same as those mentioned in the foregoing method embodiments, and are not described herein again.
The machine-readable storage medium may include a Random Access Memory (RAM) and a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the machine-readable storage medium may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
As can be seen from the above, in the solution provided in this embodiment, since the lengths of the feature vectors are stored in the preset feature library, compared with a manner of directly performing feature comparison, similar feature vectors of feature vectors to be compared can be efficiently screened out according to the first feature length and the lengths of the feature vectors stored in the feature library, and in addition, since the similar feature vectors are only part of the feature vectors stored in the preset feature library, a calculation amount for comparing the feature vectors to be compared with each similar feature vector is far less than a calculation amount for comparing the feature vectors to be compared with each feature vector in the preset feature library. Therefore, when the scheme provided by the embodiment is applied to feature comparison, the efficiency of feature comparison can be improved.
In accordance with the above feature comparison method, embodiments of the present application further provide a machine-readable storage medium storing machine-executable instructions, which when invoked and executed by a processor, cause the processor to: the steps of the feature comparison method provided by the embodiment of the application are realized.
In one embodiment of the present application, there is provided a feature comparison method, including:
obtaining the length of a feature vector to be compared as a first feature length;
according to the first characteristic length and the length of a characteristic vector stored in a preset characteristic library, screening similar characteristic vectors of the characteristic vector to be compared from the characteristic vectors stored in the preset characteristic library, wherein the preset characteristic library is used for storing a plurality of characteristic vectors and the lengths of the plurality of characteristic vectors;
and comparing the feature vector to be compared with each similar feature vector to obtain a comparison result.
It should be noted that other embodiments of the feature comparison method implemented by the processor, which are similar to the embodiments mentioned in the foregoing method embodiments, are also implemented by machine executable instructions stored in the machine-readable storage medium, and are not described herein again.
As can be seen from the above, in the solution provided in this embodiment, since the lengths of the feature vectors are stored in the preset feature library, compared with a manner of directly performing feature comparison, similar feature vectors of feature vectors to be compared can be efficiently screened out according to the first feature length and the lengths of the feature vectors stored in the feature library, and in addition, since the similar feature vectors are only part of the feature vectors stored in the preset feature library, a calculation amount for comparing the feature vectors to be compared with each similar feature vector is far less than a calculation amount for comparing the feature vectors to be compared with each feature vector in the preset feature library. Therefore, when the scheme provided by the embodiment is applied to feature comparison, the efficiency of feature comparison can be improved.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the embodiments of the apparatus, the electronic device, and the machine-readable storage medium, since they are substantially similar to the embodiments of the method, the description is simple, and in relation to the embodiments, reference may be made to the partial description of the embodiments of the method.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (6)

1. A method of feature comparison, the method comprising:
obtaining the length of a feature vector to be compared as a first feature length;
according to the first characteristic length and the length of a characteristic vector stored in a preset characteristic library, screening similar characteristic vectors of the characteristic vector to be compared from the characteristic vectors stored in the preset characteristic library, wherein the preset characteristic library is used for storing a plurality of characteristic vectors and the lengths of the plurality of characteristic vectors;
comparing the feature vector to be compared with each similar feature vector to obtain a comparison result;
the screening of the similar feature vectors of the feature vectors to be compared from the feature vectors stored in the preset feature library according to the first feature length and the length of the feature vectors stored in the preset feature library comprises:
and screening similar characteristic vectors of the characteristic vectors to be compared from the characteristic vectors stored in the preset characteristic library according to the following expression:
|||X||-||Y||i|≤
wherein | X | represents the first characteristic length, | Y | presents the first characteristic lengthiThe length of the ith feature vector in the preset feature library is represented, i represents the identifier of the feature vector in the preset feature library and is a first preset value;
the determination is made by:
determining the maximum value and the minimum value of the length stored in the preset feature library;
determining according to the maximum value and the minimum value;
the determining according to the maximum value and the minimum value comprises:
determined according to the following expression:
Figure FDA0002729025070000011
wherein a, b and c represent preset numerical values, total _ num represents the number of the characteristic vectors stored in the preset characteristic library, d represents a preset numerical value determined by the number range to which the total _ num belongs, and max | | Yi| represents the maximum value, min | | Yi| represents the minimum value, min () represents the maximum valueA function of the small value of the function,
Figure FDA0002729025070000012
representing the sign of the rounding-down operation.
2. The method according to claim 1, wherein comparing the feature vector to be compared with each similar feature vector to obtain a comparison result comprises:
respectively calculating the distance between the feature vector to be compared and each similar feature vector;
selecting the distance positioned in a preset distance interval in the calculated distances;
and obtaining a comparison result between the feature vector to be compared and each similar feature vector according to the selected distance.
3. A feature comparison apparatus, characterized in that the apparatus comprises:
the length obtaining module is used for obtaining the length of the feature vector to be compared as a first feature length;
the characteristic screening module is used for screening similar characteristic vectors of the characteristic vectors to be compared from the characteristic vectors stored in a preset characteristic library according to the first characteristic length and the length of the characteristic vectors stored in the preset characteristic library, wherein the preset characteristic library is used for storing a plurality of characteristic vectors and the lengths of the plurality of characteristic vectors;
the result obtaining module is used for comparing the feature vector to be compared with each similar feature vector to obtain a comparison result;
the feature screening module is specifically configured to screen similar feature vectors of the feature vectors to be compared from feature vectors stored in the preset feature library according to the following expression:
|||X||-||Y||i|≤
wherein | X | represents the first characteristic length, | Y | presents the first characteristic lengthiRepresenting the length of the ith feature vector in the preset feature library, i representing the feature direction in the preset feature libraryThe quantity mark is a first preset value;
the device further comprises:
a determination module for determining;
wherein the determining module comprises:
the value determining unit is used for determining the maximum value and the minimum value of the length stored in the preset feature library;
the determining unit is used for determining according to the maximum value and the minimum value;
the determining unit is specifically configured to determine according to the following expression:
Figure FDA0002729025070000021
wherein a, b and c represent preset numerical values, total _ num represents the number of the characteristic vectors stored in the preset characteristic library, d represents a preset numerical value determined by the number range to which the total _ num belongs, and max | | Yi| represents the maximum value, min | | Yi| | represents the minimum, min () represents taking the minimum function,
Figure FDA0002729025070000031
representing the sign of the rounding-down operation.
4. The apparatus of claim 3, wherein the result obtaining module comprises:
the distance calculation unit is used for calculating the distance between the feature vector to be compared and each similar feature vector respectively;
a distance selection unit for selecting a distance located in a preset distance interval from the calculated distances;
and the result obtaining unit is used for obtaining the result of comparing the feature vector to be compared with each similar feature vector according to the selected distance.
5. An electronic device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: carrying out the method steps of any one of claims 1-2.
6. A machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to: carrying out the method steps of any one of claims 1-2.
CN201811359552.6A 2018-11-15 2018-11-15 Feature comparison method and device Active CN109543736B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811359552.6A CN109543736B (en) 2018-11-15 2018-11-15 Feature comparison method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811359552.6A CN109543736B (en) 2018-11-15 2018-11-15 Feature comparison method and device

Publications (2)

Publication Number Publication Date
CN109543736A CN109543736A (en) 2019-03-29
CN109543736B true CN109543736B (en) 2020-11-27

Family

ID=65847553

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811359552.6A Active CN109543736B (en) 2018-11-15 2018-11-15 Feature comparison method and device

Country Status (1)

Country Link
CN (1) CN109543736B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011227749A (en) * 2010-04-21 2011-11-10 Nippon Telegr & Teleph Corp <Ntt> Abbreviation and full-length word restoration device and method thereof, and program
CN104036259A (en) * 2014-06-27 2014-09-10 北京奇虎科技有限公司 Face similarity recognition method and system
CN104933411A (en) * 2015-06-16 2015-09-23 迪安杰科技无锡有限公司 Fingerprint identification processing method and system
CN105678232A (en) * 2015-12-30 2016-06-15 中通服公众信息产业股份有限公司 Face image feature extraction and comparison method based on deep learning
CN108596135A (en) * 2018-04-26 2018-09-28 上海诚数信息科技有限公司 Personal identification method and system
CN108647629A (en) * 2018-05-08 2018-10-12 北京大米科技有限公司 Image path recognition methods and device in a kind of image recognition localization method, video

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011227749A (en) * 2010-04-21 2011-11-10 Nippon Telegr & Teleph Corp <Ntt> Abbreviation and full-length word restoration device and method thereof, and program
CN104036259A (en) * 2014-06-27 2014-09-10 北京奇虎科技有限公司 Face similarity recognition method and system
CN104933411A (en) * 2015-06-16 2015-09-23 迪安杰科技无锡有限公司 Fingerprint identification processing method and system
CN105678232A (en) * 2015-12-30 2016-06-15 中通服公众信息产业股份有限公司 Face image feature extraction and comparison method based on deep learning
CN108596135A (en) * 2018-04-26 2018-09-28 上海诚数信息科技有限公司 Personal identification method and system
CN108647629A (en) * 2018-05-08 2018-10-12 北京大米科技有限公司 Image path recognition methods and device in a kind of image recognition localization method, video

Also Published As

Publication number Publication date
CN109543736A (en) 2019-03-29

Similar Documents

Publication Publication Date Title
CN111737522B (en) Video matching method, and block chain-based infringement evidence-saving method and device
US8559726B2 (en) Image analysis based on pixel brightness grouping
US20200074219A1 (en) User identity determining method, apparatus, and device
CN110795976A (en) Method, device and equipment for training object detection model
WO2022048572A1 (en) Target identification method and apparatus, and electronic device
CN111353549A (en) Image tag verification method and device, electronic device and storage medium
CN111291887A (en) Neural network training method, image recognition method, device and electronic equipment
CN111338692A (en) Vulnerability classification method and device based on vulnerability codes and electronic equipment
CN112632609A (en) Abnormality detection method, abnormality detection device, electronic apparatus, and storage medium
US11609897B2 (en) Methods and systems for improved search for data loss prevention
CN110490058B (en) Training method, device and system of pedestrian detection model and computer readable medium
US10963720B2 (en) Estimating grouped observations
CN105678333B (en) Method and device for determining crowded area
KR101755980B1 (en) Copy-Move Forgery Detection method and apparatus based on scale space representation
CN114743132A (en) Target algorithm selection method and device, electronic equipment and storage medium
CN109543736B (en) Feature comparison method and device
CN112287905A (en) Vehicle damage identification method, device, equipment and storage medium
CN111507420A (en) Tire information acquisition method, tire information acquisition device, computer device, and storage medium
CN108764206B (en) Target image identification method and system and computer equipment
CN115984671A (en) Model online updating method and device, electronic equipment and readable storage medium
CN114422450B (en) Network traffic analysis method and device based on multi-source network traffic data
KR102581154B1 (en) Method and Apparatus for Object Detection Using Model Ensemble
CN113704551A (en) Video retrieval method, storage medium and equipment
CN111143626A (en) Group partner identification method, device, equipment and computer readable storage medium
US11468257B2 (en) Electronic apparatus for recognizing multimedia signal and operating method of the same

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
GR01 Patent grant
GR01 Patent grant