CN110222571B - Intelligent judgment method and device for black eye and computer readable storage medium - Google Patents

Intelligent judgment method and device for black eye and computer readable storage medium Download PDF

Info

Publication number
CN110222571B
CN110222571B CN201910370451.7A CN201910370451A CN110222571B CN 110222571 B CN110222571 B CN 110222571B CN 201910370451 A CN201910370451 A CN 201910370451A CN 110222571 B CN110222571 B CN 110222571B
Authority
CN
China
Prior art keywords
sample set
data
black eye
black
negative sample
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.)
Active
Application number
CN201910370451.7A
Other languages
Chinese (zh)
Other versions
CN110222571A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910370451.7A priority Critical patent/CN110222571B/en
Publication of CN110222571A publication Critical patent/CN110222571A/en
Application granted granted Critical
Publication of CN110222571B publication Critical patent/CN110222571B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • 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/045Combinations of networks
    • 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/18Eye characteristics, e.g. of the iris
    • G06V40/197Matching; Classification

Abstract

The invention relates to an artificial intelligence technology, and discloses an intelligent judgment method for black eye circles, which comprises the following steps: receiving a face image set and a label set, preprocessing the face image set, taking the label set as an input value of a loss function of a black eye judgment model, performing direction gradient histogram operation on data of the face image set, and inputting the data to a support vector machine module of the black eye judgment model, wherein the support vector machine module is used for primarily classifying the face image set and inputting the data to a convolutional neural network module of the black eye judgment model for retraining; and receiving a test set of a user, performing direction gradient histogram operation on the test set, inputting the test set to the black eye judgment model to judge whether a black eye exists or not, and outputting a result. The invention also provides an intelligent judgment device for the black eye and a computer readable storage medium. The invention can realize accurate intelligent judgment function of the black eye.

Description

Intelligent judgment method and device for black eye and computer readable storage medium
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a method and a device for automatically judging black eyes based on human face data input and a computer readable storage medium.
Background
The dark eye circles are caused by eye pigmentation due to over-slow blood flow speed of blood vessels of skin of eyes, insufficient oxygen supply of tissues and excessive accumulation of metabolic wastes in the blood vessels caused by night stay, large emotional fluctuation, eye fatigue and aging. The older the person, the thinner the subcutaneous fat around the eye becomes, so the more visible the dark circles. In the current society, many people have black eyes and do not know the black eyes, so that whether the black eyes exist or not needs to be judged, however, the accurate identification of the black eyes also has many problems, such as that most application scenes are complex, the difficulty of identification is increased due to local dynamic change of the background, target shadows caused by uneven illumination and the like, in addition, the human face is a non-rigid target and has rich posture characteristics, and different postures of the same human face are often different in detection and identification.
Disclosure of Invention
The invention provides an intelligent judgment method and device for black eyes and a computer readable storage medium, and mainly aims to present an accurate judgment result for the black eyes to a user when the user judges whether the face has the black eyes.
In order to achieve the above object, the present invention provides an intelligent judgment method for black eye, which comprises:
the data receiving layer receives a face image set, the face image set is divided into a positive sample set and a negative sample set through a label set, and after preprocessing operations including graying, binarization and noise reduction are carried out on the positive sample set and the negative sample set, the preprocessed positive sample set, the preprocessed negative sample set and the label set are input to a data processing layer;
the data processing layer receives a preprocessed face image set, the label set is used as an input value of a loss function of a black eye judgment model, data of the positive sample set and the negative sample set are subjected to direction gradient histogram operation and then input to a support vector machine module of the black eye judgment model, the support vector machine module is used for primarily classifying the negative sample set and the positive sample set, data with primary classification errors are extracted based on the label set and input to a convolutional neural network module of the black eye judgment model for retraining, after the convolutional neural network module is trained, a training label set is output, the training label is input to the loss function, the loss function is combined with the training label set and the label set to calculate an output value, and when the output value is smaller than a preset threshold value, the black eye judgment model quits training;
receiving a test set of a user, mapping data in the test set to a high-dimensional space based on a nonlinear mapping method, performing direction gradient histogram operation on the mapped test set, inputting the result to the black eye judgment model to judge whether a black eye exists, and outputting a result.
Optionally, the data in the positive sample set is a face image including a black eye, and the data in the negative sample set is a face image not including a black eye.
Optionally, the adaptive image denoising filtering method is:
g(x,y)=η(x,y)+f(x,y)
Figure GDA0004095051370000021
/>
wherein (x, y) represents coordinates of pixel points of an image, f (x, y) is output data obtained by denoising the positive sample set and the negative sample set based on an adaptive image denoising filter method, η (x, y) is noise, g (x, y) is the positive sample set and the negative sample set,
Figure GDA0004095051370000022
a total variance of noise for the positive sample set and the negative sample set +>
Figure GDA0004095051370000023
Is the mean value of the pixel intensity of (x, y), based on the pixel intensity of the pixel (x, y)>
Figure GDA0004095051370000024
And L represents the coordinate of the current pixel point, wherein L is the pixel gray level variance of (x, y).
Optionally, the convolutional neural network module includes an input layer, a convolutional layer, and an output layer;
the convolutional layer comprises a convolution operation, a pooling operation and an activation operation;
the convolution operation is:
Figure GDA0004095051370000025
wherein ω' is output data, ω is the data of the preliminary classification error, k is the size of a convolution kernel, s is the step of convolution operation, and p is a data zero-filling matrix;
the activation operation is:
Figure GDA0004095051370000026
where y is the output value of the activate operation and e is an infinite acyclic fraction.
Optionally, the support vector machine algorithm comprises nonlinear mapping and constraint solving;
the non-linear mapping is:
κ(x i ,x j )=<θ(x i ),θ(x j )>
wherein, the first and the second end of the pipe are connected with each other,<θ(x i ),θ(x j )>representing the direction gradient histogram (x) i ,x j ) Inner product calculation of non-linear mapping, κ (x) i ,x j ) For the direction gradient histogram (x) i ,x j ) The non-linear mapping function of (a);
the constraint solution is:
Figure GDA0004095051370000032
Figure GDA0004095051370000033
wherein alpha is i ≥0,i=1,2,…m
Wherein m is the number of the direction gradient histogram features, alpha i ,α j Lagrange number multiplier, y, solved for said constraint i ,y j And s.t is a constraint condition for the labels of the positive and negative samples.
In addition, in order to achieve the above object, the present invention further provides an intelligent black eye judgment device, including a memory and a processor, where the memory stores an intelligent black eye judgment program operable on the processor, and the intelligent black eye judgment program, when executed by the processor, implements the following steps:
the data receiving layer receives a face image set, the face image set is divided into a positive sample set and a negative sample set through a label set, and after preprocessing operations including graying, binarization and noise reduction are carried out on the positive sample set and the negative sample set, the preprocessed positive sample set, the preprocessed negative sample set and the label set are input to a data processing layer;
the data processing layer receives a preprocessed face image set, the label set is used as an input value of a loss function of a black eye judgment model, data of the positive sample set and the negative sample set are subjected to direction gradient histogram operation and then input to a support vector machine module of the black eye judgment model, the support vector machine module is used for primarily classifying the negative sample set and the positive sample set, data with primary classification errors are extracted based on the label set and input to a convolutional neural network module of the black eye judgment model for retraining, after the convolutional neural network module is trained, a training label set is output, the training label is input to the loss function, the loss function is combined with the training label set and the label set to calculate an output value, and when the output value is smaller than a preset threshold value, the black eye judgment model quits training;
receiving a test set of a user, mapping data in the test set to a high-dimensional space based on a nonlinear mapping method, performing direction gradient histogram operation on the mapped test set, inputting the result to the black eye judgment model to judge whether a black eye exists, and outputting a result.
Optionally, the adaptive image denoising filtering method is:
g(x,y)=η(x,y)+f(x,y)
Figure GDA0004095051370000041
wherein (x, y) represents the coordinates of pixel points of the image, and f (x, y) is the set of positive samples and the set of negative samples based on the adaptive image noise reduction filtering methodThe output data after noise reduction processing, eta (x, y) is noise, g (x, y) is the positive sample set and the negative sample set,
Figure GDA0004095051370000048
a total variance of the noise for the positive sample set and the negative sample set->
Figure GDA00040950513700000410
Is the mean value of the pixel intensity of (x, y), based on the pixel intensity of the pixel (x, y)>
Figure GDA0004095051370000049
And L represents the coordinate of the current pixel point, wherein the pixel gray variance of (x, y) is shown.
Optionally, the convolutional neural network module includes an input layer, a convolutional layer, and an output layer;
the convolutional layer comprises convolution operation, pooling operation and activation operation;
the convolution operation is:
Figure GDA0004095051370000042
wherein ω' is output data, η is the data of the preliminary classification error, k is the size of a convolution kernel, s is the step of convolution operation, and p is a data zero-padding matrix;
the activating operation is:
Figure GDA0004095051370000043
where y is the output value of the activate operation and e is an infinite acyclic fraction.
Optionally, the support vector machine algorithm comprises nonlinear mapping and constraint solving;
the non-linear mapping is:
κ(x i ,x j )=<θ(x i ),θ(x j )>
wherein, the first and the second end of the pipe are connected with each other,<θ(x i ),θ(x j )>representing the direction gradient histogram (x) i ,x j ) Inner product calculation of non-linear mapping, κ (x) i ,x j ) For the direction gradient histogram (x) i ,x j ) A non-linear mapping function of (a);
the constraint solution is:
Figure GDA0004095051370000046
/>
Figure GDA0004095051370000047
wherein alpha is i ≥0,i=1,2,…m
Wherein m is the number of the direction gradient histogram features, alpha i ,α j Lagrange number multiplier, y, solved for said constraint i ,y j And s.t is a constraint condition for the labels of the positive and negative samples.
In addition, to achieve the above object, the present invention also provides a computer readable storage medium, on which a black eye intelligent judgment program is stored, where the black eye intelligent judgment program can be executed by one or more processors to implement the steps of the black eye intelligent judgment method as described above.
According to the intelligent judgment method and device for the black eye and the computer readable storage medium, a data receiving layer receives a face image set, the face image set is divided into a positive sample set and a negative sample set through a label set, and the positive sample set, the negative sample set and the label set are input to a data processing layer; the data processing layer receives the preprocessed face image set, the label set is used as an input value of a loss function of the black eye judgment model, the positive sample set and the negative sample set are input to a support vector machine module of the black eye judgment model, the support vector machine module carries out primary classification, data with errors in the primary classification are extracted based on the label set and input to a convolutional neural network module of the black eye judgment model for retraining until the black eye judgment model quits training; receiving a test set of a user, mapping data in the test set to a high-dimensional space based on a nonlinear mapping method, performing direction gradient histogram operation on the mapped test set, inputting the result to the black eye judgment model to judge whether a black eye exists, and outputting a result. Because the support vector machine model and the convolutional neural network model with higher use efficiency are used, and noise influencing model judgment is reduced based on various data preprocessing methods in the early stage, the accurate intelligent black eye judgment function can be realized.
Drawings
Fig. 1 is a schematic flow chart of a black eye intelligent determination method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an internal structure of an intelligent black eye judgment device according to an embodiment of the present invention;
fig. 3 is a schematic block diagram of an intelligent black eye judgment program in the intelligent black eye judgment device according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides an intelligent judgment method for black eye circles. Fig. 1 is a schematic flow chart of a black eye intelligent determination method according to an embodiment of the present invention. The method may be performed by an apparatus, which may be implemented by software and/or hardware.
In this embodiment, the method for intelligently determining a black eye includes:
the method comprises the steps that S1, a data receiving layer receives a face image set, the face image set is divided into a positive sample set and a negative sample set through a label set, and after preprocessing operations including graying, binaryzation and noise reduction are carried out on the positive sample set and the negative sample set, the preprocessed positive sample set, the preprocessed negative sample set and the label set are input into a data processing layer.
In a preferred embodiment of the present invention, the data receiving layer receives a face image set including a positive sample set, a negative sample set, and a label set, wherein data in the positive sample set includes faces with black eye circles, and data in the negative sample set includes faces without black eye circles.
In a preferred embodiment of the present invention, the graying operation is to convert the data in the positive sample set and the negative sample set from RGB format to black-white-gray format, and further, the graying operation is converted to the black-white-gray format by using a proportional method according to the following function:
0.30*R+0.59*G+0.11*B
in a preferred embodiment of the present invention, the binarization operation includes setting a threshold value, when the pixel in the black, white and gray format is greater than the threshold value, the pixel becomes 255, and when the pixel in the black, white and gray format is less than the threshold value, the pixel becomes 0, that is, the black and white format indicates that the pixel values of the positive sample set and the negative sample set are 0 or 255.
In the preferred embodiment of the present invention, the noise reduction is performed on the black-and-white format data based on an adaptive image noise reduction filtering method, and the adaptive image noise reduction filtering method is:
g(x,y)=η(x,y)+f(x,y)
Figure GDA0004095051370000061
wherein (x, y) represents the coordinates of pixel points of the image, f (x, y) is the output data after the noise reduction processing is carried out on the black-and-white format data based on the self-adaptive image noise reduction filtering method, eta (x, y) is the noise, g (x, y) is the black-and-white format data,
Figure GDA0004095051370000062
for the noise total variance of the black and white format data, <' >>
Figure GDA0004095051370000063
Is the mean of the (x, y) pixel gray level>
Figure GDA0004095051370000064
And L represents the coordinate of the current pixel point, wherein the pixel gray variance of (x, y) is shown.
S2, a data processing layer receives a preprocessed face image set, the label set is used as an input value of a loss function of a black eye judgment model, the data of the positive sample set and the data of the negative sample set are subjected to direction gradient histogram operation and then input to a support vector machine module of the black eye judgment model, the support vector machine module is used for carrying out primary classification on the negative sample set and the positive sample set, the data with the primary classification errors are extracted based on the label set and input to a convolutional neural network module of the black eye judgment model for training, after the convolutional neural network module is trained, a training label set is output, the training label is input to the loss function, the loss function is combined with the training label set and the label set to calculate an output value, and when the output value is smaller than a preset threshold value, the black eye judgment model exits from training.
In a preferred embodiment of the present invention, the data of the positive sample set and the negative sample set is subjected to direction gradient histogram operation and then input to the black eye judgment model, which includes calculating a gradient magnitude and a direction gradient value of each pixel (x, y) of the data in the face image set, taking the gradient magnitude as a first component, taking the direction gradient value as a second component to form a gradient matrix, dividing the data in the gradient matrix into a plurality of small blocks, adding the gradient magnitude and the direction gradient value of each small block to obtain an added value, and connecting the added values in series to form direction gradient histogram characteristics and inputting the direction gradient histogram characteristics to the black eye judgment model.
In the preferred embodiment of the present invention, the black eye judgment model is trained on the negative sample set and the positive sample set based on the support vector machine algorithm, and the training is stopped until the loss function value in the support vector machine algorithm is smaller than the threshold value. The support vector machine algorithm comprises nonlinear mapping and constraint solving;
the non-linear mapping is:
κ(x i ,x j )=<θ(x i ),θ(x j )>
wherein, the first and the second end of the pipe are connected with each other,<θ(x i ),θ(x j )>representing the direction gradient histogram (x) i ,x j ) Inner product calculation of non-linear mapping, κ (x) i ,x j ) For the direction gradient histogram (x) i ,x j ) The non-linear mapping function of (a);
the constraint solution is:
Figure GDA0004095051370000073
Figure GDA0004095051370000074
wherein alpha is i ≥0,i=1,2,…m
Where m is the number of the direction gradient histogram features, α i ,α j Lagrange number multiplier, y, solved for said constraint i ,y j And s.t is a constraint condition for the labels of the positive and negative samples. The loss function is a least squares method, and the loss function value is L (e):
Figure GDA0004095051370000075
wherein e is an error value between the training value of the black eye judgment model and the label set, k is a total number of the positive sample set and the negative sample set, and y is a total number of the positive sample set and the negative sample set i Is the set of tags, y' i For the training value, the threshold is typically set to 0.01.
In a preferred embodiment of the present invention, the convolutional neural network module comprises an input layer, a convolutional layer, and an output layer;
the convolutional layer comprises a convolution operation, a pooling operation and an activation operation;
the convolution operation is:
Figure GDA0004095051370000081
wherein ω' is output data, ω is the data of the preliminary classification error, k is the size of a convolution kernel, s is the step of convolution operation, and p is a data zero padding matrix;
the activation operation is:
Figure GDA0004095051370000082
where y is the output value of the activate operation and e is an infinite acyclic fraction.
And S3, receiving a test set of a user, mapping data in the test set to a high-dimensional space based on a nonlinear mapping method, performing direction gradient histogram operation on the mapped test set, inputting the result to the black eye judgment model to judge whether a black eye exists, and outputting a result.
In the preferred embodiment of the present invention, the data in the test set is mapped to the high-dimensional space based on a nonlinear mapping method, and the nonlinear mapping method of the support vector machine is adopted for the data mapping.
The invention also provides an intelligent judgment device for the black eye. Fig. 2 is a schematic diagram of an internal structure of an intelligent black eye judgment device according to an embodiment of the present invention.
In the present embodiment, the intelligent determination device 1 may be a PC (Personal Computer), a terminal device such as a smart phone, a tablet Computer, or a mobile Computer, or may be a server. The intelligent judgment device 1 for black eye comprises at least a memory 11, a processor 12, a communication bus 13 and a network interface 14.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may be an internal storage unit of the intelligent judgment device 1 for black eye in some embodiments, for example, a hard disk of the intelligent judgment device 1 for black eye. The memory 11 may also be an external storage device of the intelligent judgment device 1 in other embodiments, for example, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like provided on the intelligent judgment device 1. Further, the memory 11 may also include both an internal storage unit of the black eye intelligent judgment apparatus 1 and an external storage device. The memory 11 may be used not only to store application software installed in the intelligent black eye judgment device 1 and various types of data, such as the code of the intelligent black eye judgment program 01, but also to temporarily store data that has been output or is to be output.
Processor 12, which may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor or other data Processing chip, is used to execute program codes stored in memory 11 or process data, such as executing black-eye intelligent judgment program 01.
The communication bus 13 is used to realize connection communication between these components.
The network interface 14 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), typically used to establish a communication link between the apparatus 1 and other electronic devices.
Optionally, the apparatus 1 may further comprise a user interface, which may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display may also be referred to as a display screen or a display unit, where appropriate, for displaying information processed in the intelligent judgment device 1 for dark circles and for displaying a visual user interface.
Fig. 2 shows only the black eye intelligent judgment device 1 having the components 11 to 14 and the black eye intelligent judgment program 01, and it will be understood by those skilled in the art that the structure shown in fig. 1 does not constitute a limitation of the black eye intelligent judgment device 1, and may include fewer or more components than those shown, or some components in combination, or a different arrangement of components.
In the embodiment of the apparatus 1 shown in fig. 2, the memory 11 stores a black eye intelligent judgment program 01; the processor 12 executes the black eye intelligent judgment program 01 stored in the memory 11 to implement the following steps:
the method comprises the steps that a data receiving layer receives a face image set, the face image set is divided into a positive sample set and a negative sample set through a label set, preprocessing operations including graying, binarization and noise reduction are carried out on the positive sample set and the negative sample set, and then the preprocessed positive sample set, the preprocessed negative sample set and the label set are input into a data processing layer.
In the preferred embodiment of the present invention, the data receiving layer receives a face image set including a positive sample set, a negative sample set and a label set, wherein the data in the positive sample set includes faces with black eye circles, and the data in the negative sample set includes faces without black eye circles.
In a preferred embodiment of the present invention, the graying operation converts the data in the positive sample set and the negative sample set from RGB format to black, white and gray format, and further, the graying operation adopts a proportional method, that is, converts the data in the positive sample set and the negative sample set into the black, white and gray format according to the following function:
0.30*R+0.59*G+0.11*B
in a preferred embodiment of the present invention, the binarization operation includes setting a threshold value, when the pixel in the black, white and gray format is greater than the threshold value, the pixel becomes 255, and when the pixel in the black, white and gray format is less than the threshold value, the pixel becomes 0, that is, the black and white format indicates that the pixel values of the positive sample set and the negative sample set are 0 or 255.
In a preferred embodiment of the present invention, the noise reduction is performed on the black-and-white format data based on an adaptive image noise reduction filtering method, where the adaptive image noise reduction filtering method is:
g(x,y)=η(x,y)+f(x,y)
Figure GDA0004095051370000101
wherein (x, y) represents the coordinates of pixel points of the image, f (x, y) is the output data after the noise reduction processing is carried out on the black-and-white format data based on the self-adaptive image noise reduction filtering method, eta (x, y) is the noise, g (x, y) is the black-and-white format data,
Figure GDA0004095051370000102
a noise total variance for the black and white format data, based on the variance value of the data>
Figure GDA0004095051370000103
Is the mean value of the pixel intensity of (x, y), based on the pixel intensity of the pixel (x, y)>
Figure GDA0004095051370000104
And L represents the coordinate of the current pixel point, wherein the pixel gray variance of (x, y) is shown.
And step two, the data processing layer receives the preprocessed face image set, the label set is used as an input value of a loss function of a black eye judgment model, the data of the positive sample set and the negative sample set are subjected to direction gradient histogram operation and then input to a support vector machine module of the black eye judgment model, the support vector machine module is used for primarily classifying the negative sample set and the positive sample set, the data with the primary classification errors are extracted based on the label set and input to a convolutional neural network module of the black eye judgment model for retraining, after the convolutional neural network module is trained, a training label set is output, the training label is input to the loss function, the loss function is combined with the training label set and the label set to calculate an output value, and when the output value is smaller than a preset threshold value, the black eye judgment model exits training.
In a preferred embodiment of the present invention, the data of the positive sample set and the negative sample set is subjected to direction gradient histogram operation and then input to the black eye judgment model, which includes calculating a gradient amplitude and a direction gradient value of each pixel (x, y) of the data in the face image set, taking the gradient amplitude as a first component, taking the direction gradient value as a second component to form a gradient matrix, dividing the data in the gradient matrix into a plurality of small blocks, adding the gradient amplitude and the direction gradient value of each small block to obtain an added value, and connecting the added values in series to form a direction gradient histogram feature and inputting the direction gradient histogram feature to the black eye judgment model.
In the preferred embodiment of the present invention, the black eye judgment model is trained on the negative sample set and the positive sample set based on the support vector machine algorithm, and the training is stopped until the loss function value in the support vector machine algorithm is smaller than the threshold value. The support vector machine algorithm comprises nonlinear mapping and constraint solving;
the non-linear mapping is:
κ(x i ,x j )=<θ(x i ),θ(x j )>
wherein the content of the first and second substances,<θ(x i ),θ(x j )>representing the direction gradient histogram feature (x) i ,x j ) Inner product calculation of non-linear mapping, κ (x) i ,x j ) Is the direction gradient histogram feature (x) i ,x j ) The non-linear mapping function of (a);
the constraint solution is:
Figure GDA0004095051370000113
Figure GDA0004095051370000114
wherein alpha is i ≥0,i=1,2,…m
Wherein m is the number of the direction gradient histogram features, alpha i ,α j Lagrange number multiplier, y, solved for said constraint i ,y j And s.t is a constraint condition for the labels of the positive and negative samples. The loss function is a least squares method, and the loss function value is L (e):
Figure GDA0004095051370000115
/>
wherein e is an error value between the training value of the black eye judgment model and the label set, k is a total number of the positive sample set and the negative sample set, and y is i For the set of tags, y i For the training values, the threshold is typically set to 0.01.
The convolutional neural network module of the preferred embodiment of the present invention comprises an input layer, a convolutional layer, and an output layer;
the convolutional layer comprises convolution operation, pooling operation and activation operation;
the convolution operation is:
Figure GDA0004095051370000116
wherein ω' is output data, ω is the data of the preliminary classification error, k is the size of a convolution kernel, s is the step of convolution operation, and p is a data zero padding matrix;
the activation operation is:
Figure GDA0004095051370000117
where y is the output value of the activate operation and e is an infinite acyclic fraction.
And step three, receiving a test set of a user, mapping data in the test set to a high-dimensional space based on a nonlinear mapping method, performing direction gradient histogram operation on the mapped test set, inputting the result to the black eye judgment model to judge whether black eyes exist or not, and outputting a result.
In the preferred embodiment of the present invention, the data in the test set is mapped to the high-dimensional space based on a nonlinear mapping method, and the nonlinear mapping method of the support vector machine is adopted for the data mapping.
Alternatively, in other embodiments, the black eye intelligent judgment program may be further divided into one or more modules, and the one or more modules are stored in the memory 11 and executed by one or more processors (in this embodiment, the processor 12) to implement the present invention.
For example, referring to fig. 3, a schematic diagram of program modules of a black eye intelligent determination program in an embodiment of the black eye intelligent determination apparatus according to the present invention is shown, in this embodiment, the black eye intelligent determination program may be divided into the data receiving module 10, the model training module 20, and the black eye judgment module 30, exemplarily:
the data receiving module 10 is configured to: the method comprises the steps of receiving a face image set, dividing the face image set into a positive sample set and a negative sample set through a label set, carrying out preprocessing operations including graying, binarization and noise reduction on the positive sample set and the negative sample set, and inputting the preprocessed positive sample set, the preprocessed negative sample set and the label set to a data processing layer.
The model training module 20 is configured to: receiving a preprocessed face image set, using the label set as an input value of a loss function of a black eye judgment model, performing direction gradient histogram operation on data of a positive sample set and a negative sample set, inputting the data to a support vector machine module of the black eye judgment model, performing primary classification on the negative sample set and the positive sample set by the support vector machine module, extracting data with the primary classification errors based on the label set, inputting the data to a convolutional neural network module of the black eye judgment model, performing retraining, outputting a training label set after the convolutional neural network module performs training, inputting the training label to the loss function, calculating an output value by combining the training label set and the label set by the loss function, and exiting the training of the black eye judgment model when the output value is smaller than a preset threshold value.
The black eye judgment module 30 is configured to: receiving a test set of a user, mapping data in the test set to a high-dimensional space based on a nonlinear mapping method, performing direction gradient histogram operation on the mapped test set, inputting the result to the black eye judgment model to judge whether a black eye exists, and outputting a result.
The functions or operation steps implemented by the program modules such as the data receiving module 10, the model training module 20, and the black eye judgment module 30 are substantially the same as those of the above embodiments, and are not repeated herein.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, where a black eye intelligent determination program is stored on the computer-readable storage medium, where the black eye intelligent determination program is executable by one or more processors to implement the following operations:
receiving a face image set, wherein the face image set is divided into a positive sample set and a negative sample set through a label set, and after preprocessing operations including graying, binarization and noise reduction are carried out on the positive sample set and the negative sample set, the preprocessed positive sample set, the preprocessed negative sample set and the label set are input to a data processing layer;
receiving a preprocessed face image set, using the label set as an input value of a loss function of a black eye judgment model, performing direction gradient histogram operation on data of a positive sample set and a negative sample set, inputting the data to a support vector machine module of the black eye judgment model, performing primary classification on the negative sample set and the positive sample set by the support vector machine module, extracting data with primary classification errors based on the label set, inputting the data to a convolutional neural network module of the black eye judgment model for retraining, outputting a training label set after the convolutional neural network module is trained, inputting the training label to the loss function, calculating an output value by combining the training label set and the label set by the loss function, and quitting training the black eye judgment model when the output value is smaller than a preset threshold value;
receiving a test set of a user, mapping data in the test set to a high-dimensional space based on a nonlinear mapping method, performing direction gradient histogram operation on the mapped test set, inputting the result to the black eye judgment model to judge whether a black eye exists, and outputting a result.
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the above-mentioned embodiments of the device and method for intelligently judging black eye, and will not be described herein again.
It should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising one of 8230, and" comprising 8230does not exclude the presence of additional like elements in a process, apparatus, article, or method comprising the element.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. An intelligent judgment method for black eye circles is characterized by comprising the following steps:
the data receiving layer receives a face image set, the face image set is divided into a positive sample set and a negative sample set through a label set, and after preprocessing operations including graying, binarization and noise reduction are carried out on the positive sample set and the negative sample set, the preprocessed positive sample set, the preprocessed negative sample set and the label set are input to a data processing layer;
the data processing layer receives a preprocessed face image set, the label set is used as an input value of a loss function of a black eye judgment model, the data of the positive sample set and the negative sample set are subjected to direction gradient histogram operation and then input to a support vector machine module of the black eye judgment model, the support vector machine module is used for carrying out primary classification on the negative sample set and the positive sample set, extracting data with the primary classification errors based on the label set and inputting the data into a convolutional neural network module of the black eye judgment model for retraining, after the convolutional neural network module is trained, a training label set is output and the training label is input into the loss function, the loss function is combined with the training label set and the label set to calculate an output value, and when the output value is smaller than a preset threshold value, the black eye judgment model exits from training;
the convolutional neural network module comprises an input layer, a convolutional layer and an output layer;
the convolutional layer comprises convolution operation, pooling operation and activation operation;
the convolution operation is:
Figure FDA0004095051360000011
wherein ω' is output data, ω is the data of the preliminary classification error, k is the size of a convolution kernel, s is the step of convolution operation, and p is a data zero padding matrix;
the support vector machine algorithm comprises nonlinear mapping and constraint solving;
the non-linear mapping is:
κ(x i ,x j )=<θ(x i ),θ(x j )>
wherein, the first and the second end of the pipe are connected with each other,<θ(x i ),θ(x j )>representing the direction gradient histogram (x) i ,x j ) Inner product calculation of non-linear mapping, κ (x) i ,x j ) For the direction gradient histogram (x) i ,x j ) The non-linear mapping function of (a);
the constraint solution is:
Figure FDA0004095051360000012
Figure FDA0004095051360000013
wherein alpha is i ≥0,i=1,2,…m
Where m is the number of the direction gradient histogram features, α i ,α j Lagrange multiplication factor, y, solved for the constraint i ,y j Labels of positive and negative samples, and s.t is a constraint condition;
receiving a test set of a user, mapping data in the test set to a high-dimensional space based on a nonlinear mapping method, performing direction gradient histogram operation on the mapped test set, inputting the result to the black eye judgment model to judge whether a black eye exists, and outputting a result.
2. The intelligent judgment method for black eye according to claim 1, wherein the data in the positive sample set is a face image including black eye, and the data in the negative sample set is a face image not including black eye.
3. The intelligent judgment method for black eye according to claim 1 or 2, wherein the noise reduction is based on an adaptive image noise reduction filtering method for performing noise reduction processing on black and white format data, and the adaptive image noise reduction filtering method is as follows:
g(x,y)=η(x,y)+f(x,y)
Figure FDA0004095051360000021
wherein (x, y) represents coordinates of pixel points of an image, f (x, y) is output data after denoising processing is performed on the positive sample set and the negative sample set based on an adaptive image denoising filter method, η (x, y) is noise, g (x, y) is the positive sample set and the negative sample set,
Figure FDA0004095051360000022
a total variance of the noise for the positive sample set and the negative sample set->
Figure FDA0004095051360000023
Is the mean value of the pixel intensity of (x, y), based on the pixel intensity of the pixel (x, y)>
Figure FDA0004095051360000024
And L represents the coordinate of the current pixel point, wherein the pixel gray variance of (x, y) is shown.
4. The intelligent judgment method for black eye circles as set forth in claim 1, wherein the activation operation is:
Figure FDA0004095051360000025
where y is the output value of the activate operation and e is an infinite acyclic fraction.
5. An intelligent black eye judgment device, comprising a memory and a processor, wherein the memory stores an intelligent black eye judgment program operable on the processor, and the intelligent black eye judgment program, when executed by the processor, implements the following steps:
the data receiving layer receives a face image set, the face image set is divided into a positive sample set and a negative sample set through a label set, and after preprocessing operations including graying, binarization and noise reduction are carried out on the positive sample set and the negative sample set, the preprocessed positive sample set, the preprocessed negative sample set and the label set are input to a data processing layer;
the data processing layer receives a preprocessed face image set, the label set is used as an input value of a loss function of a black eye judgment model, data of the positive sample set and the negative sample set are subjected to direction gradient histogram operation and then input to a support vector machine module of the black eye judgment model, the support vector machine module is used for primarily classifying the negative sample set and the positive sample set, data with primary classification errors are extracted based on the label set and input to a convolutional neural network module of the black eye judgment model for retraining, after the convolutional neural network module is trained, a training label set is output, the training label is input to the loss function, the loss function is combined with the training label set and the label set to calculate an output value, and when the output value is smaller than a preset threshold value, the black eye judgment model quits training;
the convolutional neural network module comprises an input layer, a convolutional layer and an output layer;
the convolutional layer comprises convolution operation, pooling operation and activation operation;
the convolution operation is:
Figure FDA0004095051360000031
wherein ω' is output data, ω is the data of the preliminary classification error, k is the size of a convolution kernel, s is the step of convolution operation, and p is a data zero padding matrix;
the support vector machine algorithm comprises nonlinear mapping and constraint solving;
the non-linear mapping is:
κ(x i ,x j )=<θ(x i ),θ(x j )>
wherein the content of the first and second substances,<θ(x i ),θ(x j )>representing the direction gradient histogram (x) i ,x j ) Inner product calculation of non-linear mapping, κ (x) i ,x j ) For the direction gradient histogram (x) i ,x j ) The non-linear mapping function of (a);
the constraint solution is:
Figure FDA0004095051360000032
Figure FDA0004095051360000033
wherein alpha is i ≥0,i=1,2,…m
Where m is the number of the direction gradient histogram features, α i ,α j Lagrange multiplication factor, y, solved for the constraint i ,y j Labels of positive and negative samples, and s.t is a constraint condition;
receiving a test set of a user, mapping data in the test set to a high-dimensional space based on a nonlinear mapping method, performing direction gradient histogram operation on the mapped test set, inputting the result to the black eye judgment model to judge whether a black eye exists, and outputting a result.
6. The intelligent judgment device for dark circles as set forth in claim 5, wherein the data in the positive sample set is a face image including dark circles, and the data in the negative sample set is a face image not including dark circles.
7. The intelligent judgment device for black eye according to claim 5 or 6, wherein the noise reduction is based on an adaptive image noise reduction filtering method for performing noise reduction processing on black and white format data, the adaptive image noise reduction filtering method comprising:
g(x,y)=η(x,y)+f(x,y)
Figure FDA0004095051360000041
wherein (x, y) represents coordinates of pixel points of an image, f (x, y) is output data obtained after denoising processing is performed on the positive sample set and the negative sample set based on an adaptive image denoising filtering method, v (x, y) is noise, g (x, y) is the positive sample set and the negative sample set,
Figure FDA0004095051360000042
a total variance of the noise for the positive sample set and the negative sample set->
Figure FDA0004095051360000043
Is the mean value of the pixel intensity of (x, y), based on the pixel intensity of the pixel (x, y)>
Figure FDA0004095051360000044
And L represents the coordinate of the current pixel point, wherein the pixel gray variance of (x, y) is shown.
8. The intelligent black eye judgment device according to claim 5, wherein the activation operation is:
Figure FDA0004095051360000045
where y is the output value of the activate operation and e is an infinite acyclic fraction.
9. A computer-readable storage medium, wherein a black-eye intelligent judgment program is stored on the computer-readable storage medium, and the black-eye intelligent judgment program is executable by one or more processors to implement the steps of the black-eye intelligent judgment method according to any one of claims 1 to 4.
CN201910370451.7A 2019-05-06 2019-05-06 Intelligent judgment method and device for black eye and computer readable storage medium Active CN110222571B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910370451.7A CN110222571B (en) 2019-05-06 2019-05-06 Intelligent judgment method and device for black eye and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910370451.7A CN110222571B (en) 2019-05-06 2019-05-06 Intelligent judgment method and device for black eye and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110222571A CN110222571A (en) 2019-09-10
CN110222571B true CN110222571B (en) 2023-04-07

Family

ID=67820327

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910370451.7A Active CN110222571B (en) 2019-05-06 2019-05-06 Intelligent judgment method and device for black eye and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110222571B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110853047B (en) * 2019-10-12 2023-09-15 平安科技(深圳)有限公司 Intelligent image segmentation and classification method, device and computer readable storage medium
CN111428552B (en) * 2019-12-31 2022-07-15 深圳数联天下智能科技有限公司 Black eye recognition method and device, computer equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007279799A (en) * 2006-04-03 2007-10-25 Seiko Epson Corp Image exchange device, image exchange method and image exchange processing program
CN104850825A (en) * 2015-04-18 2015-08-19 中国计量学院 Facial image face score calculating method based on convolutional neural network
CN105739127A (en) * 2016-05-06 2016-07-06 京东方科技集团股份有限公司 Intelligent glasses and eye fatigue recognition method
CN106650688A (en) * 2016-12-30 2017-05-10 公安海警学院 Eye feature detection method, device and recognition system based on convolutional neural network
CN107977623A (en) * 2017-11-30 2018-05-01 睿视智觉(深圳)算法技术有限公司 A kind of robustness human eye state determination methods
WO2018188534A1 (en) * 2017-04-14 2018-10-18 深圳市商汤科技有限公司 Face image processing method and device, and electronic device
CN108985159A (en) * 2018-06-08 2018-12-11 平安科技(深圳)有限公司 Human-eye model training method, eye recognition method, apparatus, equipment and medium
WO2019033525A1 (en) * 2017-08-17 2019-02-21 平安科技(深圳)有限公司 Au feature recognition method, device and storage medium
CN109376575A (en) * 2018-08-20 2019-02-22 奇酷互联网络科技(深圳)有限公司 Method, mobile terminal and the storage medium that human body in image is beautified

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10902243B2 (en) * 2016-10-25 2021-01-26 Deep North, Inc. Vision based target tracking that distinguishes facial feature targets

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007279799A (en) * 2006-04-03 2007-10-25 Seiko Epson Corp Image exchange device, image exchange method and image exchange processing program
CN104850825A (en) * 2015-04-18 2015-08-19 中国计量学院 Facial image face score calculating method based on convolutional neural network
CN105739127A (en) * 2016-05-06 2016-07-06 京东方科技集团股份有限公司 Intelligent glasses and eye fatigue recognition method
CN106650688A (en) * 2016-12-30 2017-05-10 公安海警学院 Eye feature detection method, device and recognition system based on convolutional neural network
WO2018188534A1 (en) * 2017-04-14 2018-10-18 深圳市商汤科技有限公司 Face image processing method and device, and electronic device
WO2019033525A1 (en) * 2017-08-17 2019-02-21 平安科技(深圳)有限公司 Au feature recognition method, device and storage medium
CN107977623A (en) * 2017-11-30 2018-05-01 睿视智觉(深圳)算法技术有限公司 A kind of robustness human eye state determination methods
CN108985159A (en) * 2018-06-08 2018-12-11 平安科技(深圳)有限公司 Human-eye model training method, eye recognition method, apparatus, equipment and medium
CN109376575A (en) * 2018-08-20 2019-02-22 奇酷互联网络科技(深圳)有限公司 Method, mobile terminal and the storage medium that human body in image is beautified

Also Published As

Publication number Publication date
CN110222571A (en) 2019-09-10

Similar Documents

Publication Publication Date Title
CN107633204B (en) Face occlusion detection method, apparatus and storage medium
CN109635627A (en) Pictorial information extracting method, device, computer equipment and storage medium
CN110516544B (en) Face recognition method and device based on deep learning and computer readable storage medium
CN113159147B (en) Image recognition method and device based on neural network and electronic equipment
CN109637664A (en) A kind of BMI evaluating method, device and computer readable storage medium
CN110163204A (en) Businessman&#39;s monitoring and managing method, device and storage medium based on image recognition
CN113283446B (en) Method and device for identifying object in image, electronic equipment and storage medium
CN110135421A (en) Licence plate recognition method, device, computer equipment and computer readable storage medium
CN110335206B (en) Intelligent filter method, device and computer readable storage medium
CN110222571B (en) Intelligent judgment method and device for black eye and computer readable storage medium
CN114402369A (en) Human body posture recognition method and device, storage medium and electronic equipment
CN109919179A (en) Aneurysms automatic testing method, device and computer readable storage medium
CN113255557B (en) Deep learning-based video crowd emotion analysis method and system
CN109871751A (en) Attitude appraisal procedure, device and storage medium based on facial expression recognition
CN112991217A (en) Medical image acquisition method, device and equipment
CN113705534A (en) Behavior prediction method, behavior prediction device, behavior prediction equipment and storage medium based on deep vision
CN110211094B (en) Intelligent judging method and device for black eye and computer readable storage medium
CN110414358B (en) Information output method and device based on intelligent face recognition and storage medium
CN110705547B (en) Method and device for recognizing text in image and computer readable storage medium
CN111179222A (en) Intelligent detection method and device for cerebral hemorrhage point and computer readable storage medium
CN108764289B (en) Method and system for classifying UI (user interface) abnormal pictures based on convolutional neural network
CN110399812B (en) Intelligent face feature extraction method and device and computer readable storage medium
CN116229584A (en) Text segmentation recognition method, system, equipment and medium in artificial intelligence field
CN113158960A (en) Medical image recognition model construction and recognition method and device
CN113077464A (en) Medical image processing method, medical image identification method and device

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