WO2021012383A1 - Age prediction method and device for infrared image - Google Patents
Age prediction method and device for infrared image Download PDFInfo
- Publication number
- WO2021012383A1 WO2021012383A1 PCT/CN2019/108078 CN2019108078W WO2021012383A1 WO 2021012383 A1 WO2021012383 A1 WO 2021012383A1 CN 2019108078 W CN2019108078 W CN 2019108078W WO 2021012383 A1 WO2021012383 A1 WO 2021012383A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- age
- infrared
- neural network
- network model
- convolutional neural
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 56
- 238000013527 convolutional neural network Methods 0.000 claims abstract description 272
- 238000012549 training Methods 0.000 claims abstract description 27
- 238000012360 testing method Methods 0.000 claims description 66
- 238000003062 neural network model Methods 0.000 claims description 25
- 238000001514 detection method Methods 0.000 claims description 22
- 238000002372 labelling Methods 0.000 claims description 20
- 238000004364 calculation method Methods 0.000 claims description 19
- 238000011176 pooling Methods 0.000 claims description 14
- 230000002159 abnormal effect Effects 0.000 claims description 9
- 230000001815 facial effect Effects 0.000 claims description 6
- 238000013528 artificial neural network Methods 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 7
- 238000012545 processing Methods 0.000 description 5
- 238000010276 construction Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 2
- 238000012806 monitoring device Methods 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/172—Classification, e.g. identification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
- G06F21/31—User authentication
- G06F21/32—User authentication using biometric data, e.g. fingerprints, iris scans or voiceprints
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/168—Feature extraction; Face representation
- G06V40/171—Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/178—Human faces, e.g. facial parts, sketches or expressions estimating age from face image; using age information for improving recognition
Definitions
- the present invention relates to the technical field of image processing, in particular to an age prediction method and device for infrared images.
- age prediction based on surveillance images mainly uses convolutional neural networks. Specifically, firstly, a convolutional neural network model needs to be trained through sample images and accurate age annotation results, and then the age prediction of the face in the predicted image can be performed based on the trained convolutional neural network model.
- the existing age-labeled image set is a color image set, and the convolutional neural network model trained based on the image set can only predict the age of the face in the color image.
- the convolutional neural network model trained based on the image set can only predict the age of the face in the color image.
- the present invention provides an age prediction method and device for infrared images to predict the age of human faces in infrared images.
- the specific technical solution is as follows.
- an embodiment of the present invention provides an age prediction method for infrared images, and the method includes:
- the infrared convolutional neural network model is based on the input of each infrared sample image to the initial infrared convolutional neural network model, the initial infrared convolutional neural network model outputs the corresponding age distribution of each infrared sample image and the corresponding age annotation result
- the difference between the generated Gaussian distribution and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age annotation result are obtained after adjusting each parameter in the initial infrared convolutional neural network model, the age
- the distribution obeys the Gaussian distribution; the infrared sample image and the corresponding age annotation result are determined according to a pre-trained convolutional neural network model, and the convolutional neural network model is obtained through color image training.
- the training process of the infrared convolutional neural network model includes:
- the initial infrared convolutional neural network model includes: a convolutional layer, a pooling layer, and a fully connected layer;
- the determining each infrared sample image and the age marking result corresponding to each infrared sample image includes:
- each of the image sets For each of the image sets, detecting the second face region in each initial infrared image, and constructing each initial target image including each of the second face regions;
- each of the initial target images into a pre-trained convolutional neural network model to obtain the second predicted age distribution of the person corresponding to each of the second face regions, and determine the age range corresponding to each second predicted age distribution;
- the convolutional neural network model is based on the input of the initial convolutional neural network model of each sample image, the age distribution corresponding to each sample image output by the initial convolutional neural network model and the Gaussian distribution generated by the corresponding age annotation result The difference, and the difference between the expected value of the age distribution corresponding to each sample image and the corresponding age annotation result, adjust each parameter in the initial convolutional neural network model to obtain a candidate neural network model, and compare the candidate neural network model Obtained after adjustment, the second predicted age distribution obeys a Gaussian distribution, and each sample image is a color image;
- each image set For each image set, remove the initial target images with abnormal age ranges in the image set to obtain the remaining target images, calculate the normal age range corresponding to all the remaining target images, and use the remaining target images included in the normal age range as Infrared sample images, and the average value of the age range corresponding to each infrared sample image is used as the age labeling result of each infrared sample image.
- removing initial target images with abnormal age ranges in the image set to obtain the remaining target images includes:
- the calculation of the normal age range corresponding to all remaining target images includes:
- the training process of the convolutional neural network model includes:
- the initial convolutional neural network model including: a convolutional layer, a pooling layer, and a fully connected layer;
- the generating the Gaussian distribution of the age annotation result corresponding to each sample image includes:
- the method further includes:
- the infrared test image is different from the infrared sample image
- the test accuracy is less than the preset accuracy threshold
- the current infrared convolutional neural network model is used as the final infrared convolutional neural network model.
- the constructing the to-be-processed target image including the first face region includes:
- each target key point is a point that identifies a face contour feature
- a target image to be processed including the first face region and each target key point is located at a preset position is obtained.
- the method further includes:
- an embodiment of the present invention provides an age prediction device for infrared images, the device includes:
- Infrared image acquisition module for acquiring infrared images to be processed
- the face area detection module is used to detect the first face area in the infrared image to be processed, and construct a target image to be processed containing the first face area; wherein the size of the target image to be processed is Preset size
- the age prediction module is used to input the target image to be processed into a pre-trained infrared convolutional neural network model to obtain the first predicted age distribution of the person corresponding to the first face region, wherein the first prediction
- the age distribution obeys the Gaussian distribution
- the infrared convolutional neural network model is the age corresponding to each infrared sample image output by the initial infrared convolutional neural network model after inputting the initial infrared convolutional neural network model according to each infrared sample image
- the device further includes:
- the infrared model building module is used to build an initial infrared convolutional neural network model, the initial infrared convolutional neural network model includes: a convolutional layer, a pooling layer, and a fully connected layer;
- An infrared sample image determination module used to determine each infrared sample image and the age annotation result corresponding to each infrared sample image
- a Gaussian distribution generating module configured to generate the Gaussian distribution of the age annotation result corresponding to each infrared sample image
- the infrared convolutional neural network model training module is used to input each infrared sample image into the initial infrared convolutional neural network model, obtain the age distribution corresponding to each infrared sample image, and calculate the corresponding infrared sample image The difference between the age distribution and the Gaussian distribution generated by the corresponding age labeling result, and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age labeling result, according to the calculation result of the initial infrared convolutional neural network model The parameters are adjusted to obtain the infrared convolutional neural network model.
- the infrared sample image determination module includes:
- the image collection acquisition sub-module is used to acquire multiple image collections, wherein the initial infrared images in each image collection are different facial images of the same person in the same period, and the initial infrared images in each image collection The number of is greater than the preset number threshold;
- the face area detection sub-module is used to detect the second face area in each initial infrared image for each of the image sets, and construct each initial target image including each of the second face areas;
- the age range determination sub-module is used to input each of the initial target images into a pre-trained convolutional neural network model to obtain the second predicted age distribution of the person corresponding to each of the second face regions, and determine each second Predict the age range corresponding to the age distribution; wherein the convolutional neural network model is based on the input of the initial convolutional neural network model of each sample image, and the initial convolutional neural network model outputs the corresponding age distribution of each sample image and the corresponding The difference between the Gaussian distribution generated by the age labeling result, and the difference between the expected value of the age distribution corresponding to each sample image and the corresponding age labeling result, adjusting each parameter in the initial convolutional neural network model to obtain a candidate neural network model, And obtained after adjusting the candidate neural network model, the second predicted age distribution obeys a Gaussian distribution, and each sample image is a color image;
- the infrared sample determination sub-module is used to remove the initial target images with abnormal age ranges in the image set for each image set to obtain the remaining target images, calculate the normal age range corresponding to all remaining target images, and include them in the normal
- the remaining target images within the age range are used as infrared sample images, and the average value of the age range corresponding to each infrared sample image is used as the age labeling result of each infrared sample image.
- the infrared sample determination sub-module is specifically used for:
- the infrared sample determination sub-module is specifically used for:
- the infrared sample image determination module further includes:
- the network model construction sub-module is used to construct an initial convolutional neural network model, and the initial convolutional neural network model includes: a convolutional layer, a pooling layer, and a fully connected layer;
- the sample image acquisition sub-module is used to acquire each sample image and the age annotation result corresponding to each sample image;
- the Gaussian distribution generation sub-module is used to generate the Gaussian distribution of the age annotation results corresponding to each sample image
- the convolutional neural network model training sub-module is used to input each sample image into the initial convolutional neural network model, obtain the age distribution corresponding to each sample image, and calculate the age distribution corresponding to each sample image and the corresponding The difference between the Gaussian distribution generated by the age annotation result, and the difference between the expected value of the age distribution corresponding to each sample image and the corresponding age annotation result, according to the calculation result, adjust each parameter in the initial convolutional neural network model to obtain the candidate Neural network model, and adjusting the candidate neural network model to obtain the convolutional neural network model.
- the Gaussian distribution generating sub-module is specifically used for:
- the device further includes:
- a test image acquisition module configured to acquire an infrared test image and an age marking result corresponding to each of the infrared test images; the infrared test image is different from the infrared sample image;
- a test accuracy determining module configured to determine the test accuracy of the infrared convolutional neural network model according to the infrared test image and the age annotation result corresponding to each infrared test image;
- the processing module is configured to use the current infrared convolutional neural network model as the initial infrared convolutional neural network model when the test accuracy is less than the preset accuracy threshold, and trigger the infrared sample image determination module until the test accuracy is not When it is less than the preset accuracy threshold, the current infrared convolutional neural network model is used as the final infrared convolutional neural network model.
- the face area detection module includes:
- the key point detection sub-module is used to perform key point detection on the first face area to obtain coordinate information of each target key point in the first face area; wherein, each target key point is an identification face Points of contour features;
- the target image construction sub-module is used to align the first face region according to the coordinate information of the target key points to obtain the first face region and the target key points are located in the preset Set the position of the target image to be processed.
- the device further includes:
- the age value calculation module is used to calculate the sum of the product of each age value and the corresponding probability in the first predicted age distribution, and use the calculation result as the predicted age value of the person corresponding to the first face area.
- the method and device for predicting the age of a face in an infrared image can obtain an infrared image to be processed; detect the first face area in the infrared image to be processed, and construct a A target image to be processed in the face region; where the size of the target image to be processed is a preset size; the target image to be processed is input into the pre-trained infrared convolutional neural network model to obtain the first face region corresponding to the person
- the first predicted age distribution where the first predicted age distribution obeys the Gaussian distribution; among them, the infrared convolutional neural network model is output from the initial infrared convolutional neural network model based on the input of each infrared sample image
- determining infrared sample images and corresponding age annotation results through a convolutional neural network model can save human resources and improve the efficiency of sample acquisition.
- the initial infrared convolutional neural network model outputs the corresponding age distribution of each infrared sample image and the corresponding age annotation results are generated The difference between the Gaussian distribution of each infrared sample image and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age annotation result.
- the parameters in the initial infrared convolutional neural network model are adjusted, which are the same as the output specific age value. In comparison, it can accurately predict the age of the same person from multiple angles and multiple states, and improve the robustness of the model.
- any product or method of the present invention does not necessarily need to achieve all the advantages described above at the same time.
- the initial infrared convolutional neural network model when training the infrared convolutional neural network model, after each infrared sample image is input to the initial infrared convolutional neural network model, the initial infrared convolutional neural network model outputs the corresponding age distribution of each infrared sample image and the corresponding age annotation results are generated The difference between the Gaussian distribution of each infrared sample image and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age annotation result. The parameters in the initial infrared convolutional neural network model are adjusted, which are the same as the output specific age value. In comparison, it can accurately predict the age of the same person from multiple angles and multiple states, and improve the robustness of the model.
- the difference between the age distribution corresponding to each infrared sample image output by the initial infrared convolutional neural network model and the Gaussian distribution generated by the corresponding age annotation result, and each infrared The difference between the expected value of the age distribution corresponding to the sample image and the corresponding age annotation result.
- the parameters of the initial infrared convolutional neural network model are adjusted to obtain the infrared convolutional neural network model. Compared with the scheme that outputs the specific age value, it can The same person's multi-angle and multi-state have accurate age prediction, which improves the robustness of the model.
- the difference between the age distribution corresponding to each sample image output by the initial convolutional neural network model and the Gaussian distribution generated by the corresponding age annotation result, and the age corresponding to each sample image The difference between the expected value of the distribution and the corresponding age annotation result.
- the parameters in the initial convolutional neural network model are adjusted to obtain the convolutional neural network model. Compared with the scheme that outputs the specific age value, it can be used for multiple angles and multiple angles of the same person.
- the state has an accurate age prediction, which improves the robustness of the model.
- test the test accuracy of the trained infrared convolutional neural network model through the test image and when the test accuracy is low, update the infrared convolutional neural network model through the infrared sample image again, so as to ensure the final infrared
- the test accuracy of the convolutional neural network improves the accuracy of age prediction.
- FIG. 1 is a schematic flowchart of an age prediction method for infrared images according to an embodiment of the present invention
- FIG. 2 is a schematic diagram of another flow chart of an age prediction method for infrared images according to an embodiment of the present invention
- FIG. 3 is a schematic diagram of another flow chart of an age prediction method for infrared images according to an embodiment of the present invention.
- FIG. 4 is a schematic diagram of another flow chart of an age prediction method for infrared images according to an embodiment of the present invention.
- FIG. 5 is a schematic diagram of another flow chart of an age prediction method for infrared images according to an embodiment of the present invention.
- FIG. 6 is a schematic diagram of another flow chart of an age prediction method for infrared images according to an embodiment of the present invention.
- FIG. 7 is a schematic structural diagram of an age prediction device for infrared images according to an embodiment of the present invention.
- the embodiment of the invention discloses an age prediction method and device for infrared images, which can predict the age of a human face in the infrared image.
- the embodiments of the present invention will be described in detail below.
- FIG. 1 is a schematic flowchart of a method for age prediction of infrared images provided by an embodiment of the present invention. This method is applied to electronic equipment. The method specifically includes the following steps.
- S110 Acquire an infrared image to be processed.
- the above-mentioned infrared image to be processed is an image containing a human face that needs to be age predicted.
- the electronic device may receive the infrared image collected by the monitoring device as the infrared image to be processed; or, may receive the infrared image input by the user as the infrared image to be processed, which is not limited in the embodiment of the present invention.
- S120 Detect a first face region in the infrared image to be processed, and construct a target image to be processed including the first face region; wherein the size of the target image to be processed is a preset size.
- the infrared image to be processed may include areas other than the face area.
- other regions may affect the results of age prediction.
- the electronic device can detect the face area in the infrared image to be processed, which can be referred to as the first face area, and construct the to-be-processed target image containing the first face area.
- the size of the target image to be processed is a preset size.
- the Faster-RCNN FasterRegion-based Cellular Neural Network
- the Faster-RCNN FasterRegion-based Cellular Neural Network
- any known target detection algorithm may be used to detect the first face region in the infrared image to be processed, which is not limited in the embodiment of the present invention.
- S130 Input the target image to be processed into the pre-trained infrared convolutional neural network model to obtain the first predicted age distribution of the person corresponding to the first face area, where the first predicted age distribution obeys the Gaussian distribution; where the infrared volume
- the product neural network model is the difference between the age distribution corresponding to each infrared sample image output by the initial infrared convolution neural network model and the Gaussian distribution generated by the corresponding age annotation result after inputting the initial infrared convolution neural network model according to each infrared sample image.
- the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age annotation result which is obtained after adjusting the parameters in the initial infrared convolutional neural network model.
- the age distribution obeys the Gaussian distribution; the infrared sample image and the corresponding age
- the labeling result is determined based on the pre-trained convolutional neural network model, which is trained on the color image.
- an infrared convolutional neural network model for age prediction of a human face in an infrared image can be constructed in advance.
- the convolutional neural network model can be obtained by training based on the color image first, and the convolutional neural network model can perform rough age prediction on the infrared image.
- the expected value of the age distribution corresponding to each infrared sample image is the expected value of the Gaussian distribution, that is, the age value with the highest probability in the middle of the age distribution corresponding to each infrared sample image.
- the target image to be processed containing the first face area can be input into the infrared convolutional neural network model, and the infrared convolutional neural network model can output the first face area corresponding to the first person.
- Forecast age distribution The first predicted age distribution obeys Gaussian distribution, that is, obeys normal distribution.
- the aforementioned predicted age distribution includes multiple age values and corresponding probability values.
- the probability of the age value in the middle is the largest, and the probability of the age value on both sides decreases sequentially. And, the sum of the probabilities of all age values is 1.
- the method for predicting the age of a face in an infrared image can determine the infrared sample image and the corresponding age annotation result based on the convolutional neural network model obtained by color image training, and then according to The determined infrared sample images and the corresponding age annotation results are trained to obtain an infrared convolutional neural network model that can predict the age of the face in the infrared image.
- determining infrared sample images and corresponding age annotation results through a convolutional neural network model can save human resources and improve the efficiency of sample acquisition.
- the initial infrared convolutional neural network model when training the infrared convolutional neural network model, after each infrared sample image is input to the initial infrared convolutional neural network model, the initial infrared convolutional neural network model outputs the corresponding age distribution of each infrared sample image and the corresponding age annotation results are generated The difference between the Gaussian distribution of each infrared sample image and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age annotation result. The parameters in the initial infrared convolutional neural network model are adjusted, which are similar to the output specific age value. In comparison, it can accurately predict the age of the same person from multiple angles and multiple states, improving the robustness of the model.
- the training process of the infrared convolutional neural network model of the embodiment of the present invention may include the following steps.
- the initial infrared convolutional neural network model includes: a convolutional layer, a pooling layer, and a fully connected layer.
- the initial infrared convolutional neural network model in the embodiment of the present invention may include data processing layers with parameters such as a convolution layer, a pooling layer, and a fully connected layer.
- the number of convolutional layers, pooling layers, and fully connected layers may be one or more layers, as long as age prediction can be realized, which is not limited in the embodiment of the present invention.
- S220 Determine each infrared sample image and the age annotation result corresponding to each infrared sample image.
- the process of determining each infrared sample image and the age annotation result corresponding to each infrared sample image may include the following steps.
- S310 Acquire multiple image sets, where the initial infrared images in each image set are different facial images of the same person in the same period, and the number of initial infrared images in each image set is greater than a preset number threshold.
- a large number of infrared face images can be collected, and the infrared sample images that can be used to train the infrared convolutional neural network model are determined.
- infrared facial images of the same period can be acquired. For example, millions of (such as 5 million, 6 million, 7 million, etc.) infrared face images can be collected, with an average of about 100 per person as the initial infrared image.
- the same period mentioned above may be a preset period of time, such as 1 day, 30 days, 60 days, etc., which is not limited in the embodiment of the present invention.
- S320 For each image set, detect the second face area in each initial infrared image, and construct each initial target image including each second face area.
- the Faster-RCNN face detection framework can be used to detect the second face region in each initial infrared image included in each image set.
- any known target detection algorithm may be used to detect the second face region in each initial infrared image included in each image set, which is not limited in the embodiment of the present invention.
- each initial target image including each second human face region can be constructed.
- S330 Input each initial target image into the pre-trained convolutional neural network model to obtain the second predicted age distribution of the person corresponding to each second face area, and determine the age range corresponding to each second predicted age distribution; where, The convolutional neural network model is based on the input of each sample image into the initial convolutional neural network model, the initial convolutional neural network model outputs the corresponding age distribution of each sample image and the difference between the Gaussian distribution generated by the corresponding age annotation result, and each sample The difference between the expected value of the age distribution corresponding to the image and the corresponding age annotation result. The parameters in the initial convolutional neural network model are adjusted to obtain the candidate neural network model, and the candidate neural network model is adjusted. The second predicted age The distribution obeys the Gaussian distribution, and each sample image is a color image.
- a convolutional neural network model that can predict the age of a human face in an infrared image can be constructed in advance. Specifically, a color image with an age can be used as a sample image, and after each sample image is input into the initial convolutional neural network model, the age distribution corresponding to each sample image output by the initial convolutional neural network model and the corresponding age annotation result are generated The difference between the Gaussian distribution of each sample image and the difference between the expected value of the age distribution corresponding to each sample image and the corresponding age annotation result. The parameters in the initial convolutional neural network model are adjusted to obtain the candidate neural network model. The candidate neural network model can Predict the age of color images; then adjust the candidate neural network model to obtain a convolutional neural network model that can predict the age of infrared images.
- each initial target image containing each second face area can be input into the pre-trained convolutional neural network model, and the convolutional neural network model can output the person corresponding to each second face area
- the second predicted age distribution obeys Gaussian distribution, that is, obeys normal distribution.
- the accuracy of age predicted by the convolutional neural network model is not particularly high.
- the age range corresponding to each second predicted age distribution can be determined, that is, the age included in each second predicted age distribution range.
- S340 For each image set, remove the initial target images with an abnormal age range in the image set to obtain the remaining target images, calculate the normal age range corresponding to all the remaining target images, and use the remaining target images included in the normal age range as Infrared sample images, and the average value of the age range corresponding to each infrared sample image is used as the age labeling result of each infrared sample image.
- the age prediction results should be the same, that is, for each image set, the age range of each image included therein should be the same.
- the age ranges obtained by these images through step S330 will not be exactly the same.
- the initial target images with abnormal age ranges in the image set may be removed to obtain the remaining target images.
- the interquartile range method may be used to remove the initial target images with abnormal age ranges in the image set to obtain the remaining target images.
- the process may include the following steps.
- S410 For each image set, sort the initial target images according to the minimum value of the age range corresponding to each initial target image included in the image set from small to large.
- any image set includes 100 initial target images, and the age range of each initial target image is 15-25 for 10 pictures, 30-40 for 80 pictures, and 40-50 for 10 pictures, you can
- the initial target images are sorted according to the order of the smallest value of each age range from small to large, that is, the order of 15, 30, and 40.
- S420 Determine the first age range located at one quarter and the second age range located at three quarters, as well as the minimum value of the first age range and the maximum value of the second age range.
- the first age range located at one quarter is the age range 30-40 corresponding to the 25th initial target image
- the second age range located at three quarters is the 75th initial target image
- the corresponding age range is 30-40.
- the minimum value of the first age range is 30, and the maximum value of the second age range is 40.
- S430 Remove the initial target images whose age values are less than the difference between the minimum value and the preset value in the corresponding age range and the initial target images whose age values are greater than the sum of the maximum value and the preset value to obtain the remaining target images.
- the foregoing preset value may be any preset number, such as 3, 5, 6, etc., which is not limited in the embodiment of the present invention.
- the difference between the minimum value and the preset value is 27, and the sum of the maximum value and the preset value is 43.
- the age range includes age values less than the minimum value and the preset value.
- the initial target image with the difference between the values is 10 initial target images with an age range of 15-25.
- the age range includes the initial target images with an age value greater than the sum of the maximum value and the preset value, that is, 10 images with an age range of The initial target image of 40-50 is removed, and the remaining target image is 80 initial target images in the age range of 30-40 as the remaining target image.
- the normal age range corresponding to all the remaining target images for example, you can calculate the mean and standard deviation of the age ranges corresponding to all the remaining target images; obtain the preset hyperparameters; calculate the product of the hyperparameters and the standard deviation , And regard the difference between the mean and the product as the minimum value of the normal age range, and the sum of the mean and the product as the maximum value of the normal age range.
- the 4-quartile range method is used to eliminate the obvious outliers and get the remaining m images and their predicted values [x1,x2,x3,...xm ], for the results of these m pictures of the same person, using the Grubbs detection method, calculate the statistical mean u and standard deviation s of the m pictures, design the hyperparameter k, and use the following calculation formula:
- the last [x1,x2,x3,...xh] images in the range are obtained, and the average value of the prediction range of these h images is counted as the person's age label As a result, the h infrared images are matched to form a new data set, which is an infrared sample image.
- Determining the infrared sample image and the corresponding age annotation result through the convolutional neural network model can save human resources and improve the efficiency of sample acquisition compared with manual age calibration.
- a Gaussian distribution with the age annotation result corresponding to the infrared sample image as the center and the preset standard deviation as the peak width can be constructed as the Gaussian distribution of the age annotation result corresponding to the infrared sample image.
- the foregoing preset standard deviation may be a preset value, and the embodiment of the present invention does not limit its specific value. It can be understood that the smaller the aforementioned preset standard deviation, the sharper the peak of the generated Gaussian distribution, and the more concentrated the age values included therein.
- S240 Input each infrared sample image into the initial infrared convolutional neural network model to obtain the age distribution corresponding to each infrared sample image, and calculate the difference between the age distribution corresponding to each infrared sample image and the Gaussian distribution generated by the corresponding age annotation result, As well as the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age annotation result, the parameters in the initial infrared convolutional neural network model are adjusted according to the calculation results to obtain the infrared convolutional neural network model.
- the infrared convolutional neural network model that can predict the age of the infrared image can be trained. Specifically, each infrared sample image can be input into the initial infrared convolutional neural network model to obtain the age distribution corresponding to each infrared sample image, and the difference between the age distribution corresponding to each infrared sample image and the Gaussian distribution generated by the corresponding age annotation result can be calculated And the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age annotation result. According to the calculation result, the parameters in the initial infrared convolutional neural network model are adjusted to obtain the infrared convolutional neural network model.
- the model can construct a distribution learning based on Gaussian distribution estimation and a loss function based on expected age estimation.
- a distribution learning based on Gaussian distribution estimation By converting the face age label into a designed Gaussian distribution as a label, it can be compared with the prediction generated by the model to generate a return error. Adjust the parameters in the initial infrared convolutional neural network model to obtain the infrared convolutional neural network model.
- the difference between the age distribution corresponding to each infrared sample image output by the initial infrared convolutional neural network model and the Gaussian distribution generated by the corresponding age annotation result, and each infrared sample image The difference between the expected value of the corresponding age distribution and the corresponding age labeling result.
- the parameters in the initial infrared convolutional neural network model are adjusted to obtain the infrared convolutional neural network model. Compared with the scheme that outputs the specific age value, it can be used for the same person
- the multi-angle and multi-state has accurate age prediction, which improves the robustness of the model.
- the accuracy detection of the infrared convolutional neural network model obtained by training may be performed.
- the following steps can also be performed.
- S510 Obtain an infrared test image and an age annotation result corresponding to each infrared test image; the infrared test image is different from the infrared sample image.
- infrared images containing human faces can be acquired as infrared test images.
- the infrared test images are manually labeled with accurate age.
- S520 Determine the test accuracy of the infrared convolutional neural network model according to the infrared test image and the age annotation result corresponding to each infrared test image.
- the infrared test image can be input into the infrared convolutional neural network model.
- the infrared convolutional neural network model outputs the age distribution of each infrared test image, the age expected value included in the age distribution and the age corresponding to each infrared test image are labeled The results are compared, the accuracy rate is calculated, and it is determined as the test accuracy of the infrared convolutional neural network.
- the difference between the expected age included in the age distribution and the corresponding age annotation result can be calculated, and the difference is divided by the age annotation result as the error rate. Then calculate the value of 1 minus the error rate as the accuracy rate of the infrared test image.
- the average value of the accuracy of each infrared test image is used as the test accuracy of the infrared convolutional neural network.
- test accuracy is less than the preset accuracy threshold, it indicates that the age prediction accuracy of the currently trained infrared convolutional neural network model is low. In this case, the infrared convolutional neural network model can be updated to improve its accuracy.
- the current infrared convolutional neural network model can be used as the initial infrared convolutional neural network model, and the step of determining each infrared sample image and the age annotation result corresponding to each infrared sample image is returned to execute, that is, steps S220-S240. That is to obtain different infrared sample images again, adjust the parameters of the infrared convolutional neural network model, until the test accuracy meets the requirements, use the currently trained infrared convolutional neural network model as the final infrared convolutional neural network model.
- test the test accuracy of the trained infrared convolutional neural network model through the test image and when the test accuracy is low, update the infrared convolutional neural network model through the infrared sample image again, so as to ensure the final infrared convolution
- the test accuracy of the neural network improves the accuracy of age prediction.
- the training process of the above-mentioned convolutional neural network model may include the following steps.
- S610 Construct an initial convolutional neural network model.
- the initial convolutional neural network model includes: convolutional layer, pooling layer, and fully connected layer.
- the initial convolutional neural network model in the embodiment of the present invention may include data processing layers with parameters, such as a convolution layer, a pooling layer, and a fully connected layer.
- the number of convolutional layers, pooling layers, and fully connected layers may be one or more layers, as long as age prediction can be realized, which is not limited in the embodiment of the present invention.
- the structure of the initial convolutional neural network model and the foregoing initial infrared convolutional neural network model may be the same or different, which is not limited in the embodiment of the present invention.
- a color image with an age marked in a public data set can be used as a sample image, and the marked age can be used as the age marking result corresponding to each sample image.
- the above-mentioned public data set can be, for example, AFAD: (Asian Face Age Dataset), a public Asian face image data set containing about 160k face images and their age annotations; or, it can be MegaFaceAsia, a public Asian face image data set, contains about 45k face images and their age annotations.
- AFAD Asian Face Age Dataset
- a public Asian face image data set containing about 160k face images and their age annotations
- MegaFaceAsia a public Asian face image data set, contains about 45k face images and their age annotations.
- S630 Generate a Gaussian distribution of the age annotation result corresponding to each sample image.
- a Gaussian distribution centered on the age annotation result corresponding to the sample image and the preset standard deviation is the peak width can be constructed as the Gaussian distribution of the age annotation result corresponding to the sample image.
- the foregoing preset standard deviation may be a preset value, and the embodiment of the present invention does not limit its specific value. It can be understood that the smaller the aforementioned preset standard deviation, the sharper the peak of the generated Gaussian distribution, and the more concentrated the age values included therein.
- S640 Input each sample image into the initial convolutional neural network model to obtain the age distribution corresponding to each sample image, and calculate the difference between the age distribution corresponding to each sample image and the Gaussian distribution generated by the corresponding age annotation result, and each sample image The difference between the expected value of the corresponding age distribution and the corresponding age annotation result, according to the calculation results, adjust the parameters in the initial convolutional neural network model to obtain the candidate neural network model, and adjust the candidate neural network model to obtain the convolutional neural network model.
- the convolutional neural network model that can predict the age of the infrared image can be trained. Specifically, each sample image can be input into the initial convolutional neural network model, and the difference between the age distribution corresponding to each sample image output by the initial convolutional neural network model and the Gaussian distribution generated by the corresponding age annotation result, and the corresponding sample image The difference between the expected value of the age distribution and the corresponding age annotation result, the parameters of the initial convolutional neural network model are adjusted to obtain the candidate neural network model, which can predict the age of the color image; then the candidate neural network After the model is adjusted, a convolutional neural network model that can predict the age of infrared images is obtained.
- the convolutional neural network model can construct a distribution learning based on Gaussian distribution estimation and a loss function based on expected age estimation.
- the face age label By converting the face age label into a designed Gaussian distribution as a label, it can be compared with the prediction generated by the model to generate a return error.
- the parameters in the initial convolutional neural network model are adjusted to obtain the candidate convolutional neural network model.
- the candidate convolutional neural network model is adjusted to a model that can perform age prediction on a single-channel infrared image, and the convolutional neural network model is obtained.
- the difference between the age distribution corresponding to each sample image output by the initial convolutional neural network model and the Gaussian distribution generated by the corresponding age annotation result, and the age distribution corresponding to each sample image The difference between the expected value and the corresponding age annotation result.
- the parameters in the initial convolutional neural network model are adjusted to obtain the convolutional neural network model. Compared with the solution of outputting specific age values, it can be used for multiple angles and multiple states of the same person. Accurate age prediction improves the robustness of the model.
- the human face may face forward, or there may be situations such as a side face other than the front face. When the face is not facing forward, it may affect the accuracy of age prediction results.
- the electronic device when the electronic device constructs the target image to be processed containing the first face region, it may first perform key point detection on the first face region to obtain the key points of each target in the first face region.
- the coordinate information of the point; among them, each target key point is a point that identifies the contour feature of the face; then according to the coordinate information of each target key point, the first face area is aligned to obtain the first face area and each The target key point is located in the preset position of the target image to be processed.
- the first face area can be detected by key points, and the coordinate information of each target key point in the coordinate system constructed in the image to be processed can be determined , As the coordinate information of each target key point.
- MTCNN Multi-task Convolutional Neural Network, multi-task convolutional neural network
- the above-mentioned key points may include, for example, key points of the eye area.
- key points of the eye area may include, for example, key points of the eye area.
- the electronic device inputs the target image to be processed into the pre-trained infrared convolutional neural network model, and after obtaining the first predicted age distribution of the person corresponding to the first face region, it can also calculate In the first predicted age distribution, the sum of the product of each age value and the corresponding probability, and the calculation result is used as the predicted age value of the person corresponding to the first face area.
- the specific predicted age value is calculated, so as to obtain the accurate age prediction result.
- an embodiment of the present invention provides an age prediction device for infrared images, and the device includes:
- the infrared image acquisition module 710 is used to acquire an infrared image to be processed
- the face area detection module 720 is configured to detect the first face area in the infrared image to be processed, and construct a target image to be processed that includes the first face area; wherein the size of the target image to be processed Is the default size;
- the age prediction module 730 is configured to input the target image to be processed into a pre-trained infrared convolutional neural network model to obtain the first predicted age distribution of the person corresponding to the first face region, wherein the first The predicted age distribution obeys the Gaussian distribution; wherein the infrared convolutional neural network model is inputted into the initial infrared convolutional neural network model according to each infrared sample image, and each infrared sample image output by the initial infrared convolutional neural network model corresponds to The difference between the age distribution and the Gaussian distribution generated by the corresponding age labeling result, and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age labeling result, adjust each parameter in the initial infrared convolutional neural network model As obtained later, the age distribution obeys the Gaussian distribution; the infrared sample image and the corresponding age annotation result are determined according to a pre-trained convolutional neural network model, and the convolutional neural network model is
- the device for predicting the age of a face in an infrared image provided by the embodiment of the present invention can determine the infrared sample image and the corresponding age annotation result based on the convolutional neural network model obtained by color image training, and then according to The determined infrared sample images and the corresponding age annotation results are trained to obtain an infrared convolutional neural network model that can predict the age of the face in the infrared image.
- determining infrared sample images and corresponding age annotation results through a convolutional neural network model can save human resources and improve the efficiency of sample acquisition.
- the initial infrared convolutional neural network model when training the infrared convolutional neural network model, after each infrared sample image is input to the initial infrared convolutional neural network model, the initial infrared convolutional neural network model outputs the corresponding age distribution of each infrared sample image and the corresponding age annotation results are generated The difference between the Gaussian distribution of each infrared sample image and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age annotation result. The parameters in the initial infrared convolutional neural network model are adjusted, which are the same as the output specific age value. In comparison, it can accurately predict the age of the same person from multiple angles and multiple states, and improve the robustness of the model.
- the device further includes:
- the infrared model building module is used to build an initial infrared convolutional neural network model, the initial infrared convolutional neural network model includes: a convolutional layer, a pooling layer, and a fully connected layer;
- An infrared sample image determination module used to determine each infrared sample image and the age annotation result corresponding to each infrared sample image
- a Gaussian distribution generating module configured to generate the Gaussian distribution of the age annotation result corresponding to each infrared sample image
- the infrared convolutional neural network model training module is used to input each infrared sample image into the initial infrared convolutional neural network model, obtain the age distribution corresponding to each infrared sample image, and calculate the corresponding infrared sample image The difference between the age distribution and the Gaussian distribution generated by the corresponding age labeling result, and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age labeling result, according to the calculation result of the initial infrared convolutional neural network model The parameters are adjusted to obtain the infrared convolutional neural network model.
- the infrared sample image determination module includes:
- the image collection acquisition sub-module is used to acquire multiple image collections, wherein the initial infrared images in each image collection are different facial images of the same person in the same period, and the initial infrared images in each image collection The number of is greater than the preset number threshold;
- the face area detection sub-module is used to detect the second face area in each initial infrared image for each of the image sets, and construct each initial target image including each of the second face areas;
- the age range determination sub-module is used to input each of the initial target images into a pre-trained convolutional neural network model to obtain the second predicted age distribution of the person corresponding to each of the second face regions, and determine each second Predict the age range corresponding to the age distribution; wherein the convolutional neural network model is based on the input of the initial convolutional neural network model of each sample image, and the initial convolutional neural network model outputs the corresponding age distribution of each sample image and the corresponding The difference between the Gaussian distribution generated by the age labeling result, and the difference between the expected value of the age distribution corresponding to each sample image and the corresponding age labeling result, adjusting each parameter in the initial convolutional neural network model to obtain a candidate neural network model, And obtained after adjusting the candidate neural network model, the second predicted age distribution obeys a Gaussian distribution, and each sample image is a color image;
- the infrared sample determination sub-module is used to remove the initial target images with abnormal age ranges in the image set for each image set to obtain the remaining target images, calculate the normal age range corresponding to all remaining target images, and include them in the normal
- the remaining target images within the age range are used as infrared sample images, and the average value of the age range corresponding to each infrared sample image is used as the age labeling result of each infrared sample image.
- the infrared sample determination sub-module is specifically used for:
- the infrared sample determination sub-module is specifically used for:
- the infrared sample image determination module further includes:
- the network model construction sub-module is used to construct an initial convolutional neural network model, and the initial convolutional neural network model includes: a convolutional layer, a pooling layer, and a fully connected layer;
- the sample image acquisition sub-module is used to acquire each sample image and the age annotation result corresponding to each sample image;
- the Gaussian distribution generation sub-module is used to generate the Gaussian distribution of the age annotation results corresponding to each sample image
- the convolutional neural network model training sub-module is used to input each sample image into the initial convolutional neural network model, obtain the age distribution corresponding to each sample image, and calculate the age distribution corresponding to each sample image and the corresponding The difference between the Gaussian distribution generated by the age annotation result, and the difference between the expected value of the age distribution corresponding to each sample image and the corresponding age annotation result, according to the calculation result, adjust each parameter in the initial convolutional neural network model to obtain the candidate Neural network model, and adjusting the candidate neural network model to obtain the convolutional neural network model.
- the Gaussian distribution generating sub-module is specifically used for:
- the device further includes:
- a test image acquisition module configured to acquire an infrared test image and an age marking result corresponding to each of the infrared test images; the infrared test image is different from the infrared sample image;
- a test accuracy determining module configured to determine the test accuracy of the infrared convolutional neural network model according to the infrared test image and the age annotation result corresponding to each infrared test image;
- the processing module is configured to use the current infrared convolutional neural network model as the initial infrared convolutional neural network model when the test accuracy is less than the preset accuracy threshold, and trigger the infrared sample image determination module until the test accuracy is not When it is less than the preset accuracy threshold, the current infrared convolutional neural network model is used as the final infrared convolutional neural network model.
- the face area detection module 720 includes:
- the key point detection sub-module is used to perform key point detection on the first face area to obtain coordinate information of each target key point in the first face area; wherein, each target key point is an identification face Points of contour features;
- the target image construction sub-module is used to align the first face region according to the coordinate information of the target key points to obtain the first face region and the target key points are located in the preset Set the position of the target image to be processed.
- the device further includes:
- the age value calculation module is used to calculate the sum of the product of each age value and the corresponding probability in the first predicted age distribution, and use the calculation result as the predicted age value of the person corresponding to the first face area.
- the foregoing device embodiment corresponds to the method embodiment, and has the same technical effect as the method embodiment.
- the device embodiment is obtained based on the method embodiment, and the specific description can be found in the method embodiment part, which will not be repeated here.
- modules in the device in the embodiment may be distributed in the device in the embodiment according to the description of the embodiment, or may be located in one or more devices different from this embodiment with corresponding changes.
- the modules of the above-mentioned embodiments can be combined into one module or further divided into multiple sub-modules.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Data Mining & Analysis (AREA)
- Molecular Biology (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Mathematical Physics (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Human Computer Interaction (AREA)
- Multimedia (AREA)
- Computer Security & Cryptography (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computer Hardware Design (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
An age prediction method and device for an infrared image. The method comprises: acquiring a to-be-processed infrared image (S110); detecting a first human face area in the to-be-processed infrared image, and constructing a to-be-processed target image containing the first human face, the size of the target image being a preset size (S120); inputting the to-be-processed target image into an infrared convolutional neural network model obtained by pre-training so as to obtain a first predicted age distribution of a person corresponding to the first human face area, the first predicted age distribution following the Gaussian distribution. The infrared convolutional neural network model is obtained by adjusting all parameters in an initial infrared convolutional neural network model after all infrared sample images are input into the initial infrared convolutional neural network model and according to a difference between an age distribution corresponding to all infrared sample images output by the initial infrared convolutional neural network model and a Gaussian distribution generated by a corresponding age annotation result and a difference between the desired value of the age distribution corresponding to all infrared sample images and the corresponding age annotation result, the age distribution following the Gaussian distribution. The infrared sample images and the corresponding age annotation result are determined on the basis of the convolutional neural network model obtained by pre-training of color images (S130). The described solution can be used for performing age prediction to all infrared images.
Description
本发明涉及图像处理技术领域,具体而言,涉及一种用于红外图像的年龄预测方法及装置。The present invention relates to the technical field of image processing, in particular to an age prediction method and device for infrared images.
目前,基于监控图像进行年龄预测主要采用卷积神经网络的方法。具体的,首先需要通过样本图像以及准确的年龄标注结果训练得到卷积神经网络模型,进而可以基于训练得到的卷积神经网络模型对待预测图像中的人脸进行年龄预测。At present, age prediction based on surveillance images mainly uses convolutional neural networks. Specifically, firstly, a convolutional neural network model needs to be trained through sample images and accurate age annotation results, and then the age prediction of the face in the predicted image can be performed based on the trained convolutional neural network model.
然而,现有的标注了年龄的图像集为彩色图像集,基于该图像集训练得到的卷积神经网络模型只能对彩色图像中的人脸进行年龄预测。对于红外图像,由于缺乏标注年龄的数据集,从而不能训练得到对红外图像中的人脸进行年龄预测的卷积神经网络模型。因此,为了对红外图像中的人脸进行年龄预测,亟需一种用于红外图像的年龄预测方法。However, the existing age-labeled image set is a color image set, and the convolutional neural network model trained based on the image set can only predict the age of the face in the color image. For infrared images, due to the lack of an age-labeled data set, it is impossible to train a convolutional neural network model that predicts the age of the face in the infrared image. Therefore, in order to predict the age of the face in the infrared image, an age prediction method for the infrared image is urgently needed.
发明内容Summary of the invention
本发明提供了一种用于红外图像的年龄预测方法及装置,以对红外图像中的人脸进行年龄预测。具体的技术方案如下。The present invention provides an age prediction method and device for infrared images to predict the age of human faces in infrared images. The specific technical solution is as follows.
第一方面,本发明实施例提供了一种用于红外图像的年龄预测方法,所述方法包括:In the first aspect, an embodiment of the present invention provides an age prediction method for infrared images, and the method includes:
获取待处理红外图像;Obtain infrared images to be processed;
检测所述待处理红外图像中的第一人脸区域,并构建包含所述第一人脸区域的待处理目标图像;其中,所述待处理目标图像的大小为预设大小;Detecting a first face region in the infrared image to be processed, and constructing a target image to be processed including the first face region; wherein the size of the target image to be processed is a preset size;
将所述待处理目标图像输入预先训练得到的红外卷积神经网络模型中,得到所述第一人脸区域对应人物的第一预测年龄分布,其中,所述第一预测年龄分布服从高斯分布;Inputting the target image to be processed into a pre-trained infrared convolutional neural network model to obtain a first predicted age distribution of a person corresponding to the first face region, wherein the first predicted age distribution obeys a Gaussian distribution;
其中,所述红外卷积神经网络模型是根据各红外样本图像输入初始红外卷积神经网络模型后,所述初始红外卷积神经网络模型输出的各红外样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各红外样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对所述初始红外卷积神经网络模型中各参数进行调整后得到的,所述年龄分布服从高斯分布;所述红外样本图像以及对应的年龄标注结果是根据预先训练得到的卷积神经网络模型确定的,所述卷积神经网络模型根据彩色图像训练得到。Wherein, the infrared convolutional neural network model is based on the input of each infrared sample image to the initial infrared convolutional neural network model, the initial infrared convolutional neural network model outputs the corresponding age distribution of each infrared sample image and the corresponding age annotation result The difference between the generated Gaussian distribution and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age annotation result are obtained after adjusting each parameter in the initial infrared convolutional neural network model, the age The distribution obeys the Gaussian distribution; the infrared sample image and the corresponding age annotation result are determined according to a pre-trained convolutional neural network model, and the convolutional neural network model is obtained through color image training.
可选的,所述红外卷积神经网络模型的训练过程包括:Optionally, the training process of the infrared convolutional neural network model includes:
构建初始红外卷积神经网络模型,所述初始红外卷积神经网络模型包括:卷积层、池化层、全连接层;Construct an initial infrared convolutional neural network model, the initial infrared convolutional neural network model includes: a convolutional layer, a pooling layer, and a fully connected layer;
确定各红外样本图像,以及所述各红外样本图像对应的年龄标注结果;Determine each infrared sample image and the age annotation result corresponding to each infrared sample image;
生成所述各红外样本图像对应的年龄标注结果的高斯分布;Generating a Gaussian distribution of the age annotation result corresponding to each infrared sample image;
将各红外样本图像输入所述初始红外卷积神经网络模型中,得到所述各红外样本图像对应的年龄分布,并计算所述各红外样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各红外样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,根据计算结果对所述初始红外卷积神经网络模型中各参数进行调整,得到所述红外卷积神经网络模型。Input each infrared sample image into the initial infrared convolutional neural network model to obtain the age distribution corresponding to each infrared sample image, and calculate the age distribution corresponding to each infrared sample image and the Gaussian distribution generated by the corresponding age annotation result The difference between the expected value of the age distribution corresponding to each infrared sample image and the difference between the corresponding age annotation results, and the parameters in the initial infrared convolutional neural network model are adjusted according to the calculation results to obtain the infrared convolutional neural network Network model.
可选的,所述确定各红外样本图像,以及所述各红外样本图像对应的年龄标注结果包括:Optionally, the determining each infrared sample image and the age marking result corresponding to each infrared sample image includes:
获取多个图像集合,其中,每个所述图像集合中的初始红外图像为同一人在同一时期的不同脸部图像,且每个所述图像集合中初始红外图像的数量大于预设数量阈值;Acquiring a plurality of image sets, wherein the initial infrared images in each image set are different facial images of the same person in the same period, and the number of initial infrared images in each image set is greater than a preset number threshold;
针对每个所述图像集合,检测各初始红外图像中的第二人脸区域,并构建包含各所述第二人脸区域的各初始目标图像;For each of the image sets, detecting the second face region in each initial infrared image, and constructing each initial target image including each of the second face regions;
将所述各初始目标图像输入预先训练得到的卷积神经网络模型中,得到各所述第二人脸区域对应人物的第二预测年龄分布,并确定各第二预测年龄分布对应的年龄范围;其中,所述卷积神经网络模型是根据各样本图像输入初始卷积神经网络模型后,所述初始卷积神经网络模型输出的各样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对所述初始卷积神经网络模型中各参数进行调整得到候选神经网络模型, 并对所述候选神经网络模型进行调整后得到的,所述第二预测年龄分布服从高斯分布,所述各样本图像均为彩色图像;Input each of the initial target images into a pre-trained convolutional neural network model to obtain the second predicted age distribution of the person corresponding to each of the second face regions, and determine the age range corresponding to each second predicted age distribution; Wherein, the convolutional neural network model is based on the input of the initial convolutional neural network model of each sample image, the age distribution corresponding to each sample image output by the initial convolutional neural network model and the Gaussian distribution generated by the corresponding age annotation result The difference, and the difference between the expected value of the age distribution corresponding to each sample image and the corresponding age annotation result, adjust each parameter in the initial convolutional neural network model to obtain a candidate neural network model, and compare the candidate neural network model Obtained after adjustment, the second predicted age distribution obeys a Gaussian distribution, and each sample image is a color image;
针对每个图像集合,去除该图像集合中年龄范围存在异常的初始目标图像,得到剩余目标图像,计算所有剩余目标图像对应的正常年龄范围,将包含在所述正常年龄范围内的剩余目标图像作为红外样本图像,并将各红外样本图像对应的年龄范围的均值,作为各红外样本图像的年龄标注结果。For each image set, remove the initial target images with abnormal age ranges in the image set to obtain the remaining target images, calculate the normal age range corresponding to all the remaining target images, and use the remaining target images included in the normal age range as Infrared sample images, and the average value of the age range corresponding to each infrared sample image is used as the age labeling result of each infrared sample image.
可选的,所述针对每个图像集合,去除该图像集合中年龄范围存在异常的初始目标图像,得到剩余目标图像包括:Optionally, for each image set, removing initial target images with abnormal age ranges in the image set to obtain the remaining target images includes:
针对每个图像集合,根据该图像集合中包括的各初始目标图像对应的年龄范围的最小值从小到大的顺序,将各初始目标图像排序;For each image set, sort the initial target images according to the minimum value of the age range corresponding to each initial target image included in the image set in descending order;
确定位于四分之一处的第一年龄范围和位于四分之三处的第二年龄范围,以及所述第一年龄范围的最小值和所述第二年龄范围的最大值;Determining a first age range located at one quarter and a second age range located at three quarters, as well as the minimum value of the first age range and the maximum value of the second age range;
将对应年龄范围中包含年龄值小于所述最小值与预设数值之差的初始目标图像,以及年龄值大于所述最大值与所述预设数值之和的初始目标图像去除,得到剩余目标图像。Remove the initial target image whose age value is less than the difference between the minimum value and the preset value in the corresponding age range and the initial target image whose age value is greater than the sum of the maximum value and the preset value to obtain the remaining target image .
可选的,所述计算所有剩余目标图像对应的正常年龄范围包括:Optionally, the calculation of the normal age range corresponding to all remaining target images includes:
计算所有剩余目标图像对应的年龄范围的均值和标准差;Calculate the mean and standard deviation of the age range corresponding to all remaining target images;
获取预设超参数;Get preset hyperparameters;
计算所述超参数和所述标准差的乘积,并将所述均值与所述乘积之差,作为正常年龄范围的最小值,将所述均值与所述乘积之和,作为正常年龄范围的最大值。Calculate the product of the hyperparameter and the standard deviation, and use the difference between the mean and the product as the minimum value in the normal age range, and use the sum of the mean and the product as the maximum in the normal age range value.
可选的,所述卷积神经网络模型的训练过程包括:Optionally, the training process of the convolutional neural network model includes:
构建初始卷积神经网络模型,所述初始卷积神经网络模型包括:卷积层、池化层、全连接层;Construct an initial convolutional neural network model, the initial convolutional neural network model including: a convolutional layer, a pooling layer, and a fully connected layer;
获取各样本图像,以及所述各样本图像对应的年龄标注结果;Acquiring each sample image and the age annotation result corresponding to each sample image;
生成所述各样本图像对应的年龄标注结果的高斯分布;Generating a Gaussian distribution of the age annotation result corresponding to each sample image;
将各样本图像输入所述初始卷积神经网络模型中,得到所述各样本图像对应的年龄分布,并计算所述各样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,根据计算结果对所述初始卷积神经网络模型中各参数进行调整,得到候选神经网络模型,并对所述候选神经网络模型进行调整得到所述卷积神经网络模型。Input each sample image into the initial convolutional neural network model to obtain the age distribution corresponding to each sample image, and calculate the difference between the age distribution corresponding to each sample image and the Gaussian distribution generated by the corresponding age annotation result, As well as the difference between the expected value of the age distribution corresponding to each sample image and the corresponding age annotation result, the parameters in the initial convolutional neural network model are adjusted according to the calculation result to obtain the candidate neural network model, and the candidate neural network The model is adjusted to obtain the convolutional neural network model.
可选的,所述生成所述各样本图像对应的年龄标注结果的高斯分布包括:Optionally, the generating the Gaussian distribution of the age annotation result corresponding to each sample image includes:
针对每张样本图像,构建以该样本图像对应的年龄标注结果为中心,预设标准差为峰宽的高斯分布,作为该样本图像对应的年龄标注结果的高斯分布。For each sample image, construct a Gaussian distribution centered on the age annotation result corresponding to the sample image, and the preset standard deviation is the peak width, as the Gaussian distribution of the age annotation result corresponding to the sample image.
可选的,所述得到所述红外卷积神经网络模型之后,所述方法还包括:Optionally, after the infrared convolutional neural network model is obtained, the method further includes:
获取红外测试图像,以及各所述红外测试图像对应的年龄标注结果;所述红外测试图像与所述红外样本图像不同;Acquiring an infrared test image and an age marking result corresponding to each of the infrared test images; the infrared test image is different from the infrared sample image;
根据所述红外测试图像以及各所述红外测试图像对应的年龄标注结果,确定所述红外卷积神经网络模型的测试精度;Determining the test accuracy of the infrared convolutional neural network model according to the infrared test image and the age annotation result corresponding to each of the infrared test images;
当所述测试精度小于预设精度阈值时,将当前的红外卷积神经网络模型作为初始红外卷积神经网络模型,返回执行所述确定各红外样本图像,以及所述各红外样本图像对应的年龄标注结果的步骤,直到所述测试精度不小于所述预设精度阈值时,将当前的红外卷积神经网络模型作为最终的红外卷积神经网络模型。When the test accuracy is less than the preset accuracy threshold, use the current infrared convolutional neural network model as the initial infrared convolutional neural network model, and return to execute the determination of each infrared sample image and the age corresponding to each infrared sample image In the step of marking the results, until the test accuracy is not less than the preset accuracy threshold, the current infrared convolutional neural network model is used as the final infrared convolutional neural network model.
可选的,所述构建包含所述第一人脸区域的待处理目标图像包括:Optionally, the constructing the to-be-processed target image including the first face region includes:
对所述第一人脸区域进行关键点检测,得到所述第一人脸区域的各目标关键点的坐标信息;其中,所述各目标关键点为标识人脸轮廓特征的点;Performing key point detection on the first face area to obtain coordinate information of each target key point in the first face area; wherein each target key point is a point that identifies a face contour feature;
根据所述各目标关键点的坐标信息,对所述第一人脸区域进行对齐处理后,得到包含所述第一人脸区域且所述各目标关键点位于预设位置的待处理目标图像。According to the coordinate information of each target key point, after the first face region is aligned, a target image to be processed including the first face region and each target key point is located at a preset position is obtained.
可选的,所述将所述待处理目标图像输入预先训练得到的红外卷积神经网络模型中,得到所述第一人脸区域对应人物的第一预测年龄分布之后,所述方法还包括:Optionally, after the input of the target image to be processed into the pre-trained infrared convolutional neural network model, and the first predicted age distribution of the person corresponding to the first face region is obtained, the method further includes:
计算所述第一预测年龄分布中,各年龄值与对应概率的乘积之和,并将计算结果作为所述第一人 脸区域对应人物的预测年龄值。Calculate the sum of the product of each age value and the corresponding probability in the first predicted age distribution, and use the calculation result as the predicted age value of the person corresponding to the first face area.
第二方面,本发明实施例提供了一种用于红外图像的年龄预测装置,所述装置包括:In a second aspect, an embodiment of the present invention provides an age prediction device for infrared images, the device includes:
红外图像获取模块,用于获取待处理红外图像;Infrared image acquisition module for acquiring infrared images to be processed;
人脸区域检测模块,用于检测所述待处理红外图像中的第一人脸区域,并构建包含所述第一人脸区域的待处理目标图像;其中,所述待处理目标图像的大小为预设大小;The face area detection module is used to detect the first face area in the infrared image to be processed, and construct a target image to be processed containing the first face area; wherein the size of the target image to be processed is Preset size
年龄预测模块,用于将所述待处理目标图像输入预先训练得到的红外卷积神经网络模型中,得到所述第一人脸区域对应人物的第一预测年龄分布,其中,所述第一预测年龄分布服从高斯分布;其中,所述红外卷积神经网络模型是根据各红外样本图像输入初始红外卷积神经网络模型后,所述初始红外卷积神经网络模型输出的各红外样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各红外样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对所述初始红外卷积神经网络模型中各参数进行调整后得到的,所述年龄分布服从高斯分布;所述红外样本图像以及对应的年龄标注结果是根据预先训练得到的卷积神经网络模型确定的,所述卷积神经网络模型根据彩色图像训练得到。The age prediction module is used to input the target image to be processed into a pre-trained infrared convolutional neural network model to obtain the first predicted age distribution of the person corresponding to the first face region, wherein the first prediction The age distribution obeys the Gaussian distribution; wherein, the infrared convolutional neural network model is the age corresponding to each infrared sample image output by the initial infrared convolutional neural network model after inputting the initial infrared convolutional neural network model according to each infrared sample image The difference between the distribution and the Gaussian distribution generated by the corresponding age annotation result, and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age annotation result, after adjusting the parameters in the initial infrared convolutional neural network model It is obtained that the age distribution obeys the Gaussian distribution; the infrared sample image and the corresponding age annotation result are determined according to a pre-trained convolutional neural network model, which is obtained through color image training.
可选的,所述装置还包括:Optionally, the device further includes:
红外模型构建模块,用于构建初始红外卷积神经网络模型,所述初始红外卷积神经网络模型包括:卷积层、池化层、全连接层;The infrared model building module is used to build an initial infrared convolutional neural network model, the initial infrared convolutional neural network model includes: a convolutional layer, a pooling layer, and a fully connected layer;
红外样本图像确定模块,用于确定各红外样本图像,以及所述各红外样本图像对应的年龄标注结果;An infrared sample image determination module, used to determine each infrared sample image and the age annotation result corresponding to each infrared sample image;
高斯分布生成模块,用于生成所述各红外样本图像对应的年龄标注结果的高斯分布;A Gaussian distribution generating module, configured to generate the Gaussian distribution of the age annotation result corresponding to each infrared sample image;
红外卷积神经网络模型训练模块,用于将各红外样本图像输入所述初始红外卷积神经网络模型中,得到所述各红外样本图像对应的年龄分布,并计算所述各红外样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各红外样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,根据计算结果对所述初始红外卷积神经网络模型中各参数进行调整,得到所述红外卷积神经网络模型。The infrared convolutional neural network model training module is used to input each infrared sample image into the initial infrared convolutional neural network model, obtain the age distribution corresponding to each infrared sample image, and calculate the corresponding infrared sample image The difference between the age distribution and the Gaussian distribution generated by the corresponding age labeling result, and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age labeling result, according to the calculation result of the initial infrared convolutional neural network model The parameters are adjusted to obtain the infrared convolutional neural network model.
可选的,所述红外样本图像确定模块包括:Optionally, the infrared sample image determination module includes:
图像集合获取子模块,用于获取多个图像集合,其中,每个所述图像集合中的初始红外图像为同一人在同一时期的不同脸部图像,且每个所述图像集合中初始红外图像的数量大于预设数量阈值;The image collection acquisition sub-module is used to acquire multiple image collections, wherein the initial infrared images in each image collection are different facial images of the same person in the same period, and the initial infrared images in each image collection The number of is greater than the preset number threshold;
人脸区域检测子模块,用于针对每个所述图像集合,检测各初始红外图像中的第二人脸区域,并构建包含各所述第二人脸区域的各初始目标图像;The face area detection sub-module is used to detect the second face area in each initial infrared image for each of the image sets, and construct each initial target image including each of the second face areas;
年龄范围确定子模块,用于将所述各初始目标图像输入预先训练得到的卷积神经网络模型中,得到各所述第二人脸区域对应人物的第二预测年龄分布,并确定各第二预测年龄分布对应的年龄范围;其中,所述卷积神经网络模型是根据各样本图像输入初始卷积神经网络模型后,所述初始卷积神经网络模型输出的各样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对所述初始卷积神经网络模型中各参数进行调整得到候选神经网络模型,并对所述候选神经网络模型进行调整后得到的,所述第二预测年龄分布服从高斯分布,所述各样本图像均为彩色图像;The age range determination sub-module is used to input each of the initial target images into a pre-trained convolutional neural network model to obtain the second predicted age distribution of the person corresponding to each of the second face regions, and determine each second Predict the age range corresponding to the age distribution; wherein the convolutional neural network model is based on the input of the initial convolutional neural network model of each sample image, and the initial convolutional neural network model outputs the corresponding age distribution of each sample image and the corresponding The difference between the Gaussian distribution generated by the age labeling result, and the difference between the expected value of the age distribution corresponding to each sample image and the corresponding age labeling result, adjusting each parameter in the initial convolutional neural network model to obtain a candidate neural network model, And obtained after adjusting the candidate neural network model, the second predicted age distribution obeys a Gaussian distribution, and each sample image is a color image;
红外样本确定子模块,用于针对每个图像集合,去除该图像集合中年龄范围存在异常的初始目标图像,得到剩余目标图像,计算所有剩余目标图像对应的正常年龄范围,将包含在所述正常年龄范围内的剩余目标图像作为红外样本图像,并将各红外样本图像对应的年龄范围的均值,作为各红外样本图像的年龄标注结果。The infrared sample determination sub-module is used to remove the initial target images with abnormal age ranges in the image set for each image set to obtain the remaining target images, calculate the normal age range corresponding to all remaining target images, and include them in the normal The remaining target images within the age range are used as infrared sample images, and the average value of the age range corresponding to each infrared sample image is used as the age labeling result of each infrared sample image.
可选的,所述红外样本确定子模块,具体用于:Optionally, the infrared sample determination sub-module is specifically used for:
针对每个图像集合,根据该图像集合中包括的各初始目标图像对应的年龄范围的最小值从小到大的顺序,将各初始目标图像排序;For each image set, sort the initial target images according to the minimum value of the age range corresponding to each initial target image included in the image set in descending order;
确定位于四分之一处的第一年龄范围和位于四分之三处的第二年龄范围,以及所述第一年龄范围的最小值和所述第二年龄范围的最大值;Determining a first age range located at one quarter and a second age range located at three quarters, as well as the minimum value of the first age range and the maximum value of the second age range;
将对应年龄范围中包含年龄值小于所述最小值与预设数值之差的初始目标图像,以及年龄值大于所述最大值与所述预设数值之和的初始目标图像去除,得到剩余目标图像。Remove the initial target image whose age value is less than the difference between the minimum value and the preset value in the corresponding age range and the initial target image whose age value is greater than the sum of the maximum value and the preset value to obtain the remaining target image .
可选的,所述红外样本确定子模块,具体用于:Optionally, the infrared sample determination sub-module is specifically used for:
计算所有剩余目标图像对应的年龄范围的均值和标准差;Calculate the mean and standard deviation of the age range corresponding to all remaining target images;
获取预设超参数;Get preset hyperparameters;
计算所述超参数和所述标准差的乘积,并将所述均值与所述乘积之差,作为正常年龄范围的最小值,将所述均值与所述乘积之和,作为正常年龄范围的最大值。Calculate the product of the hyperparameter and the standard deviation, and use the difference between the mean and the product as the minimum value in the normal age range, and use the sum of the mean and the product as the maximum in the normal age range value.
可选的,所述红外样本图像确定模块还包括:Optionally, the infrared sample image determination module further includes:
网络模型构建子模块,用于构建初始卷积神经网络模型,所述初始卷积神经网络模型包括:卷积层、池化层、全连接层;The network model construction sub-module is used to construct an initial convolutional neural network model, and the initial convolutional neural network model includes: a convolutional layer, a pooling layer, and a fully connected layer;
样本图像获取子模块,用于获取各样本图像,以及所述各样本图像对应的年龄标注结果;The sample image acquisition sub-module is used to acquire each sample image and the age annotation result corresponding to each sample image;
高斯分布生成子模块,用于生成所述各样本图像对应的年龄标注结果的高斯分布;The Gaussian distribution generation sub-module is used to generate the Gaussian distribution of the age annotation results corresponding to each sample image;
卷积神经网络模型训练子模块,用于将各样本图像输入所述初始卷积神经网络模型中,得到所述各样本图像对应的年龄分布,并计算所述各样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,根据计算结果对所述初始卷积神经网络模型中各参数进行调整,得到候选神经网络模型,并对所述候选神经网络模型进行调整得到所述卷积神经网络模型。The convolutional neural network model training sub-module is used to input each sample image into the initial convolutional neural network model, obtain the age distribution corresponding to each sample image, and calculate the age distribution corresponding to each sample image and the corresponding The difference between the Gaussian distribution generated by the age annotation result, and the difference between the expected value of the age distribution corresponding to each sample image and the corresponding age annotation result, according to the calculation result, adjust each parameter in the initial convolutional neural network model to obtain the candidate Neural network model, and adjusting the candidate neural network model to obtain the convolutional neural network model.
可选的,所述高斯分布生成子模块,具体用于:Optionally, the Gaussian distribution generating sub-module is specifically used for:
针对每张样本图像,构建以该样本图像对应的年龄标注结果为中心,预设标准差为峰宽的高斯分布,作为该样本图像对应的年龄标注结果的高斯分布。For each sample image, construct a Gaussian distribution centered on the age annotation result corresponding to the sample image, and the preset standard deviation is the peak width, as the Gaussian distribution of the age annotation result corresponding to the sample image.
可选的,所述装置还包括:Optionally, the device further includes:
测试图像获取模块,用于获取红外测试图像,以及各所述红外测试图像对应的年龄标注结果;所述红外测试图像与所述红外样本图像不同;A test image acquisition module, configured to acquire an infrared test image and an age marking result corresponding to each of the infrared test images; the infrared test image is different from the infrared sample image;
测试精度确定模块,用于根据所述红外测试图像以及各所述红外测试图像对应的年龄标注结果,确定所述红外卷积神经网络模型的测试精度;A test accuracy determining module, configured to determine the test accuracy of the infrared convolutional neural network model according to the infrared test image and the age annotation result corresponding to each infrared test image;
处理模块,用于当所述测试精度小于预设精度阈值时,将当前的红外卷积神经网络模型作为初始红外卷积神经网络模型,触发所述红外样本图像确定模块,直到所述测试精度不小于所述预设精度阈值时,将当前的红外卷积神经网络模型作为最终的红外卷积神经网络模型。The processing module is configured to use the current infrared convolutional neural network model as the initial infrared convolutional neural network model when the test accuracy is less than the preset accuracy threshold, and trigger the infrared sample image determination module until the test accuracy is not When it is less than the preset accuracy threshold, the current infrared convolutional neural network model is used as the final infrared convolutional neural network model.
可选的,所述人脸区域检测模块包括:Optionally, the face area detection module includes:
关键点检测子模块,用于对所述第一人脸区域进行关键点检测,得到所述第一人脸区域的各目标关键点的坐标信息;其中,所述各目标关键点为标识人脸轮廓特征的点;The key point detection sub-module is used to perform key point detection on the first face area to obtain coordinate information of each target key point in the first face area; wherein, each target key point is an identification face Points of contour features;
目标图像构建子模块,用于根据所述各目标关键点的坐标信息,对所述第一人脸区域进行对齐处理后,得到包含所述第一人脸区域且所述各目标关键点位于预设位置的待处理目标图像。The target image construction sub-module is used to align the first face region according to the coordinate information of the target key points to obtain the first face region and the target key points are located in the preset Set the position of the target image to be processed.
可选的,所述装置还包括:Optionally, the device further includes:
年龄值计算模块,用于计算所述第一预测年龄分布中,各年龄值与对应概率的乘积之和,并将计算结果作为所述第一人脸区域对应人物的预测年龄值。The age value calculation module is used to calculate the sum of the product of each age value and the corresponding probability in the first predicted age distribution, and use the calculation result as the predicted age value of the person corresponding to the first face area.
由上述内容可知,本发明实施例提供的对红外图像中的人脸进行年龄预测的方法及装置,可以获取待处理红外图像;检测待处理红外图像中的第一人脸区域,并构建包含第一人脸区域的待处理目标图像;其中,待处理目标图像的大小为预设大小;将待处理目标图像输入预先训练得到的红外卷积神经网络模型中,得到第一人脸区域对应人物的第一预测年龄分布,其中,第一预测年龄分布服从高斯分布;其中,红外卷积神经网络模型是根据各红外样本图像输入初始红外卷积神经网络模型后,初始红外卷积神经网络模型输出的各红外样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各红外样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对初始红外卷积神经网络模型中各参数进行调整后得到的,年龄分布服从高斯分布;红外样本图像以及对应的年龄标注结果是根据预先训练得到的卷积神经网络模型确定的,卷积神经网络模型根据彩色图像训练得到,因此能够基于彩色图像训练得到的卷积神经网络模型确定出红外样本图像以及对应的年龄标注结果,进而根据确定的红外样本图像以及对应的年龄标注结果训练得到能够对红外图像中的人脸进行年龄预测的红外卷积神经网络模型。并且,与人工进行年龄标定相比,通过卷积神经网络模型确定红外样本图像以及对应的年龄标注结果,能够节省人力资源,提高样本获取的效率。另外,训练红外卷积神经网络模型时,是根据各红外样本图像输入初始红外卷积神经网络模型后,初始红外卷积神经网络模型输出的各红外样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各红外样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对初始红外卷积神经网络模型中各参数进行调整的,与输出具体年龄值的方案相比,能够对同一个人的多角度和多状态有准确的年龄预测,提高模型的鲁棒性。当然,实施本发明的任一产品或方法并不一定需要同时达到以上所述的所有优点。It can be seen from the above content that the method and device for predicting the age of a face in an infrared image provided by the embodiments of the present invention can obtain an infrared image to be processed; detect the first face area in the infrared image to be processed, and construct a A target image to be processed in the face region; where the size of the target image to be processed is a preset size; the target image to be processed is input into the pre-trained infrared convolutional neural network model to obtain the first face region corresponding to the person The first predicted age distribution, where the first predicted age distribution obeys the Gaussian distribution; among them, the infrared convolutional neural network model is output from the initial infrared convolutional neural network model based on the input of each infrared sample image The difference between the age distribution corresponding to each infrared sample image and the Gaussian distribution generated by the corresponding age labeling result, and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age labeling result, compare the initial infrared convolutional neural network model After adjusting the parameters, the age distribution obeys the Gaussian distribution; the infrared sample image and the corresponding age annotation result are determined according to the pre-trained convolutional neural network model, which is trained on the color image, so it can The convolutional neural network model obtained by color image training determines the infrared sample image and the corresponding age annotation result, and then trains the determined infrared sample image and the corresponding age annotation result to obtain the age prediction of the face in the infrared image Infrared convolutional neural network model. In addition, compared with manual age calibration, determining infrared sample images and corresponding age annotation results through a convolutional neural network model can save human resources and improve the efficiency of sample acquisition. In addition, when training the infrared convolutional neural network model, after each infrared sample image is input to the initial infrared convolutional neural network model, the initial infrared convolutional neural network model outputs the corresponding age distribution of each infrared sample image and the corresponding age annotation results are generated The difference between the Gaussian distribution of each infrared sample image and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age annotation result. The parameters in the initial infrared convolutional neural network model are adjusted, which are the same as the output specific age value. In comparison, it can accurately predict the age of the same person from multiple angles and multiple states, and improve the robustness of the model. Of course, implementing any product or method of the present invention does not necessarily need to achieve all the advantages described above at the same time.
本发明实施例的创新点包括:The innovative points of the embodiments of the present invention include:
1、基于彩色图像训练得到的卷积神经网络模型确定出红外样本图像以及对应的年龄标注结果,进而根据确定的红外样本图像以及对应的年龄标注结果训练得到能够对红外图像中的人脸进行年龄预测的红外卷积神经网络模型。并且,与人工进行年龄标定相比,通过卷积神经网络模型确定红外样本图像以及对应的年龄标注结果,能够节省人力资源,提高样本获取的效率。另外,训练红外卷积神经网络模型时,是根据各红外样本图像输入初始红外卷积神经网络模型后,初始红外卷积神经网络模型输出的各红外样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各红外样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对初始红外卷积神经网络模型中各参数进行调整的,与输出具体年龄值的方案相比,能够对同一个人的多角度和多状态有准确的年龄预测,提高模型的鲁棒性。1. Determine the infrared sample image and the corresponding age annotation result based on the convolutional neural network model obtained by color image training, and then train according to the determined infrared sample image and the corresponding age annotation result to be able to age the face in the infrared image The predicted infrared convolutional neural network model. In addition, compared with manual age calibration, determining infrared sample images and corresponding age annotation results through a convolutional neural network model can save human resources and improve the efficiency of sample acquisition. In addition, when training the infrared convolutional neural network model, after each infrared sample image is input to the initial infrared convolutional neural network model, the initial infrared convolutional neural network model outputs the corresponding age distribution of each infrared sample image and the corresponding age annotation results are generated The difference between the Gaussian distribution of each infrared sample image and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age annotation result. The parameters in the initial infrared convolutional neural network model are adjusted, which are the same as the output specific age value. In comparison, it can accurately predict the age of the same person from multiple angles and multiple states, and improve the robustness of the model.
2、根据各红外样本图像输入初始红外卷积神经网络模型后,初始红外卷积神经网络模型输出的各红外样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各红外样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对初始红外卷积神经网络模型中各参数进行调整得到红外卷积神经网络模型,与输出具体年龄值的方案相比,能够对同一个人的多角度和多状态有准确的年龄预测,提高模型的鲁棒性。2. After inputting the initial infrared convolutional neural network model according to each infrared sample image, the difference between the age distribution corresponding to each infrared sample image output by the initial infrared convolutional neural network model and the Gaussian distribution generated by the corresponding age annotation result, and each infrared The difference between the expected value of the age distribution corresponding to the sample image and the corresponding age annotation result. The parameters of the initial infrared convolutional neural network model are adjusted to obtain the infrared convolutional neural network model. Compared with the scheme that outputs the specific age value, it can The same person's multi-angle and multi-state have accurate age prediction, which improves the robustness of the model.
3、通过卷积神经网络模型确定红外样本图像以及对应的年龄标注结果,与人工进行年龄标定相比,能够节省人力资源,提高样本获取的效率。3. Determine the infrared sample image and the corresponding age annotation result through the convolutional neural network model. Compared with manual age calibration, it can save human resources and improve the efficiency of sample acquisition.
4、根据各样本图像输入初始卷积神经网络模型后,初始卷积神经网络模型输出的各样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对初始卷积神经网络模型中各参数进行调整得到卷积神经网络模型,与输出具体年龄值的方案相比,能够对同一个人的多角度和多状态有准确的年龄预测,提高模型的鲁棒性。4. After inputting the initial convolutional neural network model according to each sample image, the difference between the age distribution corresponding to each sample image output by the initial convolutional neural network model and the Gaussian distribution generated by the corresponding age annotation result, and the age corresponding to each sample image The difference between the expected value of the distribution and the corresponding age annotation result. The parameters in the initial convolutional neural network model are adjusted to obtain the convolutional neural network model. Compared with the scheme that outputs the specific age value, it can be used for multiple angles and multiple angles of the same person. The state has an accurate age prediction, which improves the robustness of the model.
5、通过测试图像对训练得到的红外卷积神经网络模型进行测试精度检测,并在测试精度较低时,再次通过红外样本图像对红外卷积神经网络模型进行更新,从而可以保证最终得到的红外卷积神经网络的测试精度,提高年龄预测的准确性。5. Test the test accuracy of the trained infrared convolutional neural network model through the test image, and when the test accuracy is low, update the infrared convolutional neural network model through the infrared sample image again, so as to ensure the final infrared The test accuracy of the convolutional neural network improves the accuracy of age prediction.
6、对人脸区域进行关键点检测,进而对人脸区域进行对齐处理得到待处理目标图像,能够避免待处理目标图像中存在侧脸等情况,从而保证待处理目标图像中人脸更清晰,提高年龄预测的准确性。6. Perform key point detection on the face area, and then align the face area to obtain the target image to be processed, which can avoid situations such as side faces in the target image to be processed, thereby ensuring that the face in the target image to be processed is clearer. Improve the accuracy of age prediction.
7、根据预测年龄分布计算得到具体的预测年龄值,从而得到精确的年龄预测结果。7. Calculate the specific predicted age value according to the predicted age distribution, so as to obtain the accurate age prediction result.
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单介绍。显而易见地,下面描述中的附图仅仅是本发明的一些实施例。对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained from these drawings without creative work.
图1为本发明实施例的用于红外图像的年龄预测方法的一种流程示意图;FIG. 1 is a schematic flowchart of an age prediction method for infrared images according to an embodiment of the present invention;
图2为本发明实施例的用于红外图像的年龄预测方法的另一种流程示意图;2 is a schematic diagram of another flow chart of an age prediction method for infrared images according to an embodiment of the present invention;
图3为本发明实施例的用于红外图像的年龄预测方法的另一种流程示意图;3 is a schematic diagram of another flow chart of an age prediction method for infrared images according to an embodiment of the present invention;
图4为本发明实施例的用于红外图像的年龄预测方法的另一种流程示意图;4 is a schematic diagram of another flow chart of an age prediction method for infrared images according to an embodiment of the present invention;
图5为本发明实施例的用于红外图像的年龄预测方法的另一种流程示意图;5 is a schematic diagram of another flow chart of an age prediction method for infrared images according to an embodiment of the present invention;
图6为本发明实施例的用于红外图像的年龄预测方法的另一种流程示意图;6 is a schematic diagram of another flow chart of an age prediction method for infrared images according to an embodiment of the present invention;
图7为本发明实施例的用于红外图像的年龄预测装置的一种结构示意图。FIG. 7 is a schematic structural diagram of an age prediction device for infrared images according to an embodiment of the present invention.
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整的描述。显然,所描述的实施例仅仅是本发明的一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有付出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
需要说明的是,本发明实施例及附图中的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含的一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。It should be noted that the terms "including" and "having" in the embodiments of the present invention and the drawings and any variations thereof are intended to cover non-exclusive inclusions. For example, the process, method, system, product or device that contains a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally also includes Other steps or units inherent to these processes, methods, products or equipment.
本发明实施例公开了一种用于红外图像的年龄预测方法及装置,能够对红外图像中的人脸进行年龄预测。下面对本发明实施例进行详细说明。The embodiment of the invention discloses an age prediction method and device for infrared images, which can predict the age of a human face in the infrared image. The embodiments of the present invention will be described in detail below.
图1为本发明实施例提供的用于红外图像的年龄预测方法的一种流程示意图。该方法应用于电子设备。该方法具体包括以下步骤。FIG. 1 is a schematic flowchart of a method for age prediction of infrared images provided by an embodiment of the present invention. This method is applied to electronic equipment. The method specifically includes the following steps.
S110:获取待处理红外图像。S110: Acquire an infrared image to be processed.
上述待处理红外图像即为包含人脸的需要进行年龄预测的图像。例如,电子设备可以接收监控设备采集的红外图像作为待处理红外图像;或者,可以接收用户输入的红外图像作为待处理红外图像,本发明实施例对此不作限定。The above-mentioned infrared image to be processed is an image containing a human face that needs to be age predicted. For example, the electronic device may receive the infrared image collected by the monitoring device as the infrared image to be processed; or, may receive the infrared image input by the user as the infrared image to be processed, which is not limited in the embodiment of the present invention.
S120:检测待处理红外图像中的第一人脸区域,并构建包含第一人脸区域的待处理目标图像;其中,待处理目标图像的大小为预设大小。S120: Detect a first face region in the infrared image to be processed, and construct a target image to be processed including the first face region; wherein the size of the target image to be processed is a preset size.
可以理解,由于监控设备监控区域较大等原因,待处理红外图像中可能包含除人脸区域之外的其他区域。而在年龄预测时,其他区域可能会影响年龄预测的结果。It can be understood that due to reasons such as a large monitoring area of the monitoring device, the infrared image to be processed may include areas other than the face area. When predicting age, other regions may affect the results of age prediction.
因此,在本发明实施例中,电子设备可以检测待处理红外图像中的人脸区域,可以称为第一人脸区域,并构建包含第一人脸区域的待处理目标图像。其中,待处理目标图像的大小为预设大小。Therefore, in the embodiment of the present invention, the electronic device can detect the face area in the infrared image to be processed, which can be referred to as the first face area, and construct the to-be-processed target image containing the first face area. The size of the target image to be processed is a preset size.
例如,可以通过Faster-RCNN(FasterRegion-based Cellular Neural Network,快速区域蜂窝神经网络)人脸检测框架检测待处理红外图像中的第一人脸区域。或者,可以采用已知的任一种目标检测算法,检测待处理红外图像中的第一人脸区域,本发明实施例对此不作限定。For example, the Faster-RCNN (FasterRegion-based Cellular Neural Network) face detection framework can be used to detect the first face region in the infrared image to be processed. Alternatively, any known target detection algorithm may be used to detect the first face region in the infrared image to be processed, which is not limited in the embodiment of the present invention.
S130:将待处理目标图像输入预先训练得到的红外卷积神经网络模型中,得到第一人脸区域对应人物的第一预测年龄分布,其中,第一预测年龄分布服从高斯分布;其中,红外卷积神经网络模型是根据各红外样本图像输入初始红外卷积神经网络模型后,初始红外卷积神经网络模型输出的各红外样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各红外样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对初始红外卷积神经网络模型中各参数进行调整后得到的,年龄分布服从高斯分布;红外样本图像以及对应的年龄标注结果是根据预先训练得到的卷积神经网络模型确定的,卷积神经网络模型根据彩色图像训练得到。S130: Input the target image to be processed into the pre-trained infrared convolutional neural network model to obtain the first predicted age distribution of the person corresponding to the first face area, where the first predicted age distribution obeys the Gaussian distribution; where the infrared volume The product neural network model is the difference between the age distribution corresponding to each infrared sample image output by the initial infrared convolution neural network model and the Gaussian distribution generated by the corresponding age annotation result after inputting the initial infrared convolution neural network model according to each infrared sample image. And the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age annotation result, which is obtained after adjusting the parameters in the initial infrared convolutional neural network model. The age distribution obeys the Gaussian distribution; the infrared sample image and the corresponding age The labeling result is determined based on the pre-trained convolutional neural network model, which is trained on the color image.
在本发明实施例中,可以预先构建用于对红外图像中的人脸进行年龄预测的红外卷积神经网络模型。具体的,可以首先根据彩色图像训练得到卷积神经网络模型,该卷积神经网络模型可以对红外图像进行粗略的年龄预测。然后基于上述卷积神经网络模型确定红外样本图像以及对应的年龄标注结果,之后将各红外样本图像输入初始红外卷积神经网络模型,根据初始红外卷积神经网络模型输出的各红外样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各红外样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对初始红外卷积神经网络模型中各参数进行调整后得到红外卷积神经网络模型。In the embodiment of the present invention, an infrared convolutional neural network model for age prediction of a human face in an infrared image can be constructed in advance. Specifically, the convolutional neural network model can be obtained by training based on the color image first, and the convolutional neural network model can perform rough age prediction on the infrared image. Then determine the infrared sample image and the corresponding age annotation result based on the above convolutional neural network model, and then input each infrared sample image into the initial infrared convolutional neural network model, according to the initial infrared convolutional neural network model output corresponding to each infrared sample image The difference between the age distribution and the Gaussian distribution generated by the corresponding age annotation result, and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age annotation result, after adjusting the parameters in the initial infrared convolutional neural network model Infrared convolutional neural network model.
高斯分布,也即为正态分布。若随机变量X服从一个数学期望为μ、方差为σ^2的正态分布,记为N(μ,σ^2)。其期望值μ决定了其位置,其标准差σ决定了分布的幅度。当μ=0,σ=1时的正态分布是标准正态分布。Gaussian distribution, also known as normal distribution. If the random variable X obeys a normal distribution with a mathematical expectation of μ and a variance of σ^2, it is recorded as N(μ,σ^2). Its expected value μ determines its location, and its standard deviation σ determines the magnitude of the distribution. When μ=0 and σ=1, the normal distribution is the standard normal distribution.
上述各红外样本图像对应的年龄分布的期望值,即为高斯分布的期望值,也就是各红外样本图像对应的年龄分布中,处于最中间的概率最大的年龄值。The expected value of the age distribution corresponding to each infrared sample image is the expected value of the Gaussian distribution, that is, the age value with the highest probability in the middle of the age distribution corresponding to each infrared sample image.
在得到包含第一人脸区域的待处理目标图像后,可以将待处理目标图像输入该红外卷积神经网络模型中,红外卷积神经网络模型即可输出第一人脸区域对应人物的第一预测年龄分布。其中,第一预测年龄分布服从高斯分布,也即服从正态分布。After the target image to be processed containing the first face area is obtained, the target image to be processed can be input into the infrared convolutional neural network model, and the infrared convolutional neural network model can output the first face area corresponding to the first person. Forecast age distribution. Among them, the first predicted age distribution obeys Gaussian distribution, that is, obeys normal distribution.
上述预测年龄分布包括多个年龄值与对应概率值。在多个年龄值中,处于最中间的年龄值概率最大,两侧的年龄值概率依次减小。并且,所有年龄值的概率之和为1。The aforementioned predicted age distribution includes multiple age values and corresponding probability values. Among multiple age values, the probability of the age value in the middle is the largest, and the probability of the age value on both sides decreases sequentially. And, the sum of the probabilities of all age values is 1.
由上述内容可知,本发明实施例提供的对红外图像中的人脸进行年龄预测的方法,能够基于彩色图像训练得到的卷积神经网络模型确定出红外样本图像以及对应的年龄标注结果,进而根据确定的红外样本图像以及对应的年龄标注结果训练得到能够对红外图像中的人脸进行年龄预测的红外卷积神经网络模型。并且,与人工进行年龄标定相比,通过卷积神经网络模型确定红外样本图像以及对应的年龄标注结果,能够节省人力资源,提高样本获取的效率。另外,训练红外卷积神经网络模型时,是根据各红外样本图像输入初始红外卷积神经网络模型后,初始红外卷积神经网络模型输出的各红外样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各红外样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对初始红外卷积神经网络模型中各参数进行调整的,与输出具体年龄值的方案相比,能够对同一个人的多角度和多状态有准确的年龄预测,提高模型的鲁棒性。It can be seen from the foregoing that the method for predicting the age of a face in an infrared image provided by the embodiment of the present invention can determine the infrared sample image and the corresponding age annotation result based on the convolutional neural network model obtained by color image training, and then according to The determined infrared sample images and the corresponding age annotation results are trained to obtain an infrared convolutional neural network model that can predict the age of the face in the infrared image. In addition, compared with manual age calibration, determining infrared sample images and corresponding age annotation results through a convolutional neural network model can save human resources and improve the efficiency of sample acquisition. In addition, when training the infrared convolutional neural network model, after each infrared sample image is input to the initial infrared convolutional neural network model, the initial infrared convolutional neural network model outputs the corresponding age distribution of each infrared sample image and the corresponding age annotation results are generated The difference between the Gaussian distribution of each infrared sample image and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age annotation result. The parameters in the initial infrared convolutional neural network model are adjusted, which are similar to the output specific age value. In comparison, it can accurately predict the age of the same person from multiple angles and multiple states, improving the robustness of the model.
作为本发明实施例的一种实施方式,如图2所示,本发明实施例的红外卷积神经网络模型的训练过程可以包括以下步骤。As an implementation of the embodiment of the present invention, as shown in FIG. 2, the training process of the infrared convolutional neural network model of the embodiment of the present invention may include the following steps.
S210:构建初始红外卷积神经网络模型,初始红外卷积神经网络模型包括:卷积层、池化层、全连接层。S210: Construct an initial infrared convolutional neural network model. The initial infrared convolutional neural network model includes: a convolutional layer, a pooling layer, and a fully connected layer.
本发明实施例中的初始红外卷积神经网络模型可以包括卷积层、池化层、全连接层等带参数的数据处理层。其中,卷积层、池化层、全连接层的数量可以为一层或多层,只要能实现年龄预测即可,本发明实施例对此不作限定。The initial infrared convolutional neural network model in the embodiment of the present invention may include data processing layers with parameters such as a convolution layer, a pooling layer, and a fully connected layer. Among them, the number of convolutional layers, pooling layers, and fully connected layers may be one or more layers, as long as age prediction can be realized, which is not limited in the embodiment of the present invention.
S220:确定各红外样本图像,以及各红外样本图像对应的年龄标注结果。S220: Determine each infrared sample image and the age annotation result corresponding to each infrared sample image.
确定各红外样本图像,以及各红外样本图像对应的年龄标注结果,也就是确定用于训练红外卷积神经网络模型的数据集。Determine each infrared sample image and the age annotation result corresponding to each infrared sample image, that is, determine the data set used to train the infrared convolutional neural network model.
在一种实现方式中,如图3所示,确定各红外样本图像,以及各红外样本图像对应的年龄标注结果的过程可以包括以下步骤。In an implementation manner, as shown in FIG. 3, the process of determining each infrared sample image and the age annotation result corresponding to each infrared sample image may include the following steps.
S310:获取多个图像集合,其中,每个图像集合中的初始红外图像为同一人在同一时期的不同脸部图像,且每个图像集合中初始红外图像的数量大于预设数量阈值。S310: Acquire multiple image sets, where the initial infrared images in each image set are different facial images of the same person in the same period, and the number of initial infrared images in each image set is greater than a preset number threshold.
在本发明实施例中,可以采集大量的红外人脸图像,从中确定出能够用来训练红外卷积神经网络模型的红外样本图像。In the embodiment of the present invention, a large number of infrared face images can be collected, and the infrared sample images that can be used to train the infrared convolutional neural network model are determined.
具体的,可以通过设计采集方式,针对不同的人,获取其同时期的多张红外人脸图像。例如,可以采集数百万张(如500万、600万、700万等)红外人脸图像,平均一个人100张左右,作为初始红外图像。Specifically, by designing the collection method, for different people, multiple infrared facial images of the same period can be acquired. For example, millions of (such as 5 million, 6 million, 7 million, etc.) infrared face images can be collected, with an average of about 100 per person as the initial infrared image.
上述同一时期可以为预设一段时间内,如1天、30天、60天等,本发明实施例对此不作限定。The same period mentioned above may be a preset period of time, such as 1 day, 30 days, 60 days, etc., which is not limited in the embodiment of the present invention.
S320:针对每个图像集合,检测各初始红外图像中的第二人脸区域,并构建包含各第二人脸区域的各初始目标图像。S320: For each image set, detect the second face area in each initial infrared image, and construct each initial target image including each second face area.
例如,可以通过Faster-RCNN人脸检测框架检测每个图像集合中包括的各初始红外图像中的第二人脸区域。或者,可以采用已知的任一种目标检测算法,检测每个图像集合中包括的各初始红外图像中的第二人脸区域,本发明实施例对此不作限定。For example, the Faster-RCNN face detection framework can be used to detect the second face region in each initial infrared image included in each image set. Alternatively, any known target detection algorithm may be used to detect the second face region in each initial infrared image included in each image set, which is not limited in the embodiment of the present invention.
检测出每个图像集合中包括的各初始红外图像中的第二人脸区域后,可以构建包含各第二人脸区域的各初始目标图像。After detecting the second human face regions in the initial infrared images included in each image set, each initial target image including each second human face region can be constructed.
S330:将各初始目标图像输入预先训练得到的卷积神经网络模型中,得到各第二人脸区域对应人物的第二预测年龄分布,并确定各第二预测年龄分布对应的年龄范围;其中,卷积神经网络模型是根据各样本图像输入初始卷积神经网络模型后,初始卷积神经网络模型输出的各样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对初始卷积神经网络模型中各参数进行调整得到候选神经网络模型,并对候选神经网络模型进行调整后得到的,第二预测年龄分布服从高斯分布,各样本图像均为彩色图像。S330: Input each initial target image into the pre-trained convolutional neural network model to obtain the second predicted age distribution of the person corresponding to each second face area, and determine the age range corresponding to each second predicted age distribution; where, The convolutional neural network model is based on the input of each sample image into the initial convolutional neural network model, the initial convolutional neural network model outputs the corresponding age distribution of each sample image and the difference between the Gaussian distribution generated by the corresponding age annotation result, and each sample The difference between the expected value of the age distribution corresponding to the image and the corresponding age annotation result. The parameters in the initial convolutional neural network model are adjusted to obtain the candidate neural network model, and the candidate neural network model is adjusted. The second predicted age The distribution obeys the Gaussian distribution, and each sample image is a color image.
在本发明实施例中,可以预先构建可以对红外图像中的人脸进行年龄预测的卷积神经网络模型。具体的,可以将标注了年龄的彩色图像作为样本图像,然后根据各样本图像输入初始卷积神经网络模型后,初始卷积神经网络模型输出的各样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对初始卷积神经网络模型中各参数进行调整得到候选神经网络模型,该候选神经网络模型可以对彩色图像进行年龄预测;之后对候选神经网络模型进行调整后得到可以对红外图像进行年龄预测的卷积神经网络模型。In the embodiment of the present invention, a convolutional neural network model that can predict the age of a human face in an infrared image can be constructed in advance. Specifically, a color image with an age can be used as a sample image, and after each sample image is input into the initial convolutional neural network model, the age distribution corresponding to each sample image output by the initial convolutional neural network model and the corresponding age annotation result are generated The difference between the Gaussian distribution of each sample image and the difference between the expected value of the age distribution corresponding to each sample image and the corresponding age annotation result. The parameters in the initial convolutional neural network model are adjusted to obtain the candidate neural network model. The candidate neural network model can Predict the age of color images; then adjust the candidate neural network model to obtain a convolutional neural network model that can predict the age of infrared images.
在得到包含各第二人脸区域的各初始目标图像后,可以将各初始目标图像输入预先训练得到的卷积神经网络模型中,卷积神经网络模型即可输出各第二人脸区域对应人物的第二预测年龄分布。其中,各第二预测年龄分布服从高斯分布,也即服从正态分布。After each initial target image containing each second face area is obtained, each initial target image can be input into the pre-trained convolutional neural network model, and the convolutional neural network model can output the person corresponding to each second face area The second predicted age distribution. Among them, each second predicted age distribution obeys Gaussian distribution, that is, obeys normal distribution.
可以理解,由于红外图像与彩色图像特性不同,因此,通过卷积神经网络模型预测出来的年龄精确程度不是特别高。在本发明实施例中,得到各第二人脸区域对应人物的第二预测年龄分布后,可以确定各第二预测年龄分布对应的年龄范围,也就是是各第二预测年龄分布中包括的年龄范围。It can be understood that since infrared images and color images have different characteristics, the accuracy of age predicted by the convolutional neural network model is not particularly high. In the embodiment of the present invention, after obtaining the second predicted age distribution of the person corresponding to each second face region, the age range corresponding to each second predicted age distribution can be determined, that is, the age included in each second predicted age distribution range.
S340:针对每个图像集合,去除该图像集合中年龄范围存在异常的初始目标图像,得到剩余目标图像,计算所有剩余目标图像对应的正常年龄范围,将包含在正常年龄范围内的剩余目标图像作为红外样本图像,并将各红外样本图像对应的年龄范围的均值,作为各红外样本图像的年龄标注结果。S340: For each image set, remove the initial target images with an abnormal age range in the image set to obtain the remaining target images, calculate the normal age range corresponding to all the remaining target images, and use the remaining target images included in the normal age range as Infrared sample images, and the average value of the age range corresponding to each infrared sample image is used as the age labeling result of each infrared sample image.
可以理解,同一个人同时期的上百张图像,其年龄预测结果应该是相同的,即针对每个图像集合,其中包括的每张图像其年龄范围应该是相同的。然而,在实际应用中,由于将其他人的图像混入了这个人图像集,或不同图像的角度、光照等影响,这些图像通过步骤S330得到的年龄范围不会是完全一样的。It can be understood that for hundreds of images of the same person in the same period, the age prediction results should be the same, that is, for each image set, the age range of each image included therein should be the same. However, in practical applications, due to mixing other people's images into this person's image set, or the influence of different image angles, lighting, etc., the age ranges obtained by these images through step S330 will not be exactly the same.
在本发明实施例中,可以针对每个图像集合,去除该图像集合中年龄范围存在异常的初始目标图像,得到剩余目标图像。In the embodiment of the present invention, for each image set, the initial target images with abnormal age ranges in the image set may be removed to obtain the remaining target images.
在一种实现方式中,可以针对每个图像集合,采用四分位距法,去除该图像集合中年龄范围存在异常的初始目标图像,得到剩余目标图像。具体的,如图4所示,该过程可以包括以下步骤。In an implementation manner, for each image set, the interquartile range method may be used to remove the initial target images with abnormal age ranges in the image set to obtain the remaining target images. Specifically, as shown in FIG. 4, the process may include the following steps.
S410:针对每个图像集合,根据该图像集合中包括的各初始目标图像对应的年龄范围的最小值从小到大的顺序,将各初始目标图像排序。S410: For each image set, sort the initial target images according to the minimum value of the age range corresponding to each initial target image included in the image set from small to large.
例如,当任一图像集合,其中包括的100张初始目标图像,各初始目标图像对应的年龄范围分别为10张为15-25,80张为30-40,10张为40-50时,可以根据各年龄范围的最小值从小到大的顺序,即15、30、40的顺序,将各初始目标图像排序。For example, when any image set includes 100 initial target images, and the age range of each initial target image is 15-25 for 10 pictures, 30-40 for 80 pictures, and 40-50 for 10 pictures, you can The initial target images are sorted according to the order of the smallest value of each age range from small to large, that is, the order of 15, 30, and 40.
S420:确定位于四分之一处的第一年龄范围和位于四分之三处的第二年龄范围,以及第一年龄范围的最小值和第二年龄范围的最大值。S420: Determine the first age range located at one quarter and the second age range located at three quarters, as well as the minimum value of the first age range and the maximum value of the second age range.
上述例子中,位于四分之一处的第一年龄范围即为第25个初始目标图像对应的年龄范围30-40,位于四分之三处的第二年龄范围即为第75个初始目标图像对应的年龄范围30-40。第一年龄范围的最小值为30,第二年龄范围的最大值为40。In the above example, the first age range located at one quarter is the age range 30-40 corresponding to the 25th initial target image, and the second age range located at three quarters is the 75th initial target image The corresponding age range is 30-40. The minimum value of the first age range is 30, and the maximum value of the second age range is 40.
S430:将对应年龄范围中包含年龄值小于最小值与预设数值之差的初始目标图像,以及年龄值大于最大值与预设数值之和的初始目标图像去除,得到剩余目标图像。S430: Remove the initial target images whose age values are less than the difference between the minimum value and the preset value in the corresponding age range and the initial target images whose age values are greater than the sum of the maximum value and the preset value to obtain the remaining target images.
上述预设数值可以为预先设定的任意数,如3、5、6等,本发明实施例对此不作限定。The foregoing preset value may be any preset number, such as 3, 5, 6, etc., which is not limited in the embodiment of the present invention.
如,当预设数值为3时,上述例子中,最小值与预设数值之差即为27,最大值与预设数值之和即为43,年龄范围中包含年龄值小于最小值与预设数值之差的初始目标图像,即为10张年龄范围为15-25的初始目标图像,年龄范围中包含年龄值大于最大值与预设数值之和的初始目标图像,即为10张年龄范围为40-50的初始目标图像,将上述确定的初始目标图像去除,得到剩余目标图像即为80张年龄范围为30-40的初始目标图像,作为剩余目标图像。For example, when the preset value is 3, in the above example, the difference between the minimum value and the preset value is 27, and the sum of the maximum value and the preset value is 43. The age range includes age values less than the minimum value and the preset value. The initial target image with the difference between the values is 10 initial target images with an age range of 15-25. The age range includes the initial target images with an age value greater than the sum of the maximum value and the preset value, that is, 10 images with an age range of The initial target image of 40-50 is removed, and the remaining target image is 80 initial target images in the age range of 30-40 as the remaining target image.
得到剩余目标图像后,可以计算所有剩余目标图像对应的正常年龄范围,例如,可以计算所有剩余目标图像对应的年龄范围的均值和标准差;获取预设超参数;计算超参数和标准差的乘积,并将均值与乘积之差,作为正常年龄范围的最小值,将均值与乘积之和,作为正常年龄范围的最大值。After obtaining the remaining target images, you can calculate the normal age range corresponding to all the remaining target images, for example, you can calculate the mean and standard deviation of the age ranges corresponding to all the remaining target images; obtain the preset hyperparameters; calculate the product of the hyperparameters and the standard deviation , And regard the difference between the mean and the product as the minimum value of the normal age range, and the sum of the mean and the product as the maximum value of the normal age range.
例如,可以假设任一同时期的同一个人的图像经过卷积神经网络模型预测的结果[x1,x2,x3,....xn]是符合如下的高斯分布的:For example, it can be assumed that the result [x1,x2,x3,...xn] predicted by the convolutional neural network model of the image of the same person at any same period conforms to the following Gaussian distribution:
对[x1,x2,x3,....xn]采用4分位距方法,剔除明显的异常值后得到剩余的m张图像与他们的预测值[x1,x2,x3,....xm],针对这m张同一个人的结果,使用格拉布斯(Grubbs)检测法,计算m张图片的统计量均值u和标准差s,设计超参数k,通过以下的计算式:For [x1,x2,x3,...xn], the 4-quartile range method is used to eliminate the obvious outliers and get the remaining m images and their predicted values [x1,x2,x3,...xm ], for the results of these m pictures of the same person, using the Grubbs detection method, calculate the statistical mean u and standard deviation s of the m pictures, design the hyperparameter k, and use the following calculation formula:
μ-k*s≤x
i≤μ+k*s
μ-k*s≤x i ≤μ+k*s
针对将不在范围内的图像剔除,获得最后的[x1,x2,x3,....xh]张在范围内的图像,并统计这h张图像的预测范围的均值,作为这个人的年龄标注结果,与这h张红外图像匹配组成新的数据集,即为红外样本图像。For removing the images that are not in the range, the last [x1,x2,x3,...xh] images in the range are obtained, and the average value of the prediction range of these h images is counted as the person's age label As a result, the h infrared images are matched to form a new data set, which is an infrared sample image.
通过卷积神经网络模型确定红外样本图像以及对应的年龄标注结果,与人工进行年龄标定相比,能够节省人力资源,提高样本获取的效率。Determining the infrared sample image and the corresponding age annotation result through the convolutional neural network model can save human resources and improve the efficiency of sample acquisition compared with manual age calibration.
S230:生成各红外样本图像对应的年龄标注结果的高斯分布。S230: Generate a Gaussian distribution of the age annotation result corresponding to each infrared sample image.
例如,可以针对每张红外样本图像,构建以该红外样本图像对应的年龄标注结果为中心,预设标准差为峰宽的高斯分布,作为该红外样本图像对应的年龄标注结果的高斯分布。For example, for each infrared sample image, a Gaussian distribution with the age annotation result corresponding to the infrared sample image as the center and the preset standard deviation as the peak width can be constructed as the Gaussian distribution of the age annotation result corresponding to the infrared sample image.
上述预设标准差可以为预设数值,本发明实施例不对其具体取值作限定。可以理解,上述预设标准差越小,生成的高斯分布峰值越尖锐,其中包括的各年龄值越集中。The foregoing preset standard deviation may be a preset value, and the embodiment of the present invention does not limit its specific value. It can be understood that the smaller the aforementioned preset standard deviation, the sharper the peak of the generated Gaussian distribution, and the more concentrated the age values included therein.
S240:将各红外样本图像输入初始红外卷积神经网络模型中,得到各红外样本图像对应的年龄分布,并计算各红外样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各红外样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,根据计算结果对初始红外卷积神经网络模型中各参数进行调整,得到红外卷积神经网络模型。S240: Input each infrared sample image into the initial infrared convolutional neural network model to obtain the age distribution corresponding to each infrared sample image, and calculate the difference between the age distribution corresponding to each infrared sample image and the Gaussian distribution generated by the corresponding age annotation result, As well as the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age annotation result, the parameters in the initial infrared convolutional neural network model are adjusted according to the calculation results to obtain the infrared convolutional neural network model.
得到红外样本图像、对应的年龄标注结果、以及年龄标注结果的高斯分布后,即可训练得到能够对红外图像进行年龄预测的红外卷积神经网络模型。具体的,可以将各红外样本图像输入初始红外卷 积神经网络模型中,得到各红外样本图像对应的年龄分布,并计算各红外样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各红外样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,根据计算结果对初始红外卷积神经网络模型中各参数进行调整,得到红外卷积神经网络模型。After obtaining the infrared sample image, the corresponding age annotation result, and the Gaussian distribution of the age annotation result, the infrared convolutional neural network model that can predict the age of the infrared image can be trained. Specifically, each infrared sample image can be input into the initial infrared convolutional neural network model to obtain the age distribution corresponding to each infrared sample image, and the difference between the age distribution corresponding to each infrared sample image and the Gaussian distribution generated by the corresponding age annotation result can be calculated And the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age annotation result. According to the calculation result, the parameters in the initial infrared convolutional neural network model are adjusted to obtain the infrared convolutional neural network model.
具体可以为构建基于高斯分布估计的分布学习和基于期望年龄估计的损失函数,通过将人脸年龄标注转化为设计好的高斯分布作为标签,与模型生成的预测进行比较,产生回传的误差,对初始红外卷积神经网络模型中各参数进行调整,得到红外卷积神经网络模型。Specifically, it can construct a distribution learning based on Gaussian distribution estimation and a loss function based on expected age estimation. By converting the face age label into a designed Gaussian distribution as a label, it can be compared with the prediction generated by the model to generate a return error. Adjust the parameters in the initial infrared convolutional neural network model to obtain the infrared convolutional neural network model.
根据各红外样本图像输入初始红外卷积神经网络模型后,初始红外卷积神经网络模型输出的各红外样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各红外样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对初始红外卷积神经网络模型中各参数进行调整得到红外卷积神经网络模型,与输出具体年龄值的方案相比,能够对同一个人的多角度和多状态有准确的年龄预测,提高模型的鲁棒性。After inputting the initial infrared convolutional neural network model according to each infrared sample image, the difference between the age distribution corresponding to each infrared sample image output by the initial infrared convolutional neural network model and the Gaussian distribution generated by the corresponding age annotation result, and each infrared sample image The difference between the expected value of the corresponding age distribution and the corresponding age labeling result. The parameters in the initial infrared convolutional neural network model are adjusted to obtain the infrared convolutional neural network model. Compared with the scheme that outputs the specific age value, it can be used for the same person The multi-angle and multi-state has accurate age prediction, which improves the robustness of the model.
作为本发明实施例的一种实施方式,为了保证红外图像年龄预测的准确性,可以对训练得到的红外卷积神经网络模型进行精度检测。As an implementation manner of the embodiment of the present invention, in order to ensure the accuracy of the infrared image age prediction, the accuracy detection of the infrared convolutional neural network model obtained by training may be performed.
具体的,得到红外卷积神经网络模型之后,如图5所示,还可以执行以下步骤。Specifically, after the infrared convolutional neural network model is obtained, as shown in FIG. 5, the following steps can also be performed.
S510:获取红外测试图像,以及各红外测试图像对应的年龄标注结果;红外测试图像与红外样本图像不同。S510: Obtain an infrared test image and an age annotation result corresponding to each infrared test image; the infrared test image is different from the infrared sample image.
例如,可以获取少量的包含人脸的红外图像,作为红外测试图像。并且,人工对红外测试图像进行准确的年龄标注。For example, a small amount of infrared images containing human faces can be acquired as infrared test images. In addition, the infrared test images are manually labeled with accurate age.
S520:根据红外测试图像以及各红外测试图像对应的年龄标注结果,确定红外卷积神经网络模型的测试精度。S520: Determine the test accuracy of the infrared convolutional neural network model according to the infrared test image and the age annotation result corresponding to each infrared test image.
例如,可以将红外测试图像输入红外卷积神经网络模型中,红外卷积神经网络模型输出各红外测试图像的年龄分布后,将该年龄分布中包括的年龄期望值和对应各红外测试图像的年龄标注结果进行对比,计算准确率,确定为红外卷积神经网络的测试精度。For example, the infrared test image can be input into the infrared convolutional neural network model. After the infrared convolutional neural network model outputs the age distribution of each infrared test image, the age expected value included in the age distribution and the age corresponding to each infrared test image are labeled The results are compared, the accuracy rate is calculated, and it is determined as the test accuracy of the infrared convolutional neural network.
其中,计算上述准确率时,可以针对任一红外测试图像,计算其年龄分布中包括的年龄期望值和对应年龄标注结果的差值,并将该差值除以年龄标注结果,作为误差率。然后计算1减去误差率的值,作为该红外测试图像的准确率。并将每张红外测试图像的准确率的均值,作为红外卷积神经网络的测试精度。Wherein, when calculating the above accuracy rate, for any infrared test image, the difference between the expected age included in the age distribution and the corresponding age annotation result can be calculated, and the difference is divided by the age annotation result as the error rate. Then calculate the value of 1 minus the error rate as the accuracy rate of the infrared test image. The average value of the accuracy of each infrared test image is used as the test accuracy of the infrared convolutional neural network.
S530:当测试精度小于预设精度阈值时,将当前的红外卷积神经网络模型作为初始红外卷积神经网络模型,返回执行确定各红外样本图像,以及各红外样本图像对应的年龄标注结果的步骤,直到测试精度不小于预设精度阈值时,将当前的红外卷积神经网络模型作为最终的红外卷积神经网络模型。S530: When the test accuracy is less than the preset accuracy threshold, use the current infrared convolutional neural network model as the initial infrared convolutional neural network model, and return to the step of determining each infrared sample image and the age annotation result corresponding to each infrared sample image , Until the test accuracy is not less than the preset accuracy threshold, the current infrared convolutional neural network model is used as the final infrared convolutional neural network model.
当测试精度小于预设精度阈值时,表明当前训练得到的红外卷积神经网络模型的年龄预测精确度较低,这种情况下,可以对红外卷积神经网络模型进行更新,提高其精确度。When the test accuracy is less than the preset accuracy threshold, it indicates that the age prediction accuracy of the currently trained infrared convolutional neural network model is low. In this case, the infrared convolutional neural network model can be updated to improve its accuracy.
具体的,可以将当前的红外卷积神经网络模型作为初始红外卷积神经网络模型,返回执行确定各红外样本图像,以及各红外样本图像对应的年龄标注结果的步骤,即步骤S220-S240。也就是再次获取不同的红外样本图像,对红外卷积神经网络模型进行参数调整,直到测试精度满足要求时,将当前训练得到的红外卷积神经网络模型作为最终的红外卷积神经网络模型。Specifically, the current infrared convolutional neural network model can be used as the initial infrared convolutional neural network model, and the step of determining each infrared sample image and the age annotation result corresponding to each infrared sample image is returned to execute, that is, steps S220-S240. That is to obtain different infrared sample images again, adjust the parameters of the infrared convolutional neural network model, until the test accuracy meets the requirements, use the currently trained infrared convolutional neural network model as the final infrared convolutional neural network model.
通过测试图像对训练得到的红外卷积神经网络模型进行测试精度检测,并在测试精度较低时,再次通过红外样本图像对红外卷积神经网络模型进行更新,从而可以保证最终得到的红外卷积神经网络的测试精度,提高年龄预测的准确性。Test the test accuracy of the trained infrared convolutional neural network model through the test image, and when the test accuracy is low, update the infrared convolutional neural network model through the infrared sample image again, so as to ensure the final infrared convolution The test accuracy of the neural network improves the accuracy of age prediction.
在一种实现方式中,如图6所示,上述卷积神经网络模型的训练过程可以包括以下步骤。In an implementation manner, as shown in FIG. 6, the training process of the above-mentioned convolutional neural network model may include the following steps.
S610:构建初始卷积神经网络模型,初始卷积神经网络模型包括:卷积层、池化层、全连接层。S610: Construct an initial convolutional neural network model. The initial convolutional neural network model includes: convolutional layer, pooling layer, and fully connected layer.
本发明实施例中的初始卷积神经网络模型可以包括卷积层、池化层、全连接层等带参数的数据处理层。其中,卷积层、池化层、全连接层的数量可以为一层或多层,只要能实现年龄预测即可,本发明实施例对此不作限定。The initial convolutional neural network model in the embodiment of the present invention may include data processing layers with parameters, such as a convolution layer, a pooling layer, and a fully connected layer. Among them, the number of convolutional layers, pooling layers, and fully connected layers may be one or more layers, as long as age prediction can be realized, which is not limited in the embodiment of the present invention.
该初始卷积神经网络模型与上述初始红外卷积神经网络模型的结构可以相同或不同,本发明实施例对此不作限定。The structure of the initial convolutional neural network model and the foregoing initial infrared convolutional neural network model may be the same or different, which is not limited in the embodiment of the present invention.
S620:获取各样本图像,以及各样本图像对应的年龄标注结果。S620: Obtain each sample image and the age annotation result corresponding to each sample image.
例如,可以将公有数据集中标注好年龄的彩色图像作为样本图像,将其标注年龄作为各样本图像 对应的年龄标注结果。For example, a color image with an age marked in a public data set can be used as a sample image, and the marked age can be used as the age marking result corresponding to each sample image.
上述公有数据集例如可以为AFAD:(Asian Face Age Dataset,亚洲人脸年龄数据集),一个公开的亚洲人脸图像数据集,包含160k左右的人脸图像与他们的年龄标注;或者,可以为MegaFaceAsia,一个公开的亚洲人脸图像数据集,包含45k左右的人脸图像与他们的年龄标注。The above-mentioned public data set can be, for example, AFAD: (Asian Face Age Dataset), a public Asian face image data set containing about 160k face images and their age annotations; or, it can be MegaFaceAsia, a public Asian face image data set, contains about 45k face images and their age annotations.
S630:生成各样本图像对应的年龄标注结果的高斯分布。S630: Generate a Gaussian distribution of the age annotation result corresponding to each sample image.
例如,可以针对每张样本图像,构建以该样本图像对应的年龄标注结果为中心,预设标准差为峰宽的高斯分布,作为该样本图像对应的年龄标注结果的高斯分布。For example, for each sample image, a Gaussian distribution centered on the age annotation result corresponding to the sample image and the preset standard deviation is the peak width can be constructed as the Gaussian distribution of the age annotation result corresponding to the sample image.
上述预设标准差可以为预设数值,本发明实施例不对其具体取值作限定。可以理解,上述预设标准差越小,生成的高斯分布峰值越尖锐,其中包括的各年龄值越集中。The foregoing preset standard deviation may be a preset value, and the embodiment of the present invention does not limit its specific value. It can be understood that the smaller the aforementioned preset standard deviation, the sharper the peak of the generated Gaussian distribution, and the more concentrated the age values included therein.
S640:将各样本图像输入初始卷积神经网络模型中,得到各样本图像对应的年龄分布,并计算各样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,根据计算结果对初始卷积神经网络模型中各参数进行调整,得到候选神经网络模型,并对候选神经网络模型进行调整得到卷积神经网络模型。S640: Input each sample image into the initial convolutional neural network model to obtain the age distribution corresponding to each sample image, and calculate the difference between the age distribution corresponding to each sample image and the Gaussian distribution generated by the corresponding age annotation result, and each sample image The difference between the expected value of the corresponding age distribution and the corresponding age annotation result, according to the calculation results, adjust the parameters in the initial convolutional neural network model to obtain the candidate neural network model, and adjust the candidate neural network model to obtain the convolutional neural network model.
得到样本图像、对应的年龄标注结果、以及年龄标注结果的高斯分布后,即可训练得到能够对红外图像进行年龄预测的卷积神经网络模型。具体的,可以将各样本图像输入初始卷积神经网络模型中,初始卷积神经网络模型输出的各样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对初始卷积神经网络模型中各参数进行调整得到候选神经网络模型,该候选神经网络模型可以对彩色图像进行年龄预测;之后对候选神经网络模型进行调整后得到可以对红外图像进行年龄预测的卷积神经网络模型。After obtaining the sample image, the corresponding age annotation result, and the Gaussian distribution of the age annotation result, the convolutional neural network model that can predict the age of the infrared image can be trained. Specifically, each sample image can be input into the initial convolutional neural network model, and the difference between the age distribution corresponding to each sample image output by the initial convolutional neural network model and the Gaussian distribution generated by the corresponding age annotation result, and the corresponding sample image The difference between the expected value of the age distribution and the corresponding age annotation result, the parameters of the initial convolutional neural network model are adjusted to obtain the candidate neural network model, which can predict the age of the color image; then the candidate neural network After the model is adjusted, a convolutional neural network model that can predict the age of infrared images is obtained.
具体可以为构建基于高斯分布估计的分布学习和基于期望年龄估计的损失函数,通过将人脸年龄标注转化为设计好的高斯分布作为标签,与模型生成的预测进行比较,产生回传的误差,对初始卷积神经网络模型中各参数进行调整,得到候选卷积神经网络模型。进一步的,将候选卷积神经网络模型调整为可以对单通道的红外图像进行年龄预测的模型,即得到了卷积神经网络模型。Specifically, it can construct a distribution learning based on Gaussian distribution estimation and a loss function based on expected age estimation. By converting the face age label into a designed Gaussian distribution as a label, it can be compared with the prediction generated by the model to generate a return error. The parameters in the initial convolutional neural network model are adjusted to obtain the candidate convolutional neural network model. Further, the candidate convolutional neural network model is adjusted to a model that can perform age prediction on a single-channel infrared image, and the convolutional neural network model is obtained.
根据各样本图像输入初始卷积神经网络模型后,初始卷积神经网络模型输出的各样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对初始卷积神经网络模型中各参数进行调整得到卷积神经网络模型,与输出具体年龄值的方案相比,能够对同一个人的多角度和多状态有准确的年龄预测,提高模型的鲁棒性。After inputting the initial convolutional neural network model according to each sample image, the difference between the age distribution corresponding to each sample image output by the initial convolutional neural network model and the Gaussian distribution generated by the corresponding age annotation result, and the age distribution corresponding to each sample image The difference between the expected value and the corresponding age annotation result. The parameters in the initial convolutional neural network model are adjusted to obtain the convolutional neural network model. Compared with the solution of outputting specific age values, it can be used for multiple angles and multiple states of the same person. Accurate age prediction improves the robustness of the model.
可以理解,电子设备获取的待处理图像中,人脸可能正面朝前,也有可能存在侧脸等非正面朝前的情况。而人脸非正面朝前时,可能会影响年龄预测结果的准确性。It can be understood that, in the image to be processed obtained by the electronic device, the human face may face forward, or there may be situations such as a side face other than the front face. When the face is not facing forward, it may affect the accuracy of age prediction results.
作为本发明实施例的一种实施方式,电子设备构建包含第一人脸区域的待处理目标图像时,可以首先对第一人脸区域进行关键点检测,得到第一人脸区域的各目标关键点的坐标信息;其中,各目标关键点为标识人脸轮廓特征的点;之后根据各目标关键点的坐标信息,对第一人脸区域进行对齐处理后,得到包含第一人脸区域且各目标关键点位于预设位置的待处理目标图像。As an implementation manner of the embodiment of the present invention, when the electronic device constructs the target image to be processed containing the first face region, it may first perform key point detection on the first face region to obtain the key points of each target in the first face region. The coordinate information of the point; among them, each target key point is a point that identifies the contour feature of the face; then according to the coordinate information of each target key point, the first face area is aligned to obtain the first face area and each The target key point is located in the preset position of the target image to be processed.
例如,可以基于MTCNN(Multi-task Convolutional Neural Network,多任务卷积神经网络)对第一人脸区域进行关键点检测,确定出各目标关键点在待处理图像中构建的坐标系中的坐标信息,作为各目标关键点的坐标信息。For example, based on MTCNN (Multi-task Convolutional Neural Network, multi-task convolutional neural network), the first face area can be detected by key points, and the coordinate information of each target key point in the coordinate system constructed in the image to be processed can be determined , As the coordinate information of each target key point.
在一种实现方式中,上述关键点例如可以包括眼睛区域的各关键点。从而可以构建包含第一人脸区域且眼睛区域的各关键点位于预设位置的待处理目标图像。In an implementation manner, the above-mentioned key points may include, for example, key points of the eye area. In this way, it is possible to construct a target image to be processed that includes the first face area and the key points of the eye area are located at preset positions.
对人脸区域进行关键点检测,进而对人脸区域进行对齐处理得到待处理目标图像,能够避免待处理目标图像中存在侧脸等情况,从而保证待处理目标图像中人脸更清晰,提高年龄预测的准确性。Perform key point detection on the face area, and then align the face area to obtain the target image to be processed, which can avoid the presence of side faces in the target image to be processed, thereby ensuring that the face in the target image to be processed is clearer and increasing the age The accuracy of the forecast.
作为本发明实施例的一种实施方式,电子设备将待处理目标图像输入预先训练得到的红外卷积神经网络模型中,得到第一人脸区域对应人物的第一预测年龄分布之后,还可以计算第一预测年龄分布中,各年龄值与对应概率的乘积之和,并将计算结果作为第一人脸区域对应人物的预测年龄值。As an implementation of the embodiment of the present invention, the electronic device inputs the target image to be processed into the pre-trained infrared convolutional neural network model, and after obtaining the first predicted age distribution of the person corresponding to the first face region, it can also calculate In the first predicted age distribution, the sum of the product of each age value and the corresponding probability, and the calculation result is used as the predicted age value of the person corresponding to the first face area.
根据预测年龄分布计算得到具体的预测年龄值,从而得到精确的年龄预测结果。According to the predicted age distribution, the specific predicted age value is calculated, so as to obtain the accurate age prediction result.
如图7所示,本发明实施例提供了一种用于红外图像的年龄预测装置,所述装置包括:As shown in FIG. 7, an embodiment of the present invention provides an age prediction device for infrared images, and the device includes:
红外图像获取模块710,用于获取待处理红外图像;The infrared image acquisition module 710 is used to acquire an infrared image to be processed;
人脸区域检测模块720,用于检测所述待处理红外图像中的第一人脸区域,并构建包含所述第一人脸区域的待处理目标图像;其中,所述待处理目标图像的大小为预设大小;The face area detection module 720 is configured to detect the first face area in the infrared image to be processed, and construct a target image to be processed that includes the first face area; wherein the size of the target image to be processed Is the default size;
年龄预测模块730,用于将所述待处理目标图像输入预先训练得到的红外卷积神经网络模型中,得 到所述第一人脸区域对应人物的第一预测年龄分布,其中,所述第一预测年龄分布服从高斯分布;其中,所述红外卷积神经网络模型是根据各红外样本图像输入初始红外卷积神经网络模型后,所述初始红外卷积神经网络模型输出的各红外样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各红外样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对所述初始红外卷积神经网络模型中各参数进行调整后得到的,所述年龄分布服从高斯分布;所述红外样本图像以及对应的年龄标注结果是根据预先训练得到的卷积神经网络模型确定的,所述卷积神经网络模型根据彩色图像训练得到。The age prediction module 730 is configured to input the target image to be processed into a pre-trained infrared convolutional neural network model to obtain the first predicted age distribution of the person corresponding to the first face region, wherein the first The predicted age distribution obeys the Gaussian distribution; wherein the infrared convolutional neural network model is inputted into the initial infrared convolutional neural network model according to each infrared sample image, and each infrared sample image output by the initial infrared convolutional neural network model corresponds to The difference between the age distribution and the Gaussian distribution generated by the corresponding age labeling result, and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age labeling result, adjust each parameter in the initial infrared convolutional neural network model As obtained later, the age distribution obeys the Gaussian distribution; the infrared sample image and the corresponding age annotation result are determined according to a pre-trained convolutional neural network model, and the convolutional neural network model is obtained through color image training.
由上述内容可知,本发明实施例提供的对红外图像中的人脸进行年龄预测的装置,能够基于彩色图像训练得到的卷积神经网络模型确定出红外样本图像以及对应的年龄标注结果,进而根据确定的红外样本图像以及对应的年龄标注结果训练得到能够对红外图像中的人脸进行年龄预测的红外卷积神经网络模型。并且,与人工进行年龄标定相比,通过卷积神经网络模型确定红外样本图像以及对应的年龄标注结果,能够节省人力资源,提高样本获取的效率。另外,训练红外卷积神经网络模型时,是根据各红外样本图像输入初始红外卷积神经网络模型后,初始红外卷积神经网络模型输出的各红外样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各红外样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对初始红外卷积神经网络模型中各参数进行调整的,与输出具体年龄值的方案相比,能够对同一个人的多角度和多状态有准确的年龄预测,提高模型的鲁棒性。It can be seen from the foregoing that the device for predicting the age of a face in an infrared image provided by the embodiment of the present invention can determine the infrared sample image and the corresponding age annotation result based on the convolutional neural network model obtained by color image training, and then according to The determined infrared sample images and the corresponding age annotation results are trained to obtain an infrared convolutional neural network model that can predict the age of the face in the infrared image. In addition, compared with manual age calibration, determining infrared sample images and corresponding age annotation results through a convolutional neural network model can save human resources and improve the efficiency of sample acquisition. In addition, when training the infrared convolutional neural network model, after each infrared sample image is input to the initial infrared convolutional neural network model, the initial infrared convolutional neural network model outputs the corresponding age distribution of each infrared sample image and the corresponding age annotation results are generated The difference between the Gaussian distribution of each infrared sample image and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age annotation result. The parameters in the initial infrared convolutional neural network model are adjusted, which are the same as the output specific age value. In comparison, it can accurately predict the age of the same person from multiple angles and multiple states, and improve the robustness of the model.
可选的,所述装置还包括:Optionally, the device further includes:
红外模型构建模块,用于构建初始红外卷积神经网络模型,所述初始红外卷积神经网络模型包括:卷积层、池化层、全连接层;The infrared model building module is used to build an initial infrared convolutional neural network model, the initial infrared convolutional neural network model includes: a convolutional layer, a pooling layer, and a fully connected layer;
红外样本图像确定模块,用于确定各红外样本图像,以及所述各红外样本图像对应的年龄标注结果;An infrared sample image determination module, used to determine each infrared sample image and the age annotation result corresponding to each infrared sample image;
高斯分布生成模块,用于生成所述各红外样本图像对应的年龄标注结果的高斯分布;A Gaussian distribution generating module, configured to generate the Gaussian distribution of the age annotation result corresponding to each infrared sample image;
红外卷积神经网络模型训练模块,用于将各红外样本图像输入所述初始红外卷积神经网络模型中,得到所述各红外样本图像对应的年龄分布,并计算所述各红外样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各红外样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,根据计算结果对所述初始红外卷积神经网络模型中各参数进行调整,得到所述红外卷积神经网络模型。The infrared convolutional neural network model training module is used to input each infrared sample image into the initial infrared convolutional neural network model, obtain the age distribution corresponding to each infrared sample image, and calculate the corresponding infrared sample image The difference between the age distribution and the Gaussian distribution generated by the corresponding age labeling result, and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age labeling result, according to the calculation result of the initial infrared convolutional neural network model The parameters are adjusted to obtain the infrared convolutional neural network model.
可选的,所述红外样本图像确定模块包括:Optionally, the infrared sample image determination module includes:
图像集合获取子模块,用于获取多个图像集合,其中,每个所述图像集合中的初始红外图像为同一人在同一时期的不同脸部图像,且每个所述图像集合中初始红外图像的数量大于预设数量阈值;The image collection acquisition sub-module is used to acquire multiple image collections, wherein the initial infrared images in each image collection are different facial images of the same person in the same period, and the initial infrared images in each image collection The number of is greater than the preset number threshold;
人脸区域检测子模块,用于针对每个所述图像集合,检测各初始红外图像中的第二人脸区域,并构建包含各所述第二人脸区域的各初始目标图像;The face area detection sub-module is used to detect the second face area in each initial infrared image for each of the image sets, and construct each initial target image including each of the second face areas;
年龄范围确定子模块,用于将所述各初始目标图像输入预先训练得到的卷积神经网络模型中,得到各所述第二人脸区域对应人物的第二预测年龄分布,并确定各第二预测年龄分布对应的年龄范围;其中,所述卷积神经网络模型是根据各样本图像输入初始卷积神经网络模型后,所述初始卷积神经网络模型输出的各样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对所述初始卷积神经网络模型中各参数进行调整得到候选神经网络模型,并对所述候选神经网络模型进行调整后得到的,所述第二预测年龄分布服从高斯分布,所述各样本图像均为彩色图像;The age range determination sub-module is used to input each of the initial target images into a pre-trained convolutional neural network model to obtain the second predicted age distribution of the person corresponding to each of the second face regions, and determine each second Predict the age range corresponding to the age distribution; wherein the convolutional neural network model is based on the input of the initial convolutional neural network model of each sample image, and the initial convolutional neural network model outputs the corresponding age distribution of each sample image and the corresponding The difference between the Gaussian distribution generated by the age labeling result, and the difference between the expected value of the age distribution corresponding to each sample image and the corresponding age labeling result, adjusting each parameter in the initial convolutional neural network model to obtain a candidate neural network model, And obtained after adjusting the candidate neural network model, the second predicted age distribution obeys a Gaussian distribution, and each sample image is a color image;
红外样本确定子模块,用于针对每个图像集合,去除该图像集合中年龄范围存在异常的初始目标图像,得到剩余目标图像,计算所有剩余目标图像对应的正常年龄范围,将包含在所述正常年龄范围内的剩余目标图像作为红外样本图像,并将各红外样本图像对应的年龄范围的均值,作为各红外样本图像的年龄标注结果。The infrared sample determination sub-module is used to remove the initial target images with abnormal age ranges in the image set for each image set to obtain the remaining target images, calculate the normal age range corresponding to all remaining target images, and include them in the normal The remaining target images within the age range are used as infrared sample images, and the average value of the age range corresponding to each infrared sample image is used as the age labeling result of each infrared sample image.
可选的,所述红外样本确定子模块,具体用于:Optionally, the infrared sample determination sub-module is specifically used for:
针对每个图像集合,根据该图像集合中包括的各初始目标图像对应的年龄范围的最小值从小到大的顺序,将各初始目标图像排序;For each image set, sort the initial target images according to the minimum value of the age range corresponding to each initial target image included in the image set in descending order;
确定位于四分之一处的第一年龄范围和位于四分之三处的第二年龄范围,以及所述第一年龄范围的最小值和所述第二年龄范围的最大值;Determining a first age range located at one quarter and a second age range located at three quarters, as well as the minimum value of the first age range and the maximum value of the second age range;
将对应年龄范围中包含年龄值小于所述最小值与预设数值之差的初始目标图像,以及年龄值大于所述最大值与所述预设数值之和的初始目标图像去除,得到剩余目标图像。Remove the initial target image whose age value is less than the difference between the minimum value and the preset value in the corresponding age range and the initial target image whose age value is greater than the sum of the maximum value and the preset value to obtain the remaining target image .
可选的,所述红外样本确定子模块,具体用于:Optionally, the infrared sample determination sub-module is specifically used for:
计算所有剩余目标图像对应的年龄范围的均值和标准差;Calculate the mean and standard deviation of the age range corresponding to all remaining target images;
获取预设超参数;Get preset hyperparameters;
计算所述超参数和所述标准差的乘积,并将所述均值与所述乘积之差,作为正常年龄范围的最小值,将所述均值与所述乘积之和,作为正常年龄范围的最大值。Calculate the product of the hyperparameter and the standard deviation, and use the difference between the mean and the product as the minimum value in the normal age range, and use the sum of the mean and the product as the maximum in the normal age range value.
可选的,所述红外样本图像确定模块还包括:Optionally, the infrared sample image determination module further includes:
网络模型构建子模块,用于构建初始卷积神经网络模型,所述初始卷积神经网络模型包括:卷积层、池化层、全连接层;The network model construction sub-module is used to construct an initial convolutional neural network model, and the initial convolutional neural network model includes: a convolutional layer, a pooling layer, and a fully connected layer;
样本图像获取子模块,用于获取各样本图像,以及所述各样本图像对应的年龄标注结果;The sample image acquisition sub-module is used to acquire each sample image and the age annotation result corresponding to each sample image;
高斯分布生成子模块,用于生成所述各样本图像对应的年龄标注结果的高斯分布;The Gaussian distribution generation sub-module is used to generate the Gaussian distribution of the age annotation results corresponding to each sample image;
卷积神经网络模型训练子模块,用于将各样本图像输入所述初始卷积神经网络模型中,得到所述各样本图像对应的年龄分布,并计算所述各样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,根据计算结果对所述初始卷积神经网络模型中各参数进行调整,得到候选神经网络模型,并对所述候选神经网络模型进行调整得到所述卷积神经网络模型。The convolutional neural network model training sub-module is used to input each sample image into the initial convolutional neural network model, obtain the age distribution corresponding to each sample image, and calculate the age distribution corresponding to each sample image and the corresponding The difference between the Gaussian distribution generated by the age annotation result, and the difference between the expected value of the age distribution corresponding to each sample image and the corresponding age annotation result, according to the calculation result, adjust each parameter in the initial convolutional neural network model to obtain the candidate Neural network model, and adjusting the candidate neural network model to obtain the convolutional neural network model.
可选的,所述高斯分布生成子模块,具体用于:Optionally, the Gaussian distribution generating sub-module is specifically used for:
针对每张样本图像,构建以该样本图像对应的年龄标注结果为中心,预设标准差为峰宽的高斯分布,作为该样本图像对应的年龄标注结果的高斯分布。For each sample image, construct a Gaussian distribution centered on the age annotation result corresponding to the sample image, and the preset standard deviation is the peak width, as the Gaussian distribution of the age annotation result corresponding to the sample image.
可选的,所述装置还包括:Optionally, the device further includes:
测试图像获取模块,用于获取红外测试图像,以及各所述红外测试图像对应的年龄标注结果;所述红外测试图像与所述红外样本图像不同;A test image acquisition module, configured to acquire an infrared test image and an age marking result corresponding to each of the infrared test images; the infrared test image is different from the infrared sample image;
测试精度确定模块,用于根据所述红外测试图像以及各所述红外测试图像对应的年龄标注结果,确定所述红外卷积神经网络模型的测试精度;A test accuracy determining module, configured to determine the test accuracy of the infrared convolutional neural network model according to the infrared test image and the age annotation result corresponding to each infrared test image;
处理模块,用于当所述测试精度小于预设精度阈值时,将当前的红外卷积神经网络模型作为初始红外卷积神经网络模型,触发所述红外样本图像确定模块,直到所述测试精度不小于所述预设精度阈值时,将当前的红外卷积神经网络模型作为最终的红外卷积神经网络模型。The processing module is configured to use the current infrared convolutional neural network model as the initial infrared convolutional neural network model when the test accuracy is less than the preset accuracy threshold, and trigger the infrared sample image determination module until the test accuracy is not When it is less than the preset accuracy threshold, the current infrared convolutional neural network model is used as the final infrared convolutional neural network model.
可选的,所述人脸区域检测模块720包括:Optionally, the face area detection module 720 includes:
关键点检测子模块,用于对所述第一人脸区域进行关键点检测,得到所述第一人脸区域的各目标关键点的坐标信息;其中,所述各目标关键点为标识人脸轮廓特征的点;The key point detection sub-module is used to perform key point detection on the first face area to obtain coordinate information of each target key point in the first face area; wherein, each target key point is an identification face Points of contour features;
目标图像构建子模块,用于根据所述各目标关键点的坐标信息,对所述第一人脸区域进行对齐处理后,得到包含所述第一人脸区域且所述各目标关键点位于预设位置的待处理目标图像。The target image construction sub-module is used to align the first face region according to the coordinate information of the target key points to obtain the first face region and the target key points are located in the preset Set the position of the target image to be processed.
可选的,所述装置还包括:Optionally, the device further includes:
年龄值计算模块,用于计算所述第一预测年龄分布中,各年龄值与对应概率的乘积之和,并将计算结果作为所述第一人脸区域对应人物的预测年龄值。The age value calculation module is used to calculate the sum of the product of each age value and the corresponding probability in the first predicted age distribution, and use the calculation result as the predicted age value of the person corresponding to the first face area.
上述装置实施例与方法实施例相对应,与该方法实施例具有同样的技术效果,具体说明参见方法实施例。装置实施例是基于方法实施例得到的,具体的说明可以参见方法实施例部分,此处不再赘述。The foregoing device embodiment corresponds to the method embodiment, and has the same technical effect as the method embodiment. For specific description, refer to the method embodiment. The device embodiment is obtained based on the method embodiment, and the specific description can be found in the method embodiment part, which will not be repeated here.
本领域普通技术人员可以理解:附图只是一个实施例的示意图,附图中的模块或流程并不一定是实施本发明所必须的。A person of ordinary skill in the art can understand that the drawings are only schematic diagrams of an embodiment, and the modules or processes in the drawings are not necessarily necessary for implementing the present invention.
本领域普通技术人员可以理解:实施例中的装置中的模块可以按照实施例描述分布于实施例的装置中,也可以进行相应变化位于不同于本实施例的一个或多个装置中。上述实施例的模块可以合并为一个模块,也可以进一步拆分成多个子模块。A person of ordinary skill in the art can understand that the modules in the device in the embodiment may be distributed in the device in the embodiment according to the description of the embodiment, or may be located in one or more devices different from this embodiment with corresponding changes. The modules of the above-mentioned embodiments can be combined into one module or further divided into multiple sub-modules.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions recorded in the foregoing embodiments are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (10)
- 一种用于红外图像的年龄预测方法,其特征在于,所述方法包括:An age prediction method for infrared images, characterized in that the method includes:获取待处理红外图像;Obtain infrared images to be processed;检测所述待处理红外图像中的第一人脸区域,并构建包含所述第一人脸区域的待处理目标图像;其中,所述待处理目标图像的大小为预设大小;Detecting a first face region in the infrared image to be processed, and constructing a target image to be processed including the first face region; wherein the size of the target image to be processed is a preset size;将所述待处理目标图像输入预先训练得到的红外卷积神经网络模型中,得到所述第一人脸区域对应人物的第一预测年龄分布,其中,所述第一预测年龄分布服从高斯分布;Inputting the target image to be processed into a pre-trained infrared convolutional neural network model to obtain a first predicted age distribution of a person corresponding to the first face region, wherein the first predicted age distribution obeys a Gaussian distribution;其中,所述红外卷积神经网络模型是根据各红外样本图像输入初始红外卷积神经网络模型后,所述初始红外卷积神经网络模型输出的各红外样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各红外样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对所述初始红外卷积神经网络模型中各参数进行调整后得到的,所述年龄分布服从高斯分布;所述红外样本图像以及对应的年龄标注结果是根据预先训练得到的卷积神经网络模型确定的,所述卷积神经网络模型根据彩色图像训练得到。Wherein, the infrared convolutional neural network model is based on the input of each infrared sample image to the initial infrared convolutional neural network model, the initial infrared convolutional neural network model outputs the corresponding age distribution of each infrared sample image and the corresponding age annotation result The difference between the generated Gaussian distribution and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age annotation result are obtained after adjusting each parameter in the initial infrared convolutional neural network model, the age The distribution obeys the Gaussian distribution; the infrared sample image and the corresponding age annotation result are determined according to a pre-trained convolutional neural network model, and the convolutional neural network model is obtained through color image training.
- 根据权利要求1所述的方法,其特征在于,所述红外卷积神经网络模型的训练过程包括:The method according to claim 1, wherein the training process of the infrared convolutional neural network model comprises:构建初始红外卷积神经网络模型,所述初始红外卷积神经网络模型包括:卷积层、池化层、全连接层;Construct an initial infrared convolutional neural network model, the initial infrared convolutional neural network model includes: a convolutional layer, a pooling layer, and a fully connected layer;确定各红外样本图像,以及所述各红外样本图像对应的年龄标注结果;Determine each infrared sample image and the age annotation result corresponding to each infrared sample image;生成所述各红外样本图像对应的年龄标注结果的高斯分布;Generating a Gaussian distribution of the age annotation result corresponding to each infrared sample image;将各红外样本图像输入所述初始红外卷积神经网络模型中,得到所述各红外样本图像对应的年龄分布,并计算所述各红外样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各红外样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,根据计算结果对所述初始红外卷积神经网络模型中各参数进行调整,得到所述红外卷积神经网络模型。Input each infrared sample image into the initial infrared convolutional neural network model to obtain the age distribution corresponding to each infrared sample image, and calculate the age distribution corresponding to each infrared sample image and the Gaussian distribution generated by the corresponding age annotation result The difference between the expected value of the age distribution corresponding to each infrared sample image and the difference between the corresponding age annotation results, and the parameters in the initial infrared convolutional neural network model are adjusted according to the calculation results to obtain the infrared convolutional neural network Network model.
- 根据权利要求2所述的方法,其特征在于,所述确定各红外样本图像,以及所述各红外样本图像对应的年龄标注结果包括:The method according to claim 2, wherein the determining each infrared sample image and the age marking result corresponding to each infrared sample image comprises:获取多个图像集合,其中,每个所述图像集合中的初始红外图像为同一人在同一时期的不同脸部图像,且每个所述图像集合中初始红外图像的数量大于预设数量阈值;Acquiring a plurality of image sets, wherein the initial infrared images in each image set are different facial images of the same person in the same period, and the number of initial infrared images in each image set is greater than a preset number threshold;针对每个所述图像集合,检测各初始红外图像中的第二人脸区域,并构建包含各所述第二人脸区域的各初始目标图像;For each of the image sets, detecting the second face region in each initial infrared image, and constructing each initial target image including each of the second face regions;将所述各初始目标图像输入预先训练得到的卷积神经网络模型中,得到各所述第二人脸区域对应人物的第二预测年龄分布,并确定各第二预测年龄分布对应的年龄范围;其中,所述卷积神经网络模型是根据各样本图像输入初始卷积神经网络模型后,所述初始卷积神经网络模型输出的各样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对所述初始卷积神经网络模型中各参数进行调整得到候选神经网络模型,并对所述候选神经网络模型进行调整后得到的,所述第二预测年龄分布服从高斯分布,所述各样本图像均为彩色图像;Input each of the initial target images into a pre-trained convolutional neural network model to obtain the second predicted age distribution of the person corresponding to each of the second face regions, and determine the age range corresponding to each second predicted age distribution; Wherein, the convolutional neural network model is based on the input of the initial convolutional neural network model of each sample image, the age distribution corresponding to each sample image output by the initial convolutional neural network model and the Gaussian distribution generated by the corresponding age annotation result The difference, and the difference between the expected value of the age distribution corresponding to each sample image and the corresponding age annotation result, adjust each parameter in the initial convolutional neural network model to obtain a candidate neural network model, and compare the candidate neural network model Obtained after adjustment, the second predicted age distribution obeys a Gaussian distribution, and each sample image is a color image;针对每个图像集合,去除该图像集合中年龄范围存在异常的初始目标图像,得到剩余目标图像,计算所有剩余目标图像对应的正常年龄范围,将包含在所述正常年龄范围内的剩余目标图像作为红外样本图像,并将各红外样本图像对应的年龄范围的均值,作为各红外样本图像的年龄标注结果。For each image set, remove the initial target images with abnormal age ranges in the image set to obtain the remaining target images, calculate the normal age range corresponding to all the remaining target images, and use the remaining target images included in the normal age range as Infrared sample images, and the average value of the age range corresponding to each infrared sample image is used as the age labeling result of each infrared sample image.
- 根据权利要求3所述的方法,其特征在于,所述针对每个图像集合,去除该图像集合中年龄范围存在异常的初始目标图像,得到剩余目标图像包括:The method according to claim 3, wherein, for each image set, removing initial target images with abnormal age ranges in the image set to obtain the remaining target images comprises:针对每个图像集合,根据该图像集合中包括的各初始目标图像对应的年龄范围的最小值从小到大的顺序,将各初始目标图像排序;For each image set, sort the initial target images according to the minimum value of the age range corresponding to each initial target image included in the image set in descending order;确定位于四分之一处的第一年龄范围和位于四分之三处的第二年龄范围,以及所述第一年龄范围的最小值和所述第二年龄范围的最大值;Determining a first age range located at one quarter and a second age range located at three quarters, as well as the minimum value of the first age range and the maximum value of the second age range;将对应年龄范围中包含年龄值小于所述最小值与预设数值之差的初始目标图像,以及年龄值大于所述最大值与所述预设数值之和的初始目标图像去除,得到剩余目标图像。Remove the initial target image whose age value is less than the difference between the minimum value and the preset value in the corresponding age range and the initial target image whose age value is greater than the sum of the maximum value and the preset value to obtain the remaining target image .
- 根据权利要求3所述的方法,其特征在于,所述计算所有剩余目标图像对应的正常年龄范围包括:The method according to claim 3, wherein said calculating the normal age range corresponding to all remaining target images comprises:计算所有剩余目标图像对应的年龄范围的均值和标准差;Calculate the mean and standard deviation of the age range corresponding to all remaining target images;获取预设超参数;Get preset hyperparameters;计算所述超参数和所述标准差的乘积,并将所述均值与所述乘积之差,作为正常年龄范围的最小值,将所述均值与所述乘积之和,作为正常年龄范围的最大值。Calculate the product of the hyperparameter and the standard deviation, and use the difference between the mean and the product as the minimum value in the normal age range, and use the sum of the mean and the product as the maximum in the normal age range value.
- 根据权利要求3所述的方法,其特征在于,所述卷积神经网络模型的训练过程包括:The method according to claim 3, wherein the training process of the convolutional neural network model comprises:构建初始卷积神经网络模型,所述初始卷积神经网络模型包括:卷积层、池化层、全连接层;Construct an initial convolutional neural network model, the initial convolutional neural network model including: a convolutional layer, a pooling layer, and a fully connected layer;获取各样本图像,以及所述各样本图像对应的年龄标注结果;Acquiring each sample image and the age annotation result corresponding to each sample image;生成所述各样本图像对应的年龄标注结果的高斯分布;Generating a Gaussian distribution of the age annotation result corresponding to each sample image;将各样本图像输入所述初始卷积神经网络模型中,得到所述各样本图像对应的年龄分布,并计算所述各样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,根据计算结果对所述初始卷积神经网络模型中各参数进行调整,得到候选神经网络模型,并对所述候选神经网络模型进行调整得到所述卷积神经网络模型。Input each sample image into the initial convolutional neural network model to obtain the age distribution corresponding to each sample image, and calculate the difference between the age distribution corresponding to each sample image and the Gaussian distribution generated by the corresponding age annotation result, As well as the difference between the expected value of the age distribution corresponding to each sample image and the corresponding age annotation result, the parameters in the initial convolutional neural network model are adjusted according to the calculation result to obtain the candidate neural network model, and the candidate neural network The model is adjusted to obtain the convolutional neural network model.
- 根据权利要求6所述的方法,其特征在于,所述生成所述各样本图像对应的年龄标注结果的高斯分布包括:The method according to claim 6, wherein said generating the Gaussian distribution of the age labeling result corresponding to each sample image comprises:针对每张样本图像,构建以该样本图像对应的年龄标注结果为中心,预设标准差为峰宽的高斯分布,作为该样本图像对应的年龄标注结果的高斯分布。For each sample image, construct a Gaussian distribution centered on the age annotation result corresponding to the sample image, and the preset standard deviation is the peak width, as the Gaussian distribution of the age annotation result corresponding to the sample image.
- 根据权利要求2所述的方法,其特征在于,所述得到所述红外卷积神经网络模型之后,所述方法还包括:The method according to claim 2, wherein after said obtaining the infrared convolutional neural network model, the method further comprises:获取红外测试图像,以及各所述红外测试图像对应的年龄标注结果;所述红外测试图像与所述红外样本图像不同;Acquiring an infrared test image and an age marking result corresponding to each of the infrared test images; the infrared test image is different from the infrared sample image;根据所述红外测试图像以及各所述红外测试图像对应的年龄标注结果,确定所述红外卷积神经网络模型的测试精度;Determining the test accuracy of the infrared convolutional neural network model according to the infrared test image and the age annotation result corresponding to each of the infrared test images;当所述测试精度小于预设精度阈值时,将当前的红外卷积神经网络模型作为初始红外卷积神经网络模型,返回执行所述确定各红外样本图像,以及所述各红外样本图像对应的年龄标注结果的步骤,直到所述测试精度不小于所述预设精度阈值时,将当前的红外卷积神经网络模型作为最终的红外卷积神经网络模型。When the test accuracy is less than the preset accuracy threshold, use the current infrared convolutional neural network model as the initial infrared convolutional neural network model, and return to execute the determination of each infrared sample image and the age corresponding to each infrared sample image In the step of marking the results, until the test accuracy is not less than the preset accuracy threshold, the current infrared convolutional neural network model is used as the final infrared convolutional neural network model.
- 根据权利要求1-8任一项所述的方法,其特征在于,所述构建包含所述第一人脸区域的待处理目标图像包括:The method according to any one of claims 1-8, wherein the constructing the target image to be processed including the first face region comprises:对所述第一人脸区域进行关键点检测,得到所述第一人脸区域的各目标关键点的坐标信息;其中,所述各目标关键点为标识人脸轮廓特征的点;Performing key point detection on the first face area to obtain coordinate information of each target key point in the first face area; wherein each target key point is a point that identifies a face contour feature;根据所述各目标关键点的坐标信息,对所述第一人脸区域进行对齐处理后,得到包含所述第一人脸区域且所述各目标关键点位于预设位置的待处理目标图像。According to the coordinate information of each target key point, after the first face region is aligned, a target image to be processed including the first face region and each target key point is located at a preset position is obtained.
- 一种用于红外图像的年龄预测装置,其特征在于,所述装置包括:An age prediction device for infrared images, characterized in that the device comprises:红外图像获取模块,用于获取待处理红外图像;Infrared image acquisition module for acquiring infrared images to be processed;人脸区域检测模块,用于检测所述待处理红外图像中的第一人脸区域,并构建包含所述第一人脸区域的待处理目标图像;其中,所述待处理目标图像的大小为预设大小;The face area detection module is used to detect the first face area in the infrared image to be processed, and construct a target image to be processed containing the first face area; wherein the size of the target image to be processed is Preset size年龄预测模块,用于将所述待处理目标图像输入预先训练得到的红外卷积神经网络模型中,得到所述第一人脸区域对应人物的第一预测年龄分布,其中,所述第一预测年龄分布服从高斯分布;其中,所述红外卷积神经网络模型是根据各红外样本图像输入初始红外卷积神经网络模型后,所述初始红外卷积神经网络模型输出的各红外样本图像对应的年龄分布与对应年龄标注结果生成的高斯分布的差值,以及各红外样本图像对应的年龄分布的期望值与对应年龄标注结果的差值,对所述初始红外卷积神经网络模型中各参数进行调整后得到的,所述年龄分布服从高斯分布;所述红外样本图像以及对应的年龄标注结果是根据预先训练得到的卷积神经网络模型确定的,所述卷积神经网络模型根据彩色图像训练得到。The age prediction module is used to input the target image to be processed into a pre-trained infrared convolutional neural network model to obtain the first predicted age distribution of the person corresponding to the first face region, wherein the first prediction The age distribution obeys the Gaussian distribution; wherein, the infrared convolutional neural network model is the age corresponding to each infrared sample image output by the initial infrared convolutional neural network model after inputting the initial infrared convolutional neural network model according to each infrared sample image The difference between the distribution and the Gaussian distribution generated by the corresponding age annotation result, and the difference between the expected value of the age distribution corresponding to each infrared sample image and the corresponding age annotation result, after adjusting the parameters in the initial infrared convolutional neural network model It is obtained that the age distribution obeys the Gaussian distribution; the infrared sample image and the corresponding age annotation result are determined according to a pre-trained convolutional neural network model, which is obtained through color image training.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910669644.2A CN112307796B (en) | 2019-07-24 | 2019-07-24 | Age prediction method and device for infrared image |
CN201910669644.2 | 2019-07-24 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021012383A1 true WO2021012383A1 (en) | 2021-01-28 |
Family
ID=74193104
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/108078 WO2021012383A1 (en) | 2019-07-24 | 2019-09-26 | Age prediction method and device for infrared image |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112307796B (en) |
WO (1) | WO2021012383A1 (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112950631A (en) * | 2021-04-13 | 2021-06-11 | 西安交通大学口腔医院 | Age estimation method based on saliency map constraint and X-ray head skull positioning lateral image |
CN113435118A (en) * | 2021-06-25 | 2021-09-24 | 上海眼控科技股份有限公司 | Irradiance determination method, irradiance determination device, irradiance determination equipment and storage medium |
CN114332994A (en) * | 2021-12-20 | 2022-04-12 | 深圳数联天下智能科技有限公司 | Method for training age prediction model, age detection method and related device |
CN115862118A (en) * | 2023-01-29 | 2023-03-28 | 南京开为网络科技有限公司 | Human face age estimation method and device based on Gaussian distribution hypothesis and MSE loss |
WO2024008009A1 (en) * | 2022-07-05 | 2024-01-11 | 华为技术有限公司 | Age identification method and apparatus, electronic device, and storage medium |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113456031A (en) * | 2021-08-09 | 2021-10-01 | 首都医科大学附属北京天坛医院 | Training device and prediction device of brain state prediction model and electronic equipment |
CN117912229B (en) * | 2023-11-29 | 2024-07-09 | 招商智广科技(安徽)有限公司 | High-speed intelligent scheduling management system based on video monitoring |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110057040A1 (en) * | 2001-12-24 | 2011-03-10 | L-1 Secure Credentialing, Inc. | Optically variable personalized indicia for identification documents |
CN106485235A (en) * | 2016-10-24 | 2017-03-08 | 厦门美图之家科技有限公司 | A kind of convolutional neural networks generation method, age recognition methods and relevant apparatus |
KR101754154B1 (en) * | 2016-01-25 | 2017-07-05 | 주식회사 에스원 | Fever Patient Monitering Syatem at Public Place by Using Multiple Band Camera and Statistical Sampling and Method thereof |
CN107169454A (en) * | 2017-05-16 | 2017-09-15 | 中国科学院深圳先进技术研究院 | A kind of facial image age estimation method, device and its terminal device |
CN108446676A (en) * | 2018-05-03 | 2018-08-24 | 南京信息工程大学 | Facial image age method of discrimination based on orderly coding and multilayer accidental projection |
CN108537026A (en) * | 2018-03-30 | 2018-09-14 | 百度在线网络技术(北京)有限公司 | application control method, device and server |
CN108960061A (en) * | 2018-06-01 | 2018-12-07 | Oppo广东移动通信有限公司 | Control method, control device, electronic device, computer equipment and storage medium |
CN109190449A (en) * | 2018-07-09 | 2019-01-11 | 北京达佳互联信息技术有限公司 | Age recognition methods, device, electronic equipment and storage medium |
US20190034706A1 (en) * | 2010-06-07 | 2019-01-31 | Affectiva, Inc. | Facial tracking with classifiers for query evaluation |
US20190133510A1 (en) * | 2010-06-07 | 2019-05-09 | Affectiva, Inc. | Sporadic collection of affect data within a vehicle |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106503623B (en) * | 2016-09-27 | 2019-10-08 | 中国科学院自动化研究所 | Facial image age estimation method based on convolutional neural networks |
-
2019
- 2019-07-24 CN CN201910669644.2A patent/CN112307796B/en active Active
- 2019-09-26 WO PCT/CN2019/108078 patent/WO2021012383A1/en active Application Filing
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110057040A1 (en) * | 2001-12-24 | 2011-03-10 | L-1 Secure Credentialing, Inc. | Optically variable personalized indicia for identification documents |
US20190034706A1 (en) * | 2010-06-07 | 2019-01-31 | Affectiva, Inc. | Facial tracking with classifiers for query evaluation |
US20190133510A1 (en) * | 2010-06-07 | 2019-05-09 | Affectiva, Inc. | Sporadic collection of affect data within a vehicle |
KR101754154B1 (en) * | 2016-01-25 | 2017-07-05 | 주식회사 에스원 | Fever Patient Monitering Syatem at Public Place by Using Multiple Band Camera and Statistical Sampling and Method thereof |
CN106485235A (en) * | 2016-10-24 | 2017-03-08 | 厦门美图之家科技有限公司 | A kind of convolutional neural networks generation method, age recognition methods and relevant apparatus |
CN107169454A (en) * | 2017-05-16 | 2017-09-15 | 中国科学院深圳先进技术研究院 | A kind of facial image age estimation method, device and its terminal device |
CN108537026A (en) * | 2018-03-30 | 2018-09-14 | 百度在线网络技术(北京)有限公司 | application control method, device and server |
CN108446676A (en) * | 2018-05-03 | 2018-08-24 | 南京信息工程大学 | Facial image age method of discrimination based on orderly coding and multilayer accidental projection |
CN108960061A (en) * | 2018-06-01 | 2018-12-07 | Oppo广东移动通信有限公司 | Control method, control device, electronic device, computer equipment and storage medium |
CN109190449A (en) * | 2018-07-09 | 2019-01-11 | 北京达佳互联信息技术有限公司 | Age recognition methods, device, electronic equipment and storage medium |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112950631A (en) * | 2021-04-13 | 2021-06-11 | 西安交通大学口腔医院 | Age estimation method based on saliency map constraint and X-ray head skull positioning lateral image |
CN112950631B (en) * | 2021-04-13 | 2023-06-30 | 西安交通大学口腔医院 | Age estimation method based on saliency map constraint and X-ray head cranium positioning side image |
CN113435118A (en) * | 2021-06-25 | 2021-09-24 | 上海眼控科技股份有限公司 | Irradiance determination method, irradiance determination device, irradiance determination equipment and storage medium |
CN114332994A (en) * | 2021-12-20 | 2022-04-12 | 深圳数联天下智能科技有限公司 | Method for training age prediction model, age detection method and related device |
WO2024008009A1 (en) * | 2022-07-05 | 2024-01-11 | 华为技术有限公司 | Age identification method and apparatus, electronic device, and storage medium |
CN115862118A (en) * | 2023-01-29 | 2023-03-28 | 南京开为网络科技有限公司 | Human face age estimation method and device based on Gaussian distribution hypothesis and MSE loss |
CN115862118B (en) * | 2023-01-29 | 2023-05-23 | 南京开为网络科技有限公司 | Face age estimation method and device based on Gaussian distribution hypothesis and MAE loss |
Also Published As
Publication number | Publication date |
---|---|
CN112307796B (en) | 2022-06-24 |
CN112307796A (en) | 2021-02-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021012383A1 (en) | Age prediction method and device for infrared image | |
CN108921051B (en) | Pedestrian attribute identification network and technology based on cyclic neural network attention model | |
US10223582B2 (en) | Gait recognition method based on deep learning | |
CN107633226B (en) | Human body motion tracking feature processing method | |
EP3843035A1 (en) | Image processing method and apparatus for target recognition | |
EP3017403A2 (en) | System and method for abnormality detection | |
TWI734375B (en) | Image processing method, proposal evaluation method, and related devices | |
CN109858327B (en) | Character segmentation method based on deep learning | |
CN113642431A (en) | Training method and device of target detection model, electronic equipment and storage medium | |
CN106228139A (en) | A kind of apparent age prediction algorithm based on convolutional network and system thereof | |
KR20100038899A (en) | Extraction method of skin-colored region using variable skin color model | |
Broadwater et al. | Adaptive threshold estimation via extreme value theory | |
Ali et al. | Sampling variability in forensic likelihood-ratio computation: a simulation study | |
CN116092183A (en) | Gesture recognition method and device, electronic equipment and storage medium | |
CN110163130B (en) | Feature pre-alignment random forest classification system and method for gesture recognition | |
CN112287726B (en) | Infrared sample image acquisition method and device | |
Lu et al. | Image-specific prior adaptation for denoising | |
CN111144462A (en) | Unknown individual identification method and device for radar signals | |
Kyeremateng-Boateng et al. | Computing confidence score for neural network predictions from latent features | |
CN114186646A (en) | Block chain abnormal transaction identification method and device, storage medium and electronic equipment | |
CN117315310A (en) | Image recognition method, image recognition model training method and device | |
CN111695404A (en) | Pedestrian falling detection method and device, electronic equipment and storage medium | |
CN112733722B (en) | Gesture recognition method, device, system and computer readable storage medium | |
CN109670470B (en) | Pedestrian relationship identification method, device and system and electronic equipment | |
Chen et al. | Class‐wise boundary regression by uncertainty in temporal action detection |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19938258 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19938258 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19938258 Country of ref document: EP Kind code of ref document: A1 |