Perception-Enhanced Gender and Age Estimation Method and Terminal

Through perceptual enhancement network and feature fusion technology, the problem of gender and age estimation in low-resolution images is solved, the accuracy of estimation and detailed feature extraction are improved, and effective gender and age recognition under low-resolution conditions are achieved.

CN119693990BActive Publication Date: 2025-07-04SICHUAN COMPUTER RES INST
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing gender and age estimation models have deteriorated performance under low-resolution image conditions, and cannot effectively process low-resolution images and improve the utilization of image details, resulting in inaccurate estimation.

Method used

Low-resolution images are preprocessed and feature extraction using perceptual enhancement network, upsampling and feature fusion through anti-UNet-like structural design, gender and age estimation are performed in combination with gender prior information, and optimized using BCE Loss and Soft Ordinal Label Loss.

Benefits of technology

The accuracy of gender and age estimation under low-resolution images is improved, the extraction and utilization of image detail features is enhanced, and the accuracy of low-resolution image estimation is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693990B_ABST
    Figure CN119693990B_ABST
Patent Text Reader

Abstract

The present invention provides a method and a terminal for gender and age estimation based on perception enhancement. The method includes the following steps: S1: Preprocessing of image data; S2: Perception enhancement of image features; S3: Extraction of backbone image features; S4: Multi-level feature fusion; S5: Performing gender and age estimation. The present invention is a feature extraction network designed specifically for low-resolution face images. By means of perception enhancement, the image feature size is increased and the image detail information is increased, thereby enhancing the accuracy of face gender and age estimation in low-resolution scenarios. The present invention performs perception enhancement on low-resolution human face images to increase the facial detail information, so as to improve the accuracy of gender and age estimation under low-resolution images.
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 recognition, and particularly to a method and a terminal for gender and age estimation based on perception enhancement. Background Art

[0002] In modern society, with the popularization of intelligent terminals and the development of the Internet, face-based biometric recognition technology has been widely applied. Gender and age, as the most obvious indicators of face biometrics, are widely used in fields such as security monitoring, identity authentication, and prevention of underage Internet addiction. With the continuous development of society, there is a growing dissatisfaction with the acquisition of single face biometrics, and multi-task methods have thus developed.

[0003] As people age, the head structure, skin texture, facial markings, skin laxity, hairline, etc. all change to varying degrees, and these changes are also closely related to gender. By jointly calculating gender estimation and age estimation, the prior information of gender can be effectively utilized to improve the accuracy of age estimation. However, images in the real world are often more difficult to obtain than in laboratory conditions, so in practical applications, the problem of low-resolution images is often faced. If low-resolution images are directly used as the standard input under experimental conditions, it will cause a decline in the performance of the model. This is because low-resolution images themselves contain much less image information than high-resolution images, and the original features will be blurred during interpolation scaling. Moreover, in common deep learning models such as VGG, ResNet, and Transformer, the reduction of the feature map size through the downsampling layer will further reduce the loss of image information. The superposition of these factors will cause 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 method and a terminal for gender and age estimation based on perception enhancement are proposed. Summary of the Invention

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

[0006] To meet the above requirements, the technical solution adopted by the present invention is: to provide a method and a terminal for gender and age estimation based on perception enhancement, and this method for gender and age estimation based on perception enhancement includes the following steps:

[0007] S1: Image data preprocessing. Preprocess the input human image to obtain a face image, adjust the resolution of the face image to 256*256, enhance the brightness of images with low brightness, reduce the brightness of images with high brightness, and normalize the images.

[0008] S2: Image feature perception enhancement. Train the perception enhancement network. Crop the preprocessed image into images with resolutions of 224×224 and 64×64 respectively to form image pairs. Use the 64×64 resolution image as the input of the perception enhancement network, and input the 224×224 resolution image into the pre-trained feature extraction network to extract the image features of each layer. Use MSE Loss and Perceptual Loss to optimize the perception enhancement network. The overall network structure adopts a structure similar to the inverse UNet. Use 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.

[0009] S3: Trunk image feature extraction. Use the reconstructed feature extraction trunk network to extract features. Send the face image restored to the standard size into the convolutional neural network to extract the trunk features, and input the trunk features into the gender estimation module and the age estimation module respectively.

[0010] S4: Multi-level feature fusion. Connect the decoder and the encoder through skip connections. When the encoder extracts features, fuse the features of the original low-resolution image to make up for the loss of feature details during upsampling and downsampling.

[0011] S5: Perform gender and age estimation. Send the features extracted by the decoder into the gender estimation module and the age estimation module respectively. Fuse the features extracted by the gender estimation module and the age estimation module through the MLP network to obtain gender prior information. Then send the fused features into 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 the method of age feature matching for optimization, and finally output the estimated values of gender and age respectively.

[0012] Preferably, when performing step S1 of image preprocessing, the following operations are carried out:

[0013] For images with low brightness, use the brightness enhancement algorithm to perform light enhancement processing; for images with high brightness, use the brightness reduction algorithm to make the images in a normal exposure state; for the extracted face images, while keeping the aspect ratio unchanged, adjust the long side of the image to 256 pixels, and use zero padding for the remaining pixels of the image.

[0014] Preferably, when performing step S2 for image feature perception enhancement, first train the perception enhancement network, extract the preprocessed image data, crop the images into 224×224 and 64×64 resolution sizes respectively, and form image pairs. Input the 64×64 resolution image into the perception enhancement network for upsampling to increase the image resolution to 224×224. Input the 224×224 resolution image into the pre-trained feature extraction network. Use MSE Loss to optimize the perception enhancement network, reduce the difference between the upsampled image and the high-resolution image, and assist Perceptual Loss to restore the similarity between each layer of low-resolution image and high-resolution image in the high-level feature space to achieve more detailed restoration, as follows:

[0015]

[0016] where L p represents the perceptual loss function, l represents the l-th layer of the network, a l represents the weight of different-level features, ||·|| p represents the Euclidean distance, p is set to 2, and f l respectively represent the l-th layer of the feature extraction network and the perception enhancement network, I hr and I lr respectively represent the input high-resolution and low-resolution images,

[0017] The loss function of the perception enhancement network is: L g = a1L mse + a2L p , where L g represents the total loss function of the perception enhancement network, L mse is MSE Loss, L p is Perceptual Loss, and a1 and a2 are the weight values of the loss function;

[0018] The overall network structure adopts the structure design of inverse UNet. The original UNet structure adopts the way of first downsampling and then upsampling. The present invention adopts the network structure of first upsampling and then downsampling to solve the problem of insufficient detailed features of low-resolution images.

[0019] Preferably, when performing step S3 for image feature extraction, it includes the following steps:

[0020] Input an image of standard size into the encoder of the backbone feature extraction network, extract feature maps of different levels through a convolutional neural network, use VGGNet as the feature extraction network, and increase the information interaction between different channels through Effective Channel Attention to improve the expression of backbone features.

[0021] Preferably, when performing multi-level feature fusion in step S4, connect the decoder and the encoder through skip connections for feature fusion, and send the extracted backbone features to the gender estimation module and the age estimation module successively.

[0022] Preferably, step S5 is divided into two parts: the gender and age estimation modules:

[0023] Optimize the gender estimation module using BCE Loss in the gender estimation module. The formula is:

[0024]

[0025] Among them, L bce represents BCE Loss, T represents the number of samples, y i represents the true gender label of sample i, and p i represents the predicted probability of sample i;

[0026] In the age estimation module, first fuse the gender feature and the age feature extracted by the age estimation module using the MLP network to provide gender prior information for age estimation, and output the age value through age feature matching. The age feature matching process is as follows:

[0027] Optimize the age estimation module using Soft Ordinal Label Loss to soften the age label: Among them, y i represents the softened age label, Y = {r1r2r3…r N} represents N ordered categories, and the function represents the L1 distance; the loss function is defined as: Among them, L sc represents the loss function, T represents the total number of samples, and p i represents the probability of predicting age i;

[0028] Construct an age matching feature library. For each gender and age, extract age features using 5 different facial images, and find the age feature clusters for each age group through unsupervised training iteration, and store them in the age matching feature library;

[0029] When outputting an age feature, select a face age feature from the age feature matching library with an adjacent age difference of r, set r = 3, and the gender is the estimated gender. Calculate the distances between the predicted image and the two age features. If it is closer to a certain age, take the median value between the two as the predicted age. If a fraction is encountered, round up. In the second round, select age features with the same predicted gender and an age difference of k from the age feature matching library, and calculate the distances between them. Iterate until the distance is less than the threshold, and finally output the age prediction value.

[0030]

[0031] Where g represents the age feature matching algorithm, y i represents the initially predicted age value, round represents each round, θ represents the age feature distance calculation function, k represents the age feature distance threshold. When the iteration reaches a distance less than the threshold, the output age value at this time is the final predicted age value.

[0032] Preferably, the loss function in step S3 is defined as follows: L total = b1L bce + b2L sc , where L total is the total loss function, and b1 and b2 are the weight values of the two loss functions L bce and L sc .

[0033] Provide a gender and age estimation system based on perception enhancement, including 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 computer programs, and the computer programs include program instructions. The processor is configured to call the program instructions to execute the above-mentioned gender and age estimation method based on perception enhancement.

[0034] The advantages of the gender and age estimation method based on perception enhancement are as follows:

[0035] The invention is a feature extraction network designed specifically for low-resolution face images. For low-resolution images, a perception enhancement network is adopted to increase the image resolution while maintaining the image detail features. And a structure similar to the inverse UNet is used, with an identity mapping connecting the perception enhancement network (decoder) and the feature extraction network (encoder) to enhance the real features at different levels, so as to improve the extraction of effective gender and age features of human face images. And by adding gender prior information, the 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 under low-resolution images based on deep learning perception enhancement. It has the same concept as the above method and the same beneficial effects, and is the hardware application of the above system. Brief Description of the Drawings

[0036] The drawings described herein are used to provide a further understanding of the present application and form a part of the present application. The same reference numerals are used to represent the same or similar parts in these drawings. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:

[0037] Figure 1 It is a flowchart of a gender and age estimation method based on perception enhancement provided by the first embodiment of the present invention.

[0038] Figure 2 It is a schematic diagram of a gender and age estimation method under low-resolution images based on deep learning perception enhancement provided by an embodiment of the present invention.

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

[0040] Wherein: 210, the input low-resolution RGB image; 220, convolutional layer 1; 230, convolutional layer 2; 240, convolutional layer 3 including upsampling; 250, convolutional layer 4 including upsampling; 260, convolutional layer 5 including downsampling; 270, convolutional layer 6 including downsampling; 280, skip connection; 290, convolutional layer 7; 211, convolutional 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 of the Embodiments

[0041] To make the purpose, technical solutions and advantages of the present application clearer, the following further describes the present application in detail with reference to the drawings and specific embodiments.

[0042] In the following description, references to "one embodiment", "an embodiment", "one example", "an example", etc. indicate that the embodiment or example so described may include a particular feature, structure, characteristic, property, element, or limitation, but not every embodiment or example necessarily includes the particular feature, structure, characteristic, property, element, or limitation. Additionally, repeated use of the phrase "in one embodiment according to the present application" does not necessarily refer to the same embodiment, although it may.

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

[0044] According to one embodiment of the present application, a method for gender and age estimation under low-resolution images based on deep learning perception enhancement is provided, including the following steps:

[0045] S1: Image data preprocessing. Preprocess the input person image to obtain a face image, adjust the resolution of the face image to 256*256, enhance the brightness of images with low brightness, reduce the brightness of images with high brightness, and normalize the images.

[0046] S2: Image feature perception enhancement. Train the perception enhancement network. Crop the preprocessed image into images with resolutions of 224×224 and 64×64 respectively to form an image pair. Use the 64×64 resolution image as the input of the perception enhancement network, input the 224×224 resolution image into the pre-trained feature extraction network, extract the image features of each layer, optimize the perception enhancement network using MSE Loss and Perceptual Loss. The overall network structure adopts a structure similar to an inverse UNet, using 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.

[0047] S3: Trunk image feature extraction. Use the reconstructed feature extraction trunk network (encoder) to extract features. Send the face image restored to the standard size into the convolutional neural network to extract the trunk features, and input the trunk features into the gender estimation module and the age estimation module respectively.

[0048] S4: Multi-level feature fusion. Connect the decoder and the encoder through skip connections. When extracting features through the encoder, fuse the features of the original low-resolution image to make up for the loss of feature details during upsampling and downsampling.

[0049] S5: Perform gender and age estimation. Send the features extracted by the decoder into the gender estimation module and the age estimation module respectively. Fuse the features extracted by the gender estimation module and the age estimation module through an MLP network to obtain gender prior information. Then send the fused features into 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, optimize it by means of age feature matching, and finally output the estimated values of gender and age respectively.

[0050] According to an embodiment of the present application, in the S1 of the gender and age estimation method under low-resolution images based on deep learning perception enhancement, the image preprocessing module further includes a light detection unit, which is used to perform light enhancement processing on images with low brightness using a brightness enhancement algorithm, and use a brightness reduction algorithm for high-brightness images to make the images in a normal exposure state. For the extracted face images, while keeping the aspect ratio unchanged, adjust the long side of the image to 256 pixels, and use zero padding for the remaining pixels of the image.

[0051] According to an embodiment of the present application, in the S2 of the gender and age estimation method under low-resolution images based on deep learning perception enhancement, when performing image feature perception enhancement, the training of the low-resolution face image neural network includes the following steps:

[0052] First, train the perception enhancement network. Crop the preprocessed face images into 224×224 and 64×64 resolution sizes respectively, and form image pairs. Input the 64×64 resolution image into the enhanced perception network for upsampling to increase the image resolution to 224×224. Input the 224×224 resolution image into the pre-trained feature extraction network. Use MSE Loss to optimize the perception enhancement network to reduce the difference between the upsampled image and the high-resolution image, and assist the Perceptual Loss to restore the similarity between each layer of the low-resolution image and the high-resolution image in the high-level feature space to achieve more detailed restoration. Specifically as follows:

[0053]

[0054] Where L p represents the perception loss function, l represents the l-th layer of the network, a l represents the weights of different-level features, ||·|| p represents the Euclidean distance, p is set to 2, and f l represent the l-th layer of the feature extraction network and the perception enhancement network respectively, and I hrand I lr respectively represent the input high-resolution and low-resolution images.

[0055] The loss function of the perception enhancement network is: L g = a1L mse + a2L p , where L g represents the total loss function of the perception enhancement network, L mse is the MSE Loss, L p is the Perceptual Loss, and a1 and a2 are the weight values of the loss function.

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

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

[0058] According to an embodiment of the present application, in S4 of the method for gender and age estimation under low-resolution images based on deep learning perception enhancement, when fusing multi-level features, in order to enhance the detailed information of the features and reduce the loss of feature information in decoding and encoding, through skip connections, the decoder and the encoder are connected for feature fusion, and finally the extracted backbone features are successively sent into the gender estimation module and the age estimation module.

[0059] According to an embodiment of the present application, in S5 of the method for gender and age estimation under low-resolution images based on deep learning perception enhancement, it is divided into two parts: the gender and age estimation modules

[0060] In the gender estimation module, the BCE Loss is used to optimize the gender estimation module, and the formula is:

[0061]

[0062] Among them, L bce represents the BCE Loss, T represents the number of samples, y i represents the true gender label of sample i, pi Represents the predicted probability of sample i.

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

[0064] According to an embodiment of the present application, in S5 of the gender and age estimation method under low-resolution images based on deep learning perception enhancement, the way of age feature pairing is specifically divided into two parts:

[0065] Softening the age label: Where y i Represents the softened age label, Y = {r1r2r3…r N} represents N ordered categories, and the function Represents the L1 distance; the loss function is defined as: Where L sc Represents the loss function, T represents the total number of samples, and p i Represents the probability of predicting the age as i.

[0066] Construct an age matching feature library. For each gender and age, 5 different facial images are used to extract age features, and the age feature clusters for each age group are found through unsupervised training iteration and stored in the age matching feature library.

[0067] When outputting an age feature, we select the face age feature with an adjacent age difference of r (set r = 3) and the estimated gender from the age feature matching library, calculate the distances between the predicted image and the two age features. If it is closer to a certain age, the intermediate value between the two is taken as the predicted age. If a fraction is encountered, it is rounded up; in the second round, age features with the same predicted gender and an age difference of 3 are selected from the age feature matching library, and the distances between them are calculated pairwise. Iterate until the distance is less than the threshold, and then the final age prediction value is output.

[0068]

[0069] Where g represents the age feature matching algorithm, y i Represents the initially predicted age value, round represents each round, θ represents the age feature distance calculation function, k represents the age feature distance threshold. When the iteration reaches a distance less than the threshold, the age value output at this time is the final predicted age value.

[0070] According to an embodiment of the present application, in S3 of the gender and age estimation method under 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: Ltotal = b1L bce + b2L sc , where L total is the total loss function, and b1 and b2 are the weight values of two loss functions L bce and L sc .

[0071] According to an embodiment of the present application, the gender and age estimation terminal under low-resolution images 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, and the computer program includes program instructions. It is characterized in that: the processor is configured to call the program instructions to execute the method described in any one of the above embodiments.

[0072] According to an embodiment of the present application, a gender and age estimation system under low-resolution images based on deep learning perception enhancement is provided, including an image preprocessing module, a perception enhancement module, a backbone feature extraction module, a multi-layer feature fusion module, a gender and age estimation module. Among them, the image preprocessing module obtains the human individual image to be predicted through a terminal, performs exposure detection on the image, reduces the brightness of the image with too high brightness through a brightness reduction algorithm; for the image with too low brightness, increases the brightness through a brightness enhancement algorithm, and obtains a face image through an object detection algorithm. For an image with a small resolution, the resolution is adjusted to 256×256 through an interpolation algorithm, and the image is normalized. Among them, the image is cropped into resolutions of 224×224 and 64×64 and forms an image pair for training the perception enhancement network. The perception enhancement network is trained using high and low resolution paired pictures and does not require high and low resolution paired data 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 face 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 between the perception enhancement network and the feature extraction network can effectively improve the acquisition of face gender and age detail information; 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 to increase the prior information of gender to improve the expression of age information. 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 the optimal solution is obtained through iteration, and the final gender and age estimation values are output.

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

[0074] In this embodiment, the flowchart of the gender and age estimation system under low-resolution images based on deep learning perception enhancement is as Figure 1 shown. According to the flowchart, the following steps are included:

[0075] S1: Image data preprocessing. Preprocess the input person image. Enhance the brightness of the image with low brightness, reduce the brightness of the image with high brightness, and normalize the image.

[0076] S2: Image feature perception enhancement; A schematic diagram of a gender and age estimation method based on perception enhancement is designed, as Figure 2 shown. The numbers correspond as follows: 210 represents the input RGB image, 220 represents convolutional layer 1, 230 represents convolutional layer 2, 204 represents convolutional layer 3 including upsampling, 250 represents convolutional layer 4 including upsampling, 260 represents convolutional layer 5 including downsampling, 270 represents convolutional layer 6 including downsampling, 280 represents skip connection, 290 represents convolutional layer 7, 211 represents convolutional layer 8, 212 represents the gender estimation module, 213 represents the gender classification head, 214 represents the age estimation module, 215 represents the MLP feature fusion layer, and 216 represents the age estimation head. First, train the perception enhancement network. Crop the preprocessed face image into images with resolutions of 224×224 and 64×64 respectively, and form image pairs. Use the 64×64 resolution image as the input of the perception enhancement network, input the 224×224 resolution image into the pre-trained feature extraction network, extract the image features of each layer, and optimize the perception enhancement network using MSE Loss and Perceptual Loss. The overall network structure adopts a structure similar to the inverse UNet. Use 64×64 resolution 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;

[0077] S3: Trunk image feature extraction. Use the reconstructed feature extraction trunk network (encoder) to extract features. Send the face image restored to the standard size into the convolutional neural network to extract the trunk features, and input the trunk features into the gender estimation module and the age estimation module respectively;

[0078] S4: Multi-level feature fusion. Connect the decoder and the encoder through skip connections. When extracting features through the encoder, fuse the features of the original low-resolution image to make up for the loss of feature details during upsampling and downsampling.

[0079] S5: Perform gender and age estimation. Send the features extracted by the decoder into the gender estimation module and the age estimation module respectively. Fuse the features extracted by the gender estimation module and the age estimation module through the MLP network to obtain gender prior information. Then send the fused features into 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, optimize it in the way of age feature matching, and finally output the estimated values of gender and age respectively.

[0080] The gender and age estimation under low-resolution images based on deep learning perception enhancement provided by the above embodiments satisfies the problem of inaccurate age estimation for low-resolution face images in a real environment and solves the problem of the demand for multi-attribute features of human faces in an actual scenario.

[0081] According to an embodiment of the present application, as Figure 3 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, and the computer program includes program instructions. The processor is configured to call the program instructions to execute the method described in the above embodiments.

[0082] It should be understood that in the embodiments of the present invention, the so-called processor may be a central processing unit (CPU), and this processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or this processor may also be any conventional processor, etc.

[0083] The input device may include a monitoring 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

[0084] The above embodiments merely represent several implementation manners of the present invention. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the claims.

Claims

1. A method for gender and age estimation based on enhanced perception, characterized in that It includes the following steps: S1: Image data preprocessing. Preprocess the input person image to obtain a face image, adjust the resolution of the face image to 256*256, enhance the brightness of images with low brightness, reduce the brightness of images with high brightness, and normalize the images; S2: Image feature perception enhancement. Train the perception enhancement network. Crop the preprocessed image into images with resolutions of 224×224 and 64×64 respectively to form image pairs. Use the 64×64 resolution image as the input of the perception enhancement network, input the 224×224 resolution image into the pre-trained feature extraction network to extract the image features of each layer. Use MSE Loss and Perceptual Loss to optimize the perception enhancement network. The overall network structure adopts a structure similar to the inverse UNet. Use 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: Trunk image feature extraction. Use the reconstructed feature extraction trunk network to extract features. Send the face image restored to the standard size into the convolutional neural network to extract the trunk features, and input the trunk features into the gender estimation module and the age estimation module respectively; S4: Multi-level feature fusion. Connect the decoder and the encoder through skip connections. When the encoder extracts features, fuse the features of the original low-resolution image to make up for the loss of feature details during upsampling and downsampling; S5: Perform gender and age estimation. Send the features extracted by the decoder into 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 into 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 the method of age feature matching for optimization, and finally output the estimated values of gender and age respectively.

2. The method for gender and age estimation based on enhanced perception according to claim 1, wherein When performing the image preprocessing step of step S1, the following operations are carried out: Use the brightness enhancement algorithm to perform light enhancement processing on images with low brightness; use the brightness reduction algorithm for high-brightness images to make the images in a normal exposure state; for the extracted face images, while keeping the aspect ratio unchanged, adjust the long side of the image to 256 pixels, and use zero padding for the remaining pixels of the image.

3. The method for gender and age estimation based on perception enhancement according to claim 1, wherein When performing the image feature perception enhancement in step S2, first train the perception enhancement network, extract the preprocessed image data, crop the images into 224×224 and 64×64 resolution sizes respectively, and form image pairs. Input the 64×64 resolution image into the perception enhancement network for upsampling to increase the image resolution to 224×224. Input the 224×224 resolution image into the pre-trained feature extraction network, and use MSE Loss to optimize the perception enhancement network to reduce the difference between the upsampled image and the high-resolution image, and assist the Perceptual Loss to restore the similarity between each layer of the low-resolution image and the high-resolution image in the high-level feature space to achieve more detailed restoration, specifically as follows: Among them, L p represents the perceptual loss function, l represents the l-th layer of the network, and a l represents the weights of features at different levels, ||·|| p represents the Euclidean distance, p is set to 2, and f l respectively represent the l-th layer of the feature extraction network and the perceptual enhancement network, I hr and I lr respectively represent the input high-resolution and low-resolution images, The loss function of the perception enhancement network is: L g = a1L mse + a2L p , where L g represents the total loss function of the perception enhancement network, L mse is the MSE Loss, L p is the Perceptual Loss, and a1 and a2 are the weight values of the loss function; The overall network structure adopts the structure design of the inverse UNet. The original UNet structure uses the method of first downsampling and then upsampling. The present invention adopts the network structure of first upsampling and then downsampling to solve the problem of insufficient detailed features of low-resolution images.

4. The method for gender and age estimation based on enhanced perception according to claim 1, wherein When performing step S3 image feature extraction, the following steps are included: Input the standard-sized image into the encoder of the backbone feature extraction network, extract feature maps of different levels through the convolutional neural network, use VGGNet as the feature extraction network, and increase the information interaction between different channels through the Effective Channel Attention to improve the expression of the backbone features.

5. The method for gender and age estimation based on enhanced perception according to claim 1, wherein When performing step S4 multi-level feature fusion, connect the decoder and the encoder through skip connections for feature fusion, and send the extracted backbone features to the gender estimation module and the age estimation module in sequence.

6. The method for gender and age estimation based on perception enhancement according to claim 1, wherein Step S5 is divided into two parts: the gender and age estimation modules: In the gender estimation module, use BCE Loss to optimize the gender estimation module, and the formula is: Among them, L bce represents the BCE Loss, T represents the number of samples, and y i represents the true gender label of sample i, and p i represents the predicted probability of sample i; In the age estimation module, first use the MLP network to fuse the gender feature and the age feature extracted by the age estimation module to provide gender prior information for age estimation, and output the age value through age feature matching. The age feature matching process is as follows: Optimize the age estimation module through Soft Ordinal Label Loss and soften the age labels: where y i represents the softened age label, Y = {r1r2r3…r N} represents N ordered categories, and the function represents the L1 distance; the loss function is defined as: where L sc represents the loss function, T represents the total number of samples, and p i represents the probability of predicting the age as i; Construct an age matching feature library. For each gender and age, extract age features from 5 different face images, and find the age feature clusters for each age group through unsupervised training iteration, and store them in the age matching feature library; When outputting an age feature, select the face age feature with an adjacent age difference of r (set r = 3) and the estimated gender from the age feature matching library, calculate the distances between the predicted image and the two age features. If it is closer to a certain age, take the intermediate value between the two as the predicted age. If a fraction is encountered, round up. In the second round, select the age feature with the same predicted gender and an age difference of k from the age feature matching library and calculate the distance between them, and iterate until the distance between the two is less than the threshold, and finally output the age prediction value; Among them, g represents the age feature matching algorithm, and y i represents the initially predicted age value, round represents each round, θ represents the age feature distance calculation function, k represents the age feature distance threshold. When the iteration reaches a distance less than the threshold, the output age value at this time is the final predicted age value.

7. The method for gender and age estimation based on enhanced perception according to claim 1, wherein The loss function in step S3 is defined as follows: L total = b1L bce + b2L sc , where L total is the total loss function, and b1 and b2 are the weight values of the two loss functions L bce and L sc .

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 for storing 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 according to any one of claims 1-7.