WO2022042043A1 - 机器学习模型的训练方法、装置和电子设备 - Google Patents

机器学习模型的训练方法、装置和电子设备 Download PDF

Info

Publication number
WO2022042043A1
WO2022042043A1 PCT/CN2021/104517 CN2021104517W WO2022042043A1 WO 2022042043 A1 WO2022042043 A1 WO 2022042043A1 CN 2021104517 W CN2021104517 W CN 2021104517W WO 2022042043 A1 WO2022042043 A1 WO 2022042043A1
Authority
WO
WIPO (PCT)
Prior art keywords
machine learning
learning model
loss function
image sample
image
Prior art date
Application number
PCT/CN2021/104517
Other languages
English (en)
French (fr)
Inventor
王婷婷
Original Assignee
京东方科技集团股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 京东方科技集团股份有限公司 filed Critical 京东方科技集团股份有限公司
Priority to US17/788,608 priority Critical patent/US20230030419A1/en
Publication of WO2022042043A1 publication Critical patent/WO2022042043A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/09Supervised learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • G06V10/443Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering
    • G06V10/449Biologically inspired filters, e.g. difference of Gaussians [DoG] or Gabor filters
    • G06V10/451Biologically inspired filters, e.g. difference of Gaussians [DoG] or Gabor filters with interaction between the filter responses, e.g. cortical complex cells
    • G06V10/454Integrating the filters into a hierarchical structure, e.g. convolutional neural networks [CNN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/7715Feature extraction, e.g. by transforming the feature space, e.g. multi-dimensional scaling [MDS]; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/178Human faces, e.g. facial parts, sketches or expressions estimating age from face image; using age information for improving recognition
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Definitions

  • the present application is based on the CN application number 202010878794.7 and the filing date is August 27, 2020, and claims its priority.
  • the disclosure of the CN application is hereby incorporated into the present application as a whole.
  • the present disclosure relates to the technical field of artificial intelligence, and in particular, to a method for training a machine learning model, a device for a machine learning model, a method for recognizing age in a face image, an apparatus for recognizing an age in a face image, an electronic device, and a non-volatile computer Read the storage medium.
  • Deep machine learning is one of the most important breakthroughs in the field of artificial intelligence in the past decade. It has achieved great success in speech recognition, natural language processing, computer vision, image and video analysis, multimedia and many other fields.
  • face image processing technology based on deep machine learning is a very important research direction in computer vision tasks.
  • Age estimation based on face image refers to the application of computer technology to model the law of face image change with age, so that the machine can infer the approximate age of a person or the age range to which they belong based on the face image.
  • This technology has many applications, such as video surveillance, product recommendation, human-computer interaction, market analysis, user profiling, age progression, etc. If the age estimation problem based on face images is solved, then in daily life, various human-computer interaction systems based on age information will have great application requirements in real life.
  • the machine learning model is trained by using the output results of the machine learning model itself and the pre-labeled results.
  • a method for training a machine learning model comprising: inputting an image sample into a regression machine learning model; extracting a feature map of the image sample by using the regression machine learning model, and The feature map determines the recognition result of the image sample; the feature map is input into a classification machine learning model; according to the feature map, the classification machine learning model is used to determine the membership probability that the image sample belongs to each classification; The recognition result and the labeling result of the image sample are used to calculate the first loss function, and the second loss function is calculated according to the membership probability and the labeling result of the image sample; using the first loss function and the second loss function The loss function to train the regression machine learning model.
  • the using the first loss function and the second loss function to train the regression machine learning model includes: training the regression machine learning model using the first loss function, and then using the first loss function to train the regression machine learning model.
  • the regression machine learning model is trained by a weighted sum of the first loss function and the second loss function.
  • the training of the regression machine learning model using the first loss function and the second loss function includes: training the classification machine learning model using the second loss function, and then using the second loss function to train the classification machine learning model.
  • the classification machine learning model is trained by a weighted sum of the first loss function and the second loss function.
  • the calculating the second loss function according to the membership probability and the labeling result of the image sample includes: according to the proportion of the number of samples in the correct classification to which the image sample belongs to the total number of samples, The second loss function is calculated, and the second loss function is negatively correlated with the proportion.
  • using the regression machine learning model to extract the feature map of the image sample includes: using the regression machine learning model to extract the channel features of the image samples for each image channel; combining the channel features into the image samples feature map.
  • using a regression machine learning model to extract the channel features of the image samples for each image channel includes: using a regression machine learning model to convolve the image samples according to different image channels to extract the characteristics of each channel.
  • determining the membership probability of the image sample belonging to each category by using a classification machine learning model according to the feature map includes: using the classification machine learning model to determine each image channel in the feature map The association information between the two images; the feature map is updated according to the association information; the membership probability that the image sample belongs to each category is determined according to the updated feature map.
  • the updating the feature map according to the association information includes: determining the weight of each channel feature according to the association information; using the weight to perform weighting processing on the corresponding channel feature; After processing the features of each channel, the feature map is updated.
  • the image sample is a face image sample
  • the recognition result is the age of the face in the face image sample
  • each classification is a classification of each age group.
  • an apparatus for training a machine learning model comprising at least one processor configured to perform the steps of: inputting image samples into a regression machine learning model, and using the regression machine
  • the learning model extracts the feature map of the image sample, and determines the recognition result of the image sample according to the feature map; inputs the feature map into the classification machine learning model, and uses the classification machine learning model according to the feature map.
  • determine the membership probability that the image sample belongs to each category calculate the first loss function according to the recognition result and the labeling result of the image sample, and calculate the second loss function according to the membership probability and the labeling result of the image sample loss function; using the first loss function and the second loss function to train the regression machine learning model.
  • the using the first loss function and the second loss function to train the regression machine learning model includes: training the regression machine learning model using the first loss function, and then using the first loss function to train the regression machine learning model.
  • the regression machine learning model is trained by a weighted sum of the first loss function and the second loss function.
  • the training of the regression machine learning model using the first loss function and the second loss function includes: training the classification machine learning model using the second loss function, and then using the second loss function to train the classification machine learning model.
  • the classification machine learning model is trained by a weighted sum of the first loss function and the second loss function.
  • the calculating the second loss function according to the membership probability and the labeling result of the image sample includes: according to the proportion of the number of samples in the correct classification to which the image sample belongs to the total number of samples, The second loss function is calculated, and the second loss function is negatively correlated with the proportion.
  • using the regression machine learning model to extract the feature map of the image sample includes: using the regression machine learning model to extract the channel features of the image samples for each image channel; combining the channel features into the image samples feature map.
  • using a regression machine learning model to extract the channel features of the image samples for each image channel includes: using a regression machine learning model to convolve the image samples according to different image channels to extract the characteristics of each channel.
  • determining the membership probability of the image sample belonging to each category by using a classification machine learning model according to the feature map includes: using the classification machine learning model to determine each image channel in the feature map The association information between the two images; the feature map is updated according to the association information; the membership probability that the image sample belongs to each category is determined according to the updated feature map.
  • the updating the feature map according to the association information includes: determining the weight of each channel feature according to the association information; using the weight to perform weighting processing on the corresponding channel feature; After processing the features of each channel, the feature map is updated.
  • the image sample is a face image sample
  • the recognition result is the age of the face in the face image sample
  • each classification is a classification of each age group.
  • a method for recognizing the age of a face image comprising: recognizing the age of the face in the face image using a regression machine learning model trained by the training method in any of the above embodiments.
  • an apparatus for identifying age of a face image comprising at least one processor configured to perform the following steps: using the training method in any one of the above embodiments to train the regression A machine learning model that recognizes the age of faces in images of faces.
  • an electronic device comprising: a memory; and a processor coupled to the memory, the processor configured to execute the above-described based on instructions stored in the memory device.
  • a non-volatile computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the method for training a machine learning model in any of the foregoing embodiments Or age recognition methods for face images.
  • FIG. 1 shows a flowchart of some embodiments of the training method of the machine learning model of the present disclosure
  • FIG. 2 shows a flowchart of some embodiments of step 110 in FIG. 1;
  • FIG. 3 shows a flowchart of some embodiments of step 120 in FIG. 1;
  • FIG. 4 shows a schematic diagram of some embodiments of the training method of the machine learning model of the present disclosure
  • Figure 5 shows a flowchart of some embodiments of the apparatus for training a machine learning model of the present disclosure
  • FIG. 6 illustrates a block diagram of some embodiments of electronic devices of the present disclosure
  • FIG. 7 illustrates a block diagram of further embodiments of the electronic device of the present disclosure.
  • the inventors of the present disclosure have found that the above-mentioned related technologies have the following problems: the training effect cannot meet the task requirements, resulting in low processing capability of the machine learning model.
  • the present disclosure proposes a technical solution for training a machine learning model, which can use a classification model to assist in training a regression model, thereby improving the processing capability of the machine learning model.
  • a regression machine learning model (such as for age recognition) can be constructed by using a convolutional network with fewer parameters (such as a shuffle Net model, etc.), which can improve the processing speed on the premise of ensuring the processing accuracy.
  • a classification machine learning model with fine processing granularity (such as attention network) is used to assist in training. This allows, for example, to distinguish faces of different ages on features such as facial complexion.
  • the technical solutions of the present disclosure can be realized through the following embodiments.
  • FIG. 1 shows a flowchart of some embodiments of the training method of the machine learning model of the present disclosure.
  • the training method includes: step 110, determining the recognition result of the image sample; step 120, determining each membership probability of the image sample; step 130, calculating the first and second loss functions; and step 140, training the regression machine Learning models.
  • step 110 the image sample is input into the regression machine learning model, the feature map of the image sample is extracted by using the regression machine learning model, and the recognition result of the image sample is determined according to the feature map.
  • the feature map may be extracted by the embodiment in FIG. 2 .
  • FIG. 2 shows a flowchart of some embodiments of step 110 in FIG. 1 .
  • step 110 includes: step 1110 , extracting features of each channel; and step 1120 , combining feature maps.
  • step 1110 a regression machine learning model is used to extract the channel features of the image samples for each image channel.
  • a regression machine learning model is used to convolve image samples according to different image channels to extract features of each channel.
  • step 1120 the channel features are combined into a feature map of the image sample.
  • step 120 the feature map is input into the classification machine learning model, and the classification machine learning model is used to determine the membership probability of the image sample belonging to each classification according to the feature map.
  • membership probabilities may be determined by the embodiment in FIG. 3 .
  • FIG. 3 shows a flowchart of some embodiments of step 120 in FIG. 1 .
  • step 120 includes: step 1210 , determining the associated information of each image channel; step 1220 , updating the feature map; and step 1230 , determining each membership probability.
  • the classification machine learning model is used to determine the correlation information between the image channels in the feature map.
  • the correlation information between the channel features in the feature map can be extracted as the correlation information between each image channel.
  • step 1220 the feature map is updated according to the associated information.
  • the weight of each channel feature is determined according to the correlation information; the feature map is updated according to the weighted channel feature.
  • step 1230 the membership probability of the image sample belonging to each category is determined according to the updated feature map.
  • step 130 a first loss function is calculated according to the recognition result and the labeling result of the image sample.
  • a second loss function is calculated according to the membership probability and the labeling result of the image sample.
  • the first loss function may be implemented using Mae loss (Mean Absolute loss, mean absolute error).
  • the first loss function can be:
  • yi is the labeling result of the image sample (such as the real age value)
  • Recognition results (such as predicted age values) output by a regression machine learning model.
  • Mae loss is insensitive to outliers, thereby improving the performance of machine learning models.
  • the second loss function is calculated according to the proportion of the number of samples in the correct classification to which the image samples belong to the total number of samples.
  • the second loss function is negatively related to the proportion.
  • the correct classification of the current image sample is class i
  • the number of samples in class i is n i
  • the total number of samples in all classes is N.
  • the second loss function is negatively related to the proportion of ni in N.
  • the number of samples in the sample datasets of various age groups are not evenly distributed. For example, particularly young children and older adults over 65 are less present. In this case, treating each age group equally to calculate the loss function would result in a lower training effect.
  • Focal loss can be used to solve the problem of imbalanced proportions of different types of samples.
  • the second loss function can be determined as:
  • y i ' is the membership probability of the current image sample to category i.
  • y i_label is the labeling result of the current image sample for category i. For example, if the correct classification of the current image sample is class i, then y i_label is 1, otherwise it is 0.
  • ⁇ >0 is an adjustable hyperparameter, which can reduce the loss of easy-to-classify samples and make the training process focus more on difficult and misclassified samples.
  • class_weight i is the proportion parameter of class i, and class_weight i can be:
  • class_weight i N/(n class ⁇ n i )
  • n class is the number of all classes.
  • step 140 a regression machine learning model is trained using the first loss function and the second loss function.
  • the regression machine learning model is trained using the first loss function, and then the regression machine learning model is trained using a weighted sum of the first loss function and the second loss function.
  • the classification machine learning model is trained using the second loss function, and then the classification machine learning model is trained using a weighted sum of the first loss function and the second loss function.
  • the weighted sum of the first loss function and the second loss function can be used to determine the comprehensive loss function L for training a regression machine learning model and a classification machine learning model:
  • the image sample may be a face image sample
  • the recognition result is the age of the face in the face image sample
  • each classification is a classification of each age group.
  • the regression machine learning model is used to estimate the age of the face
  • the classification machine learning model is used to determine the membership probability that the face belongs to each age category (eg, age group).
  • the regression machine learning model trained by the training method in any of the above embodiments can be used to identify the age of the face in the face image.
  • FIG. 4 shows a schematic diagram of some embodiments of the training method of the machine learning model of the present disclosure.
  • the entire network model can be divided into two parts: a regression machine learning model for extracting features and age estimation; a classification machine learning model with an attention mechanism module for calculating the membership probability of each classification.
  • a regression machine learning model may be constructed using the Group convolution and Channel shuffle modules of shuffle Net V2 (shuffle network).
  • the grouped convolution module may group different feature maps of the input layer according to different image channels. Then use different convolution kernels to convolve each group.
  • a grouped convolution module can be implemented using Depth Wise, where the number of groups is equal to the number of input channels.
  • this channel sparse connection method can be used to reduce the calculation amount of convolution.
  • the output is the convolution result of each group, that is, the feature of each channel.
  • the grouped convolution results cannot achieve the purpose of feature communication between channels.
  • the channel shuffling module can be used to "recombine" the features of each channel, so that the recombined feature map can contain the components in the features of each channel.
  • the grouped convolution module taking the restructured feature map as input can continue to perform feature extraction based on information from different channels. Therefore, this information can flow between different groups, improving the processing power of the machine learning model.
  • a regression machine learning model can include the Conv1_BR module.
  • the Conv1_BR module can include convolutional layers (such as 16 3 ⁇ 3 convolution kernels with stride of 2 and padding of 1) and BR (Batch norm Relu, batch regularization activation) layer.
  • multiple grouped convolution modules and multiple channel reorganization modules can be alternately connected for extracting feature maps.
  • the Conv5_BR module can be connected after multiple grouped convolution modules and multiple channel reorganization modules.
  • the Conv5_BR module can include convolutional layers (such as 32 1 ⁇ 1 convolutions with stride of 1 and padding of 0) and BR layers.
  • the Conv5_BR module can be followed by connecting a Flatten (flattening) layer, a fully connected layer Fc1 (such as a fully connected layer whose dimension is the number of age categories), a Softmax layer, and a fully connected layer Fc2 (such as dimension 1).
  • the output of Fc2 can be an age estimate.
  • the CAM Choannel Attention mechanism, channel attention mechanism CAM
  • DANet Dual Attention Network, dual attention mechanism network
  • the CAM module is used to extract the relationship (association information) between the features of each channel. For example, each channel feature can be weighted according to the associated information to update each channel feature.
  • a classification machine learning model can include a Conv6_BR layer connected after a CAM module.
  • the Conv6_BR layer can include convolutional layers (such as 32 1 ⁇ 1 convolutions with stride of 1 and padding of 0) and BR layers.
  • a Flatten layer for example, a fully connected layer Fc_fl (such as a fully connected layer with a dimension equal to the number of age values), and a softmax layer can also be connected behind the Conv6_BR layer.
  • the final output face belongs to the membership probability of each age value.
  • a regression machine learning model may be trained according to a first loss function; a classification machine learning model may be trained according to a second loss function; and a regression machine learning model may be trained with a comprehensive loss function.
  • the classification learning model is used to share the feature map extracted by the regression learning model, and assist in training the regression learning model.
  • the machine learning model can be trained by combining classification processing and regression processing, thereby improving the processing capability of the machine learning model.
  • Figure 5 shows a flowchart of some embodiments of the apparatus for training a machine learning model of the present disclosure.
  • the training device 5 of the machine learning model includes at least one processor 51 .
  • the processor 51 is configured to perform the training method in any of the above-described embodiments.
  • FIG. 6 illustrates a block diagram of some embodiments of electronic devices of the present disclosure.
  • the electronic device 6 of this embodiment includes: a memory 61 and a processor 62 coupled to the memory 61 , the processor 62 is configured to execute any one of the present disclosure based on instructions stored in the memory 61 The training method of the machine learning model or the age recognition method of the face image in the embodiment.
  • the memory 61 may include, for example, a system memory, a fixed non-volatile storage medium, and the like.
  • the system memory stores, for example, an operating system, an application program, a boot loader (Boot Loader), a database, and other programs.
  • FIG. 7 illustrates a block diagram of further embodiments of the electronic device of the present disclosure.
  • the electronic device 7 of this embodiment includes: a memory 710 and a processor 720 coupled to the memory 710 , and the processor 720 is configured to execute any one of the foregoing embodiments based on instructions stored in the memory 710 Training methods for machine learning models in or age recognition methods for face images.
  • Memory 710 may include, for example, system memory, fixed non-volatile storage media, and the like.
  • the system memory stores, for example, an operating system, an application program, a boot loader (Boot Loader), and other programs.
  • the electronic device 7 may also include an input-output interface 730, a network interface 740, a storage interface 750, and the like. These interfaces 730 , 740 , 750 and the memory 710 and the processor 720 can be connected, for example, through a bus 760 .
  • the input and output interface 730 provides a connection interface for input and output devices such as a display, a mouse, a keyboard, a touch screen, a microphone, and a speaker.
  • Network interface 740 provides a connection interface for various networked devices.
  • the storage interface 750 provides a connection interface for external storage devices such as SD cards and U disks.
  • embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein .
  • computer-usable non-transitory storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.
  • the methods and systems of the present disclosure may be implemented in many ways.
  • the methods and systems of the present disclosure may be implemented in software, hardware, firmware, or any combination of software, hardware, and firmware.
  • the above-described order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise.
  • the present disclosure can also be implemented as programs recorded in a recording medium, the programs including machine-readable instructions for implementing methods according to the present disclosure.
  • the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Multimedia (AREA)
  • Computing Systems (AREA)
  • Medical Informatics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Evolutionary Biology (AREA)
  • Biodiversity & Conservation Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Image Analysis (AREA)

Abstract

本公开涉及一种机器学习模型的训练方法、装置和电子设备,涉及人工智能技术领域。该训练方法包括:将图像样本输入回归机器学习模型,利用回归机器学习模型提取图像样本的特征图,根据特征图确定所述图像样本的识别结果;将特征图输入分类机器学习模型,根据特征图,利用分类机器学习模型,确定图像样本属于各分类的隶属概率;根据识别结果和图像样本的标注结果,计算第一损失函数,根据隶属概率和所述图像样本的标注结果,计算第二损失函数;利用第一损失函数和第二损失函数,训练回归机器学习模型。

Description

机器学习模型的训练方法、装置和电子设备
相关申请的交叉引用
本申请是以CN申请号为202010878794.7,申请日为2020年8月27日的申请为基础,并主张其优先权,该CN申请的公开内容在此作为整体引入本申请中。
技术领域
本公开涉及人工智能技术领域,特别涉及一种机器学习模型的训练方法、机器学习模型的装置、人脸图像的年龄识别方法、人脸图像的年龄识别装置、电子设备和非易失性计算机可读存储介质。
背景技术
深度机器学习是近十年来人工智能领域取得的最重要的突破之一。它在语音识别、自然语言处理、计算机视觉、图像与视频分析、多媒体等诸多领域都取得了巨大成功。
例如,基于深度机器学习的人脸图像处理技术是计算机视觉任务中一个非常重要的研究方向。
人脸的年龄信息作为人类的一种重要生物特征,在人机交互领域中有着众多应用需求,并且对人脸识别***的性能有着重要影响。基于人脸图像的年龄估计是指应用计算机技术对人脸图像随年龄变化的规律进行建模,从而使机器能够根据面部图像推测出人的大概年龄或所属的年龄范围。
这项技术有很多应用,如视频监控、产品推荐、人机交互、市场分析、用户画像、年龄变化预测(age progression)等。如果基于人脸图像的年龄估计问题得到解决,那么在日常生活中,基于年龄信息的各种人机交互***将在现实生活中有着极大的应用需求。
因此,如何训练出优质的机器学习模型,是解决各类人工智能应用需求的基础。
在相关技术中,利用机器学习模型自身的输出结果和预先标注结果,训练该机器学习模型。
发明内容
根据本公开的一些实施例,提供了一种机器学习模型的训练方法,包括:将图像 样本输入回归机器学习模型;利用所述回归机器学习模型提取所述图像样本的特征图,并根据所述特征图确定所述图像样本的识别结果;将所述特征图输入分类机器学习模型;根据所述特征图,利用所述分类机器学习模型,确定所述图像样本属于各分类的隶属概率;根据所述识别结果和所述图像样本的标注结果,计算第一损失函数,根据所述隶属概率和所述图像样本的标注结果,计算第二损失函数;利用所述第一损失函数和所述第二损失函数,训练所述回归机器学习模型。
在一些实施例中,所述利用所述第一损失函数和所述第二损失函数,训练所述回归机器学习模型包括:利用所述第一损失函数训练所述回归机器学习模型,然后利用所述第一损失函数和所述第二损失函数的加权和训练所述回归机器学习模型。
在一些实施例中,所述利用所述第一损失函数和所述第二损失函数,训练所述回归机器学习模型包括:利用所述第二损失函数训练所述分类机器学习模型,然后利用所述第一损失函数和所述第二损失函数的加权和训练所述分类机器学习模型。
在一些实施例中,所述根据所述隶属概率和所述图像样本的标注结果,计算第二损失函数包括:根据所述图像样本所属正确分类中的样本数量在总样本数量中的占比,计算所述第二损失函数,所述第二损失函数与所述占比负相关。
在一些实施例中,所述利用回归机器学习模型提取图像样本的特征图包括:利用回归机器学习模型提取所述图像样本对于各图像通道的通道特征;将各通道特征组合为所述图像样本的特征图。
在一些实施例中,所述利用回归机器学习模型提取所述图像样本对于各图像通道的通道特征包括:利用回归机器学习模型,按照不同的图像通道分别对所述图像样本进行卷积,以提取所述各通道特征。
在一些实施例中,所述根据所述特征图,利用分类机器学习模型,确定所述图像样本属于各分类的隶属概率包括:利用所述分类机器学习模型,确定所述特征图中各图像通道之间的关联信息;根据所述关联信息,更新所述特征图;根据更新后的特征图,确定所述图像样本属于各分类的隶属概率。
在一些实施例中,所述根据所述关联信息,更新所述特征图包括:根据所述关联信息,确定所述各通道特征的权重;利用权重,对相应的通道特征进行加权处理;根据加权处理后的所述各通道特征,更新所述特征图。
在一些实施例中,所述图像样本为人脸图像样本,所述识别结果为所述人脸图像样本中人脸的年龄,所述各分类为各年龄段分类。
根据本公开的另一些实施例,提供一种机器学习模型的训练装置,包括至少一个处理器,所述处理器被配置为执行如下步骤:将图像样本输入回归机器学习模型,利用所述回归机器学习模型提取所述图像样本的特征图,并根据所述特征图确定所述图像样本的识别结果;将所述特征图输入分类机器学习模型,根据所述特征图,利用所述分类机器学习模型,确定所述图像样本属于各分类的隶属概率;根据所述识别结果和所述图像样本的标注结果,计算第一损失函数,根据所述隶属概率和所述图像样本的标注结果,计算第二损失函数;利用所述第一损失函数和所述第二损失函数,训练所述回归机器学习模型。
在一些实施例中,所述利用所述第一损失函数和所述第二损失函数,训练所述回归机器学习模型包括:利用所述第一损失函数训练所述回归机器学习模型,然后利用所述第一损失函数和所述第二损失函数的加权和训练所述回归机器学习模型。
在一些实施例中,所述利用所述第一损失函数和所述第二损失函数,训练所述回归机器学习模型包括:利用所述第二损失函数训练所述分类机器学习模型,然后利用所述第一损失函数和所述第二损失函数的加权和训练所述分类机器学习模型。
在一些实施例中,所述根据所述隶属概率和所述图像样本的标注结果,计算第二损失函数包括:根据所述图像样本所属正确分类中的样本数量在总样本数量中的占比,计算所述第二损失函数,所述第二损失函数与所述占比负相关。
在一些实施例中,所述利用回归机器学习模型提取图像样本的特征图包括:利用回归机器学习模型提取所述图像样本对于各图像通道的通道特征;将各通道特征组合为所述图像样本的特征图。
在一些实施例中,所述利用回归机器学习模型提取所述图像样本对于各图像通道的通道特征包括:利用回归机器学习模型,按照不同的图像通道分别对所述图像样本进行卷积,以提取所述各通道特征。
在一些实施例中,所述根据所述特征图,利用分类机器学习模型,确定所述图像样本属于各分类的隶属概率包括:利用所述分类机器学习模型,确定所述特征图中各图像通道之间的关联信息;根据所述关联信息,更新所述特征图;根据更新后的特征图,确定所述图像样本属于各分类的隶属概率。
在一些实施例中,所述根据所述关联信息,更新所述特征图包括:根据所述关联信息,确定所述各通道特征的权重;利用权重,对相应的通道特征进行加权处理;根据加权处理后的所述各通道特征,更新所述特征图。
在一些实施例中,所述图像样本为人脸图像样本,所述识别结果为所述人脸图像样本中人脸的年龄,所述各分类为各年龄段分类。
根据本公开的又一些实施例,提供一种人脸图像的年龄识别方法,包括:利用上述任一个实施例中的训练方法训练的回归机器学习模型,识别人脸图像中人脸的年龄。
根据本公开的再一些实施例,提供一种人脸图像的年龄识别装置,包括至少一个处理器,所述处理器被配置为执行如下步骤:利用上述任一个实施例中的训练方法训练的回归机器学习模型,识别人脸图像中人脸的年龄。
根据本公开的又一些实施例,提供一种电子设备,包括:存储器;和耦接至所述存储器的处理器,所述处理器被配置为基于存储在所述存储器装置中的指令,执行上述任一个实施例中的机器学习模型的训练方法或人脸图像的年龄识别方法。
根据本公开的再一些实施例,提供一种非易失性计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述任一个实施例中的机器学习模型的训练方法或人脸图像的年龄识别方法。
附图说明
构成说明书的一部分的附图描述了本公开的实施例,并且连同说明书一起用于解释本公开的原理。
参照附图,根据下面的详细描述,可以更加清楚地理解本公开,其中:
图1示出本公开的机器学习模型的训练方法的一些实施例的流程图;
图2示出图1中步骤110的一些实施例的流程图;
图3示出图1中步骤120的一些实施例的流程图;
图4示出本公开的机器学习模型的训练方法的一些实施例的示意图;
图5示出本公开的机器学习模型的训练装置的一些实施例的流程图;
图6示出本公开的电子设备的一些实施例的框图;
图7示出本公开的电子设备的另一些实施例的框图。
具体实施方式
现在将参照附图来详细描述本公开的各种示例性实施例。应注意到:除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值不限制本公开的范围。
同时,应当明白,为了便于描述,附图中所示出的各个部分的尺寸并不是按照实际的比例关系绘制的。
以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本公开及其应用或使用的任何限制。
对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,所述技术、方法和设备应当被视为授权说明书的一部分。
在这里示出和讨论的所有示例中,任何具体值应被解释为仅仅是示例性的,而不是作为限制。因此,示例性实施例的其它示例可以具有不同的值。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。
本公开的发明人发现上述相关技术中存在如下问题:训练效果无法满足任务需求,导致机器学模型的处理能力低。
鉴于此,本公开提出了一种机器学习模型的训练技术方案,能够利用分类模型辅助训练回归模型,从而提高机器学模型的处理能力。
在一些实施例中,可以利用参数较少的卷积网络(如shuffle Net模型等)构建回归机器学习模型(如用于年龄识别),能够在保证处理准确度的前提下,提高处理速度。针对需要精细处理粒度的分类问题(如年龄分类问题),利用处理粒度较精细的分类机器学习模型(如注意力网络)辅助进行训练。例如,这样可以在脸色的等特征上区分不同年龄的人脸。例如,可以通过下面的实施例实现本公开的技术方案。
图1示出本公开的机器学习模型的训练方法的一些实施例的流程图。
如图1所示,训练方法包括:步骤110,确定图像样本的识别结果;步骤120,确定图像样本的各隶属概率;步骤130,计算第一、第二损失函数;和步骤140,训练回归机器学习模型。
在步骤110中,将图像样本输入回归机器学习模型,利用回归机器学习模型提取图像样本的特征图,并根据特征图确定所述图像样本的识别结果。
在一些实施例中,可以通过图2中的实施例提取特征图。
图2示出图1中步骤110的一些实施例的流程图。
如图2所示,步骤110包括:步骤1110,提取各通道特征;和步骤1120,组合特征图。
在步骤1110中,利用回归机器学习模型提取所述图像样本对于各图像通道的通 道特征。
在一些实施例中,利用回归机器学习模型,按照不同的图像通道分别对图像样本进行卷积,以提取各通道特征。
在步骤1120中,将各通道特征组合为图像样本的特征图。
在提取了特征图后,可以继续通过图1中的其余步骤进行训练。
在步骤120中,将特征图输入分类机器学习模型,根据特征图,利用分类机器学习模型,确定图像样本属于各分类的隶属概率。
在一些实施例中,可以通过图3中的实施例确定隶属概率。
图3示出图1中步骤120的一些实施例的流程图。
如图3所示,步骤120包括:步骤1210,确定各图像通道的关联信息;步骤1220,更新特征图;和步骤1230,确定各隶属概率。
在步骤1210中,利用分类机器学习模型,确定特征图中各图像通道之间的关联信息。例如,可以提取特征图中各通道特征之间的关联信息,作为各图像通道之间的关联信息。
在步骤1220中,根据关联信息,更新特征图。
在一些实施例中,根据关联信息,确定各通道特征的权重;根据加权处理后的各通道特征,更新特征图。
在步骤1230中,根据更新后的特征图,确定图像样本属于各分类的隶属概率。
在确定了隶属概率后,可以继续通过图1中的其余步骤进行训练。
在步骤130中,根据识别结果和图像样本的标注结果,计算第一损失函数。根据隶属概率和所述图像样本的标注结果,计算第二损失函数。
在一些实施例中,可以利用Mae loss(Mean Absolute loss,平均绝对误差)实现第一损失函数。例如,第一损失函数可以为:
Figure PCTCN2021104517-appb-000001
例如,y i为图像样本的标注结果(如真实年龄数值),
Figure PCTCN2021104517-appb-000002
为回归机器学习模型输出的识别结果(如预测年龄数值)。Mae loss对异常值不敏感,从而提高机器学习模型的性能。
在一些实施例中,根据图像样本所属正确分类中的样本数量在总样本数量中的占比,计算第二损失函数。第二损失函数与占比负相关。例如,当前图像样本的正确分类为分类i,分类i中的样本数量为n i,所有分类中的总样本数量为N。在这种情 况下,第二损失函数与n i在N中的占比负相关。
这样,可以解决各样本分类中样本数量分布不均匀的问题。
在一些实施例中,各种年龄段的样本数据集中的样本数量分布都不均衡。例如,特别是年龄小的儿童和65岁以上的老年人人数较少。在这种情况下,对各年龄段进行平均对待,以计算损失函数会造成训练效果降低。
在这种情况下,可以采用Focal loss解决不同类型样本比例失衡的问题。例如,结合多分类问题,可以确定第二损失函数为:
L 2=class_weight i(1-y i′×y i_label) γ×log(i i′×y i_label)
y i′为当前图像样本对于分类i的隶属概率。y i_label为当前图像样本对于分类i的标注结果。例如,当前图像样本的正确分类为分类i,则y i_label为1,否则为0。γ>0为可调节的超参数,能够减少易分类样本的损失,使得训练过程更关注于困难的、错分的样本。
class_weight i为分类i的占比参数,class_weight i可以为:
class_weight i=N/(n class×n i)
n class为所有分类的数量。
在步骤140中,利用第一损失函数和第二损失函数,训练回归机器学习模型。
在一些实施例中,利用第一损失函数训练回归机器学习模型,然后利用第一损失函数和第二损失函数的加权和训练回归机器学习模型。
在一些实施例中,利用第二损失函数训练分类机器学习模型,然后利用第一损失函数和第二损失函数的加权和训练分类机器学习模型。
例如,可以利用第一损失函数和第二损失函数的加权和确定综合损失函数L,用于训练回归机器学习模型和分类机器学习模型:
L=L 1+L 2
在一些实施例中,图像样本可以为人脸图像样本,识别结果为人脸图像样本中人脸的年龄,各分类为各年龄段分类。回归机器学习模型用于估计人脸的年龄,分类机器学习模型用于确定人脸属于各年龄分类(如年龄段)的隶属概率。
例如,可以利用上述任一个实施例中的训练方法训练的回归机器学习模型,识别人脸图像中人脸的年龄。
图4示出本公开的机器学习模型的训练方法的一些实施例的示意图。
如图4所示,整个网络模型可分为两个部分:用于提取特征并进行年龄估计的回 归机器学习模型;具有注意力机制模块,用于计算各分类隶属概率的分类机器学习模型。
在一些实施例中,可以使用shuffle Net V2(混洗网络)的分组卷积(Group convolution)模块和通道混洗(Channel shuffle)模块构建回归机器学习模型。
在一些实施例中,分组卷积模块可以按照不同的图像通道,将输入层的不同特征图进行分组。然后采用不同的卷积核,对各分组进行卷积。例如,可以利用深度分离卷积(Depth Wise)实现分组卷积模块,此时分组数量等于输入通道数量。
这样,可以利用这种通道稀疏连接方式,降低卷积的计算量。
在一些实施例中,经过分组卷积模块处理后,输出的是各分组的卷积结果,即各通道特征。分组卷积结果无法达到通道间特征通信的目的。鉴于此,可以利用通道混洗模块对各通道特征进行“重组”,使得重组后的特征图能够包含各通道特征中的分量。
这样,可以保证以重组后的特征图作为输入的分组卷积模块能够根据来源于不同通道的信息,继续进行特征提取。因此,这些信息可以在不同分组之间流转,提高机器学习模型的处理能力。
例如,回归机器学习模型可以包括Conv1_BR模块。Conv1_BR模块可以包括卷积层(如16个stride为2,padding为1的3×3卷积核)、BR(Batch norm Relu,批量正则化激活)层。
例如,在conv1_BR模块之后,可以交替连接多个分组卷积模块和多个通道重组模块,用于提取特征图。
例如,在多个分组卷积模块和多个通道重组模块之后,可以连接Conv5_BR模块。Conv5_BR模块可以包括卷积层(如32个stride为1,padding为0的1×1卷积)、BR层。
例如,Conv5_BR模块之后可以连接Flatten(平坦化)层、全连接层Fc1(如维度为年龄段分类数量的全连接层)、Softmax层、全连接层Fc2(如维度1)。Fc2的输出可以为年龄估计值。
在一些实施例中,可以利用DANet(Dual Attention Network,双注意力机制网络)中的CAM(Channel Attention mechanism,通道注意力机制CAM)模块,构建分类机器学习模型中的通道注意力模块。CAM模块用于提取各通道特征之间的关系(关联信息)。例如,可以根据关联信息,对各通道特征进行加权处理,以更新各通道特 征。
这样,可以增强特征图对图像的表达能力,从而提高机器学习模型的处理能力。
例如,分类机器学习模型可以包括连接在CAM模块后的Conv6_BR层。Conv6_BR层可以包括卷积层(如32个stride为1,padding为0的1×1卷积)、BR层。
例如,在Conv6_BR层后面还可以连接Flatten层、全连接层Fc_fl(如维度等于年龄数值的数量的全连接层)、softmax层。最终输出人脸属于各年龄数值的隶属概率。
在一些实施例中,可以根据第一损失函数训练回归机器学习模型;根据第二损失函数训练分类机器学习模型;利用综合损失函数训练回归机器学习模型。
在上述实施例中,针对同一处理任务,利用分类学习模型共享回归学习模型提取的特征图,并辅助训练回归学习模型。这样,可以结合分类处理和回归处理训练机器学习模型,从而提高机器学习模型的处理能力。
图5示出本公开的机器学习模型的训练装置的一些实施例的流程图。
如图5所示,机器学习模型的训练装置5,包括至少一个处理器51。处理器51被配置为执行上述任一个实施例中的训练方法。
图6示出本公开的电子设备的一些实施例的框图。
如图6所示,该实施例的电子设备6包括:存储器61以及耦接至该存储器61的处理器62,处理器62被配置为基于存储在存储器61中的指令,执行本公开中任意一个实施例中的机器学习模型的训练方法或人脸图像的年龄识别方法。
其中,存储器61例如可以包括***存储器、固定非易失性存储介质等。***存储器例如存储有操作***、应用程序、引导装载程序(Boot Loader)、数据库以及其他程序等。
图7示出本公开的电子设备的另一些实施例的框图。
如图7所示,该实施例的电子设备7包括:存储器710以及耦接至该存储器710的处理器720,处理器720被配置为基于存储在存储器710中的指令,执行前述任意一个实施例中的机器学习模型的训练方法或人脸图像的年龄识别方法。
存储器710例如可以包括***存储器、固定非易失性存储介质等。***存储器例如存储有操作***、应用程序、引导装载程序(Boot Loader)以及其他程序等。
电子设备7还可以包括输入输出接口730、网络接口740、存储接口750等。这些接口730、740、750以及存储器710和处理器720之间例如可以通过总线760连接。 其中,输入输出接口730为显示器、鼠标、键盘、触摸屏、麦克、音箱等输入输出设备提供连接接口。网络接口740为各种联网设备提供连接接口。存储接口750为SD卡、U盘等外置存储设备提供连接接口。
本领域内的技术人员应当明白,本公开的实施例可提供为方法、***、或计算机程序产品。因此,本公开可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本公开可采用在一个或多个其中包含有计算机可用程序代码的计算机可用非瞬时性存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
至此,已经详细描述了根据本公开的机器学习模型的训练方法、机器学习模型的装置、人脸图像的年龄识别方法、人脸图像的年龄识别装置、电子设备和非易失性计算机可读存储介质。为了避免遮蔽本公开的构思,没有描述本领域所公知的一些细节。本领域技术人员根据上面的描述,完全可以明白如何实施这里公开的技术方案。
可能以许多方式来实现本公开的方法和***。例如,可通过软件、硬件、固件或者软件、硬件、固件的任何组合来实现本公开的方法和***。用于所述方法的步骤的上述顺序仅是为了进行说明,本公开的方法的步骤不限于以上具体描述的顺序,除非以其它方式特别说明。此外,在一些实施例中,还可将本公开实施为记录在记录介质中的程序,这些程序包括用于实现根据本公开的方法的机器可读指令。因而,本公开还覆盖存储用于执行根据本公开的方法的程序的记录介质。
虽然已经通过示例对本公开的一些特定实施例进行了详细说明,但是本领域的技术人员应该理解,以上示例仅是为了进行说明,而不是为了限制本公开的范围。本领域的技术人员应该理解,可在不脱离本公开的范围和精神的情况下,对以上实施例进行修改。本公开的范围由所附权利要求来限定。

Claims (14)

  1. 一种机器学习模型的训练方法,包括:
    将图像样本输入回归机器学习模型,利用所述回归机器学习模型提取所述图像样本的特征图,根据所述特征图确定所述图像样本的识别结果;
    将所述特征图输入分类机器学习模型,根据所述特征图,利用所述分类机器学习模型,确定所述图像样本属于各分类的隶属概率;
    根据所述识别结果和所述图像样本的标注结果,计算第一损失函数,根据所述隶属概率和所述图像样本的标注结果,计算第二损失函数;
    利用所述第一损失函数和所述第二损失函数,训练所述回归机器学习模型。
  2. 根据权利要求1所述的训练方法,其中,所述利用所述第一损失函数和所述第二损失函数,训练所述回归机器学习模型包括:
    利用所述第一损失函数训练所述回归机器学习模型,然后利用所述第一损失函数和所述第二损失函数的加权和训练所述回归机器学习模型。
  3. 根据权利要求1所述的训练方法,其中,所述利用所述第一损失函数和所述第二损失函数,训练所述回归机器学习模型包括:
    利用所述第二损失函数训练所述分类机器学习模型,然后利用所述第一损失函数和所述第二损失函数的加权和训练所述分类机器学习模型。
  4. 根据权利要求1所述的训练方法,其中,所述根据所述隶属概率和所述图像样本的标注结果,计算第二损失函数包括:
    根据所述图像样本所属正确分类中的样本数量在总样本数量中的占比,计算所述第二损失函数,所述第二损失函数与所述占比负相关。
  5. 根据权利要求1所述的训练方法,其中,所述利用回归机器学习模型提取图像样本的特征图包括:
    利用回归机器学习模型提取所述图像样本对于各图像通道的通道特征;
    将各所述通道特征组合为所述图像样本的特征图。
  6. 根据权利要求5所述的训练方法,其中,所述利用回归机器学习模型提取所述图像样本对于各图像通道的通道特征包括:
    利用回归机器学习模型,按照不同的图像通道分别对所述图像样本进行卷积,提取所述各通道特征。
  7. 根据权利要求1所述的训练方法,其中,所述根据所述特征图,利用分类机器学习模型,确定所述图像样本属于各分类的隶属概率包括:
    利用所述分类机器学习模型,确定所述特征图中各图像通道之间的关联信息;
    根据所述关联信息,更新所述特征图;
    根据更新后的特征图,确定所述图像样本属于各分类的隶属概率。
  8. 根据权利要求7所述的训练方法,其中,所述根据所述关联信息,更新所述特征图包括:
    根据所述关联信息,确定所述各通道特征的权重;
    利用所述权重,对相应的通道特征进行加权处理;
    根据加权处理后的所述各通道特征,更新所述特征图。
  9. 根据权利要求1-8任一项所述的训练方法,其中,
    所述图像样本为人脸图像样本,所述识别结果为所述人脸图像样本中人脸的年龄,所述各分类为各年龄段分类。
  10. 一种人脸图像的年龄识别方法,包括:
    利用权利要求1-9任一项所述的训练方法训练的回归机器学习模型,识别人脸图像中人脸的年龄。
  11. 一种机器学习模型的训练装置,包括至少一个处理器,所述处理器被配置为执行如下步骤:
    将图像样本输入回归机器学习模型,利用所述回归机器学习模型提取所述图像样本的特征图,根据所述特征图确定所述图像样本的识别结果;
    将所述特征图输入分类机器学习模型,根据所述特征图,利用所述分类机器学习模型,确定所述图像样本属于各分类的隶属概率;
    根据所述识别结果和所述图像样本的标注结果,计算第一损失函数,根据所述隶属概率和所述图像样本的标注结果,计算第二损失函数;
    利用所述第一损失函数和所述第二损失函数,训练所述回归机器学习模型。
  12. 一种人脸图像的年龄识别装置,包括至少一个处理器,所述处理器被配置为执行如下步骤:
    利用权利要求1-9任一项所述的训练方法训练的回归机器学习模型,识别人脸图像中人脸的年龄。
  13. 一种电子设备,包括:
    存储器;和
    耦接至所述存储器的处理器,所述处理器被配置为基于存储在所述存储器中的指令,执行权利要求1-9任一项所述的机器学习模型的训练方法或权利要求10所述的人脸图像的年龄识别方法。
  14. 一种非易失性计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现权利要求1-9任一项所述的机器学习模型的训练方法或权利要求10所述的人脸图像的年龄识别方法。
PCT/CN2021/104517 2020-08-27 2021-07-05 机器学习模型的训练方法、装置和电子设备 WO2022042043A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/788,608 US20230030419A1 (en) 2020-08-27 2021-07-05 Machine Learning Model Training Method and Device and Electronic Equipment

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010878794.7A CN112016450B (zh) 2020-08-27 2020-08-27 机器学习模型的训练方法、装置和电子设备
CN202010878794.7 2020-08-27

Publications (1)

Publication Number Publication Date
WO2022042043A1 true WO2022042043A1 (zh) 2022-03-03

Family

ID=73502724

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/104517 WO2022042043A1 (zh) 2020-08-27 2021-07-05 机器学习模型的训练方法、装置和电子设备

Country Status (3)

Country Link
US (1) US20230030419A1 (zh)
CN (1) CN112016450B (zh)
WO (1) WO2022042043A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114714145A (zh) * 2022-05-07 2022-07-08 嘉兴南湖学院 一种刀具磨损状态的格拉姆角场增强对比学习监测方法
CN114743043A (zh) * 2022-03-15 2022-07-12 北京迈格威科技有限公司 一种图像分类方法、电子设备、存储介质及程序产品
CN115049851A (zh) * 2022-08-15 2022-09-13 深圳市爱深盈通信息技术有限公司 基于YOLOv5网络的目标检测方法、装置和设备终端
CN116564556A (zh) * 2023-07-12 2023-08-08 北京大学 药物不良反应的预测方法、装置、设备及存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112016450B (zh) * 2020-08-27 2023-09-05 京东方科技集团股份有限公司 机器学习模型的训练方法、装置和电子设备
CN115482422B (zh) * 2022-09-20 2023-10-17 北京百度网讯科技有限公司 深度学习模型的训练方法、图像处理方法和装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110084216A (zh) * 2019-05-06 2019-08-02 苏州科达科技股份有限公司 人脸识别模型训练和人脸识别方法、***、设备及介质
CN110197099A (zh) * 2018-02-26 2019-09-03 腾讯科技(深圳)有限公司 跨年龄人脸识别及其模型训练的方法和装置
CN110287942A (zh) * 2019-07-03 2019-09-27 成都旷视金智科技有限公司 年龄估计模型的训练方法、年龄估计方法以及对应的装置
US20200012884A1 (en) * 2018-07-03 2020-01-09 General Electric Company Classification based on annotation information
CN111259967A (zh) * 2020-01-17 2020-06-09 北京市商汤科技开发有限公司 图像分类及神经网络训练方法、装置、设备及存储介质
CN112016450A (zh) * 2020-08-27 2020-12-01 京东方科技集团股份有限公司 机器学习模型的训练方法、装置和电子设备

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111061889B (zh) * 2018-10-16 2024-03-29 京东方艺云(杭州)科技有限公司 图片多标签的自动识别方法和装置
CN111461155A (zh) * 2019-01-18 2020-07-28 富士通株式会社 训练分类模型的装置和方法
CN109871909B (zh) * 2019-04-16 2021-10-01 京东方科技集团股份有限公司 图像识别方法及装置
CN110033332A (zh) * 2019-04-23 2019-07-19 杭州智趣智能信息技术有限公司 一种人脸识别方法、***及电子设备和存储介质
CN111368672A (zh) * 2020-02-26 2020-07-03 苏州超云生命智能产业研究院有限公司 一种用于遗传病面部识别模型的构建方法及装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110197099A (zh) * 2018-02-26 2019-09-03 腾讯科技(深圳)有限公司 跨年龄人脸识别及其模型训练的方法和装置
US20200012884A1 (en) * 2018-07-03 2020-01-09 General Electric Company Classification based on annotation information
CN110084216A (zh) * 2019-05-06 2019-08-02 苏州科达科技股份有限公司 人脸识别模型训练和人脸识别方法、***、设备及介质
CN110287942A (zh) * 2019-07-03 2019-09-27 成都旷视金智科技有限公司 年龄估计模型的训练方法、年龄估计方法以及对应的装置
CN111259967A (zh) * 2020-01-17 2020-06-09 北京市商汤科技开发有限公司 图像分类及神经网络训练方法、装置、设备及存储介质
CN112016450A (zh) * 2020-08-27 2020-12-01 京东方科技集团股份有限公司 机器学习模型的训练方法、装置和电子设备

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114743043A (zh) * 2022-03-15 2022-07-12 北京迈格威科技有限公司 一种图像分类方法、电子设备、存储介质及程序产品
CN114743043B (zh) * 2022-03-15 2024-04-26 北京迈格威科技有限公司 一种图像分类方法、电子设备、存储介质及程序产品
CN114714145A (zh) * 2022-05-07 2022-07-08 嘉兴南湖学院 一种刀具磨损状态的格拉姆角场增强对比学习监测方法
CN114714145B (zh) * 2022-05-07 2023-05-12 嘉兴南湖学院 一种刀具磨损状态的格拉姆角场增强对比学习监测方法
CN115049851A (zh) * 2022-08-15 2022-09-13 深圳市爱深盈通信息技术有限公司 基于YOLOv5网络的目标检测方法、装置和设备终端
CN116564556A (zh) * 2023-07-12 2023-08-08 北京大学 药物不良反应的预测方法、装置、设备及存储介质
CN116564556B (zh) * 2023-07-12 2023-11-10 北京大学 药物不良反应的预测方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN112016450B (zh) 2023-09-05
CN112016450A (zh) 2020-12-01
US20230030419A1 (en) 2023-02-02

Similar Documents

Publication Publication Date Title
WO2022042043A1 (zh) 机器学习模型的训练方法、装置和电子设备
Wen et al. Generalized incomplete multiview clustering with flexible locality structure diffusion
Zhao et al. Robust lightweight facial expression recognition network with label distribution training
US11537884B2 (en) Machine learning model training method and device, and expression image classification method and device
CN107766787B (zh) 人脸属性识别方法、装置、终端及存储介质
Deng et al. Image aesthetic assessment: An experimental survey
US11222196B2 (en) Simultaneous recognition of facial attributes and identity in organizing photo albums
Guo et al. Face recognition based on convolutional neural network and support vector machine
Ali et al. Boosted NNE collections for multicultural facial expression recognition
Do et al. Deep neural network-based fusion model for emotion recognition using visual data
CN109063719B (zh) 一种联合结构相似性和类信息的图像分类方法
CN112395979B (zh) 基于图像的健康状态识别方法、装置、设备及存储介质
Salunke et al. A new approach for automatic face emotion recognition and classification based on deep networks
Ren et al. Semantic facial descriptor extraction via axiomatic fuzzy set
Yi et al. Multi-modal learning for affective content analysis in movies
Yang et al. Robust discriminant feature selection via joint L2, 1-norm distance minimization and maximization
Meng et al. Few-shot image classification algorithm based on attention mechanism and weight fusion
Das et al. Determining attention mechanism for visual sentiment analysis of an image using svm classifier in deep learning based architecture
Chauhan et al. Analysis of Intelligent movie recommender system from facial expression
Lu et al. Domain-aware se network for sketch-based image retrieval with multiplicative euclidean margin softmax
Deeb et al. Human facial emotion recognition using improved black hole based extreme learning machine
CN112200260B (zh) 一种基于丢弃损失函数的人物属性识别方法
Dong et al. A supervised dictionary learning and discriminative weighting model for action recognition
Yap et al. Neural information processing
Zhao et al. Multi-view dimensionality reduction via subspace structure agreement

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: 21859883

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: 21859883

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25-09.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21859883

Country of ref document: EP

Kind code of ref document: A1