WO2018219016A1 - 一种人脸检测训练方法、装置及电子设备 - Google Patents

一种人脸检测训练方法、装置及电子设备 Download PDF

Info

Publication number
WO2018219016A1
WO2018219016A1 PCT/CN2018/079281 CN2018079281W WO2018219016A1 WO 2018219016 A1 WO2018219016 A1 WO 2018219016A1 CN 2018079281 W CN2018079281 W CN 2018079281W WO 2018219016 A1 WO2018219016 A1 WO 2018219016A1
Authority
WO
WIPO (PCT)
Prior art keywords
training sample
loss value
sample
training
face detection
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.)
Ceased
Application number
PCT/CN2018/079281
Other languages
English (en)
French (fr)
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.)
Tencent Technology (Shenzhen) Co Ltd
Original Assignee
Tencent 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 Tencent Technology (Shenzhen) Co Ltd filed Critical Tencent Technology (Shenzhen) Co Ltd
Priority to JP2019525952A priority Critical patent/JP6855098B2/ja
Priority to EP18810647.0A priority patent/EP3633549B1/en
Priority to KR1020197026337A priority patent/KR102236046B1/ko
Publication of WO2018219016A1 publication Critical patent/WO2018219016A1/zh
Priority to US16/392,270 priority patent/US10929644B2/en
Anticipated expiration legal-status Critical
Priority to US17/109,574 priority patent/US11594070B2/en
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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/217Validation; Performance evaluation; Active pattern learning techniques
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/2433Single-class perspective, e.g. one-against-all classification; Novelty detection; Outlier detection
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/776Validation; Performance evaluation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/172Classification, e.g. identification

Definitions

  • the present invention relates to the field of image processing technologies, and in particular, to a face detection training method, apparatus, and electronic device.
  • Face detection is a technique for detecting a face from an image through a face detector.
  • the training of face detection directly affects the detection effect of the face. Therefore, how to optimize the training process of face detection has been a technology in the field. The focus of personnel research.
  • CNN Convolutional Neural Network
  • Faster RCNN Faster Region-based Convolutional Neural Network
  • the convolutional neural network is used for face detection training.
  • the training process of face detection based on CNN is mainly to construct a face detection model and perform iterative training through training samples to update the face detection model at each iteration.
  • the network parameters realize the training optimization of face detection; among them, the process of updating the network parameters of the face detection model at each iteration can be considered as the optimization process of face detection.
  • the current optimization goal of face detection is mainly to maximize the difference between face and non-face (that is, to maximize the difference between classes), but there is not much attention to the difference between face and face, which makes people
  • face detection responds to face changes in different scenes, the face detection ability is weak and the robustness is poor.
  • the embodiments of the present invention provide a face detection training method, apparatus, and electronic device, which can improve the face detection and discrimination capability of face detection and improve the robustness of face detection.
  • the embodiment of the present invention provides the following technical solutions:
  • a face detection training method includes:
  • the batch data training sample comprising a plurality of training samples of different sample classes
  • the face detection training result is output.
  • the embodiment of the invention further provides a face detection training device, comprising:
  • a sample obtaining module configured to acquire a batch data training sample of the current iteration, where the batch data training sample includes multiple training samples of different sample classes;
  • a sample center loss value determining module configured to determine a center loss value corresponding to each training sample according to a feature vector of each training sample and a central feature vector of a sample class to which each training sample belongs;
  • a batch sample center loss value determining module configured to determine a center loss value corresponding to the batch data training sample according to a central loss value corresponding to each training sample
  • a detection target loss value determining module configured to determine a target loss value of the face detection according to at least a central loss value corresponding to the batch data training sample
  • a parameter update module configured to: if the target loss value of the face detection does not reach the set training convergence condition, update the network parameter of the face detection model according to the target loss value of the face detection, and enter the next iteration ;
  • a detection output module configured to output a face detection training result if the target loss value of the face detection reaches a set training convergence condition.
  • An embodiment of the present invention further provides an electronic device, including: a memory and a processor;
  • the memory stores a program, and the processor calls the program, the program is used to:
  • the batch data training sample comprising a plurality of training samples of different sample classes
  • the face detection detection result is output.
  • Embodiments of the present invention also provide a computer readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method of the first aspect.
  • Embodiments of the present invention also provide a computer program product comprising instructions that, when run on a computer, cause the computer to perform the method of the first aspect.
  • the face detection training process may include: acquiring a batch data training sample of a current iteration, the batch data training sample comprising a plurality of training samples of different sample classes; respectively, according to each training sample a feature vector, and a central feature vector of the sample class to which each training sample belongs, determining a center loss value corresponding to each training sample; determining a center loss corresponding to the batch data training sample according to a central loss value corresponding to each training sample a value; determining a target loss value of the face detection according to the center loss value corresponding to the batch data training sample; and if the target loss value of the face detection does not reach the set training convergence condition, according to the face Detecting the target loss value, updating the network parameter in the face detection model, and proceeding to the next iteration until the target loss value of the face detection reaches the set training convergence condition; if the target loss value of the face detection reaches the set value
  • the specified training convergence condition can output face detection and complete the training
  • the training optimization target of the face detection combines the central loss value corresponding to the batch data training sample, so that the face detection is invariant to the intra-class difference between the face and the face, so the batch data is combined.
  • the center loss value corresponding to the training sample is used for the optimized training of the face detection, so that the face detection after the optimized training can ensure the high inter-class detection performance for the face and the non-face while the face is Intraclass differences are invariant, improving the robustness of face detection.
  • Figure 1 shows the structure of a face detection model
  • 3 is a block diagram showing the hardware structure of an electronic device
  • FIG. 4 is a flowchart of a face detection training method according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of face detection training based on a face detection model
  • FIG. 6 is a flow chart of a method for determining a coordinate return loss value of a face frame
  • FIG. 7 is a flow chart of a method for acquiring a batch data training sample
  • FIG. 8 is a structural block diagram of a face detection training apparatus according to an embodiment of the present invention.
  • FIG. 9 is another structural block diagram of a face detection training apparatus according to an embodiment of the present invention.
  • FIG. 10 is a block diagram showing still another structure of a face detection training apparatus according to an embodiment of the present invention.
  • An optional face detection model constructed by CNN according to an embodiment of the present invention may be as shown in FIG. 1 , including: a basic network layer, a candidate frame prediction layer, and a face detection layer.
  • the basic network layer may be a sub-network formed by a series of convolutions and pooling layers, and the basic network layer may pass each series of convolution layers to each training sample (training samples) a sample-by-layer convolution process may be performed in the image form, wherein the next convolutional convolution process is performed on the convolution process result of the previous convolutional layer output; here, in the image features of the multi-layer convolutional layer processing, Shallow features can represent features such as rich edge corners and texture structures. Deep features are further abstract mapping based on shallow features. Layer-by-layer convolution processing of multiple convolutional layers enables image feature extraction at different levels. For each training sample, the basic network layer outputs a feature map of the convolution layer convolution process of the last layer, and the feature map may be a representation of the image features.
  • the candidate frame prediction layer may be a sub-network of a full convolution structure, which is built on the image features output by the basic network layer, and the candidate frame prediction layer may map the features of each training sample through the convolution layer, thereby passing the mapped nodes.
  • a candidate frame classifier and a candidate frame arbiter are formed to form a candidate frame detection; a candidate frame classifier can be used to perform probabilistic prediction of a candidate frame, and a candidate frame arbiter can be used to perform coordinate prediction of the candidate frame, thereby outputting a candidate frame. (Proposals), the candidate frame output by the candidate frame prediction layer can be input to the face detection layer.
  • the face detection layer may be a sub-network including a region of interest (RoI Pooling), based on image features outputted by the base network layer, and candidate frames output by the candidate frame prediction layer; for each training sample, the person
  • the face detection layer may perform dimensionality reduction sampling on the image features of the training samples of the output of the basic network layer based on the Proposals, and obtain a fixed-size feature map, and map all the node connections in the feature map to fixed-length features.
  • a vector, thereby obtaining a feature vector of each training sample, and a face classifier and a face regression device are established based on the feature vector of each training sample, and the face classifier and the face regression device jointly form a face detection, wherein the person
  • the face classifier can predict the probability of face and non-face, and the face regression can perform more accurate coordinate regression of the face frame based on the candidate frame.
  • the further optional refinement of the face detection model shown in FIG. 1 can be implemented by a face detection model based on Faster RCNN, which is a classic algorithm for face detection, which is divided into an RPN (Region Proposal Networks) layer and In the Fast RCNN layer, the RPN layer generates a candidate frame, and the Fast RCNN layer can obtain the final detection result based on the candidate frame.
  • RPN Registered Proposal Networks
  • the face detection model based on Faster RCNN may include: a basic network layer, an RPN layer, and a Fast RCNN layer; wherein, the RPN layer may be considered as an optional implementation of the candidate frame prediction layer, and the Fast RCNN layer may be It is considered to be an optional implementation of the face detection layer.
  • the target of the RPN layer is to generate a candidate frame based on the image features output by the basic network layer.
  • the embodiment of the present invention may predefine a plurality of anchor frames, and the multiple anchor frames cover different scales and An aspect ratio, by which the sub-frames in the training sample are determined by the predefined plurality of anchor frames, and the candidate box is predicted by the sub-frame (eg, the sub-frame can be used to train the candidate box detection, thereby performing the candidate box detection by the candidate box prediction).
  • the anchor box is used to define and establish a classifier and a regenerator of the Proposal, which is inside the RPN layer.
  • RPN can be seen as a candidate box detection.
  • each anchor box is associated with a test (classification plus regression), and the classification and regression have predictive and target values for training and learning.
  • the determination of the classification target value (that is, how to define whether the output is positive or negative) is based on the overlap ratio between the anchor box and the real box.
  • the classification target value is determined based on the overlap ratio between the candidate box and the real box.
  • the anchor frame used by the RPN and the candidate frame used by the Fast RCNN have a similar effect when the classifier is built, and the anchor frame can be regarded as a candidate frame of the candidate frame.
  • the RPN can establish multiple candidate frame detections for each node after the convolution processing of the image features (each candidate frame detects an anchor frame).
  • the goal of the Fast RCNN layer is to generate feature vectors of training samples based on the image features output by the candidate frame and the underlying network layer, thereby building a face classifier and face regression, face classifier and face with the feature vectors of the training samples.
  • the regression unit combines to form a face detection.
  • the model optimization algorithm such as Stochastic Gradient Descent (SGD) can be used for iterative training.
  • SGD Stochastic Gradient Descent
  • the batch data training is selected from the training sample set.
  • the sample is trained, and then the network parameters of the face detection model are updated in each iteration depending on whether the optimization target of the face detection is achieved.
  • the embodiment of the present invention needs to make the intra-class difference as small as possible. To ensure that face detection is invariant to intra-class differences.
  • the embodiment of the present invention improves the iterative training optimization process of face detection, and proposes a new face detection training method to ensure that face detection has higher detection performance for faces and non-human faces, while reducing The intra-class difference between the small face and the face enhances the discriminating ability of face detection.
  • the face detection training method provided by the embodiment of the present invention may be loaded on an electronic device for performing face detection training by a program form, and the electronic device may be a server on the network side or a personal computer on the user side (Personal Computer) Terminal equipment such as PC), the form of which can be determined by the actual training needs of face detection.
  • the electronic device may be a server on the network side or a personal computer on the user side (Personal Computer) Terminal equipment such as PC), the form of which can be determined by the actual training needs of face detection.
  • PC Personal Computer Terminal equipment
  • the hardware structure of the electronic device for implementing face detection training may be as shown in FIG. 3, including: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;
  • the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 complete communication with each other through the communication bus 4;
  • the communication connection of the processor 1, the communication interface 2, the memory 3 and the communication bus 4 shown in FIG. 3 is only optional;
  • the communication interface 2 can be an interface of the communication module, such as an interface of the GSM module;
  • the processor 1 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
  • CPU central processing unit
  • ASIC Application Specific Integrated Circuit
  • the memory 3 may include a high speed RAM memory and may also include a non-volatile memory (NVM) such as at least one disk memory.
  • NVM non-volatile memory
  • the memory 3 stores a program
  • the processor 1 calls a program stored in the memory 3, and the program can be used to execute the face detection training method provided by the embodiment of the present invention.
  • the embodiment of the present invention can perform iterative training of face detection by using a model optimization algorithm such as Stochastic Gradient Descent (SGD).
  • SGD is a commonly used convolutional neural network optimization algorithm, which is effective for solving large-scale machine learning problems, SGD
  • gradient drop optimization is performed using a batch data training sample (Minibatch) randomly selected from the training sample set.
  • the flow of the face detection training method provided by the embodiment of the present invention can be as shown in FIG. 4 , and the face detection training process involved in each iteration can be referred to FIG. 4 .
  • the face detection training method provided by the embodiment of the present invention may include:
  • Step S100 Obtain a batch data training sample of the current iteration, where the batch data training sample includes multiple training samples of different sample classes.
  • the batch data training sample (Minibatch) is selected from a training sample set containing all training samples;
  • Face detection can be considered as implementing a two-class task (face and non-face).
  • multiple face images can be obtained from the training sample set as a positive training sample to obtain multiple non-face images.
  • the obtained training samples of the positive class and the training samples of the negative class constitute a batch data training sample for each iteration;
  • the batch data training sample used in the current iteration may include: a plurality of training samples, and the sample classes of the plurality of training samples may be classified into a positive class (ie, a training sample corresponding to a positive class with a face image) and a negative Class (ie, a training sample corresponding to a negative class with a non-face image).
  • a positive class ie, a training sample corresponding to a positive class with a face image
  • a negative Class ie, a training sample corresponding to a negative class with a non-face image
  • Step S110 Determine a center loss value corresponding to each training sample according to a feature vector of each training sample and a central feature vector of a sample class to which each training sample belongs.
  • the embodiment of the present invention may determine a feature vector of the training sample, and a corresponding central feature vector of the sample class to which the training sample belongs in the batch data training sample, thereby determining Deriving a central loss value corresponding to the training sample, performing, for each training sample in the batch data training sample, obtaining a center loss value corresponding to each training sample in the batch data training sample;
  • the central feature vector of the same class in the batch data training sample may pass, and update the mean value corresponding to the feature vector of the training sample belonging to the sample class in the batch data training sample in the current iteration;
  • the embodiment of the present invention may determine each training sample belonging to the sample class in the batch data training sample; and training the feature vector of each training sample belonging to the sample class according to the batch data Determining an average value of feature vectors of each training sample belonging to the sample class, obtaining an update variable of a central feature vector of the sample class in the batch data training sample; obtaining the batch according to the updated variable and setting a learning rate
  • the central feature vector of the sample class in the data training sample is implemented to update the mean value of the feature vector of each training sample of the same class according to the batch data training sample, and update the central feature vector of the sample class;
  • the embodiment of the present invention may determine a central feature vector of the same class in the batch data training sample according to the following formula:
  • indicates the set learning rate
  • the embodiment of the present invention may subtract the product of the batch data training sample in the last iteration from the central feature vector corresponding to the sample class, and the product of the updated variable and the set learning rate.
  • the central eigenvector corresponding to the batch data training sample at the current iteration may be obtained from the central feature vector corresponding to the sample class, and the product of the updated variable and the set learning rate.
  • the embodiment of the present invention may determine a feature vector of each training sample belonging to the positive class in the batch data training sample, and determine each training sample that belongs to the positive class.
  • the mean value of the feature vector thereby updating the central feature vector of the sample class of the positive class
  • the embodiment of the present invention may determine that the batch data training sample belongs to the negative class
  • the feature vector of each training sample determines the mean value of the feature vector of each training sample belonging to the negative class, thereby updating the central feature vector of the sample class of the negative class;
  • the embodiment of the present invention may determine, according to the feature vector of each training sample of the positive class, and the central feature vector of the sample class of the positive class, respectively.
  • the central feature vector determines the center loss value corresponding to each training sample of the negative class.
  • a center loss value of a training sample may be represented by a distance between a feature vector of the training sample and a central feature vector of the sample class to which the training sample belongs; assuming x i represents an i-th training in the batch data training sample
  • c yi x i represents the sample belongs based feature vector y i of the center, the center x i samples the value of loss may be defined as:
  • the process of determining the feature vector of a training sample may be: after the basic network layer outputs the image feature of the training sample, the face detection layer determines the region of interest in the training sample according to the candidate frame (Proposals), thereby detecting the face.
  • the layer samples the image features of the region of interest of the training sample, obtains a fixed-size feature map, and maps all the node connections in the feature map to a fixed-length feature vector to obtain a feature vector of the training sample.
  • Step S120 Determine a center loss value corresponding to the batch data training sample according to a central loss value corresponding to each training sample.
  • the embodiment of the present invention may determine an average value of a central loss value corresponding to each training sample according to a central loss value corresponding to each training sample, and determine the batch data training sample according to an average value of the central loss values corresponding to each training sample.
  • the average value of the central loss value corresponding to each training sample may be directly used as the central loss value corresponding to the batch data training sample, or the mean value of the central loss value corresponding to each training sample may be multiplied by A fixed value (e.g., multiplied by 1/2) is used to obtain a center loss value corresponding to the batch data training sample.
  • the center loss value corresponding to the batch data training sample can be expressed as
  • Step S130 Determine a target loss value of the face detection according to at least a center loss value corresponding to the batch data training sample.
  • the target loss value of face detection is the representation of the optimization target in the face detection iterative training process.
  • the target loss value reaches the set training convergence condition (such as minimum)
  • the iterative training can be ended and the face detection can be output;
  • the embodiment of the present invention can combine the optimization target of the existing face detection with the central loss value corresponding to the batch data training sample used, as an optimization target of the face detection according to the embodiment of the present invention, and obtain a human face.
  • the target loss value detected is the representation of the optimization target in the face detection iterative training process.
  • the embodiment of the present invention may be configured according to the center loss value corresponding to the batch data training sample, the classification loss value corresponding to the batch data training sample, and the face frame coordinate regression loss value corresponding to the batch data training sample. Determining the target loss value of the face detection;
  • the classification loss value corresponding to the batch data training sample may be determined according to the difference between the classification prediction probability and the classification target probability (classification true probability) of each training sample in the batch data training sample;
  • the embodiment of the present invention may predict the class of the training sample by using a Softmax function or the like to obtain a classification prediction probability of the training sample, thereby
  • the classification loss probability corresponding to the training sample and the classification target probability of the training sample may be determined, and the classification loss value corresponding to the training sample may be determined (eg, the difference between the classification prediction probability and the classification target probability of the training sample), and then According to the classification loss value corresponding to each training sample in the batch data training sample, the classification loss value corresponding to the batch data training sample is determined (for example, the mean value of the classification loss value of each training sample is taken).
  • the classification loss value corresponding to the batch data training sample is an index of the face classification of the face detection for the face and the non-face, and the classification loss value corresponding to the batch data training sample can be different for the face and the non-face ( The difference between classes is expressed.
  • the classification loss value corresponding to the batch data training sample is used as the optimization target part of the face detection, which can make the optimized face detection have higher distinction between the face and the non-face class. performance;
  • the center loss value corresponding to the batch data training sample indicates the distance between the feature vector of the training sample and the center feature vector of the sample class to which the training sample belongs. Therefore, the center loss value corresponding to the batch data training sample can be explained.
  • the difference between the feature vector of the training sample and the central feature vector of the sample class to which it belongs may represent the difference in the feature vector within the class of the training sample in each sample class, so the center loss value corresponding to the batch data training sample is taken as the person
  • the part of the optimization target of the face detection can make the optimized face detection invariant to the intra-class difference of the face (such as the intra-class difference between the face and the face in different scenes), and improve the face detection. Robustness.
  • the training of face detection may include classification training and regression training, which is a process of joint training; the loss value composed of the central loss value and the classification loss value of the batch data training sample in one iteration may be considered as classification training.
  • the optimization goal is to minimize the loss value of the central loss value and the classification loss value corresponding to the batch data training sample as the optimization target of the classification training in the face detection training;
  • the optimization goal of the regression training in the face detection training may be composed of the face frame coordinate regression loss values corresponding to the batch data training samples;
  • the target loss value of the face detection can be formed to represent the optimization target of the face detection training.
  • the embodiment of the present invention may use a product of a center loss value corresponding to the batch data training sample and a first set weight, and a face frame coordinate regression loss value and a second setting corresponding to the batch data training sample.
  • the product of the weights, and the classification loss values corresponding to the batch data training samples are summed to obtain the target loss value of the face detection;
  • L cls represents the classification loss value corresponding to the batch data training sample
  • L c represents the central loss value corresponding to the batch data training sample.
  • the target loss value of the face detection can be expressed as: L cls + ⁇ L c + ⁇ L reg ; ⁇ and ⁇ represents a set weight coefficient, where ⁇ is the first set weight and ⁇ is the second set weight.
  • the center loss value, the classification loss value, and the face frame coordinate regression loss value corresponding to the batch data training sample may be directly summed to obtain a target loss value of the face detection.
  • Step S140 It is determined whether the target loss value of the face detection has reached the set training convergence condition. If not, step S150 is performed, and if yes, step S160 is performed.
  • the set training convergence condition may be considered as the minimum target loss value of the face detection
  • the target loss value of the face detection is determined, thereby judging the training convergence condition by the target loss value of the face detection, which can make the face detection minimize the batch data training sample.
  • the corresponding central loss value it is ensured that the face detection is invariant to the intra-class difference of the face (such as the intra-class difference between the face and the face in different scenes), and the robustness of the face detection is improved.
  • Step S150 Update network parameters related to face detection in the face detection model according to the target loss value of the face detection, and proceed to the next iteration, and return to step S100.
  • the embodiment of the present invention may be based on the target loss value of the face detection. And updating the network parameters in the face detection model; at the same time, performing the next iteration according to the iterative training process, and returning to step S100 to perform the step S100 to step S140 in the face detection model after updating the network parameters, until step S140 The judgment result is that the target loss value of the face detection reaches the set training convergence condition;
  • the embodiment of the present invention may enter the next iteration according to the random gradient descent method, and return to step S100.
  • Step S160 outputting face detection.
  • the face detection trained by the face detection model may be output to complete the face. Iterative training optimization process for detection.
  • the face detection training process may include: acquiring a batch data training sample of the current iteration, the batch data training sample comprising a plurality of training samples of different sample classes; respectively, according to the feature vector of each training sample, and a central feature vector of the sample class to which each training sample belongs, determining a center loss value corresponding to each training sample; determining a center loss value corresponding to the batch data training sample according to the central loss value corresponding to each training sample; Determining a central loss value corresponding to the batch data training sample, determining a target loss value of the face detection; if the target loss value of the face detection does not reach the set training convergence condition, according to the target loss value of the face detection Updating the network parameters in the face detection model and proceeding to the next iteration until the target loss value of the face detection reaches the set training convergence condition; if the target loss value of the face detection reaches the set training convergence condition , can output face detection, complete the training of face detection.
  • the training optimization target of the face detection combines the central loss value corresponding to the batch data training sample, so that the face detection is invariant to the intra-class difference between the face and the face, so the batch data is combined.
  • the center loss value corresponding to the training sample is used for the optimized training of the face detection, so that the face detection after the optimized training can ensure the high inter-class detection performance for the face and the non-face while the face is Intraclass differences are invariant, improving the robustness of face detection.
  • the embodiment of the present invention may update the face detection model by using a back propagation mode according to the target loss value of the face detection.
  • the embodiment of the present invention may determine a parameter update value of the face detection according to the target loss value of the face detection and the network parameter in the face detection model of the last iteration, so that the face detection is performed according to the face detection
  • the parameter update value updates the network parameters in the face detection model of the previous iteration
  • the target loss value of the face detection is Loss
  • Loss L ls + ⁇ L c + ⁇ L reg
  • W1 the network parameter in the face detection model after the last iteration
  • W2 kW1- ⁇ ( ⁇ W+sW1)
  • W2 is the network parameter of the updated face detection model
  • k momentum
  • is the learning rate
  • s is the weight attenuation coefficient
  • the embodiment of the present invention may set a center loss function (Center Loss) in a face detection layer (such as a Fast RCNN layer), and the center loss function may be applied to the full connection feature of the face detection layer.
  • a presentation layer wherein the fully connected feature representation layer can map all the node connections in the feature map to a fixed length feature vector in a fully connected manner to obtain a feature vector of each training sample; thus, in each iterative training, the central loss function according to the feature vector of each training sample batch data of training samples of the current iteration used to determine the training centers loss values of the samples corresponding to the batch data for training samples, and accordingly it is determined that the batch of data training samples corresponding to the center of the loss value L c ;
  • the Softmax function can be set in the face detection layer (such as the Fast RCNN layer), and the Softmax function can be applied to the fully connected feature representation layer of the face detection layer.
  • the Softmax function can be used for each training sample.
  • the feature vector is processed to determine the classification prediction probability of each training sample; and then the difference between the classification prediction probability of the training sample and the classification target probability (classification true probability) is expressed by Softmax Loss (determination loss function), and the batch is determined.
  • the classification loss value L cls corresponding to the data training sample;
  • the input of the Softmax function is the feature vector of the training sample, and the output is the predicted probability that the training sample belongs to each sample class; and Softmax Loss is the p (classified prediction probability) and p* (classification target) of the input training sample. Probability), the output is a loss value (Loss), and the smaller the Loss is, the more accurate the classification is.
  • Center Loss and Softmax Loss act on the same layer (that is, the input feature vectors are the same), and Center Loss is used as The auxiliary monitoring signal optimized by face detection, the smaller the Center Loss is, the smaller the difference of the features in the class detected by face detection, Softmax Loss drives the features detected by face detection to be separated from each other, ensuring that there is inter-class Distinguishable difference;
  • the embodiment of the present invention may set a face frame regression prediction function SmoothL1 (smoothing a norm function) in a face detection layer (such as a Fast RCNN layer), and determine a batch data training sample based on the candidate frame by using SmoothL1.
  • the face frame prediction coordinates corresponding to each training sample further, the coordinate return loss value of the face frame corresponding to each training sample is determined by SmoothL1 Loss, and the input is the face frame prediction coordinate and the face frame target coordinate corresponding to the training sample, and the output is Loss value (Loss), and then determine the face frame coordinate regression loss value L reg corresponding to the batch data training sample;
  • the process of determining the classification loss value corresponding to the batch data training sample in one iteration may be as follows:
  • the determining process of the coordinate return loss value of the face frame corresponding to the batch data training sample in one iteration may be as shown in FIG. 6, and includes:
  • Step S200 Determine a face frame prediction coordinate corresponding to each training sample in the batch data training sample according to the candidate frame.
  • the embodiment of the present invention may determine, according to the candidate frame outputted by the candidate frame prediction layer, the attention area of each training sample of the batch data training sample in the current iteration, and obtain the prediction coordinates of the face frame corresponding to each training sample;
  • the prediction coordinates of the face frame of the sample may be represented by the upper left vertex abscissa, the upper left vertex ordinate, the lower right vertex abscissa, the lower right vertex ordinate, and the like;
  • the embodiment of the present invention may set a face frame regression prediction function SmoothL1 (smoothing-norm function) in a face detection layer (such as a Fast RCNN layer), and determine, according to the candidate frame, the corresponding person of each training sample by using SmoothL1. Face frame prediction coordinates.
  • a face frame regression prediction function SmoothL1 smoothing-norm function
  • Step S210 Determine a coordinate return loss value of the face frame corresponding to each training sample according to the face frame prediction coordinates corresponding to each training sample and the face frame target coordinates corresponding to each training sample.
  • the face frame target coordinate corresponding to the training sample may be a coordinate corresponding to the face frame in the training sample; for each training sample, the embodiment of the present invention may predict the coordinates and the person through the face frame corresponding to the training sample.
  • the difference of the face frame target coordinates determines the coordinate return loss value of the face frame corresponding to the training sample, so that for each training sample, the coordinate return loss value of the face frame corresponding to each training sample can be obtained.
  • the embodiment of the present invention may represent a face frame coordinate regression loss value by using SmoothL1 Loss, where the input is a face frame prediction coordinate and a face frame target coordinate corresponding to the training sample, and the output is a loss value (Loss), and the Loss is Small indicates that the regression of the face frame is more accurate.
  • Step S220 Determine a coordinate return loss value of the face frame corresponding to the batch data training sample according to the coordinate return loss value of the face frame corresponding to each training sample.
  • the embodiment of the present invention may determine, according to the coordinate return loss value of the face frame corresponding to each training sample in the batch data training sample, determine the mean value of the coordinate return loss value of the face frame corresponding to each training sample, and determine the batch data according to the average value.
  • the face frame coordinate regression loss value (SmoothL1 Loss) corresponding to the training sample.
  • the process of the face detection iterative training in the embodiment of the present invention uses the joint training of multiple loss functions, including two joint tasks of face classification and regression, and the classification training uses the joint optimization of Center Loss and Softmax Loss, and the regression training uses SmoothL1. Loss optimization; the final optimization goal of face detection is the weighted sum of the three loss values of Center Loss, Softmax Loss and SmoothL1 Loss corresponding to the batch data training samples;
  • the embodiment of the present invention can fine-tune a pre-trained model on a general large-scale face recognition task (ImageNet); and introduce a central loss value as an auxiliary optimization target for face detection to guide face detection.
  • ImageNet general large-scale face recognition task
  • the optimization and training of the model enhances the ability of face detection to discriminate between intra-class differences between faces and faces.
  • the embodiment of the present invention may determine, according to the face detection model of the last iteration, a training sample in which the face detection is difficult to detect in the training sample set, to determine the batch used in the next iteration.
  • Data training samples to enhance the detection ability of face detection for these difficult-to-detect training samples; whether the training samples are difficult to detect can be determined by measuring the target loss value corresponding to the training samples, and the higher the target loss value, the training sample distance optimization The farther the target is, the more difficult it is to detect;
  • FIG. 7 is a flowchart of a method for acquiring a batch data training sample of a current iteration according to an embodiment of the present invention.
  • the method may include:
  • Step S300 Fix the face detection model of the last iteration, and the face detection model of the previous iteration obtains a central loss value, a classification loss value, and a face frame coordinate regression loss value corresponding to each training sample in the training sample set.
  • Step S310 Determine a target loss value of each training sample in the training sample set according to a central loss value corresponding to each training sample in the training sample set, a classification loss value, and a face frame coordinate regression loss value.
  • the embodiment of the present invention may perform weighted summation of the center loss value, the classification loss value, and the face frame coordinate regression loss value of the training sample to obtain a target loss value of the training sample; If a training sample is processed as such, the target loss value of each training sample can be obtained;
  • the target loss value may be expressed as: a classification loss value + a center loss value + a ⁇ face frame coordinate regression loss value.
  • the embodiment of the present invention may also sum the center loss value, the classification loss value, and the face frame coordinate regression loss value of the training sample to obtain a target loss value of the training sample.
  • Step S320 selecting, according to the target loss value of each training sample in the sample class of the positive class in the training sample set, selecting the first number of training samples with the largest target loss value in the sample class of the positive class; and the samples according to the negative class in the training sample set.
  • the target loss value of each training sample in the class a second number of training samples having the largest target loss value in the sample class of the negative class are selected, and the ratio of the first quantity to the second quantity corresponds to the set ratio.
  • the embodiment of the present invention may classify each training sample in the training sample set according to the positive and negative class of the sample class, thereby determining the training sample.
  • the target loss value, sorting the training samples belonging to the positive class may be sorted according to the target loss value from large to small, or may be sorted according to the target loss value from small to large), and each training in the sample class according to the negative class
  • the target loss value in the sample class of the positive class is selected.
  • the largest first number of training samples, according to the target loss value of each training sample in the negative class of the training sample set, the second number of training samples having the largest target loss value in the negative class of the sample class is selected, so that the first The ratio of the quantity to the second quantity corresponds to a set ratio of the number of positive and negative class samples required in the batch data training sample.
  • the embodiment of the present invention can make the setting ratio 1:1, that is, the first quantity and the second quantity. The same amount.
  • Step S330 forming a batch data training sample of the current iteration according to the training sample selected from the sample class of the positive class and the training sample selected from the sample class of the negative class.
  • the Center Loss and the sample may be trained according to the batch data of the previous iteration.
  • Softmax Loss, update and optimize face detection update the face regression according to the SmoothL1 Loss of the batch data training sample of the previous iteration, so that the face detection is optimized to the minimum direction of the weighted sum of Center Loss, Softmax Loss and SmoothL1 Loss;
  • the last iteration can determine the batch data training samples used in the next iteration.
  • the target loss of Center Loss, Softmax Loss and SmoothL1 Loss of each training sample in the training sample set can be determined. a value, thereby selecting a training sample of a first number of positive classes having the largest target loss value from the training sample set, and a training sample of a second number of negative classes having the largest target loss value, constructing a Minibatch for the next iteration (ie, Batch data training sample);
  • the Minibatch is sent to the face detection model for training, and the loop iteration is trained until the SmoothL1 Loss of the batch data training sample is in a certain iteration.
  • the weighted sum of Softmax Loss and SmoothL1 Loss is minimized.
  • the training sample that is difficult to detect after the last iteration training is used as the Minibatch used in the next iteration, so that each iteration can better estimate the center loss, thereby
  • a good supervised learning training sample has the characteristics of intra-class discriminating power.
  • the embodiment of the present invention does not simply use the randomly extracted batch data training sample (Minibatch) for gradient descent optimization, but In combination with the last iteration, the training samples in the sample set that are more difficult to detect are used to determine the Minibatch used in the next iteration.
  • Minibatch randomly extracted batch data training sample
  • the embodiment of the present invention provides a robust face detection training method.
  • the method is based on neural network implementation.
  • the Center Loss corresponding to the batch data training samples is introduced as the auxiliary loss function of the two-class task of face and non-face, and the batch data.
  • the Softmax Loss (classification loss value) corresponding to the training sample is combined with the supervised face detection optimization training; the learning process of the face detection can be guided, so that the face detection can keep the difference between the face and the non-categorical class distinguishable while reducing
  • the intra-class difference between the face and the face enhances the ability of face detection to discriminate on the face.
  • the hard training of the positive and negative training samples is difficult to detect, and the ratio of positive and negative samples is 1 :1, thereby enhancing the classification ability of face detection for training samples that are difficult to detect, and improving the overall performance of face detection.
  • the present invention adopts an anchor frame (covering multiple sizes, multiple aspect ratios) and a multi-scale training strategy which are more suitable for face targets, and improves the discriminability of face targets at different resolutions, and can generate candidate frames.
  • the face detection using the face detection training method provided by the embodiment of the present invention can effectively improve the accuracy and enhance the robustness.
  • the performance comparison between the face detection and the face detection using other methods in the embodiment of the present invention can be as shown in Table 1 below:
  • the embodiment of the invention can improve the face detection and discriminating ability of the face detection and improve the robustness of the face detection.
  • the content of the face detection training device described below may be considered as a face detection training method provided by the electronic device for implementing the face detection training.
  • a program module to be set; the face detection training device content described below can be referred to in correspondence with the content of the face detection training method described above.
  • FIG. 8 is a structural block diagram of a face detection training apparatus according to an embodiment of the present invention.
  • the face detection training apparatus may include:
  • the sample obtaining module 100 is configured to acquire a batch data training sample of the current iteration, where the batch data training sample includes multiple training samples of different sample classes;
  • the sample center loss value determining module 200 is configured to determine a center loss value corresponding to each training sample according to a feature vector of each training sample and a central feature vector of a sample class to which each training sample belongs;
  • the batch sample center loss value determining module 300 is configured to determine a center loss value corresponding to the batch data training sample according to the central loss value corresponding to each training sample;
  • the detection target loss value determining module 400 is configured to determine a target loss value of the face detection according to at least a center loss value corresponding to the batch data training sample;
  • the parameter update module 500 is configured to: if the target loss value of the face detection does not reach the set training convergence condition, update the network parameter of the face detection model according to the target loss value of the face detection, and enter the next time Iterative
  • the detection output module 600 is configured to output face detection if the target loss value of the face detection reaches a set training convergence condition.
  • the detection target loss value determining module 400 is configured to determine a target loss value of the face detection according to the center loss value corresponding to the batch data training sample, specifically:
  • the detection target loss value determining module 400 is configured to: according to the batch data, a center loss value corresponding to the sample, a classification loss value corresponding to the batch data training sample, and a face corresponding to the batch data training sample
  • the frame coordinate regression loss value determines the target loss value of the face detection, and specifically includes:
  • the sample obtaining module 100 is configured to obtain the batch data training sample of the current iteration, and specifically includes:
  • the face detection model of the previous iteration determines the target loss value corresponding to each training sample in the training sample set
  • the batch data training samples of the current iteration are formed according to the training samples selected from the sample classes of the positive class and the training samples selected from the sample classes of the negative class.
  • the sample obtaining module 100 is configured to determine, by using the face detection model of the previous iteration, a target loss value corresponding to each training sample in the training sample set, which specifically includes:
  • the face detection model of the previous iteration obtains the central loss value, the classification loss value and the face frame coordinate regression loss value of each training sample in the training sample set; wherein the classification loss value corresponding to the training sample corresponds to the training sample corresponding to the training sample.
  • the classification prediction probability and the classification target probability are determined, and the face frame coordinate regression loss value corresponding to the training sample is determined according to the face frame prediction coordinates and the face frame target coordinates corresponding to the training sample;
  • the target loss value of each training sample in the training sample set is determined according to the central loss value corresponding to each training sample in the training sample set, the classification loss value and the face frame coordinate regression loss value.
  • FIG. 9 shows another structure of the face detection training device provided by the embodiment of the present invention.
  • the face detection training device may further include:
  • the batch sample classification loss value determining module 700 is configured to determine, according to the classification prediction probability and the classification target probability corresponding to each training sample in the batch data training sample, a classification loss value corresponding to each training sample in the batch data training sample; And determining, according to the classification loss value corresponding to each training sample in the batch data training sample, a classification loss value corresponding to the batch data training sample.
  • the sample center loss value determining module 200 is configured to determine a center loss value corresponding to each training sample according to the feature vector of each training sample and the central feature vector of the sample class to which each training sample belongs, which specifically includes:
  • the sample center loss value determining module 200 is configured to determine a central feature vector of each sample class in the batch data training sample, specifically:
  • FIG. 10 shows a further configuration of the face detection training device according to the embodiment of the present invention.
  • the face detection training device may further include:
  • the batch sample face frame coordinate regression loss value determining module 800 is configured to determine a face frame prediction coordinate corresponding to each training sample in each of the batch data training samples according to the candidate frame finder; respectively, according to the face frame corresponding to each training sample Predicting coordinates, and the coordinates of the face frame corresponding to each training sample, determining the coordinate return loss value of the face frame corresponding to each training sample; determining the batch data training sample according to the coordinate return loss value of the face frame corresponding to each training sample Corresponding face frame coordinate regression loss value.
  • the parameter update module 500 is configured to update the network parameter of the face detection model according to the target loss value of the face detection, specifically:
  • the network parameters in the face detection model are updated by the back propagation mode according to the target loss value of the face detection.
  • the parameter update module 500 is configured to update the network parameters in the face detection model by using a back propagation mode according to the target loss value of the face detection, specifically:
  • the network parameters in the face detection model of the last iteration are updated according to the parameter update value of the face detection.
  • the face detection training device provided by the embodiment of the present invention is further configured to:
  • a sub-frame in the training sample is determined by the plurality of pre-defined anchor frames, and the candidate box is predicted by the sub-box.
  • the embodiment of the present invention further provides an electronic device.
  • the hardware structure of the electronic device may be as shown in FIG. 3, including: at least one memory and at least one processor;
  • the memory stores a program, and the processor calls the program, the program is used to:
  • the batch data training sample comprising a plurality of training samples of different sample classes
  • the face detection training result is output.
  • the steps of a method or algorithm described in connection with the embodiments disclosed herein can be implemented directly in hardware, a software module executed by a processor, or a combination of both.
  • the software module can be placed in random access memory (RAM), memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or technical field. Any other form of storage medium known.

Landscapes

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

Abstract

本发明实施例提供一种人脸检测训练方法、装置及电子设备,该方法包括:获取当前次迭代的批数据训练样本;确定各训练样本对应的中心损失值;根据各训练样本对应的中心损失值,确定批数据训练样本对应的中心损失值;至少根据批数据训练样本对应的中心损失值,确定人脸检测的目标损失值;若人脸检测的目标损失值未达到收敛条件,根据人脸检测的目标损失值,更新人脸检测模型中的网络参数,并进入下一次迭代;若人脸检测的目标损失值达到收敛条件,输出人脸检测。本发明实施例能够使得人脸检测在保证对人脸和非人脸具有较高的类间检测性能的同时,对于人脸的类内差异具有不变性,提升人脸检测的鲁棒性。

Description

一种人脸检测训练方法、装置及电子设备
本申请要求于2017年6月2日提交中国专利局、申请号为201710406726.9、发明名称为“一种人脸检测器训练方法、装置及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及图像处理技术领域,具体涉及一种人脸检测训练方法、装置及电子设备。
背景技术
人脸检测是通过人脸检测器从图像中检测出人脸的技术,人脸检测的训练好坏,直接影响到人脸的检测效果,因此如何优化人脸检测的训练过程一直是本领域技术人员研究的重点。
随着深度学习的发展,基于CNN(Convolutional Neural Network,卷积神经网络)的人脸检测训练已成为人脸检测的一种主流训练方式,例如使用Faster RCNN(Faster Region-based Convolutional Neural Network)的卷积神经网络进行人脸检测的训练等;基于CNN的人脸检测的训练过程主要是:构建人脸检测模型,通过训练样本进行迭代的训练,以在每次迭代时更新人脸检测模型的网络参数,实现人脸检测的训练优化;其中,每次迭代时更新人脸检测模型的网络参数的过程,可以认为是人脸检测的优化过程。
目前的人脸检测的优化目标主要是最大化人脸和非人脸的差异(即最大化类间差异),然而对于人脸和人脸之间的差异则没有太多的关注,这使得人脸检测在应对不同场景下的人脸变化时,人脸检测的判别能力较弱,鲁棒性较差。
发明内容
有鉴于此,本发明实施例提供一种人脸检测训练方法、装置及电子设备,以提升人脸检测的人脸检测判别能力,提升人脸检测的鲁棒性。
为实现上述目的,本发明实施例提供如下技术方案:
一种人脸检测训练方法,包括:
获取迭代的批数据训练样本,所述批数据训练样本包括不同样本类的多个训练样本;
分别根据各训练样本的特征向量,及各训练样本所属的样本类的中心特征向量,确定各训练样本对应的中心损失值;
根据所述各训练样本对应的中心损失值,确定所述批数据训练样本对应的中心损失值;
根据所述批数据训练样本对应的中心损失值,确定人脸检测的目标损失值;
若所述人脸检测的目标损失值达到设定的训练收敛条件,则输出人脸检测训练结果。
本发明实施例还提供一种人脸检测训练装置,包括:
样本获取模块,用于获取当前次迭代的批数据训练样本,所述批数据训练样本包括不同样本类的多个训练样本;
样本中心损失值确定模块,用于分别根据各训练样本的特征向量,及各训练样本所属的样本类的中心特征向量,确定各训练样本对应的中心损失值;
批样本中心损失值确定模块,用于根据所述各训练样本对应的中心损失值,确定所述批数据训练样本对应的中心损失值;
检测目标损失值确定模块,用于至少根据所述批数据训练样本对应的中心损失值,确定人脸检测的目标损失值;
参数更新模块,用于若所述人脸检测的目标损失值未达到设定的训练收敛条件,根据所述人脸检测的目标损失值,更新人脸检测模型的网络参数,并进入下一次迭代;
检测输出模块,用于若所述人脸检测的目标损失值达到设定的训练收敛条件,则输出人脸检测训练结果。
本发明实施例还提供一种电子设备,包括:存储器和处理器;
所述存储器存储有程序,所述处理器调用所述程序,所述程序用于:
获取当前次迭代的批数据训练样本,所述批数据训练样本包括不同样本类的多个训练样本;
分别根据各训练样本的特征向量,及各训练样本所属的样本类的中心特征向量,确定各训练样本对应的中心损失值;
根据所述各训练样本对应的中心损失值,确定所述批数据训练样本对应的中心损失值;
至少根据所述批数据训练样本对应的中心损失值,确定人脸检测的目标损失值;
若所述人脸检测的目标损失值未达到设定的训练收敛条件,根据所述人脸检测的目标损失值,更新人脸检测模型的网络参数,并进入下一次迭代;
若所述人脸检测的目标损失值达到设定的训练收敛条件,则输出人脸检测检测结果。
本发明实施例还提供一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行如第一方面所述的方法。
本发明实施例还提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如第一方面所述的方法。
基于上述技术方案,本发明实施例提供的人脸检测训练流程可以包括:获取当前次迭代的批数据训练样本,所述批数据训练样本包括不同样本类的多个训练样本;分别根据各训练样本的特征向量,及各训练样本所属的样本类的中心特征向量,确定各训练样本对应的中心损失值;根据所述各训练样本对应的中心损失值,确定所述批数据训练样本对应的中心损失值;至少根据所述批数据训练样本对应的中心损失值,确定人脸检测的目标损失值;如果所述人脸检测的目标损失值未达到设定的训练收敛条件,则根据所述人脸检测的目标损失值,更新人脸检测模型中的网络参数,并进入下一次迭代,直至人脸检测的目标损失值达到设定的训练收敛条件;如果所述人脸检测的目标损失值达到设定的训练收敛条件,则可输出人脸检测,完成人脸检测的训练。
本发明实施例中,人脸检测的训练优化目标结合了批数据训练样本对应的中心损失值,可使得人脸检测对于人脸和人脸之间的类内差异具有不变性,因此结合批数据训练样本对应的中心损失值进行人脸检测的优化的训练,可使优化训练后的人脸检测能够在保证对人脸和非人脸具有较高的类间检测性能的同时,对于人脸的类内差异具有不变性,提升人脸检测的鲁棒性。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。
图1为人脸检测模型的结构;
图2为人脸检测模型的另一结构;
图3为电子设备的硬件结构框图;
图4为本发明实施例提供的人脸检测训练方法的流程图;
图5为基于人脸检测模型的人脸检测训练示意图;
图6为人脸框坐标回归损失值的确定方法流程图;
图7为批数据训练样本的获取方法流程图;
图8为本发明实施例提供的人脸检测训练装置的结构框图;
图9为本发明实施例提供的人脸检测训练装置的另一结构框图;
图10为本发明实施例提供的人脸检测训练装置的再一结构框图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例基于CNN所构建的一种可选的人脸检测模型可以如图1所示,包括:基础网络层,候选框预测层,人脸检测层。
其中,基础网络层可以是由一系列的卷积层(Convolution)和池化层(Pooling)依次连接构成的子网络,基础网络层可以通过一系列的卷积层对每一训练样本(训练样本可以是图像形式的样本)进行逐层的卷积处理,其中下一卷积层卷积处理上一卷积层输出的卷积处理结果;这里面,多层卷积层处理的图像特征中,浅层特征能够表示丰富的边缘角点、纹理结构等特征,深层特 征是基于浅层特征的进一步抽象映射,通过多层卷积层的逐层卷积处理,可以实现不同层次的图像特征的提取;而针对每一训练样本,基础网络层输出的是最后一层的卷积层卷积处理后的特征图(Feature map),特征图可以是图像特征的一种表示。
候选框预测层可以是全卷积结构的子网络,建立在基础网络层输出的图像特征之上,候选框预测层可以通过卷积层对每一训练样本的特征进行映射,从而通过映射的结点建立候选框分类器和候选框回归器,形成候选框检测;候选框分类器可用于进行候选框(Proposals)的概率预测,候选框回归器可用于进行候选框的坐标预测,从而输出候选框(Proposals),候选框预测层输出的候选框可以输入到人脸检测层。
人脸检测层可以是包含关注区域池化层(RoI Pooling)的子网络,建立在基础网络层输出的图像特征,和候选框预测层输出的候选框的基础上;针对每一训练样本,人脸检测层可以基于候选框(Proposals)对基础网络层的输出的训练样本的图像特征做降维的采样,得到固定尺寸的特征图,将特征图中所有的结点连接映射到固定长度的特征向量,从而得到每一训练样本的特征向量,基于每一训练样本的特征向量建立人脸分类器和人脸回归器,人脸分类器和人脸回归器联合构成了人脸检测,其中,人脸分类器能够预测人脸和非人脸的概率,人脸回归器可基于候选框进行更为准确的人脸框的坐标回归。
进一步,图1所示人脸检测模型的进一步可选细化可通过基于Faster RCNN的人脸检测模型实现,Faster RCNN是一种人脸检测的经典算法,分为RPN(Region Proposal Networks)层和Fast RCNN层,RPN层生成候选框,Fast RCNN层可基于候选框得到最终的检测结果。
如图2所示,基于Faster RCNN的人脸检测模型可以包括:基础网络层,RPN层,Fast RCNN层;其中,RPN层可以认为是候选框预测层的一种可选实现,Fast RCNN层可以认为是人脸检测层的一种可选实现。
在本发明实施例中,RPN层的目标是基于基础网络层输出的图像特征产生候选框,在这个过程中,本发明实施例可预先定义多个锚框,该多个锚框覆盖不同尺度与长宽比,通过该预先定义的多个锚框可确定训练样本中的子框,通过该子框预测候选框(如利用该子框可以训练候选框检测,从而通过候选框检 测进行候选框的预测)。
可选的,锚框是用来定义和建立候选框(Proposal)的分类器和回归器的,是RPN层里面的。RPN可以看出是候选框检测。具体来说,每个锚框都关联一个检测(分类加回归),分类和回归有预测值和目标值才能进行训练和学习。RPN里面,分类目标值的确定(也就是如何定义这个输出是正类还是负类)是根据锚框和真实框的重叠率。类似,Fast RCNN里面,分类目标值的确定是根据候选框与真实框的重叠率。因此,RPN用到的锚框与Fast RCNN用到的候选框在建立分类器时有相似的作用,锚框可看成候选框的候选框。RPN可对图像特征经过卷积处理后的每个结点都建立多个候选框检测(每个候选框检测关联一个锚框)。
Fast RCNN层的目标是基于候选框和基础网络层输出的图像特征,生成训练样本的特征向量,从而以训练样本的特征向量建立人脸分类器和人脸回归器,人脸分类器和人脸回归器联合构成人脸检测。
为使得人脸检测具有更好的检测效果,可通过随机梯度下降算法(Stochastic Gradient Descent,SGD)等模型优化算法,进行迭代训练,在每一次迭代时,通过从训练样本集合中选取批数据训练样本进行训练,然后在每一次迭代中视人脸检测的优化目标是否达成,来更新人脸检测模型的网络参数。
目前主要是以最大化人脸和非人脸的差异作为人脸检测的优化目标,而忽视了人脸和人脸之间在不同场景下的人脸变化差异,例如忽视了人脸在不同的拍摄角度、分辨率、光照条件、表情变化以及遮挡等场景下的变化差异,导致训练出的人脸检测的判别能力较弱,鲁棒性较差。例如,类内人脸和人脸(例如有光照和无光照)的差异太大,就会被判别为不同类,而实际上应该是同类,因此本发明实施例需要使得类内差异尽可能小,保证人脸检测对类内差异具有不变性。
基于此,本发明实施例对人脸检测的迭代训练优化过程进行了改进,提出新的人脸检测训练方法,以保证人脸检测在对人脸和非人脸具有较高检测性能的同时,减小人脸和人脸之间的类内差异,提升人脸检测的判别能力。
本发明实施例提供的人脸检测训练方法可通过程序形式装载在用于实施 人脸检测训练的电子设备上,该电子设备可以是网络侧的服务器,也可能是用户侧的个人计算机(Personal Computer,PC)等终端设备,该电子设备的形式可视人脸检测的实际训练需求而定。
可选的,用于实施人脸检测训练的电子设备的硬件结构可以如图3所示,包括:至少一个处理器1,至少一个通信接口2,至少一个存储器3和至少一个通信总线4;
在本发明实施例中,处理器1、通信接口2、存储器3、通信总线4的数量为至少一个,且处理器1、通信接口2、存储器3通过通信总线4完成相互间的通信;显然,图3所示的处理器1、通信接口2、存储器3和通信总线4的通信连接示意仅是可选的;
可选的,通信接口2可以为通信模块的接口,如GSM模块的接口;
处理器1可能是一个中央处理器CPU,或者是特定集成电路(Application Specific Integrated Circuit,ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路。
存储器3可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory,NVM),例如至少一个磁盘存储器。
其中,存储器3存储有程序,处理器1调用存储器3所存储的程序,该程序可用于执行本发明实施例提供的人脸检测训练方法。
本发明实施例可通过随机梯度下降算法(Stochastic Gradient Descent,SGD)等模型优化算法进行人脸检测的迭代训练,SGD是常用的卷积神经网络优化算法,对解决大规模机器学习问题有效,SGD在每次迭代时,会使用从训练样本集合中随机抽取的批数据训练样本(Minibatch)进行梯度下降优化。
以一次迭代涉及的人脸检测训练为例,本发明实施例提供的人脸检测训练方法的流程可以如图4所示,每次迭代涉及的人脸检测训练流程均可参照图4所示,参照图4,本发明实施例提供的人脸检测训练方法可以包括:
步骤S100、获取当前次迭代的批数据训练样本,所述批数据训练样本包括不同样本类的多个训练样本。
可选的,批数据训练样本(Minibatch)为从包含所有训练样本的训练样本集合中选取的;
人脸检测可以认为是实现二分类任务(人脸和非人脸),在每次迭代时,可以从训练样本集合中获取多个人脸图像作为正类的训练样本,获取多个非人脸图像作为负类的训练样本,将获取的正类的训练样本和负类的训练样本构成每次迭代的批数据训练样本;
相应的,当前次迭代使用的批数据训练样本可以包括:多个训练样本,该多个训练样本的样本类可以分为正类(即对应以人脸图像作为的正类的训练样本)和负类(即对应以非人脸图像作为的负类的训练样本)。
步骤S110、分别根据各训练样本的特征向量,及各训练样本所属的样本类的中心特征向量,确定各训练样本对应的中心损失值。
对于所述批数据训练样本中的一训练样本,本发明实施例可确定该训练样本的特征向量,及该训练样本所属的样本类在所述批数据训练样本中对应的中心特征向量,从而确定出该训练样本对应的中心损失值,对于所述批数据训练样本中的每一训练样本均进行此处理,可得到所述批数据训练样本中各训练样本对应的中心损失值;
可选的,所述批数据训练样本中一样本类的中心特征向量可以通过,当前次迭代中所述批数据训练样本中属于该样本类的训练样本的特征向量的均值对应的更新;
可选的,对于一样本类,本发明实施例可确定所述批数据训练样本中属于该样本类的各训练样本;根据所述批数据训练样本中属于该样本类的各训练样本的特征向量,确定属于该样本类的各训练样本的特征向量的均值,得到所述批数据训练样本中该样本类的中心特征向量的更新变量;根据所述更新变量和设定学习率,得到所述批数据训练样本中该样本类的中心特征向量,以实现根据所述批数据训练样本中一样本类的各训练样本的特征向量的均值,更新该样本类的中心特征向量;
可选的,本发明实施例可根据如下公式确定批数据训练样本中一样本类的中心特征向量:
Figure PCTCN2018079281-appb-000001
其中,α表示设定学习率,
Figure PCTCN2018079281-appb-000002
表示更新变量,
Figure PCTCN2018079281-appb-000003
表示第j样本类在第t次迭代中所使用的批数据训练样本对应的中心特征向量,
Figure PCTCN2018079281-appb-000004
表示第j样本类在第t+1次迭代中所使用的批数据训练样本对应的中心特征向 量;
即可选的,对于一样本类,本发明实施例可将上一次迭代时批数据训练样本在该样本类对应的中心特征向量,减去,所述更新变量和设定学习率的乘积,得到当前次迭代时批数据训练样本在该样本类对应的中心特征向量。
可选的,对于所述批数据训练样本中正类的样本类,本发明实施例可确定所述批数据训练样本中属于正类的各训练样本的特征向量,确定属于正类的各训练样本的特征向量的均值,从而更新正类的样本类的中心特征向量;相应的,对于所述批数据训练样本中负类的样本类,本发明实施例可确定所述批数据训练样本中属于负类的各训练样本的特征向量,确定属于负类的各训练样本的特征向量的均值,从而更新负类的样本类的中心特征向量;
可选的,进一步,对于所述批数据训练样本中正类的各训练样本,本发明实施例可分别根据正类的各训练样本的特征向量,与正类的样本类的中心特征向量,确定出正类的各训练样本对应的中心损失值;对于所述批数据训练样本中负类的各训练样本,本发明实施例可分别根据负类的各训练样本的特征向量,与负类的样本类的中心特征向量,确定出负类的各训练样本对应的中心损失值。
可选的,一训练样本的中心损失值可以通过该训练样本的特征向量,与该训练样本所属的样本类的中心特征向量的距离表示;假设x i表示批数据训练样本中的第i个训练样本,y i表示x i所属于样本类(可设y i=1表示正类,y i=0表示负类,当然,也可设置y i=0表示负类,y i=1表示正类,只要正类和负类对应的y i值不同即可),c yi表示x i所属于样本类y i的中心特征向量,则x i样本的中心损失值可以定义为:
Figure PCTCN2018079281-appb-000005
需要说明的是,一训练样本的特征向量的确定过程可以是:基础网络层输出训练样本的图像特征后,人脸检测层根据候选框(Proposals)确定训练样本中的关注区域,从而人脸检测层对训练样本的关注区域的图像特征做降维的采样,得到固定尺寸的特征图,将特征图中所有的结点连接映射到固定长度的特征向量,得到训练样本的特征向量。
步骤S120、根据所述各训练样本对应的中心损失值,确定所述批数据训练样本对应的中心损失值。
可选的,本发明实施例可根据各训练样本对应的中心损失值,确定各训练样本对应的中心损失值的均值,根据各训练样本对应的中心损失值的均值确定出所述批数据训练样本对应的中心损失值;
可选的,本发明实施例可直接将各训练样本对应的中心损失值的均值作为所述批数据训练样本对应的中心损失值,也可以将各训练样本对应的中心损失值的均值乘以设定数值(如乘以1/2),得到所述批数据训练样本对应的中心损失值。
假设批数据训练样本有共m个训练样本,则批数据训练样本对应的中心损失值可以表示为
Figure PCTCN2018079281-appb-000006
步骤S130、至少根据所述批数据训练样本对应的中心损失值,确定人脸检测的目标损失值。
人脸检测的目标损失值是人脸检测迭代训练过程中的优化目标的表示,目标损失值达到设定的训练收敛条件(如最小),则可结束迭代训练,输出人脸检测;在每一次迭代中,本发明实施例可将现有的人脸检测的优化目标,与所使用的批数据训练样本对应的中心损失值相结合,作为本发明实施例人脸检测的优化目标,得到人脸检测的目标损失值。
可选的,本发明实施例可根据所述批数据训练样本对应的中心损失值,所述批数据训练样本对应的分类损失值,以及所述批数据训练样本对应的人脸框坐标回归损失值确定人脸检测的目标损失值;
其中,批数据训练样本对应的分类损失值可以根据批数据训练样本中各训练样本的分类预测概率和分类目标概率(分类真实概率)的差值确定;
如对于批数据训练样本的每一训练样本,在获取到训练样本的特征向量后,本发明实施例可通过Softmax函数等预测该训练样本所属的样本类,得到该训练样本的分类预测概率,从而可根据该训练样本的分类预测概率和该训练样本真实的分类目标概率,确定出该训练样本对应的分类损失值(如取该训练样本的分类预测概率和分类目标概率的差值),进而可根据批数据训练样本中各训练样本对应的分类损失值,确定出批数据训练样本对应的分类损失值(如取各训练样本的分类损失值的均值等)。
可见,批数据训练样本对应的分类损失值是人脸检测对于人脸和非人脸的类间分类的指标,批数据训练样本对应的分类损失值,可以对人脸和非人脸的差异(类间差异)进行表示,将批数据训练样本对应的分类损失值作为人脸检测的优化目标的部分,可使得优化后的人脸检测对于人脸和非人脸的类间区分具有较高的性能;
在此基础上,批数据训练样本对应的中心损失值对训练样本的特征向量和训练样本所属的样本类的中心特征向量的距离进行了表示,因此批数据训练样本对应的中心损失值,可以说明训练样本的特征向量与其所属的样本类的中心特征向量的差异,可以对每一样本类中的训练样本的类内的特征向量差异进行表示,因此将批数据训练样本对应的中心损失值作为人脸检测的优化目标的部分,可使得优化后的人脸检测对于人脸的类内差异具有不变性(如不同场景下的人脸和人脸之间的类内差异),提升人脸检测的鲁棒性。
可选的,人脸检测的训练可以包含分类训练和回归训练,是联合训练的过程;一次迭代中批数据训练样本对应的中心损失值和分类损失值构成的损失值,可以认为是分类训练的优化目标,如使批数据训练样本对应的中心损失值和分类损失值构成的损失值最小,来作为人脸检测训练中分类训练的优化目标;
而每一次迭代中,人脸检测训练中回归训练的优化目标可以由批数据训练样本对应的人脸框坐标回归损失值构成;
通过联合一次迭代中批数据训练样本对应的中心损失值,分类损失值和人脸框坐标回归损失值,可形成人脸检测的目标损失值,来表示人脸检测训练的优化目标。
可选的,本发明实施例可将所述批数据训练样本对应的中心损失值和第一设定权重的乘积,所述批数据训练样本对应的人脸框坐标回归损失值和第二设定权重的乘积,及,所述批数据训练样本对应的分类损失值进行求和,得到人脸检测的目标损失值;
假设L cls表示批数据训练样本对应的分类损失值,L c表示批数据训练样本对应的中心损失值,则人脸检测的目标损失值可以表示为:L cls+μL c+λL reg;μ和λ表示设定权重系数,其中μ为第一设定权重,λ为第二设定权重。
可选的,本发明实施例也可直接将所述批数据训练样本对应的中心损失值,分类损失值和人脸框坐标回归损失值进行求和,得到人脸检测的目标损失值。
步骤S140、判断所述人脸检测的目标损失值是否达到设定的训练收敛条件,若否,执行步骤S150,若是,执行步骤S160。
可选的,设定的训练收敛条件可以认为是人脸检测的目标损失值最小;
具体的,批数据训练样本对应的分类损失值越小,说明人脸检测对于人脸和非人脸分类的效果越好,人脸检测可实现最大化的人脸和非人脸的差异区分(即最大化类间差异);而批数据训练样本对应的中心损失值越小,说明每一样本类中的训练样本的类内的特征向量差异越小,可使得同一样本类的训练样本的差异减小,进而降低样本类中人脸和人脸之间的差异,即通过迭代训练,使得批数据训练样本的每个训练样本的特征向量与该训练样本所归属的样本类的中心特征向量的距离最小。
可见,通过结合批数据训练样本对应的中心损失值,确定人脸检测的目标损失值,从而以人脸检测的目标损失值判断训练收敛条件,可使得人脸检测在最小化的批数据训练样本对应的中心损失值的情况下,保证人脸检测对于人脸的类内差异具有不变性(如不同场景下的人脸和人脸之间的类内差异),提升人脸检测的鲁棒性。
步骤S150、根据所述人脸检测的目标损失值,更新人脸检测模型中与人脸检测相关的网络参数,并进入下一次迭代,返回步骤S100。
可选的,如果人脸检测的目标损失值未达到设定的训练收敛条件(如人脸检测的目标损失值未达到最小),则本发明实施例可根据所述人脸检测的目标损失值,对人脸检测模型中的网络参数进行更新;同时,按照迭代训练流程进行下一次迭代,返回步骤S100,以更新网络参数后的人脸检测模型循环执行步骤S100至步骤S140,直至步骤S140的判断结果为人脸检测的目标损失值达到设定的训练收敛条件;
可选的,本发明实施例可根据随机梯度下降方法进入下一次迭代,返回步骤S100。
步骤S160、输出人脸检测。
可选的,如果人脸检测的目标损失值达到设定的训练收敛条件(如人脸检测的目标损失值达到最小),则可输出通过人脸检测模型训练得到的人脸检测,完成人脸检测的迭代训练优化过程。
本发明实施例提供的人脸检测训练流程可以包括:获取当前次迭代的批数据训练样本,所述批数据训练样本包括不同样本类的多个训练样本;分别根据各训练样本的特征向量,及各训练样本所属的样本类的中心特征向量,确定各训练样本对应的中心损失值;根据所述各训练样本对应的中心损失值,确定所述批数据训练样本对应的中心损失值;至少根据所述批数据训练样本对应的中心损失值,确定人脸检测的目标损失值;如果所述人脸检测的目标损失值未达到设定的训练收敛条件,则根据所述人脸检测的目标损失值,更新人脸检测模型中的网络参数,并进入下一次迭代,直至人脸检测的目标损失值达到设定的训练收敛条件;如果所述人脸检测的目标损失值达到设定的训练收敛条件,则可输出人脸检测,完成人脸检测的训练。
本发明实施例中,人脸检测的训练优化目标结合了批数据训练样本对应的中心损失值,可使得人脸检测对于人脸和人脸之间的类内差异具有不变性,因此结合批数据训练样本对应的中心损失值进行人脸检测的优化的训练,可使优化训练后的人脸检测能够在保证对人脸和非人脸具有较高的类间检测性能的同时,对于人脸的类内差异具有不变性,提升人脸检测的鲁棒性。
可选的,在根据人脸检测的目标损失值,更新人脸检测模型中的网络参数时,本发明实施例可根据人脸检测的目标损失值通过反向传播方式,更新人脸检测模型中的网络参数;
可选的,本发明实施例可根据所述人脸检测的目标损失值,以及上一次迭代的人脸检测模型中的网络参数,确定人脸检测的参数更新值,从而根据该人脸检测的参数更新值对上一次迭代的人脸检测模型中的网络参数进行更新;
可选的,假设人脸检测的目标损失值为Loss,Loss=L ls+μL c+λL reg,上一次迭代后的人脸检测模型中的网络参数为W1,则人脸检测的参数更新值可以表示为:
Figure PCTCN2018079281-appb-000007
根据人脸检测的参数更新值对上一次迭代后的人脸检测模型中的网络参 数进行更新可通过如下公式实现:
W2=kW1-α(ΔW+sW1);
其中,W2为更新后的人脸检测模型的网络参数,k为动量,α为学习率,s为权重衰减系数。
可选的,如图5所示,本发明实施例可在人脸检测层(如Fast RCNN层)设置中心损失函数(Center Loss),该中心损失函数可作用于人脸检测层的全连接特征表示层,该全连接特征表示层可通过全连接形式将特征图中所有的结点连接映射到固定长度的特征向量,得到各训练样本的特征向量;从而在每一次迭代训练中,中心损失函数可根据当前次迭代使用的批数据训练样本的各训练样本的特征向量,确定出批数据训练样本的各训练样本对应的中心损失值,并相应确定出批数据训练样本对应的中心损失值L c
同时,可在人脸检测层(如Fast RCNN层)设置Softmax函数,Softmax函数可作用于人脸检测层的全连接特征表示层,在迭代训练的每一次训练中,Softmax函数可对各训练样本的特征向量进行处理,确定出各训练样本的分类预测概率;进而通过Softmax Loss(分类损失函数)表示出训练样本的分类预测概率和分类目标概率(分类真实概率)的差值,且确定出批数据训练样本对应的分类损失值L cls
即Softmax函数的输入是训练样本的特征向量,输出是训练样本属于每个样本类的预测概率;而Softmax Loss(分类损失函数)是输入训练样本的p(分类预测概率)和p*(分类目标概率),输出是损失值(Loss),Loss越小表示分类越准确;本发明实施例中,Center Loss与Softmax Loss作用在同一层之上(即输入的特征向量是相同的),Center Loss作为人脸检测优化的辅助监督信号,Center Loss越小表示人脸检测所检测的类内的特征的差异越小,Softmax Loss则驱使人脸检测所检测的类间的特征相互分离,保证类间具有可分辨差异;
可选的,进一步,本发明实施例可在人脸检测层(如Fast RCNN层)设置人脸框回归预测函数SmoothL1(平滑一范数函数),通过SmoothL1基于候选框,确定批数据训练样本中各训练样本对应的人脸框预测坐标;进而通过SmoothL1 Loss确定各训练样本对应的人脸框坐标回归损失值,其输入是训练 样本对应的人脸框预测坐标和人脸框目标坐标,输出是损失值(Loss),进而以此确定出批数据训练样本对应的人脸框坐标回归损失值L reg
可选的,本发明实施例可确定出人脸检测的目标损失值Loss=L ls+μL c+λL reg,通过每次迭代得到的目标损失值Loss,更新人脸检测模型中的网络参数,直至目标损失值Loss达到最小。
可选的,一次迭代中批数据训练样本对应的分类损失值的确定过程可以如下:
分别根据批数据训练样本中各训练样本对应的分类预测概率和分类目标概率,确定所述批数据训练样本中各训练样本对应的分类损失值;
根据所述批数据训练样本中各训练样本对应的分类损失值,确定所述批数据训练样本对应的分类损失值。
可选的,一次迭代中批数据训练样本对应的人脸框坐标回归损失值的确定过程,可以如图6所示,包括:
步骤S200、根据候选框确定批数据训练样本中各训练样本对应的人脸框预测坐标。
可选的,本发明实施例可根据候选框预测层输出的候选框,确定当前次迭代中批数据训练样本的各训练样本的关注区域,得到各训练样本对应的人脸框预测坐标;一训练样本的人脸框预测坐标可以通过左上顶点横坐标、左上顶点纵坐标,右下顶点横坐标、右下顶点纵坐标等表示;
可选的,本发明实施例可在人脸检测层(如Fast RCNN层)设置人脸框回归预测函数SmoothL1(平滑一范数函数),通过SmoothL1基于候选框,确定出各训练样本对应的人脸框预测坐标。
步骤S210、分别根据各训练样本对应的人脸框预测坐标,以及各训练样本对应的人脸框目标坐标,确定各训练样本对应的人脸框坐标回归损失值。
可选的,训练样本对应的人脸框目标坐标可以是训练样本中人脸框真实对应的坐标;对于每一训练样本,本发明实施例可通过该训练样本对应的人脸框预测坐标以及人脸框目标坐标的差值,确定出该训练样本对应的人脸框坐标回归损失值,从而对于每一训练样本均作此处理,可得到各训练样本对应的人脸框坐标回归损失值。
可选的,本发明实施例可通过SmoothL1 Loss表示人脸框坐标回归损失值,其输入是训练样本对应的人脸框预测坐标和人脸框目标坐标,输出是损失值(Loss),Loss越小表示人脸框的回归越准确。
步骤S220、根据各训练样本对应的人脸框坐标回归损失值,确定所述批数据训练样本对应的人脸框坐标回归损失值。
可选的,本发明实施例可根据批数据训练样本中各训练样本对应的人脸框坐标回归损失值,确定各训练样本对应的人脸框坐标回归损失值的均值,根据该均值确定批数据训练样本对应的人脸框坐标回归损失值(SmoothL1 Loss)。
可选的,本发明实施例进行人脸检测迭代训练的过程使用了多损失函数联合训练,包括人脸分类和回归两个联合任务,分类训练使用Center Loss和Softmax Loss联合优化,回归训练使用SmoothL1 Loss优化;人脸检测最终优化目标是批数据训练样本对应的Center Loss,Softmax Loss和SmoothL1 Loss的三损失值的加权和最小;
可选的,本发明实施例可以对通用大规模人脸识别任务(ImageNet)上预训练好的模型进行微调(Finetuning);通过引入中心损失值作为人脸检测的辅助优化目标,引导人脸检测模型的优化、训练,提升人脸检测对于人脸与人脸之间的类内差异的判别能力。
可选的,在迭代训练的过程中,本发明实施例可基于上一次迭代的人脸检测模型,确定训练样本集合中人脸检测较难检测的训练样本,来确定下一次迭代所使用的批数据训练样本,以加强人脸检测对这些较难检测的训练样本的检测能力;训练样本是否较难检测可通过测量训练样本对应的目标损失值确定,目标损失值越高则说明训练样本距离优化目标越远,检测的难度也就越大;
相应的,图7示出了本发明实施例提供的获取当前次迭代的批数据训练样本的方法流程图,参照图7,该方法可以包括:
步骤S300、固定上一次迭代的人脸检测模型,以上一次迭代的人脸检测模型获取训练样本集合中各训练样本对应的中心损失值,分类损失值和人脸框坐标回归损失值。
步骤S310、分别根据训练样本集合中各训练样本对应的中心损失值,分类损失值和人脸框坐标回归损失值,确定训练样本集合中各训练样本的目标损失 值。
可选的,对于一训练样本,本发明实施例可对该训练样本的中心损失值,分类损失值和人脸框坐标回归损失值进行加权求和,得到该训练样本的目标损失值;对于每一训练样本均进行如此处理,则可得到各训练样本的目标损失值;
可选的,对于一训练样本,其目标损失值可以表示为:分类损失值+μ中心损失值+λ人脸框坐标回归损失值。
可选的,对于一训练样本,本发明实施例也可将该训练样本的中心损失值,分类损失值和人脸框坐标回归损失值进行求和,得到该训练样本的目标损失值。
步骤S320、根据训练样本集合中正类的样本类中各训练样本的目标损失值,选取正类的样本类中目标损失值最大的第一数量的训练样本;及根据训练样本集合中负类的样本类中各训练样本的目标损失值,选取负类的样本类中目标损失值最大的第二数量的训练样本,所述第一数量和所述第二数量的比值与设定比例相应。
可选的,在得到训练样本集合中各训练样本的目标损失值后,本发明实施例可将训练样本集合中各训练样本按照正类和负类的样本类进行分类,从而可确定出训练样本集合中属于正类的样本类中各训练样本的目标损失值,以及训练样本集合中属于负类的样本类中各训练样本的目标损失值;同时,可根据正类的样本类中各训练样本的目标损失值,对属于正类的训练样本进行排序(可以是按照目标损失值从大到小排序,也可以是按照目标损失值从小到大排序),及根据负类的样本类中各训练样本的目标损失值,对属于负类的训练样本进行排序;
进而根据批数据训练样本中正类的训练样本和负类的训练样本的设定比例,根据训练样本集合中正类的样本类中各训练样本的目标损失值,选取正类的样本类中目标损失值最大的第一数量的训练样本,根据训练样本集合中负类的样本类中各训练样本的目标损失值,选取负类的样本类中目标损失值最大的第二数量的训练样本,使得第一数量和所述第二数量的比值与批数据训练样本中要求的正、负类样本数量的设定比例相应。
可选的,基于Center Loss对正样本(人脸)和负样本(非人脸)的数据平 衡要求的考虑,本发明实施例可以使得设定比例为1:1,即第一数量和第二数量相同。
步骤S330、根据从正类的样本类中选取的训练样本,和从负类的样本类中选取的训练样本,构成当前次迭代的批数据训练样本。
可见,本发明实施例提供的人脸检测训练方法中,在将上一次迭代的批数据训练样本送入人脸检测模型中进行训练后,可根据上一次迭代的批数据训练样本的Center Loss和Softmax Loss,更新优化人脸检测,根据上一次迭代的批数据训练样本的SmoothL1 Loss更新优化人脸回归器,使得人脸检测往Center Loss、Softmax Loss和SmoothL1 Loss的加权和最小的方向优化;
而上一次迭代可决定下一次迭代所使用的批数据训练样本,通过上一次迭代后的人脸检测模型,可确定训练样本集合中的各训练样本的Center Loss、Softmax Loss和SmoothL1 Loss的目标损失值,从而从训练样本集合中选取出目标损失值最大的第一数量的正类的训练样本,和目标损失值最大的第二数量的负类的训练样本,构建出下一次迭代的Minibatch(即批数据训练样本);
从而进入下一次的迭代,在下一次的迭代中,将该Minibatch送入人脸检测模型中进行训练,以此循环迭代的进行训练,直至在某一次的迭代中,批数据训练样本的SmoothL1 Loss、Softmax Loss和SmoothL1 Loss的加权和达到最小。
采用上述描述的训练样本集合中,上一次迭代训练后的人脸检测较难检测的训练样本作为下一次迭代所使用的Minibatch,可使得每一次迭代能够更好的进行center loss的估计,从而更好的监督学习训练样本中具有类内差异辨识力的特征。
这里需要说明的是,与常规的利用随机梯度下降算法进行人脸检测的迭代训练不同的是,本发明实施例并不是单纯使用随机抽取的批数据训练样本(Minibatch)进行梯度下降优化,而是结合上一次迭代时,训练样本集合中较难检测的训练样本来确定下一次迭代所使用的Minibatch。
可见,本发明实施例提出了一种鲁棒的人脸检测训练方法。该方法基于神经网络实现,在迭代训练的每一次训练过程中,引入批数据训练样本对应的Center Loss(中心损失值)作为人脸和非人脸的二分类任务的辅助损失函数,与批数据训练样本对应的Softmax Loss(分类损失值)联合监督人脸检测的优 化训练;可引导人脸检测的学习过程,使得人脸检测保持人脸与非分类的类间差异可区分的同时,减小人脸和人脸之间的类内差异,提升人脸检测对于人脸的判别能力。
并且利用困难样本在线挖掘算法(OHEM),根据训练样本的总损失值,对上一次训练时,较难检测的正类训练样本和负类训练样本进行挖掘,并保持正负样本的比例是1:1,从而增强人脸检测对于较难检测的训练样本的分类能力,提升人脸检测的整体性能。
此外,本发明采用更适合人脸目标的锚框(覆盖多个尺寸、多个长宽比)以及多尺度训练的策略,提升对于不同分辨率人脸目标的判别性,可使得候选框的生成适用于不同的人脸,而使用本发明实施例提供的人脸检测训练方法训练的人脸检测能够有效提升准确率,增强鲁棒性。本发明实施例的人脸检测与采用其他方式训练的人脸检测的性能比对可如下表1所示:
表1
Figure PCTCN2018079281-appb-000008
可见,本发明实施例能够提升人脸检测的人脸检测判别能力,提升人脸检测的鲁棒性。
下面对本发明实施例提供的人脸检测训练装置进行介绍,下文描述的人脸检测训练装置内容,可以认为是实施人脸检测训练的电子设备为实现本发明实施例提供的人脸检测训练方法,所需设置的程序模块;下文描述的人脸检测训练装置内容可与上文描述的人脸检测训练方法内容相互对应参照。
图8为本发明实施例提供的人脸检测训练装置的结构框图,参照图8,该人脸检测训练装置可以包括:
样本获取模块100,用于获取当前次迭代的批数据训练样本,所述批数据训练样本包括不同样本类的多个训练样本;
样本中心损失值确定模块200,用于分别根据各训练样本的特征向量,及各训练样本所属的样本类的中心特征向量,确定各训练样本对应的中心损失值;
批样本中心损失值确定模块300,用于根据所述各训练样本对应的中心损失值,确定所述批数据训练样本对应的中心损失值;
检测目标损失值确定模块400,用于至少根据所述批数据训练样本对应的中心损失值,确定人脸检测的目标损失值;
参数更新模块500,用于若所述人脸检测的目标损失值未达到设定的训练收敛条件,根据所述人脸检测的目标损失值,更新人脸检测模型的网络参数,并进入下一次迭代;
检测输出模块600,用于若所述人脸检测的目标损失值达到设定的训练收敛条件,输出人脸检测。
可选的,检测目标损失值确定模块400,用于至少根据所述批数据训练样本对应的中心损失值,确定人脸检测的目标损失值,具体包括:
根据所述批数据训练样本对应的中心损失值,所述批数据训练样本对应的分类损失值,以及所述批数据训练样本对应的人脸框坐标回归损失值确定人脸检测的目标损失值。
可选的,检测目标损失值确定模块400,用于根据所述批数据训练样本对应的中心损失值,所述批数据训练样本对应的分类损失值,以及所述批数据训练样本对应的人脸框坐标回归损失值确定人脸检测的目标损失值,具体包括:
将所述批数据训练样本对应的中心损失值和第一设定权重的乘积,所述批数据训练样本对应的人脸框坐标回归损失值和第二设定权重的乘积,及,所述批数据训练样本对应的分类损失值进行求和,得到人脸检测的目标损失值。
可选的,样本获取模块100,用于获取当前次迭代的批数据训练样本,具体包括:
以上一次迭代的人脸检测模型确定训练样本集合中各训练样本对应的目标损失值;
根据训练样本集合中正类的样本类中各训练样本的目标损失值,选取正类的样本类中目标损失值最大的第一数量的训练样本;及根据训练样本集合中负类的样本类中各训练样本的目标损失值,选取负类的样本类中目标损失值最大的第二数量的训练样本,所述第一数量和所述第二数量的比值与设定比例相应;
根据从正类的样本类中选取的训练样本,和从负类的样本类中选取的训练样本,构成当前次迭代的批数据训练样本。
可选的,样本获取模块100,用于以上一次迭代的人脸检测模型确定训练样本集合中各训练样本对应的目标损失值,具体包括:
以上一次迭代的人脸检测模型,获取训练样本集合中各训练样本对应的中心损失值,分类损失值和人脸框坐标回归损失值;其中,一训练样本对应的分类损失值根据该训练样本对应的分类预测概率和分类目标概率确定,一训练样本对应的人脸框坐标回归损失值根据该训练样本对应的人脸框预测坐标和人脸框目标坐标确定;
分别根据训练样本集合中各训练样本对应的中心损失值,分类损失值和人脸框坐标回归损失值,确定训练样本集合中各训练样本的目标损失值。
可选的,图9示出了本发明实施例提供的人脸检测训练装置的另一结构,结合图8和图9所示,该人脸检测训练装置还可以包括:
批样本分类损失值确定模块700,用于分别根据所述批数据训练样本中各训练样本对应的分类预测概率和分类目标概率,确定所述批数据训练样本中各训练样本对应的分类损失值;根据所述批数据训练样本中各训练样本对应的分类损失值,确定所述批数据训练样本对应的分类损失值。
可选的,样本中心损失值确定模块200,用于分别根据各训练样本的特征向量,及各训练样本所属的样本类的中心特征向量,确定各训练样本对应的中心损失值,具体包括:
确定所述批数据训练样本中各训练样本的特征向量,及所述批数据训练样本中各样本类的中心特征向量;
对于所述批数据训练样本中的一训练样本,确定该训练样本的特征向量,与所述批数据训练样本中该训练样本所属的样本类的中心特征向量的距离,得 到该训练样本对应的中心损失值。
可选的,样本中心损失值确定模块200,用于确定所述批数据训练样本中各样本类的中心特征向量,具体包括:
对于一样本类,确定所述批数据训练样本中属于该样本类的各训练样本;
根据所述批数据训练样本中属于该样本类的各训练样本的特征向量,确定属于该样本类的各训练样本的特征向量的均值,得到所述批数据训练样本中该样本类的中心特征向量的更新变量;
根据所述更新变量和设定学习率,得到所述批数据训练样本中该样本类的中心特征向量。
可选的,图10示出了本发明实施例提供的人脸检测训练装置的再一结构,结合图9和图10所示,该人脸检测训练装置还可以包括:
批样本人脸框坐标回归损失值确定模块800,用于根据候选框回归器确定各所述批数据训练样本中各训练样本对应的人脸框预测坐标;分别根据各训练样本对应的人脸框预测坐标,以及各训练样本对应的人脸框目标坐标,确定各训练样本对应的人脸框坐标回归损失值;根据各训练样本对应的人脸框坐标回归损失值,确定所述批数据训练样本对应的人脸框坐标回归损失值。
可选的,参数更新模块500,用于根据所述人脸检测的目标损失值,更新人脸检测模型的网络参数,具体包括:
根据人脸检测的目标损失值通过反向传播方式,更新人脸检测模型中的网络参数。
可选的,参数更新模块500,用于根据人脸检测的目标损失值通过反向传播方式,更新人脸检测模型中的网络参数,具体包括:
根据所述人脸检测的目标损失值,以及上一次迭代的人脸检测模型中的网络参数,确定人脸检测的参数更新值;
根据该人脸检测的参数更新值,对上一次迭代的人脸检测模型中的网络参数进行更新。
可选的,本发明实施例提供的人脸检测训练装置还可用于:
预先定义多个锚框,该多个锚框覆盖不同尺度与长宽比;
通过该预先定义的多个锚框确定训练样本中的子框,通过该子框预测候选 框。
本发明实施例还提供一种电子设备,该电子设备的硬件结构可以如图3所示,包括:至少一个存储器和至少一个处理器;
所述存储器存储有程序,所述处理器调用所述程序,所述程序用于:
获取当前次迭代的批数据训练样本,所述批数据训练样本包括不同样本类的多个训练样本;
分别根据各训练样本的特征向量,及各训练样本所属的样本类的中心特征向量,确定各训练样本对应的中心损失值;
根据所述各训练样本对应的中心损失值,确定所述批数据训练样本对应的中心损失值;
至少根据所述批数据训练样本对应的中心损失值,确定人脸检测的目标损失值;
若所述人脸检测的目标损失值未达到设定的训练收敛条件,根据所述人脸检测的目标损失值,更新人脸检测模型的网络参数,并进入下一次迭代;
若所述人脸检测的目标损失值达到设定的训练收敛条件,则输出人脸检测训练结果。
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器 (RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的核心思想或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。

Claims (18)

  1. 一种人脸检测训练方法,其特征在于,包括:
    获取迭代的批数据训练样本,所述批数据训练样本包括不同样本类的多个训练样本;
    分别根据各训练样本的特征向量,及各训练样本所属的样本类的中心特征向量,确定各训练样本对应的中心损失值;
    根据所述各训练样本对应的中心损失值,确定所述批数据训练样本对应的中心损失值;
    根据所述批数据训练样本对应的中心损失值,确定人脸检测的目标损失值;
    若所述人脸检测的目标损失值达到设定的训练收敛条件,则输出人脸检测训练结果。
  2. 根据权利要求1所述的人脸检测训练方法,其特征在于,所述方法还包括:
    若所述人脸检测的目标损失值未达到设定的训练收敛条件,则根据所述人脸检测的目标损失值,更新人脸检测模型的网络参数,并进入下一次迭代。
  3. 根据权利要求1或2所述的人脸检测训练方法,其特征在于,所述根据所述批数据训练样本对应的中心损失值,确定人脸检测的目标损失值包括:
    根据所述批数据训练样本对应的中心损失值,所述批数据训练样本对应的分类损失值,以及所述批数据训练样本对应的人脸框坐标回归损失值确定人脸检测的目标损失值。
  4. 根据权利要求3所述的人脸检测训练方法,其特征在于,所述根据所述批数据训练样本对应的中心损失值,所述批数据训练样本对应的分类损失值,以及所述批数据训练样本对应的人脸框坐标回归损失值确定人脸检测的目标损失值包括:
    将所述批数据训练样本对应的中心损失值和第一设定权重的乘积,所述批数据训练样本对应的人脸框坐标回归损失值和第二设定权重的乘积,及,所述批数据训练样本对应的分类损失值进行求和,得到人脸检测的目标损失值。
  5. 根据权利要求1至4中任一项所述的人脸检测训练方法,其特征在于, 所述多个训练样本的样本类包括正类和负类,所述获取迭代的批数据训练样本包括:
    以上一次迭代的模型确定训练样本集合中各训练样本对应的目标损失值;
    根据训练样本集合中正类的样本类中各训练样本的目标损失值,选取正类的样本类中目标损失值最大的第一数量的训练样本;及根据训练样本集合中负类的样本类中各训练样本的目标损失值,选取负类的样本类中目标损失值最大的第二数量的训练样本,所述第一数量和所述第二数量的比值与设定比例相应;
    根据从正类的样本类中选取的训练样本,和从负类的样本类中选取的训练样本,构成当前次迭代的批数据训练样本。
  6. 根据权利要求5所述的人脸检测训练方法,其特征在于,所述以上一次迭代的模型确定训练样本集合中各训练样本对应的目标损失值包括:
    以上一次迭代的模型,获取训练样本集合中各训练样本对应的中心损失值,分类损失值和人脸框坐标回归损失值;其中,训练样本对应的分类损失值根据所述训练样本对应的分类预测概率和分类目标概率确定,训练样本对应的人脸框坐标回归损失值根据所述训练样本对应的人脸框预测坐标和人脸框目标坐标确定;
    分别根据训练样本集合中各训练样本对应的中心损失值,分类损失值和人脸框坐标回归损失值,确定训练样本集合中各训练样本的目标损失值。
  7. 根据权利要求3所述的人脸检测训练方法,其特征在于,所述批数据训练样本对应的分类损失值的确定过程包括:
    分别根据所述批数据训练样本中各训练样本对应的分类预测概率和分类目标概率,确定所述批数据训练样本中各训练样本对应的分类损失值;
    根据所述批数据训练样本中各训练样本对应的分类损失值,确定所述批数据训练样本对应的分类损失值。
  8. 根据权利要求3所述的人脸检测训练方法,其特征在于,所述批数据训练样本对应的人脸框坐标回归损失值的确定过程包括:
    确定所述批数据训练样本中各训练样本对应的人脸框预测坐标;
    分别根据各训练样本对应的人脸框预测坐标,以及各训练样本对应的人脸 框目标坐标,确定各训练样本对应的人脸框坐标回归损失值;
    根据各训练样本对应的人脸框坐标回归损失值,确定所述批数据训练样本对应的人脸框坐标回归损失值。
  9. 根据权利要求1所述的人脸检测训练方法,其特征在于,所述分别根据各训练样本的特征向量,及各训练样本所属的样本类的中心特征向量,确定各训练样本对应的中心损失值包括:
    确定所述批数据训练样本中各训练样本的特征向量,及所述批数据训练样本中各样本类的中心特征向量;
    对于所述批数据训练样本中的训练样本,确定所述训练样本的特征向量,与所述批数据训练样本中所述训练样本所属的样本类的中心特征向量的距离,得到所述训练样本对应的中心损失值。
  10. 根据权利要求9所述的人脸检测训练方法,其特征在于,所述确定所述批数据训练样本中各样本类的中心特征向量包括:
    对于样本类,确定所述批数据训练样本中属于所述样本类的各训练样本;
    根据所述批数据训练样本中属于所述样本类的各训练样本的特征向量,确定属于所述样本类的各训练样本的特征向量的均值,得到所述批数据训练样本中所述样本类的中心特征向量的更新变量;
    根据所述更新变量与设定学习率,得到所述批数据训练样本中所述样本类的中心特征向量。
  11. 根据权利要求2至4中任一项所述的人脸检测训练方法,其特征在于,所述根据所述人脸检测的目标损失值,更新模型中的网络参数包括:
    根据人脸检测的目标损失值通过反向传播方式,更新人脸检测模型中的网络参数。
  12. 根据权利要求11所述的人脸检测训练方法,其特征在于,所述根据人脸检测的目标损失值通过反向传播方式,更新人脸检测模型中的网络参数包括:
    根据所述人脸检测的目标损失值,以及上一次迭代的人脸检测模型中的网络参数,确定人脸检测的参数更新值;
    根据所述人脸检测的参数更新值,对上一次迭代的人脸检测模型中的网络 参数进行更新。
  13. 根据权利要求1所述的人脸检测训练方法,其特征在于,所述方法还包括:
    预先定义多个锚框,所述多个锚框覆盖不同尺度与长宽比;
    通过所述预先定义的多个锚框确定训练样本中的子框,通过所述子框预测候选框。
  14. 一种人脸检测训练装置,其特征在于,包括:
    样本获取模块,用于获取迭代的批数据训练样本,所述批数据训练样本包括不同样本类的多个训练样本;
    样本中心损失值确定模块,用于分别根据各训练样本的特征向量,及各训练样本所属的样本类的中心特征向量,确定各训练样本对应的中心损失值;
    批样本中心损失值确定模块,用于根据所述各训练样本对应的中心损失值,确定所述批数据训练样本对应的中心损失值;
    检测目标损失值确定模块,用于根据所述批数据训练样本对应的中心损失值,确定人脸检测的目标损失值;
    检测输出模块,用于若所述人脸检测的目标损失值达到设定的训练收敛条件,则输出人脸检测训练结果。
  15. 根据权利要求14所述的人脸检测训练装置,其特征在于,所述人脸检测训练装置还包括参数更新模块;
    所述参数更新模块,用于若所述人脸检测的目标损失值未达到设定的训练收敛条件,则根据所述人脸检测的目标损失值,更新人脸检测模型的网络参数,并进入下一次迭代。
  16. 根据权利要求14所述的人脸检测训练装置,其特征在于,
    所述样本获取模块,具体用于以上一次迭代的人脸检测模型确定训练样本集合中各训练样本对应的目标损失值;
    根据训练样本集合中正类的样本类中各训练样本的目标损失值,选取正类的样本类中目标损失值最大的第一数量的训练样本;及根据训练样本集合中负类的样本类中各训练样本的目标损失值,选取负类的样本类中目标损失值最大的第二数量的训练样本,所述第一数量和所述第二数量的比值与设定比例相 应;
    根据从正类的样本类中选取的训练样本,和从负类的样本类中选取的训练样本,构成当前次迭代的批数据训练样本。
  17. 一种电子设备,其特征在于,包括:存储器和处理器;
    所述存储器存储有程序,所述处理器调用所述程序,所述程序用于:
    获取迭代的批数据训练样本,所述批数据训练样本包括不同样本类的多个训练样本;
    分别根据各训练样本的特征向量,及各训练样本所属的样本类的中心特征向量,确定各训练样本对应的中心损失值;
    根据所述各训练样本对应的中心损失值,确定所述批数据训练样本对应的中心损失值;
    根据所述批数据训练样本对应的中心损失值,确定人脸检测的目标损失值;
    若所述人脸检测的目标损失值达到设定的训练收敛条件,则输出人脸检测训练结果。
  18. 一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行如权利要求1至13中任一项所述的方法。
PCT/CN2018/079281 2017-06-02 2018-03-16 一种人脸检测训练方法、装置及电子设备 Ceased WO2018219016A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2019525952A JP6855098B2 (ja) 2017-06-02 2018-03-16 顔検出トレーニング方法、装置及び電子機器
EP18810647.0A EP3633549B1 (en) 2017-06-02 2018-03-16 Method and apparatus for training a facial detection model
KR1020197026337A KR102236046B1 (ko) 2017-06-02 2018-03-16 얼굴 검출 훈련 방법, 장치 및 전자 장치
US16/392,270 US10929644B2 (en) 2017-06-02 2019-04-23 Face detection training method and apparatus, and electronic device
US17/109,574 US11594070B2 (en) 2017-06-02 2020-12-02 Face detection training method and apparatus, and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710406726.9 2017-06-02
CN201710406726.9A CN108985135A (zh) 2017-06-02 2017-06-02 一种人脸检测器训练方法、装置及电子设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/392,270 Continuation US10929644B2 (en) 2017-06-02 2019-04-23 Face detection training method and apparatus, and electronic device

Publications (1)

Publication Number Publication Date
WO2018219016A1 true WO2018219016A1 (zh) 2018-12-06

Family

ID=64426184

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/079281 Ceased WO2018219016A1 (zh) 2017-06-02 2018-03-16 一种人脸检测训练方法、装置及电子设备

Country Status (8)

Country Link
US (2) US10929644B2 (zh)
EP (1) EP3633549B1 (zh)
JP (1) JP6855098B2 (zh)
KR (1) KR102236046B1 (zh)
CN (2) CN108985135A (zh)
MA (1) MA48806A (zh)
TW (1) TWI665613B (zh)
WO (1) WO2018219016A1 (zh)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110033332A (zh) * 2019-04-23 2019-07-19 杭州智趣智能信息技术有限公司 一种人脸识别方法、系统及电子设备和存储介质
JP2020042796A (ja) * 2018-09-10 2020-03-19 富士通株式会社 ニューラルネットワークアーキテクチャ探索装置と方法及びコンピュータ可読記憶媒体
CN111325223A (zh) * 2018-12-13 2020-06-23 中国电信股份有限公司 深度学习模型的训练方法、装置和计算机可读存储介质
CN111477212A (zh) * 2019-01-04 2020-07-31 阿里巴巴集团控股有限公司 内容识别、模型训练、数据处理方法、系统及设备
CN111814553A (zh) * 2020-06-08 2020-10-23 浙江大华技术股份有限公司 人脸检测方法、模型的训练方法及其相关装置
CN112949855A (zh) * 2021-02-26 2021-06-11 平安科技(深圳)有限公司 人脸识别模型训练方法、识别方法、装置、设备及介质
CN113221530A (zh) * 2021-04-19 2021-08-06 杭州火石数智科技有限公司 一种基于circle loss的文本相似度匹配方法、装置、计算机设备和储存介质
EP3933693A4 (en) * 2019-03-26 2022-05-04 Huawei Technologies Co., Ltd. OBJECT RECOGNITION METHOD AND APPARATUS
CN115601300A (zh) * 2022-09-07 2023-01-13 上海致景信息科技有限公司(Cn) 一种坯布缺陷模型的快速训练方法、系统、介质及计算机
CN116152871A (zh) * 2021-11-18 2023-05-23 北京眼神智能科技有限公司 卷积神经网络训练和人脸检测方法、装置、介质及设备

Families Citing this family (75)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108985135A (zh) * 2017-06-02 2018-12-11 腾讯科技(深圳)有限公司 一种人脸检测器训练方法、装置及电子设备
CN108694401B (zh) * 2018-05-09 2021-01-12 北京旷视科技有限公司 目标检测方法、装置及系统
US11620555B2 (en) * 2018-10-26 2023-04-04 Samsung Electronics Co., Ltd Method and apparatus for stochastic inference between multiple random variables via common representation
CN111191782A (zh) * 2018-11-14 2020-05-22 普天信息技术有限公司 卷积网络训练方法和装置
TWI684959B (zh) * 2018-11-16 2020-02-11 國立雲林科技大學 口鼻異物遮蔽檢測方法及其系統
US10891845B2 (en) 2018-11-28 2021-01-12 National Yunlin University Of Science And Technology Mouth and nose occluded detecting method and system thereof
TWI705340B (zh) * 2018-12-13 2020-09-21 財團法人工業技術研究院 相位圖像生成器的訓練方法及相位圖像分類器的訓練方法
CN109829893B (zh) * 2019-01-03 2021-05-25 武汉精测电子集团股份有限公司 一种基于注意力机制的缺陷目标检测方法
US10430691B1 (en) * 2019-01-22 2019-10-01 StradVision, Inc. Learning method and learning device for object detector based on CNN, adaptable to customers' requirements such as key performance index, using target object merging network and target region estimating network, and testing method and testing device using the same to be used for multi-camera or surround view monitoring
US10423860B1 (en) * 2019-01-22 2019-09-24 StradVision, Inc. Learning method and learning device for object detector based on CNN to be used for multi-camera or surround view monitoring using image concatenation and target object merging network, and testing method and testing device using the same
CN109801636A (zh) * 2019-01-29 2019-05-24 北京猎户星空科技有限公司 声纹识别模型的训练方法、装置、电子设备及存储介质
CN111522228B (zh) * 2019-02-02 2023-09-22 北京京东乾石科技有限公司 一种飞行器的检测方法及装置
CN111626087A (zh) * 2019-02-28 2020-09-04 北京市商汤科技开发有限公司 神经网络训练及眼睛睁闭状态检测方法、装置及设备
CN109948478B (zh) * 2019-03-06 2021-05-11 中国科学院自动化研究所 基于神经网络的大规模非均衡数据的人脸识别方法、系统
CN109934198B (zh) * 2019-03-22 2021-05-14 北京市商汤科技开发有限公司 人脸识别方法及装置
CN110059707B (zh) * 2019-04-25 2021-05-14 北京小米移动软件有限公司 图像特征点的优化方法、装置和设备
CN110414550B (zh) * 2019-06-14 2022-07-29 北京迈格威科技有限公司 人脸识别模型的训练方法、装置、系统和计算机可读介质
CN110443280B (zh) * 2019-07-05 2022-06-03 北京达佳互联信息技术有限公司 图像检测模型的训练方法、装置及存储介质
CN110443366B (zh) * 2019-07-30 2022-08-30 上海商汤智能科技有限公司 神经网络的优化方法及装置、目标检测方法及装置
TWI712961B (zh) * 2019-08-07 2020-12-11 瑞昱半導體股份有限公司 全連接卷積神經網路影像處理方法與電路系統
CN110432895B (zh) * 2019-08-09 2022-02-11 上海鹰瞳医疗科技有限公司 训练数据处理、心电波形检测方法及电子设备
CN110490115B (zh) * 2019-08-13 2021-08-13 北京达佳互联信息技术有限公司 人脸检测模型的训练方法、装置、电子设备及存储介质
CN110263774B (zh) * 2019-08-19 2019-11-22 珠海亿智电子科技有限公司 一种人脸检测方法
CN110532985B (zh) * 2019-09-02 2022-07-22 北京迈格威科技有限公司 目标检测方法、装置及系统
TWI719696B (zh) * 2019-11-01 2021-02-21 財團法人工業技術研究院 臉部影像重建方法與系統
WO2021087985A1 (zh) * 2019-11-08 2021-05-14 深圳市欢太科技有限公司 模型训练方法、装置、存储介质及电子设备
CN110956255B (zh) * 2019-11-26 2023-04-07 中国医学科学院肿瘤医院 难样本挖掘方法、装置、电子设备及计算机可读存储介质
WO2021125434A1 (ko) * 2019-12-19 2021-06-24 주식회사 노타 딥러닝 기반 실시간 온-디바이스 얼굴 인증을 위한 방법 및 장치
US11277626B2 (en) 2020-02-21 2022-03-15 Alibaba Group Holding Limited Region of interest quality controllable video coding techniques
CN111275011B (zh) * 2020-02-25 2023-12-19 阿波罗智能技术(北京)有限公司 移动红绿灯检测方法、装置、电子设备和存储介质
US11388423B2 (en) 2020-03-23 2022-07-12 Alibaba Group Holding Limited Region-of-interest based video encoding
CN111563541B (zh) * 2020-04-21 2023-04-18 北京百度网讯科技有限公司 图像检测模型的训练方法和装置
CN113673272B (zh) * 2020-05-13 2023-04-28 北京君正集成电路股份有限公司 一种基于宠物检测的双层标注二级级联计算损失值的方法
CN111598185B (zh) * 2020-05-27 2021-11-19 深圳市铁越电气有限公司 一种基于深度学习的训练数据平衡方法、设备和系统
US11907418B2 (en) * 2020-06-12 2024-02-20 Magic Leap, Inc. Eye tracking in near-eye displays
KR20210128491A (ko) * 2020-06-29 2021-10-26 베이징 바이두 넷컴 사이언스 앤 테크놀로지 코., 엘티디. 위험 주행 행위 식별 방법, 장치, 전자 설비 및 저장매체
CN112070205B (zh) * 2020-07-30 2025-03-04 华为技术有限公司 一种多损失模型获取方法以及装置
CN112016599B (zh) * 2020-08-13 2023-09-15 驭势科技(浙江)有限公司 用于图像检索的神经网络训练方法、装置及电子设备
CN111930980B (zh) * 2020-08-21 2023-07-07 深圳市升幂科技有限公司 图像检索模型的训练方法及图像检索方法、装置、及介质
CN112016450B (zh) * 2020-08-27 2023-09-05 京东方科技集团股份有限公司 机器学习模型的训练方法、装置和电子设备
CN111985439B (zh) * 2020-08-31 2024-08-13 中移(杭州)信息技术有限公司 人脸检测方法、装置、设备和存储介质
CN112257781B (zh) * 2020-10-22 2024-11-15 腾讯音乐娱乐科技(深圳)有限公司 一种模型训练方法及装置
CN112541587A (zh) * 2020-11-19 2021-03-23 西人马帝言(北京)科技有限公司 一种识别模型训练方法、装置、设备及计算机存储介质
KR20220073914A (ko) * 2020-11-27 2022-06-03 연세대학교 산학협력단 경량화 신경망을 이용한 얼굴 인식 장치 및 방법
KR20220098503A (ko) * 2021-01-04 2022-07-12 오드컨셉 주식회사 중복 이미지 검출 방법 및 장치
CN112766104A (zh) * 2021-01-07 2021-05-07 湖北公众信息产业有限责任公司 保险新零售服务平台
CN112734740B (zh) * 2021-01-18 2024-02-23 推想医疗科技股份有限公司 训练目标检测模型的方法、目标检测的方法及其装置
CN113822111B (zh) * 2021-01-19 2024-05-24 北京京东振世信息技术有限公司 人群检测模型训练方法、装置以及人群计数方法、装置
KR102444495B1 (ko) * 2021-01-21 2022-09-19 순천향대학교 산학협력단 영상 인식 검출기 및 그 동작방법
CN112861671B (zh) * 2021-01-27 2022-10-21 电子科技大学 一种对深度伪造人脸图像和视频的鉴别方法
US20220237682A1 (en) * 2021-01-27 2022-07-28 Adobe Inc. Scalable architecture for recommendation
CN112890572B (zh) * 2021-02-07 2021-08-17 广州一盒科技有限公司 一种食材烹调智能控制系统及方法
CN112884040B (zh) * 2021-02-19 2024-04-30 北京小米松果电子有限公司 训练样本数据的优化方法、系统、存储介质及电子设备
CN112733808B (zh) * 2021-02-22 2025-08-22 深圳市商汤科技有限公司 模型训练与图像处理方法、装置、电子设备和存储介质
CN113057647B (zh) * 2021-03-25 2022-04-22 山东省人工智能研究院 一种心电信号的质量评估方法
CN115204381A (zh) * 2021-03-26 2022-10-18 北京三快在线科技有限公司 弱监督模型训练方法及装置、电子设备
CN113221655B (zh) * 2021-04-12 2022-09-30 重庆邮电大学 基于特征空间约束的人脸欺骗检测方法
CN113129337B (zh) * 2021-04-14 2022-07-19 桂林电子科技大学 背景感知跟踪方法、计算机可读存储介质及计算机设备
CN113239975B (zh) * 2021-04-21 2022-12-20 国网甘肃省电力公司白银供电公司 一种基于神经网络的目标检测方法和装置
CN113139462A (zh) * 2021-04-23 2021-07-20 杭州魔点科技有限公司 无监督的人脸图像质量评估方法、电子设备和存储介质
CN113192646B (zh) * 2021-04-25 2024-03-22 北京易华录信息技术股份有限公司 目标检测模型构建方法及不同目标间距离监控方法、装置
US12131489B2 (en) * 2021-05-26 2024-10-29 Nec Corporation Semi-automatic data collection and association for multi-camera tracking
CN113326773A (zh) * 2021-05-28 2021-08-31 北京百度网讯科技有限公司 识别模型训练方法、识别方法、装置、设备及存储介质
CN113191461B (zh) * 2021-06-29 2021-09-17 苏州浪潮智能科技有限公司 一种图片识别方法、装置、设备及可读存储介质
CN113673357A (zh) * 2021-07-27 2021-11-19 浙江大华技术股份有限公司 停车场寻车方法、设备及存储介质
CN114141298B (zh) * 2021-08-27 2025-08-01 浪潮电子信息产业股份有限公司 一种磁盘故障检测方法、装置、系统及可读存储介质
CN113807237B (zh) * 2021-09-15 2022-11-08 河南星环众志信息科技有限公司 活体检测模型的训练、活体检测方法、计算机设备及介质
CN114255377B (zh) * 2021-12-02 2025-11-18 青岛图灵科技有限公司 一种智能货柜的差异商品检测分类方法
CN114495228A (zh) * 2022-01-26 2022-05-13 北京百度网讯科技有限公司 人脸检测器的训练方法及装置、设备、介质和产品
CN114743665A (zh) * 2022-03-21 2022-07-12 平安科技(深圳)有限公司 患病风险估计网络的优化方法、装置、介质及设备
CN115937929A (zh) * 2022-10-26 2023-04-07 深圳须弥云图空间科技有限公司 针对难例样本的人脸识别模型的训练方法及装置
CN115661909B (zh) * 2022-12-14 2024-09-17 深圳大学 人脸图像处理方法、设备及计算机可读存储介质
CN117218697A (zh) * 2023-07-21 2023-12-12 宏龙科技(杭州)有限公司 一种基于目标检测算法的多分类人脸检测方法和模型
CN117609842A (zh) * 2023-11-30 2024-02-27 安徽大学 一种基于元学习的细胞分类方法
CN121353919B (zh) * 2025-12-16 2026-03-13 南昌大学 一种桥梁表观损伤检测方法及系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101231702A (zh) * 2008-01-25 2008-07-30 华中科技大学 一种分类器集成方法
CN102663370A (zh) * 2012-04-23 2012-09-12 苏州大学 一种人脸识别的方法及系统
CN104063865A (zh) * 2014-06-27 2014-09-24 小米科技有限责任公司 分类模型创建方法、图像分割方法及相关装置
CN104680121A (zh) * 2013-11-27 2015-06-03 腾讯科技(深圳)有限公司 一种人脸图像的处理方法及装置
US20170046563A1 (en) * 2015-08-10 2017-02-16 Samsung Electronics Co., Ltd. Method and apparatus for face recognition
CN106682734A (zh) * 2016-12-30 2017-05-17 中国科学院深圳先进技术研究院 一种提升卷积神经网络泛化能力的方法及装置

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6219142B1 (en) * 1997-10-17 2001-04-17 Southwest Sciences Incorporated Method and apparatus for determining wave characteristics from wave phenomena
JPH11161786A (ja) * 1997-11-25 1999-06-18 Toshiba Corp パターン認識方法および記録媒体
US6466685B1 (en) * 1998-07-14 2002-10-15 Kabushiki Kaisha Toshiba Pattern recognition apparatus and method
KR100729273B1 (ko) * 2005-02-04 2007-06-15 오병주 Pca와 역전파 알고리즘을 이용한 얼굴인식 방법
US7471378B2 (en) * 2005-06-30 2008-12-30 Dbm Optical Technologies, Inc. Method and system for determining a polarization dependent characteristics of optical and opto-electrical devices
JP5207870B2 (ja) 2008-08-05 2013-06-12 日立コンピュータ機器株式会社 次元削減方法、パターン認識用辞書生成装置、及びパターン認識装置
CN103229208A (zh) * 2011-01-20 2013-07-31 日本电气株式会社 图像处理系统、图像处理方法和图像处理程序
US10462450B2 (en) * 2014-04-28 2019-10-29 Autodesk, Inc. Combining two-dimensional images with depth data to detect junctions or edges
CN106326815B (zh) * 2015-06-30 2019-09-13 芋头科技(杭州)有限公司 一种人脸图像识别方法
CN105069430B (zh) * 2015-08-05 2016-09-14 杭州南江机器人股份有限公司 一种基于msnrd特征的多姿态人脸检测器的设计方法
CN106485230B (zh) * 2016-10-18 2019-10-25 中国科学院重庆绿色智能技术研究院 基于神经网络的人脸检测模型的训练、人脸检测方法及系统
CN108985135A (zh) * 2017-06-02 2018-12-11 腾讯科技(深圳)有限公司 一种人脸检测器训练方法、装置及电子设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101231702A (zh) * 2008-01-25 2008-07-30 华中科技大学 一种分类器集成方法
CN102663370A (zh) * 2012-04-23 2012-09-12 苏州大学 一种人脸识别的方法及系统
CN104680121A (zh) * 2013-11-27 2015-06-03 腾讯科技(深圳)有限公司 一种人脸图像的处理方法及装置
CN104063865A (zh) * 2014-06-27 2014-09-24 小米科技有限责任公司 分类模型创建方法、图像分割方法及相关装置
US20170046563A1 (en) * 2015-08-10 2017-02-16 Samsung Electronics Co., Ltd. Method and apparatus for face recognition
CN106682734A (zh) * 2016-12-30 2017-05-17 中国科学院深圳先进技术研究院 一种提升卷积神经网络泛化能力的方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3633549A4 *

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7230736B2 (ja) 2018-09-10 2023-03-01 富士通株式会社 ニューラルネットワークアーキテクチャ探索装置と方法及びコンピュータ可読記憶媒体
JP2020042796A (ja) * 2018-09-10 2020-03-19 富士通株式会社 ニューラルネットワークアーキテクチャ探索装置と方法及びコンピュータ可読記憶媒体
CN111325223A (zh) * 2018-12-13 2020-06-23 中国电信股份有限公司 深度学习模型的训练方法、装置和计算机可读存储介质
CN111325223B (zh) * 2018-12-13 2023-10-24 中国电信股份有限公司 深度学习模型的训练方法、装置和计算机可读存储介质
CN111477212A (zh) * 2019-01-04 2020-07-31 阿里巴巴集团控股有限公司 内容识别、模型训练、数据处理方法、系统及设备
CN111477212B (zh) * 2019-01-04 2023-10-24 阿里巴巴集团控股有限公司 内容识别、模型训练、数据处理方法、系统及设备
US12314342B2 (en) 2019-03-26 2025-05-27 Huawei Technologies Co., Ltd. Object recognition method and apparatus
EP3933693A4 (en) * 2019-03-26 2022-05-04 Huawei Technologies Co., Ltd. OBJECT RECOGNITION METHOD AND APPARATUS
CN110033332A (zh) * 2019-04-23 2019-07-19 杭州智趣智能信息技术有限公司 一种人脸识别方法、系统及电子设备和存储介质
CN111814553A (zh) * 2020-06-08 2020-10-23 浙江大华技术股份有限公司 人脸检测方法、模型的训练方法及其相关装置
CN112949855B (zh) * 2021-02-26 2023-08-25 平安科技(深圳)有限公司 人脸识别模型训练方法、识别方法、装置、设备及介质
CN112949855A (zh) * 2021-02-26 2021-06-11 平安科技(深圳)有限公司 人脸识别模型训练方法、识别方法、装置、设备及介质
CN113221530A (zh) * 2021-04-19 2021-08-06 杭州火石数智科技有限公司 一种基于circle loss的文本相似度匹配方法、装置、计算机设备和储存介质
CN113221530B (zh) * 2021-04-19 2024-02-13 杭州火石数智科技有限公司 一种文本相似度匹配方法、装置、计算机设备和储存介质
CN116152871A (zh) * 2021-11-18 2023-05-23 北京眼神智能科技有限公司 卷积神经网络训练和人脸检测方法、装置、介质及设备
CN115601300A (zh) * 2022-09-07 2023-01-13 上海致景信息科技有限公司(Cn) 一种坯布缺陷模型的快速训练方法、系统、介质及计算机

Also Published As

Publication number Publication date
US20210089752A1 (en) 2021-03-25
EP3633549A4 (en) 2021-03-10
KR102236046B1 (ko) 2021-04-02
US20190251333A1 (en) 2019-08-15
TW201832134A (zh) 2018-09-01
JP6855098B2 (ja) 2021-04-07
JP2020501238A (ja) 2020-01-16
CN110490177A (zh) 2019-11-22
TWI665613B (zh) 2019-07-11
EP3633549B1 (en) 2024-10-30
CN108985135A (zh) 2018-12-11
US11594070B2 (en) 2023-02-28
MA48806A (fr) 2020-04-08
KR20190116397A (ko) 2019-10-14
US10929644B2 (en) 2021-02-23
EP3633549A1 (en) 2020-04-08

Similar Documents

Publication Publication Date Title
US11594070B2 (en) Face detection training method and apparatus, and electronic device
CN111126482B (zh) 一种基于多分类器级联模型的遥感影像自动分类方法
CN106485230B (zh) 基于神经网络的人脸检测模型的训练、人脸检测方法及系统
WO2020114378A1 (zh) 视频水印的识别方法、装置、设备及存储介质
US20160224903A1 (en) Hyper-parameter selection for deep convolutional networks
CN112150821A (zh) 轻量化车辆检测模型构建方法、系统及装置
WO2019114147A1 (zh) 图像美学处理方法及电子设备
WO2019114523A1 (zh) 分类训练方法、服务器及存储介质
CN110651300A (zh) 物体检测装置、物体检测方法、以及程序
CN106203521B (zh) 基于差异图自步学习的sar图像变化检测方法
CN113673592B (zh) 样本选择方法及装置、分类器训练方法及装置
CN109903339B (zh) 一种基于多维融合特征的视频群体人物定位检测方法
CN110889421A (zh) 目标物检测方法及装置
CN116912796A (zh) 一种基于新型动态级联YOLOv8的自动驾驶目标识别方法及装置
CN111815582A (zh) 改进背景先验和前景先验的二维码区域检测方法
CN116758457A (zh) 目标检测方法、装置、设备及介质
CN115862087B (zh) 基于可靠性建模的无监督行人重识别方法及系统
CN109461166A (zh) 一种基于kcf混合mfo的快速运动目标跟踪方法
CN117152806A (zh) 跨域人脸表情识别方法、系统、设备及存储介质
CN114648753A (zh) 基于Faster R-CNN的自然场景文本检测算法
CN114067429A (zh) 动作识别处理方法、装置及设备
KR101133225B1 (ko) 자세 추정을 이용한 얼굴 인식 시스템 및 방법
CN116091831B (zh) 一种为目标模型进行场景适配的方法和系统
CN116958720B (zh) 目标检测模型的训练方法、目标检测方法、装置及设备
CN117235580A (zh) 样本类型检测、类别置信度确定模型生成方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18810647

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019525952

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20197026337

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2018810647

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2018810647

Country of ref document: EP

Effective date: 20200102