CN111046792A - Face detection method and device, electronic equipment and computer readable storage medium - Google Patents

Face detection method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN111046792A
CN111046792A CN201911268526.7A CN201911268526A CN111046792A CN 111046792 A CN111046792 A CN 111046792A CN 201911268526 A CN201911268526 A CN 201911268526A CN 111046792 A CN111046792 A CN 111046792A
Authority
CN
China
Prior art keywords
face
image
detection model
detected
full convolution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911268526.7A
Other languages
Chinese (zh)
Inventor
王豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shengjing Intelligent Technology Jiaxing Co ltd
Original Assignee
Hunan Sany Intelligent Control Equipment Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan Sany Intelligent Control Equipment Co Ltd filed Critical Hunan Sany Intelligent Control Equipment Co Ltd
Priority to CN201911268526.7A priority Critical patent/CN111046792A/en
Publication of CN111046792A publication Critical patent/CN111046792A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • 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
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C1/00Registering, indicating or recording the time of events or elapsed time, e.g. time-recorders for work people
    • G07C1/10Registering, indicating or recording the time of events or elapsed time, e.g. time-recorders for work people together with the recording, indicating or registering of other data, e.g. of signs of identity

Landscapes

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

Abstract

The embodiment of the invention provides a face detection method, a face detection device, electronic equipment and a computer readable storage medium, and relates to the field of computer vision, wherein the face detection method comprises the following steps: acquiring an image of a snapshot machine, wherein the image comprises a face to be detected; and inputting the image into a pre-trained full convolution network detection model to obtain a face boundary box of the face to be detected. Therefore, according to the technical scheme provided by the embodiment, the full convolution network detection model based on the FCN network structure is directly adopted for face detection aiming at the image shot by the snapshot machine, so that the problem of high time consumption caused by the dependence of a face detection mode based on the FPN network on a characteristic pyramid structure and a multi-anchor strategy in the prior art is solved, and the detection speed is improved.

Description

Face detection method and device, electronic equipment and computer readable storage medium
Technical Field
The invention relates to the field of computer vision, in particular to a face detection method, a face detection device, electronic equipment and a computer readable storage medium.
Background
In the staff attendance system applying the face recognition, the face detection is the basis of the face recognition, and the accuracy of the face detection directly determines the accuracy of the face recognition.
At present, an existing staff attendance system firstly acquires an image by using a snapshot machine, and then performs face detection based on a face detection algorithm of a FPN (feature pyramid Network) to complete card punching.
However, in the face attendance system, most of the images acquired by the snapshot machine are 1 face, and under the condition that the face scale change is small, the feature pyramid structure and the multi-anchor strategy of the FPN-based face detection algorithm cause more time consumption, and the detection speed is low.
Disclosure of Invention
In view of the above, the present invention provides a face detection method, a face detection apparatus, an electronic device, and a computer-readable storage medium.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment of the present invention provides a face detection method, including:
acquiring an image of a snapshot machine, wherein the image comprises a face to be detected;
and determining the face boundary frame of the face to be detected according to the image by applying a pre-trained full convolution network detection model.
In an optional embodiment, the determining, by using a pre-trained full convolution network detection model, a face bounding box of the face to be detected according to the image includes:
applying the pre-trained full convolution network detection model and outputting bias characteristics according to the image; the bias feature is used for representing the bias of the corner points of the face boundary box of the face to be detected relative to the center of the image;
determining the face bounding box based on the biased features.
In an alternative embodiment, the bias feature comprises a bias coordinate; the offset coordinates are used for representing the offset of the corner point coordinates of the face boundary box of the face to be detected relative to the central coordinates of the image;
alternatively, the first and second electrodes may be,
the offset feature comprises an offset distance; the offset distance is used for representing the distance between the boundary line of the face boundary frame of the face to be detected and the center of the image.
In an optional embodiment, the determining, by using a pre-trained full convolution network detection model, a face bounding box of the face to be detected according to the image includes:
detecting the image by applying a pre-trained full convolution network detection model to obtain a human face boundary box to be confirmed;
determining the face key points of the face to be detected according to the image by applying a pre-trained key point detection model;
and if the face key point is in the face boundary box to be confirmed, determining the face boundary box to be confirmed as the face boundary box of the face to be detected.
In an alternative embodiment, the method further comprises:
and carrying out duplication removal processing on the face boundary frame of the face to be detected to obtain a target face boundary frame.
In a second aspect, an embodiment of the present invention provides a face detection method, including:
acquiring training sample data; the training sample data comprises image samples of a plurality of snapshot machines, and the image samples comprise a predetermined face boundary box and pixel-level labels of corner points of the face boundary box;
and applying the training sample data to train the initial full convolution network detection model to obtain the trained full convolution network detection model.
In an alternative embodiment, the image sample further comprises a predetermined pixel-level annotation of a face keypoint; the method further comprises the following steps:
and applying the training sample data to train the initial key point detection model to obtain the trained key point detection model.
In a third aspect, an embodiment of the present invention provides a face detection apparatus, including:
the acquisition module is used for acquiring an image of the snapshot machine, wherein the image comprises a face to be detected;
and the output module is used for applying a pre-trained full convolution network detection model and determining the face boundary frame of the face to be detected according to the image.
In a fourth aspect, an embodiment of the present invention provides an electronic device, including: a processor and a memory; the processor is connected with the memory;
the memory is used for storing programs;
the processor is configured to execute a program stored in the memory to perform the method of any of the preceding embodiments.
In a fifth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the method according to any one of the foregoing embodiments.
The embodiment of the invention has the following beneficial effects: the embodiment of the invention provides a face detection method, a face detection device, electronic equipment and a computer readable storage medium, wherein the face detection method comprises the following steps: acquiring an image of a snapshot machine, wherein the image comprises a face to be detected; and determining the face boundary frame of the face to be detected according to the image by applying a pre-trained full convolution network detection model. Therefore, according to the technical scheme provided by the embodiment, the full convolution network detection model based on the FCN network structure is directly adopted for face detection aiming at the image shot by the snapshot machine, so that the problem of high time consumption caused by the dependence of a face detection mode based on the FPN network on a characteristic pyramid structure and a multi-anchor strategy in the prior art is solved, and the detection speed is improved.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 shows a flowchart of a face detection method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another face detection method provided by the embodiment of the invention;
FIG. 3 is a schematic diagram illustrating a face detection method according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating a face detection apparatus according to an embodiment of the present invention;
fig. 5 is a flow chart showing an actual process of a face detection apparatus according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of another face detection apparatus according to an embodiment of the present invention;
fig. 7 shows a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It is noted that relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The face detection is the basis of face recognition, and the accuracy of face detection directly determines the accuracy of face recognition. At present, an existing employee face card-punching attendance system firstly acquires an image by using a snapshot machine, then acquires a face image and face key points based on a face detection algorithm of an FPN network, finally aligns the face image by using the key points, inputs the face image into an identification network to extract face features, retrieves similarity with the face features of a base, and completes face identification card punching.
However, in the face attendance system, the image of the snapshot machine is obtained by outwardly expanding a certain multiple of the face area, and only a single face is arranged on each image, so that the size of the image obtained by the snapshot machine is not changed greatly and is in a certain proportion to the size of the face.
Based on this, the face detection method, the face detection device, the electronic device and the computer-readable storage medium provided by the embodiment of the invention combine the characteristic that the face size of the image of the snapshot machine is relatively fixed, and perform face detection by adopting the full convolution network detection model based on the network structure of the FCN, so that the problem of much time consumption caused by dependence on the feature pyramid structure and the multi-anchor strategy in the face detection mode based on the FPN network in the prior art is solved, and the detection speed is improved.
The term anchor mentioned above means various bounding boxes that can be acquired in advance to better fit the detected object according to the kind and size of the object to be detected.
Referring to fig. 1, an embodiment of the present application provides a face detection method, which belongs to the field of computer vision and is executed by electronic equipment in the field.
Specifically, the method is applied to a face detection stage and comprises the following steps:
step S102, acquiring an image of a snapshot machine, wherein the image comprises a face to be detected;
and step S104, determining a face boundary frame of the face to be detected according to the image by applying a pre-trained full convolution network detection model.
In step S102, the image refers to an image to be detected or a target image, and the image captured by the capturing machine is used as a network input.
For step S104, after the image shot by the snapshot machine is acquired, the image shot by the snapshot machine is input into a pre-trained full convolution network detection model, and the full convolution network detection model can detect the face to be detected therein according to the image, and output a face boundary box of the face to be detected, wherein the face boundary box indicates a detected face region, and defines a face detection range.
The face detection method provided by the embodiment of the invention comprises the steps of obtaining an image of a snapshot machine, wherein the image comprises a face to be detected; and determining the face boundary frame of the face to be detected according to the image by applying a pre-trained full convolution network detection model. According to the method, the image of the snapshot machine is obtained, and the characteristic that the face size of the snapshot machine is fixed is combined, the trained full convolution network detection model based on the FCN network structure is directly adopted to detect the input image of the snapshot machine, so that time consumption caused by a characteristic pyramid structure and a multi-anchor strategy is avoided, and the detection speed is improved.
Alternatively, the step S104 may be performed by:
a, applying the pre-trained full convolution network detection model and outputting bias characteristics according to the image; the bias feature is used for representing the bias of the corner points of the face boundary box of the face to be detected relative to the center of the image;
and B, determining the face bounding box based on the bias characteristics.
Wherein the bias feature comprises a bias coordinate; the offset coordinates are used for representing the offset of the corner point coordinates of the face boundary box of the face to be detected relative to the central coordinates of the image;
alternatively, the first and second electrodes may be,
the offset feature comprises an offset distance; the offset distance is used for representing the distance between the boundary line of the face boundary frame of the face to be detected and the center of the image.
Accordingly, step a may be performed by one of the following:
the first method is as follows:
1. applying the pre-trained full convolution network detection model, and outputting a bias coordinate according to the image, wherein the bias coordinate is used for representing the bias of the corner point coordinate of the face boundary box of the face to be detected relative to the center coordinate of the image;
2. and determining the corner coordinates of the face bounding box and the face bounding box based on the offset coordinates and the central coordinates of the image, wherein the corner coordinates of the face bounding box and the face bounding box can be determined in two directions.
The second method comprises the following steps:
1) and outputting an offset distance according to the image by using the pre-trained full convolution network detection model, wherein the offset distance is used for representing the distance between the boundary line of the face boundary frame of the face to be detected and the center of the image.
2) Determining the boundary line of the face boundary frame and the face boundary frame based on the offset distance and the center of the image, wherein the boundary line of the face boundary frame and the face boundary frame can also be determined in two directions.
In consideration of the fact that the center of the face of the image of the snapshot machine is located at the center of the image, and the size of the image is in a certain proportion to the size of the face of the person, the face bounding box of the embodiment is rectangular and is provided with four corner points and four boundary lines; therefore, the offset change of the four corner points of the face bounding box in each picture relative to the image center is small, so that the offset of the four corner points of the face bounding box relative to the image center is directly used as the output of the network, the selection of an anchor is further avoided, and the detection speed is further improved.
Optionally, the step S104 includes:
(1) detecting the image by applying a pre-trained full convolution network detection model to obtain a human face boundary box to be confirmed;
(2) determining the face key points of the face to be detected according to the image by applying a pre-trained key point detection model;
(3) and if the face key point is in the face boundary box to be confirmed, determining the face boundary box to be confirmed as the face boundary box of the face to be detected.
The human face key points comprise a left eye, a right eye, a nose tip, a left mouth corner and a right mouth corner.
The face boundary box of the face to be detected can be determined through the face key points and the face boundary box to be confirmed, wherein the face key points are required to fall into the range of the face boundary box, and the detection precision of the face image can be ensured through mutual comparison of the face key points and the face boundary box to be confirmed.
According to the scheme, through the steps (1) - (3), the detection efficiency can be improved on the premise of ensuring the detection precision of the face image of the snapshot machine.
Optionally, the method further includes:
and a duplication removing step, namely carrying out duplication removing treatment on the face boundary frame of the face to be detected to obtain a target face boundary frame.
For example, the face bounding box may be subjected to deduplication processing by an image deduplication algorithm, so as to obtain a target face bounding box.
Specifically, the deduplication step may be performed by:
and A, carrying out deduplication processing on the face boundary box by using an NMS (Non-Maximum Suppression) algorithm, and eliminating repeated and overlapped boundary boxes to obtain a target face boundary box.
And B, acquiring the corner coordinates of the target face boundary box according to the image size (image center point coordinates) and a preset calculation formula, thereby determining and obtaining the accurate position of the corner of the face boundary box. Taking the bias characteristic as a bias coordinate as an example, the calculation formula is as follows:
Figure BDA0002313532680000101
in the formula (t)x,ty) Representing offset coordinates, (x, y) representing corner coordinates of a face bounding box, (c)x,cy) Representing the center coordinates of the image.
In the duplication removing step, after the target face boundary frame is obtained, the formula (1) is used for operation, and then the corner point coordinates of the face boundary frame can be determined, so that the calculation amount is reduced, the problems of resource waste and high hardware cost requirement caused by occupation of calculation resources are solved, and the detection efficiency is improved.
The application of the trained full-convolution network detection model in the actual use process is introduced above, namely the application of the trained full-convolution network detection model in the acquisition of the human face bounding box. It can be understood that, before the image to be detected (also referred to as a target image) of the snapshot machine is input into the trained full convolution network detection model, the trained full convolution network detection model is obtained first, that is, the full convolution network detection model is trained first, that is, the full convolution network detection model is applied to a network training stage to obtain the full convolution network detection model.
Referring to fig. 2, an embodiment of the present invention further provides a face detection method applied in a network training phase, where the method includes:
step S202, acquiring training sample data; the training sample data comprises image samples of a plurality of snapshot machines, and the image samples comprise a predetermined face boundary box and pixel-level labels of corner points of the face boundary box;
and step S204, applying the training sample data to train the initial full convolution network detection model to obtain the trained full convolution network detection model.
For step S202, the training sample data includes, but is not limited to, images of a snapshot machine in which a face bounding box and corner coordinates of the face bounding box are marked in advance; the image samples in the training phase may also be referred to as sample images.
It should be explained that in training the full convolution network detection model, the input data for the model is the image of the snapshot machine that has been previously labeled by the training person with the face bounding box (e.g., the solid line portion in fig. 3) and the corner coordinates of the face bounding box (the corner coordinates schematically identifying the upper left corner of the face bounding box in fig. 3), and the output data is the face bounding box on the image. The purpose of training is to obtain a proper weight between input and output, so that the full convolution network detection model can accurately output the face bounding box.
Optionally, step S204 is to apply the training sample data to train the initial full convolution network detection model to obtain a trained full convolution network detection model, and may be implemented by the following steps:
a, obtaining a bias coordinate based on the corner coordinates of the face bounding box and the central coordinates of the image, wherein the bias coordinate is used for representing the bias of the corner coordinates of the face bounding box relative to the central coordinates of the image;
and b, inputting the offset coordinates as image labels into the FCN for training to obtain a trained full convolution network detection model.
In step a, the offset coordinates are used to represent the offset of the corner coordinates of the face bounding box with respect to the center coordinates of the image.
Optionally, the step a is performed by:
and calculating the corner coordinates of the face bounding box and the center coordinates of the image to obtain offset coordinates by substituting the following formula (1):
Figure BDA0002313532680000121
in the formula (t)x,ty) Representing offset coordinates, (x, y) representing corner coordinates of a face bounding box, (c)x,cy) Representing the center coordinates of the image.
Alternatively to this, the first and second parts may,
the image sample also comprises a predetermined pixel level label of the key point of the human face; the method further comprises the following steps:
and applying the training sample data to train the initial key point detection model to obtain the trained key point detection model.
The above-described key point detection model may be an object detection model based on the FCN network structure.
In other words, the training sample data further comprises face key point coordinates marked in advance on the image of the snapshot machine; the method further comprises the following steps: and inputting the coordinates of the key points of the human face as the image labels into the FCN for training to obtain a key point detection model.
Of course, it should be understood that the face key points may be obtained by using an existing face key point detection algorithm or a face key point recognition algorithm.
Optionally, in order to eliminate an adverse error caused by the heterogeneous sample data, after the training sample data is acquired, the method further includes: the training sample data is normalized so that the pixels of the image in the training sample data are in [0, 1 ].
According to the face detection method provided by the embodiment, the full convolution network detection model is obtained through the training of the steps, the face detection can be directly carried out on the image to be detected of the snapshot machine, namely the image to be detected is input, and the face boundary frame can be output.
For ease of understanding, the complete training process of the full convolution network detection model is described below with reference to fig. 3:
referring to fig. 3, for the network training phase, coordinates (x, y) of each of four corner points of the pre-marked face bounding box and center coordinates (c) of an image directly read from the captured image are usedx,cy) Dividing, calculating to obtain offset coordinates (t) of four corner pointsx,ty) And the angular point offset calculation formula is shown as a formula (1), and the angular point offset calculation formula and 5 pre-marked personal face key points are used as image labels and input into an FCN network structure for training to obtain a full convolution network detection model.
It should be noted that, in fig. 3, the face bounding box is schematically represented by a rectangle, and in other embodiments, the face bounding box may also be represented by a circle, an ellipse, or the like as needed, and the present application is not limited in particular.
Referring to fig. 4, based on the same inventive concept, an embodiment of the present application further provides a face detection apparatus 400, which is applied to a face attendance system, and includes an acquisition module 401 and an output module 402;
the acquisition module 401 is configured to acquire an image of a snapshot machine, where the image includes a face to be detected; the image here refers to an image to be detected.
The output module 402 is configured to apply a pre-trained full convolution network detection model, and determine a face bounding box of the face to be detected according to the image.
Optionally, the output module 402 is configured to apply the pre-trained full convolution network detection model, and output a bias feature according to the image; the bias feature is used for representing the bias of the corner points of the face boundary box of the face to be detected relative to the center of the image; determining the face bounding box based on the biased features.
Optionally, the bias feature comprises a bias coordinate; the offset coordinates are used for representing the offset of the corner point coordinates of the face boundary box of the face to be detected relative to the central coordinates of the image; alternatively, the offset feature comprises an offset distance; the offset distance is used for representing the distance between the boundary line of the face boundary frame of the face to be detected and the center of the image.
Optionally, the output module 402 is configured to apply a pre-trained full convolution network detection model to detect the image, so as to obtain a face bounding box to be confirmed;
determining the face key points of the face to be detected according to the image by applying a pre-trained key point detection model;
and if the face key point is in the face boundary box to be confirmed, determining the face boundary box to be confirmed as the face boundary box of the face to be detected.
Optionally, the apparatus further includes a duplicate removal module 403, configured to perform duplicate removal processing on the face bounding box of the to-be-detected face to obtain a target face bounding box.
The following describes an actual detection process of the face detection apparatus provided in the embodiment of the present invention with reference to fig. 5:
referring to fig. 5, for the trained network structure of the full convolution network detection model, the snapshot image obtained by the snapshot machine is used as the input of the model, the offset of the corner points representing the offset of the corner points of the face bounding box relative to the center of the image is output, the coordinates of 5 key points of the face are output, finally, the repeated overlapped bounding boxes are eliminated by the NMS algorithm, the target face bounding box is obtained, and the accurate position result of the corner points of the target face bounding box is obtained according to the image size and the calculation formula (1).
Referring to fig. 6, the present embodiment further provides another face detection apparatus 600, including:
a plurality of sample blocks 601 for acquiring training sample data; the training sample data comprises image samples of a plurality of snapshot machines, and the image samples comprise a predetermined face boundary box and pixel-level labels of corner points of the face boundary box;
a training module 602, configured to apply the training sample data to train the initial full convolution network detection model, so as to obtain a trained full convolution network detection model.
Optionally, the image sample further includes a predetermined pixel-level annotation of a face key point; a training module 602, configured to apply the training sample data to train an initial keypoint detection model, so as to obtain a trained keypoint detection model.
It should be noted that the coordinates mentioned in this embodiment are pixel coordinates.
Referring to fig. 7, based on the same inventive concept, an embodiment of the invention further provides an electronic device 100, including: a processor 40, a memory 41, a bus 42 and a communication interface 43, wherein the processor 40, the communication interface 43 and the memory 41 are connected through the bus 42; the processor 40 is arranged to execute executable modules, such as computer programs, stored in the memory 41.
The Memory 41 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 43 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, etc. may be used.
The bus 42 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 7, but this does not indicate only one bus or one type of bus.
The memory 41 is used for storing a program, the processor 40 executes the program after receiving an execution instruction, and the method executed by the apparatus defined by the flow process disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 40, or implemented by the processor 40.
The processor 40 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 40. The Processor 40 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory 41, and the processor 40 reads the information in the memory 41 and completes the steps of the method in combination with the hardware thereof.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the face detection method provided in the foregoing embodiment are executed.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, each functional module or unit in each embodiment of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application.

Claims (10)

1. A face detection method, comprising:
acquiring an image of a snapshot machine, wherein the image comprises a face to be detected;
and determining the face boundary frame of the face to be detected according to the image by applying a pre-trained full convolution network detection model.
2. The method according to claim 1, wherein the determining the face bounding box of the face to be detected according to the image by applying a pre-trained full convolution network detection model comprises:
applying the pre-trained full convolution network detection model and outputting bias characteristics according to the image; the bias feature is used for representing the bias of the corner points of the face boundary box of the face to be detected relative to the center of the image;
determining the face bounding box based on the biased features.
3. The method of claim 2, wherein the bias features comprise bias coordinates; the offset coordinates are used for representing the offset of the corner point coordinates of the face boundary box of the face to be detected relative to the central coordinates of the image;
alternatively, the first and second electrodes may be,
the offset feature comprises an offset distance; the offset distance is used for representing the distance between the boundary line of the face boundary frame of the face to be detected and the center of the image.
4. The method according to claim 1, wherein the determining the face bounding box of the face to be detected according to the image by applying a pre-trained full convolution network detection model comprises:
detecting the image by applying a pre-trained full convolution network detection model to obtain a human face boundary box to be confirmed;
determining the face key points of the face to be detected according to the image by applying a pre-trained key point detection model;
and if the face key point is in the face boundary box to be confirmed, determining the face boundary box to be confirmed as the face boundary box of the face to be detected.
5. The method of claim 1, further comprising:
and carrying out duplication removal processing on the face boundary frame of the face to be detected to obtain a target face boundary frame.
6. A face detection method, comprising:
acquiring training sample data; the training sample data comprises image samples of a plurality of snapshot machines, and the image samples comprise a predetermined face boundary box and pixel-level labels of corner points of the face boundary box;
and applying the training sample data to train the initial full convolution network detection model to obtain the trained full convolution network detection model.
7. The method of claim 6, wherein the image samples further comprise pixel-level labels for predetermined face keypoints; the method further comprises the following steps:
and applying the training sample data to train the initial key point detection model to obtain the trained key point detection model.
8. A face detection apparatus, comprising:
the acquisition module is used for acquiring an image of the snapshot machine, wherein the image comprises a face to be detected;
and the output module is used for applying a pre-trained full convolution network detection model and determining the face boundary frame of the face to be detected according to the image.
9. An electronic device, comprising: a processor and a memory; the processor is connected with the memory;
the memory is used for storing programs;
the processor is configured to execute a program stored in the memory to perform the method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN201911268526.7A 2019-12-11 2019-12-11 Face detection method and device, electronic equipment and computer readable storage medium Pending CN111046792A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911268526.7A CN111046792A (en) 2019-12-11 2019-12-11 Face detection method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911268526.7A CN111046792A (en) 2019-12-11 2019-12-11 Face detection method and device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111046792A true CN111046792A (en) 2020-04-21

Family

ID=70235766

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911268526.7A Pending CN111046792A (en) 2019-12-11 2019-12-11 Face detection method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111046792A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104598936B (en) * 2015-02-28 2018-07-27 北京畅景立达软件技术有限公司 The localization method of facial image face key point
CN109558864A (en) * 2019-01-16 2019-04-02 苏州科达科技股份有限公司 Face critical point detection method, apparatus and storage medium
CN110276308A (en) * 2019-06-25 2019-09-24 上海商汤智能科技有限公司 Image processing method and device
CN110309706A (en) * 2019-05-06 2019-10-08 深圳市华付信息技术有限公司 Face critical point detection method, apparatus, computer equipment and storage medium
CN110490170A (en) * 2019-08-27 2019-11-22 浙江中正智能科技有限公司 A kind of face candidate frame extracting method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104598936B (en) * 2015-02-28 2018-07-27 北京畅景立达软件技术有限公司 The localization method of facial image face key point
CN109558864A (en) * 2019-01-16 2019-04-02 苏州科达科技股份有限公司 Face critical point detection method, apparatus and storage medium
CN110309706A (en) * 2019-05-06 2019-10-08 深圳市华付信息技术有限公司 Face critical point detection method, apparatus, computer equipment and storage medium
CN110276308A (en) * 2019-06-25 2019-09-24 上海商汤智能科技有限公司 Image processing method and device
CN110490170A (en) * 2019-08-27 2019-11-22 浙江中正智能科技有限公司 A kind of face candidate frame extracting method

Similar Documents

Publication Publication Date Title
CN110827247B (en) Label identification method and device
CN110705405B (en) Target labeling method and device
CN108985199B (en) Detection method and device for commodity taking and placing operation and storage medium
CN108875731B (en) Target identification method, device, system and storage medium
CN109002820B (en) License plate recognition method and device and related equipment
CN111382704B (en) Vehicle line pressing violation judging method and device based on deep learning and storage medium
CN109086734B (en) Method and device for positioning pupil image in human eye image
CN108268867B (en) License plate positioning method and device
US9916513B2 (en) Method for processing image and computer-readable non-transitory recording medium storing program
US9600736B2 (en) Pose detection using depth camera
CN104615972B (en) Intelligent identification method and device for pointer instrument
CN112434715B (en) Target identification method and device based on artificial intelligence and storage medium
CN108875500B (en) Pedestrian re-identification method, device and system and storage medium
CN112308046A (en) Method, device, server and readable storage medium for positioning text region of image
CN111680680A (en) Object code positioning method and device, electronic equipment and storage medium
CN111199198A (en) Image target positioning method, image target positioning device and mobile robot
CN111046831B (en) Poultry identification method, device and server
CN109858363B (en) Dog nose print feature point detection method, device, system and storage medium
CN111985438A (en) Static face processing method, device and equipment
CN109816709B (en) Monocular camera-based depth estimation method, device and equipment
CN111046792A (en) Face detection method and device, electronic equipment and computer readable storage medium
CN110610178A (en) Image recognition method, device, terminal and computer readable storage medium
CN113903014B (en) Lane line prediction method and device, electronic device and computer-readable storage medium
CN110782439B (en) Method and device for auxiliary detection of image annotation quality
KR20210087494A (en) Human body orientation detection method, apparatus, electronic device and computer storage medium

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230612

Address after: 314506 room 116, building 4, No. 288, development avenue, Tongxiang Economic Development Zone, Tongxiang City, Jiaxing City, Zhejiang Province

Applicant after: Shengjing Intelligent Technology (Jiaxing) Co.,Ltd.

Address before: 102200 5th floor, building 6, No.8 Beiqing Road, Changping District, Beijing

Applicant before: SANY HEAVY INDUSTRY Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200421