CN111553333A - Face image recognition model training method, recognition method, device and electronic equipment - Google Patents
Face image recognition model training method, recognition method, device and electronic equipment Download PDFInfo
- Publication number
- CN111553333A CN111553333A CN202010662642.3A CN202010662642A CN111553333A CN 111553333 A CN111553333 A CN 111553333A CN 202010662642 A CN202010662642 A CN 202010662642A CN 111553333 A CN111553333 A CN 111553333A
- Authority
- CN
- China
- Prior art keywords
- face image
- training
- recognition model
- partial
- face
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
- G06V40/165—Detection; Localisation; Normalisation using facial parts and geometric relationships
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Biomedical Technology (AREA)
- Molecular Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Geometry (AREA)
- Human Computer Interaction (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
Abstract
The application discloses a face image recognition model training method, which comprises the following steps: acquiring a first training sample, wherein the first training sample is a face image; acquiring a second training sample, wherein the second training sample is a partial face image; the partial face image is an image of a partial face region containing a face image in the first training sample; training by using the first training sample to obtain a first recognition model; training by using the second training sample to obtain a second recognition model; and carrying out distillation learning on the first recognition model and the second recognition model to obtain a face image recognition model.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a facial image recognition model training method, a facial image recognition model training device, and an electronic device.
Background
Face recognition is a biometric technology for identity recognition based on facial feature information of a person. The resolution of face images processed by the current mainstream face recognition algorithm is also small, generally below 128 × 128, and the detail information of the face cannot be fully mined. In addition, the face recognition performance is also greatly reduced under the shielding condition of wearing a mask or the like by a user.
Therefore, there is a need in the art for a more efficient face image recognition method.
Disclosure of Invention
In view of this, embodiments of the present disclosure provide a face image recognition model training method, a face image recognition device, and an electronic device, so as to improve the performance of face image recognition.
The technical scheme adopted by the specification is as follows:
the present specification provides a face image recognition model training method, including:
acquiring a first training sample, wherein the first training sample is a face image;
acquiring a second training sample, wherein the second training sample is a partial face image; the partial face image is an image of a partial face region containing a face image in the first training sample;
training by using the first training sample to obtain a first recognition model;
training by using the second training sample to obtain a second recognition model;
and carrying out distillation learning on the first recognition model and the second recognition model to obtain a face image recognition model.
The present specification also provides a face image recognition method, including:
acquiring a face image to be recognized;
preprocessing the face image to be recognized;
inputting the preprocessed image into a pre-trained face image recognition model to obtain a recognition result;
the face image recognition model is obtained by pre-training the face image recognition model training method.
This specification also provides a face image recognition model training device, including:
the system comprises a first acquisition module, a second acquisition module and a processing module, wherein the first acquisition module is used for acquiring a first training sample, and the first training sample is a face image;
the second acquisition module is used for acquiring a second training sample, and the second training sample is a partial face image; the partial face image is an image of a partial face region containing a face image in the first training sample;
the first training module is used for training by using the first training sample to obtain a first recognition model;
the second training module is used for training by using the second training sample to obtain a second recognition model;
and the third training module is used for distilling and learning the first recognition model and the second recognition model to obtain a face image recognition model.
The present description also provides a face image recognition apparatus, including:
the device comprises an acquisition unit, a recognition unit and a processing unit, wherein the acquisition unit is used for acquiring a face image to be recognized;
the processing unit is used for preprocessing the face image to be recognized;
the recognition unit is provided with a pre-trained face image recognition model and is used for recognizing the preprocessed image according to the face image recognition model to obtain a recognition result;
the face image recognition model is obtained by pre-training according to the face image recognition model training device.
This specification also provides an electronic device, including: at least one processing and memory; the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to perform the above-described facial image recognition model training method, and the above-described facial image recognition method.
The present specification also provides a computer-readable storage medium storing computer-executable instructions which, when executed by a processor, implement the above-mentioned facial image recognition model training method, and the above-mentioned facial image recognition method.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects: the face image recognition method in the scheme only needs a common RGB/NIR camera module in the aspect of image acquisition, and the deployment cost is greatly reduced. Based on partial face image, extract detailed characteristic, when guaranteeing single mode performance, also be an effective complementation of full face characteristic, can optimize moreover and solve the performance of people's face under the partial condition of sheltering from, for example gauze mask, scarf, hand shelter from etc..
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the specification, and for those skilled in the art, other drawings can be obtained according to the drawings without inventive exercise:
fig. 1 is a main flowchart of a face image recognition model training method provided in an embodiment of the present specification;
fig. 2 is a detailed schematic diagram of a face image recognition model training method provided in an embodiment of the present specification;
fig. 3 is a main flowchart of a face image recognition method provided in an embodiment of the present specification;
fig. 4 is a schematic structural diagram of a facial image recognition model training device provided in an embodiment of the present specification;
fig. 5 is a schematic structural diagram of a face image recognition apparatus provided in an embodiment of this specification.
Detailed Description
As described in the background art, in order to realize more efficient face image recognition, the embodiments of the present specification are mainly based on a high-definition partial face biometric method, so as to improve the face image recognition performance.
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any inventive step based on the embodiments of the present disclosure, shall fall within the scope of protection of the present application.
Referring to fig. 1, fig. 1 is a main flowchart of a face image recognition model training method provided in an embodiment of the present specification. The training method comprises the following steps:
s110: and acquiring a first training sample, wherein the first training sample is a face image.
In this step, the face image may be acquired by various means, such as acquiring as many face images as possible by a camera. As an example, a face position may be detected from an image frame captured by a camera, and then the face image may be normalized to a preset size according to the detected face position. For example, the face images may all be normalized to 128 × 128, and these 128 × 128 sized face images may be used as the first training samples. The person skilled in the art can also normalize the face image to other suitable preset sizes according to actual needs, as long as the normalized face image size is kept consistent.
S120: acquiring a second training sample, wherein the second training sample is a partial face image; the partial face image is an image of a partial face region including a face image in the first training sample.
In this step, the partial face image in the second training sample is a map of a partial face region including the face image in the first training sample. As an example, when the second training sample is obtained, the face image in the first training sample (the face image may be the face image after normalization, or the face image before normalization, that is, the original face image acquired by the camera) may be segmented into a partial face image including a partial face region. Wherein, the partial face image may be: the image processing method comprises one or more of a partial face image containing periocular regions, a partial face image containing left-eye regions, a partial face image containing right-eye regions, a partial face image containing ear regions, and a partial face image containing face mole regions. The person skilled in the art can segment the face image into one or more partial face images according to actual needs.
After the face image is divided into partial face images, normalization processing is further performed on the divided partial face images to obtain 256 × 256-sized images, and the 256 × 256-sized partial face images are used as second training samples. One skilled in the art may also normalize the partial face image to another suitable preset size according to actual needs, as long as the normalized partial face image size is kept consistent and is a high-resolution partial face image.
S130: and training by using the first training sample to obtain a first recognition model.
In this step, since the first training sample is a complete face image, the first recognition module obtained by training the first training sample is a standard biometric model.
S140: and training by using the second training sample to obtain a first recognition model.
In this step, since the second training sample is a partial face image obtained by segmenting a complete face image, the second recognition model obtained by training the second training sample is the auxiliary biological feature model.
S150: and carrying out distillation learning on the first recognition model and the second recognition model to obtain a face image recognition model.
In the step, the feature fusion of the first recognition model and the second recognition model can be realized through distillation learning, so that the obtained face image recognition model has stronger recognition capability. An example may be that the second recognition model is used as a model to be trained, a distance function between an output of the first recognition model and an output of the second recognition model is used as a loss function of the model to be trained, the first training sample and the second training sample are used as a total training sample, and the model to be trained is trained by using the total training sample to obtain the face image recognition model. Wherein the loss function can be expressed as follows:
l represents the loss function and is the function of the loss,which represents the input image, is,representing a second recognition model (which may also be referred to as a student model),representing a first recognition model (which may also be referred to as a teacher model);
as an example, the distance function between the output of the first recognition model and the output of the second recognition model may be euclidean distance, cosine of an angle, or the like.
The steps S110 and S120 may be executed sequentially, or may be executed simultaneously, or may be executed first in S120 and then in S110; similarly, the steps S130 and S140 may be executed sequentially, or may be executed simultaneously, or S130 may be executed first and then S140 may be executed. That is, the order of the steps of the training method is not limited in the embodiments of the present specification.
The training method provided in the present specification is further described in detail below with reference to fig. 2.
Fig. 2 is a detailed schematic diagram of a face image recognition model training method provided in an embodiment of the present specification. As shown in fig. 2, steps a and B are respectively performed on an original face image collected by a camera, in step a, a face image including a complete face region is obtained according to a detected face position, and the face image is normalized to 128 × 128; in step B, the original face image is divided into a plurality of partial face images including partial face regions, which are divided into a partial face image including periocular regions (face regions above the nose), a partial face image including left-eye regions (face regions on the left side of the nose), a partial face image including right-eye regions (face regions on the right side of the nose), and a partial face image including mouth regions (face regions below the nose) in fig. 2, and then the divided partial face images are all normalized to 256 × 256.
Then, based on the 128 × 128 size face image obtained after normalization in the step A, executing a step C, and training according to the complete normalized face image to obtain a first recognition model, wherein the first recognition model adopts a CNN neural network; and C, executing the step D based on the 256 × 256-size partial face image obtained after normalization in the step B, and training according to the normalized partial face image to obtain a second recognition model, wherein the second recognition model adopts a CNN neural network.
And E, performing distillation learning on the first recognition model and the second recognition model, wherein one mode is that the Euclidean distance between the output of the first recognition model and the output of the second recognition model is used as a loss function, and the second recognition model is trained to obtain the face image recognition model.
The face image recognition model obtained by training in the above mode extracts detail features through high-resolution partial faces, ensures single-mode performance, is also an effective complementation of full-face features, and can optimize the performance of the face under the partial shielding condition, such as a mask, a scarf, hand shielding and the like.
On the basis, the embodiment of the specification further provides a face image recognition method. Referring to fig. 3, fig. 3 is a main flowchart of a face image recognition method provided in an embodiment of the present specification. The method comprises the following steps:
s310: and acquiring a face image to be recognized.
In a specific embodiment, when the face image is recognized by a mobile phone, the face image to be recognized may be acquired by a camera installed on the mobile phone.
S320: and preprocessing the face image to be recognized.
In this step, an example may be that whether a face is occluded is detected first, if the face image to be recognized is not occluded, the face position in the face image may be directly detected, and then normalization processing is performed on the face image according to the detected face position, so as to obtain a face image with a preset size, such as a face image with a size of 128 × 128.
If the face image is occluded, the face image to be recognized may be segmented into a plurality of partial face images including partial face regions, for example, the partial face images may be a partial face image including an eye surrounding region, a partial face image including a left eye region, a partial face image including a right eye region, a partial face image including an ear region, a partial face image including a mole region of the face, and the like, and then the segmented partial face images are normalized. One example may be: the partial face images were all normalized to 256 × 256 sizes.
In this step, it is also possible to directly segment the face image to be recognized into partial face images without detecting whether the face is occluded, and further normalize the segmented face images to a size of 256 × 256.
S330: and inputting the preprocessed image into a pre-trained face image recognition model to obtain a recognition result.
In this step, the face image recognition model is obtained by pre-training according to the above steps S110 to S150. For example, when a user needs to unlock a mobile phone screen by swiping a face, the user can preprocess a face image after acquiring the face image through a mobile phone camera, and then input the preprocessed image into a pre-trained face image recognition model. As an example, the partial face image normalized to 256 × 256 size in step S320 may be input to the trained face image recognition model. Thus, even if the user wears a mask or a part of the face is blocked, the current user can be effectively identified, and the performance of face image identification is improved.
In the face image recognition method of the embodiment of the specification, only a common RGB/NIR camera module is needed in the aspect of image acquisition, and the deployment cost is greatly reduced. Through high resolution part face, extract detailed characteristic, when guaranteeing single mode performance, also be an effective complementation of full face characteristic, can optimize moreover and solve the performance of people's face under the partial condition of sheltering from, for example gauze mask, scarf, hand shelter from etc..
Based on the same idea, the embodiment of the specification further provides a facial image recognition model training device. Fig. 4 is a schematic structural diagram of a facial image recognition model training device provided in an embodiment of this specification, where the training device includes:
the system comprises a first obtaining module 401, wherein the first obtaining module 401 is used for obtaining a first training sample, and the first training sample is a face image;
a second obtaining module 402, where the second obtaining module 402 is configured to obtain a second training sample, where the second training sample is a partial face image; the partial face image is an image of a partial face region containing a face image in the first training sample;
a first training module 403, where the first training module 403 is configured to train with the first training sample to obtain a first recognition model;
a second training module 404, where the second training module 404 is configured to train with the second training sample to obtain a second recognition model;
and a third training module 405, wherein the third training module 405 is configured to perform distillation learning on the first recognition model and the second recognition model to obtain a face image recognition model.
Further, the first obtaining module 401 is specifically configured to: detecting the face position in the face image, carrying out normalization processing on the face image according to the detected face position to obtain a face image with a preset size, and taking the face image with the preset size as a first training sample.
Further, the second obtaining module 402 is specifically configured to: and carrying out normalization processing on the partial face images to obtain partial face images with preset sizes, and taking the partial face images with the preset sizes as second training samples.
Further, the partial face image is: the image processing method comprises one or more of a partial face image containing periocular regions, a partial face image containing left-eye regions, a partial face image containing right-eye regions, a partial face image containing ear regions, and a partial face image containing face mole regions.
Further, the third training module 405 is specifically configured to: taking the second recognition model as a model to be trained, and taking a distance function between the output of the first recognition model and the output of the second recognition model as a loss function of the model to be trained; and taking the first training sample and the second training sample as total training samples, and training the model to be trained by using the total training samples to obtain a face image recognition model.
For a detailed example of the facial image recognition model training device, refer to the above description of the facial image recognition model training method, which is not repeated herein.
On the basis, the specification also provides a face image recognition device. Fig. 5 is a schematic structural diagram of a face image recognition apparatus provided in an embodiment of the present specification, where the face image recognition apparatus includes:
the acquiring unit 501, the acquiring unit 501 is used for acquiring a face image to be recognized;
the processing unit 502, the processing unit 502 is used for preprocessing the face image to be recognized;
and the recognition unit 503 is configured with a pre-trained face image recognition model, and is used for recognizing the pre-processed image to be recognized according to the face image recognition model to obtain a recognition result. The face image recognition model is obtained by pre-training according to the face image recognition model training device.
Further, the processing unit 502 is specifically configured to: under the condition that the face image to be recognized is not shielded, detecting the face position in the face image; and carrying out normalization processing on the face image according to the detected face position to obtain a face image with a preset size.
Further, the processing unit 502 is specifically configured to: and dividing the face image to be recognized into a plurality of partial face images containing partial face areas, and carrying out normalization processing on the partial face images to obtain partial face images with preset sizes.
Further, the partial face area includes: the partial face image is: the image processing method comprises one or more of a partial face image containing periocular regions, a partial face image containing left-eye regions, a partial face image containing right-eye regions, a partial face image containing ear regions, and a partial face image containing face mole regions.
For a detailed example of the facial image recognition device, refer to the above description of the facial image recognition method, which is not repeated herein.
An embodiment of the present specification further provides an electronic device, including: at least one processing and memory; the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to perform the above-described facial image recognition model training method, and the above-described facial image recognition method.
The embodiment of the specification also provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions, when executed by a processor, implement the above facial image recognition model training method and the above facial image recognition method.
While certain embodiments of the present disclosure have been described above, other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily have to be in the particular order shown or in sequential order to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, device, and non-volatile computer-readable storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and in relation to the description, reference may be made to some portions of the description of the method embodiments.
The apparatus, the device, the nonvolatile computer readable storage medium, and the method provided in the embodiments of the present specification correspond to each other, and therefore, the apparatus, the device, and the nonvolatile computer storage medium also have similar advantageous technical effects to the corresponding method.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Language Description Language), traffic, pl (core unified Programming Language), HDCal, JHDL (Java Hardware Description Language), langue, Lola, HDL, laspam, hardsradware (Hardware Description Language), vhjhd (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, the present specification embodiments may be provided as a method, system, or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The above description is only an example of the present specification, and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims (20)
1. A training method for a face image recognition model comprises the following steps:
acquiring a first training sample, wherein the first training sample is a face image;
acquiring a second training sample, wherein the second training sample is a partial face image; the partial face image is an image of a partial face region containing a face image in the first training sample;
training by using the first training sample to obtain a first recognition model;
training by using the second training sample to obtain a second recognition model;
and carrying out distillation learning on the first recognition model and the second recognition model to obtain a face image recognition model.
2. The training method according to claim 1, wherein the obtaining of the first training sample specifically comprises:
detecting a face position in the face image;
according to the detected face position, carrying out normalization processing on the face image to obtain a face image with a preset size;
and taking the face image with the preset size as a first training sample.
3. The training method according to claim 1, wherein obtaining a second training sample specifically comprises:
normalizing the partial face image to obtain a partial face image with a preset size;
and taking the part of the face image with the preset size as a second training sample.
4. The training method of claim 1, the partial face image being: the image processing method comprises one or more of a partial face image containing periocular regions, a partial face image containing left-eye regions, a partial face image containing right-eye regions, a partial face image containing ear regions, and a partial face image containing face mole regions.
5. The training method according to any one of claims 1 to 4, wherein the distilling learning of the first recognition model and the second recognition model to obtain a face image recognition model comprises:
taking the second recognition model as a model to be trained, and taking a distance function between the output of the first recognition model and the output of the second recognition model as a loss function of the model to be trained;
and taking the first training sample and the second training sample as total training samples, and training the model to be trained by using the total training samples to obtain a face image recognition model.
6. A face image recognition method comprises the following steps:
acquiring a face image to be recognized;
preprocessing the face image to be recognized;
inputting the preprocessed image into a pre-trained face image recognition model to obtain a recognition result;
the facial image recognition model is obtained by pre-training according to the facial image recognition model training method of any one of claims 1 to 5.
7. The method of claim 6, wherein the preprocessing the face image to be recognized comprises:
under the condition that the face image to be recognized is not shielded, detecting the face position in the face image;
and carrying out normalization processing on the face image according to the detected face position to obtain a face image with a preset size.
8. The method of claim 6, wherein the preprocessing the face image to be recognized comprises:
dividing the face image to be recognized into a plurality of partial face images containing partial face areas;
and carrying out normalization processing on the partial face image to obtain a partial face image with a preset size.
9. The method of claim 8, the partial-face image being: the image processing method comprises one or more of a partial face image containing periocular regions, a partial face image containing left-eye regions, a partial face image containing right-eye regions, a partial face image containing ear regions, and a partial face image containing face mole regions.
10. A facial image recognition model training device comprises:
the system comprises a first acquisition module, a second acquisition module and a processing module, wherein the first acquisition module is used for acquiring a first training sample, and the first training sample is a face image;
the second acquisition module is used for acquiring a second training sample, and the second training sample is a partial face image; the partial face image is an image of a partial face region containing a face image in the first training sample;
the first training module is used for training by using the first training sample to obtain a first recognition model;
the second training module is used for training by using the second training sample to obtain a second recognition model;
and the third training module is used for distilling and learning the first recognition model and the second recognition model to obtain a face image recognition model.
11. The training device of claim 10, wherein the first obtaining module is specifically configured to: detecting the face position in the face image, carrying out normalization processing on the face image according to the detected face position to obtain a face image with a preset size, and taking the face image with the preset size as a first training sample.
12. The training device of claim 10, wherein the second obtaining module is specifically configured to: and carrying out normalization processing on the partial face images to obtain partial face images with preset sizes, and taking the partial face images with the preset sizes as second training samples.
13. The training device of claim 10, the partial face image being: the image processing method comprises one or more of a partial face image containing periocular regions, a partial face image containing left-eye regions, a partial face image containing right-eye regions, a partial face image containing ear regions, and a partial face image containing face mole regions.
14. Training device according to any one of claims 10 to 13, the third training module being in particular configured to:
taking the second recognition model as a model to be trained, and taking a distance function between the output of the first recognition model and the output of the second recognition model as a loss function of the model to be trained;
and taking the first training sample and the second training sample as total training samples, and training the model to be trained by using the total training samples to obtain a face image recognition model.
15. A face image recognition apparatus comprising:
the device comprises an acquisition unit, a recognition unit and a processing unit, wherein the acquisition unit is used for acquiring a face image to be recognized;
the processing unit is used for preprocessing the face image to be recognized;
the recognition unit is provided with a pre-trained face image recognition model and is used for recognizing the preprocessed image according to the face image recognition model to obtain a recognition result;
the facial image recognition model is obtained by pre-training according to the facial image recognition model training device of any one of claims 10 to 14.
16. The apparatus according to claim 15, the processing unit being specifically configured to:
under the condition that the face image to be recognized is not shielded, detecting the face position in the face image;
and carrying out normalization processing on the face image according to the detected face position to obtain a face image with a preset size.
17. The apparatus according to claim 15, the processing unit being specifically configured to: and dividing the face image to be recognized into a plurality of partial face images containing partial face areas, and carrying out normalization processing on the partial face images to obtain partial face images with preset sizes.
18. The apparatus of claim 17, the partial face region comprising: the partial face image is: the image processing method comprises one or more of a partial face image containing periocular regions, a partial face image containing left-eye regions, a partial face image containing right-eye regions, a partial face image containing ear regions, and a partial face image containing face mole regions.
19. An electronic device, comprising: at least one processing and memory;
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the facial image recognition model training method of any one of claims 1 to 5 and the facial image recognition method of any one of claims 6 to 9.
20. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the facial image recognition model training method of any one of claims 1 to 5 and the facial image recognition method of any one of claims 6 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010662642.3A CN111553333B (en) | 2020-07-10 | 2020-07-10 | Face image recognition model training method, recognition method, device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010662642.3A CN111553333B (en) | 2020-07-10 | 2020-07-10 | Face image recognition model training method, recognition method, device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111553333A true CN111553333A (en) | 2020-08-18 |
CN111553333B CN111553333B (en) | 2020-10-16 |
Family
ID=72002221
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010662642.3A Active CN111553333B (en) | 2020-07-10 | 2020-07-10 | Face image recognition model training method, recognition method, device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111553333B (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112070163A (en) * | 2020-09-09 | 2020-12-11 | 北京字节跳动网络技术有限公司 | Image segmentation model training and image segmentation method, device and equipment |
CN112149741A (en) * | 2020-09-25 | 2020-12-29 | 北京百度网讯科技有限公司 | Training method and device of image recognition model, electronic equipment and storage medium |
CN112364827A (en) * | 2020-11-30 | 2021-02-12 | 腾讯科技(深圳)有限公司 | Face recognition method and device, computer equipment and storage medium |
CN112418190A (en) * | 2021-01-21 | 2021-02-26 | 成都点泽智能科技有限公司 | Mobile terminal medical protective shielding face recognition method, device, system and server |
CN112434807A (en) * | 2020-11-24 | 2021-03-02 | 上海鹰瞳医疗科技有限公司 | Deep learning model performance verification method and equipment |
CN112651342A (en) * | 2020-12-28 | 2021-04-13 | 中国平安人寿保险股份有限公司 | Face recognition method and device, electronic equipment and storage medium |
CN112766208A (en) * | 2021-01-28 | 2021-05-07 | 北京三快在线科技有限公司 | Model training method and device |
CN112990101A (en) * | 2021-04-14 | 2021-06-18 | 深圳市罗湖医院集团 | Facial organ positioning method based on machine vision and related equipment |
CN113111804A (en) * | 2021-04-16 | 2021-07-13 | 北京房江湖科技有限公司 | Face detection method and device, electronic equipment and storage medium |
CN113362243A (en) * | 2021-06-03 | 2021-09-07 | Oppo广东移动通信有限公司 | Model training method, image processing method and apparatus, medium, and electronic device |
CN115116147A (en) * | 2022-06-06 | 2022-09-27 | 马上消费金融股份有限公司 | Image recognition, model training, living body detection method and related device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108304823A (en) * | 2018-02-24 | 2018-07-20 | 重庆邮电大学 | A kind of expression recognition method based on two-fold product CNN and long memory network in short-term |
US20180268203A1 (en) * | 2017-03-17 | 2018-09-20 | Nec Laboratories America, Inc. | Face recognition system for face recognition in unlabeled videos with domain adversarial learning and knowledge distillation |
CN109063565A (en) * | 2018-06-29 | 2018-12-21 | 中国科学院信息工程研究所 | A kind of low resolution face identification method and device |
CN110598603A (en) * | 2019-09-02 | 2019-12-20 | 深圳力维智联技术有限公司 | Face recognition model acquisition method, device, equipment and medium |
CN110956158A (en) * | 2019-12-12 | 2020-04-03 | 中山大学 | Pedestrian shielding re-identification method based on teacher and student learning frame |
CN111259692A (en) * | 2018-11-30 | 2020-06-09 | 上海耕岩智能科技有限公司 | Biological characteristic analysis method, storage medium and neural network |
-
2020
- 2020-07-10 CN CN202010662642.3A patent/CN111553333B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180268203A1 (en) * | 2017-03-17 | 2018-09-20 | Nec Laboratories America, Inc. | Face recognition system for face recognition in unlabeled videos with domain adversarial learning and knowledge distillation |
CN108304823A (en) * | 2018-02-24 | 2018-07-20 | 重庆邮电大学 | A kind of expression recognition method based on two-fold product CNN and long memory network in short-term |
CN109063565A (en) * | 2018-06-29 | 2018-12-21 | 中国科学院信息工程研究所 | A kind of low resolution face identification method and device |
CN111259692A (en) * | 2018-11-30 | 2020-06-09 | 上海耕岩智能科技有限公司 | Biological characteristic analysis method, storage medium and neural network |
CN110598603A (en) * | 2019-09-02 | 2019-12-20 | 深圳力维智联技术有限公司 | Face recognition model acquisition method, device, equipment and medium |
CN110956158A (en) * | 2019-12-12 | 2020-04-03 | 中山大学 | Pedestrian shielding re-identification method based on teacher and student learning frame |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112070163A (en) * | 2020-09-09 | 2020-12-11 | 北京字节跳动网络技术有限公司 | Image segmentation model training and image segmentation method, device and equipment |
CN112070163B (en) * | 2020-09-09 | 2023-11-24 | 抖音视界有限公司 | Image segmentation model training and image segmentation method, device and equipment |
CN112149741A (en) * | 2020-09-25 | 2020-12-29 | 北京百度网讯科技有限公司 | Training method and device of image recognition model, electronic equipment and storage medium |
CN112149741B (en) * | 2020-09-25 | 2024-04-16 | 北京百度网讯科技有限公司 | Training method and device for image recognition model, electronic equipment and storage medium |
CN112434807A (en) * | 2020-11-24 | 2021-03-02 | 上海鹰瞳医疗科技有限公司 | Deep learning model performance verification method and equipment |
CN112364827B (en) * | 2020-11-30 | 2023-11-10 | 腾讯科技(深圳)有限公司 | Face recognition method, device, computer equipment and storage medium |
CN112364827A (en) * | 2020-11-30 | 2021-02-12 | 腾讯科技(深圳)有限公司 | Face recognition method and device, computer equipment and storage medium |
CN112651342A (en) * | 2020-12-28 | 2021-04-13 | 中国平安人寿保险股份有限公司 | Face recognition method and device, electronic equipment and storage medium |
CN112418190A (en) * | 2021-01-21 | 2021-02-26 | 成都点泽智能科技有限公司 | Mobile terminal medical protective shielding face recognition method, device, system and server |
CN112766208A (en) * | 2021-01-28 | 2021-05-07 | 北京三快在线科技有限公司 | Model training method and device |
CN112990101A (en) * | 2021-04-14 | 2021-06-18 | 深圳市罗湖医院集团 | Facial organ positioning method based on machine vision and related equipment |
CN112990101B (en) * | 2021-04-14 | 2021-12-28 | 深圳市罗湖医院集团 | Facial organ positioning method based on machine vision and related equipment |
CN113111804A (en) * | 2021-04-16 | 2021-07-13 | 北京房江湖科技有限公司 | Face detection method and device, electronic equipment and storage medium |
CN113111804B (en) * | 2021-04-16 | 2024-06-04 | 贝壳找房(北京)科技有限公司 | Face detection method and device, electronic equipment and storage medium |
CN113362243A (en) * | 2021-06-03 | 2021-09-07 | Oppo广东移动通信有限公司 | Model training method, image processing method and apparatus, medium, and electronic device |
CN113362243B (en) * | 2021-06-03 | 2024-06-11 | Oppo广东移动通信有限公司 | Model training method, image processing method and device, medium and electronic equipment |
CN115116147B (en) * | 2022-06-06 | 2023-08-08 | 马上消费金融股份有限公司 | Image recognition, model training, living body detection method and related device |
CN115116147A (en) * | 2022-06-06 | 2022-09-27 | 马上消费金融股份有限公司 | Image recognition, model training, living body detection method and related device |
Also Published As
Publication number | Publication date |
---|---|
CN111553333B (en) | 2020-10-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111553333B (en) | Face image recognition model training method, recognition method, device and electronic equipment | |
CN107358157B (en) | Face living body detection method and device and electronic equipment | |
CN112800997B (en) | Living body detection method, device and equipment | |
CN110363091B (en) | Face recognition method, device and equipment under side face condition and storage medium | |
CN106709404B (en) | Image processing apparatus and image processing method | |
CN111340014B (en) | Living body detection method, living body detection device, living body detection apparatus, and storage medium | |
CN112070015B (en) | Face recognition method, system, device and medium fusing occlusion scene | |
CN112052834B (en) | Face recognition method, device and equipment based on privacy protection | |
CN107977634A (en) | A kind of expression recognition method, device and equipment for video | |
CN111523431B (en) | Face recognition method, device and equipment | |
CN111091112B (en) | Living body detection method and device | |
CN111291797A (en) | Anti-counterfeiting identification method and device and electronic equipment | |
CN112347512A (en) | Image processing method, device, equipment and storage medium | |
CN115830690A (en) | Traffic image desensitization method and equipment | |
CN111368795B (en) | Face feature extraction method, device and equipment | |
CN116229531A (en) | Face front image synthesis method for collaborative progressive generation countermeasure network | |
CN114998962A (en) | Living body detection and model training method and device | |
CN112464827B (en) | Mask wearing recognition method, device, equipment and storage medium | |
CN116110110A (en) | Fake image detection method, terminal and storage medium based on face key points | |
CN115240096A (en) | Visual auxiliary method | |
CN111368813B (en) | Motion blurred image identification method and device, electronic equipment and payment equipment | |
CN115984154A (en) | Image fusion method and device, storage medium and electronic equipment | |
KR20140134844A (en) | Method and device for photographing based on objects | |
CN111652074A (en) | Face recognition method, device, equipment and medium | |
CN114973426B (en) | Living body detection method, device and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |