Portrait data comparison method and device, electronic equipment and storage medium

By using the portrait feature correction model in the portrait comparison method to correct the original portrait features and comparing them with the standard portrait database, the problem of large cross-camera comparison errors is solved and the comparison accuracy and precision are improved.

CN120808407APending Publication Date: 2025-10-17SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510726323.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing facial recognition methods suffer from significant errors when comparing images across different cameras, resulting in insufficient accuracy.

Method used

By inputting the original portrait features and shooting attributes into the trained portrait feature correction model for correction processing, the corrected target portrait features are obtained, and feature comparison is performed in the standard portrait database. The training data set is used to optimize the model parameters to reduce errors.

Benefits of technology

The accuracy of cross-camera comparison is improved, the probability of cluster splitting of the front and side faces of the same person is reduced, and the accuracy of portrait data comparison is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120808407A_ABST
    Figure CN120808407A_ABST
Patent Text Reader

Abstract

The invention provides a portrait data comparison method. The method comprises the following steps: acquiring original portrait features corresponding to portrait data to be compared and shooting attributes corresponding to the portrait data to be compared; the original human image features and the shooting attributes are input into a trained human image feature correction model for human image correction processing, corrected target human image features are obtained, and the trained human image feature correction model is obtained by training sample human image data and standard human image data of different shooting attributes; and performing feature comparison in a standard portrait database by using the target portrait features to obtain a portrait data comparison result corresponding to the to-be-compared portrait data. According to the method, the problem of large cross-camera portrait data comparison error in the existing portrait comparison method is solved, the cross-camera comparison accuracy is improved, and the front and side face clustering splitting probability of the same person can be effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of portrait recognition, and in particular to a portrait data comparison method and device, electronic equipment and a storage medium. BACKGROUND

[0002] With the continuous development of economy, personnel mobility is also becoming more and more frequent. Therefore, for security and other factors, the entrances and exits of public places are usually equipped with monitoring cameras to record and verify the identities of the personnel. At present, existing cameras have different scene attributes, such as light, angle, height and place type. The portrait features captured by cameras with similar attributes have high similarity, while the portrait features captured by cameras with large differences have large differences, which introduces large errors in cross-camera comparison. Therefore, the existing portrait comparison method has the problem of large errors in cross-camera comparison of portrait data. SUMMARY

[0003] The embodiment of the present application provides a portrait data comparison method, which aims to solve the problem of large errors in cross-camera comparison of portrait data of the existing portrait comparison method. The present application inputs the original portrait feature and the shooting attribute into the trained portrait feature correction model for portrait correction processing to obtain the corrected target portrait feature, and uses the target portrait feature to perform feature comparison in the standard portrait database to obtain the portrait data comparison result corresponding to the portrait data to be compared. The present application solves the problem of large errors in cross-camera comparison of portrait data of the existing portrait comparison method, improves the cross-camera comparison accuracy, and can effectively reduce the probability of clustering and splitting of the front and side faces of the same person.

[0004] In a first aspect, the embodiment of the present application provides a portrait data comparison method, which comprises the following steps:

[0005] Obtain the original portrait feature corresponding to the portrait data to be compared and the shooting attribute corresponding to the portrait data to be compared;

[0006] Input the original portrait feature and the shooting attribute into the trained portrait feature correction model for portrait correction processing to obtain the corrected target portrait feature, wherein the trained portrait feature correction model is obtained by training sample portrait data and standard portrait data of different shooting attributes;

[0007] Use the target portrait feature to perform feature comparison in the standard portrait database to obtain the portrait data comparison result corresponding to the portrait data to be compared.

[0008] Optionally, before the original portrait feature and the shooting attribute are input into the preset portrait feature correction model for portrait correction processing to obtain the corrected target portrait feature, the method further comprises:

[0009] constructing a standard portrait database corresponding to sample personnel and a sample portrait database, the standard portrait database including at least one standard portrait feature corresponding to the sample personnel, the standard portrait feature corresponding to a standard shooting attribute, the sample portrait database including at least one sample portrait feature corresponding to the sample personnel, each sample portrait feature corresponding to a shooting attribute;

[0010] constructing a training data set based on the standard portrait database and the sample portrait database;

[0011] training a portrait feature correction model based on the training data set, and obtaining a trained portrait feature correction model after the training.

[0012] Optionally, the constructing the standard portrait database corresponding to sample personnel comprises:

[0013] determining sample personnel for constructing the standard portrait database;

[0014] for each sample personnel, at least one standard portrait data is obtained under a standard shooting attribute;

[0015] extracting portrait features from the standard portrait data to obtain at least one standard portrait feature corresponding to the sample personnel, each standard portrait data corresponding to a standard portrait feature;

[0016] constructing the standard portrait database based on at least one standard portrait feature corresponding to each sample personnel.

[0017] Optionally, the constructing the sample portrait database corresponding to sample personnel comprises:

[0018] for each portrait collection device, a plurality of sample portrait data corresponding to each sample personnel is obtained under different shooting attribute conditions, at least one sample portrait data of the sample personnel is obtained under each shooting attribute condition, and each sample portrait data corresponds to a shooting attribute;

[0019] extracting portrait features from the sample portrait data to obtain at least one sample portrait feature corresponding to the sample personnel, the sample portrait data corresponding to a sample portrait feature;

[0020] constructing a sample portrait database based on at least one sample portrait feature corresponding to each sample personnel and the shooting attribute corresponding to each sample portrait feature.

[0021] Optionally, the constructing a training data set based on the standard portrait database and the sample portrait database comprises:

[0022] For each sample portrait feature in the sample portrait database, a standard portrait feature is matched in the standard portrait database, and a sample triple including the sample portrait feature, the shooting attribute and the standard portrait feature is constructed;

[0023] Based on the sample triple corresponding to each sample personnel, a training data set is constructed.

[0024] Optionally, the training data set is used to train a portrait feature correction model, and after the training, a trained portrait feature correction model is obtained, including:

[0025] The sample portrait feature and the shooting attribute in the sample triple are input into the portrait feature correction model to be trained for convolution processing, so as to obtain a first convolution feature corresponding to the sample portrait feature and a second convolution feature corresponding to the shooting attribute;

[0026] The first convolution feature and the second convolution feature are fused to obtain a fused convolution feature;

[0027] The fused convolution feature is subjected to feature transformation processing to obtain a corrected portrait feature;

[0028] The model parameters of the portrait feature correction model to be trained are adjusted with the optimization target of minimizing the metric distance between the corrected portrait feature and the standard portrait feature;

[0029] The adjustment process of the model parameters is iterated until a training stop condition is reached, and a trained portrait feature correction model is obtained.

[0030] Optionally, the first convolution feature and the second convolution feature are fused to obtain a fused convolution feature, including:

[0031] Based on the error value between the shooting attribute and the standard shooting attribute, a weight value corresponding to the first convolution feature and the second convolution feature is determined;

[0032] Based on the weight value, the first convolution feature and the second convolution feature are weighted and fused to obtain a fused convolution feature.

[0033] In a second aspect, the embodiments of the present application further provide a portrait data comparison device, which comprises:

[0034] A first acquisition module is configured to acquire an original portrait feature corresponding to portrait data to be compared and a shooting attribute corresponding to the portrait data to be compared;

[0035] The processing module is configured to input the original portrait feature and the shooting attribute into a trained portrait feature correction model to perform portrait correction processing, so as to obtain a corrected target portrait feature.

[0036] The comparison module is configured to perform feature comparison in a standard portrait database by using the target portrait feature, so as to obtain a portrait data comparison result corresponding to the to-be-compared portrait data.

[0037] In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the steps in the portrait data comparison method when executing the computer program.

[0038] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program implements the steps in the portrait data comparison method when executed by a processor.

[0039] In the embodiment of the present application, the original portrait feature corresponding to the to-be-compared portrait data and the shooting attribute corresponding to the to-be-compared portrait data are obtained, the original portrait feature and the shooting attribute are input into a trained portrait feature correction model to perform portrait correction processing, so as to obtain a corrected target portrait feature, the trained portrait feature correction model is obtained by training sample portrait data and standard portrait data with different shooting attributes, and the target portrait feature is used to perform feature comparison in a standard portrait database, so as to obtain a portrait data comparison result corresponding to the to-be-compared portrait data. By inputting the original portrait feature and the shooting attribute into the trained portrait feature correction model to perform portrait correction processing, obtaining the corrected target portrait feature, and using the target portrait feature to perform feature comparison in the standard portrait database, the portrait data comparison result corresponding to the to-be-compared portrait data is obtained, the problem of large error in cross-camera portrait data comparison in the existing portrait comparison method is solved, the cross-camera comparison accuracy is improved, and the probability of clustering and splitting of the front and side faces of the same person can be effectively reduced. BRIEF DESCRIPTION OF DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.

[0041] Figure 1is a flow chart of a portrait data comparison method provided by an embodiment of the present application;

[0042] Figure 2 is a structural schematic diagram of a portrait data comparison device provided by an embodiment of the present application;

[0043] Figure 3 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0044] 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. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0045] As shown in Figure 1 , Figure 1 is a flow chart of a portrait data comparison method provided by an embodiment of the present application. The portrait data comparison method comprises the following steps:

[0046] 101, obtaining original portrait features corresponding to to-be-compared portrait data and shooting attributes corresponding to the to-be-compared portrait data.

[0047] In the embodiment of the present application, the portrait data comparison method described above can be applied to a data management platform. The data management platform can be constructed based on a server or a distributed server. The data management platform comprises a data interface (for uploading by a sensor or a user), a knowledge database and a knowledge database construction program. The data interface can be used to obtain portrait data. One portrait data corresponds to one camera attribute. The knowledge database construction program can be used to implement construction of the knowledge database. The knowledge database is dedicated to providing additional associated information for a recognized data entity, so as to improve the understanding depth of a data recognition system on content.

[0048] The to-be-compared portrait data described above can be understood as portrait information that needs to be compared.

[0049] The original portrait features corresponding to the to-be-compared portrait data described above can be understood as facial feature information directly extracted from the to-be-compared portrait data.

[0050] The shooting attributes described above can be understood as shooting parameter information extracted from the to-be-compared portrait data, such as illumination, angle, height, etc.

[0051] It should be noted that by acquiring the original portrait feature corresponding to the to-be-compared portrait data and the shooting attribute corresponding to the to-be-compared portrait data, the portrait data of the same person in different scenes can be more accurately recognized.

[0052] 102. inputting the original portrait feature and the shooting attribute into the trained portrait feature correction model for portrait correction processing to obtain a corrected target portrait feature.

[0053] In the embodiment of the present application, the trained portrait feature correction model is obtained by training sample portrait data and standard portrait data of different shooting attributes.

[0054] The trained portrait feature correction model can be a portrait feature correction model constructed based on deep learning or machine learning, such as a nonlinear correction mapping model, a CNN (convolutional neural network), an SVM (support vector machine), etc.

[0055] The trained portrait feature correction model can correct the input portrait feature and the shooting attribute.

[0056] The sample portrait data of different shooting data can be sample portrait data collected under different time periods, different lighting conditions (day / night / shade), different scenes (indoor / outdoor), different angles, and different heights.

[0057] The standard portrait data can be standard portrait data shot in a standard environment, and the standard environment can be a standard environment of high-quality light, a front angle, a high-definition camera, etc.

[0058] The portrait correction processing can be understood as a process of correcting the original portrait feature by the trained portrait feature correction model. Specifically, it can include denoising, enhancement, segmentation, recognition, etc.

[0059] The corrected target portrait feature is a portrait feature obtained by correcting the original portrait feature.

[0060] 103. using the target portrait feature to perform feature comparison in a standard portrait database to obtain a portrait data comparison result corresponding to the to-be-compared portrait data.

[0061] In the embodiment of the present application, the standard portrait database is a standard portrait database constructed by standard portrait data, and the standard portrait data can be standard portrait data shot in a standard environment, and the standard environment can be a standard environment of high-quality light, a front angle, a high-definition camera, etc.

[0062] The feature comparison can be understood as comparing the target portrait feature with the standard portrait feature in the standard portrait database, and calculating the similarity between the target portrait feature and the standard portrait feature to determine the similarity and difference between the target portrait feature and the standard portrait feature.

[0063] It should be noted that the similarity between the target portrait feature and the standard portrait feature can be calculated by calculating the Euclidean distance, correlation coefficient and other indicators between the target portrait feature and the standard portrait feature, so as to determine the portrait data comparison result corresponding to the portrait data to be compared.

[0064] In the embodiment of the present application, the original portrait feature and the shooting attribute are input into the trained portrait feature correction model for portrait correction processing to obtain the corrected target portrait feature, and the target portrait feature is used for feature comparison in the standard portrait database to obtain the portrait data comparison result corresponding to the portrait data to be compared, thereby solving the problem of large error in cross-camera portrait data comparison of the existing portrait comparison method, and improving the cross-camera comparison accuracy.

[0065] In the embodiment of the present application, the original portrait feature corresponding to the portrait data to be compared and the shooting attribute corresponding to the portrait data to be compared are obtained; the original portrait feature and the shooting attribute are input into the trained portrait feature correction model for portrait correction processing to obtain the corrected target portrait feature, the trained portrait feature correction model is obtained by training different sample portrait data and standard portrait data of shooting attributes; and the target portrait feature is used for feature comparison in the standard portrait database to obtain the portrait data comparison result corresponding to the portrait data to be compared. The original portrait feature and the shooting attribute are input into the trained portrait feature correction model for portrait correction processing to obtain the corrected target portrait feature, and the target portrait feature is used for feature comparison in the standard portrait database to obtain the portrait data comparison result corresponding to the portrait data to be compared, thereby solving the problem of large error in cross-camera portrait data comparison of the existing portrait comparison method, and effectively reducing the probability of clustering and splitting of the same person's front and side faces.

[0066] It can be understood that in the specific embodiments of the present application, data related to portrait data, shooting data, user data, etc. are involved, and when the embodiments in the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data, as well as the training, deployment and calling of algorithm models, need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0067] Optionally, before the step of inputting the original portrait feature and the shooting attribute into the preset portrait feature correction model for portrait correction processing to obtain the corrected target portrait feature, a standard portrait database corresponding to sample personnel and a sample portrait database can also be constructed; the standard portrait database and the sample portrait database construct a training data set; based on the training data set, the portrait feature correction model to be trained is trained, and after training, a trained portrait feature correction model is obtained.

[0068] In the embodiment of the present application, the standard portrait database includes at least one standard portrait feature corresponding to sample personnel, the standard portrait feature corresponds to a standard shooting attribute, and the sample portrait database includes at least one sample portrait feature corresponding to sample personnel, and each sample portrait feature corresponds to a shooting attribute.

[0069] The standard portrait feature can be a standard portrait feature of sample personnel taken in a standard environment, and the standard environment can be a standard environment of high-quality light, a front face angle, a high-definition camera, etc.

[0070] The sample portrait feature can be a sample portrait feature obtained by feature extraction of sample portrait data collected by sample personnel in different time periods, different light conditions (day / night / shade), different scenes (indoor / outdoor), different angles, and different heights. The sample portrait data can be feature-extracted by a face feature extraction model to obtain sample portrait features, and each sample portrait feature corresponds to a camera attribute. The camera attribute can be a time period, a scene, a light, an angle, a height, etc. The face feature extraction model can extract face features from a face image, and the face feature extraction model can be a face feature extraction model constructed based on deep learning or machine learning, such as CNN, SVM, etc.

[0071] The portrait feature correction model to be trained can be a portrait feature correction model constructed based on deep learning or machine learning, such as a nonlinear correction mapping model, CNN, SVM, etc.

[0072] It should be noted that by collecting a large amount of original portrait features and shooting attributes of sample personnel, and corresponding standard portrait features and standard shooting attributes, the original portrait features and shooting attributes of a large amount of sample personnel, and the corresponding standard portrait features and standard shooting attributes are sorted into a training data set. The training data set is used to train the portrait feature correction model to be trained, the model learns how to correct the portrait feature according to the original portrait feature and the shooting attribute, and after training, a trained portrait feature correction model is obtained. The trained portrait feature correction model can correct the new original portrait feature and the shooting attribute to obtain the corrected portrait feature.

[0073] Optionally, in the step of constructing the standard portrait database corresponding to the sample personnel, the sample personnel used for constructing the standard portrait database can be determined; for each sample personnel, at least one standard portrait data is obtained by shooting under standard shooting attributes; portrait features of the standard portrait data are extracted to obtain at least one standard portrait feature corresponding to the sample personnel; and the standard portrait database is constructed based on the at least one standard portrait feature corresponding to each sample personnel.

[0074] In the embodiment of the present application, each standard portrait data corresponds to one standard portrait feature. The portrait data matched with the portrait feature can be found from the standard portrait database through the portrait feature.

[0075] The standard shooting attributes described above can be high-quality light, front face angle, high-definition camera, and the like.

[0076] The standard portrait data described above can be standard portrait data shot under standard shooting attributes.

[0077] The portrait feature extraction described above can be understood as a process of extracting a discriminative facial feature representation from the standard portrait data. The standard portrait feature can be obtained by performing feature extraction on the standard portrait data through a facial feature extraction model. The facial feature extraction model can be a facial feature extraction model constructed based on deep learning or machine learning, such as CNN, SVM, and the like.

[0078] The standard portrait database described above includes at least one standard portrait feature corresponding to each sample personnel.

[0079] It should be noted that the standard portrait data shot under the standard environment (high-quality light, front face angle, high-definition camera) can be selected, and the standard features that each sample personnel should have under the standard environment are determined as the real feature benchmark of the sample personnel, and the standard portrait database is constructed according to the standard portrait features.

[0080] Optionally, in the step of constructing the sample portrait database corresponding to the sample personnel, for each portrait acquisition device, a plurality of sample portrait data corresponding to each sample personnel can be obtained by shooting under different shooting attribute conditions; portrait features of the sample portrait data are extracted to obtain at least one sample portrait feature corresponding to the sample personnel; and the sample portrait database is constructed based on the at least one sample portrait feature corresponding to each sample personnel and the shooting attributes corresponding to each sample portrait feature.

[0081] In the embodiment of the present application, at least one sample portrait data of the sample personnel is obtained by shooting under each shooting attribute condition, and each sample portrait data corresponds to one shooting attribute. Each sample portrait data corresponds to one sample portrait feature.

[0082] The portrait collection device can be a camera or the like.

[0083] Further, for each camera, a plurality of sample portrait data corresponding to each sample person can be captured under different time periods, different lighting conditions (day / night / shade), different scenes (indoor / outdoor), different heights, and different angles. A face feature extraction model can be used to extract features from the sample portrait data to obtain at least one sample portrait feature corresponding to the sample person. The face feature extraction model can extract face features from the face image. The face feature extraction model can be a face feature extraction model based on deep learning or machine learning, such as CNN, SVM, etc. Then, according to the at least one sample portrait feature corresponding to each sample person and the shooting attribute corresponding to each sample portrait feature, a sample portrait database is constructed.

[0084] The sample portrait database includes at least one sample portrait feature corresponding to each sample person and a shooting attribute corresponding to each sample portrait feature.

[0085] Optionally, in the step of constructing a training data set based on the standard portrait database and the sample portrait database, for each sample portrait feature in the sample portrait database, a standard portrait feature in the standard portrait database is matched to construct a sample triple containing the sample portrait feature, the shooting attribute, and the standard portrait feature. Based on the sample triple corresponding to each sample person, a training data set is constructed.

[0086] In the embodiment of the present application, the sample triple can be understood as a sample triple, which is a set of three elements, each element being an object or a value. The sample triple includes a sample portrait feature, a shooting attribute, and a standard portrait feature. The sample triple can be a way to associate the portrait data to be identified with the portrait data of known identity.

[0087] The training data set can be used to train the portrait feature correction model to be trained to realize the identification and classification of new portrait data.

[0088] Optionally, in the step of training the portrait feature correction model based on the training data set, the sample portrait feature and the shooting attribute in the sample triplets can be input into the portrait feature correction model to be trained for convolution processing to obtain a first convolution feature corresponding to the sample portrait feature and a second convolution feature corresponding to the shooting attribute; the first convolution feature and the second convolution feature are fused to obtain a fused convolution feature; the fused convolution feature is subjected to feature transformation processing to obtain a corrected portrait feature; the model parameters of the portrait feature correction model to be trained are adjusted with the optimization objective of minimizing the metric distance between the corrected portrait feature and the standard portrait feature; and the adjustment process of the model parameters is iterated until a training stop condition is reached to obtain the trained portrait feature correction model.

[0089] In the embodiments of the present application, the portrait feature correction model to be trained can be a portrait feature correction model constructed based on deep learning or machine learning, such as a nonlinear correction mapping model, a CNN, an SVM, etc.

[0090] The convolution processing can be understood as a feature extraction process of the sample portrait feature and the shooting attribute.

[0091] The first convolution feature can be understood as a portrait convolution feature obtained by convolution processing the sample portrait feature.

[0092] The second convolution feature can be understood as a shooting attribute convolution feature obtained by convolution processing the shooting attribute.

[0093] The fusion processing can be understood as a process of fusing the first convolution feature and the second convolution feature, and the first convolution feature and the second convolution feature can be fused by using a weighted summation, splicing, etc. fusion processing method to obtain the fused convolution feature.

[0094] The fused convolution feature can be understood as a fused convolution feature obtained by fusing the first convolution feature and the second convolution feature.

[0095] The feature transformation processing can be understood as a process of feature correction of the fused convolution feature.

[0096] The corrected portrait feature can be understood as a corrected portrait feature obtained by feature transformation processing the fused convolution feature.

[0097] The adjustment can be understood as a process of adjusting the hyperparameters and model parameters of the model to optimize the model performance and prediction accuracy.

[0098] Specifically, for each sample triple, the sample portrait feature and the shooting attribute in the sample triple are input into the to-be-trained portrait feature correction model for convolution processing to obtain first convolution features and second convolution features, the first convolution features and the second convolution features are fused to obtain fused convolution features, the fused convolution features are subjected to feature transformation processing to obtain a corrected portrait feature, a metric distance between the corrected portrait feature and a standard portrait feature is calculated, and minimizing the metric distance between the corrected portrait feature and the standard portrait feature is taken as an optimization target, and model parameters of the to-be-trained portrait feature correction model are adjusted until a training stop condition that an iteration number reaches is reached, training is completed, and a trained portrait feature correction model is obtained. The metric distance can be an Euclidean distance, a cosine similarity, or the like.

[0099] The trained portrait feature correction model corrects the input portrait feature and the shooting attribute.

[0100] Optionally, in the step of fusing the first convolution features and the second convolution features to obtain the fused convolution features, a weight value corresponding to the first convolution features and the second convolution features can be determined based on an error value between the shooting attribute and a standard shooting attribute, and the first convolution features and the second convolution features are weighted and fused based on the weight value to obtain the fused convolution features.

[0101] In the embodiment of the present application, the error value between the shooting attribute and the standard shooting attribute can be calculated, and the weight value corresponding to the first convolution features and the second convolution features can be determined according to the error value between the shooting data and the standard shooting attribute. The weight value is used to measure the importance of different features.

[0102] The standard shooting attribute can be a high-quality light, a front angle, a high-definition camera, or the like.

[0103] The weighted fusion can be understood as a process of weighted summation of the weight values corresponding to the first convolution features and the second convolution features to obtain a comprehensive feature representation.

[0104] The fused convolution features are the fused convolution features obtained by weighted fusion of the weight values corresponding to the first convolution features and the second convolution features.

[0105] It should be noted that, by inputting the original portrait feature and the shooting attribute into the trained portrait feature correction model for portrait correction processing to obtain a corrected target portrait feature, and using the target portrait feature for feature comparison in a standard portrait database to obtain a portrait data comparison result corresponding to the to-be-compared portrait data, the present application solves the problem of large error in comparing portrait data across cameras in the existing portrait comparison method, and improves the accuracy of cross-camera comparison.

[0106] As Figure 2 shown, the embodiment of the present application provides a portrait data comparison device, which comprises:

[0107] The first acquisition module 201 is configured to acquire original portrait features corresponding to portrait data to be compared and shooting attributes corresponding to the portrait data to be compared.

[0108] The processing module 202 is configured to input the original portrait features and the shooting attributes into a trained portrait feature correction model to perform portrait correction processing, so as to obtain target portrait features after correction, wherein the trained portrait feature correction model is obtained by training sample portrait data and standard portrait data with different shooting attributes.

[0109] The comparison module 203 is configured to perform feature comparison in a standard portrait database by using the target portrait features, so as to obtain a portrait data comparison result corresponding to the portrait data to be compared.

[0110] Optionally, the device further comprises:

[0111] The first construction module is configured to construct a standard portrait database corresponding to sample personnel and a sample portrait database, wherein the standard portrait database comprises at least one standard portrait feature corresponding to the sample personnel, the standard portrait feature corresponds to a standard shooting attribute, and the sample portrait database comprises at least one sample portrait feature corresponding to the sample personnel, each sample portrait feature corresponds to one shooting attribute.

[0112] The second construction module is configured to construct a training data set based on the standard portrait database and the sample portrait database.

[0113] The training module is configured to train a portrait feature correction model to be trained based on the training data set, and obtain a trained portrait feature correction model after training.

[0114] Optionally, the first construction module comprises:

[0115] The first determination sub-module is configured to determine sample personnel used for constructing the standard portrait database.

[0116] The first shooting sub-module is configured to shoot at least one standard portrait data under a standard shooting attribute for each sample personnel.

[0117] The first processing sub-module is configured to perform portrait feature extraction on the standard portrait data, so as to obtain at least one standard portrait feature corresponding to the sample personnel, and each standard portrait data corresponds to one standard portrait feature.

[0118] The first constructing submodule is configured to construct the standard portrait database based on the at least one standard portrait feature corresponding to each of the sample persons.

[0119] Optionally, the first constructing module comprises:

[0120] The second photographing submodule is configured to photograph a plurality of sample portrait data corresponding to each of the sample persons under different photographing attribute conditions for each portrait acquisition device, at least one sample portrait data of the sample person is photographed under each photographing attribute condition, and each sample portrait data corresponds to one photographing attribute.

[0121] The second processing submodule is configured to perform portrait feature extraction on the sample portrait data to obtain at least one sample portrait feature corresponding to each of the sample persons, and each sample portrait data corresponds to one sample portrait feature.

[0122] The second constructing submodule is configured to construct a sample portrait database based on the at least one sample portrait feature corresponding to each of the sample persons and the photographing attribute corresponding to each of the sample portrait features.

[0123] Optionally, the second constructing module comprises:

[0124] The third constructing submodule is configured to match a standard portrait feature in the standard portrait database for each sample portrait feature in the sample portrait database to construct a sample triple comprising a sample portrait feature, a photographing attribute, and a standard portrait feature.

[0125] The fourth constructing submodule is configured to construct a training data set based on the sample triple corresponding to each of the sample persons.

[0126] Optionally, the training module comprises:

[0127] The third processing submodule is configured to input the sample portrait feature and the photographing attribute in the sample triple into the portrait feature correction model to be trained for convolution processing to obtain a first convolution feature corresponding to the sample portrait feature and a second convolution feature corresponding to the photographing attribute.

[0128] The fourth processing submodule is configured to perform fusion processing on the first convolution feature and the second convolution feature to obtain a fusion convolution feature.

[0129] The fifth processing submodule is configured to perform feature transformation processing on the fusion convolution feature to obtain a corrected portrait feature.

[0130] a sixth processing submodule, configured to adjust model parameters of the portrait feature correction model by taking minimizing a metric distance between the corrected portrait feature and the standard portrait feature as an optimization objective;

[0131] a seventh processing submodule, configured to iteratively adjust the model parameters until a training stop condition is reached, to obtain a trained portrait feature correction model.

[0132] Optionally, the fourth processing submodule comprises:

[0133] a determining unit, configured to determine a weight value corresponding to the first convolutional feature and the second convolutional feature based on an error value between the photographing attribute and a standard photographing attribute;

[0134] a processing unit, configured to perform weighted fusion on the first convolutional feature and the second convolutional feature based on the weight value, to obtain a fused convolutional feature.

[0135] As shown in Figure 3 the embodiment of the present application also provides an electronic device comprising a processor, which can execute any of the portrait data comparison methods.

[0136] Specifically, the electronic device comprises a processor 301, a memory 302, and a computer program stored in the memory 302 and executable on the processor 301 to perform the portrait data comparison method, wherein:

[0137] the processor 301 executes the computer program of the portrait data comparison method stored in the memory 302 to perform the following steps:

[0138] obtain an original portrait feature corresponding to the portrait data to be compared and a photographing attribute corresponding to the portrait data to be compared;

[0139] input the original portrait feature and the photographing attribute into a trained portrait feature correction model to perform portrait correction processing, to obtain a corrected target portrait feature, wherein the trained portrait feature correction model is obtained by training sample portrait data and standard portrait data of different photographing attributes;

[0140] perform feature comparison in a standard portrait database using the target portrait feature, to obtain a portrait data comparison result corresponding to the portrait data to be compared.

[0141] Optionally, before the original portrait feature and the photographing attribute are input into the preset portrait feature correction model to perform portrait correction processing to obtain the corrected target portrait feature, the method executed by the processor 301 further comprises:

[0142] constructing a standard portrait database corresponding to sample personnel and a sample portrait database, the standard portrait database including at least one standard portrait feature corresponding to the sample personnel, the standard portrait feature corresponding to a standard shooting attribute, the sample portrait database including at least one sample portrait feature corresponding to the sample personnel, each sample portrait feature corresponding to a shooting attribute;

[0143] constructing a training data set based on the standard portrait database and the sample portrait database;

[0144] training a portrait feature correction model based on the training data set, and obtaining a trained portrait feature correction model after the training.

[0145] Optionally, the processor 301 executes the construction of the standard portrait database corresponding to the sample personnel, comprising:

[0146] determining sample personnel for constructing the standard portrait database;

[0147] for each sample personnel, at least one standard portrait data is obtained under a standard shooting attribute;

[0148] performing portrait feature extraction on the standard portrait data to obtain at least one standard portrait feature corresponding to the sample personnel, each standard portrait data corresponding to a standard portrait feature;

[0149] constructing the standard portrait database based on at least one standard portrait feature corresponding to each sample personnel.

[0150] Optionally, the processor 301 executes the construction of the sample portrait database corresponding to the sample personnel, comprising:

[0151] for each portrait acquisition device, a plurality of sample portrait data corresponding to each sample personnel is obtained under different shooting attribute conditions, at least one sample portrait data of the sample personnel is obtained under each shooting attribute condition, and each sample portrait data corresponds to a shooting attribute;

[0152] performing portrait feature extraction on the sample portrait data to obtain at least one sample portrait feature corresponding to the sample personnel, the sample portrait data corresponding to a sample portrait feature;

[0153] constructing a sample portrait database based on at least one sample portrait feature corresponding to each sample personnel and the shooting attribute corresponding to each sample portrait feature.

[0154] Optionally, the processor 301 executes the training data set is constructed based on the standard portrait database and the sample portrait database, comprising:

[0155] For each sample portrait feature in the sample portrait database, a standard portrait feature is matched in the standard portrait database, and a sample triple containing the sample portrait feature, the shooting attribute and the standard portrait feature is constructed;

[0156] Based on the sample triple corresponding to each sample personnel, a training data set is constructed.

[0157] Optionally, the processor 301 executes the training data set, and trains the portrait feature correction model to be trained, and obtains the trained portrait feature correction model after training, comprising:

[0158] The sample portrait feature and the shooting attribute in the sample triple are input into the portrait feature correction model to be trained for convolution processing, and the first convolution feature corresponding to the sample portrait feature and the second convolution feature corresponding to the shooting attribute are obtained;

[0159] The first convolution feature and the second convolution feature are fused to obtain a fused convolution feature;

[0160] The fused convolution feature is processed by feature transformation to obtain a corrected portrait feature;

[0161] The model parameters of the portrait feature correction model to be trained are adjusted to minimize the metric distance between the corrected portrait feature and the standard portrait feature as the optimization target;

[0162] The adjustment process of the model parameters is iterated until the training stop condition is reached, and the trained portrait feature correction model is obtained.

[0163] Optionally, the processor 301 executes the first convolution feature and the second convolution feature to obtain a fused convolution feature, comprising:

[0164] Based on the error value between the shooting attribute and the standard shooting attribute, the weight value corresponding to the first convolution feature and the second convolution feature is determined;

[0165] Based on the weight value, the first convolution feature and the second convolution feature are weighted and fused to obtain a fused convolution feature.

[0166] The embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement each process of the portrait data comparison method provided by the embodiment of the present application, and the same technical effects can be achieved. To avoid repetition, details are not described herein.

[0167] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program to instruct related hardware. The program can be stored in a computer readable storage medium, and when the program is executed, the processes of the above-mentioned embodiment methods can be included. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM) or a random access memory (RAM).

[0168] The above only describes the preferred embodiments of the present application, and of course cannot limit the scope of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope of the present application.

Claims

1. A portrait data comparison method, characterized in that: The method comprises the following steps: Obtaining original portrait features corresponding to the portrait data to be compared and shooting attributes corresponding to the portrait data to be compared; Inputting the original portrait features and the shooting attributes into a trained portrait feature correction model to perform portrait correction processing to obtain corrected target portrait features, wherein the trained portrait feature correction model is trained using sample portrait data and standard portrait data with different shooting attributes; The target portrait features are used to perform feature comparison in a standard portrait database to obtain portrait data comparison results corresponding to the portrait data to be compared.

2. The portrait data comparison method according to claim 1, wherein: Before inputting the original portrait feature and the shooting attribute into a preset portrait feature correction model to perform portrait correction processing to obtain the corrected target portrait feature, the method further includes: Constructing a standard portrait database and a sample portrait database corresponding to the sample person, wherein the standard portrait database includes at least one standard portrait feature corresponding to the sample person, and the standard portrait feature corresponds to a standard shooting attribute; and the sample portrait database includes at least one sample portrait feature corresponding to the sample person, and each sample portrait feature corresponds to one of the shooting attributes; Constructing a training data set based on the standard portrait database and the sample portrait database; The portrait feature correction model to be trained is trained based on the training data set, and a trained portrait feature correction model is obtained after the training is completed.

3. The portrait data comparison method according to claim 2, wherein: The construction of a standard portrait database corresponding to the sample persons includes: Determine the sample persons used to construct the standard portrait database; For each of the sample persons, photographing under standard photographing attributes to obtain at least one standard portrait data; Performing portrait feature extraction on the standard portrait data to obtain at least one standard portrait feature corresponding to the sample person, wherein each standard portrait data corresponds to one standard portrait feature; The standard portrait database is constructed based on at least one standard portrait feature corresponding to each of the sample persons.

4. The portrait data comparison method according to claim 2, wherein: The step of constructing a sample portrait database corresponding to the sample persons includes: For each portrait acquisition device, under different shooting attribute conditions, multiple sample portrait data corresponding to each sample person are obtained, at least one sample portrait data of the sample person is obtained under each shooting attribute condition, and each sample portrait data corresponds to one shooting attribute; Performing portrait feature extraction on the sample portrait data to obtain at least one sample portrait feature corresponding to the sample person, wherein the sample portrait data corresponds to one sample portrait feature; A sample portrait database is constructed based on at least one sample portrait feature corresponding to each sample person and the shooting attributes corresponding to each sample portrait feature.

5. The portrait data comparison method according to any one of claims 2 to 4, characterized in that: The step of constructing a training data set based on the standard portrait database and the sample portrait database includes: For each sample portrait feature in the sample portrait database, a standard portrait feature is matched in the standard portrait database to construct a sample triplet including the sample portrait feature, the shooting attribute, and the standard portrait feature; A training data set is constructed based on the sample triples corresponding to each of the sample persons.

6. The portrait data comparison method according to claim 5, wherein: The training of the portrait feature correction model to be trained based on the training data set, and obtaining a trained portrait feature correction model after the training is completed, includes: Inputting the sample portrait feature and the shooting attribute in the sample triplet into the to-be-trained portrait feature correction model for convolution processing to obtain a first convolution feature corresponding to the sample portrait feature and a second convolution feature corresponding to the shooting attribute; Fusing the first convolution feature with the second convolution feature to obtain a fused convolution feature; Performing feature transformation processing on the fused convolution features to obtain modified portrait features; Adjusting the model parameters of the portrait feature correction model to be trained with minimizing the metric distance between the corrected portrait feature and the standard portrait feature as an optimization goal; The adjustment process of the model parameters is iterated until the training stop condition is reached to obtain a trained portrait feature correction model.

7. The portrait data comparison method according to claim 6, wherein: The fusing the first convolution feature and the second convolution feature to obtain a fused convolution feature includes: Determining weight values ​​corresponding to the first convolution feature and the second convolution feature based on an error value between the shooting attribute and a standard shooting attribute; Based on the weight value, the first convolution feature and the second convolution feature are weightedly fused to obtain a fused convolution feature.

8. A portrait data comparison device, characterized in that: The portrait data comparison device comprises: A first acquisition module is used to acquire original portrait features corresponding to the portrait data to be compared and shooting attributes corresponding to the portrait data to be compared; a processing module, configured to input the original portrait features and the shooting attributes into a trained portrait feature correction model to perform portrait correction processing to obtain corrected target portrait features, wherein the trained portrait feature correction model is trained using sample portrait data and standard portrait data with different shooting attributes; The comparison module is used to perform feature comparison in a standard portrait database using the target portrait feature to obtain a portrait data comparison result corresponding to the portrait data to be compared.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the portrait data comparison method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the portrait data comparison method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Face recognition method and device, electronic equipment and storage medium

    CN118230385A

  • Face recognition method and device and electronic equipment

    CN119516585A

  • Embedded intelligent door lock face recognition system capable of correcting face features

    CN119888822A