CN104484658A - Face gender recognition method and device based on multi-channel convolution neural network - Google Patents

Face gender recognition method and device based on multi-channel convolution neural network Download PDF

Info

Publication number
CN104484658A
CN104484658A CN201410840403.7A CN201410840403A CN104484658A CN 104484658 A CN104484658 A CN 104484658A CN 201410840403 A CN201410840403 A CN 201410840403A CN 104484658 A CN104484658 A CN 104484658A
Authority
CN
China
Prior art keywords
color channel
gray
channel information
gender
channel
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.)
Pending
Application number
CN201410840403.7A
Other languages
Chinese (zh)
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.)
ThunderSoft Co Ltd
Original Assignee
ThunderSoft 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 ThunderSoft Co Ltd filed Critical ThunderSoft Co Ltd
Priority to CN201410840403.7A priority Critical patent/CN104484658A/en
Publication of CN104484658A publication Critical patent/CN104484658A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • G06V40/162Detection; Localisation; Normalisation using pixel segmentation or colour matching

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Color Image Communication Systems (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a face gender recognition method and device based on a multi-channel convolution neural network. The face gender recognition method based on the multi-channel convolution neural network includes the steps that a face image is obtained from images obtained currently; the face image is processed to obtain multi-color channel information; the multi-color channel information is input into the convolution neural network obtained in advance to be calculated, and an output result expressing gender is obtained; when the output result expressing the gender is within a first preset range, the face gender is identified as masculinity; when the output result expressing the gender is within a second preset range, the face gender is identified as femininity. In this way, as the multi-color channel information in the face image is input into the convolution neural network obtained in advance to be calculated, the output result expressing the gender is obtained. Compared with the prior art, the color characteristic of gender recognition is added, and therefore the accuracy of gender recognition is improved relative to that of recognition based on single gray color channel information.

Description

Face gender identification method and device based on multi-channel convolutional neural network
Technical Field
The invention relates to the technical field of face gender identification, in particular to a face gender identification method and device based on a multi-channel convolutional neural network.
Background
The gender identification method based on the face image is a process for identifying gender attribute of an observed person by using face image information through a computer technology, and mainly comprises the following steps: the method comprises four steps of face image preprocessing, face gender feature extraction, face gender classification and identification result stabilization. The face gender feature extraction is the premise of a gender classification algorithm, and the gender feature extraction directly influences the performance of final gender classification.
At present, methods for extracting gender features of human faces are generally divided into two types, one type is artificial design and comprises LBP (Local Binary Patterns), HOG (Histogram of Oriented Gradient), SIFT (Scale-invariant Feature Transform) and the like; another is auto-learning. The human face gender feature extraction method designed manually has the characteristic of good recognition effect, but the design process is complex, the feature selection process is complicated, and the method depends on the experience of a designer to a certain extent. The face gender feature extraction method based on automatic learning avoids the defects of manual design and achieves good recognition effect.
When the face gender feature extraction method based on automatic learning is used for feature extraction, only gray color channel information is extracted for face gender identification, although the defect of manual design can be avoided, the identification effect of the face gender feature extraction method has certain defect.
Disclosure of Invention
In view of the above, the present invention provides a face gender identification method and apparatus based on a multi-channel convolutional neural network, which are used to improve gender identification accuracy.
In order to achieve the above purpose, the invention provides the following technical scheme:
the invention provides a face gender identification method based on a multi-channel convolutional neural network, which comprises the following steps:
obtaining a face image from a currently obtained image, wherein the face image is an RGB image;
processing the face image to obtain a plurality of color channel information;
inputting the color channel information into a convolution neural network obtained in advance for calculation to obtain an output result representing the gender;
when the output result representing the gender is within a first preset range, identifying the gender of the face as a male;
and when the output result representing the gender is within a second preset range, identifying the gender of the face as female.
Preferably, the plurality of color channel information includes red color channel information, green color channel information, blue color channel information, gray-red color channel information, gray-green color channel information, and gray-blue color channel information.
Preferably, the processing the face image to obtain a plurality of color channel information includes:
acquiring red color channel information from an R channel of the face image;
acquiring green color channel information from a G channel of the face image;
acquiring blue color channel information from a B channel of the face image;
acquiring weights of an R channel, a G channel and a B channel of the face image, multiplying pixels in each channel by corresponding weights respectively and adding to obtain gray color channel information, wherein R + G + B is 1, R is the weight of the R channel, G is the weight of the G channel, and B is the weight of the B channel;
acquiring weights of a gray color channel and an R channel of the face image, multiplying pixels in each channel by corresponding weights respectively, and adding to obtain gray and red color channel information, wherein gray + R is 1, gray is the weight of the gray color channel, and R is the weight of the R channel;
acquiring weights of a gray color channel and a G channel of the face image, multiplying pixels in each channel by corresponding weights respectively, and adding to obtain gray-green color channel information, wherein gray + G is 1, gray is the weight of the gray color channel, and G is the weight of the G channel;
and acquiring weights of a gray color channel and a B channel of the face image, multiplying pixels in each channel by corresponding weights respectively, and adding to obtain gray-green color channel information, wherein gray + B is 1, gray is the weight of the gray color channel, and B is the weight of the B channel.
Preferably, the inputting the plurality of color channel information into a convolutional neural network obtained in advance for calculation to obtain an output result representing gender includes:
inputting the color channel information into a feature extraction layer in the convolutional neural network to obtain an output vector;
and inputting the output vector to a full-connection layer in the convolutional neural network to obtain an output result representing the gender.
Preferably, inputting the color channel information into a feature extraction layer in the convolutional neural network to obtain an output vector, including:
according to the formulaPerforming convolution operation, and down-sampling the operation result after convolution to obtain an output vector, wherein M isjIndicating the number of input color channelsiRepresenting the input of the ith color channel, kijConvolution kernels representing the ith color channel and the jth plane in the first convolution layer, bjDenotes the offset, x, of the jth plane in the first convolutional layerjIs the j-th plane of the first convolutional layer, f (·) denotes the activation function, and the "·" number denotes the convolution operation.
The invention also provides a face gender recognition device based on the multichannel convolutional neural network, which comprises:
the device comprises a first acquisition unit, a second acquisition unit and a processing unit, wherein the first acquisition unit is used for obtaining a face image from a currently acquired image, and the face image is an RGB image;
the second acquisition unit is used for processing the face image to obtain a plurality of color channel information;
the calculating unit is used for inputting the color channel information into a convolution neural network obtained in advance for calculation to obtain an output result representing the gender;
the first identification unit is used for identifying the gender of the face as a male when the output result representing the gender is in a first preset range;
and the second identification unit is used for identifying the gender of the face as female when the output result representing the gender is in a second preset range.
Preferably, the plurality of color channel information includes red color channel information, green color channel information, blue color channel information, gray-red color channel information, gray-green color channel information, and gray-blue color channel information.
Preferably, the second acquiring unit includes: a red color channel information obtaining subunit, a green color channel information obtaining subunit, a blue color channel information obtaining subunit, a gray red color channel information obtaining subunit, a gray green color channel information obtaining subunit, and a gray blue color channel information obtaining subunit; wherein,
the red color channel information acquisition subunit is used for acquiring red color channel information from an R channel of the face image;
the green color channel information obtaining subunit is configured to obtain green color channel information from a G channel of the face image;
the blue color channel information obtaining subunit is configured to obtain blue color channel information from a B channel of the face image;
the gray color channel information obtaining subunit is configured to obtain weights of an R channel, a G channel, and a B channel of the face image, and multiply and add pixels in each channel by a corresponding weight to obtain the gray color channel information, where R + G + B is 1, R is the weight of the R channel, G is the weight of the G channel, and B is the weight of the B channel;
the gray-red color channel information obtaining subunit is configured to obtain weights of a gray color channel and an R channel of the face image, and multiply and add pixels in each channel by a corresponding weight to obtain the gray-red color channel information, where gray + R is 1, gray is the weight of the gray color channel, and R is the weight of the R channel;
the gray-green color channel information obtaining subunit is configured to obtain weights of a gray color channel and a G channel of the face image, and multiply and add pixels in each channel by a corresponding weight to obtain the gray-green color channel information, where gray + G is 1, gray is the weight of the gray color channel, and G is the weight of the G channel;
and the gray-blue color channel information obtaining subunit is configured to obtain weights of a gray color channel and a B channel of the face image, and multiply and add the pixels in each channel with the corresponding weights to obtain the gray-green color channel information, where gray + B is 1, gray is the weight of the gray color channel, and B is the weight of the B channel.
Preferably, the calculation unit includes: a first calculating subunit and a second calculating subunit; wherein,
the first calculating subunit is configured to input the multiple pieces of color channel information to a feature extraction layer in the convolutional neural network to obtain an output vector;
and the second calculating subunit is used for inputting the output vector to a full-connection layer in the convolutional neural network to obtain an output result representing the gender.
Preferably, the first calculating subunit inputs the color channel information to a feature extraction layer in the convolutional neural network to obtain an output vector, and includes:
according to the formulaPerforming convolution operation, and down-sampling the operation result after convolution to obtain an output vector, wherein M isjIndicating the number of input color channelsiRepresenting the input of the ith color channel, kijConvolution kernels representing the ith color channel and the jth plane in the first convolution layer, bjDenotes the offset, x, of the jth plane in the first convolutional layerjIs the j-th plane of the first convolutional layer, f (·) denotes the activation function, and the "·" number denotes the convolution operation.
Compared with the prior art, the invention has the following advantages:
the human face gender identification method based on the multi-channel convolutional neural network provided by the invention is characterized in that a plurality of color channel information in a human face image is input into the convolutional neural network obtained in advance for calculation, so that an output result representing gender is obtained. Compared with the prior art, the color feature of gender identification is increased, so that gender identification accuracy is improved relative to identification based on single gray color channel information.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a face gender identification method based on a multi-channel convolutional neural network provided by an embodiment of the invention;
FIG. 2 is a flow chart of the calculation of multi-color channel information in the face gender identification method based on the multi-channel convolutional neural network shown in FIG. 1;
FIG. 3 is a schematic diagram of a convolutional neural network provided by an embodiment of the present invention;
FIG. 4 is a schematic diagram of a convolutional neural network architecture provided by an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a face gender identification device based on a multi-channel convolutional neural network according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a second obtaining unit in the face gender identification device based on the multi-channel convolutional neural network shown in fig. 5.
Detailed Description
The inventor finds that, in the prior art, when identifying the gender of the face, the gender identification is usually performed by using the gray-scale color channel information of the face image, the color channel color information of the face image is discarded, and the identification by using the color channel color information of the face image can effectively improve the identification rate, namely improve the gender identification accuracy. The embodiment of the invention provides a face gender identification method based on a multi-channel convolutional neural network, and one of the core ideas is as follows: and inputting the information of the plurality of color channels into a convolutional neural network obtained in advance to identify the gender of the human face.
In order to make those skilled in the art better understand the present invention, 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.
Referring to fig. 1, a flowchart of a face gender identification method based on a multi-channel convolutional neural network according to an embodiment of the present invention is shown, which may include the following steps:
101: and obtaining a face image from the currently acquired image, wherein the face image is an RGB (red, green and blue) image. After an image is acquired, a face detector may be used to detect whether the currently acquired image includes a face, and when it is detected that the currently acquired image includes a face, a face image is obtained from the currently acquired image.
102: and processing the face image to obtain a plurality of color channel information. In the embodiment of the invention, the plurality of color channel information not only includes gray color channel information, but also includes other color channel information, so as to improve the gender identification accuracy in the subsequent identification.
The plurality of color channel information may include seven color channel information, which are red color channel information, green color channel information, blue color channel information, gray-red color channel information, gray-green color channel information, and gray-blue color channel information. The acquisition manner of the seven color channel information can be shown in fig. 2, and includes the following steps:
1021: and acquiring red color channel information from an R (red) channel of the face image.
1022: green color channel information is acquired from a G (green) channel of the face image.
1023: blue color channel information is acquired from a B (blue) channel of the face image.
1024: the method comprises the steps of obtaining weights of an R channel, a G channel and a B channel of a face image, multiplying pixels in each channel by corresponding weights respectively, and adding the multiplied values to obtain gray color channel information, wherein R + G + B is 1, R is the weight of the R channel, G is the weight of the G channel, and B is the weight of the B channel.
1025: the method comprises the steps of obtaining weights of a gray color channel and an R channel of a face image, multiplying pixels in each channel by corresponding weights respectively, and adding to obtain gray and red color channel information, wherein gray + R is 1, gray is the weight of the gray color channel, and R is the weight of the R channel.
1026: the method comprises the steps of obtaining weights of a gray color channel and a G channel of a face image, multiplying pixels in each channel by corresponding weights respectively, and adding to obtain gray-green color channel information, wherein gray + G is 1, gray is the weight of the gray color channel, and G is the weight of the G channel.
1027: the method comprises the steps of obtaining weights of a gray color channel and a B channel of a face image, multiplying pixels in each channel by corresponding weights respectively, and adding to obtain gray-green color channel information, wherein gray + B is 1, gray is the weight of the gray color channel, and B is the weight of the B channel.
It can be seen from the above obtaining process that the three color channel information, i.e., the red color channel information, the green color channel information, and the blue color channel information, can be obtained from the corresponding color channels, and the gray color channel information is obtained by performing weight calculation on the R channel, the G channel, and the B channel. The three color channel information, i.e., the red color channel information, the gray-green color channel information, and the gray-blue color channel information, are obtained by performing weight calculation on the gray color channel and the corresponding single color channel information.
103: and inputting the information of the plurality of color channels into a convolution neural network obtained in advance for calculation to obtain an output result representing the gender.
As known to those skilled in the art, a convolutional neural network is a neural network integrating feature extraction and classification, and a convolutional operation has the characteristics of rotation resistance and offset resistance, and the characteristics can effectively offset the influence of face frame deviation and face angle caused by face images obtained by different face detectors; the weight sharing characteristic greatly reduces the parameters of the model, so that the network is easier to learn and converge, and the down-sampling processing greatly reduces the dimensionality of the features, thereby effectively retaining the main features of the face image. The convolutional neural network is able to extract features that are useful for gender classification.
The convolutional neural network is a multi-layer neural network at present, and comprises a feature extraction layer and a full connection layer. Wherein the feature extraction layer comprises a convolution layer and a down-sampling layer. In the feature extraction layer, each layer is composed of a plurality of two-dimensional planes, and each plane is composed of a plurality of independent neurons. And the output of the characteristic extraction layer is connected into a vector and is input into the full-connection layer, and finally, an output result representing the gender is obtained.
As shown in fig. 3, where input represents input of a plurality of color channel information, C1 and S1 constitute a feature extraction layer, C1 is a convolution layer, S1 is a down-sampling layer, C2, S2, and hidden constitute a full connection layer, each rectangle represents a two-dimensional plane, and a small rectangle on each rectangle represents an independent neuron.
When the color channel is calculated by the convolutional neural network, a plurality of color channel information can be input to a feature extraction layer in the convolutional neural network to obtain an output vector; and inputting the output vector to a full-connection layer in the convolutional neural network to obtain an output result representing the gender.
The process of inputting the information of the plurality of color channels into the feature extraction layer in the convolutional neural network to obtain the output vector may be: according to the formulaPerforming convolution operation, and down-sampling the operation result after convolution to obtain an output vector, wherein M isjIndicating the number of input color channelsiRepresenting the input of the ith color channel, kijConvolution kernels representing the ith color channel and the jth plane in the first convolution layer, bjDenotes the offset, x, of the jth plane in the first convolutional layerjIs the j-th plane of the first convolutional layer, f (·) denotes the activation function, and the "·" number denotes the convolution operation.
After the output vector is obtained, the processing procedure of the output vector by the full connection layer is the same as the processing procedure of the single gray color channel information in the full connection layer in the prior art, and the embodiment of the invention is not explained again.
104: and when the output result representing the gender is within a first preset range, identifying the gender of the face as a male.
105: and when the output result representing the gender is within a second preset range, identifying the gender of the face as female.
In the embodiment of the present invention, the first preset range and the second preset range are value ranges preset for distinguishing gender, for example, 0.5 may be set as a distinguishing point when used for distinguishing gender of male and female, and when greater than 0.5, the gender of the face is identified as male; and when the gender of the human face is less than 0.5, the human face is identified as a female. Then the first predetermined range may be [1,0.5 ] and the second predetermined range is (0.5,0 ].
From the process, the human face gender identification method based on the multi-channel convolutional neural network obtains the output result representing the gender by inputting the information of the plurality of color channels in the human face image into the pre-obtained convolutional neural network for calculation. Compared with the prior art, the color feature of gender identification is increased, so that gender identification accuracy is improved relative to identification based on single gray color channel information.
The points to be explained here are: the convolutional neural network used in the embodiment of the present invention is obtained by identifying a face image of a known gender in advance, and a specific process thereof can be shown in fig. 4, and includes:
201: a certain number of face images are selected from a face image library with known gender as training samples, and the selected face images comprise face images of males and face images of females.
202: each training sample is processed to obtain a plurality of color channel information of each training sample, wherein the plurality of color channel information includes seven color channel information, namely red color channel information, green color channel information, blue color channel information, gray red color channel information, gray green color channel information, and gray blue color channel information, and a calculation process of the color channel information may refer to fig. 2, which is not described herein.
Setting training parameters of the convolutional neural network 203: the input layer is 7 channels, namely a red color channel, a green color channel, a blue color channel, a gray red color channel, a gray green color channel, a gray blue color channel, and the number of convolution layers CNFeature mapping number maps for each convolutional layer, filter kernel size height width for each convolutional layer, activation function f of neuronc(x) Number of layers S of down-samplingNThe down-sampling layer is reduced in scale, the step length of the down-sampling layer is stride, and the down-sampling mode can adopt an average method or a local maximum method. Number of fully connected neurons (fully connected layer) H, activation function f of neuronsh(x) Output layer neuron number O; activation function f of output layero(x) In that respect Number of training iterations I. The activation function may be a linear or non-linear function such as a sigmoid function, a tandent function, or a relu function. A cost function j (w) is selected. The cost function being a mean square error function
Initializing an iteration number I, wherein an iteration index I is 1;
and 205, calculating the output error of the forward network, wherein the forward network is a feedforward network of a convolutional neural network, and when the output error is calculated by adopting the forward network, the male is marked when the output result representing the gender is 1, and the female is marked when the output result representing the gender is 0.
And 206, updating the weight value of the convolutional neural network, namely the filter kernel, by using an error back propagation algorithm based on the output error.
And updating I, I is equal to I +1, and jumping to 209 if I > is equal to I.
208, reselecting the training sample from the face image library, jumping to the step 205, and processing the convolution neural network obtained last time according to the steps 205 and 206.
And 209, stopping training to obtain the final convolutional neural network.
Corresponding to the above method embodiment, an embodiment of the present invention further provides a face gender identification apparatus based on a multi-channel convolutional neural network, a schematic structural diagram of which is shown in fig. 5, and the apparatus may include: a first acquisition unit 11, a second acquisition unit 12, a calculation unit 13, a first identification unit 14 and a second identification unit 15. Wherein,
the first acquiring unit 11 is configured to obtain a face image from a currently acquired image, where the face image is an RGB image. After acquiring an image, the first acquiring unit 11 may detect whether the currently acquired image includes a human face by using a human face detector, and when it is detected that the currently acquired image includes a human face, obtain a human face image from the currently acquired image.
And the second acquiring unit 12 is configured to process the face image to obtain a plurality of color channel information. In the embodiment of the invention, the plurality of color channel information not only includes gray color channel information, but also includes other color channel information, so as to improve the gender identification accuracy in the subsequent identification.
The plurality of color channel information may include seven color channel information, which are red color channel information, green color channel information, blue color channel information, gray-red color channel information, gray-green color channel information, and gray-blue color channel information.
In this embodiment of the present invention, a schematic structural diagram of the second obtaining unit 12 may be as shown in fig. 6, and may include: a red color channel information acquiring subunit 121, a green color channel information acquiring subunit 122, a blue color channel information acquiring subunit 123, a gray color channel information acquiring subunit 124, a gray-red color channel information acquiring subunit 125, a gray-green color channel information acquiring subunit 126, and a gray-blue color channel information acquiring subunit 127. Wherein,
and a red color channel information obtaining subunit 121, configured to obtain red color channel information from the R channel of the face image.
A green color channel information obtaining subunit 122, configured to obtain green color channel information from the G channel of the face image.
A blue color channel information obtaining subunit 123, configured to obtain blue color channel information from the B channel of the face image.
And a gray color channel information obtaining subunit 124, configured to obtain weights of an R channel, a G channel, and a B channel of the face image, and multiply and add the pixels in each channel by a corresponding weight to obtain gray color channel information, where R + G + B is 1, R is the weight of the R channel, G is the weight of the G channel, and B is the weight of the B channel.
And a gray-red channel information obtaining subunit 125, configured to obtain weights of a gray channel and an R channel of the face image, and multiply and add the pixels in each channel by a corresponding weight to obtain gray-red channel information, where gray + R is 1, gray is the weight of the gray channel, and R is the weight of the R channel.
And a gray-green color channel information obtaining subunit 126, configured to obtain weights of a gray color channel and a G channel of the face image, and multiply and add the pixels in each channel by a corresponding weight to obtain gray-green color channel information, where gray + G is 1, gray is the weight of the gray color channel, and G is the weight of the G channel.
And a gray-blue color channel information obtaining subunit 127, configured to obtain weights of a gray color channel and a B channel of the face image, multiply and add the pixels in each channel by a corresponding weight, respectively, to obtain gray-green color channel information, where gray + B is 1, gray is the weight of the gray color channel, and B is the weight of the B channel.
It can be seen from the above obtaining process that the three color channel information, i.e., the red color channel information, the green color channel information, and the blue color channel information, can be obtained from the corresponding color channels, and the gray color channel information is obtained by performing weight calculation on the R channel, the G channel, and the B channel. The three color channel information, i.e., the red color channel information, the gray-green color channel information, and the gray-blue color channel information, are obtained by performing weight calculation on the gray color channel and the corresponding single color channel information.
And the calculating unit 13 is used for inputting the information of the plurality of color channels into a convolution neural network obtained in advance for calculation to obtain an output result representing the gender. The process of obtaining the convolutional neural network in advance can refer to the flowchart shown in fig. 4, and the embodiment of the present invention will not be described.
In the embodiment of the present invention, the calculation unit 13 may include: a first calculating subunit and a second calculating subunit. The first calculating subunit is used for inputting the information of the plurality of color channels into a feature extraction layer in the convolutional neural network to obtain an output vector. And the second calculating subunit is used for inputting the output vector to a full-connection layer in the convolutional neural network to obtain an output result representing the gender.
And the first calculating subunit may be according to a formulaPerforming convolution operation, and down-sampling the operation result after convolution to obtain an output vector, wherein M isjIndicating the number of input color channelsiRepresenting the input of the ith color channel, kijConvolution kernels representing the ith color channel and the jth plane in the first convolution layer, bjDenotes the offset, x, of the jth plane in the first convolutional layerjIs the j-th plane of the first convolutional layer, f (·) denotes the activation function, and the "·" number denotes the convolution operation.
And the first identification unit 14 is used for identifying the gender of the face as a male when the output result representing the gender is within a first preset range.
And a second identification unit 15 for identifying the gender of the face as female when the output result indicating the gender is within a second preset range.
In the embodiment of the present invention, the first preset range and the second preset range are value ranges preset for distinguishing gender, for example, 0.5 may be set as a distinguishing point when used for distinguishing gender of male and female, and when greater than 0.5, the gender of the face is identified as male; and when the gender of the human face is less than 0.5, the human face is identified as a female. Then the first predetermined range may be [1,0.5 ] and the second predetermined range is (0.5,0 ].
From the process, the human face gender identification device based on the multi-channel convolutional neural network obtains the output result representing the gender by inputting the information of the plurality of color channels in the human face image into the convolutional neural network obtained in advance for calculation. Compared with the prior art, the color feature of gender identification is increased, so that gender identification accuracy is improved relative to identification based on single gray color channel information.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A face gender identification method based on a multi-channel convolution neural network is characterized by comprising the following steps:
obtaining a face image from a currently obtained image, wherein the face image is an RGB image;
processing the face image to obtain a plurality of color channel information;
inputting the color channel information into a convolution neural network obtained in advance for calculation to obtain an output result representing the gender;
when the output result representing the gender is within a first preset range, identifying the gender of the face as a male;
and when the output result representing the gender is within a second preset range, identifying the gender of the face as female.
2. The method of claim 1, wherein the plurality of color channel information includes red color channel information, green color channel information, blue color channel information, gray-red color channel information, gray-green color channel information, and gray-blue color channel information.
3. The method of claim 2, wherein processing the face image to obtain a plurality of color channel information comprises:
acquiring red color channel information from an R channel of the face image;
acquiring green color channel information from a G channel of the face image;
acquiring blue color channel information from a B channel of the face image;
acquiring weights of an R channel, a G channel and a B channel of the face image, multiplying pixels in each channel by corresponding weights respectively and adding to obtain gray color channel information, wherein R + G + B is 1, R is the weight of the R channel, G is the weight of the G channel, and B is the weight of the B channel;
acquiring weights of a gray color channel and an R channel of the face image, multiplying pixels in each channel by corresponding weights respectively, and adding to obtain gray and red color channel information, wherein gray + R is 1, gray is the weight of the gray color channel, and R is the weight of the R channel;
acquiring weights of a gray color channel and a G channel of the face image, multiplying pixels in each channel by corresponding weights respectively, and adding to obtain gray-green color channel information, wherein gray + G is 1, gray is the weight of the gray color channel, and G is the weight of the G channel;
and acquiring weights of a gray color channel and a B channel of the face image, multiplying pixels in each channel by corresponding weights respectively, and adding to obtain gray-green color channel information, wherein gray + B is 1, gray is the weight of the gray color channel, and B is the weight of the B channel.
4. The method of claim 1, wherein inputting the color channel information into a convolutional neural network obtained in advance for calculation to obtain an output result representing gender, comprises:
inputting the color channel information into a feature extraction layer in the convolutional neural network to obtain an output vector;
and inputting the output vector to a full-connection layer in the convolutional neural network to obtain an output result representing the gender.
5. The method of claim 4, wherein inputting the plurality of color channel information into a feature extraction layer in the convolutional neural network, resulting in an output vector, comprises:
according to the formulaPerforming convolution operation, and down-sampling the operation result after convolution to obtain an output vector, wherein M isjIndicating the number of input color channelsiRepresenting the input of the ith color channel, kijConvolution kernels representing the ith color channel and the jth plane in the first convolution layer, bjDenotes the offset, x, of the jth plane in the first convolutional layerjIs the j-th plane of the first convolutional layer, f (·) denotes the activation function, and the "·" number denotes the convolution operation.
6. A face gender recognition device based on a multi-channel convolution neural network is characterized by comprising:
the device comprises a first acquisition unit, a second acquisition unit and a processing unit, wherein the first acquisition unit is used for obtaining a face image from a currently acquired image, and the face image is an RGB image;
the second acquisition unit is used for processing the face image to obtain a plurality of color channel information;
the calculating unit is used for inputting the color channel information into a convolution neural network obtained in advance for calculation to obtain an output result representing the gender;
the first identification unit is used for identifying the gender of the face as a male when the output result representing the gender is in a first preset range;
and the second identification unit is used for identifying the gender of the face as female when the output result representing the gender is in a second preset range.
7. The apparatus of claim 6, wherein the plurality of color channel information comprises red color channel information, green color channel information, blue color channel information, gray-red color channel information, gray-green color channel information, and gray-blue color channel information.
8. The apparatus of claim 7, wherein the second obtaining unit comprises: a red color channel information obtaining subunit, a green color channel information obtaining subunit, a blue color channel information obtaining subunit, a gray red color channel information obtaining subunit, a gray green color channel information obtaining subunit, and a gray blue color channel information obtaining subunit; wherein,
the red color channel information acquisition subunit is used for acquiring red color channel information from an R channel of the face image;
the green color channel information obtaining subunit is configured to obtain green color channel information from a G channel of the face image;
the blue color channel information obtaining subunit is configured to obtain blue color channel information from a B channel of the face image;
the gray color channel information obtaining subunit is configured to obtain weights of an R channel, a G channel, and a B channel of the face image, and multiply and add pixels in each channel by a corresponding weight to obtain the gray color channel information, where R + G + B is 1, R is the weight of the R channel, G is the weight of the G channel, and B is the weight of the B channel;
the gray-red color channel information obtaining subunit is configured to obtain weights of a gray color channel and an R channel of the face image, and multiply and add pixels in each channel by a corresponding weight to obtain the gray-red color channel information, where gray + R is 1, gray is the weight of the gray color channel, and R is the weight of the R channel;
the gray-green color channel information obtaining subunit is configured to obtain weights of a gray color channel and a G channel of the face image, and multiply and add pixels in each channel by a corresponding weight to obtain the gray-green color channel information, where gray + G is 1, gray is the weight of the gray color channel, and G is the weight of the G channel;
and the gray-blue color channel information obtaining subunit is configured to obtain weights of a gray color channel and a B channel of the face image, and multiply and add the pixels in each channel with the corresponding weights to obtain the gray-green color channel information, where gray + B is 1, gray is the weight of the gray color channel, and B is the weight of the B channel.
9. The apparatus of claim 6, wherein the computing unit comprises: a first calculating subunit and a second calculating subunit; wherein,
the first calculating subunit is configured to input the multiple pieces of color channel information to a feature extraction layer in the convolutional neural network to obtain an output vector;
and the second calculating subunit is used for inputting the output vector to a full-connection layer in the convolutional neural network to obtain an output result representing the gender.
10. The apparatus of claim 9, wherein the first computing subunit inputs the plurality of color channel information to a feature extraction layer in the convolutional neural network to obtain an output vector, and comprises:
according to the formulaPerforming convolution operation, and down-sampling the operation result after convolution to obtain an output vector, wherein M isjIndicating the number of input color channelsiRepresenting the input of the ith color channel, kijConvolution kernels representing the ith color channel and the jth plane in the first convolution layer, bjDenotes the offset, x, of the jth plane in the first convolutional layerjIs the j-th plane of the first convolutional layer, f (·) denotes the activation function, and the "·" number denotes the convolution operation.
CN201410840403.7A 2014-12-30 2014-12-30 Face gender recognition method and device based on multi-channel convolution neural network Pending CN104484658A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410840403.7A CN104484658A (en) 2014-12-30 2014-12-30 Face gender recognition method and device based on multi-channel convolution neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410840403.7A CN104484658A (en) 2014-12-30 2014-12-30 Face gender recognition method and device based on multi-channel convolution neural network

Publications (1)

Publication Number Publication Date
CN104484658A true CN104484658A (en) 2015-04-01

Family

ID=52759199

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410840403.7A Pending CN104484658A (en) 2014-12-30 2014-12-30 Face gender recognition method and device based on multi-channel convolution neural network

Country Status (1)

Country Link
CN (1) CN104484658A (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105068644A (en) * 2015-07-24 2015-11-18 山东大学 Method for detecting P300 electroencephalogram based on convolutional neural network
CN105095867A (en) * 2015-07-21 2015-11-25 哈尔滨多智科技发展有限公司 Rapid dynamic face extraction and identification method based deep learning
CN105654028A (en) * 2015-09-29 2016-06-08 厦门中控生物识别信息技术有限公司 True and false face identification method and apparatus thereof
CN105809090A (en) * 2014-12-30 2016-07-27 中国科学院深圳先进技术研究院 Method and system for face sex characteristic extraction
CN106127159A (en) * 2016-06-28 2016-11-16 电子科技大学 A kind of gender identification method based on convolutional neural networks
CN106503661A (en) * 2016-10-25 2017-03-15 陕西师范大学 Face gender identification method based on fireworks depth belief network
CN107220990A (en) * 2017-06-22 2017-09-29 成都品果科技有限公司 A kind of hair dividing method based on deep learning
CN107292885A (en) * 2017-08-08 2017-10-24 广东工业大学 A kind of product defects classifying identification method and device based on autocoder
CN107301389A (en) * 2017-06-16 2017-10-27 广东欧珀移动通信有限公司 Based on face characteristic identification user's property method for distinguishing, device and terminal
CN107316015A (en) * 2017-06-19 2017-11-03 南京邮电大学 A kind of facial expression recognition method of high accuracy based on depth space-time characteristic
CN107590460A (en) * 2017-09-12 2018-01-16 北京达佳互联信息技术有限公司 Face classification method, apparatus and intelligent terminal
CN107909008A (en) * 2017-10-29 2018-04-13 北京工业大学 Video target tracking method based on multichannel convolutive neutral net and particle filter
CN109145837A (en) * 2018-08-28 2019-01-04 厦门理工学院 Face emotion identification method, device, terminal device and storage medium
US10269120B2 (en) 2016-11-25 2019-04-23 Industrial Technology Research Institute Character recognition systems and character recognition methods thereof using convolutional neural network
CN110163049A (en) * 2018-07-18 2019-08-23 腾讯科技(深圳)有限公司 A kind of face character prediction technique, device and storage medium
CN110574026A (en) * 2017-04-27 2019-12-13 苹果公司 Configurable convolution engine for interleaving channel data
CN110874572A (en) * 2019-10-29 2020-03-10 北京海益同展信息科技有限公司 Information detection method and device and storage medium
US10747843B2 (en) 2016-06-30 2020-08-18 Apple Inc. Configurable convolution engine
CN111753770A (en) * 2020-06-29 2020-10-09 北京百度网讯科技有限公司 Person attribute identification method and device, electronic equipment and storage medium
CN112507986A (en) * 2021-02-03 2021-03-16 长沙小钴科技有限公司 Multi-channel human face in-vivo detection method and device based on neural network

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103955718A (en) * 2014-05-15 2014-07-30 厦门美图之家科技有限公司 Image subject recognition method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103955718A (en) * 2014-05-15 2014-07-30 厦门美图之家科技有限公司 Image subject recognition method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
BENJAMIN GRAHAM: "Spatially-sparse convolutional neural networks", 《COMPUTER SCIENCE》 *
JAKE BOUVRIE: "Notes on Convolutional Neural Networks", 《COGPRINTS》 *
蔡诗威等: "一种基于卷积神经网络的性别识别方法", 《电视技术》 *

Cited By (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105809090A (en) * 2014-12-30 2016-07-27 中国科学院深圳先进技术研究院 Method and system for face sex characteristic extraction
CN105095867A (en) * 2015-07-21 2015-11-25 哈尔滨多智科技发展有限公司 Rapid dynamic face extraction and identification method based deep learning
CN105068644A (en) * 2015-07-24 2015-11-18 山东大学 Method for detecting P300 electroencephalogram based on convolutional neural network
CN105654028A (en) * 2015-09-29 2016-06-08 厦门中控生物识别信息技术有限公司 True and false face identification method and apparatus thereof
CN106127159A (en) * 2016-06-28 2016-11-16 电子科技大学 A kind of gender identification method based on convolutional neural networks
US10747843B2 (en) 2016-06-30 2020-08-18 Apple Inc. Configurable convolution engine
CN106503661B (en) * 2016-10-25 2019-06-28 陕西师范大学 Face gender identification method based on fireworks deepness belief network
CN106503661A (en) * 2016-10-25 2017-03-15 陕西师范大学 Face gender identification method based on fireworks depth belief network
US10269120B2 (en) 2016-11-25 2019-04-23 Industrial Technology Research Institute Character recognition systems and character recognition methods thereof using convolutional neural network
US10685421B1 (en) 2017-04-27 2020-06-16 Apple Inc. Configurable convolution engine for interleaved channel data
CN110574026A (en) * 2017-04-27 2019-12-13 苹果公司 Configurable convolution engine for interleaving channel data
CN110574026B (en) * 2017-04-27 2021-02-26 苹果公司 Convolution engine, electronic device and method for processing data
CN107301389B (en) * 2017-06-16 2020-04-14 Oppo广东移动通信有限公司 Method, device and terminal for identifying user gender based on face features
CN107301389A (en) * 2017-06-16 2017-10-27 广东欧珀移动通信有限公司 Based on face characteristic identification user's property method for distinguishing, device and terminal
CN107316015A (en) * 2017-06-19 2017-11-03 南京邮电大学 A kind of facial expression recognition method of high accuracy based on depth space-time characteristic
CN107316015B (en) * 2017-06-19 2020-06-30 南京邮电大学 High-precision facial expression recognition method based on deep space-time characteristics
CN107220990A (en) * 2017-06-22 2017-09-29 成都品果科技有限公司 A kind of hair dividing method based on deep learning
CN107292885A (en) * 2017-08-08 2017-10-24 广东工业大学 A kind of product defects classifying identification method and device based on autocoder
CN107590460B (en) * 2017-09-12 2019-05-03 北京达佳互联信息技术有限公司 Face classification method, apparatus and intelligent terminal
CN107590460A (en) * 2017-09-12 2018-01-16 北京达佳互联信息技术有限公司 Face classification method, apparatus and intelligent terminal
CN107909008A (en) * 2017-10-29 2018-04-13 北京工业大学 Video target tracking method based on multichannel convolutive neutral net and particle filter
CN110163049A (en) * 2018-07-18 2019-08-23 腾讯科技(深圳)有限公司 A kind of face character prediction technique, device and storage medium
CN110163049B (en) * 2018-07-18 2023-08-29 腾讯科技(深圳)有限公司 Face attribute prediction method, device and storage medium
CN109145837A (en) * 2018-08-28 2019-01-04 厦门理工学院 Face emotion identification method, device, terminal device and storage medium
CN110874572A (en) * 2019-10-29 2020-03-10 北京海益同展信息科技有限公司 Information detection method and device and storage medium
CN111753770A (en) * 2020-06-29 2020-10-09 北京百度网讯科技有限公司 Person attribute identification method and device, electronic equipment and storage medium
CN112507986A (en) * 2021-02-03 2021-03-16 长沙小钴科技有限公司 Multi-channel human face in-vivo detection method and device based on neural network

Similar Documents

Publication Publication Date Title
CN104484658A (en) Face gender recognition method and device based on multi-channel convolution neural network
CN108182441B (en) Parallel multichannel convolutional neural network, construction method and image feature extraction method
CN107016681B (en) Brain MRI tumor segmentation method based on full convolution network
CN107578418B (en) Indoor scene contour detection method fusing color and depth information
De Luna et al. Identification of philippine herbal medicine plant leaf using artificial neural network
Al-Hiary et al. Fast and accurate detection and classification of plant diseases
CN105354581B (en) The color image feature extracting method of Fusion of Color feature and convolutional neural networks
CN109101938B (en) Multi-label age estimation method based on convolutional neural network
CN109325395A (en) The recognition methods of image, convolutional neural networks model training method and device
CN110879982A (en) Crowd counting system and method
CN111090764B (en) Image classification method and device based on multitask learning and graph convolution neural network
CN113989662A (en) Remote sensing image fine-grained target identification method based on self-supervision mechanism
CN108898269A (en) Electric power image-context impact evaluation method based on measurement
Rossi et al. FishAPP: A mobile App to detect fish falsification through image processing and machine learning techniques
Jenifa et al. Classification of cotton leaf disease using multi-support vector machine
CN115841594B (en) Attention mechanism-based coal gangue hyperspectral variable image domain data identification method
CN109376736A (en) A kind of small video target detection method based on depth convolutional neural networks
CN111882555B (en) Deep learning-based netting detection method, device, equipment and storage medium
CN105956570A (en) Lip characteristic and deep learning based smiling face recognition method
CN114982846B (en) Control method and device suitable for coffee roasting and electronic equipment
Monigari et al. Plant leaf disease prediction
CN107944363A (en) Face image processing process, system and server
CN108549899B (en) Image identification method and device
KR101821770B1 (en) Techniques for feature extraction
Kartika et al. Combining of Extraction Butterfly Image using Color, Texture and Form Features

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20150401

RJ01 Rejection of invention patent application after publication