CN113095284A - Face selection method, device, equipment and computer readable storage medium - Google Patents

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

Info

Publication number
CN113095284A
CN113095284A CN202110480008.2A CN202110480008A CN113095284A CN 113095284 A CN113095284 A CN 113095284A CN 202110480008 A CN202110480008 A CN 202110480008A CN 113095284 A CN113095284 A CN 113095284A
Authority
CN
China
Prior art keywords
face
confidence
scene picture
human
selecting
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
CN202110480008.2A
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.)
Ping An International Smart City Technology Co Ltd
Original Assignee
Ping An International Smart City Technology 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 Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN202110480008.2A priority Critical patent/CN113095284A/en
Publication of CN113095284A publication Critical patent/CN113095284A/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/161Detection; Localisation; Normalisation
    • G06V40/165Detection; Localisation; Normalisation using facial parts and geometric relationships

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Geometry (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to an artificial intelligence technology, and discloses a face selection method, which comprises the following steps: performing face confidence calculation processing on each face in the scene picture to obtain a face confidence; selecting a face with a face confidence coefficient higher than a preset face confidence coefficient threshold value from the scene picture to obtain a first face set and a face confidence coefficient set of the first face set; determining a self-adaptive confidence coefficient threshold value through a true face confidence coefficient floating range; selecting a face with a face confidence higher than a self-adaptive confidence threshold from the first face set as a second face set; and selecting the face with the largest occupied area in the scene picture from the second face set as a face selection result of the face recognition object. The invention also relates to a block chain technology, and the preset human face confidence coefficient threshold value is stored in the block chain. The invention can solve the problems that in the prior art, the result accuracy of face selection for face recognition is poor, the possibility of deleting the real result by mistake exists and the like.

Description

Face selection method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of artificial intelligence, and in particular, to a method and an apparatus for selecting a human face, an electronic device, and a computer-readable storage medium.
Background
Face recognition is a biometric technology for identity recognition based on facial feature information of a person. A series of related technologies, also commonly called face recognition and face recognition, are used to collect images or video streams containing faces by using a camera or a video camera, automatically detect and track the faces in the images, and then perform face recognition on the detected faces. The face recognition is divided into 1 to 1 face recognition and 1 to N face recognition, wherein the 1 to 1 face recognition is the comparison of a base image picture and a face in a picture to be compared to judge whether the picture is the same person.
Face detection is an essential step in face recognition. In the process of face detection, a plurality of detection results exist, a threshold score _ th needs to be set at first, and the results which are lower than the threshold are regarded as untrustworthy results and are deleted; confidence above this threshold is high and further processing needs to be retained. Since the confidence scores of the real faces vary under different lighting environment conditions, the threshold score _ th is set slightly lower, so that the real results are not deleted.
However, in the practical application process, sometimes two or more faces appear in one picture, and at this time, one face needs to be selected, and the selection method generally includes: selecting method 1, sorting according to the scores of the confidence degrees, and then selecting the result with the highest score as output; the selection method 2 selects the largest area in the image as output.
For example, example 1 illustrates two real faces, a face with a confidence score of 0.989 being closer to the screen and a face with a confidence score of 0.997 being further from the screen; example 2 illustrates a real face (confidence score 0.9933) and a false face (confidence score 0.77), which may be a magnified photograph of a wall, a face on a screen, etc.; example 3 shows a real face under poorly lit conditions (confidence score of only 0.873).
If example 2 can be processed correctly according to the selection method 1, but example 1 cannot be processed correctly; if example 1 can be correctly processed according to the selection method 2, but example 2 cannot be correctly processed; if the threshold score _ th is raised (for example, the threshold score _ th is set to 0.9), the false faces in example 2 can be filtered out, but at the same time, the real faces in example 3 are also filtered out.
Therefore, the accuracy of the face selected by the two methods for face recognition is poor, and the possibility of deleting the real result by mistake exists.
Disclosure of Invention
The invention provides a face selection method, a face selection device, electronic equipment and a computer-readable storage medium, and mainly aims to solve the problems that in the prior art, the accuracy of a face selection result for face recognition is poor, the possibility of deleting a real result by mistake exists and the like.
In a first aspect, to achieve the above object, the present invention provides a face selection method, where the method includes:
carrying out face confidence calculation processing on each face in a scene picture with at least two faces to obtain a face confidence;
selecting a face with the face confidence higher than a preset face confidence threshold value from the scene picture to obtain a first face set and a face confidence set of the first face set;
determining a self-adaptive confidence threshold value through a real face confidence floating range according to the face confidence set of the first face set;
selecting a face with a face confidence higher than the self-adaptive confidence threshold from the first face set as a second face set;
and selecting the face with the largest occupied area in the scene picture from the second face set according to the principle of big-end-up and small-end-up, and taking the face as a face selection result of the face recognition object.
In a second aspect, to solve the above problem, the present invention further provides a face selecting apparatus, including:
the face confidence coefficient calculation module is used for calculating the face confidence coefficient of each face in the scene picture with at least two faces to obtain the face confidence coefficient;
the preset confidence screening module is used for selecting a face with the face confidence higher than a preset face confidence threshold value from the scene picture to obtain a first face set and a face confidence set of the first face set;
the self-adaptive confidence threshold determining module is used for determining a self-adaptive confidence threshold through a real face confidence floating range according to the face confidence set of the first face set;
the self-adaptive confidence screening module is used for selecting a face with a face confidence higher than the self-adaptive confidence threshold from the first face set as a second face set;
and the face area calculation module is used for selecting the face with the largest occupied area in the scene picture from the second face set according to the principle of big-end-up and small-end-up, and the face is used as the face selection result of the face recognition object.
In a third aspect, to solve the above problem, the present invention further provides an electronic apparatus, including:
a memory storing at least one instruction; and
and the processor executes the instructions stored in the memory to realize the steps of the human face selection method.
In a fourth aspect, to solve the above problem, the present invention further provides a computer-readable storage medium, where at least one instruction is stored in the computer-readable storage medium, and the at least one instruction is executed by a processor in an electronic device to implement the above-mentioned face selection method.
According to the face selection method, the face selection device, the electronic equipment and the computer readable storage medium, the face most suitable for being a face recognition object is selected finally by mutually combining the preset face confidence threshold, the adaptive confidence threshold and the principle of the near degree and the far degree according to the condition of the face confidence detection result appearing in a real scene, so that the accurate output of the face detection result is ensured, and the accuracy of the face recognition is effectively guaranteed.
Drawings
Fig. 1 is a schematic flow chart of a face selection method according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of a face selection apparatus according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an internal structure of an electronic device for implementing a face selection method according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a face selection method. Fig. 1 is a schematic flow chart of a face selection method according to an embodiment of the present invention. The method may be performed by an apparatus, which may be implemented by software and/or hardware.
In this embodiment, the face selection method includes:
step S110, carrying out face confidence calculation processing on each face in the scene picture with at least two faces to obtain the face confidence.
Specifically, a device for face recognition, for example, a check-in device, software with a face recognition function, such as face-scanning payment of a payment treasure, when face recognition is performed, a picture under a current scene is acquired through a camera device, and a proper face is selected from the picture of the current scene for recognition, at this time, face recognition belongs to 1 face recognition, but if there are multiple faces in the picture of the current scene, the most proper face needs to be selected from the multiple faces as a recognition object. For example, in the process of face-scanning payment by using the payment apparatus, the face in the television picture, the picture with the face hung on the wall, the face of a friend sitting beside the picture, and the like exist in the scene where the user is located, and at this time, the processor performs confidence calculation processing on each face in the acquired scene picture to obtain the face confidence.
As an optional embodiment of the present invention, before performing face confidence calculation processing on each face in a scene picture with at least two faces to obtain a face confidence, the method further includes:
triggering a scene picture intercepting instruction according to the acquired face recognition instruction;
intercepting a scene picture from a current scene according to a scene picture intercepting instruction;
and carrying out primary face recognition on the scene picture, and generating a face selection instruction when at least two faces are recognized in the scene picture.
Specifically, when a user triggers a face recognition function, for example, when a face scanning payment function is started, a scene picture intercepting instruction associated with the function is triggered at the same time, a scene picture is intercepted from a scene shot by a current camera device according to the scene picture intercepting instruction, when at least two faces in the scene picture are recognized, a face selection instruction is generated, and face confidence calculation is performed on each face in the scene picture according to the face selection instruction.
As an optional embodiment of the present invention, performing face confidence calculation processing on each face in a scene picture with at least two faces, to obtain a face confidence includes:
carrying out face detection on the scene picture through a face detection technology, and marking the detected face to obtain a face with a mark;
carrying out face extraction processing on the face with the mark by a face extraction technology to obtain a preliminary face;
and performing confidence calculation processing on the primary face through a face confidence calculation model to obtain a face confidence.
Specifically, the face in the scene picture can be marked by face detection software, and the marked face is extracted by face extraction software after the face is marked, wherein the face detection software and the face extraction software can both select software commonly used in the field. In order to quickly determine whether the preliminary face is really a face, face confidence calculation processing is required, wherein the face confidence calculation model can be obtained by collecting sample data to train the neural network model.
As an alternative embodiment of the present invention, the face confidence calculation model includes:
the human face confidence coefficient input device comprises a human face input layer for inputting a preliminary human face, a human face characteristic point division layer for carrying out human face characteristic coordinate division on the human face of the human face input layer, a partial confidence coefficient calculation layer for carrying out confidence coefficient calculation on human face partial features obtained by the human face characteristic point division layer, a human face feature combination layer for combining human face new features according to human face partial confidence coefficients obtained by the partial confidence coefficient calculation layer, a regression layer for carrying out global linear regression processing on the human face new features obtained by the human face feature combination layer to obtain human face confidence coefficients and a human face confidence coefficient output layer for carrying out output processing on the human face confidence coefficients obtained by the regression layer.
Specifically, a preliminary face is input into the model through a face input layer, and the preliminary face is subjected to feature division through a feature division layer, for example, feature coordinate division is performed on key parts such as an eye part, a mouth part and a nose part; and then, performing confidence calculation on each face part through a partial confidence calculation layer, for example, performing confidence calculation on the eye part, wherein the confidence calculation method can select a confidence interval calculation method commonly used in the field, namely, selecting some points as samples, performing interval calculation to obtain the face partial confidence, then recombining the characteristics of the primary face according to the face partial confidence, obtaining the face confidence through global linear regression, and outputting through a face confidence output layer.
Step S120, selecting a face with a face confidence higher than a preset face confidence threshold value from the scene picture to obtain a first face set and a face confidence set of the first face set.
Specifically, the preset face confidence threshold may be set empirically or after analysis of test results of a large amount of test data, and the main purpose is to remove results with low face confidence, that is, faces that can be determined to be false faces, such as face oil paintings. And obtaining a first face set with higher confidence coefficient and a face confidence coefficient set of the first face set.
As an optional embodiment of the present invention, the step of storing a preset face confidence threshold in a block chain, and selecting a face with a face confidence higher than the preset face confidence threshold from a scene picture to obtain a first face set and a face confidence set of the first face set includes:
comparing the confidence of each face in the scene picture with a preset face confidence threshold one by one;
and reserving the face corresponding to the face confidence coefficient with the numerical value higher than the preset face confidence coefficient threshold value, and screening out the rest faces in the scene picture to obtain a first face set and a confidence coefficient set of the first face set.
Specifically, the face confidence levels of all the faces in the scene picture are compared with a preset face confidence level threshold value one by one, the faces with the face confidence level values higher than the preset face confidence level threshold value are reserved and used as a first face set, the faces with the face confidence level values lower than or equal to the preset face confidence level threshold value are screened, and the faces do not participate in the next execution operation.
And S130, determining a self-adaptive confidence threshold value through a real face confidence floating range according to the face confidence set of the first face set.
Specifically, a large amount of real face confidence coefficient data are collected for analysis, confidence coefficient scores of real faces obtained through analysis in the same scene are not very different and are generally within 0.01, an adaptive confidence coefficient threshold used as a boundary line between a real face and a dummy face can be determined through the real face confidence coefficient floating range, the faces of a first face set are further screened through the adaptive confidence coefficient threshold, and the dummy faces are removed.
As an alternative embodiment of the present invention, determining an adaptive confidence threshold according to a face confidence set of a first face set and through a true face confidence floating range includes:
selecting a face confidence coefficient with the maximum value from a face confidence coefficient set of the first face set as the maximum value of the face confidence coefficient;
calculating a self-adaptive confidence coefficient threshold value through a self-adaptive confidence coefficient threshold value calculation formula according to the maximum value of the human face confidence coefficient; the self-adaptive confidence coefficient threshold value calculation formula is as follows: mart _ score _ th ═ max _ score-0.01; wherein, mart _ score _ th is an adaptive confidence threshold, and max _ score is a maximum confidence value of the human face.
Specifically, the face confidence of the first face in the first face set is most likely to be a real face, and the confidence between the real faces generally fluctuates within 0.01, so that the adaptive confidence threshold obtained by the adaptive confidence threshold calculation is generally selected as the real face.
Step S140, selecting a face with a face confidence higher than the adaptive confidence threshold from the first face set as a second face set.
Specifically, the confidence sets of the first face set are compared with the self-adaptive confidence threshold one by one; and reserving the face with the value higher than the first face confidence coefficient of the self-adaptive confidence coefficient threshold, and screening out the first face corresponding to the first face confidence coefficient of which the scene picture value is lower than or equal to the preset self-adaptive confidence coefficient threshold to obtain a second face set. At this time, the faces in the second face set are generally real faces.
And S150, selecting the face with the largest occupied area in the scene picture from the second face set according to the principle of the size of the face, and taking the face as a face selection result of the face recognition object.
Specifically, in order to achieve the best face recognition effect, a face closest to the lens of the camera device is generally selected for recognition, and therefore, according to the principle of the distance, the face in the second face set with the largest area is selected from the scene picture as the face selection result of the face recognition object.
As an optional embodiment of the present invention, according to the principle of near-far distance, the face occupying the largest area in the scene picture is selected from the second face set, and the result of selecting the face as the face recognition object includes:
performing area calculation processing on second faces in the scene picture, and sequencing according to the sequence of the area occupied by the second faces in the scene picture from large to small;
and selecting the face with the largest occupied area in the scene picture from the second face set as a face selection result of the face recognition object.
Specifically, the area occupied by the second face in the scene picture is calculated, the second face with the largest area is easily selected according to the sequence, and the second face with the largest area is used as a face recognition object, namely, the final result of face selection.
Fig. 2 is a functional block diagram of a face selection apparatus according to an embodiment of the present invention.
The face selection apparatus 200 of the present invention can be installed in an electronic device. According to the implemented functions, the face selecting device may include a face confidence calculating module 210, a preset confidence screening module 220, an adaptive confidence threshold determining module 230, an adaptive confidence screening module 240, and a face area calculating module 250. A module according to the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the face confidence calculation module 210 is configured to perform face confidence calculation processing on each face in a scene picture with at least two faces to obtain a face confidence.
Specifically, a device for face recognition, for example, a check-in device, software with a face recognition function, such as face-scanning payment of a payment treasure, when face recognition is performed, a picture under a current scene is acquired through a camera device, and a proper face is selected from the picture of the current scene for recognition, at this time, face recognition belongs to 1 face recognition, but if there are multiple faces in the picture of the current scene, the most proper face needs to be selected from the multiple faces as a recognition object. For example, in the process of face-scanning payment by using the payment apparatus, the face in the television picture, the picture with the face hung on the wall, the face of a friend sitting beside the picture, and the like exist in the scene where the user is located, and at this time, the processor performs confidence calculation processing on each face in the acquired scene picture to obtain the face confidence.
As an optional embodiment of the present invention, before performing face confidence calculation processing on each face in a scene picture with at least two faces to obtain a face confidence, the method further includes:
triggering a scene picture intercepting instruction according to the acquired face recognition instruction;
intercepting a scene picture from a current scene according to a scene picture intercepting instruction;
and carrying out primary face recognition on the scene picture, and generating a face selection instruction when at least two faces are recognized in the scene picture.
Specifically, when a user triggers a face recognition function, for example, when a face scanning payment function is started, a scene picture intercepting instruction associated with the function is triggered at the same time, a scene picture is intercepted from a scene shot by a current camera device according to the scene picture intercepting instruction, when at least two faces in the scene picture are recognized, a face selection instruction is generated, and face confidence calculation is performed on each face in the scene picture according to the face selection instruction.
As an optional embodiment of the present invention, performing face confidence calculation processing on each face in a scene picture with at least two faces, to obtain a face confidence includes:
carrying out face detection on the scene picture through a face detection technology, and marking the detected face to obtain a face with a mark;
carrying out face extraction processing on the face with the mark by a face extraction technology to obtain a preliminary face;
and performing confidence calculation processing on the primary face through a face confidence calculation model to obtain a face confidence.
Specifically, the face in the scene picture can be marked by face detection software, and the marked face is extracted by face extraction software after the face is marked, wherein the face detection software and the face extraction software can both select software commonly used in the field. In order to quickly determine whether the preliminary face is really a face, face confidence calculation processing is required, wherein the face confidence calculation model can be obtained by collecting sample data to train the neural network model.
As an alternative embodiment of the present invention, the face confidence calculation model includes:
the human face confidence coefficient input device comprises a human face input layer for inputting a preliminary human face, a human face characteristic point division layer for carrying out human face characteristic coordinate division on the human face of the human face input layer, a partial confidence coefficient calculation layer for carrying out confidence coefficient calculation on human face partial features obtained by the human face characteristic point division layer, a human face feature combination layer for combining human face new features according to human face partial confidence coefficients obtained by the partial confidence coefficient calculation layer, a regression layer for carrying out global linear regression processing on the human face new features obtained by the human face feature combination layer to obtain human face confidence coefficients and a human face confidence coefficient output layer for carrying out output processing on the human face confidence coefficients obtained by the regression layer.
Specifically, a preliminary face is input into the model through a face input layer, and the preliminary face is subjected to feature division through a feature division layer, for example, feature coordinate division is performed on key parts such as an eye part, a mouth part and a nose part; and then, performing confidence calculation on each face part through a partial confidence calculation layer, for example, performing confidence calculation on the eye part, wherein the confidence calculation method can select a confidence interval calculation method commonly used in the field, namely, selecting some points as samples, performing interval calculation to obtain the face partial confidence, then recombining the characteristics of the primary face according to the face partial confidence, obtaining the face confidence through global linear regression, and outputting through a face confidence output layer.
The preset confidence screening module 220 is configured to select a face from the scene picture, where the face confidence is higher than a preset face confidence threshold, to obtain a first face set and a face confidence set of the first face set.
Specifically, the preset face confidence threshold may be set empirically or after analysis of test results of a large amount of test data, and the main purpose is to remove results with low face confidence, that is, faces that can be determined to be false faces, such as face oil paintings. And obtaining a first face set with higher confidence coefficient and a face confidence coefficient set of the first face set.
As an optional embodiment of the present invention, the step of storing a preset face confidence threshold in a block chain, and selecting a face with a face confidence higher than the preset face confidence threshold from a scene picture to obtain a first face set and a face confidence set of the first face set includes:
comparing the confidence of each face in the scene picture with a preset face confidence threshold one by one;
and reserving the face corresponding to the face confidence coefficient with the numerical value higher than the preset face confidence coefficient threshold value, and screening out the rest faces in the scene picture to obtain a first face set and a confidence coefficient set of the first face set.
Specifically, the face confidence levels of all the faces in the scene picture are compared with a preset face confidence level threshold value one by one, the faces with the face confidence level values higher than the preset face confidence level threshold value are reserved and used as a first face set, the faces with the face confidence level values lower than or equal to the preset face confidence level threshold value are screened, and the faces do not participate in the next execution operation.
The adaptive confidence threshold determining module 230 is configured to determine an adaptive confidence threshold according to the face confidence set of the first face set and through a real face confidence floating range.
Specifically, a large amount of real face confidence coefficient data are collected for analysis, confidence coefficient scores of real faces obtained through analysis in the same scene are not very different and are generally within 0.01, an adaptive confidence coefficient threshold used as a boundary line between a real face and a dummy face can be determined through the real face confidence coefficient floating range, the faces of a first face set are further screened through the adaptive confidence coefficient threshold, and the dummy faces are removed.
As an alternative embodiment of the present invention, determining an adaptive confidence threshold according to a face confidence set of a first face set and through a true face confidence floating range includes:
selecting a face confidence coefficient with the maximum value from a face confidence coefficient set of the first face set as the maximum value of the face confidence coefficient;
calculating a self-adaptive confidence coefficient threshold value through a self-adaptive confidence coefficient threshold value calculation formula according to the maximum value of the human face confidence coefficient; the self-adaptive confidence coefficient threshold value calculation formula is as follows: mart _ score _ th ═ max _ score-0.01; wherein, mart _ score _ th is an adaptive confidence threshold, and max _ score is a maximum confidence value of the human face.
Specifically, the face confidence of the first face in the first face set is most likely to be a real face, and the confidence between the real faces generally fluctuates within 0.01, so that the adaptive confidence threshold obtained by the adaptive confidence threshold calculation is generally selected as the real face.
And the adaptive confidence screening module 240 is configured to select a face with a face confidence higher than an adaptive confidence threshold from the first face set as a second face set.
Specifically, the confidence sets of the first face set are compared with the self-adaptive confidence threshold one by one; and reserving the face with the value higher than the first face confidence coefficient of the self-adaptive confidence coefficient threshold, and screening out the first face corresponding to the first face confidence coefficient of which the scene picture value is lower than or equal to the preset self-adaptive confidence coefficient threshold to obtain a second face set. At this time, the faces in the second face set are generally real faces.
And the face area calculation module 250 is configured to select, according to the principle of the size of the face, a face occupying the largest area in the scene picture from the second face set, as a face selection result of the face recognition object.
Specifically, in order to achieve the best face recognition effect, a face closest to the lens of the camera device is generally selected for recognition, and therefore, according to the principle of the distance, the face in the second face set with the largest area is selected from the scene picture as the face selection result of the face recognition object.
As an optional embodiment of the present invention, according to the principle of near-far distance, the face occupying the largest area in the scene picture is selected from the second face set, and the result of selecting the face as the face recognition object includes:
performing area calculation processing on second faces in the scene picture, and sequencing according to the sequence of the area occupied by the second faces in the scene picture from large to small;
and selecting the face with the largest occupied area in the scene picture from the second face set as a face selection result of the face recognition object.
Specifically, the area occupied by the second face in the scene picture is calculated, the second face with the largest area is easily selected according to the sequence, and the second face with the largest area is used as a face recognition object, namely, the final result of face selection.
Fig. 3 is a schematic structural diagram of an electronic device for implementing a face selection method according to an embodiment of the present invention.
The electronic device 1 may comprise a processor 10, a memory 11 and a bus, and may further comprise a computer program, such as a face selection program 12, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as codes of a face selection program, but also to temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by operating or executing programs or modules (e.g., a face selection program, etc.) stored in the memory 11 and calling data stored in the memory 11.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 3 shows only an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 3 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 1 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The face selection program 12 stored in the memory 11 of the electronic device 1 is a combination of instructions, which when executed in the processor 10, can implement:
carrying out face confidence calculation processing on each face in a scene picture with at least two faces to obtain a face confidence;
selecting a face with a face confidence coefficient higher than a preset face confidence coefficient threshold value from the scene picture to obtain a first face set and a face confidence coefficient set of the first face set;
determining a self-adaptive confidence coefficient threshold value through a real face confidence coefficient floating range according to a face confidence coefficient set of the first face set;
selecting a face with a face confidence higher than a self-adaptive confidence threshold from the first face set as a second face set;
and selecting the face with the largest occupied area in the scene picture from the second face set according to the principle of big-end-up and small-end-up, and taking the face as a face selection result of the face recognition object.
Specifically, the specific implementation method of the processor 10 for the instruction may refer to the description of the relevant steps in the embodiment corresponding to fig. 1, which is not described herein again. It should be emphasized that, in order to further ensure the privacy and security of the preset face confidence threshold, the preset face confidence threshold may also be stored in a node of a block chain.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A face selection method is applied to an electronic device, and is characterized by comprising the following steps:
carrying out face confidence calculation processing on each face in a scene picture with at least two faces to obtain a face confidence;
selecting a face with the face confidence higher than a preset face confidence threshold value from the scene picture to obtain a first face set and a face confidence set of the first face set;
determining a self-adaptive confidence threshold value through a real face confidence floating range according to the face confidence set of the first face set;
selecting a face with a face confidence higher than the self-adaptive confidence threshold from the first face set as a second face set;
and selecting the face with the largest occupied area in the scene picture from the second face set according to the principle of big-end-up and small-end-up, and taking the face as a face selection result of the face recognition object.
2. The face selection method according to claim 1, wherein before performing face confidence calculation processing on each face in a scene picture with at least two faces to obtain a face confidence, the method further comprises:
triggering a scene picture intercepting instruction according to the acquired face recognition instruction;
intercepting a scene picture from a current scene according to the scene picture intercepting instruction;
and carrying out primary face recognition on the scene picture, and generating a face selection instruction when at least two faces are recognized in the scene picture.
3. The face selection method according to claim 1, wherein the face confidence calculation processing is performed on each face in the scene picture with at least two faces, and obtaining the face confidence comprises:
carrying out face detection on the scene picture through a face detection technology, and marking the detected face to obtain a face with a mark;
carrying out face extraction processing on the face with the mark by a face extraction technology to obtain a preliminary face;
and performing confidence calculation processing on the preliminary face through a face confidence calculation model to obtain a face confidence.
4. The face selection method according to claim 3, wherein the face confidence calculation model comprises:
the human face confidence coefficient processing device comprises a human face input layer for inputting a preliminary human face, a human face characteristic point dividing layer for dividing the human face of the human face input layer into human face characteristic coordinates, a partial confidence coefficient calculating layer for calculating the confidence coefficient of the human face partial characteristics obtained by the human face characteristic point dividing layer, a human face characteristic combination layer for combining the human face partial confidence coefficients obtained by the partial confidence coefficient calculating layer into human face new characteristics, a regression layer for carrying out global linear regression processing on the human face new characteristics obtained by the human face characteristic combination layer to obtain human face confidence coefficients and a human face confidence coefficient output layer for outputting the human face confidence coefficients obtained by the regression layer.
5. The method of selecting a face according to claim 1, wherein the preset face confidence threshold is stored in a block chain, and the selecting a face from the scene picture, the face confidence of which is higher than the preset face confidence threshold, to obtain a first face set and a face confidence set of the first face set includes:
comparing the confidence of each face in the scene picture with the preset face confidence threshold one by one;
and reserving the face corresponding to the face confidence coefficient with the numerical value higher than the preset face confidence coefficient threshold value, and screening out the rest faces in the scene picture to obtain a first face set and a confidence coefficient set of the first face set.
6. The method of selecting a face according to claim 1, wherein the determining an adaptive confidence threshold through a true face confidence floating range according to the face confidence set of the first face set comprises:
selecting a face confidence coefficient with the maximum value from the face confidence coefficient set of the first face set as the maximum value of the face confidence coefficient;
calculating a self-adaptive confidence coefficient threshold value through a self-adaptive confidence coefficient threshold value calculation formula according to the maximum value of the human face confidence coefficient; wherein the adaptive confidence threshold calculation formula is: mart _ score _ th ═ max _ score-0.01; wherein, mart _ score _ th is an adaptive confidence threshold, and max _ score is a maximum confidence value of the human face.
7. The method of claim 1, wherein the selecting, according to the principle of near-far distance, a face with a largest occupied area in the scene picture from the second face set, as a face selection result of the face recognition object, comprises:
carrying out area calculation processing on second faces in the scene picture, and sequencing according to the sequence of the area occupied by the second faces in the scene picture from large to small;
and selecting the face with the largest occupied area in the scene picture from the second face set as a face selection result of the face recognition object.
8. A face selection apparatus, the apparatus comprising:
the face confidence coefficient calculation module is used for calculating the face confidence coefficient of each face in the scene picture with at least two faces to obtain the face confidence coefficient;
the preset confidence screening module is used for selecting a face with the face confidence higher than a preset face confidence threshold value from the scene picture to obtain a first face set and a face confidence set of the first face set;
the self-adaptive confidence threshold determining module is used for determining a self-adaptive confidence threshold through a real face confidence floating range according to the face confidence set of the first face set;
the self-adaptive confidence screening module is used for selecting a face with a face confidence higher than the self-adaptive confidence threshold from the first face set as a second face set;
and the face area calculation module is used for selecting the face with the largest occupied area in the scene picture from the second face set according to the principle of big-end-up and small-end-up, and the face is used as the face selection result of the face recognition object.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the face selection method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out a face selection method according to any one of claims 1 to 7.
CN202110480008.2A 2021-04-30 2021-04-30 Face selection method, device, equipment and computer readable storage medium Pending CN113095284A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110480008.2A CN113095284A (en) 2021-04-30 2021-04-30 Face selection method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110480008.2A CN113095284A (en) 2021-04-30 2021-04-30 Face selection method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN113095284A true CN113095284A (en) 2021-07-09

Family

ID=76680957

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110480008.2A Pending CN113095284A (en) 2021-04-30 2021-04-30 Face selection method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113095284A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113449713A (en) * 2021-09-01 2021-09-28 北京美摄网络科技有限公司 Method and device for cleaning training data of face detection model

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107808147A (en) * 2017-11-17 2018-03-16 厦门美图之家科技有限公司 A kind of face Confidence method based on the tracking of real-time face point
WO2018188453A1 (en) * 2017-04-11 2018-10-18 腾讯科技(深圳)有限公司 Method for determining human face area, storage medium, and computer device
WO2019114036A1 (en) * 2017-12-12 2019-06-20 深圳云天励飞技术有限公司 Face detection method and device, computer device, and computer readable storage medium
CN110458026A (en) * 2019-07-11 2019-11-15 成都市喜爱科技有限公司 A kind of face acquisition method, device, system, equipment and medium
CN110781770A (en) * 2019-10-08 2020-02-11 高新兴科技集团股份有限公司 Living body detection method, device and equipment based on face recognition
CN111667501A (en) * 2020-06-10 2020-09-15 杭州海康威视数字技术股份有限公司 Target tracking method and device, computing equipment and storage medium
WO2021046773A1 (en) * 2019-09-11 2021-03-18 深圳市汇顶科技股份有限公司 Facial anti-counterfeiting detection method and apparatus, chip, electronic device and computer-readable medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018188453A1 (en) * 2017-04-11 2018-10-18 腾讯科技(深圳)有限公司 Method for determining human face area, storage medium, and computer device
CN107808147A (en) * 2017-11-17 2018-03-16 厦门美图之家科技有限公司 A kind of face Confidence method based on the tracking of real-time face point
WO2019114036A1 (en) * 2017-12-12 2019-06-20 深圳云天励飞技术有限公司 Face detection method and device, computer device, and computer readable storage medium
CN110458026A (en) * 2019-07-11 2019-11-15 成都市喜爱科技有限公司 A kind of face acquisition method, device, system, equipment and medium
WO2021004186A1 (en) * 2019-07-11 2021-01-14 成都市喜爱科技有限公司 Face collection method, apparatus, system, device, and medium
WO2021046773A1 (en) * 2019-09-11 2021-03-18 深圳市汇顶科技股份有限公司 Facial anti-counterfeiting detection method and apparatus, chip, electronic device and computer-readable medium
CN110781770A (en) * 2019-10-08 2020-02-11 高新兴科技集团股份有限公司 Living body detection method, device and equipment based on face recognition
CN111667501A (en) * 2020-06-10 2020-09-15 杭州海康威视数字技术股份有限公司 Target tracking method and device, computing equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
薛杉等: "低分辨率人脸图像的迭代标签传播识别算法", 《模式识别与人工智能》, vol. 31, no. 7, pages 4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113449713A (en) * 2021-09-01 2021-09-28 北京美摄网络科技有限公司 Method and device for cleaning training data of face detection model

Similar Documents

Publication Publication Date Title
CN111898538B (en) Certificate authentication method and device, electronic equipment and storage medium
CN103503000A (en) Facial recognition
CN112395978A (en) Behavior detection method and device and computer readable storage medium
CN112137591B (en) Target object position detection method, device, equipment and medium based on video stream
CN111770317B (en) Video monitoring method, device, equipment and medium for intelligent community
CN111695609A (en) Target damage degree determination method, target damage degree determination device, electronic device, and storage medium
CN111860377A (en) Live broadcast method and device based on artificial intelligence, electronic equipment and storage medium
CN113554008B (en) Method and device for detecting static object in area, electronic equipment and storage medium
CN114550076A (en) Method, device and equipment for monitoring area abnormal behaviors and storage medium
CN112507923A (en) Certificate copying detection method and device, electronic equipment and medium
CN115471775A (en) Information verification method, device and equipment based on screen recording video and storage medium
CN112528909A (en) Living body detection method, living body detection device, electronic apparatus, and computer-readable storage medium
CN115661531A (en) Image-text-based early oral cancer identification method, device, equipment and storage medium
CN113888500A (en) Dazzling degree detection method, device, equipment and medium based on face image
CN114639152A (en) Multi-modal voice interaction method, device, equipment and medium based on face recognition
CN113705469A (en) Face recognition method and device, electronic equipment and computer readable storage medium
CN113887439A (en) Automatic early warning method, device, equipment and storage medium based on image recognition
CN113095284A (en) Face selection method, device, equipment and computer readable storage medium
CN113065607A (en) Image detection method, image detection device, electronic device, and medium
CN113869219A (en) Face living body detection method, device, equipment and storage medium
CN112528903A (en) Face image acquisition method and device, electronic equipment and medium
CN113255456B (en) Inactive living body detection method, inactive living body detection device, electronic equipment and storage medium
CN113792801A (en) Method, device and equipment for detecting dazzling degree of human face and storage medium
CN114390200A (en) Camera cheating identification method, device, equipment and storage medium
CN113869218A (en) Face living body detection method and device, electronic equipment and readable 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