Face recognition method, mobile terminal and computer readable storage medium
By adjusting the collection frequency of face images according to the recognition efficiency during the face recognition process, the problems of work redundancy and high power consumption existing in the face recognition process in the existing technology are solved, and higher recognition accuracy and higher power consumption are achieved. Low power consumption.
Patent Information
- Application Number
- CN201910327700.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-04-19
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2039-04-19
AI Technical Summary
In the prior art, there are problems of working redundancy and high power consumption in the face recognition process. This is mainly due to the high frequency of camera acquisition, resulting in a large number of face image acquisitions, which increases the recognition amount.
By adjusting the collection frequency of face images according to recognition efficiency during the face recognition process, specific steps include turning on the camera when receiving a face recognition instruction, collecting face images based on the preset collection frequency, and reducing the collection frequency after recognition failure. , until the camera is turned off after successful recognition.
The workload of face image collection is reduced, the accuracy of face image recognition is improved, and the power consumption of face recognition is reduced.
Smart Images

Figure CN110046597B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of face recognition technology, and in particular to a face recognition method, a mobile terminal and a computer-readable storage medium. Background Art
[0002] With the continuous development and application of face recognition technology, the use of face recognition technology on terminal devices is becoming more and more popular, such as face unlocking, face identity authentication, etc. At present, in the face recognition process, the camera generally collects the face image to be identified at a high image acquisition frequency, resulting in a large number of face images collected. Correspondingly, the recognition amount of face images is increased. Therefore, there are technical problems of work redundancy and high power consumption in the collection and recognition of face recognition. Summary of the invention
[0003] The main purpose of the present invention is to provide a face recognition method, a mobile terminal and a readable storage medium, aiming to solve the technical problems of work redundancy and high power consumption in collection and recognition in the prior art.
[0004] To achieve the above object, the present invention provides a face recognition method, which comprises the following steps:
[0005] Upon receiving the face recognition instruction, turning on the camera of the mobile terminal and capturing a first face image of the target object based on a first preset capture frequency;
[0006] Based on the first facial image and the first preset time length, identifying the first facial image;
[0007] If it is confirmed that the first facial image recognition fails at the end of the first preset time, the first preset acquisition frequency is reduced to a second preset acquisition frequency, and the camera is controlled to acquire a second facial image of the target object at the second preset acquisition frequency;
[0008] Based on the second facial image and the second preset time length, identifying the second facial image;
[0009] If it is confirmed that the second facial image recognition is successful within the second preset time period, the camera is turned off.
[0010] Optionally, when receiving the face recognition instruction, the step of turning on the camera of the mobile terminal and collecting the first face image of the target object based on the first preset collection frequency includes:
[0011] When receiving a face recognition instruction, the camera of the mobile terminal is turned on, and a guidance interface including guidance information for the user to collect a face image is displayed;
[0012] When the guidance information matches the real-time status information of the mobile terminal, the camera is controlled to capture a first facial image of the target object at a first preset capture frequency.
[0013] Optionally, the step of acquiring a first facial image of the target object based on the first preset acquisition frequency includes:
[0014] Based on a first preset acquisition frequency, acquiring a first facial image of the target object and a first initial acquisition time point and a first real-time acquisition time point;
[0015] Based on the first initial acquisition time point and the first real-time acquisition time point, a first acquisition duration for acquiring the first facial image of the target object is obtained, and when the first acquisition duration is equal to a first preset duration, it is determined that the first preset duration is ended.
[0016] Optionally, the step of identifying the first facial image based on the first facial image and the first preset time length includes:
[0017] Based on the first facial image, the first initial acquisition time point, and the first real-time acquisition time point, obtaining a first acquisition duration of the first facial image of the target object, and determining whether the first acquisition duration is equal to the first preset duration;
[0018] If it is equal to the first preset time length, query whether there is a facial image matching the first facial image in the preset target facial images;
[0019] If there is no facial image matching the first facial image in the preset target facial images, it is determined that the recognition of the first facial image has failed.
[0020] Optionally, the step of controlling the camera to capture the second facial image of the target object at the second preset capture frequency includes:
[0021] Based on the second preset acquisition frequency, acquiring a second facial image of the target object and a second initial acquisition time point and a second real-time acquisition time point;
[0022] Based on the second initial acquisition time point and the second real-time acquisition time point, a second acquisition duration for acquiring the second facial image of the target object is obtained, and when the second acquisition duration is equal to a second preset duration, it is determined that the second preset duration ends.
[0023] Optionally, the step of identifying the second facial image based on the second facial image and the second preset time length includes:
[0024] Based on the second facial image, the second initial acquisition time point, and the second real-time acquisition time point, obtaining a second acquisition duration for acquiring the second facial image of the target object, and determining whether the second acquisition duration is equal to a second preset duration;
[0025] If it is equal to the second preset time length, querying whether there is a facial image matching the second facial image in the preset target facial images;
[0026] If there is no facial image matching the second facial image in the preset target facial images, it is determined that the recognition of the second facial image has failed.
[0027] Optionally, after the step of identifying the second facial image based on the second facial image and the second preset time length, the method further includes:
[0028] If it is confirmed that the second facial image recognition fails, outputting a prompt message including the second facial image recognition failure, and changing the second preset acquisition frequency to the first preset acquisition frequency;
[0029] Turn off the camera.
[0030] Optionally, the face recognition method further includes:
[0031] Regularly obtaining a first recognition success rate of a first face image within a first preset time period;
[0032] When the first recognition success rate is less than a preset minimum threshold, reducing the first preset acquisition frequency and / or increasing the first preset duration;
[0033] When the first recognition success rate is greater than a preset maximum threshold, the first preset collection frequency is increased and / or the first preset time duration is reduced.
[0034] In addition, to achieve the above-mentioned purpose, the present invention also provides a mobile terminal, which includes: a memory, a processor, and a face recognition program stored in the memory and executable on the processor, and the face recognition program, when executed by the processor, implements the steps of any one of the above-mentioned face recognition methods.
[0035] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above-mentioned face recognition methods are implemented.
[0036] The present invention adopts different facial image acquisition frequencies in different time periods during the facial recognition process according to the facial image recognition efficiency, thereby achieving the change of facial image acquisition frequency in different time periods of facial image acquisition, thereby reducing the workload of facial image acquisition, thereby improving the accuracy of facial image recognition and reducing the power consumption of facial recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present invention;
[0038] Figure 2 A communication network system architecture diagram provided for an embodiment of the present invention;
[0039] Figure 3 This is a flow chart of the first embodiment of the face recognition method of the present application;
[0040] Figure 4 This is a flow chart of the second embodiment of the face recognition method of the present application;
[0041] Figure 5 This is a flow chart of the third embodiment of the face recognition method of the present application;
[0042] Figure 6 This is a flow chart of the fourth embodiment of the face recognition method of the present application;
[0043] Figure 7 This is a flowchart of the fifth embodiment of the face recognition method of the present application;
[0044] Figure 8 This is a flow chart of the sixth embodiment of the face recognition method of the present application;
[0045] Fig. 9 This is a flow chart of the seventh embodiment of the face recognition method of the present application.
[0046] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0048] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present invention, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0049] The terminal may be implemented in various forms. For example, the terminal described in the present invention may include mobile terminals such as mobile phones, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as fixed terminals such as digital TVs and desktop computers.
[0050] The following description will be made by taking a mobile terminal as an example. It will be understood by those skilled in the art that, in addition to components specifically used for mobile purposes, the construction according to the embodiments of the present invention can also be applied to fixed-type terminals.
[0051] See also Figure 1 , Figure 1 To implement the hardware structure diagram of a mobile terminal of each embodiment of the present invention, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, audio output unit 103, A / V (audio / video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art can understand that Figure 1 The structure of the mobile terminal shown in the figure does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0052] Combine the following Figure 1 The following is a detailed introduction to the various components of the mobile terminal:
[0053] The radio frequency unit 101 can be used for receiving and sending signals during information transmission or communication. Specifically, after receiving the downlink information of the base station, it is sent to the processor 110 for processing; in addition, the uplink data is sent to the base station. Generally, the radio frequency unit 101 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency unit 101 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution), etc.
[0054] WiFi is a short-range wireless transmission technology. Mobile terminals can help users send and receive emails, browse web pages, and access streaming media through WiFi module 102. It provides users with wireless broadband Internet access. Figure 1 The WiFi module 102 is shown, but it is understandable that it is not an essential component of the mobile terminal and can be omitted as needed without changing the essence of the invention.
[0055] The audio output unit 103 can convert the audio data received by the RF unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output it as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, etc. Moreover, the audio output unit 103 can also provide audio output related to a specific function performed by the mobile terminal 100 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, etc.
[0056] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processor (GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 106. The image frame processed by the graphics processor 1041 can be stored in the memory 109 (or other storage medium) or sent via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a telephone call mode, a recording mode, a voice recognition mode, and other operating modes, and can process such sound into audio data. The processed audio (voice) data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode. The microphone 1042 can implement various types of noise elimination (or suppression) algorithms to eliminate (or suppress) noise or interference generated in the process of receiving and sending audio signals.
[0057] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1061 and / or the backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can also be configured on the mobile phone, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0058] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0059] The user input unit 107 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 1071 or near the touch panel 1071 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 110, and can receive and execute the command sent by the processor 110. In addition, the touch panel 1071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 1071, the user input unit 107 may also include other input devices 1072. Specifically, the other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, etc., which are not specifically limited here.
[0060] Furthermore, the touch panel 1071 may cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of the touch event. Then, the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Figure 1 In the figure, the touch panel 1071 and the display panel 1061 are used as two independent components to implement the input and output functions of the mobile terminal. However, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to implement the input and output functions of the mobile terminal, which is not limited here.
[0061] The interface unit 108 serves as an interface through which at least one external device can be connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and an external device.
[0062] The memory 109 can be used to store software programs and various data. The memory 109 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 109 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0063] The processor 110 is the control center of the mobile terminal. It uses various interfaces and lines to connect various parts of the entire mobile terminal. It executes various functions of the mobile terminal and processes data by running or executing software programs and / or modules stored in the memory 109, and calling data stored in the memory 109, so as to monitor the mobile terminal as a whole. The processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 110.
[0064] The mobile terminal 100 may also include a power supply 111 (such as a battery) for supplying power to various components. Preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.
[0065] although Figure 1 Not shown, the mobile terminal 100 may further include a Bluetooth module, etc., which will not be described in detail here.
[0066] To facilitate understanding of the embodiments of the present invention, the communication network system on which the mobile terminal of the present invention is based is described below.
[0067] See also Figure 2 , Figure 2 A communication network system architecture diagram is provided for an embodiment of the present invention. The communication network system is an LTE system of universal mobile communication technology. The LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203 and an operator's IP service 204, which are sequentially connected for communication.
[0068] Specifically, UE201 may be the above-mentioned terminal 100, which will not be described in detail here.
[0069] E-UTRAN 202 includes eNodeB 2021 and other eNodeBs 2022 , etc. Among them, eNodeB 2021 can be connected to other eNodeBs 2022 through a backhaul (eg, an X2 interface), and eNodeB 2021 is connected to EPC 203 , and eNodeB 2021 can provide UE 201 with access to EPC 203 .
[0070] EPC203 may include MME (Mobility Management Entity) 2031, HSS (Home Subscriber Server) 2032, other MMEs 2033, SGW (Serving Gate Way) 2034, PGW (PDN Gate Way) 2035 and PCRF (Policy and Charging Rules Function) 2036, etc. Among them, MME2031 is a control node that processes signaling between UE201 and EPC203, and provides bearer and connection management. HSS2032 is used to provide some registers to manage functions such as home location register (not shown in the figure), and save some user-specific information such as service features and data rates. All user data can be sent through SGW2034, PGW2035 can provide IP address allocation and other functions for UE 201, PCRF2036 is the policy and charging control policy decision point for service data flow and IP bearer resources, which selects and provides available policy and charging control decisions for the policy and charging execution function unit (not shown in the figure).
[0071] The IP service 204 may include the Internet, an intranet, an IMS (IP Multimedia Subsystem) or other IP services.
[0072] Although the above introduction takes the LTE system as an example, those skilled in the art should know that the present invention is not only applicable to the LTE system, but also to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA and future new network systems, etc., which are not limited here.
[0073] Based on the above mobile terminal hardware structure and communication network system, various embodiments of the method of the present invention are proposed. The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.
[0074] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0075] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
[0076] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0077] In addition, if Figure 1 In the terminal structure shown, the processor 110 can call the face recognition program stored in the memory 109 to perform the following operations:
[0078] Based on the first facial image and the first preset time length, identifying the first facial image;
[0079] If it is confirmed that the first facial image recognition fails at the end of the first preset time, the first preset acquisition frequency is reduced to a second preset acquisition frequency, and the camera is controlled to acquire a second facial image of the target object at the second preset acquisition frequency;
[0080] Based on the second facial image and the second preset time length, identifying the second facial image;
[0081] If it is confirmed that the second facial image recognition is successful within the second preset time period, the camera is turned off.
[0082] Furthermore, the processor 110 executes the computer program stored in the memory 109 and also performs the following operations:
[0083] When receiving a face recognition instruction, the camera of the mobile terminal is turned on, and a guidance interface including guidance information for the user to collect a face image is displayed;
[0084] When the guidance information matches the real-time status information of the mobile terminal, the camera is controlled to capture a first facial image of the target object at a first preset capture frequency.
[0085] Furthermore, the processor 110 executes the computer program stored in the memory 109 and also performs the following operations:
[0086] Based on a first preset acquisition frequency, acquiring a first facial image of the target object and a first initial acquisition time point and a first real-time acquisition time point;
[0087] Based on the first initial acquisition time point and the first real-time acquisition time point, a first acquisition duration for acquiring the first facial image of the target object is obtained, and when the first acquisition duration is equal to a first preset duration, it is determined that the first preset duration is ended.
[0088] Furthermore, the processor 110 executes the computer program stored in the memory 109 and also performs the following operations:
[0089] Based on the first facial image, the first initial acquisition time point, and the first real-time acquisition time point, obtaining a first acquisition duration of the first facial image of the target object, and determining whether the first acquisition duration is equal to the first preset duration;
[0090] If it is equal to the first preset time length, query whether there is a facial image matching the first facial image in the preset target facial images;
[0091] If there is no facial image matching the first facial image in the preset target facial images, it is determined that the recognition of the first facial image has failed.
[0092] Furthermore, the processor 110 executes the computer program stored in the memory 109 and also performs the following operations:
[0093] Based on the second preset acquisition frequency, acquiring a second facial image of the target object and a second initial acquisition time point and a second real-time acquisition time point;
[0094] Based on the second initial acquisition time point and the second real-time acquisition time point, a second acquisition duration for acquiring the second facial image of the target object is obtained, and when the second acquisition duration is equal to a second preset duration, it is determined that the second preset duration ends.
[0095] Furthermore, the processor 110 executes the computer program stored in the memory 109 and also performs the following operations:
[0096] Based on the second facial image, the second initial acquisition time point, and the second real-time acquisition time point, obtaining a second acquisition duration for acquiring the second facial image of the target object, and determining whether the second acquisition duration is equal to a second preset duration;
[0097] If it is equal to the second preset time length, querying whether there is a facial image matching the second facial image in the preset target facial images;
[0098] If there is no facial image matching the second facial image in the preset target facial images, it is determined that the recognition of the second facial image has failed.
[0099] Furthermore, the processor 110 executes the computer program stored in the memory 109 and also performs the following operations:
[0100] If it is confirmed that the second facial image recognition fails, outputting a prompt message including the second facial image recognition failure, and changing the second preset acquisition frequency to the first preset acquisition frequency;
[0101] Turn off the camera.
[0102] Furthermore, the processor 110 executes the computer program stored in the memory 109 and also performs the following operations:
[0103] Regularly obtaining a first recognition success rate of a first face image within a first preset time period;
[0104] When the first recognition success rate is less than a preset minimum threshold, reducing the first preset acquisition frequency and / or increasing the first preset duration;
[0105] When the first recognition success rate is greater than a preset maximum threshold, the first preset collection frequency is increased and / or the first preset time duration is reduced.
[0106] Based on the above terminal hardware structure and communication network system, various embodiments of the terminal face recognition method of the present invention are proposed.
[0107] The present invention further provides a face recognition method.
[0108] Reference Figure 3 , Figure 3 FIG. 1 is a schematic diagram of a first embodiment of a face recognition method according to the present invention.
[0109] In this embodiment, the face recognition method includes:
[0110] Step S10, when receiving the face recognition instruction, turning on the camera of the mobile terminal, and collecting a first face image of the target object based on a first preset collection frequency;
[0111] In this embodiment, when a face recognition instruction is received, the camera of the mobile terminal is turned on to collect a first face image of the target object based on a first preset collection frequency.
[0112] In this embodiment, the mobile terminal is equipped with a camera and has an image acquisition function, such as taking photos and videos, to obtain the user's facial image, and the mobile terminal is equipped with a display screen for the user to obtain information output by the mobile terminal based on the display screen.
[0113] Specifically, in one embodiment, when a face recognition instruction is received, the camera of the mobile terminal is turned on, and a first face image of the target object is captured based on a first preset capture frequency, wherein the first preset capture frequency is a regular capture frequency for face image capture, and the regular capture frequency is related to the performance of the face recognition device. For example, in the prior art, the regular capture frequency provides one frame every 33 milliseconds, and the face recognition SDK (Software Development Kit) calls a matching algorithm to match each obtained frame of image with a previously recorded face image. When the SDK algorithm fails to match, the face recognition completes an identification match in an average of 25 milliseconds. When the SDK algorithm successfully matches, the face recognition completes an identification match in an average of 65 milliseconds.
[0114] It should be noted that, based on standard qualified facial images, the number of successful recognition matches is less than or equal to 10 times, that is, based on the first 10 frames of facial images collected, it can be determined with a high probability whether the current facial image meets the conditions for successful recognition.
[0115] Furthermore, in one embodiment, when a face recognition instruction triggered by a user based on a mobile terminal is received, it is detected whether the camera of the mobile terminal is turned on. If not, the camera of the mobile terminal is turned on to detect whether the camera has acquired a target area for capturing the target object. If so, the first face image of the target object is captured based on a first preset capture frequency.
[0116] Furthermore, in one embodiment, when a face recognition command triggered by a user based on a mobile terminal is received, it is detected whether the camera of the mobile terminal is turned on. If so, it is detected whether the camera has acquired the target area for capturing the target object. If not, a prompt message is output to guide the user to adjust the head posture so as to successfully capture the first face image of the target object.
[0117] Specifically, in one embodiment, after the camera is turned on, an initial facial image of the target object is collected at a first preset collection frequency, and based on the initial facial image, the resolution, clarity, completeness of the facial image and / or the ambient light intensity of the facial image are obtained and judged to avoid the currently acquired image features not meeting the preset recognition conditions, wherein the preset recognition conditions include detecting whether there are obstructions that block the face in the collected initial facial image, the image blurriness of the initial facial image, the facial posture and image brightness, etc. For example, the collected facial image is not facing the face, the face is blocked, the collection environment is too dark, there are too many decorations on the face / head, and other abnormal facial images.
[0118] Furthermore, in one embodiment, if it is determined that the initial facial image does not meet the preset recognition conditions, it is determined whether the time point of collecting the initial facial image reaches the corresponding preset time length. If so, it is determined that the facial image recognition fails within the corresponding preset time length and the collection is terminated. If not, the initial facial image of the target object continues to be collected based on the first preset collection frequency.
[0119] Step S20, identifying the first facial image based on the first facial image and the first preset time length;
[0120] In this embodiment, the first facial image is identified based on the first facial image and the first preset time length.
[0121] Specifically, in one embodiment, based on the first face image, the image features of the first face image are obtained, and based on the image features of the first face image, the SDK face recognition and matching algorithm in the mobile terminal is used to first determine that there is face information in the first face image, and then the position and size of the face are determined through the geometric feature algorithm, and then the elastic model of the face is annotated, with the midpoint of the nose as the dividing line, and points are marked on the left and right sides respectively, and specific features of the facial features are collected to form facial feature data, which is converted into a binary data stream for transmission and identification. It should be noted that the first preset time length needs to be preset in the mobile terminal in advance.
[0122] Furthermore, in one embodiment, the camera captures a first facial image at a first preset acquisition frequency and transmits it to a corresponding recognition system for recognition. During the recognition process, the number of first facial images captured by the camera is equal to the number of recognitions by the SDK facial recognition matching algorithm.
[0123] For example, the camera identifies the first facial image based on the first facial image and the first preset time length, where the first preset time length is 1 second, and the first preset acquisition frequency is to provide one frame every 33 milliseconds. Then, when the first preset time length ends, the acquired first facial image is 30.3 frames. If the recognition time is the entire first preset time length, i.e. 1 second, the corresponding SDK facial recognition matching algorithm recognizes 30 times.
[0124] Step S30, if it is confirmed that the first facial image recognition fails at the end of the first preset time, the first preset acquisition frequency is reduced to a second preset acquisition frequency, and the camera is controlled to acquire a second facial image of the target object at the second preset acquisition frequency;
[0125] In this embodiment, if it is confirmed that the first facial image recognition fails at the end of the first preset time, the first preset acquisition frequency is reduced to the second preset acquisition frequency, and the camera is controlled to acquire the second facial image of the target object at the second preset acquisition frequency.
[0126] Specifically, in one embodiment, if at the end of the first preset time period, it is confirmed that the SDK face recognition matching algorithm fails to recognize the first face image, the first preset acquisition frequency is reduced to the second preset acquisition frequency, wherein both the first preset acquisition frequency and the second preset acquisition frequency need to be preset in the mobile terminal in advance. It should be noted that the preset conditions of the second preset acquisition frequency include that the acquisition frequency is lower than the first preset acquisition frequency, and the quality and recognition efficiency of the face recognition object are guaranteed.
[0127] Specifically, in one embodiment, for example, the first preset acquisition frequency provides images at a default frequency of 33 milliseconds / frame. The reason for selecting 33 milliseconds / frame is that if the SDK matches the wrong face, it takes an average of 25 milliseconds for each frame to match. If the frequency of the facial image provided by the camera is too high, the SDK algorithm cannot handle it. Therefore, it is meaningless to have too high a frequency. If the acquisition frequency is too low, the SDK algorithm needs to wait for the image provided by the camera, which will reduce the efficiency of successful face recognition. Although the first 10 frames can determine whether the face recognition is successful with a high probability, providing more frames can prevent special circumstances and ensure recognition efficiency. Therefore, it is more appropriate to select 33 milliseconds / frame for the first preset acquisition frequency. The second preset acquisition frequency provides images at a frequency of 100 milliseconds / frame. The camera provides facial images at a high frequency in the first 10 frames, and the remaining preset time collects and improves facial images at a lower frequency. This can greatly reduce the number of times the camera obtains facial images and the number of times the SDK matching algorithm is used. Therefore, unnecessary power consumption can be greatly reduced.
[0128] Step S40, identifying the second facial image based on the second facial image and the second preset time length;
[0129] Specifically, in one implementation, for example, the second preset time length is 4 seconds, the second preset acquisition frequency is 100 milliseconds / frame, and 40 frames of facial images are provided within the entire second preset time length.
[0130] Furthermore, in one embodiment, based on the second facial image of the target object collected at a second preset collection frequency, or the feature data of the second facial image, the face recognition SDK calls the matching algorithm according to the feature data to match each frame of the image obtained with the previously recorded facial image. It should be noted that the face recognition process of the mobile terminal is to collect and identify at the same time. If the recognition is successful, the collection and recognition are terminated. If the recognition fails, the face image will continue to be collected for recognition within the second preset time period until the second preset time period ends or the recognition is successful.
[0131] Step S50: If the second facial image recognition is confirmed to be successful within the second preset time period, the camera is turned off.
[0132] In this embodiment, if it is confirmed that the second facial image recognition is successful within the second preset time period, the camera is turned off.
[0133] Specifically, in one implementation, if the second facial image recognition is confirmed to be successful within the second preset time period, a prompt message indicating that the second facial recognition is successful is output and the camera is turned off.
[0134] It should be noted that the output method of outputting the prompt information of successful second face recognition includes outputting preset voice prompt information and outputting preset text prompt information. It should be noted that the preset voice prompt information and the output preset text prompt information need to be preset in the mobile terminal in advance.
[0135] In this embodiment, the frequency of acquiring the facial image of the target object is adjusted in time periods, thereby reducing the storage amount of the facial image and the power consumption of facial image acquisition and recognition during the face recognition process while ensuring the recognition rate.
[0136] Furthermore, if Figure 4 As shown, Figure 4 This is a flow chart of a second embodiment of the face recognition method of the present invention. In this embodiment, step S10 includes:
[0137] Step S101, when a face recognition instruction is received, the camera of the mobile terminal is turned on, and a guidance interface including guidance information for the user to collect a face image is displayed;
[0138] Step S102: When the guidance information matches the real-time status information of the mobile terminal, the camera is controlled to capture a first facial image of the target object at a first preset capture frequency.
[0139] In this embodiment, when a face recognition instruction is received, the camera of the mobile terminal is turned on and a guidance interface containing guidance information for the user to collect face images is displayed. When the guidance information matches the real-time status information of the mobile terminal, the camera is controlled to collect the first face image of the target object at a first preset collection frequency.
[0140] Specifically, in one embodiment, when a face recognition instruction is received, the camera of the mobile terminal is turned on, and a guidance interface containing guidance information for the user to collect face images is displayed; when the guidance information matches the real-time status information of the mobile terminal, the camera is controlled to collect the first face image of the target object at a first preset collection frequency, wherein the guidance information includes text information or animation information, guiding the user to maintain a correct head posture and position, so as to avoid abnormal problems such as not facing the face, large artificial shaking, covering the face, false triggering of face recognition in the pocket, too dark collection environment, too many decorations on the face or head of the collection object, etc., thereby ensuring the collection quality and efficiency of the first face image.
[0141] It should be noted that the guidance information including the user's facial image collection needs to be preset in the mobile terminal in advance, and the guidance information may include information such as the position of the face, the brightness level, and the head posture.
[0142] In this embodiment, during the process of the mobile terminal's camera capturing facial images, a guidance interface containing guidance information for the user to capture facial images is displayed, thereby improving the quality and efficiency of facial image capture and providing recognition materials for subsequent facial recognition.
[0143] Furthermore, if Figure 5 As shown, Figure 5 This is a flow chart of a third embodiment of the face recognition method of the present invention. In this embodiment, step S10 includes:
[0144] Step S103, based on a first preset acquisition frequency, acquiring a first facial image of the target object and a first initial acquisition time point and a first real-time acquisition time point;
[0145] Step S104, based on the first initial acquisition time point and the first real-time acquisition time point, obtain a first acquisition duration for acquiring the first facial image of the target object, and when the first acquisition duration is equal to a first preset duration, determine that the first preset duration is over.
[0146] In this embodiment, based on the first preset acquisition frequency, the first facial image of the target object and the first initial acquisition time point and the first real-time acquisition time point are acquired. Based on the first initial acquisition time point and the first real-time acquisition time point, the first acquisition duration of the first facial image of the target object is obtained. When the first acquisition duration is equal to the first preset duration, it is determined that the first preset duration has ended.
[0147] Specifically, in one embodiment, based on a first preset acquisition frequency, a first facial image of the target object and a first initial acquisition time point and a first real-time acquisition time point are acquired, and the first preset acquisition frequency, the first facial image, the first initial acquisition time point and the first real-time acquisition time point are associated and saved in a corresponding facial image database, wherein the acquisition time point corresponding to the first facial image is used to record and determine whether the acquisition time of the first facial image exceeds a first preset duration. Specifically, when the camera acquisition is turned on, the mobile terminal starts timing, and when acquiring the first facial image, the first acquisition time point corresponding to the acquired facial image is recorded. If the recorded first acquisition time point corresponding to the acquired first facial image reaches the first preset duration, the acquisition is terminated and the camera is turned off.
[0148] In this embodiment, the first facial image and the first collection time point corresponding to the first facial image are collected and acquired through the first preset collection frequency, so as to establish a facial image database, which provides recognition materials and technical support for the subsequent implementation of facial recognition.
[0149] Furthermore, if Figure 6 As shown, Figure 6 This is a flow chart of a fourth embodiment of the face recognition method of the present invention. In this embodiment, step S20 includes:
[0150] Step S201, based on the first facial image, the first initial acquisition time point and the first real-time acquisition time point, obtaining a first acquisition duration of the first facial image of the target object, and determining whether the first acquisition duration is equal to a first preset duration, if so, executing step S202;
[0151] Step S202, querying whether there is a face image matching the first face image in the preset target face images, if not, executing step S203;
[0152] Step S203, confirming that the first facial image recognition fails.
[0153] In this embodiment, based on the first facial image, the first initial acquisition time point and the first real-time acquisition time point, the first acquisition duration of the first facial image of the target object is obtained, and it is determined whether the first acquisition duration is equal to the first preset duration. If it is equal to the first preset duration, it is queried whether there is a facial image matching the first facial image in the preset target facial images. If there is no facial image matching the first facial image in the preset target facial images, it is confirmed that the recognition of the first facial image has failed.
[0154] Specifically, in one embodiment, at the first facial image, the first initial acquisition time point, and the first real-time acquisition time point, facial recognition is used to determine whether the current first facial image matches a predefined facial image in a preset target facial image. The current first facial image may be a facial image taken by a camera under visible light or a facial image taken under infrared light. The pre-stored facial image may be a facial image taken by a camera under visible light and / or facial feature data extracted from the facial image, or may be a facial image taken under infrared light and / or facial image feature data extracted from the facial image. The pre-stored facial images include at least one facial image of one user, and preferably include multiple facial images of each user. Multiple pre-stored facial images may form a list or other forms of databases. The facial image database in the present invention is not limited by the specific content and form of this embodiment.
[0155] Further, in one embodiment, at the end of the first preset time length, if it is determined that the current first facial image does not match a predefined facial image in the preset target facial image, then it is confirmed that the recognition of the first facial image has failed; if within the first preset time length, it is determined that there is a predefined facial image in the preset target facial image that matches the current first facial image, then it is confirmed that the recognition of the first facial image has been successful.
[0156] Furthermore, in one embodiment, when capturing the first facial image, a first preset time length and a capture time point corresponding to the first facial image are obtained, and the capture time point corresponding to the first facial image is compared with the first preset time length to determine whether the first preset time length has been reached. If reached, it is determined that the first preset time length has ended and the first facial image has failed. If not reached, it is determined that the first preset time length has not ended, that is, within the first preset time length, the first facial image continues to be recognized.
[0157] In this embodiment, by querying whether there is a facial image matching the first facial image in the preset target facial images, and comparing the first acquisition duration with the first preset duration, it is possible to determine the first facial image recognition result based on the control of the acquisition duration, thereby reducing the workload of facial recognition and improving the efficiency of facial recognition.
[0158] Furthermore, if Figure 7 As shown, Figure 7 This is a flowchart of a fifth embodiment of the face recognition method of the present invention. In this embodiment, step S30 includes:
[0159] Step S301, based on the second preset acquisition frequency, acquiring a second facial image of the target object and a second initial acquisition time point and a second real-time acquisition time point;
[0160] Step S302, based on the second initial acquisition time point and the second real-time acquisition time point, obtain a second acquisition duration for acquiring the second facial image of the target object, and when the second acquisition duration is equal to a second preset duration, determine that the second preset duration ends.
[0161] In this embodiment, based on the second preset acquisition frequency, the second facial image of the target object and the second initial acquisition time point and the second real-time acquisition time point are acquired. Based on the second initial acquisition time point and the second real-time acquisition time point, the second acquisition duration of the second facial image of the target object is obtained. When the second acquisition duration is equal to the second preset duration, it is determined that the second preset duration has ended.
[0162] Specifically, in one embodiment, based on a second preset acquisition frequency, a second facial image and a second initial acquisition time point and a second real-time acquisition time point of the target object are acquired, and the second preset acquisition frequency, the second facial image and the second initial acquisition time point and the second real-time acquisition time point are associated and saved in a corresponding facial image database, wherein the acquisition time point corresponding to the second facial image is used to record and determine whether the acquisition time of the second facial image exceeds a second preset duration. Specifically, when the camera acquisition is turned on, the mobile terminal starts timing, and when acquiring the second facial image, the second acquisition time point corresponding to the acquired facial image is recorded. If the recorded second acquisition time point corresponding to the acquired second facial image reaches the second preset duration, the acquisition is terminated and the camera is turned off.
[0163] In this embodiment, the second facial image and the second collection time point corresponding to the second facial image are collected and obtained through the second preset collection frequency, so as to calculate the second collection duration, thereby realizing the collection of the second facial image within the second preset duration, and providing technical support for the second facial recognition.
[0164] Furthermore, if Figure 8 As shown, Figure 8 This is a flow chart of a sixth embodiment of the face recognition method of the present invention. In this embodiment, step S40 includes:
[0165] Step S401, based on the second facial image, the second initial acquisition time point and the second real-time acquisition time point, obtaining a second acquisition duration for acquiring the second facial image of the target object, and determining whether the second acquisition duration is equal to a second preset duration, if so, executing step S402;
[0166] Step S402, querying whether there is a face image matching the second face image in the preset target face images, if not, executing step S403;
[0167] Step S403, confirming that the second facial image recognition fails.
[0168] In this embodiment, based on the second facial image, the second initial acquisition time point and the second real-time acquisition time point, the second acquisition duration of the second facial image of the acquisition target object is obtained, and it is queried whether there is a facial image matching the second facial image in the preset target facial image. When the second acquisition duration is equal to the second preset duration, if there is no facial image matching the second facial image in the preset target facial image, it is confirmed that the recognition of the second facial image has failed. Within the second preset time, if there is a facial image matching the second facial image in the preset target facial image, it is confirmed that the recognition of the second facial image has succeeded.
[0169] Specifically, in one embodiment, at the second facial image, the second initial acquisition time point, and the second real-time acquisition time point, facial recognition is used to determine whether the current second facial image matches a predefined facial image in a preset target facial image. The current second facial image may be a facial image taken by a camera under visible light or a facial image taken under infrared light. The pre-stored facial image may be a facial image taken by a camera under visible light and / or facial feature data extracted from the facial image, or may be a facial image taken under infrared light and / or facial image feature data extracted from the facial image. The pre-stored facial images include at least one facial image of one user, and preferably include multiple facial images of each user. Multiple pre-stored facial images may form a list or other forms of databases. The facial image database in the present invention is not limited by the specific content and form of this embodiment.
[0170] Further, in one embodiment, at the end of the second preset time length, if it is determined that the current second facial image does not match the predefined facial image in the preset target facial image, then the second facial image recognition is confirmed to have failed; if within the second preset time length, it is determined that there is a predefined facial image in the preset target facial image that matches the current second facial image, then the second facial image recognition is confirmed to have succeeded.
[0171] Furthermore, in one embodiment, when collecting the second facial image, the second preset time length and the collection time point corresponding to the second facial image are obtained, and the collection time point corresponding to the second facial image is compared with the second preset time length to determine whether the second preset time length is reached. If reached, it is determined that the second preset time length has ended; if not reached, it is determined that the second preset time length has not ended, that is, the second facial image continues to be recognized within the second preset time length.
[0172] In this embodiment, by querying whether there is a facial image matching the second facial image in the preset target facial image, and comparing the second acquisition duration with the second preset duration, it is possible to determine the impact of the acquisition duration on the second facial image recognition result, thereby reducing the workload of facial recognition and improving the efficiency of facial recognition.
[0173] Furthermore, if Fig. 9 As shown, Fig. 9 This is a flow chart of a seventh embodiment of the face recognition method of the present invention. In this embodiment, after step S40, the method further includes:
[0174] Step S50: if it is confirmed that the second facial image recognition fails, outputting a prompt message including the second facial image recognition failure, and changing the second preset acquisition frequency to the first preset acquisition frequency;
[0175] Step S60, turning off the camera.
[0176] In this embodiment, if it is confirmed that the second facial image recognition has failed, a prompt message including the second facial image recognition failure is output, the second preset acquisition frequency is changed to the first preset acquisition frequency, and the camera is turned off.
[0177] Specifically, in one embodiment, if it is confirmed that the second facial image recognition has failed, a prompt message including the failure of the second facial image recognition is output, wherein the prompt message including the failure of the second facial image recognition needs to be set in the mobile terminal in advance, and the prompt message includes a preset voice prompt message and a preset text prompt message.
[0178] Further, in one embodiment, the second preset acquisition frequency is changed to the first preset acquisition frequency, and the camera is turned off. It should be noted that the second preset acquisition frequency is lower than the first preset acquisition frequency. Further, after confirming that the second face image recognition has failed, in preparation for the next face recognition operation, the second preset acquisition frequency is changed to the first preset acquisition frequency.
[0179] Further, in one embodiment, for example, the first preset duration is 1 second after the camera is started, the second preset duration is 4 seconds after the first preset duration ends, the first preset acquisition frequency is 33 milliseconds / frame, and the second preset acquisition frequency is 100 milliseconds / frame, wherein the first preset acquisition frequency is 33 milliseconds / frame because when the SDK algorithm fails to match, the face recognition completes an identification match in an average of 25 milliseconds, and when the SDK algorithm successfully matches, the face recognition completes an identification match in an average of 65 milliseconds. If the SDK algorithm fails to match, the acquisition frequency used by the camera is too If the acquisition frequency is too high and the SDK algorithm cannot handle it, the high acquisition frequency will not only fail to improve the recognition efficiency, but also cause redundant work in acquiring images. If the acquisition frequency is too low, the SDK algorithm needs to wait for the face images provided by the camera, which will reduce the speed of successful face recognition. Therefore, it is more appropriate to select 33 milliseconds / frame. The first preset duration is 1 second after the camera is started, and images are provided at a high acquisition frequency within the first preset duration. This is because although the first 10 frames can determine whether face recognition is successful with a high probability, providing more frames can prevent special situations. 30 frames of face images can be provided within 1 second within the first preset duration. Within 4 seconds after the second preset duration, face images are provided at an acquisition frequency of 100 milliseconds / frame, and 40 frames of face images can be provided within the second preset duration. Therefore, through this solution, within the preset 5-second duration, the camera provides 70 frames of facial images, while in the prior art, within the preset 5-second duration, the acquisition frequency provided by the camera is 33 milliseconds / frame, and the facial images provided are 100 frames. Therefore, this solution can save more than 50% of the camera's workload and reduce the SDK's matching times by more than half, thereby saving power consumption.
[0180] In this embodiment, by outputting a prompt message including the failure of second facial image recognition and changing the second preset acquisition frequency to the first preset acquisition frequency, the user experience is improved and technical support for the first preset acquisition frequency is provided for the next facial recognition.
[0181] Further, based on any one of the first to sixth embodiments, an eighth embodiment of the face recognition method of the present invention is proposed, and the eighth embodiment includes:
[0182] Step S70, regularly obtaining a first recognition success rate of a first face image within a first preset time period;
[0183] Step S80, when the first recognition success rate is less than a preset minimum threshold, reducing a first preset acquisition frequency and / or increasing a first preset duration;
[0184] Step S90: when the first recognition success rate is greater than a preset maximum threshold, increase the first preset acquisition frequency and / or reduce the first preset duration.
[0185] In this embodiment, the first recognition success rate of the first facial image within the first preset time period is periodically obtained. When the first recognition success rate is less than a preset minimum threshold, the first preset acquisition frequency is reduced and / or the first preset time period is increased. When the first recognition success rate is greater than a preset maximum threshold, the first preset acquisition frequency is increased and / or the first preset time period is reduced.
[0186] Specifically, in one embodiment, based on confirming the first facial image recognition result, the first recognition success rate corresponding to the first facial image recognition is calculated, and the first recognition success rate is compared with a preset minimum threshold and a preset maximum threshold. If the first recognition success rate is less than the preset minimum threshold, it is detected that the first facial image recognition success rate is too low. The reasons for the low success rate include that the first preset acquisition frequency is too high and / or the first preset time length is too short, that is, the amount of first facial images collected within the first preset time length is too small, and the corresponding number of matches is too small. Among them, the method of calculating the first recognition success rate corresponding to the first facial image recognition includes dividing the number of successful first facial image recognitions within the first preset time length by the corresponding total number of recognitions.
[0187] Furthermore, in one embodiment, the first recognition success rate of the first facial image within a first preset time period is obtained at a timed interval, wherein the time in the timing can be preset in the mobile terminal, and the preset time can include a first preset time period, a second preset time period and other time lengths. This scheme is not subject to the limitations of the specific length of the time in the timing in this embodiment.
[0188] Furthermore, in one embodiment, when it is detected that the first recognition success rate is less than a preset minimum threshold, the first preset acquisition frequency is reduced and the first preset duration is increased to increase the number of recognitions of the first face image within the first preset duration, thereby improving the success rate of face recognition, thereby saving face recognition power and improving the efficiency of face recognition. For example, the preset minimum threshold is 30%, and when it is detected that the first recognition success rate is 25%, the current first preset acquisition frequency is reduced from one frame every 33 milliseconds to one frame every 25 milliseconds, and the current first preset duration is 1 second, which is increased to the first preset duration of 1.5 seconds.
[0189] Furthermore, in one embodiment, when it is detected that the first recognition success rate is less than a preset minimum threshold, the first preset acquisition frequency is reduced. For example, the preset minimum threshold is 30%. When it is detected that the first recognition success rate is 25%, the current first preset acquisition frequency is reduced from providing one frame every 33 milliseconds to providing one frame every 25 milliseconds.
[0190] Furthermore, in one embodiment, when it is detected that the first recognition success rate is less than a preset minimum threshold, the first preset time length is increased. For example, the preset minimum threshold is 30%. When it is detected that the first recognition success rate is 25%, the current first preset time length of 1 second is increased to the first preset time length of 1.5 seconds.
[0191] Furthermore, in one embodiment, when the first recognition success rate is greater than a preset maximum threshold, the first preset acquisition frequency is increased and the first preset duration is reduced to reduce the number of recognitions of the first face image within the first preset duration, thereby reducing the workload of face recognition, saving power consumption of face recognition, and thus improving the efficiency of face recognition. For example, when the preset maximum threshold is 60%, when the first recognition success rate is detected to be 70%, the current first preset acquisition frequency is increased from one frame every 33 milliseconds to one frame every 40 milliseconds, and the current first preset duration is 1 second, reduced to the first preset duration of 0.5 seconds.
[0192] Furthermore, in one embodiment, when the first recognition success rate is greater than a preset maximum threshold, the first preset acquisition frequency is increased. For example, the preset maximum threshold is 60%. When the first recognition success rate is detected to be 70%, the current first preset acquisition frequency is increased from providing one frame every 33 milliseconds to providing one frame every 40 milliseconds.
[0193] Furthermore, in one embodiment, when the first recognition success rate is greater than a preset maximum threshold, the first preset time length is reduced. For example, the preset maximum threshold is 60%. When the first recognition success rate is detected to be 70%, the current first preset time length of 1 second is reduced to the first preset time length of 0.5 seconds.
[0194] Furthermore, in one embodiment, the second recognition success rate of the second facial image within a second preset time length is obtained at regular intervals. When the second recognition success rate is less than a preset minimum threshold, the second preset acquisition frequency is reduced and / or the second preset time length is increased. When the second recognition success rate is greater than a preset maximum threshold, the second preset acquisition frequency is increased and / or the second preset time length is reduced.
[0195] In this embodiment, by comparing the first recognition success rate with the preset minimum threshold and the preset maximum threshold, the first preset acquisition frequency and the first preset duration are adjusted, and the settings of the preset acquisition frequency and the preset duration can be continuously improved, thereby providing technical support for improving the accuracy of face recognition and saving power consumption.
[0196] Furthermore, the present invention also provides a mobile terminal, which includes a memory, a processor, and a face recognition program stored in the memory and executable on the processor. The method implemented when the face recognition program is executed by the processor can refer to the various embodiments of the terminal face recognition method of the present invention, which will not be repeated here.
[0197] Furthermore, in addition, an embodiment of the present invention also provides a computer-readable storage medium.
[0198] The computer-readable storage medium of the present invention stores a face recognition program, and when the face recognition program is executed, the steps of the terminal face recognition method as described above are implemented.
[0199] Among them, the method implemented when the face recognition program running on the processor is executed can refer to the various embodiments of the terminal face recognition method of the present invention, and will not be repeated here.
[0200] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0201] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0202] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0203] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A face recognition method, characterized in that: The face recognition method comprises the following steps: Upon receiving the face recognition instruction, turning on the camera of the mobile terminal and capturing a first face image of the target object based on a first preset capture frequency; Based on the first facial image and the first preset time length, identifying the first facial image; If it is confirmed that the first facial image recognition fails at the end of the first preset time, the first preset acquisition frequency is reduced to a second preset acquisition frequency, and the camera is controlled to acquire a second facial image of the target object at the second preset acquisition frequency; Based on the second facial image and the second preset time length, identifying the second facial image; If the second facial image recognition is confirmed to be successful within the second preset time period, turning off the camera; The step of starting the camera of the mobile terminal upon receiving the face recognition instruction and collecting the first face image of the target object based on the first preset collection frequency comprises: When receiving a face recognition instruction, the camera of the mobile terminal is turned on, and a guidance interface including guidance information for the user to collect a face image is displayed; When the guidance information matches the real-time status information of the mobile terminal, the camera is controlled to collect a first face image of the target object at a first preset collection frequency; in, Presetting in the mobile terminal guidance information for the user to collect a face image, the guidance information may include the position of the face, the brightness level, and the head posture; The step of acquiring a first facial image of a target object based on a first preset acquisition frequency comprises: Based on a first preset acquisition frequency, acquiring a first facial image of the target object and a first initial acquisition time point and a first real-time acquisition time point; Based on the first initial acquisition time point and the first real-time acquisition time point, obtaining a first acquisition duration for acquiring the first facial image of the target object, and when the first acquisition duration is equal to a first preset duration, determining that the first preset duration is over; Based on the first facial image, the first initial acquisition time point, and the first real-time acquisition time point, obtaining a first acquisition duration of the first facial image of the target object, and determining whether the first acquisition duration is equal to the first preset duration; If it is equal to the first preset time length, query whether there is a facial image matching the first facial image in the preset target facial images; If there is no facial image matching the first facial image in the preset target facial images, confirming that the recognition of the first facial image has failed; The step of controlling the camera to acquire the second facial image of the target object at the second preset acquisition frequency comprises: Based on the second preset acquisition frequency, acquiring a second facial image of the target object and a second initial acquisition time point and a second real-time acquisition time point; Based on the second initial acquisition time point and the second real-time acquisition time point, obtaining a second acquisition duration for acquiring the second facial image of the target object, and when the second acquisition duration is equal to a second preset duration, determining that the second preset duration is over; The step of identifying the second facial image based on the second facial image and the second preset time length includes: Based on the second facial image, the second initial acquisition time point, and the second real-time acquisition time point, obtaining a second acquisition duration for acquiring the second facial image of the target object, and determining whether the second acquisition duration is equal to a second preset duration; If it is equal to the second preset time length, querying whether there is a facial image matching the second facial image in the preset target facial images; If there is no facial image matching the second facial image in the preset target facial images, confirming that the recognition of the second facial image fails; The face recognition method further comprises: Regularly obtaining a first recognition success rate of a first face image within a first preset time period; When the first recognition success rate is less than a preset minimum threshold, reducing the first preset acquisition frequency and / or increasing the first preset duration; When the first recognition success rate is greater than a preset maximum threshold, the first preset collection frequency is increased and / or the first preset time duration is reduced.
2. The face recognition method according to claim 1, characterized in that: After the step of identifying the second facial image based on the second facial image and the second preset time length, the method further includes: If it is confirmed that the second facial image recognition fails, outputting a prompt message including the second facial image recognition failure, and changing the second preset acquisition frequency to the first preset acquisition frequency; Turn off the camera.
3. A mobile terminal, characterized in that: The mobile terminal includes: a memory, a processor, and a face recognition program stored in the memory and executable on the processor. When the face recognition program is executed by the processor, the steps of the face recognition method according to claim 1 or 2 are implemented.
4. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a face recognition program, and when the face recognition program is executed by the processor, the steps of the face recognition method according to claim 1 or 2 are implemented.
Citation Information
Patent Citations
Face recognition system based on process management
CN104143083A
Security monitoring method based on air conditioner and air conditioner
CN105141922A