Method, device and electronic equipment for determining the legitimacy of a target object
By performing multiple identity recognition and live body detection on the frame images in the video stream, the legality of the target object is comprehensively determined, which solves the problem of low legality determination accuracy in the existing technology and achieves higher discrimination accuracy and reliability.
Patent Information
- Application Number
- CN202010707941.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-21
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2040-07-21
AI Technical Summary
In the prior art, the accuracy of personnel legality judgment is not high, and misjudgment is prone to occur, which affects security and user experience.
By obtaining the video stream of the target object, multiple identity recognition and liveness detection are performed on the frame images in the video stream to comprehensively determine the legality of the target object and avoid single frame misjudgment.
It effectively improves the accuracy of legality judgment of target objects, reduces the probability of misjudgment, and ensures the reliability of legality judgment.
Smart Images

Figure CN112069878B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, device and electronic equipment for determining the legality of a target object. Background Art
[0002] In order to ensure security, the legitimacy of personnel is involved in many occasions. Only those who are judged to be legitimate (i.e., meet the requirements) are allowed to do subsequent things. For example, in access control occasions, only legitimate personnel (such as those with access rights) are allowed to pass through the access control; in bank ATMs (Automatic Teller Machines), only legitimate personnel (such as bank card holders) are allowed to perform operations such as withdrawals; in some APPs (Applications), only legitimate personnel (such as APP members) are allowed to use some functions of the APP. In existing legitimacy judgment methods, there are often misjudgments, and the judgment accuracy is not high. Summary of the invention
[0003] In view of this, an object of the present invention is to provide a method, device and electronic device for determining the legitimacy of a target object, which can effectively improve the accuracy of determining the legitimacy of the target object.
[0004] In order to achieve the above purpose, the technical solution adopted by the embodiment of the present invention is as follows:
[0005] In a first aspect, an embodiment of the present invention provides a method for determining the legitimacy of a target object, comprising: acquiring a video stream containing a target object; performing at least one identity recognition and / or at least one liveness detection on at least one frame image in the video stream until it is determined whether the target object is legitimate; wherein different identity recognitions are performed for different frame images.
[0006] Further, the step of determining whether the target object is legal includes: if a first specified number of identity recognition results are passed and a second specified number of liveness detection results are passed, determining that the target object is legal; wherein each identity recognition corresponds to the generation of an identity recognition result, and each liveness detection corresponds to the generation of a liveness detection result; if the number of frame images involved in identity recognition and / or liveness detection has reached a third specified number or the frame images in the video stream have participated in identity recognition and / or liveness detection, the number of passed identity recognition results has not yet reached the first specified number or the number of passed liveness detection results has not yet reached the second specified number, determining that the target object is illegal.
[0007] Furthermore, the step of performing at least one identity recognition and / or at least one liveness detection on at least one frame of image in the video stream includes: selecting a frame of image from the video stream as a target image; if the target image is the first frame of image selected from the video stream, performing identity recognition and liveness detection on the target image respectively; if the target image is not the first frame of image selected from the video stream, counting a first pass number of identity recognition results and a second pass number of liveness detection results obtained before the target image, determining a target operation corresponding to the target image according to the first pass number and the second pass number, and performing the target operation on the target image; the target operation includes identity recognition and / or liveness detection; if it is not determined whether the target object is legal, continue to select a frame of image from the video stream as the target image, and perform the target operation corresponding to the target image, until the legitimacy determination result of the target object is obtained, and then stop selecting frame images from the video stream.
[0008] Further, the step of determining the target operation corresponding to the target image based on the first pass number and the second pass number includes: if the first pass number does not reach a preset first threshold, determining that the target operation corresponding to the target image includes identity recognition; and if the second pass number does not reach a preset second threshold, determining that the target operation corresponding to the target image includes liveness detection.
[0009] Furthermore, before performing at least one identity recognition and / or at least one liveness detection on at least one frame image in the video stream, the method also includes: selecting a preset number of frame images from the video stream, and forming a target image set with the preset number of frame images; the step of performing at least one identity recognition and / or at least one liveness detection on at least one frame image in the video stream includes: performing at least one identity recognition and / or at least one liveness detection on at least one frame image in the target image set.
[0010] Furthermore, the method further includes: if it is determined that the target object is legitimate, providing a designated service for the target object.
[0011] Furthermore, the method further includes: if it is determined that the target object is illegal, initiating a warning prompt.
[0012] In a second aspect, an embodiment of the present invention further provides a device for determining the legitimacy of a target object, comprising: an acquisition module for acquiring a video stream containing a target object; a determination module for performing at least one identity recognition and / or at least one liveness detection on at least one frame image in the video stream until it is determined whether the target object is legal; wherein different times of identity recognition are for different frame images, and different times of liveness detection are for different frame images.
[0013] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a processor and a storage device; the storage device stores a computer program, and when the computer program is executed by the processor, it executes the method as described in any one of the first aspects.
[0014] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in any one of the above-mentioned first aspects are executed.
[0015] The embodiments of the present invention provide a method, device and electronic device for determining the legality of a target object, which obtains a video stream containing a target object; performs at least one identity recognition and / or at least one liveness detection on at least one frame image in the video stream until determining whether the target object is legal; wherein different times of identity recognition are for different frame images, and different times of liveness detection are for different frame images. Through the above method, identity recognition and liveness detection can be performed on frame images in a video stream, identity recognition and liveness detection can be performed separately for different frame images, and identity recognition and liveness detection can be performed simultaneously for the same frame image. The above method not only avoids the misjudgment phenomenon that may occur when only one frame image is judged in the prior art, and improves the accuracy of the target object's legality judgment, but also guarantees the reliability of the target object's legality judgment to a great extent through the joint judgment method of identity recognition and liveness detection.
[0016] Other features and advantages of the embodiments of the present invention will be described in the following description, or some features and advantages can be inferred or determined without doubt from the description, or can be learned by implementing the above-mentioned techniques of the embodiments of the present invention.
[0017] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention is shown;
[0020] Figure 2A flow chart of a method for determining the legitimacy of a target object provided by an embodiment of the present invention is shown;
[0021] Figure 3 A flow chart of a method for determining access authority provided by an embodiment of the present invention is shown;
[0022] Figure 4 The structure block diagram of a target object legitimacy determination device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be described below in conjunction with the drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments.
[0024] In the prior art, when judging the legitimacy of a person, a password judgment method is traditionally used. If the password is correct, the person is determined to be legal. However, since the password is easy to leak, image judgment methods are gradually being used, such as collecting an image and then performing identity authentication through face recognition. However, this method is easily affected by the image quality or the shooting angle of the person. For example, when the captured image is relatively blurred, or the person in the image is at an angle that is not easy to identify, such as lowering his head or facing sideways, it is very easy to misjudge, thereby causing the person who should be legal to be misjudged as illegal, affecting the user experience, or causing the person who should be illegal to be misjudged as legal, causing safety hazards. Based on this, the embodiment of the present invention provides a method, device and electronic device for judging the legitimacy of a target object, which can effectively improve the accuracy of judging the legitimacy of the target object and reduce the probability of misjudgment. The technology can be applied to occasions where the legitimacy of the target object needs to be judged, such as being applied to access control systems, bank ATMs and other intelligent terminals. The embodiment of the present invention is described in detail below.
[0025] Embodiment 1:
[0026] First, refer to Figure 1 An example electronic device 100 for implementing a method, an apparatus, and an electronic device for determining the legitimacy of a target object according to an embodiment of the present invention is described.
[0027] like Figure 1 The electronic device 100 includes one or more processors 102, one or more storage devices 104, an input device 106, an output device 108, and an image acquisition device 110. These components are interconnected via a bus system 112 and / or other forms of connection mechanisms (not shown). It should be noted that Figure 1The components and structures of the electronic device 100 shown are merely exemplary and non-limiting. The electronic device may also have other components and structures as required.
[0028] The processor 102 can be implemented in at least one hardware form of a digital signal processor (DSP), a field programmable gate array (FPGA), and a programmable logic array (PLA). The processor 102 can be a central processing unit (CPU), a graphics processing unit (GPU), or one or a combination of other forms of processing units with data processing capabilities and / or instruction execution capabilities, and can control other components in the electronic device 100 to perform desired functions.
[0029] The storage device 104 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 102 may run the program instructions to implement the client functions (implemented by the processor) and / or other desired functions in the embodiments of the present invention described below. Various applications and various data, such as various data used and / or generated by the application, may also be stored in the computer-readable storage medium.
[0030] The input device 106 may be a device used by a user to input instructions, and may include one or more of a keyboard, a mouse, a microphone, a touch screen, and the like.
[0031] The output device 108 may output various information (eg, images or sounds) to the outside (eg, a user), and may include one or more of a display, a speaker, and the like.
[0032] The image acquisition device 110 can capture images desired by the user (eg, photos, videos, etc.), and store the captured images in the storage device 104 for use by other components.
[0033] Exemplarily, example electronic devices for implementing the method and apparatus for determining the legitimacy of a target object according to an embodiment of the present invention may be implemented as intelligent terminals such as access control systems, ATM machines, safes, smart phones, tablet computers, and the like.
[0034] Embodiment 2:
[0035] See also Figure 2The flowchart of a method for determining the legitimacy of a target object is shown. The method can be executed by the electronic device in the above embodiment, and mainly includes the following steps S202 to S204:
[0036] Step S202: Acquire a video stream containing a target object.
[0037] In practical applications, for example, a camera set at a specified position can be used to collect video in real time, and a video stream containing a target object can be determined based on a target detection algorithm, that is, the target object appears in all frame images contained in the acquired video stream. In this embodiment, the target object is mainly a person.
[0038] For ease of understanding, first take the access control system as an example for explanation. The camera of the access control system can be installed at the access control entrance, and the camera can face the direction of the target object walking towards the access control so that the front view of the target object can be captured. When the target object is detected, the video stream containing the target object is acquired. Taking a bank ATM machine as an example, the camera can be set at a position above the machine where the face of the object can be captured. Of course, if the electronic device executing this embodiment is a mobile phone, a video stream including the face of the person can be directly captured through the mobile phone camera.
[0039] Step S204, perform at least one identity recognition and / or at least one liveness detection on at least one frame image in the video stream until it is determined whether the target object is legal; wherein different identity recognitions are performed on different frame images, different liveness detections are performed on different frame images, and the frame images targeted by the identity recognition and liveness detection are the same or different.
[0040] In this embodiment, the legality determination operation of the target object can be performed on one or more frames of the video stream containing the target object until it is determined whether the target object is legal (that is, the legality determination result of the target object is obtained). In the above manner, identity recognition can be performed on different frames of images, liveness detection can be performed on different frames of images, and both identity recognition and liveness detection can be performed on the same frame of image.
[0041] The method for determining the legitimacy of the target object provided in an embodiment of the present invention can perform identity recognition and liveness detection on frame images in a video stream. Identity recognition and liveness detection can be performed separately for different frame images, and identity recognition and liveness detection can be performed simultaneously for the same frame image. The above method not only avoids the misjudgment phenomenon that may occur when only one frame image is determined in the prior art, but also ensures the reliability of the legitimacy determination of the target object to a great extent through the joint determination method of identity recognition and liveness detection.
[0042] This embodiment provides a specific implementation method for determining whether the target object is legal: if the first specified number of identity recognition results are all passed and the second specified number of liveness detection results are all passed, the target object is determined to be legal; wherein each identity recognition corresponds to generating an identity recognition result, and each liveness detection corresponds to generating a liveness detection result; if the frame images involved in identity recognition and / or liveness detection have reached the third specified number or the frame images in the video stream have participated in identity recognition and / or liveness detection, the number of identity recognition results that have passed has not reached the first specified number or the number of liveness detection results that have passed has not reached the second specified number, the target object is determined to be illegal. In practical applications, identity recognition can be performed using face recognition technology. If the identity recognition result fails, it means that the target object is a person who is not recorded in the system. If the liveness detection result fails, it means that the target object may be a live attack object, such as a person wearing a hood.
[0043] In practical applications, the first designated number, the second designated number and the third designated number can be flexibly set according to requirements, and the first designated number and the second designated number can be the same or different, for example, the first designated number and the second designated number are both set to 1, and the third designated number is set to 3. This can be performed with reference to one of the following two implementations:
[0044] The first implementation method: a frame of image can be selected from the video stream first, and identity recognition and liveness detection can be performed on the frame of image respectively. If both pass, it is determined that the target object in the video stream is legal. If one fails (assuming that the identity recognition result fails), a second frame of image can be selected from the video stream, and only identity recognition can be performed on the second frame of image. If the identity recognition result of the second frame of image passes, it is determined that the target object in the video stream is legal. If the identity recognition result of the second frame of image still fails, a third frame of image can be selected from the video stream, and then identity recognition can be performed on the third frame of image. If the identity recognition result of the third frame of image passes, it is determined that the target object in the video stream is legal. If the identity recognition result of the third frame of image still fails, the extracted frame images (that is, the frame images involved in identity recognition / liveness detection) have reached the third specified number (3 images), so frame images are no longer extracted, and the target object in the video stream is directly determined to be illegal.
[0045] The second implementation method: three frames of images can be directly selected from the video stream, and identity recognition and liveness detection can be performed on these three frames of images. If at least one identity recognition result passes and at least one liveness detection result passes, the target object is determined to be legal. If none of the identity recognition results pass (that is, the first specified number 1 is not reached) or none of the liveness detection results pass (that is, the second specified number 1 is not reached), the target object is determined to be illegal.
[0046] The above is only an example and should not be regarded as limiting. In practical applications, the values of the first specified number and the second specified number may be set to be greater than 1 to ensure the security and reliability of the legality determination.
[0047] Since the first embodiment requires less processing than the second embodiment and can more quickly determine whether the target object is legitimate, taking the first embodiment as an example, the steps of performing at least one identity recognition and / or at least one liveness detection on at least one frame of image in the video stream in this embodiment can be implemented by referring to the following steps (1) to (4):
[0048] (1) Select a frame image from the video stream as the target image. In practical applications, frame images can be selected from the video stream in chronological order, or according to the clarity of the target object in the frame image, or according to the face ratio of the target object in the frame image, or according to the position of the previously selected frame image in the video stream (such as a specified interval from the previous frame image), etc., without limitation here.
[0049] (2) If the target image is the first frame image selected from the video stream, identity recognition and liveness detection are performed on the target image. If the target image is the first frame image selected from the video stream (that is, the frame image selected for the first time), both identity recognition and liveness detection can be performed directly on the target image.
[0050] (3) If the target image is not the first frame image selected from the video stream, the first pass number of the identity recognition results and the second pass number of the liveness detection results obtained before the target image are counted, and the target operation corresponding to the target image is determined according to the first pass number and the second pass number. The target operation is performed on the target image; the target operation includes identity recognition and / or liveness detection.
[0051] If the target image is not the first frame image selected from the video stream (that is, other frame images have been selected from the video stream for identity recognition and / or liveness detection before), it is necessary to determine whether identity recognition or liveness detection or both are required for the target image. Specifically, the target operation corresponding to the target image can be determined based on the first pass number and the second pass number. In one embodiment, when determining the target operation corresponding to the target image based on the first pass number and the second pass number, if the first pass number does not reach the preset first threshold, it is determined that the target operation corresponding to the target image includes identity recognition; if the second pass number does not reach the preset second threshold, it is determined that the target operation corresponding to the target image includes liveness detection. In actual applications, the preset first threshold can be equal to the aforementioned first specified number, and the preset second threshold can be equal to the aforementioned second specified number.
[0052] (4) If the target object is not determined to be legal, continue to select a frame image from the video stream as the target image and perform the target operation corresponding to the target image until the legality determination result of the target object is obtained and then stop selecting frame images from the video stream.
[0053] That is, if the currently obtained identity recognition results have not yet reached the first specified number or the liveness detection results have not yet reached the second specified number, and the frame images involved in identity recognition and / or liveness detection have not yet reached the third specified number, then during the period in which it is not determined whether the target object is legal, frame images can continue to be selected for the target image, and the operation in (3) above can be performed on the target image until the target object's legality determination result is obtained and the frame image selection is stopped. Among them, if the identity recognition results reach the first specified number, the liveness detection results reach the second specified number, and the number of frame images involved in identity recognition and / or liveness detection does not exceed the third specified number, the obtained legality determination result is that the target object is legal; if the number of frame images involved in identity recognition and / or liveness detection has reached the third specified number, but there are still identity recognition results that have not reached the first specified number or there are still liveness detection results that have not reached the second specified number, the obtained legality determination result is that the target object is illegal.
[0054] When actually judging whether the target object is legal, at most the third specified number of frame images are used for judgment. In practical applications, one frame image to be processed can be directly selected from the video stream as the target image each time, or the third specified number of frame images can be selected from the video stream at one time to form a target image set, and then identity recognition and / or liveness detection can be directly performed on the frame images in the target image set. That is, after obtaining the video stream, a preset number of frame images can be selected from the video stream in advance, and the preset number of frame images can be used to form a target image set, and then at least one frame image in the target image set can be subjected to at least one identity recognition and / or at least one liveness detection. In this way, frame images can be selected from the video stream based on a preset method to form a target image set, and then images can be selected from the target image set for corresponding operations. After all the images in the target image set are selected, if the number of identity recognition results that pass still does not reach the first specified number or the number of liveness detection results that pass does not reach the second specified number, the target object is determined to be illegal. Among them, the preset method can be to extract a specified number of images at equal time intervals, or to select a specified number of images with high clarity ranking, or to select a specified number of images with high ratio between the target object's face and the entire image, etc., which is not limited here.
[0055] Furthermore, if the target object is determined to be legal, a designated service is provided for the target object. The designated service can be flexibly limited according to the scenario in which the legality of the target object is determined. For example, for the access control system, release services such as opening the door (or opening the gate) can be provided for the target object. For smart terminals such as mobile phones and bank ATMs, functional services such as withdrawals, transfers, and information modification can be provided for the target object. For attendance punching devices, attendance punching services can be provided for the target object, which are not limited here. If the target object is determined to be illegal, a warning prompt is initiated. For example, a voice alarm is initiated or an alarm message is directly sent to a designated terminal.
[0056] The method for determining the legitimacy of the target object provided in this embodiment avoids the single-frame misjudgment phenomenon that is often seen in the prior art, and can perform identity recognition and / or liveness detection on multiple frames of images. The collected multiple frames of images containing the target object can be effectively utilized. For example, the access control system can effectively utilize the video frame images of the target object captured by the camera in the process of moving toward the access control entrance, and perform comprehensive judgment through multiple identity recognition results and liveness detection results, thereby ensuring the reliability of the legitimacy judgment of the target object to a great extent.
[0057] Embodiment three:
[0058] On the basis of the aforementioned embodiment, this embodiment provides a specific example of the method for determining the legality of the aforementioned target object. This example is mainly explained by taking the access control system as an example. In the application scenarios of the access control system, it can be considered that a legal target object has access authority. Therefore, determining whether the target object is legal is equivalent to determining whether the target object has access authority. This method can be executed by a processor of the access control system. The processor is connected to a camera provided in the access control system. The image acquisition range of the camera includes the area in front of the access control. People moving toward the access control can be captured by the camera. An identity recognition module and a liveness detection module are provided in the processor. The identity recognition module is used to perform identity recognition on the input image to obtain an identity recognition result. The liveness detection module is used to perform liveness detection on the input image to obtain a liveness detection result. When performing specific execution, please refer to the following. Figure 3 The flow chart of the method for determining the access authority is implemented as shown:
[0059] Step S302: Select the first frame image from the video stream captured by the camera. In practical applications, the video stream used is a video stream containing the target object. In a specific implementation, a section of the video stream can be selected in units of tracks. A track is defined as a video stream from the moment a face appears to the moment the face completely leaves the screen. For example, when person A walks toward the access control and enters the shooting range of the camera set at the access control entrance, the video captured by person A within the shooting range of the camera can be called the above track. When person A enters the shooting range, it is the starting point of the track, and when person A leaves the shooting range (such as when person A is already standing at the access control entrance, the camera is located above the person's head and person A can no longer be captured), it is the end point of the track.
[0060] Step S304: input the first frame image to the identity recognition module for identity recognition to obtain an identity recognition result; and input the first frame image to the liveness detection model for liveness detection to obtain a liveness detection result.
[0061] Step S306: Determine whether the target object's access authority determination result in the video stream is obtained based on the existing identity recognition results, the existing liveness detection results, and the number of selected frame images; if not, execute step S308; if yes, execute step S312: For example, if the number of existing identity recognition results that have passed has not reached the first specified number, the number of existing liveness detection results that have passed has not reached the second specified number, and the number of selected frame images has not reached the preset threshold value K, it is determined that the target object's access authority determination result in the video stream has not been obtained. The specific method of determining whether the target object has access authority can be performed with reference to the method of determining whether the target object is legal in the aforementioned embodiment, which will not be repeated here.
[0062] Step S308: Select another frame of image from the video stream, and determine the target module required to be input for the frame of image based on the previously obtained identity recognition results and liveness detection results; the target module includes an identity recognition module and / or a liveness detection module. Both the identity recognition module and the liveness detection module are functional modules that can be implemented by software, and can be implemented specifically using a neural network model. Please refer to the relevant technology and will not be repeated here. For example, if the number of existing identity recognition results that have passed has not reached the first specified number, and if the number of existing liveness detection results that have passed has reached the second specified number, then the target module required to be input for the newly selected frame of image is determined to be the liveness detection module.
[0063] Step S310: Input the frame image to the target module to perform the target operation to obtain the identity recognition result and / or the liveness detection result. Then return to step S306; wherein the target operation corresponding to the identity recognition module is identity recognition, and the target operation corresponding to the liveness detection module is liveness detection.
[0064] Step S312: Output the access authority determination result and perform the operation corresponding to the access authority determination result. For example, when the authority determination result shows that the target object has the authority, the access control system performs the door opening (or gate opening) operation; when the authority determination result shows that the target object does not have the authority, the access control system performs the no response operation or directly performs the alarm operation.
[0065] To sum up, the above method provided in this embodiment allows the access control system to effectively utilize the video frame images of the target object in the process of moving towards the access control, and can determine whether the target object has access authority based on multiple identity recognition results and / or liveness detection results, which can effectively improve the accuracy of access authority determination and reduce the probability of single-frame misjudgment.
[0066] Embodiment 4:
[0067] For the target object legitimacy determination method provided in the second embodiment, the present invention provides a target object legitimacy determination device, see Figure 4 The structure block diagram of a device for determining the legitimacy of a target object is shown, and the device includes the following modules:
[0068] An acquisition module 402 is used to acquire a video stream containing a target object;
[0069] The identification module 404 is used to perform at least one identity recognition and / or at least one liveness detection on at least one frame image in the video stream until it is determined whether the target object is legitimate; wherein different identity recognitions are performed on different frame images, different liveness detections are performed on different frame images, and the frame images targeted by the identity recognition and liveness detection are the same or different.
[0070] The above-mentioned target object legitimacy judgment device provided by the embodiment of the present invention can perform identity recognition and liveness detection on frame images in the video stream. Identity recognition and liveness detection can be performed separately for different frame images, and identity recognition and liveness detection can be performed simultaneously for the same frame image. The above-mentioned method not only avoids the misjudgment phenomenon that may occur when only one frame image is judged in the prior art, but also through the joint judgment method of identity recognition and liveness detection, it greatly guarantees the reliability of the legitimacy judgment of the target object.
[0071] In one embodiment, the discrimination module 404 is used to: determine that the target object is legal if a first specified number of identity recognition results are passed and a second specified number of liveness detection results are passed; wherein each identity recognition corresponds to the generation of an identity recognition result, and each liveness detection corresponds to the generation of a liveness detection result; if the number of frame images involved in identity recognition and / or liveness detection has reached a third specified number or the frame images in the video stream have participated in identity recognition and / or liveness detection, and the number of passed identity recognition results has not yet reached the first specified number or the number of passed liveness detection results has not yet reached the second specified number, determine that the target object is illegal.
[0072] In one embodiment, the discrimination module 404 is used to: select a frame of image from a video stream as a target image; if the target image is the first frame of image selected from the video stream, perform identity recognition and liveness detection on the target image; if the target image is not the first frame of image selected from the video stream, count the first pass number of identity recognition results and the second pass number of liveness detection results obtained before the target image, determine the target operation corresponding to the target image according to the first pass number and the second pass number, and perform the target operation on the target image; the target operation includes identity recognition and / or liveness detection; if it is not determined whether the target object is legal, continue to select a frame of image from the video stream as the target image, and perform the target operation corresponding to the target image, until the legitimacy judgment result of the target object is obtained, and then stop selecting frame images from the video stream.
[0073] In one embodiment, the discrimination module 404 is further used to: if the first pass number does not reach a preset first threshold, determine that the target operation corresponding to the target image includes identity recognition; and if the second pass number does not reach a preset second threshold, determine that the target operation corresponding to the target image includes liveness detection.
[0074] In one embodiment, the above-mentioned device also includes: an image selection module, which is used to select a preset number of frame images from the video stream and form a target image set with the preset number of frame images; on this basis, the discrimination module 404 is used to: perform at least one identity recognition and / or at least one liveness detection step on at least one frame image in the video stream, including: perform at least one identity recognition and / or at least one liveness detection on at least one frame image in the target image set.
[0075] In one embodiment, the above device further includes: a service providing module, which is used to provide a specified service for the target object if it is determined that the target object is legitimate.
[0076] In one embodiment, the above-mentioned device further includes: a warning module, which is used to initiate a warning prompt if it is determined that the target object is illegal.
[0077] The implementation principle and technical effects of the device provided in this embodiment are the same as those of the aforementioned embodiments. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0078] Furthermore, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are executed.
[0079] The computer program product of the access permission determination method, device and electronic device provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.
[0080] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0081] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0082] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for determining the legitimacy of a target object, characterized in that: include: Get the video stream containing the target object; Perform at least one identity recognition and / or at least one liveness detection on at least one frame of the video stream until it is determined whether the target object is legitimate; wherein different identity recognitions are performed on different frames of the image, and different liveness detections are performed on different frames of the image; The step of performing at least one identity recognition and / or at least one liveness detection on at least one frame of image in the video stream includes: Selecting a frame of image from the video stream as a target image; If the target image is the first frame image selected from the video stream, performing identity recognition and liveness detection on the target image respectively; If the target image is not the first frame image selected from the video stream, a first pass number of identity recognition results and a second pass number of liveness detection results obtained before the target image are counted, a target operation corresponding to the target image is determined according to the first pass number and the second pass number, and the target operation is performed on the target image; the target operation includes identity recognition and / or liveness detection; wherein, if the first pass number does not reach a preset first threshold, it is determined that the target operation corresponding to the target image includes identity recognition; and, if the second pass number does not reach a preset second threshold, it is determined that the target operation corresponding to the target image includes liveness detection; the preset first threshold is equal to a first specified number, and the preset second threshold is equal to a second specified number; If it is not determined whether the target object is legal, continue to select a frame image from the video stream as the target image, and perform a target operation corresponding to the target image until a result of the legality determination of the target object is obtained, then stop selecting frame images from the video stream; The step of determining whether the target object is legal includes: If the first specified number of identity recognition results are passed and the second specified number of liveness detection results are passed, the target object is determined to be legal; wherein each identity recognition generates an identity recognition result, and each liveness detection generates a liveness detection result.
2. The method according to claim 1, characterized in that The step of determining whether the target object is legal includes: If the number of frame images involved in identity recognition and / or liveness detection has reached a third specified number or all frame images in the video stream have participated in identity recognition and / or liveness detection, and the number of passed identity recognition results has not reached the first specified number or the number of passed liveness detection results has not reached the second specified number, it is determined that the target object is illegal.
3. The method according to claim 1, characterized in that Before performing at least one identity recognition and / or at least one liveness detection on at least one frame image in the video stream, the method further comprises: selecting a preset number of frame images from the video stream, and forming a target image set with the preset number of frame images; The step of performing at least one identity recognition and / or at least one liveness detection on at least one frame of image in the video stream includes: performing at least one identity recognition and / or at least one liveness detection on at least one frame of image in the target image set.
4. The method according to claim 1, characterized in that: The method further comprises: If the target object is determined to be legitimate, a designated service is provided for the target object.
5. The method according to claim 1, characterized in that The method further comprises: If the target object is determined to be illegal, a warning prompt is issued.
6. A device for determining the legitimacy of a target object, characterized in that: include: An acquisition module, used for acquiring a video stream containing a target object; A discrimination module, used for performing at least one identity recognition and / or at least one liveness detection on at least one frame of the video stream until it is determined whether the target object is legitimate; wherein different identity recognitions are performed on different frames of the image, and different liveness detections are performed on different frames of the image; Wherein, the discrimination module is used to select a frame of image from the video stream as a target image; if the target image is the first frame of image selected from the video stream, perform identity recognition and liveness detection on the target image respectively; if the target image is not the first frame of image selected from the video stream, count the first pass number of identity recognition results and the second pass number of liveness detection results obtained before the target image, determine the target operation corresponding to the target image according to the first pass number and the second pass number, and perform the target operation on the target image; the target operation includes identity recognition and / or liveness detection; wherein, if the first pass number does not reach a preset first threshold, determine that the target operation corresponding to the target image includes identity recognition; and if the second pass number does not reach a preset second threshold, determine that the target operation corresponding to the target image includes liveness detection; the preset first threshold is equal to a first specified number, and the preset second threshold is equal to a second specified number; if it is not determined whether the target object is legal, continue to select a frame of image from the video stream as the target image, and perform the target operation corresponding to the target image, until the legitimacy discrimination result of the target object is obtained, then stop selecting a frame of image from the video stream; Among them, the discrimination module is used to determine that the target object is legal if the first specified number of identity recognition results are passed and the second specified number of liveness detection results are passed; wherein each identity recognition generates an identity recognition result, and each liveness detection generates a liveness detection result.
7. An electronic device, characterized in that: include: processor and storage device; The storage device stores a computer program, which, when executed by the processor, executes the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are executed.
Citation Information
Patent Citations
Terminal unlocking method, terminals and computer-readable storage medium
CN108875333A