A feature processing method and device, storage medium and program product
By splicing and dimensionally reducing face feature vectors through multiple feature extraction models, the problem of noise interference in high-dimensional operations in face recognition is solved, and the recognition accuracy and efficiency are improved.
Patent Information
- Application Number
- CN201880098361.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-11-14
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2038-11-14
AI Technical Summary
The face feature extraction method in the existing technology results in a large amount of calculation and low recognition accuracy for face recognition, mainly due to the interference of high-dimensional operation noise caused by the linear growth of feature dimensions.
Multiple feature extraction models are used to extract features from the target image, and the splicing feature vector is obtained by splicing. The target feature vector is obtained through principal component analysis (PCA) dimensionality reduction processing to reduce the dimension and shorten the length of the feature vector.
It reduces noise interference caused by high-dimensional operations, improves recognition accuracy and processing efficiency, shortens feature comparison time, and improves the accuracy and efficiency of face recognition.
Smart Images

Figure CN112868019B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, for example, to a feature processing method and device, a storage medium and a program product. Background Art
[0002] With the development of face recognition technology, face verification or face retrieval is increasingly used in people's daily lives. Facial features have a great impact on the accuracy of face recognition technology.
[0003] In the prior art, deep learning is generally used to extract facial features. In addition, considering that different neural network models will extract different facial features, multiple neural network models are often used in the prior art to extract facial features to obtain multiple facial feature vectors.
[0004] However, the existing facial feature extraction method will cause the dimension of the facial feature vector to grow linearly with the number of neural network models, which will greatly increase the computational complexity of face recognition, and its recognition speed and accuracy will be adversely affected. Summary of the invention
[0005] The embodiments of the present disclosure provide a feature processing method and device, a storage medium, and a program product to reduce the dimension of features and improve data processing speed and accuracy.
[0006] The present disclosure provides a feature processing method, including:
[0007] Using multiple feature extraction models to extract features of the target image respectively, to obtain multiple feature vectors of the target image;
[0008] Splicing the multiple feature vectors to obtain a spliced feature vector of the target image;
[0009] Perform dimensionality reduction processing on the concatenated feature vector to obtain a target feature vector.
[0010] The present disclosure also provides a feature processing device, including:
[0011] An extraction module, used to extract features of a target image using multiple feature extraction models to obtain multiple feature vectors of the target image;
[0012] A splicing module, used for splicing the multiple feature vectors to obtain a spliced feature vector of the target image;
[0013] The dimension reduction module is used to perform dimension reduction processing on the concatenated feature vector to obtain a target feature vector.
[0014] The embodiment of the present disclosure also provides a computer, comprising the above-mentioned feature processing device.
[0015] The embodiment of the present disclosure further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the above-mentioned feature processing method.
[0016] The embodiment of the present disclosure also provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the above-mentioned feature processing method.
[0017] The present disclosure also provides an electronic device, including:
[0018] at least one processor; and,
[0019] a memory communicatively connected to the at least one processor; wherein,
[0020] The memory stores instructions that can be executed by the at least one processor. When the instructions are executed by the at least one processor, the at least one processor executes the above-mentioned feature processing method.
[0021] The technical solution provided by the embodiment of the present disclosure performs feature extraction respectively through multiple feature extraction models, and then splices and fuses them together, and performs dimensionality reduction processing on the spliced feature vector to obtain a target feature vector. In this way, by reducing the feature dimension, the noise interference caused by high-dimensional operations is reduced, and the recognition accuracy is improved. In addition, the reduction of the feature dimension also shortens the length of the feature vector, which is beneficial to reducing the feature comparison time during face recognition and improving the processing efficiency of face recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:
[0023] Figure 1 A flowchart of a feature processing method provided in an embodiment of the present disclosure;
[0024] Figure 2 A flowchart of another feature processing method provided by an embodiment of the present disclosure;
[0025] Figure 3 A flowchart of another feature processing method provided by an embodiment of the present disclosure;
[0026] Figure 4 A flowchart of another feature processing method provided by an embodiment of the present disclosure;
[0027] Figure 5 A structural schematic diagram of a feature processing device provided in an embodiment of the present disclosure;
[0028] Figure 6 A schematic diagram of the structure of a computer provided in an embodiment of the present disclosure;
[0029] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.
[0031] In response to the above-mentioned problems existing in the prior art, the embodiments of the present disclosure provide the following solution: utilize multiple feature extraction models to extract features of the target image, and concatenate the extracted feature vectors, and then perform dimensionality reduction processing to obtain the target feature vector, so as to reduce the dimension and shorten the feature vector length, thereby improving the computational efficiency and accuracy.
[0032] This disclosure provides a feature processing method. Figure 1 , the method comprising:
[0033] S102, using multiple feature extraction models to respectively extract features of the target image to obtain multiple feature vectors of the target image.
[0034] S104, concatenating multiple feature vectors to obtain a concatenated feature vector of the target image.
[0035] S106, performing dimensionality reduction processing on the concatenated feature vector to obtain a target feature vector.
[0036] First, it should be noted that the embodiment of the present disclosure has no limitation on the number of target images. Specifically, when the number of target images is one, Figure 1The process shown can be processed; when the number of target images is multiple, the above process can be executed for each target image separately, or the above steps S102 and S104 can be executed for each target image separately, and the splicing feature vectors of each target image are used as a splicing feature matrix, and the above step S106 is executed together to obtain the target feature matrix, that is, to obtain the target feature vector of each target image.
[0037] In addition, the disclosed embodiments have no particular limitation on how many target images a specific image may have. For example, if the target image is a face image, a photo may include a face (a target image), or may include multiple face images (multiple target images).
[0038] In addition, the present disclosure embodiment has no particular limitation on the application scenarios of the aforementioned feature processing method. It can be specifically applied to the face recognition scenario described in the background technology, or it can also be applied to other feature processing scenarios, for example, feature processing scenarios for user usage habits, etc.
[0039] Specifically, when executing the feature extraction step in the aforementioned S102, the embodiment of the present disclosure provides an implementation method: using deep learning technology to extract features. At this time, the feature extraction model can be a deep neural network (DNN) model. Among them, the input of the DNN model is an image, and the output is a feature vector. The feature vector is composed of eigenvalues, and each eigenvalue represents a feature on a dimension.
[0040] Specifically, take the feature extraction for facial images as an example. For example, the feature vector output by a DNN model may be (a, b, c), which means that the feature vector has facial features in three dimensions, and the definition of each dimension can be constructed in the DNN model. For example, assuming that a represents gender, male gender is represented by feature value 0, and female gender is represented by feature value 1; assuming that b represents age, the feature value corresponding to b can be represented by a specific age number or an identifier of the age group; assuming that c represents face shape, the feature values of different face shapes can be defined separately, for example, a round face is represented by feature value 1, a square face is represented by feature value 2, an oval face is represented by feature value 3, etc. It can be seen that the above examples are only for illustrating the feature vectors involved in the embodiments of the present disclosure, and are not intended to limit the present application. In specific implementations, the feature vectors output by each DNN model may be different.
[0041] In addition, before executing S102 in this implementation mode, the DNN model needs to be trained. During the training phase of the DNN model, a large number of images and features corresponding to the images need to be prepared in advance. These pre-prepared information are used as a database, and the DNN model automatically iterates and learns in the database until the learning termination condition is met. At this point, the DNN model training is completed and can be used as the feature extraction model described in S102 above in the embodiment of the present disclosure.
[0042] In addition, the type of DNN model used in the embodiments of the present disclosure can be determined as needed. In one possible design, the type of the DNN model may include but is not limited to: Residual Network (ResNet). Among them, ResNet is a deep convolutional network with good optimization space, and can improve learning accuracy and network performance by increasing depth.
[0043] It should be noted that the multiple feature extraction models used in the embodiments of the present disclosure may all be DNN models, or some of the feature extraction models may be DNN models. In addition, feature extraction may also be achieved by using none of the DNN models.
[0044] It is precisely because of the differences in the algorithms, training models or training samples used by the feature extraction models that the feature vectors extracted by multiple feature extraction models are different, which can extract as many features of the target image as possible. When further applications are based on these features, it is beneficial to improve the accuracy of subsequent applications.
[0045] However, the use of multiple feature extraction models will inevitably lead to the linear growth of the feature dimensions extracted from the same target image as the number of models increases. Therefore, the increase in feature dimensions will not only lead to an increase in the amount of calculation in subsequent applications, but also have an adverse effect on the calculation results of subsequent applications due to the noise interference caused by high-dimensional operations.
[0046] Therefore, after performing feature extraction using multiple feature extraction models, the embodiment of the present disclosure fuses and splices the feature vectors obtained in the above steps.
[0047] At this time, please refer to Figure 2 In the process shown, the splicing step described in S104 can be implemented in the following manner.
[0048] S1042, normalize each feature vector to obtain multiple normalized feature vectors.
[0049] S1044, concatenate multiple normalized feature vectors to obtain a concatenated feature vector.
[0050] Considering the differences of feature vectors extracted by each feature extraction model, in order to minimize the influence of such differences on feature vector concatenation, a normalization process is performed before the concatenation step.
[0051] The embodiment of the present disclosure provides a normalization processing method as follows: obtain the normalization coefficients of multiple eigenvalues in each eigenvector, and then obtain the ratio between each eigenvalue and the normalization coefficient to obtain the normalized eigenvector of the eigenvector.
[0052] For example, if feature vector A = (x1, x2, ... xn), where n is an integer greater than 1, it can be used to characterize the dimension of feature vector A. If the normalization coefficient is K, then after normalization of feature vector A, vector B = (x1 / K, x2 / K, ... xn / K) = (v1, v2, ... vn) can be obtained.
[0053] The normalization coefficient is generally related to the eigenvalue in the eigenvector. In a possible design, the normalization coefficient K can be obtained by obtaining the square root of the sum of all eigenvalues in the eigenvector A. That is,
[0054] Thus, after the above normalization process, each target image corresponds to multiple normalized feature vectors, and at this time, these normalized feature vectors are simply concatenated together to obtain a concatenated feature vector, wherein each target image corresponds to a unique feature maintaining a large concatenated feature vector.
[0055] For example, if the target image corresponds to three eigenvectors after the above normalization process, namely: eigenvector B = (v1, v2, v3), eigenvector C = (v4, v5), eigenvector D = (v6, v7, v8), then the above eigenvectors B, C, and D can be spliced to obtain the spliced eigenvector F = (v1, v2, v3, v4, v5, v6, v7, v8).
[0056] In actual application scenarios, there may be multiple target images. In this case, the concatenated feature vectors corresponding to the multiple target images may exist as a matrix.
[0057] For example, in a face recognition scenario, if there are m face images, and the splicing feature vector corresponding to each face image has t dimensions, then the splicing feature vectors of these m face images can form an m×t splicing feature matrix.
[0058] It can be seen that a splicing feature vector corresponding to a single target image can also be used as a 1×t splicing feature matrix.
[0059] Since the dimension of the concatenated feature vector is relatively high, in order to reduce the noise of high-dimensional operations and remove redundant data, the embodiment of the present disclosure performs normalization processing on the concatenated feature vector.
[0060] Specifically, principal component analysis (PCA) may be used to process the concatenated feature vectors to obtain a target feature vector.
[0061] PCA, also known as principal component analysis, is a statistical method that aims to use the idea of dimensionality reduction to transform multiple indicators into fewer comprehensive indicators. The idea of the algorithm is to transform a set of variables that may be correlated into a set of linearly uncorrelated variables through orthogonal transformation. The transformed set of variables is called principal components.
[0062] The embodiment of the present disclosure also provides a method for implementing the dimensionality reduction process by PCA to obtain the target feature vector. Please refer to Figure 3 , the method comprises the following steps:
[0063] S1062, obtaining the average value of each eigenvalue in the concatenated eigenvector.
[0064] S1064, obtaining the difference between each eigenvalue and the average value in the concatenated eigenvalue vector to obtain a de-meaned vector.
[0065] S1066, obtaining the covariance matrix of the removed mean vector.
[0066] S1068, solving the covariance matrix to obtain the covariance eigenvalues and covariance eigenvectors of the covariance matrix.
[0067] S10610, obtaining some eigenvectors with the highest covariance eigenvalues in descending order of the covariance eigenvalues.
[0068] S10612: construct a new feature space according to the partial feature vectors to obtain the target feature vector.
[0069] Through Figure 3 From the dimensionality reduction processing scheme shown, it can be seen that in addition to performing dimensionality reduction processing on the splicing feature vector of a target image, dimensionality reduction processing can also be performed on the splicing feature matrices corresponding to multiple target images at the same time. Compared with the method of reducing the dimensionality of a single image one by one, this method has higher processing efficiency and can determine the main components in multiple target images. Compared with the processing method of a single image, the splicing feature matrix after dimensionality reduction has the effect of just removing redundant features.
[0070] In addition, if dimensionality reduction processing is performed on multiple target images at the same time, the processing result is a target feature matrix. According to the identification (1 to m) of a certain target image, the target feature vector corresponding to each target image can be determined.
[0071] In such Figure 3 In the process shown, the PCA method is used to reduce the dimension of the concatenated feature vector, which can effectively shorten the length of the concatenated feature vector (due to dimensionality reduction, the dimension is reduced), avoid high-dimensional operation noise, and help improve the accuracy of subsequent operations. In addition, since the length of the concatenated feature vector is shortened, the amount of data in subsequent applications can be greatly reduced, which is conducive to improving operation efficiency. Moreover, the PCA technology also has the function of online learning, so it can alleviate the problem of data set adaptation to a certain extent.
[0072] In addition, in the prior art, PCA technology can also be used as a feature extractor, that is, PCA technology is used to reduce the dimension of the feature vector composed of all pixels in the target image to a feature vector with a smaller number of original pixels to achieve feature extraction. Its essence is to learn how to construct new feature dimensions on the target image data set, and how to select fewer features to represent a target image. This is different from the feature processing method provided in the embodiment of the present disclosure. The embodiment of the present disclosure uses PCA to reduce the dimension of the extracted high-dimensional spliced feature vector, which is essentially different from the method of using PCA to achieve feature extraction in terms of implementation ideas and steps.
[0073] It should also be noted that, in addition to implementing dimensionality reduction processing by the aforementioned PCA method, dimensionality reduction processing of the concatenated feature vector may also be implemented by other means, and the embodiments of the present disclosure are not particularly limited to this.
[0074] Through the above processing, a target feature vector of the target image can be obtained. The embodiment of the present disclosure further provides a specific application scenario of the above target feature vector.
[0075] In a possible design, since the target feature vector can fully characterize a target image, it is also possible to: store the target feature vector in a feature database. That is, the database is constructed by the target feature vector, rather than directly by the target image. This can save processing efficiency by not repeating the aforementioned acquisition process of the target feature during subsequent recognition or other data processing. Moreover, compared with the method of directly storing the target image, constructing the feature database in the form of the target feature vector can save storage resources and help improve storage and reading efficiency.
[0076] In addition, the disclosed embodiment also provides a method for matching and identifying using the aforementioned target feature vector. At this time, the method further includes: obtaining an image to be identified, and then matching the image to be identified in the aforementioned feature database to obtain a target image corresponding to the image to be identified.
[0077] For the specific matching process, please refer to Figure 4The process shown in FIG. 1 includes the following steps:
[0078] S1082, obtaining an image to be recognized.
[0079] S1084, obtaining a feature vector to be identified of the image to be identified.
[0080] S1086, obtaining the distance between the feature vector to be identified and each target feature vector in the feature database.
[0081] S1088: For any target feature vector, if the distance is less than a preset distance threshold, determine that the target image corresponding to the target feature vector is the target image corresponding to the image to be identified.
[0082] It can be seen that, for any target feature vector, if the distance is greater than or equal to the preset distance threshold, it is determined that the target image corresponding to the target feature vector is not the target image corresponding to the image to be identified.
[0083] The acquisition of the feature vector to be identified of the image to be identified in step S1084 can also be implemented by the aforementioned method, which has a higher accuracy rate; or it can also be implemented by other methods, for example, by extracting features through a single DNN model. The embodiments of the present disclosure are not particularly limited to this.
[0084] In addition, in Figure 4 Before executing the process shown, a feature database needs to be constructed. The step of constructing the feature database can be implemented according to the feature processing method described above in the embodiment of the present disclosure, that is, multiple target feature vectors corresponding to multiple target images are obtained and stored to construct the feature database.
[0085] When Figure 4 When the method shown is specifically applied to the implementation scenario of face recognition or face matching, the target image is a face image; the image to be recognized is a face image. It can be seen that when the method is applied to other scenarios, it may be other types of images, but, for example Figure 4 In the method shown, the target image and the image to be identified are images of the same type, or are images containing objects of the same type.
[0086] Based on the aforementioned feature processing method provided by the embodiment of the present disclosure, the embodiment of the present disclosure further provides a feature processing device.
[0087] Please refer to Figure 5 , the feature processing device 500 comprises:
[0088] An extraction module 51 is used to extract features of a target image using multiple feature extraction models to obtain multiple feature vectors of the target image;
[0089] A splicing module 52, used for splicing multiple feature vectors to obtain a spliced feature vector of a target image;
[0090] The dimension reduction module 53 is used to perform dimension reduction processing on the concatenated feature vector to obtain a target feature vector.
[0091] In one possible design, the splicing module 52 includes:
[0092] A normalization submodule is used to normalize each feature vector to obtain multiple normalized feature vectors;
[0093] The concatenation submodule is used to concatenate multiple normalized feature vectors to obtain a concatenated feature vector.
[0094] Among them, the normalization submodule can be specifically used for:
[0095] Get the normalized coefficients of multiple eigenvalues in each eigenvector;
[0096] The ratio between each eigenvalue and the normalization coefficient is obtained to obtain the normalized eigenvector of the eigenvector.
[0097] In another possible design, the dimension reduction module 53 is specifically used for:
[0098] The principal component analysis (PCA) is used to process the concatenated feature vectors to obtain the target feature vector.
[0099] Specifically, the dimension reduction module 53 is specifically used for:
[0100] Get the average value of each eigenvalue in the concatenated eigenvector;
[0101] Obtain the difference between each eigenvalue and the average value in the concatenated eigenvector to obtain the mean-removed vector;
[0102] Get the covariance matrix of the mean-removed vector;
[0103] Solve the covariance matrix to obtain the covariance eigenvalue and covariance eigenvector of the covariance matrix;
[0104] According to the order of covariance eigenvalues from large to small, obtain some eigenvectors with the front covariance eigenvalues;
[0105] According to some feature vectors, a new feature space is constructed to obtain the target feature vector.
[0106] In another possible design, the feature extraction model is a deep neural network model DNN.
[0107] In another possible design, the feature processing device 500 may further include:
[0108] Storage Module( Figure 5 (not shown) for storing the target feature vector in a feature database.
[0109] In another possible design, the feature processing device 500 may further include:
[0110] Get Module( Figure 5 (not shown) for acquiring an image to be recognized;
[0111] Identification module ( Figure 5 (not shown) is used to match the image to be identified in the feature database to obtain a target image corresponding to the image to be identified.
[0112] The identification module is specifically used for:
[0113] Obtaining a feature vector to be identified of the image to be identified;
[0114] Obtaining the distance between the feature vector to be identified and each target feature vector in the feature database;
[0115] For any target feature vector, if the distance is less than a preset distance threshold, it is determined that the target image corresponding to the target feature vector is the target image corresponding to the image to be identified.
[0116] When it is specifically applied in the scenario of face recognition, the target image is a face image; and the image to be recognized is a face image.
[0117] The present disclosure also provides a computer. Figure 6 , the computer 600 includes the above-mentioned feature processing device 500.
[0118] The embodiment of the present disclosure further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the above-mentioned feature processing method.
[0119] The embodiment of the present disclosure also provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the above-mentioned feature processing method.
[0120] The computer-readable storage medium mentioned above may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.
[0121] The present disclosure also provides an electronic device, the structure of which is as follows: Figure 7 As shown, the electronic device 700 includes:
[0122] at least one processor 710, Figure 7 In the example, a processor 710 is used; and a memory 720, and a communication interface 730 and a bus may also be included. The processor 710, the communication interface 730, and the memory 720 may communicate with each other through the bus. The communication interface 730 may be used for information transmission. The processor 710 may call the logic instructions in the memory 720 to execute the feature processing method of the above embodiment.
[0123] In addition, the logic instructions in the memory 720 described above may be implemented in the form of software functional units and when sold or used as independent products, may be stored in a computer-readable storage medium.
[0124] The memory 720 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the methods in the embodiments of the present disclosure. The processor 710 executes functional applications and data processing by running the software programs, instructions, and modules stored in the memory 720, that is, implementing the feature processing method in the above method embodiments.
[0125] The memory 720 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 720 may include a high-speed random access memory and may also include a non-volatile memory.
[0126] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes, or a transient storage medium.
[0127] When used in this application, although the terms "first", "second", etc. may be used in this application to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, without changing the meaning of the description, a first element can be called a second element, and similarly, a second element can be called a first element, as long as all occurrences of "first element" are renamed consistently and all occurrences of "second element" are renamed consistently. The first element and the second element are both elements, but they may not be the same element.
[0128] The words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include the plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of one or more associated listings. In addition, when used in this application, the term "comprise" and its variants "comprises" and / or including (comprising) refer to the existence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the existence or addition of one or more other features, wholes, steps, operations, elements, components and / or these groups.
[0129] The various aspects, implementations, implementations or features of the described embodiments can be used alone or in any combination. The various aspects of the described embodiments can be implemented by software, hardware or a combination of software and hardware. The described embodiments can also be embodied by a computer-readable medium storing computer-readable code, which includes instructions that can be executed by at least one computing device. The computer-readable medium can be associated with any data storage device capable of storing data that can be read by a computer system. Computer-readable media for example can include read-only memory, random access memory, CD-ROM, HDD, DVD, magnetic tape, and optical data storage devices. The computer-readable medium can also be distributed in computer systems connected via a network so that the computer-readable code can be stored and executed in a distributed manner.
[0130] The above technical description may refer to the accompanying drawings, which form a part of the present application, and the implementation methods according to the described embodiments are shown in the accompanying drawings by description. Although these embodiments are described in sufficient detail to enable those skilled in the art to implement these embodiments, these embodiments are non-restrictive; other embodiments can be used in this way, and changes can be made without departing from the scope of the described embodiments. For example, the order of operations described in the flowchart is non-restrictive, so the order of two or more operations illustrated in the flowchart and described according to the flowchart can be changed according to several embodiments. As another example, in several embodiments, one or more operations illustrated in the flowchart and described according to the flowchart are optional or deletable. In addition, certain steps or functions can be added to the disclosed embodiments, or the order of two or more steps can be replaced. All these changes are considered to be included in the disclosed embodiments and claims.
[0131] In addition, terms are used in the above technical description to provide a thorough understanding of the described embodiments. However, overly detailed details are not required to implement the described embodiments. Therefore, the above description of the embodiments is presented for the purpose of explanation and description. The embodiments presented in the above description and the examples disclosed according to these embodiments are provided separately to add context and help understand the described embodiments. The above description is not intended to be exhaustive or to limit the described embodiments to the precise form of the present disclosure. According to the above teachings, several modifications, selective applications and changes are feasible. In some cases, well-known processing steps are not described in detail to avoid unnecessarily affecting the described embodiments.
Claims
1. A feature processing method, characterized in that: include: Using multiple feature extraction models to extract features of the target image respectively, to obtain multiple feature vectors of the target image; The feature extraction model is a deep neural network model DNN; Normalizing each of the feature vectors to obtain multiple normalized feature vectors; splicing the multiple normalized feature vectors to obtain a spliced feature vector of the target image; Obtaining an average value of each eigenvalue in the concatenated eigenvector; Obtaining the difference between each eigenvalue in the concatenated eigenvector and the average value to obtain a de-meaned vector; Obtaining a covariance matrix of the de-meaned vector; Solving the covariance matrix to obtain covariance eigenvalues and covariance eigenvectors of the covariance matrix; According to the order of the covariance eigenvalues from large to small, obtain the eigenvectors of the covariance eigenvalues with the front eigenvalues; According to the partial feature vectors, a new feature space is constructed to obtain a target feature vector; The method further comprises: The target feature vector is stored in a feature database.
2. The method according to claim 1, characterized in that The normalizing process is performed on each of the feature vectors, including: Obtaining normalized coefficients of multiple eigenvalues in each of the eigenvectors; The ratio between each of the eigenvalues and the normalization coefficient is obtained to obtain the normalized eigenvector of the eigenvector.
3. The method according to claim 1, characterized in that The method further comprises: Obtain an image to be recognized; In the feature database, the image to be identified is matched to obtain a target image corresponding to the image to be identified.
4. The method according to claim 3, characterized in that The matching of the image to be identified in the feature database includes: Obtaining a feature vector to be identified of the image to be identified; Obtaining the distance between the feature vector to be identified and each of the target feature vectors in the feature database; For any of the target feature vectors, if the distance is less than a preset distance threshold, it is determined that the target image corresponding to the target feature vector is the target image corresponding to the image to be identified.
5. The method according to claim 3, characterized in that: The target image is a face image; the image to be recognized is a face image.
6. A feature processing device, characterized in that: include: An extraction module, used to extract features of a target image using multiple feature extraction models to obtain multiple feature vectors of the target image; the feature extraction model is a deep neural network model DNN; A splicing module, used for splicing the multiple feature vectors to obtain a spliced feature vector of the target image; A dimension reduction module, used for performing dimension reduction processing on the concatenated feature vector to obtain a target feature vector; The device also includes: A storage module, used for storing the target feature vector in a feature database; The splicing module comprises: A normalization submodule, used for performing normalization processing on each of the feature vectors to obtain a plurality of normalized feature vectors; A splicing submodule, used for splicing the multiple normalized feature vectors to obtain the spliced feature vector; The dimension reduction module is specifically used for: Obtaining an average value of each eigenvalue in the concatenated eigenvector; Obtaining the difference between each eigenvalue in the concatenated eigenvector and the average value to obtain a de-meaned vector; Obtaining a covariance matrix of the de-meaned vector; Solving the covariance matrix to obtain covariance eigenvalues and covariance eigenvectors of the covariance matrix; According to the order of the covariance eigenvalues from large to small, obtain the eigenvectors of the covariance eigenvalues with the front eigenvalues; According to the partial feature vector, a new feature space is constructed to obtain the target feature vector.
7. The device according to claim 6, characterized in that The normalization submodule is specifically used for: Obtaining normalized coefficients of multiple eigenvalues in each of the eigenvectors; The ratio between each of the eigenvalues and the normalization coefficient is obtained to obtain the normalized eigenvector of the eigenvector.
8. The device according to claim 6, characterized in that The device also includes: An acquisition module, used for acquiring an image to be recognized; The recognition module is used to match the image to be recognized in the feature database to obtain a target image corresponding to the image to be recognized.
9. The device according to claim 8, characterized in that The identification module is specifically used for: Obtaining a feature vector to be identified of the image to be identified; Obtaining the distance between the feature vector to be identified and each of the target feature vectors in the feature database; For any of the target feature vectors, if the distance is less than a preset distance threshold, it is determined that the target image corresponding to the target feature vector is the target image corresponding to the image to be identified.
10. The device according to claim 8, characterized in that The target image is a face image; the image to be recognized is a face image.
11. A computer, characterized in that: A device comprising any one of claims 6 to 10.
12. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor executes the method according to any one of claims 1 to 5.
13. A computer-readable storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are configured to execute the method according to any one of claims 1 to 5.
14. A computer program product, characterized in that The computer program product comprises a computer program stored on a computer-readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer is caused to execute the method according to any one of claims 1 to 5.
