WO2021012526A1 - Face recognition model training method, face recognition method and apparatus, device, and storage medium - Google Patents

Face recognition model training method, face recognition method and apparatus, device, and storage medium Download PDF

Info

Publication number
WO2021012526A1
WO2021012526A1 PCT/CN2019/118461 CN2019118461W WO2021012526A1 WO 2021012526 A1 WO2021012526 A1 WO 2021012526A1 CN 2019118461 W CN2019118461 W CN 2019118461W WO 2021012526 A1 WO2021012526 A1 WO 2021012526A1
Authority
WO
WIPO (PCT)
Prior art keywords
face recognition
image
output
network
feature extraction
Prior art date
Application number
PCT/CN2019/118461
Other languages
French (fr)
Chinese (zh)
Inventor
姚旭峰
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021012526A1 publication Critical patent/WO2021012526A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification

Definitions

  • This application relates to the field of biometrics, and in particular to a method for training a face recognition model, a face recognition method, device, equipment and storage medium.
  • Face recognition technology refers to the recognition of the position of a face in a picture or a video through a face recognition model.
  • the existing face recognition model mainly adopts the transfer learning method for training to accelerate the training speed.
  • a classification layer is often added after the presentation layer of the network. Because the parameter distributions of the presentation layer and the classification layer are inconsistent, there is a problem that gradient explosions are prone to occur, resulting in poor model stability.
  • This application provides a face recognition model training method, face recognition method, device, equipment and storage medium.
  • the method can increase the speed of face recognition and avoid gradients caused by inconsistent parameter distributions between the feature extraction network and the classification network
  • the problem of explosion improves the stability of the model.
  • this application provides a method for training a face recognition model, the method including:
  • this application also provides a face recognition method, which includes:
  • first prompt information for prompting the user to successfully recognize the image to be recognized is displayed.
  • the present application also provides a training device for a face recognition model, the training device includes:
  • the feature training unit is used to train a preset convolutional neural network according to the first sample image to construct a feature extraction network
  • a network connection unit configured to establish a connection between the feature extraction network and a preset classification network to obtain a first convolutional neural network model
  • the classification training unit is configured to iteratively train the classification network in the first convolutional neural network model according to the second sample image to adjust the weight parameters of the classification network in the first convolutional neural network model , Thereby obtaining the second convolutional neural network model;
  • a network unfreezing unit configured to unfreeze the weight parameters of the feature extraction network of the second convolutional neural network model
  • the model training unit is used to train the thawed second convolutional neural network model according to the third sample image to obtain the face recognition model.
  • the present application also provides a face recognition device, which includes:
  • the image recognition unit is used to obtain the image to be recognized
  • the image input unit is configured to input the image to be recognized into a preset face recognition model to obtain a face recognition result, and the face recognition model is determined by the face recognition according to any one of claims 1-5 Trained by the training method of the model;
  • the first information display unit is configured to, if the face recognition result indicates that the image to be recognized is successfully recognized, display first prompt information for prompting the user to successfully recognize the image to be recognized.
  • the present application also provides a computer device, the computer device includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and execute the The computer program implements the above-mentioned face recognition model training method.
  • the present application also provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, the processor realizes the aforementioned face recognition The training method of the model.
  • This application discloses a method, device, device and storage medium for training a face recognition model.
  • a preset convolutional neural network is trained according to the first sample image information to construct a feature extraction network;
  • the feature extraction network establishes a connection with the preset classification network to obtain the first convolutional neural network model; freezes the weight parameters of the feature extraction network of the first convolutional neural network model; according to the second sample image information, the
  • the classification network in the first convolutional neural network model performs iterative training to obtain the second convolutional neural network model; unfreezes the weight parameters of the feature extraction network of the second convolutional neural network model; according to the third sample image information, Training the thawed second convolutional neural network model to obtain the face recognition model.
  • FIG. 1 is a schematic flowchart of a method for training a face recognition model provided by an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a method for training a face recognition model provided by another embodiment of the present application
  • FIG. 3 is a schematic flowchart of sub-steps of a method for training a face recognition model provided by an embodiment in FIG. 2;
  • FIG. 4 is a schematic flowchart of the sub-steps of the method for training a face recognition model provided in another embodiment of FIG. 2;
  • FIG. 5 is a schematic flowchart of sub-steps of the training method of the face recognition model in FIG. 2;
  • Fig. 6 is a schematic flowchart of a method for training a face recognition model provided by still another embodiment of the present application.
  • FIG. 7 is a schematic flowchart of a face recognition method provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of an application scenario of a face recognition method provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of an application scenario of a face recognition method provided by another embodiment of the present application.
  • FIG. 10 is a schematic block diagram of a training device for a face recognition model provided by an embodiment of the present application.
  • FIG. 11 is a schematic block diagram of an apparatus for training a face recognition model provided by another embodiment of the present application.
  • FIG. 12 is a schematic block diagram of a subunit of a training device for a face recognition model provided by an embodiment of the present application.
  • FIG. 13 is a schematic block diagram of a face recognition device provided by an embodiment of the present application.
  • FIG. 14 is a schematic block diagram of the structure of a computer device according to an embodiment of the application.
  • the embodiments of the present application provide a method for training a face recognition model, a face recognition method, device, equipment, and storage medium.
  • the training method of the face recognition model can be used to train the face recognition model, which can increase the speed of face recognition and avoid the problem of gradient explosion caused by the inconsistent parameter distribution of the face recognition model, thereby improving the stability of the face recognition model.
  • FIG. 1 is a schematic flowchart of steps of a method for training a face recognition model according to an embodiment of the present application.
  • the face recognition model training method is used to train the face recognition model to avoid the problem of gradient explosion caused by the inconsistent parameter distribution of the face recognition model, thereby improving the stability of the model.
  • the training method of the face recognition model specifically includes: step S110 to step S160.
  • the first sample image is an image collected in advance.
  • the pre-collected image can be a directly collected image or an image obtained from a video.
  • the position of the face in the first sample image is marked as the first true label.
  • the feature extraction network is used to extract image features from the image of the input feature extraction network.
  • the feature extraction network can include a number of convolutional layers. Of course, the pooling layer may or may not be included. After the image is input to the feature extraction network, each convolutional layer in the feature extraction network performs convolution processing on the input image layer by layer, and the last convolution layer in the feature extraction network outputs the image features of the input image.
  • the feature extraction network includes five convolutional layers
  • the first convolutional layer conv1 includes 96 11 ⁇ 11 convolution kernels
  • the second convolutional layer conv2 includes 256 5 ⁇ 5 convolution kernels
  • the third The convolutional layer conv3 and the fourth convolutional layer conv4 both include 384 3 ⁇ 3 convolution kernels
  • the fifth convolutional layer conv5 includes 256 3 ⁇ 3 convolution kernels.
  • the convolutional layer and the fifth convolutional layer are connected to a 2 ⁇ 2 pooling layer, and each layer is connected to a modified linear unit.
  • a pre-trained model such as YOLO9000 can be used as the preset convolutional neural network.
  • the method before training a preset convolutional neural network based on the first sample image information to construct a feature extraction network, the method further includes:
  • S101 Obtain a sample video, and determine a sample image set in the sample video, where the sample image set includes first sample image information, second sample image information, and third sample image information.
  • a camera can be used to collect sample video on the target task. After the camera collects the sample video, the terminal or the server can obtain the sample video and determine the sample image set in the sample video.
  • the sample image set may be divided into at least three subsets, which are a first image subset, a second image subset, and a third image subset.
  • the first image subset is a set of first sample image information.
  • the second image subset is a set of second sample image information.
  • the third image subset is a set of third sample image information.
  • the determining the sample image set in the sample video includes:
  • S1011a Perform framing processing on the sample video to obtain several single-frame images.
  • the sample video is composed of successive pictures, and each picture is a frame.
  • S1011b If there is a face image in the single frame image, perform wavelet threshold denoising processing on the single frame image.
  • denoising processing is performed on a single frame image with a face image to effectively remove noise and reduce the influence of noise generated by the imaging device and the external environment, thereby improving the quality of the sample image set.
  • the method further includes: judging whether there is a face image in each single frame image.
  • the judging whether there is a face image in each single frame image specifically includes: detecting whether there is a position of a key part of the face in each single frame image; if there is a preset in each single frame image For key parts of the face, it is determined that there is a face image in each of the single frame images; if there is no preset key part of the face in each of the single frame images, it is determined that there is no face image in each of the single frame images.
  • a single frame image without a face image is removed to ensure that all the sample images in the sample image set have face images, thereby improving the effectiveness of the sample image set.
  • the first sample image information may be an original image directly collected by an image collection device such as a camera.
  • training a preset convolutional neural network according to the first sample image information to construct a feature extraction network specifically includes:
  • S1012a Acquire first original image information, second original image information, and third original image information.
  • the first original image information, the second original image information, and the third original image information are images directly collected in advance, and may also be images obtained in advance from a video.
  • S1012b If there is a face image in the first original image information, perform wavelet threshold denoising processing on the first original image information to obtain first sample image information.
  • denoising processing is performed on the first original image information with the face image to effectively remove noise and reduce the influence of noise generated by the imaging device and the external environment, thereby improving the quality of the first sample image information.
  • the method further includes: determining whether there is a face image in the first original image information.
  • the judging whether there is a face image in the first original image information specifically includes: detecting whether there is a position of a key part of the face in the first original image information; if each of the first original image information exists Preset key parts of the face, and determine that there is a face image in the first original image information; if the preset key parts of the face do not exist in the first original image information, it is determined that there is no face image in the first original image information. If there is no face image in the first original image information, remove the first original image information to ensure that the first sample image information has a face image, thereby improving the validity of the first sample image information .
  • S1012c If there is a face image in the second original image information, perform wavelet threshold denoising processing on the second original image information to obtain second sample image information.
  • denoising processing is performed on the second original image information with the face image to effectively remove noise and reduce the influence of noise generated by the imaging device and the external environment, thereby improving the quality of the second sample image information.
  • the method further includes: determining whether there is a face image in the second original image information.
  • the judging whether there is a face image in the second original image information specifically includes: detecting whether there is a position of a key part of the face in the second original image information; if each of the second original image information exists Preset key parts of the face, and determine that there is a face image in the second original image information; if the preset key parts of the face do not exist in the second original image information, determine that there is no face image in the second original image information. If there is no face image in the second original image information, the second original image information is removed to ensure that the second sample image information has a face image, thereby improving the effectiveness of the second sample image information.
  • S1012d If there is a face image in the third original image information, perform wavelet threshold denoising processing on the third original image information to obtain third sample image information.
  • denoising processing is performed on the third original image information with the face image to effectively remove noise and reduce the influence of noise generated by the imaging device and the external environment, thereby improving the quality of the third sample image information.
  • the method further includes: determining whether there is a face image in the third original image information.
  • the judging whether there is a face image in the third original image information specifically includes: detecting whether there is a position of a key part of the face in the third original image information; if each of the third original image information exists Presetting the key parts of the face, and determining that there is a face image in the third original image information; if the preset key parts of the face do not exist in the third original image information, it is determined that there is no face image in the third original image information. If there is no face image in the third original image information, remove the third original image information to ensure that all the third sample image information has a face image, thereby improving the effectiveness of the third sample image information.
  • a preset classification network is added after the feature extraction network, and the output of the feature extraction network is used as the input of the classification network, so that the feature extraction network establishes a connection with the classification network to obtain The first convolutional neural network model.
  • the classification network includes a convolutional layer, a fully connected layer, and a classifier that are sequentially connected.
  • the step S120 to establish a connection between the feature extraction network and the preset classification network specifically includes sub-step S121, sub-step S122, and sub-step S123.
  • Sub-step S121 input the output of the feature extraction network to the convolutional layer.
  • the output of the feature extraction network can be input to the convolutional layer of the classification network.
  • Sub-step S122 input the output of the convolutional layer to the fully connected layer, so as to reduce the dimensionality of the output of the convolutional layer.
  • the output of the convolutional layer of the classification network is input to the fully connected layer of the classification network, so that the dimensionality of the output of the convolutional layer is reduced.
  • the inputting the output of the convolutional layer to the fully connected layer to reduce the dimensionality of the output of the convolutional layer includes:
  • the weight calculation formula Based on the weight calculation formula, a fully connected layer operation is performed on each feature value of the output of the convolution layer to reduce the dimensionality of the output of the convolution layer; the weight calculation formula is:
  • the loss function is the mean square error MSE function
  • W represents the weight of the convolutional layer
  • W i represents the ith weight of the convolutional layer
  • h represents the bias of the convolutional layer
  • h i represents the ith bias of the convolutional layer
  • X represents the entire sample image set
  • X(i) represents the first true label corresponding to the i-th sample image
  • represents the learning efficiency of the back propagation algorithm.
  • a fully connected layer operation is performed on each feature value of the output of the convolutional layer through a backpropagation algorithm, thereby reducing the dimensionality of the output of the convolutional layer.
  • S123 Use the classifier to classify the output of the fully connected layer to establish a connection between the feature extraction network and the classification network.
  • the method before establishing a connection between the feature extraction network and a preset classification network to obtain the first convolutional neural network model, the method further includes:
  • the weight parameter of the feature extraction network is composed of the weight parameters of each layer of the feature extraction network, that is, each layer of the feature extraction network has a weight parameter, and the set of weight parameters of each layer forms the weight parameter of the feature extraction network.
  • the method before establishing a connection between the feature extraction network and a preset classification network to obtain the first convolutional neural network model, the method further includes:
  • S103 Determine whether the error value between the output of the feature extraction network and the first real tag is less than a first preset threshold.
  • the position of the target sample face in the first sample image is labeled as the first real label.
  • the first preset threshold can be set according to actual needs, for example, set to 0.01.
  • step S120 is executed, that is, the feature extraction network is connected to the preset classification network .
  • step S110 If the error value between the output of the feature extraction network and the first real label is greater than or equal to the first preset threshold, return to step S110 and continue to train the preset convolutional neural network until all The error value between the output of the feature extraction network and the first real tag is less than the first preset threshold.
  • S130 Freeze the weight parameters of the feature extraction network of the first convolutional neural network model.
  • the first The weight parameters of the feature extraction network of the convolutional neural network model will not change accordingly.
  • S140 Perform iterative training on the classification network in the first convolutional neural network model according to the second sample image to obtain a second convolutional neural network model.
  • the second sample image is a pre-collected image including the target sample face.
  • the pre-collected image can be a directly collected image or an image obtained from a video.
  • step S150 before the unfreezing the weight parameters of the feature extraction network of the second convolutional neural network model, further includes:
  • S104 Determine whether the error value between the output of the classification network of the second convolutional neural network model and the second real label is less than a second preset threshold.
  • the target sample face region in the second sample image is labeled as the second real label.
  • the second preset threshold can be set according to actual needs, for example, set to 0.005.
  • step S150 is executed, that is, the second convolutional neural network is unfreezed
  • the features of the network model extract the weight parameters of the network.
  • step S140 If the error value between the output of the classification network of the second convolutional neural network model and the second real label is greater than or equal to the second preset threshold, return to step S140 and continue to compare the first volume
  • the classification network in the product neural network model is iteratively trained until the error value between the output of the classification network of the second convolutional neural network model and the second true label is less than the second preset threshold.
  • the third sample image is a pre-collected image including the target sample face.
  • the pre-collected image can be a directly collected image or an image obtained from a video.
  • the feature extraction network and the classification network of the thawed second convolutional neural network are jointly trained according to the third sample image, so as to improve the performance of the second convolutional neural network.
  • the weight parameters of the feature extraction network and the weight parameters of the classification network are jointly adjusted until convergence, and a face recognition model is obtained.
  • the weight parameters of the feature extraction training network and the weight parameters of the classification network are determined, so as to determine all the parameters of the face recognition model, and obtain the Face recognition model. Specifically, the face area in the third sample image is labeled to obtain the third true label.
  • the aforementioned method for training a face recognition model is to train a preset convolutional neural network according to the first sample image information to construct a feature extraction network; establish a connection between the feature extraction network and the preset classification network, To obtain the first convolutional neural network model; freeze the weight parameters of the feature extraction network of the first convolutional neural network model; perform the classification network in the first convolutional neural network model according to the second sample image information Iterative training to obtain the second convolutional neural network model; unfreeze the weight parameters of the feature extraction network of the second convolutional neural network model; perform processing on the thawed second convolutional neural network model according to the third sample image information Training to obtain the face recognition model.
  • the weight parameter update of the face recognition model is smoother during training, so that the face recognition model is more robust. At the same time, it is easy to reach the optimal value in the process of backpropagation update parameters, which improves the stability of the model.
  • FIG. 8 is a schematic flowchart of steps of a face recognition method according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of an application scenario of a face recognition method provided by an embodiment of the present application.
  • the face recognition method can be applied to a system including terminal devices 310 and 320, network 330 and server 340.
  • the network 340 is used to provide a medium of communication links between the terminal devices 310 and 320 and the server 340.
  • the network 330 may include various connection types, such as wired, wireless communication links, or fiber optic cables.
  • the user can use the terminal devices 310 and 320 to interact with the server 340 via the network 330 to receive or send request instructions and the like.
  • Various communication client applications such as image processing applications, web browser applications, search applications, instant messaging tools, etc., may be installed on the terminal devices 310 and 320.
  • the terminal devices 310 and 320 may be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and so on.
  • the server 340 may be a server that provides various services, for example, a background management server that provides support for teaching websites browsed by users using the terminal devices 310 and 320.
  • the background management server can analyze and process the received product information query request and other data, and feed back the processing result to the terminal devices 310 and 320.
  • the face recognition method specifically includes: step 210 to step 230.
  • the image to be recognized includes a face target to be recognized, which may be a visible light image, such as an image in an RGB (Red Green Blue) mode.
  • a visible light image such as an image in an RGB (Red Green Blue) mode.
  • the aforementioned image to be recognized may also be a near infrared (Near Infrared, NIR) image.
  • the execution subject of this embodiment may be installed with a camera for collecting visible light images and a camera for collecting near-infrared images.
  • the user can select the camera to be turned on, and then use the selected camera to take a picture (using a self-portrait of the user's head or face) to obtain the image to be recognized.
  • the image to be recognized After the image to be recognized is obtained, the image to be recognized can be input to a pre-trained face recognition model to obtain a face recognition result.
  • the preset face recognition model is a face recognition model obtained by training using the training method of the aforementioned face recognition model.
  • the terminal device may display first prompt information for prompting the user to successfully recognize the image to be recognized. For example, the character string "Recognition passed" is displayed.
  • step S230 if the result of the face recognition indicates that the face to be recognized is successfully recognized.
  • the image after displaying the first prompt information for prompting the user to successfully recognize the image to be recognized, further includes:
  • the execution subject may display second prompt information for prompting the user to reacquire the image to be recognized. For example, the character string "Please reacquire the image" is displayed.
  • the user's characteristic information may be pre-stored in the terminal device, and the pre-stored characteristic information may be extracted from the face image uploaded by the user during registration.
  • the terminal device may use the feature information extracted from the image to be recognized using the aforementioned face recognition model as the face recognition result. If the face recognition result does not match the pre-stored feature information (for example, the similarity is less than a certain predetermined Set the value), then it can be determined that the recognition of the image to be recognized fails.
  • the face recognition model can use the image to be detected.
  • the extracted feature information is quite different from the pre-stored feature information. At this time, the face recognition result may indicate that the image to be recognized cannot be recognized.
  • the aforementioned face recognition method may be used to perform face recognition login.
  • the camera of the terminal device can collect the face image of the user to be logged in, and compare the face image of the user to be logged in with the facial images of all users who have registered on the teaching application platform or teaching website to control the user log in.
  • the face image of the user to be logged in can be used as the image to be recognized.
  • the image to be recognized can be preprocessed.
  • the preprocessing process here may include a face image alignment process.
  • the face alignment process mainly includes face detection, face key point positioning, and then the detected face key points in all images are as close as possible to the preset face key point positions, and finally the person is cut out from the image Face area and adjust the resolution of the face area to a predetermined size, such as 224 ⁇ 224. Next, you can perform specific operations on the preprocessed image to be recognized.
  • the face recognition method described above obtains an image to be recognized; inputs the image to be recognized into a preset face recognition model to obtain a face recognition result; if the face recognition result indicates that the image to be recognized is successfully recognized, Display the first prompt message for prompting the user to successfully recognize the image to be recognized.
  • This method can quickly recognize the face of the image to be recognized, and at the same time has the advantages of high recognition accuracy.
  • FIG. 10 is a schematic block diagram of an apparatus for training a face recognition model provided by an embodiment of the present application.
  • the training apparatus for a face recognition model may be configured in a server for performing any of the foregoing The training method of face recognition model.
  • the training device 300 for a face recognition model includes:
  • the feature training unit 310 is configured to train a preset convolutional neural network according to the first sample image to construct a feature extraction network
  • the network connection unit 320 is configured to connect the feature extraction network with a preset classification network to obtain a first convolutional neural network model
  • the parameter freezing unit 330 is configured to freeze the weight parameters of the feature extraction network of the first convolutional neural network model
  • the classification training unit 340 is configured to perform iterative training on the classification network in the first convolutional neural network model according to the second sample image to perform weight parameters of the classification network in the first convolutional neural network model Adjust to obtain the second convolutional neural network model;
  • the network unfreezing unit 350 is configured to unfreeze the weight parameters of the feature extraction network of the second convolutional neural network model
  • the model training unit 360 is configured to train the thawed second convolutional neural network model according to the third sample image to obtain the face recognition model.
  • the training device 300 for the face recognition model further includes an output judgment unit 370 for judging whether the error value between the output of the feature extraction network and the first real label is smaller than the first true label.
  • a preset threshold for judging whether the error value between the output of the feature extraction network and the first real label is smaller than the first true label.
  • the network connection unit 320 is specifically configured to establish the feature extraction network and the classification network if the error value between the output of the feature extraction network and the first real label is less than the first preset threshold Connected to obtain the first convolutional neural network model.
  • the classification network includes a convolutional layer, a fully connected layer, and a classifier that are sequentially connected.
  • the network connection unit 320 includes a convolution input subunit 321, a connection input subunit 322, and a classification processing subunit 323.
  • the convolution input subunit 321 is configured to input the output of the feature extraction network to the convolution layer;
  • connection input subunit 322 is configured to input the output of the convolutional layer to the fully connected layer, so as to reduce the dimensionality of the output of the convolutional layer;
  • the classification processing subunit 323 is configured to use the classifier to classify the output of the fully connected layer to establish a connection between the feature extraction network and the classification network.
  • connection input subunit 322 is specifically configured to perform a fully connected layer operation on each feature value of the output of the convolutional layer based on a weight calculation formula, so as to perform a calculation on the output of the convolutional layer. Dimensionality reduction.
  • the weight calculation formula is:
  • the loss function is the mean square error MSE function
  • W represents the weight of the convolutional layer
  • W i represents the ith weight of the convolutional layer
  • h represents the bias of the convolutional layer
  • h i represents the ith bias of the convolutional layer
  • X represents the entire sample image set
  • X(i) represents the first true label corresponding to the i-th sample image
  • represents the learning efficiency of the back propagation algorithm.
  • FIG. 13 is a schematic block diagram of a face recognition device according to an embodiment of the present application, and the face recognition device is used to perform any of the aforementioned methods for training a face recognition model.
  • the face recognition device can be configured in a server or a terminal.
  • the face recognition device 400 includes: an image acquisition unit 410, an image input unit 420, and an information display unit 430.
  • the image acquisition unit 410 is configured to acquire an image to be recognized
  • the image input unit 420 is configured to input the image to be recognized into a preset face recognition model to obtain a face recognition result;
  • the information display unit 430 is configured to display first prompt information for prompting the user to successfully recognize the image to be recognized if the face recognition result indicates that the image to be recognized is successfully recognized.
  • the above-mentioned apparatus can be implemented in the form of a computer program, and the computer program can be run on the computer device as shown in FIG. 14.
  • FIG. 14 is a schematic block diagram of a computer device according to an embodiment of the present application.
  • the computer equipment can be a server or a terminal.
  • the computer device includes a processor, a memory, and a network interface connected through a system bus, where the memory may include a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium can store an operating system and a computer program.
  • the computer program includes program instructions.
  • the processor can execute a method for training a face recognition model.
  • the processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
  • the internal memory provides an environment for the operation of the computer program in the non-volatile storage medium.
  • the processor can execute a method for training a face recognition model.
  • the network interface is used for network communication, such as sending assigned tasks.
  • the network interface is used for network communication, such as sending assigned tasks.
  • FIG. 14 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • the processor may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), and application specific integrated circuits (Application Specific Integrated Circuits). Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor.
  • the processor is used to run a computer program stored in the memory to implement the following steps:
  • the processor before the processor realizes the establishment of the connection between the feature extraction network and the preset classification network to obtain the first convolutional neural network model, the processor is configured to realize:
  • the processor realizes the connection between the feature extraction network and the preset classification network to obtain the first convolutional neural network model, it is used to realize:
  • the classification network includes a convolutional layer, a fully connected layer, and a classifier that are sequentially connected.
  • the processor realizes the establishment of the connection between the feature extraction network and the preset classification network, it is used to realize:
  • the output of the fully connected layer is classified to establish a connection between the feature extraction network and the classification network.
  • the processor when the processor implements the input of the output of the convolutional layer to the fully connected layer to reduce the dimensionality of the output of the convolutional layer, the processor is used to implement:
  • a fully connected layer operation is performed on each feature value of the output of the convolutional layer, so as to reduce the dimensionality of the output of the convolutional layer.
  • the weight calculation formula is:
  • the loss function is the mean square error MSE function
  • W represents the weight of the convolutional layer
  • W i represents the ith weight of the convolutional layer
  • h represents the bias of the convolutional layer
  • h i represents the ith bias of the convolutional layer
  • X represents the entire sample image set
  • X(i) represents the first true label corresponding to the i-th sample image
  • represents the learning efficiency of the back propagation algorithm.
  • the processor is used to run a computer program stored in the memory to implement the following steps:
  • the embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes program instructions, and the processor executes the program instructions to implement the present application Any one of face recognition model training methods or face recognition methods provided in the embodiments.
  • the computer-readable storage medium may be the internal storage unit of the computer device described in the foregoing embodiment, such as the hard disk or memory of the computer device.
  • the computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SMC), or a secure digital (Secure Digital, SD) equipped on the computer device. ) Card, Flash Card, etc.

Abstract

A face recognition model training method, a face recognition method and apparatus, a device, and a storage medium. The method comprises: training a preset convolutional neural network; establishing connection between a feature extraction network and a classification network; freezing a weight parameter of the feature extraction network; performing iterative training on the classification network; unfreezing a weight parameter of a feature extraction network of a second convolutional neural network model; and training the unfrozen second convolutional neural network model to obtain a face recognition model.

Description

人脸识别模型的训练方法、人脸识别方法、装置、设备及存储介质Training method, face recognition method, device, equipment and storage medium of face recognition model
本申请要求于2019年07月22日提交中国专利局、申请号为201910663230.9、发明名称为“人脸识别模型的训练方法、人脸识别方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of a Chinese patent application submitted to the Chinese Patent Office on July 22, 2019, with the application number 201910663230.9 and the invention title "Face Recognition Model Training Method, Face Recognition Method, Device, Equipment and Storage Medium" Right, the entire contents of which are incorporated in this application by reference.
技术领域Technical field
本申请涉及生物识别领域,尤其涉及一种人脸识别模型的训练方法、人脸识别方法、装置、设备及存储介质。This application relates to the field of biometrics, and in particular to a method for training a face recognition model, a face recognition method, device, equipment and storage medium.
背景技术Background technique
近年来,以人脸为代表的生物特征检测识别广泛应用于身份辨认、智慧教育等诸多领域。人脸识别技术,是指通过人脸识别模型识别出一张图片或一段视频中人脸的位置。现有的人脸识别模型主要采用迁移学习的方法进行训练,以加快训练速度。在迁移过程中,往往在网络的表示层后加上分类层。由于表示层与分类层的参数分布不一致,因而存在容易出现梯度爆炸,致使模型稳定性较差的问题。In recent years, biometric detection and recognition represented by human faces have been widely used in many fields such as identity recognition and wisdom education. Face recognition technology refers to the recognition of the position of a face in a picture or a video through a face recognition model. The existing face recognition model mainly adopts the transfer learning method for training to accelerate the training speed. In the migration process, a classification layer is often added after the presentation layer of the network. Because the parameter distributions of the presentation layer and the classification layer are inconsistent, there is a problem that gradient explosions are prone to occur, resulting in poor model stability.
发明内容Summary of the invention
本申请提供了一种人脸识别模型的训练方法、人脸识别方法、装置、设备及存储介质,该方法能够提高人脸识别速度,避免特征提取网络与分类网络之间的参数分布不一致导致梯度爆炸的问题,提高模型的稳定性。This application provides a face recognition model training method, face recognition method, device, equipment and storage medium. The method can increase the speed of face recognition and avoid gradients caused by inconsistent parameter distributions between the feature extraction network and the classification network The problem of explosion improves the stability of the model.
第一方面,本申请提供了一种人脸识别模型的训练方法,所述方法包括:In the first aspect, this application provides a method for training a face recognition model, the method including:
根据第一样本图像信息,对预设的卷积神经网络进行训练,以构建特征提取网络;According to the image information of the first sample, train a preset convolutional neural network to construct a feature extraction network;
将所述特征提取网络与预设的分类网络建立连接,以得到第一卷积神经网络模型;Establishing a connection between the feature extraction network and a preset classification network to obtain a first convolutional neural network model;
冻结所述第一卷积神经网络模型的特征提取网络的权重参数;Freezing the weight parameters of the feature extraction network of the first convolutional neural network model;
根据第二样本图像信息,对所述第一卷积神经网络模型中的分类网络进行迭代训练,以得到第二卷积神经网络模型;Performing iterative training on the classification network in the first convolutional neural network model according to the second sample image information to obtain a second convolutional neural network model;
解冻所述第二卷积神经网络模型的特征提取网络的权重参数;Unfreeze the weight parameters of the feature extraction network of the second convolutional neural network model;
根据第三样本图像信息,对解冻后的第二卷积神经网络模型进行训练,以得到所述人脸识别模型。According to the third sample image information, train the thawed second convolutional neural network model to obtain the face recognition model.
第二方面,本申请还提供一种人脸识别方法,所述方法包括:In the second aspect, this application also provides a face recognition method, which includes:
获取待识别图像;Obtain the image to be recognized;
将所述待识别图像输入预设的人脸识别模型,以得到人脸识别结果,所述人脸识别模型由如上所述的人脸识别模型的训练方法训练得到的;Inputting the to-be-recognized image into a preset face recognition model to obtain a face recognition result, the face recognition model being trained by the above-mentioned face recognition model training method;
若所述人脸识别结果指示成功识别所述待识别图像,显示用于提示用户成功识别所述待识别图像的第一提示信息。If the face recognition result indicates that the image to be recognized is successfully recognized, first prompt information for prompting the user to successfully recognize the image to be recognized is displayed.
第三方面,本申请还提供一种人脸识别模型的训练装置,所述训练装置包括:In a third aspect, the present application also provides a training device for a face recognition model, the training device includes:
特征训练单元,用于根据第一样本图像,对预设的卷积神经网络进行训练,以构建特征提取网络;The feature training unit is used to train a preset convolutional neural network according to the first sample image to construct a feature extraction network;
网络连接单元,用于将所述特征提取网络与预设的分类网络建立连接,以得到第一卷积 神经网络模型;A network connection unit, configured to establish a connection between the feature extraction network and a preset classification network to obtain a first convolutional neural network model;
参数冻结单元,用于冻结所述第一卷积神经网络模型的特征提取网络的权重参数;A parameter freezing unit for freezing the weight parameters of the feature extraction network of the first convolutional neural network model;
分类训练单元,用于根据第二样本图像,对所述第一卷积神经网络模型中的分类网络进行迭代训练,以对所述第一卷积神经网络模型中的分类网络的权重参数进行调整,从而得到第二卷积神经网络模型;The classification training unit is configured to iteratively train the classification network in the first convolutional neural network model according to the second sample image to adjust the weight parameters of the classification network in the first convolutional neural network model , Thereby obtaining the second convolutional neural network model;
网络解冻单元,用于解冻所述第二卷积神经网络模型的特征提取网络的权重参数;A network unfreezing unit, configured to unfreeze the weight parameters of the feature extraction network of the second convolutional neural network model;
模型训练单元,用于根据第三样本图像,对解冻后的第二卷积神经网络模型进行训练,以得到所述人脸识别模型。The model training unit is used to train the thawed second convolutional neural network model according to the third sample image to obtain the face recognition model.
第四方面,本申请还提供一种人脸识别装置,所述装置包括:In a fourth aspect, the present application also provides a face recognition device, which includes:
图像识别单元,用于获取待识别图像;The image recognition unit is used to obtain the image to be recognized;
图像输入单元,用于将所述待识别图像输入预设的人脸识别模型,以得到人脸识别结果,所述人脸识别模型由如权利要求1-5任一项所述的人脸识别模型的训练方法训练得到的;The image input unit is configured to input the image to be recognized into a preset face recognition model to obtain a face recognition result, and the face recognition model is determined by the face recognition according to any one of claims 1-5 Trained by the training method of the model;
第一信息显示单元,用于若所述人脸识别结果指示成功识别所述待识别图像,显示用于提示用户成功识别所述待识别图像的第一提示信息。The first information display unit is configured to, if the face recognition result indicates that the image to be recognized is successfully recognized, display first prompt information for prompting the user to successfully recognize the image to be recognized.
第五方面,本申请还提供了一种计算机设备,所述计算机设备包括存储器和处理器;所述存储器用于存储计算机程序;所述处理器,用于执行所述计算机程序并在执行所述计算机程序时实现如上述的人脸识别模型的训练方法。In a fifth aspect, the present application also provides a computer device, the computer device includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and execute the The computer program implements the above-mentioned face recognition model training method.
第六方面,本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如上述的人脸识别模型的训练方法。In a sixth aspect, the present application also provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, the processor realizes the aforementioned face recognition The training method of the model.
本申请公开了一种人脸识别模型的训练方法、装置、设备及存储介质,通过根据第一样本图像信息,对预设的卷积神经网络进行训练,以构建特征提取网络;将所述特征提取网络与预设的分类网络建立连接,以得到第一卷积神经网络模型;冻结所述第一卷积神经网络模型的特征提取网络的权重参数;根据第二样本图像信息,对所述第一卷积神经网络模型中的分类网络进行迭代训练,以得到第二卷积神经网络模型;解冻所述第二卷积神经网络模型的特征提取网络的权重参数;根据第三样本图像信息,对解冻后的第二卷积神经网络模型进行训练,以得到所述人脸识别模型。从而不仅大大提高了人脸识别速度,减少了训练时间,所得到的人脸识别模型识别准确率高,而且避免了特征提取网络与分类网络之间的参数分布不一致导致梯度爆炸的问题,提高了模型的稳定性。This application discloses a method, device, device and storage medium for training a face recognition model. A preset convolutional neural network is trained according to the first sample image information to construct a feature extraction network; The feature extraction network establishes a connection with the preset classification network to obtain the first convolutional neural network model; freezes the weight parameters of the feature extraction network of the first convolutional neural network model; according to the second sample image information, the The classification network in the first convolutional neural network model performs iterative training to obtain the second convolutional neural network model; unfreezes the weight parameters of the feature extraction network of the second convolutional neural network model; according to the third sample image information, Training the thawed second convolutional neural network model to obtain the face recognition model. This not only greatly improves the speed of face recognition, reduces the training time, and the resultant face recognition model has a high recognition accuracy, but also avoids the problem of gradient explosion caused by the inconsistency of the parameter distribution between the feature extraction network and the classification network. The stability of the model.
附图说明Description of the drawings
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following will briefly introduce the drawings needed in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. Ordinary technicians can obtain other drawings based on these drawings without creative work.
图1是本申请一实施例提供的人脸识别模型的训练方法的示意流程图;FIG. 1 is a schematic flowchart of a method for training a face recognition model provided by an embodiment of the present application;
图2是本申请另一实施例提供的人脸识别模型的训练方法的示意流程图;2 is a schematic flowchart of a method for training a face recognition model provided by another embodiment of the present application;
图3是图2中一实施例提供的人脸识别模型的训练方法的子步骤示意流程图;FIG. 3 is a schematic flowchart of sub-steps of a method for training a face recognition model provided by an embodiment in FIG. 2;
图4是图2中另一实施例提供的人脸识别模型的训练方法的子步骤的步骤示意流程图;4 is a schematic flowchart of the sub-steps of the method for training a face recognition model provided in another embodiment of FIG. 2;
图5是图2中人脸识别模型的训练方法的子步骤的步骤示意流程图;5 is a schematic flowchart of sub-steps of the training method of the face recognition model in FIG. 2;
图6是本申请再一实施例提供的人脸识别模型的训练方法的示意流程图;Fig. 6 is a schematic flowchart of a method for training a face recognition model provided by still another embodiment of the present application;
图7是本申请一实施例提供的人脸识别方法的示意性流程图;FIG. 7 is a schematic flowchart of a face recognition method provided by an embodiment of the present application;
图8是本申请一实施例提供的一种人脸识别方法的应用场景示意图;FIG. 8 is a schematic diagram of an application scenario of a face recognition method provided by an embodiment of the present application;
图9是本申请另一实施例提供的一种人脸识别方法的应用场景示意图;FIG. 9 is a schematic diagram of an application scenario of a face recognition method provided by another embodiment of the present application;
图10是本申请的实施例提供的一种人脸识别模型的训练装置的示意性框图;FIG. 10 is a schematic block diagram of a training device for a face recognition model provided by an embodiment of the present application;
图11是本申请另一实施例提供的人脸识别模型的训练装置的示意性框图;FIG. 11 is a schematic block diagram of an apparatus for training a face recognition model provided by another embodiment of the present application;
图12是本申请实施例提供的人脸识别模型的训练装置的子单元的示意性框图;FIG. 12 is a schematic block diagram of a subunit of a training device for a face recognition model provided by an embodiment of the present application;
图13是本申请实施例提供的一种人脸识别装置的示意性框图;FIG. 13 is a schematic block diagram of a face recognition device provided by an embodiment of the present application;
图14为本申请一实施例提供的一种计算机设备的结构示意性框图。FIG. 14 is a schematic block diagram of the structure of a computer device according to an embodiment of the application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组合或部分合并,因此实际执行的顺序有可能根据实际情况改变。The flowchart shown in the drawings is merely an illustration, and does not necessarily include all contents and operations/steps, nor does it have to be executed in the described order. For example, some operations/steps can also be decomposed, combined or partially combined, so the actual execution order may be changed according to actual conditions.
本申请的实施例提供了一种人脸识别模型的训练方法、人脸识别方法、装置、设备及存储介质。人脸识别模型的训练方法可用于训练人脸识别模型,能够提高人脸识别的速度,避免人脸识别模型由于参数分布不一致导致梯度爆炸的问题,从而提高人脸识别模型的稳定性。The embodiments of the present application provide a method for training a face recognition model, a face recognition method, device, equipment, and storage medium. The training method of the face recognition model can be used to train the face recognition model, which can increase the speed of face recognition and avoid the problem of gradient explosion caused by the inconsistent parameter distribution of the face recognition model, thereby improving the stability of the face recognition model.
下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Hereinafter, some embodiments of the present application will be described in detail with reference to the accompanying drawings. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.
请参阅图1,图1是本申请一实施例提供的一种人脸识别模型的训练方法的步骤示意流程图。该人脸识别模型的训练方法,用于训练人脸识别模型,避免人脸识别模型由于参数分布不一致导致梯度爆炸的问题,从而提高模型的稳定性。Please refer to FIG. 1. FIG. 1 is a schematic flowchart of steps of a method for training a face recognition model according to an embodiment of the present application. The face recognition model training method is used to train the face recognition model to avoid the problem of gradient explosion caused by the inconsistent parameter distribution of the face recognition model, thereby improving the stability of the model.
如图1所示,该人脸识别模型的训练方法,具体包括:步骤S110至步骤S160。As shown in FIG. 1, the training method of the face recognition model specifically includes: step S110 to step S160.
S110、根据第一样本图像,对预设的卷积神经网络进行训练,以构建特征提取网络。S110. Training a preset convolutional neural network according to the first sample image to construct a feature extraction network.
具体的,第一样本图像是预先采集的图像。预先采集的图像可以是直接采集的图像,也可以是从视频中获取的图像。对第一样本图像中的人脸的位置进行了标注,作为第一真实标签。Specifically, the first sample image is an image collected in advance. The pre-collected image can be a directly collected image or an image obtained from a video. The position of the face in the first sample image is marked as the first true label.
其中,特征提取网络用于从输入特征提取网络的图像提取图像特征。该特征提取网络可以包括若干数目的卷积层。当然,也可以包括池化层,也可以不包括池化层。在图像输入特征提取网络后,特征提取网络中的每一个卷积层逐层对输入的图像进行卷积处理,特征提取网络中最后一个卷积层输出该输入图像的图像特征。Among them, the feature extraction network is used to extract image features from the image of the input feature extraction network. The feature extraction network can include a number of convolutional layers. Of course, the pooling layer may or may not be included. After the image is input to the feature extraction network, each convolutional layer in the feature extraction network performs convolution processing on the input image layer by layer, and the last convolution layer in the feature extraction network outputs the image features of the input image.
示例性的,特征提取网络包括五层卷积层,第一卷积层conv1包括96个11×11的卷积核,第二卷积层conv2包括256个5×5的卷积核,第三卷积层conv3和第四卷积层conv4均包括384个3×3的卷积核,第五卷积层conv5包括256个3×3的卷积核,其中,第一卷积层、第二卷积层和第五卷积层后连接2×2池化层,每一层后均连接有一个修正线性单元。Exemplarily, the feature extraction network includes five convolutional layers, the first convolutional layer conv1 includes 96 11×11 convolution kernels, the second convolutional layer conv2 includes 256 5×5 convolution kernels, and the third The convolutional layer conv3 and the fourth convolutional layer conv4 both include 384 3×3 convolution kernels, and the fifth convolutional layer conv5 includes 256 3×3 convolution kernels. Among them, the first convolutional layer and the second convolutional layer The convolutional layer and the fifth convolutional layer are connected to a 2×2 pooling layer, and each layer is connected to a modified linear unit.
示例性的,可以采用YOLO9000等预先训练好的模型作为预设的卷积神经网络。Exemplarily, a pre-trained model such as YOLO9000 can be used as the preset convolutional neural network.
如图2所示,在一个实施例中,所述根据第一样本图像信息,对预设的卷积神经网络进行训练,以构建特征提取网络之前,还包括:As shown in FIG. 2, in one embodiment, before training a preset convolutional neural network based on the first sample image information to construct a feature extraction network, the method further includes:
S101、获取样本视频,确定所述样本视频中的样本图像集,所述样本图像集包括第一样本图像信息、第二样本图像信息和第三样本图像信息。S101. Obtain a sample video, and determine a sample image set in the sample video, where the sample image set includes first sample image information, second sample image information, and third sample image information.
具体地,可以通过摄像头对目标任务进行样本视频采集。摄像头采集样本视频后,终端或服务器可以获取该样本视频,确定所述样本视频中的样本图像集。Specifically, a camera can be used to collect sample video on the target task. After the camera collects the sample video, the terminal or the server can obtain the sample video and determine the sample image set in the sample video.
示例性的,可以将样本图像集分为至少三个子集,分别为第一图像子集、第二图像子集和第三图像子集。所述第一图像子集为第一样本图像信息的集合。所述第二图像子集为第二样本图像信息的集合。所述第三图像子集为第三样本图像信息的集合。Exemplarily, the sample image set may be divided into at least three subsets, which are a first image subset, a second image subset, and a third image subset. The first image subset is a set of first sample image information. The second image subset is a set of second sample image information. The third image subset is a set of third sample image information.
如图3所示,在一实施例中,所述确定所述样本视频中的样本图像集,包括:As shown in FIG. 3, in an embodiment, the determining the sample image set in the sample video includes:
S1011a、对所述样本视频进行分帧处理,以得到若干单帧图像。S1011a. Perform framing processing on the sample video to obtain several single-frame images.
具体地,所述样本视频是由一张张连续的图片组成的,每幅图片为一帧。Specifically, the sample video is composed of successive pictures, and each picture is a frame.
S1011b、若所述单帧图像中存在人脸图像,对所述单帧图像进行小波阀值去噪处理。S1011b: If there is a face image in the single frame image, perform wavelet threshold denoising processing on the single frame image.
具体的,对具有人脸图像的单帧图像进行去噪处理,有效去除噪声,减少成像设备与外部环境所产生的噪声的影响,从而提高样本图像集的质量。Specifically, denoising processing is performed on a single frame image with a face image to effectively remove noise and reduce the influence of noise generated by the imaging device and the external environment, thereby improving the quality of the sample image set.
在一实施例中,步骤S1011b之前还包括:判断各所述单帧图像中是否存在人脸图像。具体的,所述判断各所述单帧图像中是否存在人脸图像,具体包括:检测各所述单帧图像中是否存在人脸关键部位的位置;若各所述单帧图像中存在预设人脸关键部位,判定各所述单帧图像中存在人脸图像;若各所述单帧图像中不存在预设人脸关键部位,判定各所述单帧图像中不存在人脸图像。In an embodiment, before step S1011b, the method further includes: judging whether there is a face image in each single frame image. Specifically, the judging whether there is a face image in each single frame image specifically includes: detecting whether there is a position of a key part of the face in each single frame image; if there is a preset in each single frame image For key parts of the face, it is determined that there is a face image in each of the single frame images; if there is no preset key part of the face in each of the single frame images, it is determined that there is no face image in each of the single frame images.
S1011c、若所述单帧图像中不存在人脸图像,去除所述单帧图像。S1011c. If there is no face image in the single frame image, remove the single frame image.
具体的,去除不具有人脸图像的单帧图像,保证样本图像集中的样本图像均具有人脸图像,从而提高样本图像集的有效性。Specifically, a single frame image without a face image is removed to ensure that all the sample images in the sample image set have face images, thereby improving the effectiveness of the sample image set.
在另一实施例中,第一样本图像信息可以为摄像头等图像采集装置直接采集到的原始图像。如图4所示,在该实施例中,所述根据第一样本图像信息,对预设的卷积神经网络进行训练,以构建特征提取网络,具体包括:In another embodiment, the first sample image information may be an original image directly collected by an image collection device such as a camera. As shown in FIG. 4, in this embodiment, training a preset convolutional neural network according to the first sample image information to construct a feature extraction network specifically includes:
S1012a、获取第一原始图像信息、第二原始图像信息和第三原始图像信息。S1012a. Acquire first original image information, second original image information, and third original image information.
具体的,第一原始图像信息、第二原始图像信息和第三原始图像信息是预先直接采集的图像,也可以是预先从视频中获取的图像。Specifically, the first original image information, the second original image information, and the third original image information are images directly collected in advance, and may also be images obtained in advance from a video.
S1012b、若所述第一原始图像信息中存在人脸图像,对所述第一原始图像信息进行小波阀值去噪处理,以得到第一样本图像信息。S1012b: If there is a face image in the first original image information, perform wavelet threshold denoising processing on the first original image information to obtain first sample image information.
具体的,对具有人脸图像的第一原始图像信息进行去噪处理,有效去除噪声,减少成像设备与外部环境所产生的噪声的影响,从而提高第一样本图像信息的质量。Specifically, denoising processing is performed on the first original image information with the face image to effectively remove noise and reduce the influence of noise generated by the imaging device and the external environment, thereby improving the quality of the first sample image information.
在一实施例中,步骤S1012b之前还包括:判断所述第一原始图像信息中是否存在人脸图像。具体的,所述判断所述第一原始图像信息中是否存在人脸图像,具体包括:检测第一原始图像信息中是否存在人脸关键部位的位置;若各所述第一原始图像信息中存在预设人脸关键部位,判定第一原始图像信息中存在人脸图像;若第一原始图像信息中不存在预设人脸关键部位,判定第一原始图像信息中不存在人脸图像。若所述第一原始图像信息中不存在人脸图像,去除所述第一原始图像信息,保证所述第一样本图像信息均具有人脸图像,从而提高第一样本图像信息的有效性。In an embodiment, before step S1012b, the method further includes: determining whether there is a face image in the first original image information. Specifically, the judging whether there is a face image in the first original image information specifically includes: detecting whether there is a position of a key part of the face in the first original image information; if each of the first original image information exists Preset key parts of the face, and determine that there is a face image in the first original image information; if the preset key parts of the face do not exist in the first original image information, it is determined that there is no face image in the first original image information. If there is no face image in the first original image information, remove the first original image information to ensure that the first sample image information has a face image, thereby improving the validity of the first sample image information .
S1012c、若所述第二原始图像信息中存在人脸图像,对所述第二原始图像信息进行小波阀值去噪处理,以得到第二样本图像信息。S1012c: If there is a face image in the second original image information, perform wavelet threshold denoising processing on the second original image information to obtain second sample image information.
具体的,对具有人脸图像的第二原始图像信息进行去噪处理,有效去除噪声,减少成像设备与外部环境所产生的噪声的影响,从而提高第二样本图像信息的质量。Specifically, denoising processing is performed on the second original image information with the face image to effectively remove noise and reduce the influence of noise generated by the imaging device and the external environment, thereby improving the quality of the second sample image information.
在一实施例中,步骤S1012c之前还包括:判断所述第二原始图像信息中是否存在人脸图像。具体的,所述判断所述第二原始图像信息中是否存在人脸图像,具体包括:检测第二原始图像信息中是否存在人脸关键部位的位置;若各所述第二原始图像信息中存在预设人脸关键部位,判定第二原始图像信息中存在人脸图像;若第二原始图像信息中不存在预设人脸关键部位,判定第二原始图像信息中不存在人脸图像。若所述第二原始图像信息中不存在人脸图像,去除所述第二原始图像信息,保证所述第二样本图像信息均具有人脸图像,从而提高第二样本图像信息的有效性。In an embodiment, before step S1012c, the method further includes: determining whether there is a face image in the second original image information. Specifically, the judging whether there is a face image in the second original image information specifically includes: detecting whether there is a position of a key part of the face in the second original image information; if each of the second original image information exists Preset key parts of the face, and determine that there is a face image in the second original image information; if the preset key parts of the face do not exist in the second original image information, determine that there is no face image in the second original image information. If there is no face image in the second original image information, the second original image information is removed to ensure that the second sample image information has a face image, thereby improving the effectiveness of the second sample image information.
S1012d、若所述第三原始图像信息中存在人脸图像,对所述第三原始图像信息进行小波阀值去噪处理,以得到第三样本图像信息。S1012d: If there is a face image in the third original image information, perform wavelet threshold denoising processing on the third original image information to obtain third sample image information.
具体的,对具有人脸图像的第三原始图像信息进行去噪处理,有效去除噪声,减少成像设备与外部环境所产生的噪声的影响,从而提高第三样本图像信息的质量。Specifically, denoising processing is performed on the third original image information with the face image to effectively remove noise and reduce the influence of noise generated by the imaging device and the external environment, thereby improving the quality of the third sample image information.
在一实施例中,步骤S1012d之前还包括:判断所述第三原始图像信息中是否存在人脸图 像。具体的,所述判断所述第三原始图像信息中是否存在人脸图像,具体包括:检测第三原始图像信息中是否存在人脸关键部位的位置;若各所述第三原始图像信息中存在预设人脸关键部位,判定第三原始图像信息中存在人脸图像;若第三原始图像信息中不存在预设人脸关键部位,判定第三原始图像信息中不存在人脸图像。若所述第三原始图像信息中不存在人脸图像,去除所述第三原始图像信息,保证所述第三样本图像信息均具有人脸图像,从而提高第三样本图像信息的有效性。In an embodiment, before step S1012d, the method further includes: determining whether there is a face image in the third original image information. Specifically, the judging whether there is a face image in the third original image information specifically includes: detecting whether there is a position of a key part of the face in the third original image information; if each of the third original image information exists Presetting the key parts of the face, and determining that there is a face image in the third original image information; if the preset key parts of the face do not exist in the third original image information, it is determined that there is no face image in the third original image information. If there is no face image in the third original image information, remove the third original image information to ensure that all the third sample image information has a face image, thereby improving the effectiveness of the third sample image information.
S120、将所述特征提取网络与预设的分类网络建立连接,以得到第一卷积神经网络模型。S120. Establish a connection between the feature extraction network and a preset classification network to obtain a first convolutional neural network model.
具体的,在所述特征提取网络之后添加预设的分类网络,将所述特征提取网络的输出作为所述分类网络的输入,从而使得所述特征提取网络与所述分类网络建立连接,进而得到第一卷积神经网络模型。Specifically, a preset classification network is added after the feature extraction network, and the output of the feature extraction network is used as the input of the classification network, so that the feature extraction network establishes a connection with the classification network to obtain The first convolutional neural network model.
示例性的,所述分类网络包括依次连接的卷积层、全连接层和分类器。如图5所示,步骤S120所述将所述特征提取网络与预设的分类网络建立连接,具体包括子步骤S121、子步骤S122和子步骤S123。Exemplarily, the classification network includes a convolutional layer, a fully connected layer, and a classifier that are sequentially connected. As shown in FIG. 5, the step S120 to establish a connection between the feature extraction network and the preset classification network specifically includes sub-step S121, sub-step S122, and sub-step S123.
子步骤S121、将所述特征提取网络的输出输入至所述卷积层。Sub-step S121: input the output of the feature extraction network to the convolutional layer.
具体的,特征提取网络在对输入图像进行处理后,可以将所述特征提取网络的输出输入到分类网络的卷积层。Specifically, after the feature extraction network processes the input image, the output of the feature extraction network can be input to the convolutional layer of the classification network.
子步骤S122、将所述卷积层的输出输入至所述全连接层,以对所述卷积层的输出进行降维。Sub-step S122: input the output of the convolutional layer to the fully connected layer, so as to reduce the dimensionality of the output of the convolutional layer.
具体的,所述分类网络的卷积层的输出输入至所述分类网络的全连接层,从而对该卷积层的输出进行降维。Specifically, the output of the convolutional layer of the classification network is input to the fully connected layer of the classification network, so that the dimensionality of the output of the convolutional layer is reduced.
其中,所述将所述卷积层的输出输入至所述全连接层,以对所述卷积层的输出进行降维,包括:Wherein, the inputting the output of the convolutional layer to the fully connected layer to reduce the dimensionality of the output of the convolutional layer includes:
基于权重计算公式,对所述卷积层的输出的每个特征值进行全连接层的运算,以对所述卷积层的输出进行降维;所述权重计算公式为:Based on the weight calculation formula, a fully connected layer operation is performed on each feature value of the output of the convolution layer to reduce the dimensionality of the output of the convolution layer; the weight calculation formula is:
Figure PCTCN2019118461-appb-000001
Figure PCTCN2019118461-appb-000001
Figure PCTCN2019118461-appb-000002
Figure PCTCN2019118461-appb-000002
Figure PCTCN2019118461-appb-000003
Figure PCTCN2019118461-appb-000003
其中,损失函数为均方差MSE函数,W表示卷积层的权重,W i表示卷积层第i个权重,h表示卷积层的偏置,h i表示卷积层第i个偏置,X表示整个样本图像集,X(i)表示第i个样本图像对应的第一真实标签;
Figure PCTCN2019118461-appb-000004
表示第i个样本图像输入分类网络后输出层的输出,η表示反向传播算法的学习效率。
Among them, the loss function is the mean square error MSE function, W represents the weight of the convolutional layer, W i represents the ith weight of the convolutional layer, h represents the bias of the convolutional layer, and h i represents the ith bias of the convolutional layer, X represents the entire sample image set, X(i) represents the first true label corresponding to the i-th sample image;
Figure PCTCN2019118461-appb-000004
Represents the output of the output layer after the i-th sample image is input to the classification network, and η represents the learning efficiency of the back propagation algorithm.
本实施例中,基于上述权重计算公式,通过反向传播算法,对所述卷积层的输出的每个特征值进行全连接层的运算,从而对所述卷积层的输出进行降维。In this embodiment, based on the above weight calculation formula, a fully connected layer operation is performed on each feature value of the output of the convolutional layer through a backpropagation algorithm, thereby reducing the dimensionality of the output of the convolutional layer.
S123、采用所述分类器对所述全连接层的输出进行分类,以建立所述特征提取网络与所述分类网络的连接。S123. Use the classifier to classify the output of the fully connected layer to establish a connection between the feature extraction network and the classification network.
如图6所示,所述将所述特征提取网络与预设的分类网络建立连接,以得到第一卷积神经网络模型之前,还包括:As shown in FIG. 6, before establishing a connection between the feature extraction network and a preset classification network to obtain the first convolutional neural network model, the method further includes:
S102、确定所述特征提取网络的权重参数。S102. Determine a weight parameter of the feature extraction network.
具体的,特征提取网络的权重参数由特征提取网络的各层的权重参数构成,即特征提取网络的每一层都具有权重参数,各层的权重参数的集合形成该特征提取网络的权重参数。Specifically, the weight parameter of the feature extraction network is composed of the weight parameters of each layer of the feature extraction network, that is, each layer of the feature extraction network has a weight parameter, and the set of weight parameters of each layer forms the weight parameter of the feature extraction network.
如图6所示,所述将所述特征提取网络与预设的分类网络建立连接,以得到第一卷积神经网络模型之前,还包括:As shown in FIG. 6, before establishing a connection between the feature extraction network and a preset classification network to obtain the first convolutional neural network model, the method further includes:
S103、判断所述特征提取网络的输出与第一真实标签之间的误差值是否小于第一预设阀值。S103: Determine whether the error value between the output of the feature extraction network and the first real tag is less than a first preset threshold.
具体的,对第一样本图像中的目标样本人脸的位置进行标注,作为第一真实标签。第一预设阀值可以根据实际需求进行设置,例如设置为0.01。Specifically, the position of the target sample face in the first sample image is labeled as the first real label. The first preset threshold can be set according to actual needs, for example, set to 0.01.
其中,若所述特征提取网络的输出与所述第一真实标签之间的误差值小于所述第一预设阀值,执行步骤S120,即将所述特征提取网络与预设的分类网络建立连接。Wherein, if the error value between the output of the feature extraction network and the first real tag is less than the first preset threshold, step S120 is executed, that is, the feature extraction network is connected to the preset classification network .
若所述特征提取网络的输出与所述第一真实标签之间的误差值大于等于所述第一预设阀值,返回执行步骤S110,继续对预设的卷积神经网络进行训练,直至所述特征提取网络的输出与所述第一真实标签之间的误差值小于所述第一预设阀值。If the error value between the output of the feature extraction network and the first real label is greater than or equal to the first preset threshold, return to step S110 and continue to train the preset convolutional neural network until all The error value between the output of the feature extraction network and the first real tag is less than the first preset threshold.
S130、冻结所述第一卷积神经网络模型的特征提取网络的权重参数。S130: Freeze the weight parameters of the feature extraction network of the first convolutional neural network model.
具体的,将所述第一卷积神经网络模型的特征提取网络的权重参数冻结后,将包括目标人脸的图像信息输入该冻结后的第一卷积神经网络模型进行训练时,该第一卷积神经网络模型的特征提取网络的权重参数不会随之改变。Specifically, after freezing the weight parameters of the feature extraction network of the first convolutional neural network model, when the image information including the target face is input into the frozen first convolutional neural network model for training, the first The weight parameters of the feature extraction network of the convolutional neural network model will not change accordingly.
S140、根据第二样本图像,对所述第一卷积神经网络模型中的分类网络进行迭代训练,以得到第二卷积神经网络模型。S140: Perform iterative training on the classification network in the first convolutional neural network model according to the second sample image to obtain a second convolutional neural network model.
具体的,第二样本图像是预先采集的包括目标样本人脸的图像。预先采集的图像可以是直接采集的图像,也可以是从视频中获取的图像。Specifically, the second sample image is a pre-collected image including the target sample face. The pre-collected image can be a directly collected image or an image obtained from a video.
S150、解冻所述第二卷积神经网络模型的特征提取网络的权重参数。S150. Unfreeze the weight parameter of the feature extraction network of the second convolutional neural network model.
如图6所示,在本实施例中,步骤S150,所述解冻所述第二卷积神经网络模型的特征提取网络的权重参数之前,还包括:As shown in FIG. 6, in this embodiment, step S150, before the unfreezing the weight parameters of the feature extraction network of the second convolutional neural network model, further includes:
S104、判断所述第二卷积神经网络模型的分类网络的输出与第二真实标签之间的误差值是否小于第二预设阀值。S104: Determine whether the error value between the output of the classification network of the second convolutional neural network model and the second real label is less than a second preset threshold.
具体的,对第二样本图像中的目标样本人脸区域进行标注,作为第二真实标签。第二预设阀值可以根据实际需求进行设置,例如设置为0.005。Specifically, the target sample face region in the second sample image is labeled as the second real label. The second preset threshold can be set according to actual needs, for example, set to 0.005.
其中,若所述第二卷积神经网络模型的分类网络的输出与第二真实标签之间的误差值小于所述第二预设阀值,执行步骤S150,即解冻所述第二卷积神经网络模型的特征提取网络的权重参数。Wherein, if the error value between the output of the classification network of the second convolutional neural network model and the second real label is less than the second preset threshold value, step S150 is executed, that is, the second convolutional neural network is unfreezed The features of the network model extract the weight parameters of the network.
若所述第二卷积神经网络模型的分类网络的输出与第二真实标签之间的误差值大于等于所述第二预设阀值,则返回执行步骤S140,继续对对所述第一卷积神经网络模型中的分类网络进行迭代训练,直至所述第二卷积神经网络模型的分类网络的输出与第二真实标签之间的误差值小于所述第二预设阀值。If the error value between the output of the classification network of the second convolutional neural network model and the second real label is greater than or equal to the second preset threshold, return to step S140 and continue to compare the first volume The classification network in the product neural network model is iteratively trained until the error value between the output of the classification network of the second convolutional neural network model and the second true label is less than the second preset threshold.
S160、根据第三样本图像,对解冻后的第二卷积神经网络模型进行训练,以得到所述人脸识别模型。S160. Training the thawed second convolutional neural network model according to the third sample image to obtain the face recognition model.
具体的,第三样本图像是预先采集的包括目标样本人脸的图像。预先采集的图像可以是直接采集的图像,也可以是从视频中获取的图像。Specifically, the third sample image is a pre-collected image including the target sample face. The pre-collected image can be a directly collected image or an image obtained from a video.
其中,对第二卷积神经网络进行解冻后,根据所述第三样本图像对解冻后的第二卷积神经网络的特征提取网络和分类网络进行联合训练,从而对第二卷积神经网络的特征提取网络的权重参数和分类网络的权重参数进行联合调整,直至收敛,得到人脸识别模型。更为具体的,根据第二卷积神经网络模型的的输出与已标注的第三真实标签之差,不断微调特征提取训练网络的权重参数并修正分类网络的权重参数,直至第二卷积神经网络模型的的输出与已标注的第三真实标签之差小于第三预设阀值,确定特征提取训练网络的权重参数和分类网络的权重参数,从而确定人脸识别模型的全部参数,得到人脸识别模型。具体的,对第三样本图像中的人脸区域进行标注,以得到第三真实标签。Wherein, after the second convolutional neural network is thawed, the feature extraction network and the classification network of the thawed second convolutional neural network are jointly trained according to the third sample image, so as to improve the performance of the second convolutional neural network. The weight parameters of the feature extraction network and the weight parameters of the classification network are jointly adjusted until convergence, and a face recognition model is obtained. More specifically, according to the difference between the output of the second convolutional neural network model and the labeled third real label, continuously fine-tune the weight parameters of the feature extraction training network and modify the weight parameters of the classification network until the second convolutional neural network The difference between the output of the network model and the labeled third real label is less than the third preset threshold, the weight parameters of the feature extraction training network and the weight parameters of the classification network are determined, so as to determine all the parameters of the face recognition model, and obtain the Face recognition model. Specifically, the face area in the third sample image is labeled to obtain the third true label.
上述人脸识别模型的训练方法,通过根据第一样本图像信息,对预设的卷积神经网络进 行训练,以构建特征提取网络;将所述特征提取网络与预设的分类网络建立连接,以得到第一卷积神经网络模型;冻结所述第一卷积神经网络模型的特征提取网络的权重参数;根据第二样本图像信息,对所述第一卷积神经网络模型中的分类网络进行迭代训练,以得到第二卷积神经网络模型;解冻所述第二卷积神经网络模型的特征提取网络的权重参数;根据第三样本图像信息,对解冻后的第二卷积神经网络模型进行训练,以得到所述人脸识别模型。从而不仅大大提高了人脸识别速度,减少了训练时间,所得到的人脸识别模型识别准确率高,而且避免了特征提取网络与分类网络之间的参数分布不一致导致梯度爆炸的问题,因而使得该人脸识别模型在训练时权重参数更新更为平滑,从而使该人脸识别模型更为鲁棒,同时在反向传播更新参数过程中容易达到最优值,提高了模型的稳定性。The aforementioned method for training a face recognition model is to train a preset convolutional neural network according to the first sample image information to construct a feature extraction network; establish a connection between the feature extraction network and the preset classification network, To obtain the first convolutional neural network model; freeze the weight parameters of the feature extraction network of the first convolutional neural network model; perform the classification network in the first convolutional neural network model according to the second sample image information Iterative training to obtain the second convolutional neural network model; unfreeze the weight parameters of the feature extraction network of the second convolutional neural network model; perform processing on the thawed second convolutional neural network model according to the third sample image information Training to obtain the face recognition model. This not only greatly improves the speed of face recognition, reduces the training time, and the resultant face recognition model has a high recognition accuracy, but also avoids the problem of gradient explosion caused by the inconsistency of the parameter distribution between the feature extraction network and the classification network. The weight parameter update of the face recognition model is smoother during training, so that the face recognition model is more robust. At the same time, it is easy to reach the optimal value in the process of backpropagation update parameters, which improves the stability of the model.
请参阅图8,图8是本申请一实施例提供的一种人脸识别方法的步骤示意流程图。请参阅图9,图9是本申请一实施例提供的一种人脸识别方法的应用场景示意图。其中,该人脸识别方法可以应用于包括终端设备310、320,网络330和服务器340的系统中。Please refer to FIG. 8, which is a schematic flowchart of steps of a face recognition method according to an embodiment of the present application. Please refer to FIG. 9, which is a schematic diagram of an application scenario of a face recognition method provided by an embodiment of the present application. Among them, the face recognition method can be applied to a system including terminal devices 310 and 320, network 330 and server 340.
网络340用以在终端设备310、320和服务器340之间提供通信链路的介质。网络330可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。The network 340 is used to provide a medium of communication links between the terminal devices 310 and 320 and the server 340. The network 330 may include various connection types, such as wired, wireless communication links, or fiber optic cables.
用户可以使用终端设备310、320通过网络330与服务器340交互,以接收或发送请求指令等。终端设备310、320上可以安装有各种通讯客户端应用,例如图片处理应用、网页浏览器应用、搜索类应用、即时通信工具等。The user can use the terminal devices 310 and 320 to interact with the server 340 via the network 330 to receive or send request instructions and the like. Various communication client applications, such as image processing applications, web browser applications, search applications, instant messaging tools, etc., may be installed on the terminal devices 310 and 320.
终端设备310、320可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。The terminal devices 310 and 320 may be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and so on.
服务器340可以是提供各种服务的服务器,例如对用户利用终端设备310、320所浏览的教学网站提供支持的后台管理服务器。后台管理服务器可以对接收到的产品信息查询请求等数据进行分析等处理,并将处理结果反馈给终端设备310、320。The server 340 may be a server that provides various services, for example, a background management server that provides support for teaching websites browsed by users using the terminal devices 310 and 320. The background management server can analyze and process the received product information query request and other data, and feed back the processing result to the terminal devices 310 and 320.
如图8所示,该人脸识别方法,具体包括:步骤210至步骤230。As shown in FIG. 8, the face recognition method specifically includes: step 210 to step 230.
S210、获取待识别图像。S210: Acquire an image to be recognized.
具体的,所述待识别图像为包括待识别人脸目标,其可以为可见光图像,比如RGB(Red Green Blue,红绿蓝)模式的图像。当然上述待识别图像也可以为近红外(Near Infrared,NIR)图像。Specifically, the image to be recognized includes a face target to be recognized, which may be a visible light image, such as an image in an RGB (Red Green Blue) mode. Of course, the aforementioned image to be recognized may also be a near infrared (Near Infrared, NIR) image.
本实施例的执行主体可以安装有用于采集可见光图像的摄像头和用于采集近红外图像的摄像头。用户可以选择需开启的摄像头,进而利用所选择的摄像头进行拍摄(利用进行用户头部或者脸部的自拍),得到待识别图像。The execution subject of this embodiment may be installed with a camera for collecting visible light images and a camera for collecting near-infrared images. The user can select the camera to be turned on, and then use the selected camera to take a picture (using a self-portrait of the user's head or face) to obtain the image to be recognized.
S220、将所述待识别图像输入预设的人脸识别模型,以得到人脸识别结果。S220. Input the image to be recognized into a preset face recognition model to obtain a face recognition result.
在获取到待识别图像后,可以将该待识别图像输入至预先训练的人脸识别模型,得到人脸识别结果。其中,预设的人脸识别模型为采用前述人脸识别模型的训练方法训练得到的人脸识别模型。After the image to be recognized is obtained, the image to be recognized can be input to a pre-trained face recognition model to obtain a face recognition result. Wherein, the preset face recognition model is a face recognition model obtained by training using the training method of the aforementioned face recognition model.
S230、若所述人脸识别结果指示成功识别所述待识别图像,显示用于提示用户成功识别所述待识别图像的第一提示信息。S230: If the face recognition result indicates that the image to be recognized is successfully recognized, display first prompt information for prompting the user to successfully recognize the image to be recognized.
具体的,若终端设备确定人脸识别结果指示成功识别待识别图像,则该终端设备可以显示用于提示用户成功识别所述待识别图像的第一提示信息。例如,显示字符串“识别通过”。Specifically, if the terminal device determines that the face recognition result indicates that the image to be recognized is successfully recognized, the terminal device may display first prompt information for prompting the user to successfully recognize the image to be recognized. For example, the character string "Recognition passed" is displayed.
如图9所示,为了进一步提高待识别图像中的目标人脸的识别的准确性和提高人脸识别的灵活性,步骤S230,所述若所述人脸识别结果指示成功识别所述待识别图像,显示用于提示用户成功识别所述待识别图像的第一提示信息之后,还包括:As shown in FIG. 9, in order to further improve the accuracy of recognition of the target face in the image to be recognized and the flexibility of face recognition, step S230, if the result of the face recognition indicates that the face to be recognized is successfully recognized The image, after displaying the first prompt information for prompting the user to successfully recognize the image to be recognized, further includes:
S240、若所述人脸识别结果指示无法识别待识别图像,显示用于提示用户重新获取待识别图像的第二提示信息,从而在无法识别待识别图像后提示重新获取待识别图像。S240. If the face recognition result indicates that the image to be recognized cannot be recognized, display second prompt information for prompting the user to reacquire the image to be recognized, so that the image to be recognized is prompted to reacquire the image after the image to be recognized cannot be recognized.
具体的,若终端设备确定人脸识别结果指示无法识别待检测图像,则该执行主体可以显示用于提示用户重新获取待识别图像的第二提示信息。例如,显示字符串“请重新获取图像”。Specifically, if the terminal device determines that the face recognition result indicates that the image to be detected cannot be recognized, the execution subject may display second prompt information for prompting the user to reacquire the image to be recognized. For example, the character string "Please reacquire the image" is displayed.
示例性的,终端设备中可以预存有用户的特征信息,且预存的特征信息可以是从该用户 在注册时所上传的人脸图像中提取的。该终端设备可以将利用上述人脸识别模型从所述待识别图像中所提取的特征信息作为人脸识别结果,若该人脸识别结果与预存的特征信息不匹配(例如相似度小于某个预设数值),则可以确定上述待识别图像识别未通过。Exemplarily, the user's characteristic information may be pre-stored in the terminal device, and the pre-stored characteristic information may be extracted from the face image uploaded by the user during registration. The terminal device may use the feature information extracted from the image to be recognized using the aforementioned face recognition model as the face recognition result. If the face recognition result does not match the pre-stored feature information (for example, the similarity is less than a certain predetermined Set the value), then it can be determined that the recognition of the image to be recognized fails.
比如,若待识别图像中的人脸对象较为模糊,或者与用户在注册时所上传的人脸图像中的人脸对象的角度差异较大等情况下,人脸识别模型从该待检测图像中所提取的特征信息与预存的特征信息差异较大,此时,人脸识别结果可以指示无法对该待识别图像进行识别。For example, if the face object in the image to be recognized is blurry, or the angle of the face object in the face image uploaded by the user during registration is quite different, the face recognition model can use the image to be detected. The extracted feature information is quite different from the pre-stored feature information. At this time, the face recognition result may indicate that the image to be recognized cannot be recognized.
示例性的,用户登录某一教学应用平台或者教学网站时,可使用上述人脸识别方法进行人脸识别登录。具体的,终端设备的摄像头可采集待登录用户的人脸图像,并将待登录用户的人脸图像与已经注册了该教学应用平台或教学网站的所有用户的人脸图像进行对比,以控制用户登录。在该示例中,可将待登录用户的人脸图像作为待识别图像。在对待识别图像进行识别之前,可对待识别图像进行预处理。此处的预处理过程可包括人脸图像对齐过程。该人脸对齐过程主要包括人脸检测,人脸关键点定位,然后将所有图像中检测到的人脸关键点尽可能的和预设的人脸关键点位置重合,最后从图像中切割出人脸区域并将人脸区域的分辨率调整至预定大小,如224×224。接下来可对预处理后的待识别图像进行具体操作。Exemplarily, when a user logs in to a certain teaching application platform or teaching website, the aforementioned face recognition method may be used to perform face recognition login. Specifically, the camera of the terminal device can collect the face image of the user to be logged in, and compare the face image of the user to be logged in with the facial images of all users who have registered on the teaching application platform or teaching website to control the user log in. In this example, the face image of the user to be logged in can be used as the image to be recognized. Before recognizing the image to be recognized, the image to be recognized can be preprocessed. The preprocessing process here may include a face image alignment process. The face alignment process mainly includes face detection, face key point positioning, and then the detected face key points in all images are as close as possible to the preset face key point positions, and finally the person is cut out from the image Face area and adjust the resolution of the face area to a predetermined size, such as 224×224. Next, you can perform specific operations on the preprocessed image to be recognized.
上述人脸识别方法,通过获取待识别图像;将所述待识别图像输入预设的人脸识别模型,以得到人脸识别结果;若所述人脸识别结果指示成功识别所述待识别图像,显示用于提示用户成功识别所述待识别图像的第一提示信息。该方法可以快速识别待识别图像的人脸,同时又具有识别准确率高等优点。The face recognition method described above obtains an image to be recognized; inputs the image to be recognized into a preset face recognition model to obtain a face recognition result; if the face recognition result indicates that the image to be recognized is successfully recognized, Display the first prompt message for prompting the user to successfully recognize the image to be recognized. This method can quickly recognize the face of the image to be recognized, and at the same time has the advantages of high recognition accuracy.
请参阅图10,图10是本申请的实施例还提供一种人脸识别模型的训练装置的示意性框图,该人脸识别模型的训练装置可以配置于服务器中,用于执行前述任一项人脸识别模型的训练方法。Please refer to FIG. 10. FIG. 10 is a schematic block diagram of an apparatus for training a face recognition model provided by an embodiment of the present application. The training apparatus for a face recognition model may be configured in a server for performing any of the foregoing The training method of face recognition model.
如图10所示,人脸识别模型的训练装置300包括:As shown in FIG. 10, the training device 300 for a face recognition model includes:
特征训练单元310,用于根据第一样本图像,对预设的卷积神经网络进行训练,以构建特征提取网络;The feature training unit 310 is configured to train a preset convolutional neural network according to the first sample image to construct a feature extraction network;
网络连接单元320,用于将所述特征提取网络与预设的分类网络建立连接,以得到第一卷积神经网络模型;The network connection unit 320 is configured to connect the feature extraction network with a preset classification network to obtain a first convolutional neural network model;
参数冻结单元330,用于冻结所述第一卷积神经网络模型的特征提取网络的权重参数;The parameter freezing unit 330 is configured to freeze the weight parameters of the feature extraction network of the first convolutional neural network model;
分类训练单元340,用于根据第二样本图像,对所述第一卷积神经网络模型中的分类网络进行迭代训练,以对所述第一卷积神经网络模型中的分类网络的权重参数进行调整,从而得到第二卷积神经网络模型;The classification training unit 340 is configured to perform iterative training on the classification network in the first convolutional neural network model according to the second sample image to perform weight parameters of the classification network in the first convolutional neural network model Adjust to obtain the second convolutional neural network model;
网络解冻单元350,用于解冻所述第二卷积神经网络模型的特征提取网络的权重参数;The network unfreezing unit 350 is configured to unfreeze the weight parameters of the feature extraction network of the second convolutional neural network model;
模型训练单元360,用于根据第三样本图像,对解冻后的第二卷积神经网络模型进行训练,以得到所述人脸识别模型。The model training unit 360 is configured to train the thawed second convolutional neural network model according to the third sample image to obtain the face recognition model.
在一个实施例中,如图11所示,人脸识别模型的训练装置300还包括输出判断单元370,用于判断所述特征提取网络的输出与第一真实标签之间的误差值是否小于第一预设阀值。In one embodiment, as shown in FIG. 11, the training device 300 for the face recognition model further includes an output judgment unit 370 for judging whether the error value between the output of the feature extraction network and the first real label is smaller than the first true label. A preset threshold.
其中,网络连接单元320,具体用于若所述特征提取网络的输出与第一真实标签之间的误差值小于所述第一预设阀值,将所述特征提取网络与所述分类网络建立连接,以得到所述第一卷积神经网络模型。The network connection unit 320 is specifically configured to establish the feature extraction network and the classification network if the error value between the output of the feature extraction network and the first real label is less than the first preset threshold Connected to obtain the first convolutional neural network model.
如图12,在一个实施例中,所述分类网络包括依次连接的卷积层、全连接层和分类器。网络连接单元320包括卷积输入子单元321、连接输入子单元322和分类处理子单元323。As shown in Fig. 12, in one embodiment, the classification network includes a convolutional layer, a fully connected layer, and a classifier that are sequentially connected. The network connection unit 320 includes a convolution input subunit 321, a connection input subunit 322, and a classification processing subunit 323.
卷积输入子单元321,用于将所述特征提取网络的输出输入至所述卷积层;The convolution input subunit 321 is configured to input the output of the feature extraction network to the convolution layer;
连接输入子单元322,用于将所述卷积层的输出输入至所述全连接层,以对所述卷积层的输出进行降维;The connection input subunit 322 is configured to input the output of the convolutional layer to the fully connected layer, so as to reduce the dimensionality of the output of the convolutional layer;
分类处理子单元323,用于采用所述分类器对所述全连接层的输出进行分类,以建立所述特征提取网络与所述分类网络的连接。The classification processing subunit 323 is configured to use the classifier to classify the output of the fully connected layer to establish a connection between the feature extraction network and the classification network.
在一实施例中,连接输入子单元322,具体用于基于权重计算公式,对所述卷积层的输 出的每个特征值进行全连接层的运算,以对所述卷积层的输出进行降维。In an embodiment, the connection input subunit 322 is specifically configured to perform a fully connected layer operation on each feature value of the output of the convolutional layer based on a weight calculation formula, so as to perform a calculation on the output of the convolutional layer. Dimensionality reduction.
在一实施例中,所述权重计算公式为:In an embodiment, the weight calculation formula is:
Figure PCTCN2019118461-appb-000005
Figure PCTCN2019118461-appb-000005
Figure PCTCN2019118461-appb-000006
Figure PCTCN2019118461-appb-000006
Figure PCTCN2019118461-appb-000007
Figure PCTCN2019118461-appb-000007
其中,损失函数为均方差MSE函数,W表示卷积层的权重,W i表示卷积层第i个权重,h表示卷积层的偏置,h i表示卷积层第i个偏置,X表示整个样本图像集,X(i)表示第i个样本图像对应的第一真实标签;
Figure PCTCN2019118461-appb-000008
表示第i个样本图像输入分类网络后输出层的输出,η表示反向传播算法的学习效率。
Among them, the loss function is the mean square error MSE function, W represents the weight of the convolutional layer, W i represents the ith weight of the convolutional layer, h represents the bias of the convolutional layer, and h i represents the ith bias of the convolutional layer, X represents the entire sample image set, X(i) represents the first true label corresponding to the i-th sample image;
Figure PCTCN2019118461-appb-000008
Represents the output of the output layer after the i-th sample image is input to the classification network, and η represents the learning efficiency of the back propagation algorithm.
请参阅图13,图13是本申请的实施例还提供一种人脸识别装置的示意性框图,该人脸识别装置用于执行前述任一项人脸识别模型的训练方法。其中,该人脸识别装置可以配置于服务器或终端中。Please refer to FIG. 13, which is a schematic block diagram of a face recognition device according to an embodiment of the present application, and the face recognition device is used to perform any of the aforementioned methods for training a face recognition model. Wherein, the face recognition device can be configured in a server or a terminal.
如图13所示,人脸识别装置400包括:图像获取单元410、图像输入单元420和信息显示单元430。As shown in FIG. 13, the face recognition device 400 includes: an image acquisition unit 410, an image input unit 420, and an information display unit 430.
图像获取单元410,用于获取待识别图像;The image acquisition unit 410 is configured to acquire an image to be recognized;
图像输入单元420,用于将所述待识别图像输入预设的人脸识别模型,以得到人脸识别结果;The image input unit 420 is configured to input the image to be recognized into a preset face recognition model to obtain a face recognition result;
信息显示单元430,用于若所述人脸识别结果指示成功识别所述待识别图像,显示用于提示用户成功识别所述待识别图像的第一提示信息。The information display unit 430 is configured to display first prompt information for prompting the user to successfully recognize the image to be recognized if the face recognition result indicates that the image to be recognized is successfully recognized.
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的装置和各单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。It should be noted that those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the device and each unit described above can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here. Repeat.
上述的装置可以实现为一种计算机程序的形式,该计算机程序可以在如图14所示的计算机设备上运行。The above-mentioned apparatus can be implemented in the form of a computer program, and the computer program can be run on the computer device as shown in FIG. 14.
请参阅图14,图14是本申请实施例提供的一种计算机设备的示意性框图。该计算机设备可以是服务器或终端。Please refer to FIG. 14, which is a schematic block diagram of a computer device according to an embodiment of the present application. The computer equipment can be a server or a terminal.
参阅图14,该计算机设备包括通过系统总线连接的处理器、存储器和网络接口,其中,存储器可以包括非易失性存储介质和内存储器。Referring to FIG. 14, the computer device includes a processor, a memory, and a network interface connected through a system bus, where the memory may include a non-volatile storage medium and an internal memory.
非易失性存储介质可存储操作系统和计算机程序。该计算机程序包括程序指令,该程序指令被执行时,可使得处理器执行一种人脸识别模型的训练方法。The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions. When the program instructions are executed, the processor can execute a method for training a face recognition model.
处理器用于提供计算和控制能力,支撑整个计算机设备的运行。The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
内存储器为非易失性存储介质中的计算机程序的运行提供环境,该计算机程序被处理器执行时,可使得处理器执行一种人脸识别模型的训练方法。The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute a method for training a face recognition model.
该网络接口用于进行网络通信,如发送分配的任务等。本领域技术人员可以理解,图14中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。The network interface is used for network communication, such as sending assigned tasks. Those skilled in the art can understand that the structure shown in FIG. 14 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
应当理解的是,处理器可以是中央处理单元(Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列 (Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that the processor may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), and application specific integrated circuits (Application Specific Integrated Circuits). Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor.
其中,所述处理器用于运行存储在存储器中的计算机程序,以实现如下步骤:Wherein, the processor is used to run a computer program stored in the memory to implement the following steps:
根据第一样本图像信息,对预设的卷积神经网络进行训练,以构建特征提取网络;将所述特征提取网络与预设的分类网络建立连接,以得到第一卷积神经网络模型;冻结所述第一卷积神经网络模型的特征提取网络的权重参数;根据第二样本图像信息,对所述第一卷积神经网络模型中的分类网络进行迭代训练,以得到第二卷积神经网络模型;解冻所述第二卷积神经网络模型的特征提取网络的权重参数;根据第三样本图像信息,对解冻后的第二卷积神经网络模型进行训练,以得到所述人脸识别模型。Training a preset convolutional neural network according to the first sample image information to construct a feature extraction network; establishing a connection between the feature extraction network and the preset classification network to obtain a first convolutional neural network model; Freeze the weight parameters of the feature extraction network of the first convolutional neural network model; according to the second sample image information, perform iterative training on the classification network in the first convolutional neural network model to obtain the second convolutional neural network Network model; unfreeze the weight parameters of the feature extraction network of the second convolutional neural network model; according to the third sample image information, train the thawed second convolutional neural network model to obtain the face recognition model .
在一个实施例中,所述处理器在实现所述将所述特征提取网络与预设的分类网络建立连接,以得到第一卷积神经网络模型之前,用于实现:In one embodiment, before the processor realizes the establishment of the connection between the feature extraction network and the preset classification network to obtain the first convolutional neural network model, the processor is configured to realize:
判断所述特征提取网络的输出与第一真实标签之间的误差值是否小于第一预设阀值。Determine whether the error value between the output of the feature extraction network and the first real tag is less than a first preset threshold.
所述处理器在实现所述将所述特征提取网络与预设的分类网络建立连接,以得到第一卷积神经网络模型时,用于实现:When the processor realizes the connection between the feature extraction network and the preset classification network to obtain the first convolutional neural network model, it is used to realize:
若所述特征提取网络的输出与第一真实标签之间的误差值小于所述第一预设阀值,将所述特征提取网络与所述分类网络建立连接,以得到所述第一卷积神经网络模型。If the error value between the output of the feature extraction network and the first real label is less than the first preset threshold, establish a connection between the feature extraction network and the classification network to obtain the first convolution Neural network model.
在一实施例中,所述分类网络包括依次连接的卷积层、全连接层和分类器。所述处理器在实现所述将所述特征提取网络与预设的分类网络建立连接时,用于实现:In an embodiment, the classification network includes a convolutional layer, a fully connected layer, and a classifier that are sequentially connected. When the processor realizes the establishment of the connection between the feature extraction network and the preset classification network, it is used to realize:
将所述特征提取网络的输出输入至所述卷积层;将所述卷积层的输出输入至所述全连接层,以对所述卷积层的输出进行降维;采用所述分类器对所述全连接层的输出进行分类,以建立所述特征提取网络与所述分类网络的连接。Input the output of the feature extraction network to the convolutional layer; input the output of the convolutional layer to the fully connected layer to reduce the dimensionality of the output of the convolutional layer; adopt the classifier The output of the fully connected layer is classified to establish a connection between the feature extraction network and the classification network.
在一实施例中,所述处理器在实现所述将所述卷积层的输出输入至所述全连接层,以对所述卷积层的输出进行降维时,用于实现:In an embodiment, when the processor implements the input of the output of the convolutional layer to the fully connected layer to reduce the dimensionality of the output of the convolutional layer, the processor is used to implement:
基于权重计算公式,对所述卷积层的输出的每个特征值进行全连接层的运算,以对所述卷积层的输出进行降维。Based on the weight calculation formula, a fully connected layer operation is performed on each feature value of the output of the convolutional layer, so as to reduce the dimensionality of the output of the convolutional layer.
在一实施例中,所述权重计算公式为:In an embodiment, the weight calculation formula is:
Figure PCTCN2019118461-appb-000009
Figure PCTCN2019118461-appb-000009
Figure PCTCN2019118461-appb-000010
Figure PCTCN2019118461-appb-000010
Figure PCTCN2019118461-appb-000011
Figure PCTCN2019118461-appb-000011
其中,损失函数为均方差MSE函数,W表示卷积层的权重,W i表示卷积层第i个权重,h表示卷积层的偏置,h i表示卷积层第i个偏置,X表示整个样本图像集,X(i)表示第i个样本图像对应的第一真实标签;
Figure PCTCN2019118461-appb-000012
表示第i个样本图像输入分类网络后输出层的输出,η表示反向传播算法的学习效率。
Among them, the loss function is the mean square error MSE function, W represents the weight of the convolutional layer, W i represents the ith weight of the convolutional layer, h represents the bias of the convolutional layer, and h i represents the ith bias of the convolutional layer, X represents the entire sample image set, X(i) represents the first true label corresponding to the i-th sample image;
Figure PCTCN2019118461-appb-000012
Represents the output of the output layer after the i-th sample image is input to the classification network, and η represents the learning efficiency of the back propagation algorithm.
其中,在另一实施例中,所述处理器用于运行存储在存储器中的计算机程序,以实现如下步骤:Wherein, in another embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:
获取待识别图像;将所述待识别图像输入预设的人脸识别模型,以得到人脸识别结果;若所述人脸识别结果指示成功识别所述待识别图像,显示用于提示用户成功识别所述待识别图像的第一提示信息。Obtain the image to be recognized; input the image to be recognized into a preset face recognition model to obtain a face recognition result; if the face recognition result indicates that the image to be recognized is successfully recognized, a display is used to prompt the user to successfully recognize the image The first prompt information of the image to be recognized.
本申请的实施例中还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计 算机程序,所述计算机程序中包括程序指令,所述处理器执行所述程序指令,实现本申请实施例提供的任一项人脸识别模型的训练方法或人脸识别方法。The embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes program instructions, and the processor executes the program instructions to implement the present application Any one of face recognition model training methods or face recognition methods provided in the embodiments.
其中,所述计算机可读存储介质可以是前述实施例所述的计算机设备的内部存储单元,例如所述计算机设备的硬盘或内存。所述计算机可读存储介质也可以是所述计算机设备的外部存储设备,例如所述计算机设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。The computer-readable storage medium may be the internal storage unit of the computer device described in the foregoing embodiment, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SMC), or a secure digital (Secure Digital, SD) equipped on the computer device. ) Card, Flash Card, etc.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Anyone familiar with the technical field can easily think of various equivalents within the technical scope disclosed in this application. Modifications or replacements, these modifications or replacements shall be covered within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Claims (20)

  1. 一种人脸识别模型的训练方法,包括:A method for training a face recognition model, including:
    根据第一样本图像信息,对预设的卷积神经网络进行训练,以构建特征提取网络;According to the image information of the first sample, train a preset convolutional neural network to construct a feature extraction network;
    判断所述特征提取网络的输出与第一真实标签之间的误差值是否小于第一预设阀值;Judging whether the error value between the output of the feature extraction network and the first real tag is less than a first preset threshold;
    若所述特征提取网络的输出与第一真实标签之间的误差值小于所述第一预设阀值,将所述特征提取网络的输出输入至分类网络的卷积层;If the error value between the output of the feature extraction network and the first real label is less than the first preset threshold, input the output of the feature extraction network to the convolutional layer of the classification network;
    将所述卷积层的输出输入至所述分类网络的全连接层,以对所述卷积层的输出进行降维;Inputting the output of the convolutional layer to the fully connected layer of the classification network to reduce the dimensionality of the output of the convolutional layer;
    采用所述分类网络的分类器对所述全连接层的输出进行分类,以建立所述特征提取网络与所述分类网络的连接,从而得到所述第一卷积神经网络模型;Use the classifier of the classification network to classify the output of the fully connected layer to establish a connection between the feature extraction network and the classification network, thereby obtaining the first convolutional neural network model;
    冻结所述第一卷积神经网络模型的特征提取网络的权重参数;Freezing the weight parameters of the feature extraction network of the first convolutional neural network model;
    根据第二样本图像信息,对所述第一卷积神经网络模型中的分类网络进行迭代训练,以得到第二卷积神经网络模型;Performing iterative training on the classification network in the first convolutional neural network model according to the second sample image information to obtain a second convolutional neural network model;
    解冻所述第二卷积神经网络模型的特征提取网络的权重参数;Unfreeze the weight parameters of the feature extraction network of the second convolutional neural network model;
    根据第三样本图像信息,对解冻后的第二卷积神经网络模型进行训练,以得到所述人脸识别模型。According to the third sample image information, train the thawed second convolutional neural network model to obtain the face recognition model.
  2. 根据权利要求1所述的人脸识别模型的训练方法,其中,所述将所述卷积层的输出输入至所述全连接层,以对所述卷积层的输出进行降维,包括:The method for training a face recognition model according to claim 1, wherein the inputting the output of the convolutional layer to the fully connected layer to reduce the dimensionality of the output of the convolutional layer comprises:
    基于权重计算公式,对所述卷积层的输出的每个特征值进行全连接层的运算,以对所述卷积层的输出进行降维。Based on the weight calculation formula, a fully connected layer operation is performed on each feature value of the output of the convolutional layer, so as to reduce the dimensionality of the output of the convolutional layer.
  3. 根据权利要求2所述的人脸识别模型的训练方法,其中,所述权重计算公式为:The method for training a face recognition model according to claim 2, wherein the weight calculation formula is:
    Figure PCTCN2019118461-appb-100001
    Figure PCTCN2019118461-appb-100001
    Figure PCTCN2019118461-appb-100002
    Figure PCTCN2019118461-appb-100002
    Figure PCTCN2019118461-appb-100003
    Figure PCTCN2019118461-appb-100003
    其中,损失函数为均方差MSE函数,W表示卷积层的权重,W i表示卷积层第i个权重,h表示卷积层的偏置,h i表示卷积层第i个偏置,X表示整个样本图像集,X(i)表示第i个样本图像对应的第一真实标签;
    Figure PCTCN2019118461-appb-100004
    表示第i个样本图像输入分类网络后输出层的输出,η表示反向传播算法的学习效率。
    Among them, the loss function is the mean square error MSE function, W represents the weight of the convolutional layer, W i represents the ith weight of the convolutional layer, h represents the bias of the convolutional layer, and h i represents the ith bias of the convolutional layer, X represents the entire sample image set, X(i) represents the first true label corresponding to the i-th sample image;
    Figure PCTCN2019118461-appb-100004
    Represents the output of the output layer after the i-th sample image is input to the classification network, and η represents the learning efficiency of the backpropagation algorithm.
  4. 根据权利要求1所述的人脸识别模型的训练方法,其中,所述根据第一样本图像信息,对预设的卷积神经网络进行训练,以构建特征提取网络之前,还包括:The method for training a face recognition model according to claim 1, wherein before the training a preset convolutional neural network according to the first sample image information to construct a feature extraction network, the method further comprises:
    获取样本视频,确定所述样本视频中的样本图像集,所述样本图像集包括第一样本图像信息、第二样本图像信息和第三样本图像信息。A sample video is acquired, and a sample image set in the sample video is determined. The sample image set includes first sample image information, second sample image information, and third sample image information.
  5. 根据权利要求4所述的人脸识别模型的训练方法,其中,所述确定所述样本视频中的样本图像集,包括:The method for training a face recognition model according to claim 4, wherein said determining the sample image set in the sample video comprises:
    对所述样本视频进行分帧处理,以得到若干单帧图像;Framing the sample video to obtain several single-frame images;
    若所述单帧图像中存在人脸图像,对所述单帧图像进行小波阀值去噪处理;If there is a face image in the single frame image, perform wavelet threshold denoising processing on the single frame image;
    若所述单帧图像中不存在人脸图像,去除所述单帧图像,以得到所述样本图像集。If there is no face image in the single frame image, remove the single frame image to obtain the sample image set.
  6. 一种人脸识别方法,包括:A face recognition method, including:
    获取待识别图像;Obtain the image to be recognized;
    将所述待识别图像输入预设的人脸识别模型,以得到人脸识别结果,所述人脸识别模型 由如权利要求1-5任一项所述的人脸识别模型的训练方法训练得到的;The image to be recognized is input into a preset face recognition model to obtain a face recognition result, and the face recognition model is obtained by training the face recognition model training method according to any one of claims 1-5 of;
    若所述人脸识别结果指示成功识别所述待识别图像,显示用于提示用户成功识别所述待识别图像的第一提示信息。If the face recognition result indicates that the image to be recognized is successfully recognized, first prompt information for prompting the user to successfully recognize the image to be recognized is displayed.
  7. 一种人脸识别模型的训练装置,包括:A training device for a face recognition model includes:
    特征训练单元,用于根据第一样本图像,对预设的卷积神经网络进行训练,以构建特征提取网络;The feature training unit is used to train a preset convolutional neural network according to the first sample image to construct a feature extraction network;
    网络连接单元,用于判断所述特征提取网络的输出与第一真实标签之间的误差值是否小于第一预设阀值;The network connection unit is used to determine whether the error value between the output of the feature extraction network and the first real tag is less than a first preset threshold;
    若所述特征提取网络的输出与第一真实标签之间的误差值小于所述第一预设阀值,将所述特征提取网络的输出输入至分类网络的卷积层;If the error value between the output of the feature extraction network and the first real label is less than the first preset threshold, input the output of the feature extraction network to the convolutional layer of the classification network;
    将所述卷积层的输出输入至所述分类网络的全连接层,以对所述卷积层的输出进行降维;Inputting the output of the convolutional layer to the fully connected layer of the classification network to reduce the dimensionality of the output of the convolutional layer;
    采用所述分类网络的分类器对所述全连接层的输出进行分类,以建立所述特征提取网络与所述分类网络的连接,从而得到所述第一卷积神经网络模型;Use the classifier of the classification network to classify the output of the fully connected layer to establish a connection between the feature extraction network and the classification network, thereby obtaining the first convolutional neural network model;
    参数冻结单元,用于冻结所述第一卷积神经网络模型的特征提取网络的权重参数;A parameter freezing unit for freezing the weight parameters of the feature extraction network of the first convolutional neural network model;
    分类训练单元,用于根据第二样本图像,对所述第一卷积神经网络模型中的分类网络进行迭代训练,以对所述第一卷积神经网络模型中的分类网络的权重参数进行调整,从而得到第二卷积神经网络模型;The classification training unit is configured to iteratively train the classification network in the first convolutional neural network model according to the second sample image to adjust the weight parameters of the classification network in the first convolutional neural network model , Thereby obtaining the second convolutional neural network model;
    网络解冻单元,用于解冻所述第二卷积神经网络模型的特征提取网络的权重参数;A network unfreezing unit, configured to unfreeze the weight parameters of the feature extraction network of the second convolutional neural network model;
    模型训练单元,用于根据第三样本图像,对解冻后的第二卷积神经网络模型进行训练,以得到所述人脸识别模型。The model training unit is used to train the thawed second convolutional neural network model according to the third sample image to obtain the face recognition model.
  8. 一种人脸识别装置,包括:A face recognition device, including:
    图像识别单元,用于获取待识别图像;The image recognition unit is used to obtain the image to be recognized;
    图像输入单元,用于将所述待识别图像输入预设的人脸识别模型,以得到人脸识别结果,所述人脸识别模型由如权利要求1-5任一项所述的人脸识别模型的训练方法训练得到的;The image input unit is configured to input the image to be recognized into a preset face recognition model to obtain a face recognition result, and the face recognition model is determined by the face recognition according to any one of claims 1-5 Trained by the training method of the model;
    第一信息显示单元,用于若所述人脸识别结果指示成功识别所述待识别图像,显示用于提示用户成功识别所述待识别图像的第一提示信息。The first information display unit is configured to, if the face recognition result indicates that the image to be recognized is successfully recognized, display first prompt information for prompting the user to successfully recognize the image to be recognized.
  9. 一种计算机设备,所述计算机设备包括存储器和处理器;A computer device including a memory and a processor;
    所述存储器用于存储计算机程序;The memory is used to store computer programs;
    所述处理器,用于执行所述计算机程序并在执行所述计算机程序时实现如下步骤:The processor is configured to execute the computer program and implement the following steps when executing the computer program:
    根据第一样本图像信息,对预设的卷积神经网络进行训练,以构建特征提取网络;According to the image information of the first sample, train a preset convolutional neural network to construct a feature extraction network;
    判断所述特征提取网络的输出与第一真实标签之间的误差值是否小于第一预设阀值;Judging whether the error value between the output of the feature extraction network and the first real tag is less than a first preset threshold;
    若所述特征提取网络的输出与第一真实标签之间的误差值小于所述第一预设阀值,将所述特征提取网络的输出输入至分类网络的卷积层;If the error value between the output of the feature extraction network and the first real label is less than the first preset threshold, input the output of the feature extraction network to the convolutional layer of the classification network;
    将所述卷积层的输出输入至所述分类网络的全连接层,以对所述卷积层的输出进行降维;Inputting the output of the convolutional layer to the fully connected layer of the classification network to reduce the dimensionality of the output of the convolutional layer;
    采用所述分类网络的分类器对所述全连接层的输出进行分类,以建立所述特征提取网络与所述分类网络的连接,从而得到所述第一卷积神经网络模型;Use the classifier of the classification network to classify the output of the fully connected layer to establish a connection between the feature extraction network and the classification network, thereby obtaining the first convolutional neural network model;
    冻结所述第一卷积神经网络模型的特征提取网络的权重参数;Freezing the weight parameters of the feature extraction network of the first convolutional neural network model;
    根据第二样本图像信息,对所述第一卷积神经网络模型中的分类网络进行迭代训练,以得到第二卷积神经网络模型;Performing iterative training on the classification network in the first convolutional neural network model according to the second sample image information to obtain a second convolutional neural network model;
    解冻所述第二卷积神经网络模型的特征提取网络的权重参数;Unfreeze the weight parameters of the feature extraction network of the second convolutional neural network model;
    根据第三样本图像信息,对解冻后的第二卷积神经网络模型进行训练,以得到所述人脸识别模型。According to the third sample image information, train the thawed second convolutional neural network model to obtain the face recognition model.
  10. 根据权利要求9所述的计算机设备,其中,所述将所述卷积层的输出输入至所述全连接层,以对所述卷积层的输出进行降维,包括:The computer device according to claim 9, wherein the inputting the output of the convolutional layer to the fully connected layer to reduce the dimensionality of the output of the convolutional layer comprises:
    基于权重计算公式,对所述卷积层的输出的每个特征值进行全连接层的运算,以对所述卷积层的输出进行降维。Based on the weight calculation formula, a fully connected layer operation is performed on each feature value of the output of the convolutional layer to reduce the dimensionality of the output of the convolutional layer.
  11. 根据权利要求10所述的计算机设备,其中,所述权重计算公式为:The computer device according to claim 10, wherein the weight calculation formula is:
    Figure PCTCN2019118461-appb-100005
    Figure PCTCN2019118461-appb-100005
    Figure PCTCN2019118461-appb-100006
    Figure PCTCN2019118461-appb-100006
    Figure PCTCN2019118461-appb-100007
    Figure PCTCN2019118461-appb-100007
    其中,损失函数为均方差MSE函数,W表示卷积层的权重,W i表示卷积层第i个权重,h表示卷积层的偏置,h i表示卷积层第i个偏置,X表示整个样本图像集,X(i)表示第i个样本图像对应的第一真实标签;
    Figure PCTCN2019118461-appb-100008
    表示第i个样本图像输入分类网络后输出层的输出,η表示反向传播算法的学习效率。
    Among them, the loss function is the mean square error MSE function, W represents the weight of the convolutional layer, W i represents the ith weight of the convolutional layer, h represents the bias of the convolutional layer, and h i represents the ith bias of the convolutional layer, X represents the entire sample image set, X(i) represents the first true label corresponding to the i-th sample image;
    Figure PCTCN2019118461-appb-100008
    Represents the output of the output layer after the i-th sample image is input to the classification network, and η represents the learning efficiency of the back propagation algorithm.
  12. 根据权利要求9所述的计算机设备,其中,所述根据第一样本图像信息,对预设的卷积神经网络进行训练,以构建特征提取网络之前,还包括:The computer device according to claim 9, wherein before the training a preset convolutional neural network according to the first sample image information to construct a feature extraction network, the method further comprises:
    获取样本视频,确定所述样本视频中的样本图像集,所述样本图像集包括第一样本图像信息、第二样本图像信息和第三样本图像信息。A sample video is acquired, and a sample image set in the sample video is determined. The sample image set includes first sample image information, second sample image information, and third sample image information.
  13. 根据权利要求12所述的计算机设备,其中,所述确定所述样本视频中的样本图像集,包括:The computer device according to claim 12, wherein said determining the sample image set in the sample video comprises:
    对所述样本视频进行分帧处理,以得到若干单帧图像;Framing processing the sample video to obtain several single-frame images;
    若所述单帧图像中存在人脸图像,对所述单帧图像进行小波阀值去噪处理;If there is a face image in the single frame image, perform wavelet threshold denoising processing on the single frame image;
    若所述单帧图像中不存在人脸图像,去除所述单帧图像,以得到所述样本图像集。If there is no face image in the single frame image, remove the single frame image to obtain the sample image set.
  14. 一种计算机设备,所述计算机设备包括存储器和处理器;A computer device including a memory and a processor;
    所述存储器用于存储计算机程序;The memory is used to store computer programs;
    所述处理器,用于执行所述计算机程序并在执行所述计算机程序时实现如下步骤:The processor is configured to execute the computer program and implement the following steps when executing the computer program:
    获取待识别图像;Obtain the image to be recognized;
    将所述待识别图像输入预设的人脸识别模型,以得到人脸识别结果,所述人脸识别模型由如权利要求1-5任一项所述的人脸识别模型的训练方法训练得到的;The image to be recognized is input into a preset face recognition model to obtain a face recognition result, and the face recognition model is obtained by training the face recognition model training method according to any one of claims 1-5 of;
    若所述人脸识别结果指示成功识别所述待识别图像,显示用于提示用户成功识别所述待识别图像的第一提示信息。If the face recognition result indicates that the image to be recognized is successfully recognized, first prompt information for prompting the user to successfully recognize the image to be recognized is displayed.
  15. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如下步骤:A computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the processor implements the following steps:
    根据第一样本图像信息,对预设的卷积神经网络进行训练,以构建特征提取网络;According to the image information of the first sample, train a preset convolutional neural network to construct a feature extraction network;
    判断所述特征提取网络的输出与第一真实标签之间的误差值是否小于第一预设阀值;Judging whether the error value between the output of the feature extraction network and the first real tag is less than a first preset threshold;
    若所述特征提取网络的输出与第一真实标签之间的误差值小于所述第一预设阀值,将所述特征提取网络的输出输入至分类网络的卷积层;If the error value between the output of the feature extraction network and the first real label is less than the first preset threshold, input the output of the feature extraction network to the convolutional layer of the classification network;
    将所述卷积层的输出输入至所述分类网络的全连接层,以对所述卷积层的输出进行降维;Inputting the output of the convolutional layer to the fully connected layer of the classification network to reduce the dimensionality of the output of the convolutional layer;
    采用所述分类网络的分类器对所述全连接层的输出进行分类,以建立所述特征提取网络与所述分类网络的连接,从而得到所述第一卷积神经网络模型;Classify the output of the fully connected layer by using the classifier of the classification network to establish a connection between the feature extraction network and the classification network, thereby obtaining the first convolutional neural network model;
    冻结所述第一卷积神经网络模型的特征提取网络的权重参数;Freezing the weight parameters of the feature extraction network of the first convolutional neural network model;
    根据第二样本图像信息,对所述第一卷积神经网络模型中的分类网络进行迭代训练,以得到第二卷积神经网络模型;Performing iterative training on the classification network in the first convolutional neural network model according to the second sample image information to obtain a second convolutional neural network model;
    解冻所述第二卷积神经网络模型的特征提取网络的权重参数;Unfreeze the weight parameters of the feature extraction network of the second convolutional neural network model;
    根据第三样本图像信息,对解冻后的第二卷积神经网络模型进行训练,以得到所述人脸识别模型。According to the third sample image information, train the thawed second convolutional neural network model to obtain the face recognition model.
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述将所述卷积层的输出输入至所述全连接层,以对所述卷积层的输出进行降维,包括:15. The computer-readable storage medium according to claim 15, wherein the inputting the output of the convolutional layer to the fully connected layer to reduce the dimensionality of the output of the convolutional layer comprises:
    基于权重计算公式,对所述卷积层的输出的每个特征值进行全连接层的运算,以对所述卷积层的输出进行降维。Based on the weight calculation formula, a fully connected layer operation is performed on each feature value of the output of the convolutional layer to reduce the dimensionality of the output of the convolutional layer.
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述权重计算公式为:The computer-readable storage medium according to claim 16, wherein the weight calculation formula is:
    Figure PCTCN2019118461-appb-100009
    Figure PCTCN2019118461-appb-100009
    Figure PCTCN2019118461-appb-100010
    Figure PCTCN2019118461-appb-100010
    Figure PCTCN2019118461-appb-100011
    Figure PCTCN2019118461-appb-100011
    其中,损失函数为均方差MSE函数,W表示卷积层的权重,W i表示卷积层第i个权重,h表示卷积层的偏置,h i表示卷积层第i个偏置,X表示整个样本图像集,X(i)表示第i个样本图像对应的第一真实标签;
    Figure PCTCN2019118461-appb-100012
    表示第i个样本图像输入分类网络后输出层的输出,η表示反向传播算法的学习效率。
    Among them, the loss function is the mean square error MSE function, W represents the weight of the convolutional layer, W i represents the ith weight of the convolutional layer, h represents the bias of the convolutional layer, and h i represents the ith bias of the convolutional layer, X represents the entire sample image set, X(i) represents the first true label corresponding to the i-th sample image;
    Figure PCTCN2019118461-appb-100012
    Represents the output of the output layer after the i-th sample image is input to the classification network, and η represents the learning efficiency of the back propagation algorithm.
  18. 根据权利要求15所述的计算机可读存储介质,其中,所述根据第一样本图像信息,对预设的卷积神经网络进行训练,以构建特征提取网络之前,还包括:The computer-readable storage medium according to claim 15, wherein before training a preset convolutional neural network to construct a feature extraction network according to the first sample image information, the method further comprises:
    获取样本视频,确定所述样本视频中的样本图像集,所述样本图像集包括第一样本图像信息、第二样本图像信息和第三样本图像信息。A sample video is acquired, and a sample image set in the sample video is determined. The sample image set includes first sample image information, second sample image information, and third sample image information.
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述确定所述样本视频中的样本图像集,包括:18. The computer-readable storage medium according to claim 18, wherein the determining the sample image set in the sample video comprises:
    对所述样本视频进行分帧处理,以得到若干单帧图像;Framing processing the sample video to obtain several single-frame images;
    若所述单帧图像中存在人脸图像,对所述单帧图像进行小波阀值去噪处理;If there is a face image in the single frame image, perform wavelet threshold denoising processing on the single frame image;
    若所述单帧图像中不存在人脸图像,去除所述单帧图像,以得到所述样本图像集。If there is no face image in the single frame image, remove the single frame image to obtain the sample image set.
  20. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如下步骤:A computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the processor implements the following steps:
    获取待识别图像;Obtain the image to be recognized;
    将所述待识别图像输入预设的人脸识别模型,以得到人脸识别结果,所述人脸识别模型由如权利要求1-5任一项所述的人脸识别模型的训练方法训练得到的;The image to be recognized is input into a preset face recognition model to obtain a face recognition result, and the face recognition model is obtained by training the face recognition model training method according to any one of claims 1-5 of;
    若所述人脸识别结果指示成功识别所述待识别图像,显示用于提示用户成功识别所述待识别图像的第一提示信息。If the face recognition result indicates that the image to be recognized is successfully recognized, first prompt information for prompting the user to successfully recognize the image to be recognized is displayed.
PCT/CN2019/118461 2019-07-22 2019-11-14 Face recognition model training method, face recognition method and apparatus, device, and storage medium WO2021012526A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910663230.9A CN110543815B (en) 2019-07-22 2019-07-22 Training method of face recognition model, face recognition method, device, equipment and storage medium
CN201910663230.9 2019-07-22

Publications (1)

Publication Number Publication Date
WO2021012526A1 true WO2021012526A1 (en) 2021-01-28

Family

ID=68709979

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/118461 WO2021012526A1 (en) 2019-07-22 2019-11-14 Face recognition model training method, face recognition method and apparatus, device, and storage medium

Country Status (2)

Country Link
CN (1) CN110543815B (en)
WO (1) WO2021012526A1 (en)

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113168573A (en) * 2021-03-02 2021-07-23 深圳市锐明技术股份有限公司 Model training method and device, terminal equipment and storage medium
CN113158850A (en) * 2021-04-07 2021-07-23 大连海事大学 Ship driver fatigue detection method and system based on deep learning
CN113156439A (en) * 2021-05-08 2021-07-23 中国石油大学(华东) SAR wind field and sea wave joint inversion method and system based on data driving
CN113221830A (en) * 2021-05-31 2021-08-06 平安科技(深圳)有限公司 Super-resolution living body identification method, system, terminal and storage medium
CN113283978A (en) * 2021-05-06 2021-08-20 北京思图场景数据科技服务有限公司 Financial risk assessment method based on biological basis, behavior characteristics and business characteristics
CN113420579A (en) * 2021-06-29 2021-09-21 北大方正集团有限公司 Method and device for training and positioning identification code position positioning model and electronic equipment
CN113436231A (en) * 2021-06-30 2021-09-24 平安科技(深圳)有限公司 Pedestrian trajectory generation method, device, equipment and storage medium
CN113570689A (en) * 2021-07-28 2021-10-29 杭州网易云音乐科技有限公司 Portrait cartoon method, apparatus, medium and computing device
CN113705685A (en) * 2021-08-30 2021-11-26 平安科技(深圳)有限公司 Disease feature recognition model training method, disease feature recognition device and disease feature recognition equipment
CN113723448A (en) * 2021-07-16 2021-11-30 北京工业大学 Method and device for classifying and counting objects in image, electronic equipment and medium
CN113724163A (en) * 2021-08-31 2021-11-30 平安科技(深圳)有限公司 Image correction method, device, equipment and medium based on neural network
CN113781729A (en) * 2021-07-23 2021-12-10 广东电网有限责任公司广州供电局 Power transmission line external force damage monitoring method and device based on intelligent gateway
CN113850207A (en) * 2021-09-29 2021-12-28 中国平安财产保险股份有限公司 Artificial intelligence-based micro-expression classification method and device, electronic equipment and medium
CN114005015A (en) * 2021-12-28 2022-02-01 北京的卢深视科技有限公司 Model training method, electronic device, and computer-readable storage medium
CN114005019A (en) * 2021-10-29 2022-02-01 北京有竹居网络技术有限公司 Method for identifying copied image and related equipment thereof
CN114255354A (en) * 2021-12-31 2022-03-29 智慧眼科技股份有限公司 Face recognition model training method, face recognition device and related equipment
CN114359949A (en) * 2021-12-23 2022-04-15 华南理工大学 Identification method for characters of power grid wiring diagram
CN114387553A (en) * 2022-01-18 2022-04-22 桂林电子科技大学 Video face recognition method based on frame structure perception aggregation
CN114463559A (en) * 2022-01-29 2022-05-10 新疆爱华盈通信息技术有限公司 Training method and device of image recognition model, network and image recognition method
CN114789870A (en) * 2022-05-20 2022-07-26 深圳市信成医疗科技有限公司 Innovative modular drug storage management implementation mode
CN115546848A (en) * 2022-10-26 2022-12-30 南京航空航天大学 Confrontation generation network training method, cross-device palmprint recognition method and system
CN116112932A (en) * 2023-02-20 2023-05-12 南京航空航天大学 Data knowledge dual-drive radio frequency fingerprint identification method and system
CN116214524A (en) * 2023-05-08 2023-06-06 国网浙江省电力有限公司宁波供电公司 Unmanned aerial vehicle grabbing method and device for oil sample recovery and storage medium
CN116630832A (en) * 2023-07-21 2023-08-22 江西现代职业技术学院 Unmanned aerial vehicle target recognition method, unmanned aerial vehicle target recognition system, computer and readable storage medium
CN113283978B (en) * 2021-05-06 2024-05-10 北京思图场景数据科技服务有限公司 Financial risk assessment method based on biological basis, behavioral characteristics and business characteristics

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111104897A (en) * 2019-12-18 2020-05-05 深圳市捷顺科技实业股份有限公司 Training method and device for child face recognition model and storage medium
CN111241998B (en) * 2020-01-09 2023-04-28 中移(杭州)信息技术有限公司 Face recognition method, device, electronic equipment and storage medium
CN111242217A (en) * 2020-01-13 2020-06-05 支付宝实验室(新加坡)有限公司 Training method and device of image recognition model, electronic equipment and storage medium
CN111524118B (en) * 2020-04-22 2021-06-29 广东电网有限责任公司东莞供电局 Running state detection method and device of transformer, computer equipment and storage medium
CN113642353A (en) * 2020-04-27 2021-11-12 Tcl科技集团股份有限公司 Training method of face detection model, storage medium and terminal equipment
CN111581620A (en) * 2020-04-30 2020-08-25 新浪网技术(中国)有限公司 User identification method and device
CN111582381B (en) * 2020-05-09 2024-03-26 北京市商汤科技开发有限公司 Method and device for determining performance parameters, electronic equipment and storage medium
CN111680597B (en) * 2020-05-29 2023-09-01 北京百度网讯科技有限公司 Face recognition model processing method, device, equipment and storage medium
CN111783601B (en) * 2020-06-24 2024-04-26 北京百度网讯科技有限公司 Training method and device of face recognition model, electronic equipment and storage medium
CN111985434B (en) * 2020-08-28 2023-07-28 厦门市易联众易惠科技有限公司 Model-enhanced face recognition method, device, equipment and storage medium
CN112016702B (en) * 2020-09-09 2023-07-28 平安科技(深圳)有限公司 Medical data processing method, device, equipment and medium based on transfer learning
CN112561480A (en) * 2020-12-16 2021-03-26 中国平安人寿保险股份有限公司 Intelligent workflow pushing method, equipment and computer storage medium
CN112668637B (en) * 2020-12-25 2023-05-23 苏州科达科技股份有限公司 Training method, recognition method and device of network model and electronic equipment
CN112967243B (en) * 2021-02-26 2023-01-13 清华大学深圳国际研究生院 Deep learning chip packaging crack defect detection method based on YOLO
CN113011387A (en) * 2021-04-20 2021-06-22 上海商汤科技开发有限公司 Network training and human face living body detection method, device, equipment and storage medium
CN113627361B (en) * 2021-08-13 2023-08-08 北京百度网讯科技有限公司 Training method and device for face recognition model and computer program product

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107247949A (en) * 2017-08-02 2017-10-13 北京智慧眼科技股份有限公司 Face identification method, device and electronic equipment based on deep learning
US20180089803A1 (en) * 2016-03-21 2018-03-29 Boe Technology Group Co., Ltd. Resolving Method and System Based on Deep Learning
CN108133238A (en) * 2017-12-29 2018-06-08 国信优易数据有限公司 A kind of human face recognition model training method and device and face identification method and device
CN109086868A (en) * 2018-07-09 2018-12-25 南京邮电大学 A kind of abstract image emotion identification method
CN109117897A (en) * 2018-08-09 2019-01-01 百度在线网络技术(北京)有限公司 Image processing method, device and readable storage medium storing program for executing based on convolutional neural networks
CN109190476A (en) * 2018-08-02 2019-01-11 福建工程学院 A kind of method and device of vegetables identification

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105989375A (en) * 2015-01-30 2016-10-05 富士通株式会社 Classifier, classification device and classification method for classifying handwritten character images
CN105426963B (en) * 2015-12-01 2017-12-26 北京天诚盛业科技有限公司 For the training method of the convolutional neural networks of recognition of face, device and application
US10032067B2 (en) * 2016-05-28 2018-07-24 Samsung Electronics Co., Ltd. System and method for a unified architecture multi-task deep learning machine for object recognition
CN106600538A (en) * 2016-12-15 2017-04-26 武汉工程大学 Human face super-resolution algorithm based on regional depth convolution neural network
US11354577B2 (en) * 2017-03-15 2022-06-07 Samsung Electronics Co., Ltd System and method for designing efficient super resolution deep convolutional neural networks by cascade network training, cascade network trimming, and dilated convolutions
CN108304788B (en) * 2018-01-18 2022-06-14 陕西炬云信息科技有限公司 Face recognition method based on deep neural network
CN108510485B (en) * 2018-03-27 2022-04-05 福州大学 Non-reference image quality evaluation method based on convolutional neural network
CN108805137A (en) * 2018-04-17 2018-11-13 平安科技(深圳)有限公司 Extracting method, device, computer equipment and the storage medium of livestock feature vector
CN109284669A (en) * 2018-08-01 2019-01-29 辽宁工业大学 Pedestrian detection method based on Mask RCNN
CN109934115B (en) * 2019-02-18 2021-11-02 苏州市科远软件技术开发有限公司 Face recognition model construction method, face recognition method and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180089803A1 (en) * 2016-03-21 2018-03-29 Boe Technology Group Co., Ltd. Resolving Method and System Based on Deep Learning
CN107247949A (en) * 2017-08-02 2017-10-13 北京智慧眼科技股份有限公司 Face identification method, device and electronic equipment based on deep learning
CN108133238A (en) * 2017-12-29 2018-06-08 国信优易数据有限公司 A kind of human face recognition model training method and device and face identification method and device
CN109086868A (en) * 2018-07-09 2018-12-25 南京邮电大学 A kind of abstract image emotion identification method
CN109190476A (en) * 2018-08-02 2019-01-11 福建工程学院 A kind of method and device of vegetables identification
CN109117897A (en) * 2018-08-09 2019-01-01 百度在线网络技术(北京)有限公司 Image processing method, device and readable storage medium storing program for executing based on convolutional neural networks

Cited By (40)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113168573B (en) * 2021-03-02 2024-04-16 深圳市锐明技术股份有限公司 Model training method and device, terminal equipment and storage medium
CN113168573A (en) * 2021-03-02 2021-07-23 深圳市锐明技术股份有限公司 Model training method and device, terminal equipment and storage medium
CN113158850A (en) * 2021-04-07 2021-07-23 大连海事大学 Ship driver fatigue detection method and system based on deep learning
CN113158850B (en) * 2021-04-07 2024-01-05 大连海事大学 Ship driver fatigue detection method and system based on deep learning
CN113283978A (en) * 2021-05-06 2021-08-20 北京思图场景数据科技服务有限公司 Financial risk assessment method based on biological basis, behavior characteristics and business characteristics
CN113283978B (en) * 2021-05-06 2024-05-10 北京思图场景数据科技服务有限公司 Financial risk assessment method based on biological basis, behavioral characteristics and business characteristics
CN113156439A (en) * 2021-05-08 2021-07-23 中国石油大学(华东) SAR wind field and sea wave joint inversion method and system based on data driving
CN113221830A (en) * 2021-05-31 2021-08-06 平安科技(深圳)有限公司 Super-resolution living body identification method, system, terminal and storage medium
CN113221830B (en) * 2021-05-31 2023-09-01 平安科技(深圳)有限公司 Super-division living body identification method, system, terminal and storage medium
CN113420579A (en) * 2021-06-29 2021-09-21 北大方正集团有限公司 Method and device for training and positioning identification code position positioning model and electronic equipment
CN113436231B (en) * 2021-06-30 2023-09-15 平安科技(深圳)有限公司 Pedestrian track generation method, device, equipment and storage medium
CN113436231A (en) * 2021-06-30 2021-09-24 平安科技(深圳)有限公司 Pedestrian trajectory generation method, device, equipment and storage medium
CN113723448A (en) * 2021-07-16 2021-11-30 北京工业大学 Method and device for classifying and counting objects in image, electronic equipment and medium
CN113781729A (en) * 2021-07-23 2021-12-10 广东电网有限责任公司广州供电局 Power transmission line external force damage monitoring method and device based on intelligent gateway
CN113570689B (en) * 2021-07-28 2024-03-01 杭州网易云音乐科技有限公司 Portrait cartoon method, device, medium and computing equipment
CN113570689A (en) * 2021-07-28 2021-10-29 杭州网易云音乐科技有限公司 Portrait cartoon method, apparatus, medium and computing device
CN113705685B (en) * 2021-08-30 2023-08-01 平安科技(深圳)有限公司 Disease feature recognition model training, disease feature recognition method, device and equipment
CN113705685A (en) * 2021-08-30 2021-11-26 平安科技(深圳)有限公司 Disease feature recognition model training method, disease feature recognition device and disease feature recognition equipment
CN113724163A (en) * 2021-08-31 2021-11-30 平安科技(深圳)有限公司 Image correction method, device, equipment and medium based on neural network
CN113850207B (en) * 2021-09-29 2024-05-03 中国平安财产保险股份有限公司 Micro-expression classification method and device based on artificial intelligence, electronic equipment and medium
CN113850207A (en) * 2021-09-29 2021-12-28 中国平安财产保险股份有限公司 Artificial intelligence-based micro-expression classification method and device, electronic equipment and medium
CN114005019B (en) * 2021-10-29 2023-09-22 北京有竹居网络技术有限公司 Method for identifying flip image and related equipment thereof
CN114005019A (en) * 2021-10-29 2022-02-01 北京有竹居网络技术有限公司 Method for identifying copied image and related equipment thereof
CN114359949A (en) * 2021-12-23 2022-04-15 华南理工大学 Identification method for characters of power grid wiring diagram
CN114359949B (en) * 2021-12-23 2023-04-25 华南理工大学 Identification method for characters of power grid wiring diagram
CN114005015A (en) * 2021-12-28 2022-02-01 北京的卢深视科技有限公司 Model training method, electronic device, and computer-readable storage medium
CN114255354A (en) * 2021-12-31 2022-03-29 智慧眼科技股份有限公司 Face recognition model training method, face recognition device and related equipment
CN114387553A (en) * 2022-01-18 2022-04-22 桂林电子科技大学 Video face recognition method based on frame structure perception aggregation
CN114387553B (en) * 2022-01-18 2024-03-22 桂林电子科技大学 Video face recognition method based on frame structure perception aggregation
CN114463559B (en) * 2022-01-29 2024-05-10 芯算一体(深圳)科技有限公司 Training method and device of image recognition model, network and image recognition method
CN114463559A (en) * 2022-01-29 2022-05-10 新疆爱华盈通信息技术有限公司 Training method and device of image recognition model, network and image recognition method
CN114789870A (en) * 2022-05-20 2022-07-26 深圳市信成医疗科技有限公司 Innovative modular drug storage management implementation mode
CN115546848A (en) * 2022-10-26 2022-12-30 南京航空航天大学 Confrontation generation network training method, cross-device palmprint recognition method and system
CN115546848B (en) * 2022-10-26 2024-02-02 南京航空航天大学 Challenge generation network training method, cross-equipment palmprint recognition method and system
CN116112932B (en) * 2023-02-20 2023-11-10 南京航空航天大学 Data knowledge dual-drive radio frequency fingerprint identification method and system
CN116112932A (en) * 2023-02-20 2023-05-12 南京航空航天大学 Data knowledge dual-drive radio frequency fingerprint identification method and system
CN116214524B (en) * 2023-05-08 2023-10-03 国网浙江省电力有限公司宁波供电公司 Unmanned aerial vehicle grabbing method and device for oil sample recovery and storage medium
CN116214524A (en) * 2023-05-08 2023-06-06 国网浙江省电力有限公司宁波供电公司 Unmanned aerial vehicle grabbing method and device for oil sample recovery and storage medium
CN116630832B (en) * 2023-07-21 2023-09-29 江西现代职业技术学院 Unmanned aerial vehicle target recognition method, unmanned aerial vehicle target recognition system, computer and readable storage medium
CN116630832A (en) * 2023-07-21 2023-08-22 江西现代职业技术学院 Unmanned aerial vehicle target recognition method, unmanned aerial vehicle target recognition system, computer and readable storage medium

Also Published As

Publication number Publication date
CN110543815A (en) 2019-12-06
CN110543815B (en) 2024-03-08

Similar Documents

Publication Publication Date Title
WO2021012526A1 (en) Face recognition model training method, face recognition method and apparatus, device, and storage medium
US11908239B2 (en) Image recognition network model training method, image recognition method and apparatus
WO2019233421A1 (en) Image processing method and device, electronic apparatus, and storage medium
WO2020119350A1 (en) Video classification method and apparatus, and computer device and storage medium
WO2019119505A1 (en) Face recognition method and device, computer device and storage medium
CN109284729B (en) Method, device and medium for acquiring face recognition model training data based on video
WO2019109526A1 (en) Method and device for age recognition of face image, storage medium
WO2016177259A1 (en) Similar image recognition method and device
KR102385463B1 (en) Facial feature extraction model training method, facial feature extraction method, apparatus, device and storage medium
CN111814620B (en) Face image quality evaluation model establishment method, optimization method, medium and device
US8792722B2 (en) Hand gesture detection
US8971591B2 (en) 3D image estimation for 2D image recognition
US8750573B2 (en) Hand gesture detection
US8879803B2 (en) Method, apparatus, and computer program product for image clustering
WO2017161756A1 (en) Video identification method and system
WO2018054329A1 (en) Object detection method and device, electronic apparatus, computer program and storage medium
WO2021237570A1 (en) Image auditing method and apparatus, device, and storage medium
WO2020228181A1 (en) Palm image cropping method and apparatus, computer device and storage medium
WO2019020062A1 (en) Video object segmentation method and apparatus, electronic device, storage medium and program
WO2019056503A1 (en) Store monitoring evaluation method, device and storage medium
WO2020155790A1 (en) Method and apparatus for extracting claim settlement information, and electronic device
WO2022078168A1 (en) Identity verification method and apparatus based on artificial intelligence, and computer device and storage medium
US11537636B2 (en) System and method for using multimedia content as search queries
CN112036316B (en) Finger vein recognition method, device, electronic equipment and readable storage medium
CN112101296A (en) Face registration method, face verification method, device and system

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19938770

Country of ref document: EP

Kind code of ref document: A1