CN107590460A - Face classification method, apparatus and intelligent terminal - Google Patents

Face classification method, apparatus and intelligent terminal Download PDF

Info

Publication number
CN107590460A
CN107590460A CN201710817879.2A CN201710817879A CN107590460A CN 107590460 A CN107590460 A CN 107590460A CN 201710817879 A CN201710817879 A CN 201710817879A CN 107590460 A CN107590460 A CN 107590460A
Authority
CN
China
Prior art keywords
classification
convolutional neural
information
neural network
network model
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201710817879.2A
Other languages
Chinese (zh)
Other versions
CN107590460B (en
Inventor
杨帆
李岩
李宣平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201710817879.2A priority Critical patent/CN107590460B/en
Publication of CN107590460A publication Critical patent/CN107590460A/en
Application granted granted Critical
Publication of CN107590460B publication Critical patent/CN107590460B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the invention discloses a kind of face classification method, apparatus and intelligent terminal to comprise the steps:Gather target information to be measured;In the optimization convolutional neural networks model that the target information input to be measured is carried out obtained by error optimization is trained by exporting target and expectation target;Obtain the classification results of the target information to be measured of the optimization convolutional neural networks model output.Reverse optimization is carried out to convolutional neural networks model as a result of the error between output target and expectation target, constantly adjust the parameters of convolutional neural networks model, optimize the performance of convolutional neural networks model, optimization convolutional neural networks model is got, the classification accuracy of convolutional neural networks model can be effectively improved.Target information to be measured is input to after optimizing in convolutional neural networks model, it becomes possible to obtain the higher classification results of accuracy rate.

Description

Face classification method and device and intelligent terminal
Technical Field
The embodiment of the invention relates to the field of model algorithms, in particular to a face classification method, a face classification device and an intelligent terminal.
Background
Along with the improvement of the operational capability of the intelligent mobile terminal, the intelligent mobile terminal can carry more and more complex and powerful application programs. The user face image is shot and subjected to data processing, and the user face image is evaluated or classified according to the data processing result.
In the prior art, a user terminal installs a universal data model sent by a server in a mode of downloading an application program, when the user applies the function, the obtained real-time facial image is input into the data model, and the data model outputs a result of evaluating or classifying the facial image of the user.
The inventors of the present invention have found in their research that the accuracy of the classification or evaluation of facial images of a user in the art depends on the performance of the data model. Therefore, there is a need in the art for a data model with excellent performance to improve the face classification accuracy of a user.
Disclosure of Invention
The embodiment of the invention provides a face classification method and device capable of effectively improving classification accuracy and an intelligent terminal.
In order to solve the above technical problem, the embodiment of the present invention adopts a technical solution that: a face classification method is provided, which comprises the following steps:
collecting target information to be detected;
inputting the information of the target to be detected into an optimized convolutional neural network model obtained by performing error optimization training on an output target and an expected target;
and obtaining a classification result of the target information to be detected output by the optimized convolutional neural network model.
Specifically, the optimized convolutional neural network model is formed by training through the following steps:
acquiring training sample data marked with classification judgment information;
inputting the training sample data into a convolutional neural network model to obtain model classification reference information of the training sample data;
comparing model classification reference information of different samples in the training sample data through a loss stopping function, and judging whether the comparison result is consistent with the classification judgment information or not;
and when the comparison result is inconsistent with the classification judgment information, repeatedly and circularly updating the weight in the convolutional neural network model until the comparison result is consistent with the classification judgment information.
Specifically, the training sample data includes: a face data pair and classification judgment information for marking the face data pair;
the classification judgment information includes: one or more of the information of the color value, age, race and sex of the human body.
Specifically, the step of inputting the training sample data into a convolutional neural network model to obtain model classification reference information of the training sample data specifically includes:
inputting the training sample data into a convolutional neural network model;
and taking the output value of the last layer of full connection of the convolutional neural network model as the input value of an activation function to obtain model classification reference information so as to enable the classification reference information to be output in a bounded manner.
Specifically, the stop-loss function is characterized by:
l (a, b) = Max (f (a) -f (b), 0) (Label (a) < Label (b)); or
L(a,b)=Max(f(b)–f(a),0)(Label(b)<Label(a));
Wherein a is one sample data of the face data pair, b is the other sample data of the face data pair, label (a) represents the classification judgment data of a, label (b) represents the classification judgment data of b, f (a) represents the model classification reference data of a output by the convolutional neural network model, and f (b) represents the model classification reference data of b output by the convolutional neural network model.
Specifically, when the comparison result is inconsistent with the classification judgment information, iteratively and repeatedly updating the weights in the convolutional neural network model until the comparison result is consistent with the classification judgment information, the method specifically includes the following steps:
when the comparison result is inconsistent with the classification judgment information, calculating expected output information of the model according to the classification judgment information;
calculating a response error according to a difference value between the model classification reference information and the expected output information of the model;
multiplying the training sample data by the response error to obtain a gradient of weight;
multiplying the gradient by a training factor, inverting and adding the gradient to the weight to update the weight;
and repeatedly and iteratively updating the weight until the comparison result is consistent with the classification judgment information.
Specifically, the training factor is characterized by:
W=W+Δ W +lr*αW;
where W represents a training factor, lr represents a first parameter value, α represents a second parameter value, and defines a function:
where β represents a third parameter value.
In order to solve the above technical problem, an embodiment of the present invention further provides: a face classification apparatus comprising:
the acquisition module is used for acquiring information of a target to be detected;
the calculation module is used for inputting the information of the target to be detected into an optimized convolutional neural network model obtained by performing error optimization training on an output target and an expected target;
and the output module is used for acquiring the classification result of the information of the target to be detected output by the optimized convolutional neural network model.
Specifically, the training apparatus further includes:
the first acquisition submodule is used for acquiring training sample data marked with classification judgment information;
the first calculation submodule is used for inputting the training sample data into a convolutional neural network model to obtain model classification reference information of the training sample data;
the first judgment submodule is used for comparing model classification reference information of different samples in the training sample data through a loss stopping function and judging whether the comparison result is consistent with the classification judgment information or not;
and the first model optimization submodule is used for repeatedly and circularly updating the weight in the convolutional neural network model when the comparison result is inconsistent with the classification judgment information, and ending when the comparison result is consistent with the classification judgment information.
Specifically, the training sample data includes: a face data pair and classification judgment information for marking the face data pair;
the classification judgment information includes: one or more of the information of the color value, age, race and sex of the human body.
Specifically, the classification apparatus further includes:
the first data input submodule is used for inputting the training sample data into a convolutional neural network model;
and the first data constraint submodule is used for taking the output value of the last layer of full connection of the convolutional neural network model as the input value of the activation function to acquire model classification reference information so as to enable the classification reference information to be output in a bounded manner.
Specifically, the stop-loss function is characterized by:
l (a, b) = Max (f (a) -f (b), 0) (Label (a) < Label (b)); or
L(a,b)=Max(f(b)–f(a),0)(Label(b)<Label(a));
Wherein a is one sample data of the face data pair, b is the other sample data of the face data pair, label (a) represents the classification judgment data of a, label (b) represents the classification judgment data of b, f (a) represents the model classification reference data of a output by the convolution neural network model, and f (b) represents the model classification reference data of b output by the convolution neural network model.
Specifically, the classification device further includes:
the first data processing submodule is used for calculating expected output information of the model according to the classification judgment information when the comparison result is inconsistent with the classification judgment information;
the second data processing submodule is used for calculating a response error according to the difference value of the model classification reference information and the model expected output information;
a third data processing sub-module, configured to multiply the training sample data and the response error to obtain a gradient of weight;
a fourth data processing sub-module for multiplying the gradient by a training factor, inverting and adding the inverse to the weight to update the weight;
and the fifth data processing submodule is used for repeatedly and circularly updating the weight until the comparison result is consistent with the classification judgment information.
Specifically, the training factor is characterized by:
W=W+Δ W +lr*αW;
where W represents a training factor, lr represents a first parameter value, α represents a second parameter value, and defines a function:
where β represents a third parameter value.
In order to solve the above technical problem, an embodiment of the present invention further provides an intelligent terminal, including:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the face classification method described in the above document.
The embodiment of the invention has the beneficial effects that: because the error between the output target and the expected target is adopted to carry out reverse optimization on the convolutional neural network model, various parameters of the convolutional neural network model are continuously adjusted, the performance of the convolutional neural network model is optimized, the optimized convolutional neural network model is obtained, and the classification accuracy of the convolutional neural network model can be effectively improved. And inputting the target information to be detected into the optimized convolutional neural network model, so that a classification result with high accuracy can be obtained.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a basic flow chart of a face classification method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a basic flow of an optimized convolutional neural network model training method according to an embodiment of the present invention;
FIG. 3 is a flowchart of a specific method for obtaining model classification reference information according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart of the weight correction of the convolutional neural network model according to the embodiment of the present invention;
FIG. 5 is a block diagram of a basic structure of a face classification apparatus according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a basic structure of an intelligent terminal according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention.
In some of the flows described in the present specification and claims and in the above figures, a number of operations are included that occur in a particular order, but it should be clearly understood that these operations may be performed out of order or in parallel as they occur herein, with the order of the operations being indicated as 101, 102, etc. merely to distinguish between the various operations, and the order of the operations by themselves does not represent any order of performance. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Examples
Referring to fig. 1, fig. 1 is a basic flow chart of the face classification method according to the embodiment.
As shown in fig. 1, a face classification method includes the following steps:
s1100, collecting information of a target to be detected;
the target information to be measured specifically refers to image information of a human face. But not limited to, the target information to be detected can be an animal and plant picture or a daily necessity picture to be classified or identified according to different application scenes.
The information of the target to be measured can be acquired in real time through the shooting device, and the user uploads the existing photos or image data acquired from the video by taking the frame as a unit.
S1200, inputting the information of the target to be detected into an optimized convolutional neural network model obtained by performing error optimization training on an output target and an expected target.
And inputting the acquired information of the target to be detected into a preset optimized convolutional neural network model as an input value.
The optimized convolutional neural network model is obtained by performing error optimization on an output target and an expected target, the output target and the expected target are subjected to differential calculation, the obtained differential value is reversely introduced into the convolutional neural network model, and various weight parameters of the convolutional neural network model are optimized, so that the purpose of optimizing the convolutional neural network model is achieved.
S1300, obtaining the classification result of the information of the target to be detected output by the optimized convolutional neural network model.
The optimization convolutional neural network model classifies the information of the target to be detected according to the input information of the target to be detected, and the classification result can be as follows: the method comprises the steps of scoring the face value of a human body according to a conventional standard, and identifying information such as age, race and sex according to human body face information. And marking the classified information to form an index label or displaying, for example, when gender division is performed, and classification identification is performed to determine that certain target information to be detected is female, marking the target information to be detected, and forming the female index label on the target information to be detected.
According to the embodiment, the convolutional neural network model is reversely optimized through the error between the output target and the expected target, various parameters of the convolutional neural network model are continuously adjusted, the performance of the convolutional neural network model is optimized, the optimized convolutional neural network model is obtained, and the classification accuracy of the convolutional neural network model can be effectively improved. And inputting the information of the target to be detected into the optimized convolutional neural network model, so that a classification result with higher accuracy can be obtained.
The formation of the optimized convolutional neural network model can be obtained only by performing repeated training optimization through a large amount of training sample data, and a specific optimization method thereof please refer to fig. 2, and fig. 2 is a basic flow diagram of the training method of the optimized convolutional neural network model in this embodiment.
As shown in fig. 2, the method comprises the following steps:
s2100, acquiring training sample data marked with classification judgment information;
the training sample data is the unit of the whole training set, and the training set is composed of a plurality of training sample training data.
The training sample data is composed of a face data pair and classification judgment information for marking the face data pair.
The face data pair means that each training sample data is composed of two different face images. But not limited to, the formation of the face data pairs is related to the direction of convolutional neural network model training. For example, when the convolutional neural network model is trained for identifying gender and race of a person, each training sample data can be composed of one face image because the number of classification criteria is limited and relatively simple, whereas when the convolutional neural network model is trained for identifying the face value score and the age of the person, each training sample data needs to be composed of two face images because the classification criteria is more and relatively complex.
The classification judgment information refers to the artificial judgment of training sample data by people according to the training direction of the input convolutional neural network model through a universal judgment standard and a factual state, namely the expected target of people for the output numerical value of the convolutional neural network model. For example, in a training sample data pair, the color values of two different images are scored, and the color value of the human face in each image is labeled, in a more optimized embodiment, the color value of the human face represented by the image labeled in the two images is higher.
The content of the classification judgment information is closely related to the training direction of the convolutional neural network model, if the training direction of the convolutional neural network model is gender identification, the classification judgment information is the gender of the human face represented by the image, and when the training direction of the convolutional neural network model is color value grading, the content of the labeled classification judgment information is that the color value of the human face image represented by the image is higher.
The human face data are compared and labeled in a mode of adopting two human face images, the most direct expected target can be provided for the training of the convolutional neural network model, and the training of the convolutional neural network model is facilitated.
Step S2100 is followed by step S2200.
S2200, inputting the training sample data into a convolutional neural network model to obtain model classification reference information of the training sample data;
and inputting training sample data into the convolutional neural network model to be trained, and acquiring classification reference information output by the convolutional neural network model to be trained.
The specific step S2200 can be decomposed into two steps, please refer to fig. 3, and fig. 3 is a flowchart illustrating a specific method for obtaining the model classification reference information according to the embodiment.
As shown in fig. 3, step S2200 includes the steps of:
s2210, inputting the training sample data into a convolutional neural network model;
the specification of the neural network model can be adjusted according to different application scenes, for example, when the convolutional neural network model is trained to identify the race, more images of human faces in the images are trained to be identified, and the features to be identified are single and uncomplicated, so that a simpler convolutional neural network model can be adopted, and a more complex convolutional neural network model is required when the convolutional neural network model is used for face comparison.
S2220, taking the output value of the last layer of full connection of the convolutional neural network model as the input value of the activation function to obtain model classification reference information, so that the classification reference information is output in a bounded mode.
The final layer of the convolutional neural network model is fully connected to output signals, which are only a simple linear function, the complexity of the linear function output is limited, the capability of learning the mapping of the complex function from data is smaller, and the output data result has discreteness, which does not meet the requirement of the embodiment on the output result.
Therefore, the data output at the four convolutional layers and the second of the two fully-connected layers needs to be scaled using the activation function. Specifically, a Sigmoid activation function is adopted: it is an activation function in the form f (x) =1/1+ exp (-x). Its value interval is between 0 and 1, and is a S-shaped curve. And the Sigmoid activation output value interval is between 0 and 1, so that the output of the convolutional neural network model is bounded.
S2300, comparing model classification reference information of different samples in the training sample data through a stop-loss function, and judging whether the comparison result is consistent with the classification judgment information;
the stop loss function is a detection function for detecting whether the model classification reference information in the convolutional neural network model and the expected classification judgment information have consistency.
The stop-loss function number is characterized as:
l (a, b) = Max (f (a) -f (b), 0) (Label (a) < Label (b)); or
L(a,b)=Max(f(b)–f(a),0)(Label(b)<Label(a));
Wherein a is one sample data of the face data pair, b is the other sample data of the face data pair, label (a) represents the classification judgment data of a, label (b) represents the classification judgment data of b, f (a) represents the model classification reference data of a output by the convolutional neural network model, and f (b) represents the model classification reference data of b output by the convolutional neural network model.
For example, when the convolutional neural network model is trained for scoring human face values, a is represented as one human face picture in the training sample, and b is represented as another human face picture in the training sample. Label (a) indicates a has a Yan Zhi score of 70; label (b) indicates that b has a Yan Zhi score of 80; f (a) represents a model score of 0.6 for a at the convolutional neural network model output; f (b) represents a model score of 0.55 for a of the convolutional neural network model output.
As can be seen from the above data, label (a) =70, label (b) =80, which means that the color value represented by the labeling result b is greater than a; however, f (a) =0.6, f (b) =0.55 indicates that the output value of L (a, b) is not zero but 0.05, indicating that the value of the model output assumes that a represents a color value greater than b. This result is opposite to the expected result, at this time, step S2400 needs to be executed continuously to correct the output result of the convolutional neural network model, otherwise, when the value f (a) output by the model is smaller than f (b), and the value of L (a, b) is zero, it indicates that the training of the set of training sample data is finished when the comparison result of S2300 is consistent with the classification judgment information.
And S2400, when the comparison result is inconsistent with the classification judgment information, repeatedly and circularly updating the weight in the convolutional neural network model until the comparison result is consistent with the classification judgment information, and ending.
When the output result of the convolutional neural network model is inconsistent with the expected result of the classification judgment information, the weights in the convolutional neural network model need to be corrected so that the output result of the convolutional neural network model is the same as the expected result of the classification judgment information.
Referring to fig. 4, fig. 4 is a schematic flow chart illustrating the weight calibration of the convolutional neural network model according to the present embodiment.
As shown in fig. 4, step S2400 includes the following steps:
s2410, when the comparison result is inconsistent with the classification judgment information, calculating expected output information of the model according to the classification judgment information;
when the magnitude relation of the comparison of the two values output by the convolutional neural network model is inconsistent with the classification judgment information, the classification judgment information is read so that the terminal obtains an output result expected by people, and the model expected output information is brought into step S2420. It should be noted that the model is expected to output a determination of the information classification determination information, for example, if the color value represented by b is larger than the color value represented by a, the model is expected to output the information.
S2420, calculating a response error according to the difference value of the model classification reference information and the model expected output information;
specifically, when the comparison result does not match the classification determination information, as desired L (a, b) =0, and actual f (a) -f (b) =0.05, the response error is 0.05. The response error is calculated and the process proceeds to step S2430.
S2430, multiplying the training sample data by the response error to obtain the gradient of the weight;
and multiplying the data information of the two human face images in the input training sample data by the response error so as to obtain the gradient of the weight of the convolutional neural network model.
S2440, multiplying the gradient by a training factor, inverting the product and adding the product to the weight to update the weight;
and multiplying the calculated gradient by a training factor, inverting the gradient, adding the inverted gradient to the weight, and updating the gradient into a new weight. The training factors will affect the speed and effectiveness of the training process. The direction of the gradient indicates the direction of error propagation and therefore needs to be inverted when updating the weights, thereby reducing the weight-induced errors.
And S2450, repeatedly and circularly updating the weight until the comparison result is consistent with the classification judgment information.
And the result that the comparison result is consistent with the classification judgment information cannot achieve the aim through one-time weight updating, so that the training sample data is input into the convolutional neural network model again after the weight updating, whether the comparison result of the output data of the convolutional neural network model is consistent with the classification judgment information or not is verified, if not, the current output data is used for calculating response errors, and then the operation is continued to be circulated to the step S2430, and the iterative updating weight is repeated until the comparison result is consistent with the classification judgment information.
Wherein the training factor is characterized by:
W=W+Δ W +lr*αW;
where W represents a training factor, lr represents a first parameter value, α represents a second parameter value, and defines a function:
where β represents a third parameter value.
Specifically, lr =0.01, α =0.0005, β =0.09
By way of example, the convolutional neural network model of the present embodiment is trained to detect a face color value of a human body.
50 thousands of face pairs are prepared, each face pair is marked with a higher face value of a person, 4 layers of convolution and 2 layers of fully-connected networks are built, the output number of the last layer of fully-connected network is determined, and an activation function sigmoid is adopted to ensure that the output is bounded. The output is a numerical value between 0 and 1, the higher the output numerical value is, the higher Yan Zhi is, and the product of the output value and 100 is the final color value score. And constructing a loss function to verify whether the result output by the convolutional neural network model needs to be verified. And updating the weights of the convolutional neural network model through a back propagation algorithm when verification is needed until the result output by the convolutional neural network model does not need to be verified. By the method, 50 ten thousand face pairs are subjected to verification training in sequence.
The embodiment also provides a face classification device. Referring to fig. 5, fig. 5 is a block diagram of a basic structure of the face classification device according to the present embodiment.
As shown in fig. 5, the face classification apparatus includes: an acquisition module 2100, a calculation module 2200, and an output module 2300. The acquisition module 2100 is used for acquiring information of a target to be detected; the calculation module 2200 is configured to input information of the target to be measured into an optimized convolutional neural network model obtained by performing error optimization training on the output target and the expected target; the output module 2300 is configured to obtain a classification result of the information of the target to be detected output by the optimized convolutional neural network model.
The face classification device carries out reverse optimization on the convolutional neural network model by adopting the error between the output target and the expected target, continuously adjusts various parameters of the convolutional neural network model, optimizes the performance of the convolutional neural network model, obtains the optimized convolutional neural network model, and can effectively improve the classification accuracy of the convolutional neural network model. And inputting the information of the target to be detected into the optimized convolutional neural network model, so that a classification result with higher accuracy can be obtained.
Specifically, the training sample data includes: the face data pairs and classification judgment information for marking the face data pairs; the classification judgment information includes: a combination of one or more of a human body color value, age, race, and gender information.
In some embodiments, the classification device further comprises: a first data input submodule and a first data constraint submodule. The first data input submodule is used for inputting training sample data into the convolutional neural network model; the first data constraint submodule is used for taking the output value of the last layer of full connection of the convolutional neural network model as the input value of the activation function to obtain model classification reference information so as to enable the classification reference information to be output in a bounded mode.
Specifically, the stop-loss function is characterized as:
l (a, b) = Max (f (a) -f (b), 0) (Label (a) < Label (b)); or
L(a,b)=Max(f(b)–f(a),0)(Label(b)<Label(a));
Wherein a is one sample data of the face data pair, b is the other sample data of the face data pair, label (a) represents the classification judgment data of a, label (b) represents the classification judgment data of b, f (a) represents the model classification reference data of a output by the convolutional neural network model, and f (b) represents the model classification reference data of b output by the convolutional neural network model.
In some embodiments, the classification device further comprises: the first data processing submodule is used for calculating expected output information of the model according to the classification judgment information when the comparison result is inconsistent with the classification judgment information; the second data processing submodule is used for calculating a response error according to the difference value of the model classification reference information and the model expected output information; the third data processing submodule is used for multiplying the training sample data and the response error to obtain the gradient of the weight; the fourth data processing submodule is used for multiplying the gradient by the training factor, then taking the inverse and adding the inverse and the weight to update the weight; and the fifth data processing submodule is used for repeatedly and circularly updating the weight until the comparison result is consistent with the classification judgment information.
In some embodiments, the classification device further comprises:
the training factor is characterized as:
W=W+Δ W +lr*αW;
where W represents a training factor, lr represents a first parameter value, α represents a second parameter value, and defines a function:
wherein beta represents a third parameter value,indicating that a partial derivative operation is performed on L,this represents the reciprocal of the deviation of W.
The embodiment also provides an intelligent terminal. Referring to fig. 6 in detail, fig. 6 is a schematic diagram of a basic structure of the intelligent terminal according to this embodiment.
As shown in fig. 6, the intelligent terminal includes: one or more processors 3110 and memory 3120; one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to:
collecting target information to be detected;
inputting the information of the target to be detected into an optimized convolutional neural network model obtained by performing error optimization training on the output target and the expected target;
and obtaining a classification result of the information of the target to be detected output by the optimized convolutional neural network model.
The intelligent terminal carries out reverse optimization on the convolutional neural network model by adopting the error between the output target and the expected target, continuously adjusts various parameters of the convolutional neural network model, optimizes the performance of the convolutional neural network model, obtains the optimized convolutional neural network model, and can effectively improve the classification accuracy of the convolutional neural network model. And inputting the information of the target to be detected into the optimized convolutional neural network model, so that a classification result with higher accuracy can be obtained.
It should be noted that in this embodiment, all programs for implementing the mobile face classification method in this embodiment are stored in the memory of the intelligent terminal, and the processor can call the programs in the memory to execute all functions listed in the above mobile face classification method. The functions realized by the intelligent terminal are detailed in the mobile face classification method in this embodiment, and are not described herein again.
The smart terminal described in this embodiment includes (but is not limited to) a smart phone, a mobile computer, or a PC.
It should be noted that the description of the present invention and the accompanying drawings illustrate preferred embodiments of the present invention, but the present invention may be embodied in many different forms and is not limited to the embodiments described in the present specification, which are provided as additional limitations to the present invention and to provide a more thorough understanding of the present disclosure. Moreover, the above technical features are combined with each other to form various embodiments which are not listed above, and all the embodiments are regarded as the scope of the present invention described in the specification; further, modifications and variations will occur to those skilled in the art in light of the foregoing description, and it is intended to cover all such modifications and variations as fall within the true spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A face classification method is characterized by comprising the following steps:
collecting target information to be detected;
inputting the information of the target to be detected into an optimized convolutional neural network model obtained by performing error optimization training on an output target and an expected target;
and obtaining the classification result of the information of the target to be detected output by the optimized convolutional neural network model.
2. The face classification method according to claim 1, characterized in that the optimized convolutional neural network model is formed by training through the following steps:
acquiring training sample data marked with classification judgment information;
inputting the training sample data into a convolutional neural network model to obtain model classification reference information of the training sample data;
comparing model classification reference information of different samples in the training sample data through a loss stopping function, and judging whether the comparison result is consistent with the classification judgment information or not;
and when the comparison result is inconsistent with the classification judgment information, repeatedly and circularly updating the weight in the convolutional neural network model until the comparison result is consistent with the classification judgment information.
3. The face classification method according to claim 2, wherein the training sample data includes: a face data pair and classification judgment information for marking the face data pair;
the classification judgment information includes: a combination of one or more of a human body color value, age, race, and gender information.
4. The method according to claim 3, wherein the step of inputting the training sample data into a convolutional neural network model to obtain model classification reference information of the training sample data specifically comprises:
inputting the training sample data into a convolutional neural network model;
and taking the output value of the last layer of full connection of the convolutional neural network model as the input value of an activation function to obtain model classification reference information so as to enable the classification reference information to be output in a bounded manner.
5. The method of claim 3, wherein the stop-loss function is characterized by:
l (a, b) = Max (f (a) -f (b), 0) (Label (a) < Label (b)); or
L(a,b)=Max(f(b)–f(a),0)(Label(b)<Label(a));
Wherein a is one sample data of the face data pair, b is the other sample data of the face data pair, label (a) represents the classification judgment data of a, label (b) represents the classification judgment data of b, f (a) represents the model classification reference data of a output by the convolutional neural network model, and f (b) represents the model classification reference data of b output by the convolutional neural network model.
6. The method according to claim 3, wherein when the comparison result is inconsistent with the classification judgment information, the step of iteratively updating the weights in the convolutional neural network model repeatedly in a loop until the comparison result is consistent with the classification judgment information is completed specifically comprises:
when the comparison result is inconsistent with the classification judgment information, calculating expected output information of the model according to the classification judgment information;
calculating a response error according to a difference value between the model classification reference information and the expected output information of the model;
multiplying the training sample data by the response error to obtain a gradient of weight;
multiplying the gradient by a training factor, inverting and adding the gradient to the weight to update the weight;
and repeatedly and iteratively updating the weight until the comparison result is consistent with the classification judgment information.
7. The face classification method according to claim 6, characterized in that the training factor is characterized by:
W=W+Δ W +lr*αW;
where W represents a training factor, lr represents a first parameter value, α represents a second parameter value, and defines a function:
where β represents a third parameter value.
8. A face classification apparatus, comprising:
the acquisition module is used for acquiring information of a target to be detected;
the calculation module is used for inputting the information of the target to be detected into an optimized convolutional neural network model obtained by performing error optimization training on an output target and an expected target;
and the output module is used for acquiring the classification result of the information of the target to be detected output by the optimized convolutional neural network model.
9. The face classification device of claim 8, characterized in that the training device further comprises:
the first acquisition submodule is used for acquiring training sample data marked with classification judgment information;
the first calculation submodule is used for inputting the training sample data into a convolutional neural network model to obtain model classification reference information of the training sample data;
the first judgment submodule is used for comparing model classification reference information of different samples in the training sample data through a loss stopping function and judging whether the comparison result is consistent with the classification judgment information or not;
and the first model optimization submodule is used for repeatedly and circularly updating the weight in the convolutional neural network model when the comparison result is inconsistent with the classification judgment information, and ending when the comparison result is consistent with the classification judgment information.
10. An intelligent terminal, comprising:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to perform the face classification method of any of claims 1-7.
CN201710817879.2A 2017-09-12 2017-09-12 Face classification method, apparatus and intelligent terminal Active CN107590460B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710817879.2A CN107590460B (en) 2017-09-12 2017-09-12 Face classification method, apparatus and intelligent terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710817879.2A CN107590460B (en) 2017-09-12 2017-09-12 Face classification method, apparatus and intelligent terminal

Publications (2)

Publication Number Publication Date
CN107590460A true CN107590460A (en) 2018-01-16
CN107590460B CN107590460B (en) 2019-05-03

Family

ID=61051771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710817879.2A Active CN107590460B (en) 2017-09-12 2017-09-12 Face classification method, apparatus and intelligent terminal

Country Status (1)

Country Link
CN (1) CN107590460B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108460343A (en) * 2018-02-06 2018-08-28 北京达佳互联信息技术有限公司 Image processing method, system and server
WO2019223080A1 (en) * 2018-05-25 2019-11-28 平安科技(深圳)有限公司 Bmi prediction method and device, computer device and storage medium
CN110675361A (en) * 2019-08-16 2020-01-10 北京百度网讯科技有限公司 Method and device for establishing video detection model and video detection
CN111339963A (en) * 2020-02-28 2020-06-26 北京百度网讯科技有限公司 Human body image scoring method and device, electronic equipment and storage medium
WO2020207174A1 (en) * 2019-04-11 2020-10-15 北京字节跳动网络技术有限公司 Method and apparatus for generating quantized neural network
CN112203053A (en) * 2020-09-29 2021-01-08 北京市政建设集团有限责任公司 Intelligent supervision method and system for subway constructor behaviors

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104408470A (en) * 2014-12-01 2015-03-11 中科创达软件股份有限公司 Gender detection method based on average face preliminary learning
CN104463243A (en) * 2014-12-01 2015-03-25 中科创达软件股份有限公司 Sex detection method based on average face features
CN104484658A (en) * 2014-12-30 2015-04-01 中科创达软件股份有限公司 Face gender recognition method and device based on multi-channel convolution neural network
CN104504376A (en) * 2014-12-22 2015-04-08 厦门美图之家科技有限公司 Age classification method and system for face images
CN104992167A (en) * 2015-07-28 2015-10-21 中国科学院自动化研究所 Convolution neural network based face detection method and apparatus
CN105404877A (en) * 2015-12-08 2016-03-16 商汤集团有限公司 Human face attribute prediction method and apparatus based on deep study and multi-task study
CN106529402A (en) * 2016-09-27 2017-03-22 中国科学院自动化研究所 Multi-task learning convolutional neural network-based face attribute analysis method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104408470A (en) * 2014-12-01 2015-03-11 中科创达软件股份有限公司 Gender detection method based on average face preliminary learning
CN104463243A (en) * 2014-12-01 2015-03-25 中科创达软件股份有限公司 Sex detection method based on average face features
CN104504376A (en) * 2014-12-22 2015-04-08 厦门美图之家科技有限公司 Age classification method and system for face images
CN104484658A (en) * 2014-12-30 2015-04-01 中科创达软件股份有限公司 Face gender recognition method and device based on multi-channel convolution neural network
CN104992167A (en) * 2015-07-28 2015-10-21 中国科学院自动化研究所 Convolution neural network based face detection method and apparatus
CN105404877A (en) * 2015-12-08 2016-03-16 商汤集团有限公司 Human face attribute prediction method and apparatus based on deep study and multi-task study
CN106529402A (en) * 2016-09-27 2017-03-22 中国科学院自动化研究所 Multi-task learning convolutional neural network-based face attribute analysis method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108460343A (en) * 2018-02-06 2018-08-28 北京达佳互联信息技术有限公司 Image processing method, system and server
WO2019223080A1 (en) * 2018-05-25 2019-11-28 平安科技(深圳)有限公司 Bmi prediction method and device, computer device and storage medium
WO2020207174A1 (en) * 2019-04-11 2020-10-15 北京字节跳动网络技术有限公司 Method and apparatus for generating quantized neural network
CN110675361A (en) * 2019-08-16 2020-01-10 北京百度网讯科技有限公司 Method and device for establishing video detection model and video detection
CN110675361B (en) * 2019-08-16 2022-03-25 北京百度网讯科技有限公司 Method and device for establishing video detection model and video detection
CN111339963A (en) * 2020-02-28 2020-06-26 北京百度网讯科技有限公司 Human body image scoring method and device, electronic equipment and storage medium
CN112203053A (en) * 2020-09-29 2021-01-08 北京市政建设集团有限责任公司 Intelligent supervision method and system for subway constructor behaviors

Also Published As

Publication number Publication date
CN107590460B (en) 2019-05-03

Similar Documents

Publication Publication Date Title
CN107590460A (en) Face classification method, apparatus and intelligent terminal
CN108197532B (en) The method, apparatus and computer installation of recognition of face
CN108960090B (en) Video image processing method and device, computer readable medium and electronic equipment
JP6994588B2 (en) Face feature extraction model training method, face feature extraction method, equipment, equipment and storage medium
CN110267119B (en) Video precision and chroma evaluation method and related equipment
CN109086811B (en) Multi-label image classification method and device and electronic equipment
CN108108807B (en) Learning type image processing method, system and server
EP3968179A1 (en) Place recognition method and apparatus, model training method and apparatus for place recognition, and electronic device
CN109359539B (en) Attention assessment method and device, terminal equipment and computer readable storage medium
CN109447156B (en) Method and apparatus for generating a model
CN107679513B (en) Image processing method and device and server
CN108287857B (en) Expression picture recommendation method and device
CN109242092B (en) Image processing method and device, electronic equipment and storage medium
CN110765882B (en) Video tag determination method, device, server and storage medium
CN111489401B (en) Image color constancy processing method, system, device and storage medium
CN111914908B (en) Image recognition model training method, image recognition method and related equipment
CN108228684B (en) Method and device for training clustering model, electronic equipment and computer storage medium
CN108509407A (en) Text semantic similarity calculating method, device and user terminal
CN111126347B (en) Human eye state identification method, device, terminal and readable storage medium
CN108509994B (en) Method and device for clustering character images
US20230021551A1 (en) Using training images and scaled training images to train an image segmentation model
CN105430394A (en) Video data compression processing method, apparatus and equipment
Chang et al. Salgaze: Personalizing gaze estimation using visual saliency
CN112529068A (en) Multi-view image classification method, system, computer equipment and storage medium
CN112101109B (en) Training method and device for face key point detection model, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant