Age prediction method, device, electronic device and storage medium

By preprocessing and feature extraction of eye images and data, and calculating age deviation values using residual networks, the problem of inaccurate age prediction caused by insufficient image data is solved, and more efficient age prediction is achieved.

CN114387660BActive Publication Date: 2025-04-04PING AN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210143388.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-16
Publication Date
2025-04-04
Estimated Expiration
2042-02-16

AI Technical Summary

Technical Problem

The existing image-based age prediction methods lack sufficient labeled image data, resulting in low accuracy of neural network models, affecting the accuracy of age prediction.

Method used

By obtaining the target eye image and corresponding flow survey data, image preprocessing and data preprocessing are performed, feature extraction and stitching are used to calculate the target age deviation value, and finally the target age value is obtained.

Benefits of technology

Improves the accuracy of age prediction, reduces prediction costs, and simplifies data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114387660B_ABST
    Figure CN114387660B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides an age prediction method, device, electronic device and storage medium, which belongs to the field of artificial intelligence technology. The method includes: obtaining a target eye image and target flow data corresponding to the target eye image; performing image preprocessing on the target eye image to obtain a standard eye image, and performing data preprocessing on the target flow data to obtain a gender feature vector corresponding to the standard eye image; performing age prediction processing on the standard eye image through a preset age prediction model to obtain an eye pooling feature vector and target age group data; splicing the eye pooling feature vector, the gender feature vector, and the target age group data through the age prediction model to obtain an age feature vector; calculating the target age deviation value according to the preset prediction function and the age feature vector; obtaining the target age value according to the target age group data and the target age deviation value. The embodiment of the present application can improve the accuracy of age prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to an age prediction method, device, electronic device and storage medium. Background Art

[0002] At present, image-based age prediction methods require a large amount of labeled image data with real age labels to train neural network models. However, since labeling a large amount of labeled image data requires a lot of manpower and time costs, the current labeled image data is relatively small, resulting in low accuracy in age prediction by the trained neural network model, which affects the accuracy of age prediction. Therefore, how to improve the accuracy of age prediction has become a technical problem that needs to be solved urgently. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to propose an age prediction method, device, electronic device and storage medium, aiming to improve the accuracy of age prediction.

[0004] To achieve the above object, a first aspect of an embodiment of the present application proposes an age prediction method, the method comprising:

[0005] Obtaining a target eye image and target flow survey data corresponding to the target eye image;

[0006] Performing image preprocessing on the target eye image to obtain a standard eye image, and performing data preprocessing on the target flow survey data to obtain a gender feature vector corresponding to the standard eye image;

[0007] Performing age prediction processing on the standard eye image using a preset age prediction model to obtain an eye pooling feature vector and target age group data;

[0008] The eye pooling feature vector, the gender feature vector, and the target age group data are concatenated using the age prediction model to obtain an age feature vector;

[0009] Calculating a target age deviation value according to a preset prediction function and the age feature vector;

[0010] A target age value is obtained according to the target age group data and the target age deviation value.

[0011] In some embodiments, the step of performing image preprocessing on the target eye image to obtain a standard eye image, and performing data preprocessing on the target flow survey data to obtain a gender feature vector corresponding to the standard eye image includes:

[0012] Scaling the target eye image according to preset measurement parameters to obtain a first eye image;

[0013] Performing standardization processing on the first eye image to obtain a second eye image;

[0014] The second eye image is normalized to obtain the standard eye image.

[0015] In some embodiments, the step of performing image preprocessing on the target eye image to obtain a standard eye image, and performing data preprocessing on the target flow survey data to obtain a gender feature vector corresponding to the standard eye image includes:

[0016] Extracting features from the target epidemiological survey data to obtain gender feature data;

[0017] The gender feature data is subjected to one-hot encoding processing to obtain the gender feature vector.

[0018] In some embodiments, the age prediction model includes a first residual network, and the step of performing age prediction processing on the standard eye image through a preset age prediction model to obtain an eye pooling feature vector and target age group data includes:

[0019] Performing feature extraction on the standard eye image through the first residual network to obtain an eye feature map;

[0020] Performing pooling processing on the eye feature map through the first residual network to obtain the eye pooling feature vector;

[0021] Age group prediction is performed using the eye pooling feature vector and the gender feature vector to obtain the target age group data.

[0022] In some embodiments, the step of performing age group prediction using the eye pooling feature vector and the gender feature vector to obtain the target age group data includes:

[0023] Concatenating the eye pooling feature vector and the gender feature vector to obtain an age group feature vector;

[0024] Calculate the predicted probability value of a preset age group by using a preset first function and the age group feature vector;

[0025] The target age group data is obtained according to the predicted probability value.

[0026] In some embodiments, the age prediction model further includes a second residual network, and the step of performing splicing processing on the eye pooling feature vector, the gender feature vector, and the target age group data through the age prediction model to obtain the age feature vector includes:

[0027] Extracting features of the target age group data by using the second residual network to obtain an initial age value;

[0028] performing vectorization processing on the initial age value through the second residual network to obtain an initial age vector;

[0029] The eye pooling feature vector, the gender feature vector and the initial age vector are concatenated to obtain the age feature vector.

[0030] In some embodiments, the step of calculating the target age deviation value according to the preset prediction function and the age feature vector includes:

[0031] Calculate the weight ratio of each preset reference age deviation value according to the prediction function and the age feature vector;

[0032] The reference age deviation value is weightedly calculated according to the weight ratio to obtain the target age deviation value.

[0033] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides an age prediction device, the device comprising:

[0034] An acquisition module, used to acquire a target eye image and target flow adjustment data corresponding to the target eye image;

[0035] A preprocessing module, used to perform image preprocessing on the target eye image to obtain a standard eye image, and perform data preprocessing on the target flow survey data to obtain a gender feature vector corresponding to the standard eye image;

[0036] An age group prediction module, used to perform age group prediction processing on the standard eye image through a preset age prediction model to obtain an eye pooling feature vector and target age group data;

[0037] A splicing module, used for splicing the eye pooling feature vector, the gender feature vector, and the target age group data through the age prediction model to obtain an age feature vector;

[0038] An age deviation value calculation module, used to calculate a target age deviation value according to a preset prediction function and the age feature vector;

[0039] The target age value calculation module is used to obtain the target age value according to the target age group data and the target age deviation value.

[0040] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory, a processor, a computer program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein the computer program, when executed by the processor, realizes the method described in the first aspect above.

[0041] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, which stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to implement the method described in the first aspect above.

[0042] The age prediction method, device, electronic device and storage medium proposed in the present application obtain the target eye image and the target flow data corresponding to the target eye image; perform image preprocessing on the target eye image to obtain the standard eye image, and perform data preprocessing on the target flow data to obtain the gender feature vector corresponding to the standard eye image, which can effectively eliminate the data with low correlation in the video data, so that the obtained image and data are more in line with the prediction requirements, and improve the rationality of the data. In addition, since the eye image is simple to shoot, the cost is low, and the data is easy to obtain, the prediction cost can be reduced to a certain extent. Then, the standard eye image is processed by the preset age prediction model to predict the age group, and the eye pooling feature vector and the target age group data are obtained. In this way, the age group corresponding to the eye image can be easily predicted, thereby improving the prediction accuracy of age. Then, the eye pooling feature vector, the gender feature vector, and the target age group data are spliced ​​by the age prediction model to obtain the age feature vector, and the target age deviation value is calculated according to the preset prediction function and the age feature vector. In this way, the age deviation can be easily calculated, thereby reducing the prediction error. Finally, the target age value is obtained according to the target age group data and the target age deviation value, which can improve the accuracy of age prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 is a flow chart of the age prediction method provided in an embodiment of the present application;

[0044] Figure 2 yes Figure 1 Flow chart of step S102 in FIG.

[0045] Figure 3 yes Figure 1Another flow chart of step S102 in FIG. 1 ;

[0046] Figure 4 yes Figure 1 Flow chart of step S103 in FIG.

[0047] Figure 5 yes Figure 4 Flow chart of step S403 in FIG.

[0048] Figure 6 yes Figure 1 Flow chart of step S104 in FIG.

[0049] Figure 7 yes Figure 1 Flow chart of step S105 in FIG.

[0050] Figure 8 is a schematic diagram of the structure of an age prediction device provided in an embodiment of the present application;

[0051] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0053] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0055] First, some nouns involved in this application are analyzed:

[0056] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0057] Natural language processing (NLP): NLP uses computers to process, understand and apply human languages ​​(such as Chinese, English, etc.). NLP is a branch of artificial intelligence and an interdisciplinary subject between computer science and linguistics. It is often referred to as computational linguistics. Natural language processing includes grammatical analysis, semantic analysis, and text understanding. Natural language processing is often used in technical fields such as machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, information intent recognition, information extraction and filtering, text classification and clustering, public opinion analysis and opinion mining. It involves data mining related to language processing, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, and linguistic research related to language computing.

[0058] Information Extraction (NER): A text processing technology that extracts specified types of entity, relationship, event and other factual information from natural language text and forms structured data output. Information extraction is a technology that extracts specific information from text data. Text data is composed of some specific units, such as sentences, paragraphs, and chapters. Text information is composed of some small specific units, such as characters, words, phrases, sentences, paragraphs, or a combination of these specific units. Extracting noun phrases, names, place names, etc. from text data are all text information extraction. Of course, the information extracted by text information extraction technology can be various types of information.

[0059] Supervised learning: Supervised learning, also known as supervised training or learning with a teacher, refers to the process of adjusting the parameters of a classifier using a set of samples of known categories to achieve the required performance. Supervised learning is a machine learning task to infer a function from labeled training data. The training data includes a set of training instances, each of which consists of an input object (usually a vector) and a desired output value (also called a supervisory signal). The supervised learning algorithm analyzes the training data and produces an inferred function that can be used to map new instances.

[0060] Magnetic Resonance Imaging (MRI): MRI, also known as magnetic resonance imaging, is a physical phenomenon that is widely used in physics, chemistry, biology and other fields as an analytical method. MRI applies a certain frequency of radio frequency pulses to the human body in a static magnetic field, which excites the hydrogen protons in the human body and causes magnetic resonance.

[0061] Medical imaging: Medical imaging has multiple image modalities, such as magnetic resonance (MR), computed tomography (CT), PET, ultrasound (US) imaging, etc.

[0062] Residual Network: Residual network can fully utilize all hierarchical features of the original LR (Lightroom) image through residual dense block (RDB). For a very deep network, it is difficult and impractical to directly extract the output of each convolutional layer in the LR space. Use RDB as the building block of residual dense network (RDN). RDB contains densely connected layers and local feature fusion (LFF) with local residual learning (LRL). Each convolutional layer of RDB can access all subsequent layers and pass the information that needs to be retained. LFF extracts local dense features by adaptively preserving information by connecting the previous RDB with the state of all previous layers of the current RDB. In addition, LFF achieves extremely high growth rate by stabilizing the training of larger networks. After extracting multiple layers of local dense features, global feature fusion (GFF) is further performed to adaptively retain hierarchical features in a global manner. Each layer has direct access to the original LR input, resulting in implicit deep supervised learning.

[0063] In the field of computer vision, image-based age estimation is an important branch. Specifically, based on a face image, estimating the exact age of the person in the image has important application value in the fields of human-computer interaction, user profiling, video surveillance, information recommendation, etc.

[0064] At present, image-based age prediction methods require a large amount of labeled image data to train the neural network model, where the label can be the exact age of the person in the image. However, the current stock of labeled images is small, which means that there are fewer images that can be used to train the neural network model, resulting in lower accuracy of the trained neural network model, which affects the accuracy of age prediction. Therefore, how to provide an age prediction method to improve prediction accuracy has become a technical problem that needs to be solved urgently.

[0065] Based on this, the embodiments of the present application provide an age prediction method, device, electronic device and storage medium, aiming to improve the accuracy of age prediction.

[0066] The age prediction method, device, electronic device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the age prediction method in the embodiments of the present application is described.

[0067] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0068] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0069] The age prediction method provided in the embodiment of the present application relates to the field of artificial intelligence technology. The age prediction method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the age prediction method, etc., but is not limited to the above forms.

[0070] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0071] Figure 1 is an optional flowchart of the age prediction method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.

[0072] Step S101, obtaining a target eye image and target flow adjustment data corresponding to the target eye image;

[0073] Step S102, performing image preprocessing on the target eye image to obtain a standard eye image, and performing data preprocessing on the target flow survey data to obtain a gender feature vector corresponding to the standard eye image;

[0074] Step S103, performing age prediction processing on the standard eye image using a preset age prediction model to obtain an eye pooling feature vector and target age group data;

[0075] Step S104, concatenating the eye pooling feature vector, the gender feature vector, and the target age group data through an age prediction model to obtain an age feature vector;

[0076] Step S105, calculating the target age deviation value according to the preset prediction function and the age feature vector;

[0077] Step S106, obtaining a target age value according to the target age group data and the target age deviation value.

[0078] In step S101 to step S106 of the embodiment of the present application, by performing image preprocessing on the target eye image, a standard eye image is obtained, and data preprocessing is performed on the target flow data to obtain the gender feature vector corresponding to the standard eye image, which can effectively eliminate the data with low correlation in the video data, so that the obtained image and data are more in line with the prediction requirements, and the rationality of the data is improved. Among them, the target eye image can be a fundus image. Since the fundus image is simple to shoot, the cost is low, and the data is easy to obtain, the embodiment of the present application uses the fundus image for age prediction, which can reduce the prediction cost and prediction difficulty to a certain extent. The standard eye image is processed for age group prediction through the preset age prediction model to obtain the eye pooling feature vector and the target age group data, which can conveniently predict the age group corresponding to the eye image, thereby improving the prediction accuracy of age. The target age deviation value is calculated through the preset prediction function and the age feature vector, and the age deviation can be conveniently calculated, thereby reducing the prediction error. Finally, according to the target age group data and the target age deviation value, the target age value is obtained, which can improve the accuracy of age prediction.

[0079] In step S101 of some embodiments, the target eye image can be obtained through a medical database, wherein the target eye image is a three-dimensional image, which can be obtained through CT or MRI. The target flow survey data is the user data obtained by collecting flow survey data corresponding to the target eye image, and the target flow survey data can be obtained by writing a web crawler, setting the data source, and then crawling data in a targeted manner. It should be noted that the target flow survey data includes the gender data of the user corresponding to the target eye image.

[0080] In some medical application scenarios, the above-mentioned target eye image may be a medical image, and the type of object contained in the target eye image is a lesion, that is, a part of the body where a disease occurs. Medical images refer to internal tissues obtained in a non-invasive manner for medical treatment or medical research, such as CT, MRI, ultrasound, X-ray images, and images generated by medical instruments using optical photography lights.

[0081] It should be noted that, in order to improve data rationality and prediction accuracy, before step S101 in some embodiments, the age prediction method further includes:

[0082] Obtaining original eye images and original flow survey data corresponding to each original eye image;

[0083] The original eye image and the original flow survey data are cleaned to obtain the target eye image and the target flow survey data.

[0084] Specifically, the original eye image is obtained through the medical database, wherein the original eye image is a three-dimensional image, which can be obtained through CT or MRI. The original flow survey data is the user data obtained by collecting flow survey data corresponding to the original eye image. The original flow survey data can be obtained by writing a web crawler, setting the data source, and then crawling the data in a targeted manner. It should be noted that the original flow survey data includes the gender data of the user corresponding to the original eye image. Then, the original eye image and the original flow survey data are cleaned according to the preset image resolution, grayscale value and other screening conditions, and the blurred image or the unrecognizable original eye image caused by the disease, as well as the missing or abnormal original flow survey data are eliminated to obtain the target eye image and the target flow survey data.

[0085] See also Figure 2 In some embodiments, step S102 may include but is not limited to steps S201 to S203:

[0086] Step S201, scaling the target eye image according to preset measurement parameters to obtain a first eye image;

[0087] Step S202, performing standardization processing on the first eye image to obtain a second eye image;

[0088] Step S203, normalizing the second eye image to obtain a standard eye image.

[0089] In step S201 of some embodiments, the target eye image may be scaled by using a resize function and preset metric parameters to change the width and height of the image to obtain a first eye image. For example, if the preset metric parameters require a width of 512 and a height of 512, the target eye image is scaled to a size of 512×512 by using a resize function.

[0090] In step S202 of some embodiments, the first eye image may be de-meaned to achieve centralization, so as to achieve standardization of the first eye image and obtain the second eye image. The standardization formula is shown in formula (1):

[0091]

[0092] Where x is the pixel matrix of the first eye image, μ is the mean of the reference image, and σ is the standard deviation of the reference image. Normalization can make the first eye image have the same distribution as the reference image (i.e., the size and number of channels are the same).

[0093] In step S203 of some embodiments, the second eye image may be processed by a maximum-minimum normalization method to obtain a target image. The normalization formula is shown in formula (2):

[0094]

[0095] Among them, x i is the pixel value of the second eye image, max(x) is the maximum pixel value of the second eye image, and min(x) is the minimum pixel value of the second eye image.

[0096] Through the above steps S201 to S203, the target eye image can be preprocessed, irrelevant information in the target eye image can be eliminated, useful real information can be restored, the detectability of relevant information can be enhanced, and the data can be simplified to the maximum extent to improve the reliability of age prediction.

[0097] See also Figure 3 In some embodiments, step S102 may include but is not limited to steps S301 to S302:

[0098] Step S301, extracting features from the target epidemiological survey data to obtain gender feature data;

[0099] Step S302, performing one-hot encoding processing on the gender feature data to obtain a gender feature vector.

[0100] In step S301 of some embodiments, first, the target flow data is subjected to label classification processing according to preset category labels and sequence classifiers to obtain labeled flow data. Specifically, the entity features of the target flow data are marked using pre-trained sequence classifiers and feature category labels, so that these entity features can all be labeled with preset labels to improve classification efficiency. Among them, the feature category labels include gender labels, name labels, etc., and the pre-trained sequence classifier can be a model based on the conditional random field algorithm (CRF) or a model based on the bidirectional long short-term memory algorithm (bi-LSTM). For example, a sequence classifier can be constructed based on the bi-LSTM algorithm. In the model based on the bi-LSTM algorithm, the word wi and character embedding of the target flow data are input, and a single output layer is generated at the position where the output is connected through the left-to-right long short-term memory and the right-to-left long short-term memory. The sequence classifier can pass the input entity features directly to the softmax classifier through this output layer. The softmax classifier creates a probability distribution on the preset feature category label, so as to label and classify the entity features according to the probability distribution, and identify the gender feature data corresponding to the gender label from the entity features with multiple different feature category labels. Furthermore, the labeled flow adjustment data is convoluted through the convolution layer to extract the gender feature data corresponding to the corresponding gender label.

[0101] It should be noted that One-Hot encoding is also called one-bit effective encoding. Its method is to use an N-bit state register to encode N states. Each state has its own independent register bit, and only one state is valid at any time. One-hot encoding is to use a vector of length V to represent each gender feature data.

[0102] In step S302 of some embodiments, the gender feature data can be represented as a vector through one-hot encoding, with male gender recorded as [0,1] and female gender recorded as [1,0], thereby obtaining a gender feature vector corresponding to each standard fundus image.

[0103] It should be noted that the age prediction model in the embodiment of the present application is a convolutional neural network model, including a first residual network and a second residual network. The first residual network and the second residual network both include a convolution layer, a pooling layer, and a fully connected layer. The first residual network is used to predict the age group and obtain the target age group, and the second residual network is used to calculate the age deviation and obtain the target age deviation value.

[0104] Before step 103 in some embodiments, the age prediction method further includes pre-training an age prediction model, specifically including:

[0105] a. Obtaining a labeled eye image, wherein the labeled eye image includes a gender feature label;

[0106] b. Input the labeled eye image into the age prediction model;

[0107] c. Use the first residual network of the age prediction model to predict the age group and obtain the sample age group;

[0108] d. Calculate the age deviation through the second residual network of the age prediction model to obtain the sample age deviation value;

[0109] e. According to the sample age group, sample age deviation value and gender feature label, the loss function of the age prediction model is optimized to update the age prediction model.

[0110] In steps a and b of some embodiments, a sample eye image can be obtained through a medical database, and the gender parameters of the user corresponding to the sample eye image can be obtained through a web crawler or other means, so that the sample eye image can be labeled to obtain a labeled eye image with a gender feature label, and the labeled eye image can be input into the age prediction model.

[0111] In step c of some embodiments, feature extraction and pooling processing are performed on the labeled eye image through a first residual network to obtain a sample eye pooling feature vector, and then the predicted probability value of each preset age group is calculated through a preset softmax function and the sample eye pooling feature vector, and the age group with the largest predicted probability value is taken as the sample age group.

[0112] In step d of some embodiments, feature extraction and vectorization are performed on the sample age segment through a second residual network to obtain a sample age feature vector, thereby calculating the weight ratio of each preset reference age deviation value through a prediction function (such as a softmax function) and the sample age feature vector, and weightedly calculating the reference age deviation value and the weight ratio of the reference age deviation value through a sum function to obtain a sample age deviation value.

[0113] In step e of some embodiments, since the first residual network needs to calculate the predicted probability value corresponding to each preset age group, that is, the classification results of the preset 10 age groups (0 to 10 years old, 10 to 20 years old, ..., 90 to 100 years old), a multi-classification cross entropy loss function can be used to calculate the first loss value LOSS1 of the first residual network, wherein the multi-classification cross entropy loss function is shown in formula (3):

[0114]

[0115] Wherein, N is the batch size; M is the number of age categories, and in the embodiment of the present application, M is 10; y i,c is the age category label. If the true age category of the sample eye image i is equal to c, then y i,c Take 1, otherwise y i,c Take 0; p i,c is the predicted probability value that the sample age group of the sample eye image belongs to c.

[0116] Since the age deviation value needs to be calculated through the second residual network, which is equivalent to calculating the predicted age value, the mean square error loss function can be used to calculate the second loss value LOSS2 of the second residual network, where the mean square error loss function is shown in formula (4):

[0117]

[0118] Where N is the batch size; is the preset reference age deviation value; i is the sample age deviation value.

[0119] Therefore, when optimizing the loss function of the age prediction model according to the sample age group, the sample age deviation value and the gender feature label, the loss function of the age prediction model can be expressed as shown in formula (5):

[0120] LOSS=a*LOSS1+b*LOSS2 Formula (5)

[0121] Among them, a and b are weight parameters, which can be set according to actual conditions without restriction.

[0122] The model loss LOSS of the age prediction model can be easily calculated in the above manner, and the model loss can be back-propagated to the age prediction model to adjust the model parameters of the age prediction model so that the model loss satisfies the preset iteration conditions and the optimization of the age prediction model is stopped, wherein the iteration condition can be that the model loss is less than or equal to the preset model loss threshold, or the number of iterations reaches the preset iteration number threshold, etc.

[0123] See also Figure 4 In some embodiments, step S103 may also include but is not limited to steps S401 to S403:

[0124] Step S401, extracting features of a standard eye image through a first residual network to obtain an eye feature map;

[0125] Step S402, performing pooling processing on the eye feature map through a first residual network to obtain an eye pooling feature vector;

[0126] Step S403, predicting the age group by using the eye pooling feature vector and the gender feature vector to obtain target age group data.

[0127] In step S401 of some embodiments, convolution processing is performed on the standard eye image through the convolution layer of the first residual network, such as using the LISM algorithm to extract features of the standard eye image to obtain an eye feature map.

[0128] In step S402 of some embodiments, the eye feature map is subjected to maximum pooling processing by the pooling layer of the first residual network to obtain the maximum pooling eye feature vector, and the eye feature map is subjected to average pooling processing by the pooling layer to obtain the average pooling eye feature vector, and finally the maximum pooling eye feature vector and the average pooling eye feature vector are vector-added to obtain the eye pooling feature vector.

[0129] In step S403 of some embodiments, the fundus pooling feature vector and the gender feature vector are firstly vector-added by the sum function in the first residual network, so that the obtained age group feature vector can carry both eye physiological characteristics and gender feature data, thereby improving the prediction accuracy. Furthermore, the predicted probability value corresponding to each preset age group is calculated respectively by the preset first function (such as the softmax function) and the age group feature vector, and the softmax function can create a probability distribution according to the preset age group category to obtain the predicted probability value. Thus, the age group that the user corresponding to the target eye image is most likely to be in is obtained. It should be noted that the first function is a function that can be used for classification prediction, and the first function can be a softmax function or other functions.

[0130] See also Figure 5 In some embodiments, step S403 may also include but is not limited to steps S501 to S503:

[0131] Step S501, concatenating the eye pooling feature vector and the gender feature vector to obtain an age group feature vector;

[0132] Step S502, calculating the predicted probability value of the preset age group by using the preset first function and the age group feature vector;

[0133] Step S503, obtaining target age group data according to the predicted probability value.

[0134] In step S501 of some embodiments, the eye pooling feature vector and the gender feature vector are vector-added by a sum function in the first residual network to obtain an age group feature vector.

[0135] In step S502 of some embodiments, after the fully connected layer of the first residual network, the predicted probability value of each preset age group is calculated by the softmax function and the age group feature vector, and the softmax function can create a probability distribution according to the preset age group category to obtain the predicted probability value. The preset age group can include 10 categories, namely 0 to 10 years old, 10 to 20 years old, ..., 90 to 100 years old.

[0136] In step S503 of some embodiments, the age group with the largest predicted probability value may be selected as the target age group according to the predicted probability value, thereby obtaining the target age group data.

[0137] See also Figure 6 In some embodiments, the age prediction model further includes a second residual network, and step S104 may also include but is not limited to steps S601 to S603:

[0138] Step S601, extracting features of the target age group data through a second residual network to obtain an initial age value;

[0139] Step S602, vectorizing the initial age value through a second residual network to obtain an initial age vector;

[0140] Step S603, concatenating the eye pooling feature vector, the gender feature vector and the initial age vector to obtain an age feature vector.

[0141] In step S601 of some embodiments, according to preset feature extraction requirements, the convolutional layer of the second residual network can be used to extract age values ​​that are odd multiples of 5 in the target age range, and this age value is used as the initial age value, that is, the initial age value can be 5, 15, ..., 95 and so on.

[0142] In step S602 of some embodiments, the initial age value is first binarized, and then the binarized initial age value is input into a fully connected layer of the second residual network, and the initial age vector is output through the fully connected layer.

[0143] In step S603 of some embodiments, vector concatenation processing (ie, vector addition) is performed on the eye pooling feature vector, the gender feature vector and the initial age vector using a sum function to obtain an age feature vector.

[0144] See also Figure 7 In some embodiments, step S105 may also include but is not limited to steps S701 to S702:

[0145] Step S701, calculating the weight ratio of each preset reference age deviation value according to the prediction function and the age feature vector;

[0146] Step S702, performing weighted calculation on the reference age deviation value according to the weight ratio to obtain the target age deviation value.

[0147] In step S701 of some embodiments, after the fully connected layer of the second residual network, the weight proportion (i.e., probability value) of each preset reference age deviation value is calculated by the prediction function and the age feature vector, wherein the prediction function may be a softmax function, which can create a probability distribution according to the reference age deviation value, generate a probability value corresponding to each predicted reference age deviation value, and thus obtain the weight proportion of the reference age deviation value. The preset reference age deviation value may include 11 categories, namely, ±5, ±4, ±3, ±2, ±1, and 0.

[0148] In step S702 of some embodiments, the reference age deviation value and the weight ratio of the reference age deviation value are weightedly calculated using a sum function to obtain a target age deviation value.

[0149] For example, the weights of +5, +4, +3, and +2 are all 0.15; the weights of -5, -4, -3, -2, and -1 are all 0.05; the weight of 0 is 0.2, so the target age deviation value is 5*0.15+4*0.15+3*0.15+2*0.15+1*0.15-5*0.05-4*0.05-3*0.05-2*0.05-1*0.05+0*0.2=1.5.

[0150] In step S106 of some embodiments, the target age value can be obtained by extracting the endpoint age value of the target age range data and adding the endpoint age value and the target age deviation value. For example, if the target age range is 30 to 40 years old and the target age deviation value is +5 years old, then the target age value is 35 to 45 years old.

[0151] The embodiment of the present application obtains the target eye image and the target flow data corresponding to the target eye image; performs image preprocessing on the target eye image to obtain a standard eye image, and performs data preprocessing on the target flow data to obtain the gender feature vector corresponding to the standard eye image, which can effectively eliminate the data with low correlation in the video data, so that the obtained image and data are more in line with the prediction requirements, and improve the rationality of the data. In addition, since the eye image is simple to shoot, the cost is low, and the data is easy to obtain, the prediction cost can be reduced to a certain extent. Then, the standard eye image is processed by the preset age prediction model to predict the age group, and the eye pooling feature vector and the target age group data are obtained. In this way, the age group corresponding to the eye image can be easily predicted, thereby improving the prediction accuracy of age. Then, the eye pooling feature vector, the gender feature vector, and the target age group data are spliced ​​by the age prediction model to obtain the age feature vector, and the target age deviation value is calculated according to the preset prediction function and the age feature vector. In this way, the age deviation can be easily calculated, thereby reducing the prediction error. Finally, the target age value is obtained according to the target age group data and the target age deviation value, which can improve the accuracy of age prediction.

[0152] See also Figure 8 The present application also provides an age prediction device, which can implement the above-mentioned age prediction method, and the device includes:

[0153] An acquisition module 801 is used to acquire a target eye image and target flow adjustment data corresponding to the target eye image;

[0154] The preprocessing module 802 is used to perform image preprocessing on the target eye image to obtain a standard eye image, and perform data preprocessing on the target flow survey data to obtain a gender feature vector corresponding to the standard eye image;

[0155] The age group prediction module 803 is used to perform age group prediction processing on the standard eye image through a preset age prediction model to obtain an eye pooling feature vector and target age group data;

[0156] A splicing module 804 is used to splice the eye pooling feature vector, the gender feature vector, and the target age group data through the age prediction model to obtain an age feature vector;

[0157] The age deviation value calculation module 805 is used to calculate the target age deviation value according to the preset prediction function and the age feature vector;

[0158] The target age value calculation module 806 is used to obtain the target age value according to the target age group data and the target age deviation value.

[0159] The specific implementation of the age prediction device is basically the same as the specific implementation of the age prediction method described above, and will not be repeated here.

[0160] The embodiment of the present application also provides an electronic device, the electronic device comprising: a memory, a processor, a computer program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein the computer program is executed by the processor to realize the above-mentioned age prediction method. The electronic device may be any intelligent terminal including a tablet computer, a vehicle-mounted computer, etc.

[0161] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0162] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0163] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the age prediction method of the embodiment of this application;

[0164] Input / output interface 903, used to implement information input and output;

[0165] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0166] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);

[0167] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0168] An embodiment of the present application also provides a computer-readable storage medium, which stores one or more computer programs. The one or more computer programs can be executed by one or more processors to implement the above-mentioned age prediction method.

[0169] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0170] The age prediction method, age prediction device, electronic device and storage medium provided in the embodiment of the present application obtain the target eye image and the target flow data corresponding to the target eye image; perform image preprocessing on the target eye image to obtain the standard eye image, and perform data preprocessing on the target flow data to obtain the gender feature vector corresponding to the standard eye image, which can effectively eliminate the data with low correlation in the video data, so that the obtained image and data are more in line with the prediction requirements, and improve the rationality of the data. In addition, since the eye image is simple to shoot, the cost is low, and the data is easy to obtain, the prediction cost can be reduced to a certain extent. Then, the standard eye image is processed by the preset age prediction model to predict the age range, and the eye pooling feature vector and the target age range data are obtained. In this way, the age range corresponding to the eye image can be easily predicted, thereby improving the prediction accuracy of age. Then, the eye pooling feature vector, the gender feature vector, and the target age range data are spliced ​​by the age prediction model to obtain the age feature vector, and the target age deviation value is calculated according to the preset prediction function and the age feature vector. In this way, the age deviation can be conveniently calculated, thereby reducing the prediction error. Finally, the target age value is obtained according to the target age group data and the target age deviation value, which can improve the accuracy of age prediction.

[0171] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0172] It can be understood by those skilled in the art that Figure 1-7The technical solutions shown in the figure do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than those shown in the figure, or a combination of certain steps, or different steps.

[0173] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0174] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0175] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0176] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0177] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0178] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0179] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0180] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0181] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. An age prediction method, characterized in that: The method comprises: Obtaining a target eye image and target flow survey data corresponding to the target eye image; Performing image preprocessing on the target eye image to obtain a standard eye image, and performing data preprocessing on the target flow survey data to obtain a gender feature vector corresponding to the standard eye image; Performing age prediction processing on the standard eye image using a preset age prediction model to obtain an eye pooling feature vector and target age group data; The eye pooling feature vector, the gender feature vector, and the target age group data are concatenated using the age prediction model to obtain an age feature vector; Calculating a target age deviation value according to a preset prediction function and the age feature vector; Obtaining a target age value according to the target age group data and the target age deviation value; The step of calculating the target age deviation value according to the preset prediction function and the age feature vector includes: Calculate the weight ratio of each preset reference age deviation value according to the prediction function and the age feature vector; The reference age deviation value is weightedly calculated according to the weight ratio to obtain the target age deviation value.

2. The age prediction method according to claim 1, characterized in that: The step of performing image preprocessing on the target eye image to obtain a standard eye image, and performing data preprocessing on the target flow survey data to obtain a gender feature vector corresponding to the standard eye image includes: Scaling the target eye image according to preset measurement parameters to obtain a first eye image; Performing standardization processing on the first eye image to obtain a second eye image; The second eye image is normalized to obtain the standard eye image.

3. The age prediction method according to claim 1, characterized in that: The step of performing image preprocessing on the target eye image to obtain a standard eye image, and performing data preprocessing on the target flow survey data to obtain a gender feature vector corresponding to the standard eye image includes: Extracting features from the target epidemiological survey data to obtain gender feature data; The gender feature data is subjected to one-hot encoding processing to obtain the gender feature vector.

4. The age prediction method according to claim 1, characterized in that: The age prediction model includes a first residual network, and the step of performing age prediction processing on the standard eye image through a preset age prediction model to obtain an eye pooling feature vector and target age group data includes: Performing feature extraction on the standard eye image through the first residual network to obtain an eye feature map; Performing pooling processing on the eye feature map through the first residual network to obtain the eye pooling feature vector; Age group prediction is performed using the eye pooling feature vector and the gender feature vector to obtain the target age group data.

5. The age prediction method according to claim 4, characterized in that: The step of performing age group prediction by using the eye pooling feature vector and the gender feature vector to obtain the target age group data comprises: Concatenating the eye pooling feature vector and the gender feature vector to obtain an age group feature vector; Calculate the predicted probability value of a preset age group by using a preset first function and the age group feature vector; The target age group data is obtained according to the predicted probability value.

6. The age prediction method according to any one of claims 1 to 5, characterized in that: The age prediction model further includes a second residual network, and the step of performing splicing processing on the eye pooling feature vector, the gender feature vector, and the target age group data through the age prediction model to obtain the age feature vector includes: Extracting features of the target age group data by using the second residual network to obtain an initial age value; performing vectorization processing on the initial age value through the second residual network to obtain an initial age vector; The eye pooling feature vector, the gender feature vector and the initial age vector are concatenated to obtain the age feature vector.

7. An age prediction device, characterized in that: The device comprises: An acquisition module, used to acquire a target eye image and target flow adjustment data corresponding to the target eye image; A preprocessing module, used to perform image preprocessing on the target eye image to obtain a standard eye image, and perform data preprocessing on the target flow survey data to obtain a gender feature vector corresponding to the standard eye image; An age group prediction module, used to perform age group prediction processing on the standard eye image through a preset age prediction model to obtain an eye pooling feature vector and target age group data; A splicing module, used for splicing the eye pooling feature vector, the gender feature vector, and the target age group data through the age prediction model to obtain an age feature vector; An age deviation value calculation module, used to calculate a target age deviation value according to a preset prediction function and the age feature vector; A target age value calculation module, used to obtain a target age value according to the target age group data and the target age deviation value; The step of calculating the target age deviation value according to the preset prediction function and the age feature vector includes: Calculate the weight ratio of each preset reference age deviation value according to the prediction function and the age feature vector; The reference age deviation value is weightedly calculated according to the weight ratio to obtain the target age deviation value.

8. An electronic device, characterized in that: The electronic device includes a memory, a processor, a computer program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the computer program is executed by the processor, the steps of the age prediction method as described in any one of claims 1 to 6 are realized.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to implement the steps of the age prediction method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Age determination method and device and eye health degree determination method and device

    CN110135528A

  • Anterior segment physiological age prediction method and device, server and storage medium

    CN111862020A