Gender and age estimation method and terminal based on perception enhancement

By introducing perceptual enhancement technology into gender and age estimation models, the problem of difficulty in processing low-resolution image is solved, and more accurate gender and age feature extraction and estimation are achieved.

CN119693990AActive Publication Date: 2025-03-25SICHUAN COMPUTER RES INST
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510200523.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-03-25
Estimated Expiration
2045-02-24

AI Technical Summary

Technical Problem

The prior art is difficult to effectively process low-resolution images, resulting in gender and age estimation models that cannot be correctly predicted in practical applications.

Method used

A gender and age estimation method based on perception enhancement is adopted, and a feature extraction network that can effectively process low-resolution images through steps such as image data preprocessing, image feature perception enhancement, backbone image feature extraction, multi-level feature fusion and gender and age estimation.

Benefits of technology

It improves the accuracy of extracting gender and age features in low-resolution images, enhances the utilization of image details, and improves the accuracy of age estimation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693990A_ABST
    Figure CN119693990A_ABST
Patent Text Reader

Abstract

The invention provides a gender and age estimation method based on perception enhancement and a terminal. The method comprises the following steps: S1, preprocessing image data; s2, image feature perception enhancement; s3, extracting features of the trunk image; s4, performing multi-level feature fusion; s5, performing gender and age estimation; the method is a feature extraction network specially designed for a low-resolution face image, and the image feature size and the image detail information are increased through perception enhancement, so that the accuracy of face gender and age estimation in a low-resolution scene is enhanced. According to the method, the low-resolution human face image is subjected to perception enhancement, and the face detail information is increased, so that the gender and age estimation accuracy under the low-resolution image is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of biometric identification, and in particular to a gender and age estimation method and terminal based on perception enhancement. Background Art

[0002] In modern society, with the popularization of smart terminals and the development of the Internet, face-based biometric recognition technology has been widely used. Gender and age, as the most obvious indicators of facial biometrics, are widely used in security monitoring, identity authentication, and prevention of minors from Internet addiction. With the continuous development of society, people are no longer satisfied with the acquisition of a single facial biometric feature, and multi-task-based methods have also developed accordingly.

[0003] As people age, their head structure, skin texture, facial patterns, skin laxity, and hairline all change to varying degrees, and these changes are also closely related to gender. The coordinated calculation of gender estimation and age estimation can effectively utilize the prior information of gender to improve the accuracy of age estimation. However, real-world images are often more difficult to obtain than laboratory conditions, so practical applications often face the problem of low-resolution images. If low-resolution images are directly used as standard input under experimental conditions, the performance of the model will decline. This is because the image information contained in low-resolution images is far less than that of high-resolution images, and the original features will be blurred while interpolating and scaling. In addition, in commonly used deep learning models, such as VGG, ResNet, and Transformer, the size of the feature map is reduced by the downsampling layer, which will further reduce the loss of image information. The superposition of these factors will cause the existing gender and age estimation models to be unable to correctly predict the gender and age of low-resolution face images. Therefore, how to design a gender and age estimation model that can effectively process low-resolution images and improve the utilization of image detail information has become an important challenge in the current technical field.

[0004] In summary, a gender and age estimation method and terminal based on perception enhancement are proposed. Summary of the invention

[0005] The purpose of the present invention is to provide a gender and age estimation method based on perception enhancement in view of the deficiencies in the prior art, which can well solve the above problems.

[0006] In order to achieve the above requirements, the technical solution adopted by the present invention is: to provide a gender and age estimation method based on perception enhancement and a terminal, the gender and age estimation method based on perception enhancement comprises the following steps: S1: Image data preprocessing: preprocessing the input low-resolution face image, enhancing the brightness of low-brightness images, reducing the brightness of high-brightness images, and normalizing the images; S2: Image feature perception enhancement, training the perception enhancement network, extracting high-resolution face images from the data, and cropping them into 224 224 and 64 64 resolution images and form image pairs. 64 resolution images are used as the input of the perception enhancement network, and the 224 The image with 224 resolution is input into the pre-trained feature extraction network to extract the image features of each layer. The perceptual enhancement network is optimized using MSE Loss and Perceptual Loss. The overall network structure adopts a structure similar to the reverse UNet and uses 64 64 as the image input standard, first use the trained perception enhancement network to upsample the low-resolution image and restore the image size to 224 224 resolution; S3: Extract backbone image features. Use the reconstructed feature extraction backbone network to extract features. Send the face image restored to the standard size into the convolutional neural network to extract backbone features. The backbone features are input into the gender estimation module and the age estimation module respectively. S4: Multi-level feature fusion, connecting the decoder and the encoder through skip connections. When extracting features through the encoder, the features of the original low-resolution image are integrated to compensate for the loss of feature details during upsampling and downsampling. S5: Perform gender and age estimation. Send the features extracted by the decoder to the gender estimation module and the age estimation module respectively. Fuse the features extracted by the gender estimation module and the features extracted by the age estimation module through the MLP network to obtain gender prior information. Then send the fused features to the age estimation head. For the two tasks of gender estimation and age estimation, use BCE Loss and Soft Ordinal Label Loss as loss functions for optimization respectively. For the predicted age output by the age estimation head, use age feature matching to optimize it. Finally, output the estimated values ​​of gender and age respectively.

[0007] Preferably, the following operations are performed when performing the image preprocessing step S1: For images with low brightness, a brightness enhancement algorithm is used to enhance the illumination; for images with high brightness, a brightness reduction algorithm is used to ensure that the image is in a normal exposure state; for the extracted face image, the long side of the image is adjusted to 256 pixels while keeping the aspect ratio unchanged, and the remaining pixels of the image are filled with zeros.

[0008] Preferably, when performing the image feature perception enhancement in step S2, the perception enhancement network is first trained, the pre-processed high-resolution image data is extracted, and the image is cropped into 224 224 and 64 64 resolution size, and form an image pair, input the low-resolution image into the perception enhancement network for upsampling, and increase the image resolution to 224 224, the high-resolution image is input into the pre-trained feature extraction network, and the MSE Loss is used to optimize the perceptual enhancement network to reduce the difference between the upsampled image and the original high-resolution image, and assist the Perceptual Loss to restore the similarity between each layer of low-resolution image and the high-resolution image in the high-level feature space, so as to achieve the restoration of more details, as follows: , in represents the perceptual loss function, Represents the network layer, Represents the weights of features at different levels, represents the Euclidean distance, Set to 2, and denote the feature extraction network and the perception enhancement network. layer, and Represent the input high-resolution and low-resolution images respectively, and the loss function of the perceptual enhancement network is: ,in The total loss function of the generation perception enhancement network, is MSE Loss, It is Perceptual Loss. and is the weight value of the loss function; The overall network structure adopts the anti-UNet structure design. The original UNet structure adopts the method of downsampling first and then upsampling. The present invention adopts the network structure of upsampling first and then downsampling to solve the problem of insufficient detail features of low-resolution images.

[0009] Preferably, when performing step S3 of image feature extraction, the following steps are included: The standard-sized image is input into the backbone feature extraction network encoder, and the feature maps of different levels are extracted through the convolutional neural network. VGGNet is used as the feature extraction network. Effective Channel Attention is used to increase the information interaction between different channels and improve the expression of backbone features.

[0010] Preferably, when performing multi-level feature fusion in step S4, the decoder and the encoder are connected through a jump connection to perform feature fusion, and the extracted backbone features are successively sent to the gender estimation module and the age estimation module.

[0011] Preferably, step S5 is divided into two parts: gender estimation module and age estimation module: In the gender estimation module, BCE Loss is used to optimize the gender estimation module. The formula is: , in, represents BCE Loss, represents the number of samples, Representation sample The real gender label, Representation sample The predicted probability of In the age estimation module, the gender feature and the age feature extracted by the age estimation module are first fused using the MLP network to provide gender prior information for age estimation, and the age value is output through age feature matching. The age feature matching process is as follows: The age estimation module is optimized through Soft Ordinal Label Loss, and the age label is softened: ,in Indicates the softened age label. express ordered categories, function represents L1 distance; The loss function is defined as: ,in represents the loss function, Represents the total number of samples, It is predicted to be Probability of age; Construct an age matching feature library. For each gender and age, use 5 different facial images to extract age features. Through unsupervised training iterations, find the age feature clusters for each age group and store them in the age matching feature library. When outputting an age feature, select the face age feature with a close age difference of r from the age feature matching library, set r=3, and the gender is the estimated gender. Calculate the distance between the predicted image and the two age features. If it is closer to a certain age, take the middle value between the two as the predicted age. If it is a fraction, round it up. In the second round, select the face age feature with the same predicted gender and age difference of The age features are calculated and the distance between them is iterated until the distance between the two is less than the threshold, and the predicted age value is finally output; ,in represents the age feature matching algorithm, represents the initial predicted age value, Indicates that each round, represents the age feature distance calculation function, Represents the age feature distance threshold. When the distance is less than the threshold, the output age value is the final predicted age value.

[0012] Preferably, the loss function in step S3 is defined as follows: ,in is the total loss function, and For two loss functions and The weight value of .

[0013] A gender and age estimation system based on perception enhancement is provided, comprising a processor, an input device, an output device and a memory, wherein the processor, the input device, the output device and the memory are interconnected, the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the above-mentioned gender and age estimation method based on perception enhancement.

[0014] The advantages of this gender and age estimation method based on perception enhancement are as follows: The invention is a feature extraction network designed specifically for low-resolution facial images. It uses a perceptual enhancement network for low-resolution images to increase image resolution while maintaining image detail features. It also uses a structure similar to the inverse UNet, and uses an identity mapping to connect the perceptual enhancement network (decoder) and the feature extraction network (encoder) to enhance real features at different levels, thereby improving the extraction of effective gender and age features of human facial images, and by adding gender prior information, gender features and age features are fused to improve the accuracy of age estimation. The invention proposes an age matching algorithm to further enhance the accuracy of age estimation. At the same time, the invention provides a gender and age estimation terminal for low-resolution images based on deep learning perceptual enhancement, which is based on the same concept as the above method, has the same beneficial effects, and is a hardware application of the above system. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The same reference numerals are used in these drawings to represent the same or similar parts. The exemplary embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 This is a flowchart of a method for estimating gender and age based on perception enhancement provided by the first embodiment of the present invention.

[0016] Figure 2 It is a schematic diagram of a method for estimating gender and age in a low-resolution image based on deep learning perception enhancement provided by an embodiment of the present invention.

[0017] Figure 3 It is a structural block diagram of an intelligent terminal for estimating gender and age in low-resolution images based on deep learning perception enhancement provided by an embodiment of the present invention.

[0018] Among them: 210, input low-resolution RGB image; 220, convolution layer 1; 230, convolution layer 2; 240, convolution layer 3 including upsampling; 250, convolution layer 4 including upsampling; 260, convolution layer 5 including downsampling; 270, convolution layer 6 including downsampling; 280, skip connection; 290, convolution layer 7; 211, convolution layer 8; 212, gender estimation module; 213, gender classification head; 214, age estimation module; 215, MLP feature fusion layer; 216, age estimation head. DETAILED DESCRIPTION

[0019] In order to make the objectives, technical solutions and advantages of the present application more clear, the present application is further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0020] In the following description, references to "one embodiment", "an embodiment", "an example", "an example", etc. indicate that the embodiment or example described in this way may include specific features, structures, characteristics, properties, elements or limitations, but not every embodiment or example necessarily includes the specific features, structures, characteristics, properties, elements or limitations. In addition, repeated use of the phrase "according to one embodiment of the present application" may refer to the same embodiment, but does not necessarily refer to the same embodiment.

[0021] For the sake of simplicity, certain technical features well known to those skilled in the art are omitted in the following description.

[0022] According to an embodiment of the present application, a method for estimating gender and age in a low-resolution image based on deep learning perception enhancement is provided, comprising the following steps: S1: Image data preprocessing: preprocessing the input low-resolution face image, enhancing the brightness of low-brightness images, reducing the brightness of high-brightness images, and normalizing the images; S2: Image feature perception enhancement, training the perception enhancement network, extracting high-resolution face images from the data, and cropping them into 224 224 and 64 64 resolution images and form image pairs. 64 resolution images are used as the input of the perception enhancement network, and the 224 The 224-resolution image is input into the pre-trained feature extraction network to extract the image features of each layer, and the perceptual enhancement network is optimized using MSE Loss and Perceptual Loss. The overall network structure adopts a structure similar to the reverse UNet, using 64 64 as the image input standard, first use the trained perception enhancement network (decoder) to upsample the low-resolution image and restore the image size to 224 224 resolution; S3: Backbone image feature extraction: Use the reconstructed feature extraction backbone network (encoder) to extract features, send the face image restored to the standard size into the convolutional neural network to extract the backbone features, and input the backbone features into the gender estimation module and age estimation module respectively; S4: Multi-level feature fusion, connecting the decoder and the encoder through skip connections. When extracting features through the encoder, the features of the original low-resolution image are integrated to compensate for the loss of feature details during upsampling and downsampling. S5: Perform gender and age estimation. Send the features extracted by the decoder to the gender estimation module and the age estimation module respectively. The features extracted by the gender estimation module and the features extracted by the age estimation module are fused through the MLP network to obtain gender prior information. The fused features are then sent to the age estimation head. For the two tasks of gender estimation and age estimation, BCE Loss and Soft Ordinal Label Loss are used as loss functions for optimization. For the predicted age output by the age estimation head, the age feature matching method is used for optimization, and finally the estimated values ​​of gender and age are output respectively.

[0023] According to an embodiment of the present application, in the S1 of the method for estimating gender and age in low-resolution images based on deep learning perception enhancement, the image preprocessing module further includes a light detection unit for using a brightness enhancement algorithm to perform light enhancement processing on images with lower brightness, and using a brightness reduction algorithm for high-brightness images, so that the image is in a normal exposure state. For the extracted face image, while keeping the aspect ratio unchanged, the long side of the image is adjusted to 256 pixels, and the remaining pixels of the image are filled with zeros.

[0024] According to one embodiment of the present application, in the method for estimating gender and age in a low-resolution image based on deep learning perception enhancement, when the image feature perception is enhanced, the training of the low-resolution face image neural network includes the following steps: First, the perception enhancement network is trained to extract the preprocessed high-resolution image data and crop the images into 224 224 and 64 64 resolution size, and form an image pair, input the low-resolution image into the enhanced perception network for upsampling, and increase the image resolution to 224 224, the high-resolution image is input into the pre-trained feature extraction network, and the MSE Loss is used to optimize the perceptual enhancement network to reduce the difference between the upsampled image and the original high-resolution image, and assist the Perceptual Loss to restore the similarity between each layer of low-resolution image and the high-resolution image in the high-level feature space, so as to achieve the restoration of more details. The details are as follows: ,in represents the perceptual loss function, Represents the network layer, Represents the weights of features at different levels, represents the Euclidean distance, Set to 2, and denote the feature extraction network and the perception enhancement network. layer, and Represent the input high-resolution and low-resolution images respectively.

[0025] The loss function of the perception enhancement network is: ,in The total loss function of the generation perception enhancement network, is MSE Loss, It is Perceptual Loss. and is the weight value of the loss function.

[0026] The overall network structure adopts the anti-UNet structure design. The original UNet structure adopts the method of downsampling first (encoder) and then upsampling (decoder). The present invention adopts a network structure of upsampling first and then downsampling to solve the problem of insufficient detail features of low-resolution images.

[0027] According to an embodiment of the present application, in S3 of the method for estimating gender and age in low-resolution images based on deep learning perception enhancement, when extracting image features, training the face image includes the following steps: inputting the image of standard size into the backbone feature extraction network (encoder), and extracting feature maps of different levels through the convolutional neural network. VGGNet is used as the feature extraction network, and through the Effective Channel Attention, the information interaction between different channels is increased to improve the expression of the backbone features.

[0028] According to one embodiment of the present application, in S4 described in the method for gender and age estimation in low-resolution images based on deep learning perceptual enhancement, when multi-level features are fused, in order to enhance the detail information of the features and reduce the loss of feature information during decoding and encoding, the decoder and the encoder are connected through jump connections for feature fusion, and finally the extracted backbone features are sent to the gender estimation module and the age estimation module successively.

[0029] According to one embodiment of the present application, the method for estimating gender and age in a low-resolution image based on deep learning perception enhancement in S5 is divided into two parts: gender and age estimation modules: In the gender estimation module, BCE Loss is used to optimize the gender estimation module. The formula is: ,in, represents BCE Loss, represents the number of samples, Representation sample The real gender label, Representation sample The predicted probability of .

[0030] In the age estimation module, the gender features and the age features extracted by the age estimation module are first fused using the MLP network to provide gender prior information for age estimation, and the age value is output through age feature matching.

[0031] According to an embodiment of the present application, in S5 of the method for estimating gender and age in a low-resolution image based on deep learning perception enhancement, the method of pairing age features is specifically divided into two parts: Soften the age label: ,in Indicates the softened age label. Represents N ordered categories, function represents L1 distance; The loss function is defined as: ,in represents the loss function, Represents the total number of samples, It is predicted to be Probability of age.

[0032] An age matching feature library is constructed. For each gender and age, 5 different facial images are used to extract age features. The age feature clusters of each age group are found through unsupervised training iterations and stored in the age matching feature library.

[0033] When outputting an age feature, we select the face age features with the adjacent age difference of r, set r=3, and gender as the estimated gender from the age feature matching library, and calculate the distance between the predicted image and the two age features. If it is closer to a certain age, the middle value between the two is taken as the predicted age. If it is a fraction, it is rounded up. In the second round, we select age features with the same predicted gender and age difference of 3 from the age feature matching library, and calculate the distance between them. Iterate until the distance between the two is less than the threshold, and finally output the age prediction value; ,in represents the age feature matching algorithm, represents the initial predicted age value, Indicates that each round, represents the age feature distance calculation function, Represents the age feature distance threshold. When the distance is less than the threshold, the output age value is the final predicted age value.

[0034] According to one embodiment of the present application, in S3 of the method for estimating gender and age in low-resolution images based on deep learning perception enhancement, the loss functions of the feature extraction network, the gender estimation module and the age estimation module are defined as follows: ,in is the total loss function, and For two loss functions and The weight value of .

[0035] According to one embodiment of the present application, the gender and age estimation terminal in a low-resolution image based on deep learning perception enhancement includes: a processor, an input device, an output device and a memory, the processor, input device, output device and memory are interconnected, the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute a method as described in any one of the above embodiments.

[0036] According to one embodiment of the present application, a gender and age estimation system based on deep learning perception enhancement in low-resolution images is provided, including an image preprocessing module, a perception enhancement module, a backbone feature extraction module, a multi-layer feature fusion module, and a gender and age estimation module. The image preprocessing module obtains the required predicted human individual image through a terminal, obtains the face image through a target detection algorithm, performs exposure detection on the face image, reduces the brightness of the image with too high brightness through a brightness reduction algorithm, increases the brightness of the image with too low brightness through a brightness enhancement algorithm, and adjusts the resolution of the image with a smaller resolution to 256 through an interpolation algorithm. 256, and the image is normalized. Among them, for high-resolution images, a low-resolution image paired with the image is obtained by a resolution reduction algorithm for training a perception enhancement network. The perception enhancement network is trained using high- and low-resolution paired images, and high- and low-resolution paired data is no longer needed in the inference stage. The low-resolution image is input into the perception enhancement network to obtain a high-resolution image with more details, and then the facial features are obtained through the backbone feature extraction network. After the perception enhancement network and feature extraction network designed for low-resolution images by the present invention, the identity mapping of the perception enhancement network and the feature extraction network director can effectively improve the acquisition of facial gender and age details; the backbone features are successively input into the gender estimation module and the age estimation module, and then the gender and age features are further fused through the MLP layer, the prior information of gender is added to improve the expression of age information, and finally the gender and age information are output through the gender classification head and the age estimation head. The output age features are passed through the age feature matching algorithm, and finally iteratively obtain the optimal solution, and the final gender and age estimation values ​​are output.

[0037] According to one embodiment of the present application, the software system is Linux CentOS7, and the software environment used is PyTorch1.18. The collection and use of personal information, privacy information and other data in the present invention comply with the relevant provisions of national laws and regulations.

[0038] In this embodiment, the flowchart of the gender and age estimation system based on deep learning perception enhancement in low-resolution images is as follows: Figure 1 As shown, according to the flowchart, the following steps are included: S1: Image data preprocessing: preprocessing the input low-resolution face image, enhancing the brightness of low-brightness images, reducing the brightness of high-brightness images, and normalizing the images; S2: Image feature perceptual enhancement; Schematic diagram of a gender and age estimation method based on perceptual enhancement, as shown in Figure 2 As shown, the numbers correspond as follows: 210 represents the input RGB image, 220 represents convolution layer 1, 230 represents convolution layer 2, 204 represents convolution layer 3 including upsampling, 250 represents convolution layer 4 including upsampling, 260 represents convolution layer 5 including downsampling, 270 represents convolution layer 6 including downsampling, 280 represents skip connection, 290 represents convolution layer 7, 211 represents convolution layer 8, 212 represents gender estimation module, 213 represents gender classification head, 214 represents age estimation module, 215 represents MLP feature fusion layer, and 216 represents age estimation head. First, the perception enhancement network is trained to extract high-resolution face images from the data and crop them into 224. 224 and 64 64 resolution images and form image pairs. 64 resolution images are used as the input of the perception enhancement network, and the 224 The 224-resolution image is input into the pre-trained feature extraction network to extract the image features of each layer, and the perceptual enhancement network is optimized using MSE Loss and Perceptual Loss. The overall network structure adopts a structure similar to the reverse UNet, using 64 64 as the image input standard, first use the trained perception enhancement network (decoder) to upsample the low-resolution image and restore the image size to 224 224 resolution; S3: Backbone image feature extraction: Use the reconstructed feature extraction backbone network (encoder) to extract features, send the face image restored to the standard size into the convolutional neural network to extract the backbone features, and input the backbone features into the gender estimation module and age estimation module respectively; S4: Multi-level feature fusion, connecting the decoder and the encoder through skip connections. When extracting features through the encoder, the features of the original low-resolution image are integrated to compensate for the loss of feature details during upsampling and downsampling. S5: Perform gender and age estimation. Send the features extracted by the decoder to the gender estimation module and the age estimation module respectively. The features extracted by the gender estimation module and the features extracted by the age estimation module are fused through the MLP network to obtain gender prior information. The fused features are then sent to the age estimation head. For the two tasks of gender estimation and age estimation, BCE Loss and Soft Ordinal Label Loss are used as loss functions for optimization. For the predicted age output by the age estimation head, the age feature matching method is used for optimization, and finally the estimated values ​​of gender and age are output respectively.

[0039] The above-mentioned embodiment provides a method of gender and age estimation in low-resolution images based on deep learning perception enhancement, which meets the problem of inaccurate age estimation in low-resolution facial images in real environments and solves the problem of the need for multi-attribute features of faces in actual scenarios.

[0040] According to one embodiment of the present application, Figure 3 As shown, a structural block diagram of an intelligent terminal provided by another embodiment of the present invention is shown, the terminal includes a processor, an input device, an output device and a memory, the processor, the input device, the output device and the memory are interconnected, the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method described in the above embodiment.

[0041] It should be understood that in the embodiments of the present invention, the processor referred to may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0042] The input device may include a surveillance camera, a mobile phone, a camera, a video recorder, etc., and the output device may include a display, a speaker, etc. The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. According to an embodiment of the present application, the method for estimating gender and age based on perception enhancement The above-mentioned embodiments only represent several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person skilled in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the claims.

Claims

1. A gender and age estimation method based on perception enhancement, characterized in that: The steps include: S1: Image data preprocessing: preprocessing the input low-resolution face image, enhancing the brightness of low-brightness images, reducing the brightness of high-brightness images, and normalizing the images; S2: Image feature perception enhancement, training the perception enhancement network, extracting high-resolution face images from the data, and cropping them into 224 224 and 64 64 resolution images and form image pairs. 64 resolution images are used as the input of the perception enhancement network, and the 224 The image with 224 resolution is input into the pre-trained feature extraction network to extract the image features of each layer. The MSE Loss and Perceptual Loss are used to optimize the perception enhancement network. The overall network structure adopts the reverse UNet structure and uses 64 64 as the image input standard, first use the trained perception enhancement network to upsample the low-resolution image and restore the image size to 224 224 resolution; S3: Extract backbone image features. Use the reconstructed feature extraction backbone network to extract features. Send the face image restored to the standard size into the convolutional neural network to extract backbone features. The backbone features are input into the gender estimation module and the age estimation module respectively. S4: Multi-level feature fusion, connecting the decoder and the encoder through skip connections. When extracting features through the encoder, the features of the original low-resolution image are integrated to compensate for the loss of feature details during upsampling and downsampling. S5: Perform gender and age estimation. Send the features extracted by the decoder to the gender estimation module and the age estimation module respectively. Fuse the features extracted by the gender estimation module and the features extracted by the age estimation module through the MLP network to obtain gender prior information. Then send the fused features to the age estimation head. For the two tasks of gender estimation and age estimation, use BCE Loss and Soft Ordinal Label Loss as loss functions for optimization respectively. For the predicted age output by the age estimation head, use age feature matching to optimize it. Finally, output the estimated values ​​of gender and age respectively.

2. The method for estimating gender and age based on perception enhancement according to claim 1, characterized in that: When performing the image preprocessing step S1, perform the following operations: For images with low brightness, a brightness enhancement algorithm is used to enhance the illumination; for images with high brightness, a brightness reduction algorithm is used to ensure that the image is in a normal exposure state; for the extracted face image, the long side of the image is adjusted to 256 pixels while keeping the aspect ratio unchanged, and the remaining pixels of the image are filled with zeros.

3. The method for estimating gender and age based on perception enhancement according to claim 1, characterized in that: When performing the image feature perception enhancement in step S2, the perception enhancement network is first trained, the preprocessed high-resolution image data is extracted, and the image is cropped into 224 224 and 64 64 resolution size, and form an image pair, input the low-resolution image into the perception enhancement network for upsampling, and increase the image resolution to 224 224, the high-resolution image is input into the pre-trained feature extraction network, and the MSE Loss is used to optimize the perceptual enhancement network to reduce the difference between the upsampled image and the original high-resolution image, and assist the Perceptual Loss to restore the similarity between each layer of low-resolution image and the high-resolution image in the high-level feature space, so as to achieve the restoration of more details, as follows: ,in represents the perceptual loss function, Represents the network layer, Represents the weights of features at different levels, represents the Euclidean distance, Set to 2, and denote the feature extraction network and the perception enhancement network. layer, and Represent the input high-resolution and low-resolution images respectively, The loss function of the perception enhancement network is: ,in The total loss function of the generation perception enhancement network, is MSE Loss, It is Perceptual Loss. and is the weight value of the loss function; The overall network structure adopts the anti-UNet structure design. The original UNet structure adopts the method of downsampling first and then upsampling. The present invention adopts the network structure of upsampling first and then downsampling to solve the problem of insufficient detail features of low-resolution images.

4. The method for estimating gender and age based on perception enhancement according to claim 1, characterized in that: When performing step S3 image feature extraction, the following steps are included: The standard-sized image is input into the backbone feature extraction network encoder, and the feature maps of different levels are extracted through the convolutional neural network. VGGNet is used as the feature extraction network. Effective Channel Attention is used to increase the information interaction between different channels and improve the expression of backbone features.

5. The method for estimating gender and age based on perception enhancement according to claim 1, characterized in that: When performing multi-level feature fusion in step S4, the decoder and the encoder are connected through jump connection to perform feature fusion, and the extracted backbone features are successively sent to the gender estimation module and the age estimation module.

6. The method for estimating gender and age based on perception enhancement according to claim 1, characterized in that: The step S5 is divided into two parts: gender estimation module and age estimation module: In the gender estimation module, BCE Loss is used to optimize the gender estimation module. The formula is: ,in, represents BCE Loss, represents the number of samples, Representation sample The real gender label, Representation sample The predicted probability of In the age estimation module, the gender feature and the age feature extracted by the age estimation module are first fused using the MLP network to provide gender prior information for age estimation, and the age value is output through age feature matching. The age feature matching process is as follows: The age estimation module is optimized through Soft Ordinal Label Loss, and the age label is softened: ,in Indicates the softened age label. express ordered categories, function represents the L1 distance; the loss function is defined as: ,in represents the loss function, Represents the total number of samples, It is predicted to be Probability of age; Construct an age matching feature library. For each gender and age, use 5 different facial images to extract age features. Through unsupervised training iterations, find the age feature clusters for each age group and store them in the age matching feature library. When outputting an age feature, select the face age feature with the adjacent age difference of r, set r=3, and gender as the estimated gender from the age feature matching library, calculate the distance between the predicted image and the two age features, if it is closer to a certain age, take the middle value between the two as the predicted age, if it is a fraction, round up; in the second round, select the age feature with the same predicted gender and age difference of k from the age feature matching library, and calculate the distance between them, iterate until the distance between the two is less than the threshold, and finally output the age prediction value; ,in represents the age feature matching algorithm, represents the initial predicted age value, Indicates that each round, represents the age feature distance calculation function, Represents the age feature distance threshold. When the distance is less than the threshold, the output age value is the final predicted age value.

7. The method for estimating gender and age based on perception enhancement according to claim 1, characterized in that: The loss function in step S3 is defined as follows: ,in is the total loss function, and For the two loss functions and The weight value of .

8. A gender and age estimation system based on perception enhancement, comprising a processor, an input device, an output device and a memory, wherein the processor, the input device, the output device and the memory are interconnected, the memory is used to store a computer program, and the computer program includes program instructions, characterized in that: The processor is configured to call the program instructions to execute the gender and age estimation method based on perception enhancement as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Age and gender evaluation based on small-scale convolutional neural network for embedded system

    CN107909026A

  • Age estimation model training and estimation method and device, equipment and storage medium

    CN114694215A

  • Image enhancement method and device, equipment, storage medium and program product

    CN117115023A

  • Age and gender estimation using small-scale convolutional neural network (CNN) modules for embedded systems

    US20180150684A1