Living body detection method, device, equipment and storage medium
By employing multiple discriminative networks and an anomaly detection unit, the method addresses overfitting in face liveliness detection, improving accuracy and reliability in identifying genuine faces.
Patent Information
- Application Number
- CN202110031410.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-11
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2041-01-11
AI Technical Summary
Deep learning models are prone to overfitting problems when there are insufficient training samples or a single distribution, resulting in inaccurate facial detection results.
A number of different discriminant networks are used to extract and distinguish the detection images, and the first discriminant result and the second discriminant result are obtained through fusion and difference detection. Combined with the abnormal detection unit, the accuracy of the live detection is ensured.
It alleviates the overfitting problem of discriminative networks, improves the accuracy of live detection, and avoids erroneous discrimination results caused by poor training samples.
Smart Images

Figure CN114764948B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and particularly relates to a method, device, equipment, and storage medium for live detection. Background Art
[0002] Currently, face liveness detection plays a very important role in face identity verification technology. In the related art, a deep learning model is used to perform face liveness detection on a to-be-detected image to determine whether the to-be-detected image includes a real face. Among them, the deep learning model is a machine learning model trained with a large number of training samples.
[0003] However, in the above-mentioned related art, the success of the deep learning model depends on the scale and quality of the training samples. In the case of insufficient or single-distribution training samples, the deep learning model is prone to overfitting problems, resulting in inaccurate face liveness detection results determined based on a single deep learning model. Summary of the Invention
[0004] Embodiments of this application provide a method, device, equipment, and storage medium for live detection, which can alleviate the overfitting problem of the discrimination network and ensure the accuracy of live detection. The technical solutions are as follows:
[0005] According to one aspect of the embodiments of this application, a method for live detection is provided. The method includes:
[0006] Performing feature extraction processing on a to-be-detected image to obtain feature information of the to-be-detected image;
[0007] Based on the feature information, respectively using a plurality of different discrimination networks to determine a plurality of discrimination information of the to-be-detected image; wherein, the discrimination information includes category features corresponding to the to-be-detected image;
[0008] Performing fusion processing on the plurality of discrimination information to obtain a first discrimination result; wherein, the first discrimination result is used to indicate whether the to-be-detected image includes a target live body;
[0009] Performing difference detection on the plurality of discrimination information to obtain a second discrimination result; wherein, the second discrimination result is used to indicate whether the to-be-detected image belongs to an abnormal category, and the abnormal category refers to a category that the plurality of discrimination networks have not learned during the training process;
[0010] In the case where the first discrimination result is that the to-be-detected image includes the target live body and the second discrimination result is that the to-be-detected image does not belong to the abnormal category, it is determined that the to-be-detected image passes the live detection.
[0011] According to one aspect of the embodiments of the present application, a method for training a live detection model is provided. The live detection model includes a plurality of different discriminant networks and an anomaly detection unit. Among them, the discriminant network is used to determine the discriminant information of the image to be detected based on the feature information of the image to be detected, and the discriminant information includes the category features corresponding to the image to be detected. The anomaly detection unit is used to determine a second discriminant result based on the multiple discriminant information respectively output by the plurality of different discriminant networks, and the second discriminant result is used to indicate whether the image to be detected belongs to an abnormal category.
[0012] The method includes:
[0013] Obtain multiple different groups of first training samples. Among them, the first training samples include positive samples containing the target live body and negative samples not containing the target live body.
[0014] Use the multiple different groups of first training samples to train the plurality of different discriminant networks. Among them, the first training samples corresponding to different discriminant networks are different.
[0015] Obtain second training samples. Among them, the second training samples include samples of normal categories and samples of abnormal categories. The normal category refers to the sample category corresponding to the first training samples, and the abnormal category refers to other categories except the sample category corresponding to the first training samples.
[0016] Use the second training samples to train the anomaly detection unit.
[0017] According to one aspect of the embodiments of the present application, a live detection device is provided. The device includes:
[0018] A feature acquisition module, configured to perform feature extraction processing on the image to be detected to obtain the feature information of the image to be detected.
[0019] An information determination module, configured to respectively use a plurality of different discriminant networks based on the feature information to determine a plurality of discriminant information of the image to be detected. Among them, the discriminant information includes the category features corresponding to the image to be detected.
[0020] A first determination module, configured to perform fusion processing on the plurality of discriminant information to obtain a first discriminant result. Among them, the first discriminant result is used to indicate whether the image to be detected includes the target live body.
[0021] A second determination module, configured to perform difference detection on the plurality of discriminant information to obtain a second discriminant result. Among them, the second discriminant result is used to indicate whether the image to be detected belongs to an abnormal category, and the abnormal category refers to a category that the plurality of discriminant networks have not learned during the training process.
[0022] A result determination module, configured to determine a first determination result and a second determination result based on the multiple discrimination information; wherein, the first determination result is used to indicate whether the target live body is included in the image to be detected, and the second determination result is used to indicate whether the image to be detected belongs to an abnormal category;
[0023] A live body determination module, configured to determine that the image to be detected passes the live body detection when the first determination result is that the target live body is included in the image to be detected and the second determination result is that the image to be detected does not belong to the abnormal category.
[0024] According to one aspect of the embodiments of the present application, a training device for a live body detection model is provided. The live body detection model includes a plurality of different discrimination networks and an anomaly detection unit; wherein, the discrimination network is configured to determine the discrimination information of the image to be detected based on the feature information of the image to be detected, the discrimination information includes the category feature corresponding to the image to be detected, and the anomaly detection unit is configured to determine a second determination result based on the multiple discrimination information respectively output by the plurality of different discrimination networks, and the second determination result is used to indicate whether the image to be detected belongs to an abnormal category;
[0025] The device includes:
[0026] A first acquisition module, configured to acquire multiple different groups of first training samples; wherein, the first training samples include positive samples containing the target live body and negative samples not containing the target live body;
[0027] A network training module, configured to train the plurality of different discrimination networks by using the multiple different groups of first training samples; wherein, the first training samples corresponding to different discrimination networks are different;
[0028] A second acquisition module, configured to acquire second training samples; wherein, the second training samples include samples of a normal category and samples of an abnormal category, the normal category refers to the sample category corresponding to the first training samples, and the abnormal category refers to other categories except the sample category corresponding to the first training samples;
[0029] A unit training module, configured to train the anomaly detection unit by using the second training samples.
[0030] According to one aspect of the embodiments of the present application, an embodiment of the present application provides a computer device, which includes a processor and a memory. At least one instruction, at least one program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the above-mentioned live detection method or the training method of the above-mentioned live detection model.
[0031] According to one aspect of the embodiments of the present application, an embodiment of the present application provides a computer-readable storage medium, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the above-mentioned live detection method or the training method of the above-mentioned live detection model.
[0032] According to one aspect of the embodiments of the present application, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned live detection method or implements the training method of the above-mentioned live detection model.
[0033] The technical solution provided by the embodiments of the present application can bring the following beneficial effects:
[0034] Multiple discriminant information is obtained through multiple different discriminant networks, and then the multiple discriminant information is fused to obtain a first discriminant result, so that the first discriminant result fuses the live detection results of the multiple discriminant networks for the image to be detected, and the first discriminant result can accurately represent whether the image to be detected includes the target live body. Moreover, the differences between the multiple discriminant results are detected to obtain a second discriminant result, and the second discriminant result can determine whether the image to be detected belongs to an abnormal category, and the abnormal category is a category that the multiple discriminant networks have not learned. However, during the training process of the discriminant network, the category of the target live body must belong to the category seen by the discriminant network. If the live body to be detected in the image to be detected belongs to the abnormal category, then the image to be detected does not include the target live body. In this case, even if the first discriminant result determines that the image to be detected includes the target live body, the computer device can still determine that the image to be detected fails the live detection and does not include the target live body based on the second discriminant result, alleviating the overfitting problem of the discriminant network and avoiding the error of the final discriminant result due to the poor quality of the training samples of the discriminant network, ensuring the accuracy of the live detection. Description of the Drawings
[0035] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0036] Figure 1 is a flowchart of a living body detection method provided by an embodiment of the present application;
[0037] Figure 2 is a flowchart of a living body detection method provided by another embodiment of the present application;
[0038] Figure 3 is a flowchart of a living body detection method provided by yet another embodiment of the present application;
[0039] Figure 4 Exemplarily shows a schematic diagram of a living body detection model;
[0040] Figure 5 is a flowchart of a training method for a living body detection model provided by an embodiment of the present application;
[0041] Figure 6 Exemplarily shows a schematic diagram of the effect of an anomaly detection unit;
[0042] Figure 7 Exemplarily shows a schematic diagram of a comparison between the present application and the living body detection methods in the related art;
[0043] Figure 8 is a block diagram of a living body detection device provided by an embodiment of the present application;
[0044] Figure 9 is a block diagram of a living body detection device provided by another embodiment of the present application;
[0045] Figure 10 is a block diagram of a training device for a living body detection model provided by an embodiment of the present application;
[0046] Figure 11 is a block diagram of the structure of a computer device provided by an embodiment of the present application. Detailed Embodiments
[0047] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail in conjunction with the accompanying drawings.
[0048] Artificial Intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines to enable machines to have the functions of perception, reasoning, and decision-making.
[0049] Artificial intelligence technology is an interdisciplinary subject that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0050] Computer Vision (CV) is a science that studies how to make machines "see". More specifically, it refers to using cameras and computers to replace human eyes for object recognition, measurement, and other machine vision, and further performing graphic processing to make the computer process the images into a form more suitable for human eyes to observe or transmit to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies and attempts to build artificial intelligence systems that can obtain information from images or multi-dimensional data. Computer vision technology usually includes technologies such as image processing, image recognition, image semantic understanding, image retrieval, OCR (Optical Character Recognition), video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping, and also includes common biometric recognition technologies such as face recognition and fingerprint recognition.
[0051] Machine Learning (ML) is an interdisciplinary subject that involves multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve their own performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent, and its applications cover all fields of artificial intelligence. Machine learning and deep learning usually include technologies such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning from demonstration.
[0052] With the research and progress of artificial intelligence technology, artificial intelligence technology has been studied and applied in multiple fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, driverless, autonomous driving, drones, robots, smart healthcare, smart customer service, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0053] The solution provided in the embodiment of the present application involves technologies such as machine learning of artificial intelligence, and uses multiple groups of different first training samples to train multiple different discriminant networks in the liveness detection model, and uses second training samples to train and adjust parameters of the abnormality detection unit in the liveness detection model. Among them, the first training samples include positive samples containing the target living body, and negative samples that do not contain the target living body, and different discriminant networks correspond to different first training samples; the second training samples include samples of normal categories and samples of abnormal categories. The computer device can use samples of normal categories to train the abnormality detection unit, and after the abnormality detection unit is forward propagated, use a mixture of samples of normal categories and samples of abnormal categories to adjust the parameters of the abnormality detection unit. The above-mentioned normal category refers to the sample category corresponding to the first training sample, and the above-mentioned abnormal category refers to other categories except the sample category corresponding to the first training sample. Taking the target living body as a human face as an example, if the first training sample includes a positive sample containing a human face, and a negative sample containing a simulated human face mask and a headgear, and the second training sample includes a sample containing a human face, a sample containing a simulated human face mask, a sample containing a headgear, a sample containing a three-dimensional human face model, and a sample containing a re-photographed human face image, then, in this case, the samples of the normal category include samples containing a human face, samples containing a simulated human face mask, and samples containing a headgear, and the samples of the abnormal category include samples containing a three-dimensional human face model and samples containing a re-photographed human face image. In addition, in an embodiment of the present application, the above-mentioned living body detection model also includes an input layer, a feature extraction network, a living body detection unit, and a result output unit. During the use of the liveness detection model, the image to be detected is input into the input layer of the liveness detection model; the feature extraction network performs feature extraction processing on the image to be detected to obtain feature information of the image to be detected; multiple different discriminant networks determine multiple discriminant information of the image to be detected based on the feature information; the liveness detection unit determines the first discriminant result based on the multiple discriminant information; the abnormality detection unit determines the second discriminant result based on the multiple discriminant information; the result output unit determines whether the image to be detected passes the liveness detection based on the first discriminant result and the second discriminant result. The first discriminant result is used to indicate whether the image to be detected includes the target live body; the second discriminant result is used to indicate whether the image to be detected belongs to an abnormal category; if the image to be detected includes the target live body and the image to be detected does not belong to an abnormal category, it is determined that the image to be detected passes the liveness verification.
[0054] It should be noted that the liveness detection model provided in this application can be widely used in various fields. Specifically as follows:
[0055] (1) In the field of artificial intelligence, a live detection model is set in a service-type intelligent robot. The intelligent robot can determine the live bodies in the surrounding environment through the live detection model, and then accurately provide services for the corresponding live bodies, such as rescuing animals, providing various services for users, etc.;
[0056] (2) In the field of self-driving, a live detection model is set in a vehicle-mounted terminal. During the automatic driving of the vehicle, the vehicle-mounted terminal obtains the live bodies in the surrounding environment through the live detection model, and then adjusts the driving route, such as avoiding obstacles that are not live bodies and waiting for obstacles of live bodies to move outside the pre-planned driving route;
[0057] (3) In the medical field, a live detection model is set in the background server or foreground terminal of a certain application. The live detection model can determine whether the target live body is included in the image through the image collected by the application, and then detect the temperature of the target live body through the image information. Whether the target live body is in a fever state is determined by the temperature of the target live body, which is convenient for determining subsequent treatment and handling of the target live body.
[0058] Of course, the live detection model in this application can also be applied to various other fields, which will not be exemplified one by one here. Exemplarily, in the case where the target live body is a face live body, the corresponding typical application fields include conference check-in, face payment, face entry at the station, remote face temperature detection, etc.
[0059] For ease of explanation, in the following method embodiments, only the execution subject of each step is taken as an example of a computer device for introduction. The computer device can be any electronic device with computing and storage capabilities. For example, the computer device can be a server, which can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Again, for example, the computer device can also be a terminal, which can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server can be directly or indirectly connected through wired or wireless communication methods, and this application does not make any restrictions here. It should be noted that in the embodiments of this application, the execution subject of each step can be the same computer device, or can be executed by multiple different computer devices interacting with each other, and this is not limited here. It should also be noted that in the embodiments of this application, the execution subject of the following living body detection method and the execution subject of the following training method of the living body detection model can be the same computer device, or can be different computer devices, and this application does not make any restrictions on this.
[0060] Next, the technical solution of this application will be introduced in detail with several embodiments.
[0061] Please refer to Figure 1 , which shows a flowchart of a living body detection method provided by an embodiment of this application. The method can include the following steps (101-105):
[0062] Step 101, obtain an image to be detected.
[0063] The image to be detected includes a to-be-detected target of an unknown category, and the to-be-detected target can be a living body target or a non-living body target. Among them, the image to be detected can include one or more to-be-detected targets, and this application does not make any restrictions on this. Optionally, when the image to be detected includes multiple to-be-detected targets, the computer device can preprocess the image to be detected, obtain image frames corresponding to different to-be-detected targets from the image to be detected, and then perform living body detection on the to-be-detected targets in the image frames. In the embodiments of this application, the computer device obtains the image to be detected before performing living body detection.
[0064] In a possible implementation, the computer device acquires the above-mentioned image to be detected in real time. Optionally, the computer device is connected to a device with a photographing function. Further, the device acquires the image to be detected from the surrounding environment in real time and provides the image to be detected to the computer device.
[0065] In another possible implementation, the computer device pre-acquires the above-mentioned image to be detected and stores it in the computer device itself. Optionally, the computer device acquires the image to be detected through a device with a photographing function, stores the image to be detected, and then uniformly performs liveness detection on the stored and undetected images to be detected at regular time intervals.
[0066] Among them, the above-mentioned device can be directly set in the computer device, such as setting a camera in the computer device; or it can be set in an associated device of the computer device. For example, if the computer device is a background server, a camera is set in the corresponding foreground terminal.
[0067] It should be noted that in actual applications, the staff can adjust the way the computer device acquires the image to be detected according to the actual situation. Exemplarily, in scenarios such as face verification at stations, identity verification in examination rooms, and temperature detection of faces at the entrances of public places, the computer device acquires the image to be detected in real time to ensure the real-time nature of liveness detection and ensure that users can carry out subsequent activities in a timely manner after liveness detection; in scenarios with low real-time requirements such as personnel verification in warehouses after work starts and identity verification of mobile personnel in shopping malls, the computer device stores the acquired image to be detected and performs liveness detection on the image to be detected at regular time intervals.
[0068] Of course, in actual applications, when the computer device acquires the above-mentioned image to be detected, it can directly acquire the image to be detected; or it can first acquire the image to be detected video and select the image frame containing the target to be detected from the image to be detected video as the image to be detected. The embodiments of the present application do not limit this.
[0069] Step 102: Perform feature extraction processing on the image to be detected to obtain the feature information of the image to be detected.
[0070] In the embodiments of the present application, after the computer device acquires the above-mentioned image to be detected, it performs feature extraction processing on the image to be detected to obtain the feature information of the image to be detected. Among them, the feature information refers to the feature information of the target to be detected in the image to be detected, and the feature information may include features for characterizing the category of the target to be detected. Optionally, the feature information of the image to be detected may include the feature information of multiple targets to be detected.
[0071] In a possible implementation manner, the to-be-detected image described above includes a to-be-detected target. After the computer device acquires the to-be-detected image, it performs feature extraction processing on the to-be-detected image to obtain feature information about the to-be-detected target.
[0072] In another possible implementation manner, the to-be-detected image described above includes multiple to-be-detected targets. After the computer device acquires the to-be-detected image, it performs feature extraction processing on the to-be-detected image to obtain feature information about the multiple to-be-detected targets. Among them, the feature information of different to-be-detected targets can be directly included in the feature information of the to-be-detected image. In subsequent live detection, the computer device can determine the specific number of to-be-detected targets according to the feature information; or, the feature information of different to-be-detected targets can also be included in the feature information of the to-be-detected image in a grouped form, and each group of feature information corresponds to a to-be-detected target. In subsequent live detection, the computer device can directly determine the number of to-be-detected targets according to the grouping situation.
[0073] Optionally, before performing feature extraction processing on the to-be-detected image, the computer device can perform preprocessing on the to-be-detected image. Exemplarily, after the computer device acquires the to-be-detected image, it performs noise reduction processing on the to-be-detected image and repairs the blurred area of the to-be-detected image, so that the preprocessed to-be-detected image is clear and accurate, and then performs feature extraction processing on the preprocessed to-be-detected image to ensure the accuracy of the feature information. Among them, the above noise reduction processing and repair processing can be global processing of the to-be-detected image or processing of the area where the to-be-detected target is located in the to-be-detected image. The embodiments of the present application do not limit this.
[0074] Step 103: Use multiple different discriminant networks to respectively determine multiple discriminant information of the to-be-detected image based on the feature information.
[0075] The discriminant network refers to a deep learning network obtained through machine learning and used to obtain the category features of the to-be-detected target. In the embodiments of the present application, after the computer device acquires the above feature information, it uses multiple different discriminant networks to respectively determine multiple discriminant information of the to-be-detected image based on the feature information. Among them, the discriminant information includes the category features corresponding to the to-be-detected image. The above category features are used to indicate whether the to-be-detected image includes a target living body. Optionally, the computer device can determine the detection results of different discriminant networks for the to-be-detected image according to different category features. Exemplarily, for a single discriminant network, after the computer device acquires the discriminant information corresponding to the discriminant network, it can determine the live detection result of the single discriminant network for the to-be-detected image according to the category features included in the discriminant information.
[0076] It should be noted that in the embodiments of the present application, different discrimination networks are independently initialized and trained, that is, during the training process, the training samples corresponding to different discrimination networks are different. After the computer device obtains the above feature information, it inputs the feature information into different discrimination networks respectively, and then obtains multiple discrimination information output by different discrimination networks.
[0077] Step 104: Determine a first discrimination result and a second discrimination result based on the multiple discrimination information.
[0078] In the embodiments of the present application, after the computer device obtains the above multiple discrimination information, it determines a first discrimination result and a second discrimination result based on the multiple discrimination information.
[0079] The above first discrimination result is used to indicate whether the image to be detected includes a target living body. Among them, the target living body can be any living body, such as a person, various animals, etc. Optionally, after the computer device obtains the above multiple discrimination information, it can fuse the multiple discrimination information, and then obtain the first discrimination result. Among them, the fusion method for the multiple discrimination information can be average processing or weighted summation processing, and the embodiments of the present application do not limit this.
[0080] The above second discrimination result is used to indicate whether the image to be detected belongs to an abnormal category. The abnormal category refers to a category that the above multiple discrimination networks have not seen during the training process, that is, the abnormal category is other categories outside the sample categories corresponding to the training samples of the above discrimination networks. Optionally, after the computer device obtains the above multiple discrimination information, it can determine the degree of difference between the multiple discrimination information, and determine the above second discrimination result based on the degree of difference. Optionally, when the degree of difference is large, it is determined that the image to be detected belongs to an abnormal category.
[0081] Step 105: Determine that the image to be detected passes the living body detection when the first discrimination result is that the image to be detected includes a target living body and the second discrimination result is that the image to be detected does not belong to an abnormal category.
[0082] In the embodiments of the present application, after the computer device obtains the above first discrimination result and the above second discrimination result, it determines whether the image to be detected passes the living body detection based on the first discrimination result and the second discrimination result. Optionally, when the first discrimination result is that the image to be detected includes a target living body and the second discrimination result is that the image to be detected does not belong to an abnormal category, it is determined that the image to be detected passes the living body detection, that is, the image to be detected includes a target living body.
[0083] It should be noted that in the case where the to-be-detected image includes multiple to-be-detected targets, the computer device can determine the to-be-detected targets in the to-be-detected image in advance, and then determine whether the to-be-detected target is a target live body according to the first discrimination result and the second discrimination result of each to-be-detected target; alternatively, the computer device can first determine whether the to-be-detected image includes a target live body according to the first discrimination result and the second discrimination result of the to-be-detected image, and then determine the target live body based on the feature information of each to-be-detected live body. The embodiments of the present application do not limit this.
[0084] In summary, in the technical solution provided by the embodiments of the present application, multiple discrimination information is obtained through multiple different discrimination networks, and then the first discrimination result and the second discrimination result are determined based on the multiple discrimination information. Whether the to-be-detected image includes a target live body is determined according to the first discrimination result, and whether the to-be-detected image belongs to an abnormal category is determined according to the second discrimination result. The abnormal category is a category that the multiple discrimination networks have not learned. Moreover, in the training process of the discrimination network, the category of the target live body must belong to the category seen by the discrimination network. If the to-be-detected live body in the to-be-detected image belongs to the abnormal category, then the to-be-detected image must not include the target live body. In this case, even if the first discrimination result determines that the to-be-detected image includes the target live body, the computer device can also determine that the to-be-detected image fails the live body detection and does not include the target live body based on the second discrimination result, alleviating the overfitting problem of the discrimination network and avoiding the error of the final discrimination result due to the poor quality of the training samples of the discrimination network, ensuring the accuracy of the live body detection.
[0085] Please refer to Figure 2 , which shows a flowchart of a live body detection method provided by another embodiment of the present application. The method may include the following steps (201-205):
[0086] Step 201, perform feature extraction processing on the to-be-detected image to obtain the feature information of the to-be-detected image.
[0087] In the embodiments of the present application, after the computer device obtains the to-be-detected image, it performs feature extraction processing on the to-be-detected image to obtain the feature information of the to-be-detected image. Optionally, the computer device can obtain the feature information of the to-be-detected image according to the feature extraction network, or can obtain the feature information of the to-be-detected image according to the pre-set feature extraction rule. The embodiments of the present application do not limit this.
[0088] Step 202, based on the feature information, respectively use multiple different discrimination networks to determine multiple discrimination information of the to-be-detected image.
[0089] In the embodiments of the present application, after the computer device obtains the above-mentioned feature information, based on the feature information, multiple different discriminant networks are respectively used to determine multiple discriminant information of the image to be detected. Among them, the discriminant network can be a deep learning network obtained through machine learning, and the discriminant information includes the category features corresponding to the image to be detected.
[0090] Optionally, the discriminant information obtained through different discriminant networks may be the same or different, and the embodiments of the present application do not limit this.
[0091] Step 203: Perform a fusion process on the multiple discriminant information to obtain a first discriminant result.
[0092] In the embodiments of the present application, after the computer device obtains the above-mentioned multiple discriminant information, a fusion process is performed on the multiple discriminant information to obtain a first discriminant result. Among them, the first discriminant result is used to indicate whether the image to be detected includes a target live body.
[0093] Optionally, when the computer device performs a fusion process on the multiple discriminant information, it may perform an averaging process on the multiple discriminant information or perform a weighted summation process on the multiple discriminant information. The embodiments of the present application do not limit this.
[0094] Step 204: Perform a difference detection on the multiple discriminant information to obtain a second discriminant result.
[0095] In the embodiments of the present application, after the computer device obtains the above-mentioned multiple discriminant information, a difference detection is performed on the multiple discriminant information to obtain a second discriminant result. Among them, the second discriminant result is used to indicate whether the image to be detected belongs to an abnormal category, and the abnormal category refers to a category that the multiple discriminant networks have not learned during the training process.
[0096] It should be noted that in the embodiments of the present application, after the computer device obtains the above-mentioned multiple discriminant information, it can simultaneously perform a fusion process and a difference detection on the multiple discriminant information, and then synchronously obtain the first discriminant result and the second discriminant result. Of course, the computer device can also obtain the first discriminant result first and then obtain the second discriminant result, or obtain the second discriminant result first and then obtain the first discriminant result. The embodiments of the present application do not limit this.
[0097] Step 205: When the first discriminant result indicates that the image to be detected includes a target live body and the second discriminant result indicates that the image to be detected does not belong to an abnormal category, it is determined that the image to be detected passes the live body detection.
[0098] In an embodiment of the present application, after the computer device obtains the above first discrimination result and the above second discrimination result, based on the first discrimination result and the second discrimination result, it determines whether the image to be detected passes the live detection. Optionally, when the first discrimination result is that the image to be detected includes a target live body and the second discrimination result is that the image to be detected does not belong to an abnormal category, it is determined that the image to be detected passes the live detection, that is, the image to be detected includes a target live body.
[0099] In summary, in the technical solution provided by the embodiment of the present application, multiple discrimination information is obtained through multiple different discrimination networks, and then the multiple discrimination information is fused to obtain a first discrimination result, so that the first discrimination result fuses the live detection results of the multiple discrimination networks for the image to be detected, enabling the first discrimination result to accurately represent whether the image to be detected includes a target live body. Moreover, the differences between the multiple discrimination results are detected to obtain a second discrimination result, and the second discrimination result can determine whether the image to be detected belongs to an abnormal category, where the abnormal category is a category not learned by the multiple discrimination networks. However, during the training process of the discrimination network, the category of the target live body must belong to the categories seen by the discrimination network. If the live body to be detected in the image to be detected belongs to an abnormal category, then the image to be detected necessarily does not include the target live body. In this case, even if the first discrimination result determines that the image to be detected includes the target live body, the computer device can still determine based on the second discrimination result that the image to be detected fails the live detection and does not include the target live body, alleviating the overfitting problem of the discrimination network and avoiding errors in the final discrimination result due to poor quality of the training samples of the discrimination network, ensuring the accuracy of the live detection.
[0100] Next, the determination methods of the first discrimination result and the second discrimination result are introduced.
[0101] Optionally, the determination method of the first discrimination result includes the following steps:
[0102] 1. Fuse and process the multiple discrimination information to obtain fused discrimination information.
[0103] In an embodiment of the present application, after the computer device obtains the above multiple discrimination information, it fuses and processes the multiple discrimination information to obtain fused discrimination information. Among them, the fused discrimination information includes the category features corresponding to the fused image to be detected.
[0104] In a possible implementation manner, the computer device obtains the above fused discrimination information through an averaging process. Optionally, after the computer device obtains the above multiple discrimination information, it performs an averaging process on the multiple discrimination information to obtain the above fused discrimination information.
[0105] In another possible implementation, the computer device obtains the above-mentioned fusion discrimination information through weighted summation processing. Optionally, after obtaining the above-mentioned multiple discrimination information, the computer device obtains the weight values corresponding to the multiple discrimination information respectively, and performs weighted summation processing on the multiple discrimination information based on the weight values corresponding to the multiple discrimination information respectively to obtain the above-mentioned fusion discrimination information.
[0106] Optionally, when obtaining the above-mentioned weight values, the computer device may determine the weight values corresponding to the above-mentioned multiple different discrimination information based on the accuracy of different discrimination networks. Among them, the weight value corresponding to the discrimination information output by the discrimination network is positively correlated with the discrimination accuracy of the discrimination network; that is, the higher the discrimination accuracy of the discrimination network, the greater the weight value corresponding to the output discrimination information. Of course, in actual applications, the staff can also flexibly adjust the way of obtaining the weight values according to the actual situation, and the embodiments of the present application do not limit this. Exemplarily, after obtaining the above-mentioned multiple discrimination information, the computer device first estimates the discrimination result corresponding to the image to be detected according to the average processing method, and then determines the weight values corresponding to the multiple discrimination information based on the discrimination accuracy of different discrimination networks for the estimated discrimination result.
[0107] 2. Determine the first discrimination result based on the fusion discrimination information.
[0108] In the embodiments of the present application, after the computer device obtains the above-mentioned fusion discrimination information, based on the fusion discrimination information, it determines whether the image to be detected includes a target live body. When the fusion discrimination information meets the first condition, it is determined that the first discrimination result is that the image to be detected includes a target live body. When the fusion discrimination information meets the second condition, it is determined that the first discrimination result is that the image to be detected does not include a target live body.
[0109] The first condition refers to the discrimination condition for the target live body. Optionally, the first condition may include the category characteristics of the target live body. After the computer device obtains the above-mentioned fusion discrimination information, it determines the category characteristics of the fused image to be detected based on the fusion discrimination information, and determines the degree of difference between the category characteristics and the category characteristics of the above-mentioned target live body. If the degree of difference is less than the preset target, it is determined that the image to be detected includes a target live body. At this time, the above-mentioned first discrimination result is that the image to be detected includes a target live body.
[0110] The second condition refers to the discrimination condition for non-target living bodies. In one possible implementation, the second condition includes the category features of non-target living bodies. After the computer device obtains the above-mentioned fused discrimination information, it determines the category features of the fused image to be detected based on the fused discrimination information, and determines whether the category features include the category features of the above-mentioned non-target living bodies. If the category features include the category features of the above-mentioned non-target living bodies, it is determined that the image to be detected does not include the target living body. In another possible implementation, the second condition is mutually exclusive with the above-mentioned first condition, that is, when the computer device determines that the fused discrimination information does not meet the first condition, it can determine that the fused discrimination information meets the second condition. At this time, the above-mentioned first discrimination result is that the image to be detected does not include the target living body.
[0111] Optionally, the method for determining the second discrimination result includes the following steps:
[0112] 1. Determine the difference parameter between multiple discrimination information.
[0113] The difference parameter is used to measure the difference degree between multiple discrimination information. Optionally, the difference parameter can be determined according to the distance parameter between the above-mentioned multiple discrimination information.
[0114] In the embodiment of the present application, when the computer device obtains the above-mentioned multiple discrimination information, based on the multiple discrimination information, it determines the difference parameter between the multiple discrimination information. Optionally, when the computer device obtains the above-mentioned difference parameter, it can use an anomaly detection unit to process the multiple discrimination information, and based on the processed multiple discrimination information, randomly select a certain processed discrimination information as the target discrimination information, and determine the distance parameter between the target discrimination information and the remaining processed discrimination information. Among them, the distance parameters between the target discrimination information and different remaining processed discrimination information can be different. After that, after the computer device obtains the above-mentioned multiple distance parameters, it performs an average processing on the multiple distance parameters to obtain the final distance parameter, and the final distance parameter is the above-mentioned difference parameter.
[0115] 2. Determine the second discrimination result based on the difference parameter.
[0116] In the embodiment of the present application, after the computer device obtains the above-mentioned difference parameter, based on the difference parameter, it determines whether the above-mentioned image to be detected belongs to an abnormal category. When the difference parameter belongs to the first value range, it is determined that the second discrimination result is that the image to be detected belongs to an abnormal category. When the difference parameter belongs to the second value range, it is determined that the second discrimination result is that the image to be detected does not belong to an abnormal category.
[0117] The first value range refers to the value range of the difference parameter when the image to be detected belongs to the abnormal category. The second value range refers to the value range of the difference parameter when the image to be detected does not belong to the abnormal category. After the computer device obtains the above difference parameter, it determines whether the difference parameter belongs to the first value range or the second value range. If the difference parameter belongs to the first value range, it is determined that the above image to be detected belongs to the abnormal category. At this time, the second discrimination result is that the image to be detected belongs to the abnormal category. If the difference parameter belongs to the second value range, it is determined that the above image to be detected does not belong to the abnormal category. At this time, the second discrimination result is that the image to be detected does not belong to the abnormal category. Optionally, the lower limit value of the first value range is greater than or equal to the upper limit value of the second value range.
[0118] Please refer to Figure 3 , which shows the flowchart of the living body detection method provided by another embodiment of the present application. The method may include the following steps (301-307):
[0119] Step 301, obtain the image to be detected.
[0120] Step 302, perform feature extraction processing on the image to be detected to obtain the feature information of the image to be detected.
[0121] Step 303, use multiple different discrimination networks to respectively determine multiple discrimination information of the image to be detected based on the feature information.
[0122] Step 304, determine the first discrimination result and the second discrimination result based on the multiple discrimination information.
[0123] Step 305, when the first discrimination result is that the target living body is included in the image to be detected and the second discrimination result is that the image to be detected does not belong to the abnormal category, determine that the image to be detected passes the living body detection.
[0124] The above steps 301-305 are the same as Figure 1 the steps 101-105 in the Figure 1 embodiment. For details, please refer to
[0125] embodiment and will not be elaborated here.
[0126] The temperature information includes the temperature values corresponding to the pixel points in the image to be detected. In the embodiments of the present application, when the computer device determines to perform temperature detection on the target object included in the image to be detected, it obtains the temperature information corresponding to the image to be detected.
[0127] Optionally, when the computer device obtains the above temperature information, it may obtain the thermal infrared image corresponding to the image to be detected, and obtain the temperature information corresponding to the image to be detected from the thermal infrared image. The thermal infrared image refers to an image used to record the temperature value corresponding to each pixel. Of course, in actual applications, the above image to be detected may also be a thermal infrared image, that is, the computer device may perform live detection based on the thermal infrared image.
[0128] It should be noted that in the embodiments of the present application, the above temperature information may include the temperature values corresponding to each pixel in the image to be detected, or may only include the temperature values corresponding to each pixel in the area where the target object is located in the image to be detected. The embodiments of the present application do not limit this.
[0129] Step 307, based on the temperature information, determine the temperature value of the target object included in the image to be detected.
[0130] In the embodiments of the present application, after the computer device obtains the above temperature information, based on the temperature information, it determines the temperature value of the target object included in the image to be detected.
[0131] Optionally, in the embodiments of the present application, if the above image to be detected is a thermal infrared image, when the computer device determines the above temperature value, it may extract the target area in the image to be detected, perform noise reduction processing on the target area to obtain the denoised target area, obtain the temperature values corresponding to each pixel from the denoised target area, and based on the obtained temperature values corresponding to each pixel, determine the temperature value of the target object included in the image to be detected. The above target area may be the area where the target object is located, or may be a part of the area where the target object is located. For example, if the above target object is a human face, the target area may be the forehead area of the human face.
[0132] It should be noted that the above introduction to temperature detection is only exemplary and explanatory. In actual applications, the computer device may perform temperature detection on the target object after determining that the image to be detected includes a target live body; or it may directly perform temperature detection on the target object after obtaining the image to be detected. The embodiments of the present application do not limit this.
[0133] In summary, in the technical solution provided by the embodiments of the present application, after obtaining the image to be detected, temperature detection is performed on the target object in the detected image to determine the temperature value of the target object, and it is determined whether the image to be detected includes a target live body by combining the first discrimination result and the second discrimination result, ensuring the accuracy of live detection and effectively improving the accuracy of temperature detection.
[0134] Optionally, in the embodiments of the present application, the above-mentioned method for living body detection can be applied to the medical field. After determining that the target living body is included in the image to be detected, the temperature of the target living body can be detected to determine the temperature value corresponding to the target living body, and then it can be determined whether the target living body is in a fever state. Next, the living body detection will be introduced from the perspective of the medical field. Specifically, it includes the following steps:
[0135] 1. Obtain the image to be detected.
[0136] The image to be detected can be an image obtained by a face scanner. In the embodiments of the present application, after the face scanner detects that an obstacle is included in the scanning area, the obstacle in the scanning area is scanned to obtain the image to be detected, and the image to be detected is sent to the computer device. Correspondingly, the computer device obtains the image to be detected.
[0137] 2. Perform feature extraction processing on the image to be detected to obtain the feature information of the image to be detected.
[0138] Optionally, after the computer device obtains the above-mentioned image to be detected, it performs feature extraction processing on the image to be detected to obtain the feature information of the image to be detected.
[0139] 3. Use multiple different discriminant networks to respectively determine multiple discriminant information of the image to be detected based on the feature information.
[0140] Optionally, after the computer device obtains the above-mentioned feature information, it inputs the feature information into multiple different discriminant networks respectively to determine multiple discriminant information of the image to be detected.
[0141] 4. Determine the first discriminant result and the second discriminant result based on the multiple discriminant information.
[0142] Optionally, after the computer device obtains the above-mentioned multiple discriminant information, it fuses the multiple discriminant information to further determine the first discriminant result. At the same time, the computer device determines the difference parameter between the multiple discriminant information to further determine the second discriminant result. Among them, the first discriminant result is used to indicate whether a face living body is included in the image to be detected, and the second discriminant result is used to indicate whether the image to be detected belongs to an abnormal category.
[0143] 5. When the first discriminant result is that a face living body is included in the image to be detected and the second discriminant result is that the image to be detected does not belong to an abnormal category, it is determined that the image to be detected passes the living body detection.
[0144] Optionally, when the first discriminant result is that a face living body is included in the image to be detected and the second discriminant result is that the image to be detected does not belong to an abnormal category, the computer device determines that the image to be detected passes the living body detection. At this time, the computer device determines that a face living body is included in the image to be detected.
[0145] 6. Obtain the temperature value of the face in the image to be detected.
[0146] Optionally, after determining that the image to be detected includes a live face, the computer device obtains the forehead area of the face from the image to be detected, and then obtains the temperature values of each pixel point in the forehead area of the face. Based on the temperature values of each pixel point in the forehead area of the face, the temperature value of the face is determined.
[0147] 7. Based on the temperature value of the face, determine whether the live face in the image to be detected is in a fever state.
[0148] Optionally, after obtaining the temperature value of the above-mentioned face, the computer device determines whether the live face in the image to be detected is in a fever state based on the temperature value of the face.
[0149] If the temperature value of the face is greater than the target value, it is determined that the live face is in a fever state. Then, the action range of the feverish user is determined and the user is treated in a timely manner. If the temperature value of the face is less than the target value, it is determined that the live face is in a normal state and the user is not restricted.
[0150] Optionally, in the embodiments of the present application, the live detection method in the present application is implemented by a live detection model, and the live detection model includes a feature extraction network, multiple different discriminant networks, a live detection unit, an anomaly detection unit, and a result output unit.
[0151] The above-mentioned feature extraction network is used to perform feature extraction processing on the image to be detected to obtain the feature information of the image to be detected.
[0152] The above-mentioned multiple different discriminant networks are used to respectively determine multiple discriminant information of the image to be detected based on the feature information.
[0153] The above-mentioned live detection unit is used to determine a first discriminant result based on the multiple discriminant information.
[0154] The above-mentioned anomaly detection unit is used to determine a second discriminant result based on the multiple discriminant information.
[0155] The above-mentioned result output unit is used to determine whether the image to be detected passes the live detection based on the first discriminant result and the second discriminant result.
[0156] Exemplarily, with reference to Figure 4, taking face liveness detection as an example, the method of performing liveness detection based on a liveness detection model will be introduced. The computer device acquires an image to be detected, and obtains the feature information of the image to be detected through the feature extraction network 41, and then outputs the feature information to the discrimination unit 42. The discrimination unit includes a plurality of different discrimination networks, and the plurality of different discrimination networks respectively determine a plurality of discrimination information based on the feature information. Then, the plurality of discrimination information is respectively input into the liveness detection unit 43 and the anomaly detection unit 44. The liveness detection unit 43 determines a first discrimination result based on the plurality of discrimination information, and the first discrimination result is used to indicate whether the image to be detected includes a face liveness. The anomaly detection unit 44 determines a second discrimination result based on the plurality of discrimination information, and the second discrimination result is used to indicate whether the image to be detected belongs to an abnormal category. Further, the first discrimination result and the second discrimination result are input into the result output unit 45, and the result output unit 45 determines whether the image to be detected passes the liveness detection through the first discrimination result and the second discrimination result. Among them, if the first discrimination result is that the image to be detected includes the target face, and the second discrimination result is that the image to be detected does not belong to the abnormal category, then the result output unit 45 determines that the image to be detected passes the liveness detection, that is, the image to be detected includes a face liveness; if the first discrimination result is that the image to be detected does not include the target liveness, or the second discrimination result is that the image to be detected belongs to the abnormal category, then the result output unit 45 determines that the image to be detected fails the liveness detection, that is, the image to be detected does not include a face liveness. In addition, during the liveness detection process, the computer device can perform temperature detection on the image to be detected through the temperature detection unit 46. The temperature detection unit 46 can acquire the forehead area of the face in the image to be detected, and determine the temperature value of the face liveness in the image to be detected based on the temperature values of each pixel point in the forehead area of the face. Among them, the above-mentioned image to be detected is a thermal infrared image.
[0157] Next, the training method of the liveness detection model in the present application will be introduced.
[0158] Please refer to Figure 5 , which shows a flowchart of the training method of the liveness detection model provided by an embodiment of the present application. The method may include the following steps (501 to 504):
[0159] Step 501, obtain multiple groups of different first training samples.
[0160] The first training samples include positive samples containing the target living body and negative samples not containing the target living body. Herein, the target living body can be any living body, such as a human, an animal, etc., and the embodiments of the present application do not limit this. In the embodiments of the present application, before training the living body detection model, the computer device obtains multiple different groups of first training samples. Among them, the sample categories corresponding to the negative samples in different first training samples can be the same or different, and the embodiments of the present application do not limit this.
[0161] Optionally, when obtaining the first training samples, the computer device can collect images containing the target living body and images not containing the target living body, label the images containing the target living body as positive samples, label the images not containing the target living body as negative samples, and then generate the first training samples.
[0162] In a possible implementation manner, the computer device collects the above images by means of entity shooting; in another possible implementation manner, the computer device collects the above images from the network environment. It should be noted that the computer device can obtain multiple different groups of first training samples in batches, or divide the training samples into multiple different groups of first training samples after obtaining the training samples, and the embodiments of the present application do not limit this.
[0163] Step 502, train multiple different discriminant networks using multiple different groups of first training samples.
[0164] In the embodiments of the present application, after obtaining the multiple different groups of first training samples, the computer device trains multiple different discriminant networks using the multiple different groups of first training samples. Among them, the discriminant network is used to determine the discriminant information of the image to be detected based on the feature information of the image to be detected, and the discriminant information includes the category features corresponding to the image to be detected, and different discriminant networks correspond to different first training samples.
[0165] Optionally, when training the discriminant network, the computer device can input a certain first training sample into a certain discriminant network, and then obtain the loss function of the discriminant network based on the output result of the discriminant network and the annotation of the first training sample, and adjust the parameters in the discriminant network based on the loss function until the loss function converges.
[0166] Optionally, in the embodiments of the present application, the network structures of different discriminant networks are the same, but the network parameters are different.
[0167] Step 503, obtain the second training samples.
[0168] The second training sample includes samples of the normal class and samples of the abnormal class. Among them, the normal class refers to the sample class corresponding to the first training sample, and the abnormal class refers to the class that has not been learned by multiple discriminant networks during the training process, that is, the abnormal class is other classes except the sample class corresponding to the first training sample.
[0169] In the embodiment of the present application, the above-mentioned living body detection model further includes an anomaly detection unit. Among them, the anomaly detection unit is used to determine a second discrimination result based on multiple discrimination information respectively output by multiple different discriminant networks, and the second discrimination result is used to indicate whether the image to be detected belongs to the abnormal class. Before training the anomaly detection unit, the computer device obtains the second training sample.
[0170] Optionally, the computer device may directly use the above-mentioned first training sample as the sample of the normal class, and the embodiment of the present application does not limit this.
[0171] Step 504: Train the anomaly detection unit using the second training sample.
[0172] In the embodiment of the present application, after the computer device obtains the above-mentioned second training sample, it trains the anomaly detection unit using the second training sample.
[0173] Optionally, the above step 504 includes the following steps:
[0174] 1. Train the anomaly detection unit using the samples of the normal class to obtain the anomaly detection unit after the first training;
[0175] 2. Train the anomaly detection unit after the first training using the second training sample to obtain the class detection results for each sample in the second training sample. The class detection results include the first detection result and the second detection result for each sample in the second training sample;
[0176] 3. Based on the class detection results, obtain a first distance and a second distance; where the first distance refers to the distance between the first detection result corresponding to the sample of the normal class and the second detection result, and the second distance refers to the distance between the first detection result corresponding to the sample of the abnormal class and the second detection result;
[0177] 4. In response to the overlap degree between the first distance and the second distance being greater than the threshold, adjust the parameters of the anomaly detection unit until the overlap degree is less than the threshold.
[0178] In the embodiment of the present application, when the computer device trains the anomaly detection unit, it first trains the anomaly detection unit with samples of the normal category to obtain the first trained anomaly detection unit. At this time, the first trained anomaly detection unit has the ability to determine the normal category, that is, the first trained anomaly detection unit can determine whether the input data belongs to the normal category. Further, the first trained anomaly detection unit is trained with the second training samples to obtain the category detection results for each sample in the second training samples. Among them, the category detection results include the first detection result and the second detection result.
[0179] Optionally, after obtaining the above category detection results, the computer device obtains the first distance and the second distance based on the category detection results. The first distance refers to the distance between the first detection result corresponding to the sample of the normal category and the second detection result, and the second distance refers to the distance between the first detection result corresponding to the sample of the abnormal category and the second detection result. Further, it is determined whether the training of the anomaly detection unit is completed based on the overlap degree between the first distance and the second distance. If the overlap degree between the first distance and the second distance is greater than the threshold, it is determined that the training of the anomaly detection unit is not completed, the parameters of the anomaly detection unit are adjusted, and the training continues; if the overlap degree between the first distance and the second distance is less than or equal to the threshold, it is determined that the training of the anomaly detection unit is completed. The above threshold can be any value, and the embodiment of the present application does not limit this. At this time, the trained anomaly detection unit has the ability to distinguish between the normal category and the abnormal category, that is, the trained anomaly detection unit processes multiple discriminant information inputs, and the distance parameters between the processed multiple discriminant information can distinguish between the normal category and the abnormal category.
[0180] Exemplarily, with reference to Figure 6 , the effect of the anomaly detection unit is demonstrated by the change in the distance between multiple discriminant information. Without being processed by the anomaly detection unit, the overlap degree between the distance corresponding to the normal category sample 61 and the distance corresponding to the abnormal category sample 62 is large; after being processed by the anomaly detection unit, the overlap degree between the distance corresponding to the normal category sample 61 and the distance corresponding to the abnormal category sample 62 is small. It can be seen that the anomaly detection unit has good discrimination ability for normal category samples and abnormal category samples.
[0181] Of course, in the embodiments of the present application, the above-mentioned live detection model further includes a feature extraction network, a live detection unit, and a result output unit. Among them, the feature extraction network is used to perform feature extraction processing on the image to be detected to obtain the feature information of the image to be detected; the live detection unit is used to determine the first discrimination result based on multiple discrimination information respectively output by multiple different discrimination networks; the result output unit is used to determine whether the image to be detected passes the live detection based on the first discrimination result and in combination with the second discrimination result output by the anomaly detection unit.
[0182] Optionally, the above-mentioned feature extraction network can be trained by the above-mentioned first training sample, and the live detection unit and the result output unit can be generated by the staff by setting corresponding rules. Among them, the live detection unit includes a fusion rule for multiple discrimination information, and the result output unit includes a processing rule for the first discrimination result and the second discrimination result.
[0183] In summary, in the technical solution provided by the embodiments of the present application, the live detection model includes multiple discrimination networks and an anomaly detection unit, and the multiple discrimination networks can determine and obtain multiple discrimination information, and the multiple discrimination information can determine the first discrimination result, and the first discrimination result is used to determine whether the image to be detected includes the target live body. The anomaly detection unit can determine the second discrimination result according to the multiple discrimination information, and the second discrimination result is used to determine whether the image to be detected belongs to the abnormal category. That is to say, the live detection model in the present application provides a new live detection method, which performs live detection through multiple discrimination networks in combination with the anomaly detection unit, alleviates the overfitting problem of the discrimination network, and avoids the error of the final discrimination result caused by the poor quality of the training samples of the discrimination network, ensuring the accuracy of live detection.
[0184] In addition, as shown in Table 1 below, compared with the related technology, the live detection model in the present application includes both multiple discrimination networks and an anomaly detection unit, effectively improving the accuracy of live detection. Among them, the same-distribution samples are the known categories of the network, and the sample categories of the same-distribution samples are the same as the sample categories of the training samples used in the network training process. The corresponding same-distribution samples of different networks can be different; the total samples include the same-distribution samples and the different-distribution samples. The different-distribution samples are the unknown categories of the network, and the sample categories of the different-distribution samples are different from the sample categories of the training samples used in the network training process.
[0185] Table 1 Comparison of experimental results between the present application and the related technology
[0186]
[0187]
[0188] Exemplarily, in combination with reference Figure 7, taking face detection as an example, the live detection model in the present application is compared with the live detection models in related technologies. In related technologies, the live detection model is prone to overfitting problems, can better distinguish face images 71 from non-face images 72 of known categories, and cannot well distinguish non-face images 73 of unknown categories. In the present application, the live detection model can better distinguish face images 71 from non-face images 72 of known categories, and moreover, the anomaly detection unit can distinguish images of known categories from non-face images 73 of unknown categories. On this basis, the accuracy of live detection is improved.
[0189] The following is an embodiment of the device of the present application, which can be used to execute the method embodiment of the present application. For details not disclosed in the device embodiment of the present application, please refer to the method embodiment of the present application.
[0190] Please refer to Figure 8 , which shows a block diagram of a live detection device provided by an embodiment of the present application. The device has the function of implementing the above-mentioned live detection method, and the function can be implemented by hardware or by hardware executing corresponding software. The device can be a computer device or can be set in a computer device. The device 800 may include: a feature acquisition module 810, an information determination module 820, a first determination module 830, a second determination module 840, and a live determination module 850.
[0191] The feature acquisition module 810 is used to perform feature extraction processing on the image to be detected to obtain the feature information of the image to be detected.
[0192] The information determination module 820 is used to respectively adopt a plurality of different discriminant networks based on the feature information to determine a plurality of discriminant information of the image to be detected; wherein, the discriminant information includes the category features corresponding to the image to be detected.
[0193] The first determination module 830 is used to perform fusion processing on the plurality of discriminant information to obtain a first discriminant result; wherein, the first discriminant result is used to indicate whether the image to be detected includes a target live body.
[0194] The second determination module 840 is used to perform difference detection on the plurality of discriminant information to obtain a second discriminant result; wherein, the second discriminant result is used to indicate whether the image to be detected belongs to an abnormal category, and the abnormal category refers to a category that the plurality of discriminant networks have not learned during the training process.
[0195] The live determination module 850 is used to determine that the image to be detected passes the live detection when the first discriminant result is that the image to be detected includes the target live body and the second discriminant result is that the image to be detected does not belong to the abnormal category.
[0196] In an exemplary embodiment, the second determination module 840 is configured to determine a difference parameter between the multiple discrimination information, where the difference parameter is used to measure the degree of difference between the multiple discrimination information; when the difference parameter belongs to a first value range, determine that the second discrimination result is that the image to be detected belongs to the abnormal category; when the difference parameter belongs to a second value range, determine that the second discrimination result is that the image to be detected does not belong to the abnormal category.
[0197] In an exemplary embodiment, the first determination module 830 is configured to perform a fusion process on the multiple discrimination information to obtain fused discrimination information; when the fused discrimination information meets a first condition, determine that the first discrimination result is that the target living body is included in the image to be detected; when the fused discrimination information meets a second condition, determine that the first discrimination result is that the target living body is not included in the image to be detected.
[0198] In an exemplary embodiment, the first determination module 830 is further configured to perform an averaging process on the multiple discrimination information to obtain the fused discrimination information; alternatively, obtain weight values respectively corresponding to the multiple discrimination information; based on the weight values respectively corresponding to the multiple discrimination information, perform a weighted summation process on the multiple discrimination information to obtain the fused discrimination information.
[0199] In an exemplary embodiment, the first determination module 830 is further configured to determine the weight values respectively corresponding to the multiple discrimination information based on the discrimination accuracies of the multiple different discrimination networks; where the weight value corresponding to the discrimination information output by the discrimination network has a positive correlation with the discrimination accuracy of the discrimination network.
[0200] In an exemplary embodiment, as Figure 9 shown, the apparatus 800 further includes: a temperature acquisition module 860 and a temperature determination module 870.
[0201] The temperature acquisition module 860 is configured to acquire temperature information corresponding to the image to be detected; where the temperature information includes the temperature values corresponding to the pixel points in the image to be detected.
[0202] The temperature determination module 870 is configured to determine the temperature value of the target object included in the image to be detected based on the temperature information.
[0203] In an exemplary embodiment, the temperature determination module 870 is configured to extract a target region from the image to be detected; perform noise reduction processing on the target region to obtain a denoised target region; obtain temperature values corresponding to each pixel point from the denoised target region; and determine the temperature value of the target object included in the image to be detected based on the obtained temperature values corresponding to each pixel point.
[0204] In an exemplary embodiment, the method is implemented by a live detection model, which includes a feature extraction network, the multiple different discriminant networks, a live detection unit, an anomaly detection unit, and a result output unit. The feature extraction network is configured to perform feature extraction processing on the image to be detected to obtain the feature information of the image to be detected. The multiple different discriminant networks are configured to respectively determine multiple discriminant information of the image to be detected based on the feature information. The live detection unit is configured to determine the first discriminant result based on the multiple discriminant information. The anomaly detection unit is configured to determine the second discriminant result based on the multiple discriminant information. The result output unit is configured to determine whether the image to be detected passes the live detection based on the first discriminant result and the second discriminant result.
[0205] In summary, in the technical solution provided by the embodiment of the present application, multiple discriminant information is obtained through multiple different discriminant networks, and then the multiple discriminant information is fused to obtain the first discriminant result, so that the first discriminant result fuses the live detection results of the multiple discriminant networks for the image to be detected, and the first discriminant result can accurately represent whether the target live body is included in the image to be detected. Moreover, the difference between the multiple discriminant results is detected to obtain the second discriminant result, and the second discriminant result can determine whether the image to be detected belongs to an abnormal category, where the abnormal category is a category that the multiple discriminant networks have not learned. However, during the training process of the discriminant network, the category of the target live body must belong to the category seen by the discriminant network. If the live body to be detected in the image to be detected belongs to the abnormal category, then the target live body is definitely not included in the image to be detected. In this case, even if the first discriminant result determines that the target live body is included in the image to be detected, the computer device can still determine that the image to be detected fails the live detection and does not include the target live body based on the second discriminant result, alleviating the overfitting problem of the discriminant network and avoiding the error of the final discriminant result caused by the poor quality of the training samples of the discriminant network, ensuring the accuracy of the live detection.
[0206] Please refer to Figure 10, which shows a block diagram of a training device for a live detection model provided by an embodiment of the present application. The live detection model includes a plurality of different discrimination networks and an anomaly detection unit; among them, the discrimination network is used to determine the discrimination information of the image to be detected based on the feature information of the image to be detected, and the discrimination information includes the category features corresponding to the image to be detected. The anomaly detection unit is used to determine a second discrimination result based on the multiple discrimination information respectively output by the plurality of different discrimination networks, and the second discrimination result is used to indicate whether the image to be detected belongs to an abnormal category. This device has the function of implementing the above-mentioned training method of the live detection model, and this function can be implemented by hardware or by hardware executing corresponding software. This device can be a computer device or can be set in a computer device. The device 1000 may include: a first acquisition module 1010, a network training module 1020, a second acquisition module 1030, and a unit training module 1040.
[0207] The first acquisition module 1010 is configured to acquire multiple different groups of first training samples; among them, the first training samples include positive samples containing the target live body and negative samples not containing the target live body.
[0208] The network training module 1020 is configured to train the multiple different discrimination networks by using the multiple different groups of first training samples; among them, the first training samples corresponding to different discrimination networks are different.
[0209] The second acquisition module 1030 is configured to acquire second training samples; among them, the second training samples include samples of normal categories and samples of abnormal categories. The normal category refers to the sample category corresponding to the first training samples, and the abnormal category refers to other categories except the sample category corresponding to the first training samples.
[0210] The unit training module 1040 is configured to train the anomaly detection unit by using the second training samples.
[0211] In an exemplary embodiment, the unit training module 1040 is configured to train the anomaly detection unit with the samples of the normal class to obtain a first trained anomaly detection unit; train the first trained anomaly detection unit with the second training samples to obtain class detection results for each sample in the second training samples, where the class detection results include a first detection result and a second detection result for each sample in the second training samples; obtain a first distance and a second distance based on the class detection results; where the first distance refers to the distance between the first detection result corresponding to the sample of the normal class and the second detection result, and the second distance refers to the distance between the first detection result corresponding to the sample of the abnormal class and the second detection result; in response to the overlap degree between the first distance and the second distance being greater than a threshold, adjust the parameters of the anomaly detection unit until the overlap degree is less than the threshold.
[0212] In an exemplary embodiment, the live detection model further includes a feature extraction network, a live detection unit, and a result output unit; where the feature extraction network is configured to perform feature extraction processing on the image to be detected to obtain the feature information of the image to be detected; the live detection unit is configured to determine a first discrimination result based on a plurality of discrimination information respectively output by the plurality of different discrimination networks; where the first discrimination result is used to indicate whether the image to be detected includes a target live body; the result output unit is configured to determine whether the image to be detected passes the live detection based on the first discrimination result and in combination with a second discrimination result output by the anomaly detection unit; where the second discrimination result is used to indicate whether the image to be detected belongs to an abnormal class.
[0213] In summary, in the technical solution provided in the embodiments of the present application, the live detection model includes a plurality of discrimination networks and an anomaly detection unit, and the plurality of discrimination networks can determine and obtain a plurality of discrimination information, and the plurality of discrimination information can determine a first discrimination result, and the first discrimination result is used to determine whether the image to be detected includes a target live body, and the anomaly detection unit can determine a second discrimination result based on the plurality of discrimination information, and the second discrimination result is used to determine whether the image to be detected belongs to an abnormal class. That is to say, the live detection model in the present application provides a new live detection method, performs live detection through a plurality of discrimination networks in combination with an anomaly detection unit, alleviates the overfitting problem of the discrimination network, and avoids the error of the final discrimination result due to the poor quality of the training samples of the discrimination network, ensuring the accuracy of live detection.
[0214] It should be noted that for the device provided in the above embodiments, when implementing its functions, only the division of the above-mentioned functional modules is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device provided in the above embodiments and the method embodiments belong to the same concept. For the specific implementation process, please refer to the method embodiments and will not be elaborated here.
[0215] Please refer to Figure 11 , which shows a structural block diagram of a computer device provided by an embodiment of the present application. This computer device can be used to implement the functions of the above-mentioned live detection method or the training method of the live detection model. Specifically:
[0216] The computer device 1100 includes a central processing unit (CPU) 1101, a system memory 1104 including a random access memory (RAM) 1102 and a read only memory (ROM) 1103, and a system bus 1105 connecting the system memory 1104 and the central processing unit 1101. The computer device 1100 further includes a basic input / output system (I / O system) 1106 for facilitating the transfer of information between various components within the computer, and a mass storage device 1107 for storing an operating system 1113, application programs 1114, and other program modules 1115.
[0217] The basic input / output system 1106 includes a display 1108 for displaying information and input devices 1109 such as a mouse and a keyboard for user input. Both the display 1108 and the input devices 1109 are connected to the central processing unit 1101 through an input / output controller 1110 connected to the system bus 1105. The basic input / output system 1106 may also include an input / output controller 1110 for receiving and processing inputs from multiple other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller 1110 also provides output to a display screen, a printer, or other types of output devices.
[0218] The mass storage device 1107 is connected to the central processing unit 1101 through a mass storage controller (not shown) connected to the system bus 1105. The mass storage device 1107 and its associated computer-readable medium provide non-volatile storage for the computer device 1100. That is to say, the mass storage device 1107 may include a computer-readable medium (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.
[0219] Without loss of generality, computer-readable media can include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes RAM, ROM, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), flash memory or other solid-state storage technologies, CD-ROM, DVD (Digital Video Disc) or other optical storage, magnetic tape cartridges, tapes, disk storage, or other magnetic storage devices. Of course, those skilled in the art will know that computer storage media is not limited to the above several types. The above-mentioned system memory 1104 and mass storage device 1107 can be collectively referred to as memory.
[0220] According to various embodiments of the present application, the computer device 1100 can also run by connecting to a remote computer on the network through a network such as the Internet. That is, the computer device 1100 can be connected to the network 1112 through the network interface unit 1111 connected to the system bus 1105, or in other words, the network interface unit 1111 can also be used to connect to other types of networks or remote computer systems (not shown).
[0221] The memory further includes a computer program, which is stored in the memory and is configured to be executed by one or more processors to implement the above-mentioned living body detection method or the training method of the above-mentioned living body detection model.
[0222] In an exemplary embodiment, a computer-readable storage medium is further provided. At least one instruction, at least one program, a code set, or an instruction set is stored in the storage medium. When the at least one instruction, the at least one program, the code set, or the instruction set is executed by a processor, the above-mentioned living body detection method or the training method of the above-mentioned living body detection model is implemented.
[0223] Optionally, the computer-readable storage medium may include: ROM (Read Only Memory), RAM (Random Access Memory), SSD (Solid State Drives), or optical discs, etc. Among them, the random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).
[0224] In an exemplary embodiment, a computer program product or a computer program is further provided. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned living body detection method or the training method of the above-mentioned living body detection model.
[0225] It should be understood that "a plurality" mentioned herein means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after. In addition, the step numbers described herein only exemplarily show a possible execution sequence between steps. In some other embodiments, the above steps may not be executed in the order of the numbers. For example, two steps with different numbers are executed simultaneously, or two steps with different numbers are executed in the reverse order of the illustration. The embodiments of the present application do not limit this.
[0226] The above are only exemplary embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for live detection, characterized in that, The method includes: Performing feature extraction processing on the image to be detected to obtain the feature information of the image to be detected; Based on the feature information, respectively using a plurality of different discriminant networks to determine a plurality of discriminant information of the image to be detected; wherein, the discriminant information includes the class feature corresponding to the image to be detected; Performing fusion processing on the plurality of discriminant information to obtain a first discriminant result; wherein, the first discriminant result is used to indicate whether the image to be detected includes a target live body; Determining a difference parameter between the plurality of discriminant information, the difference parameter being used to measure the difference degree between the plurality of discriminant information; Based on the difference degree, obtaining a second discriminant result; wherein, the second discriminant result is used to indicate whether the image to be detected belongs to an abnormal class, the abnormal class referring to a class that the plurality of discriminant networks have not learned during the training process. When the difference parameter belongs to a first value range, the second discriminant result is that the image to be detected belongs to the abnormal class. When the difference parameter belongs to a second value range, the second discriminant result is that the image to be detected does not belong to the abnormal class, and the lower limit value of the first value range is greater than or equal to the upper limit value of the second value range; When the first discriminant result is that the image to be detected includes the target live body and the second discriminant result is that the image to be detected does not belong to the abnormal class, determining that the image to be detected passes the live body detection.
2. The method according to claim 1, wherein The performing fusion processing on the plurality of discriminant information to obtain a first discriminant result includes: Performing fusion processing on the plurality of discriminant information to obtain fused discriminant information; When the fused discriminant information meets a first condition, determining that the first discriminant result is that the image to be detected includes the target live body; When the fused discriminant information meets a second condition, determining that the first discriminant result is that the image to be detected does not include the target live body.
3. The method according to claim 2, wherein The performing fusion processing on the plurality of discriminant information to obtain fused discriminant information includes: Performing an averaging process on the plurality of discriminant information to obtain the fused discriminant information; Or, Obtaining weight values respectively corresponding to the plurality of discriminant information; based on the weight values respectively corresponding to the plurality of discriminant information, performing a weighted summation process on the plurality of discriminant information to obtain the fused discriminant information.
4. The method according to claim 3, wherein The obtaining weight values respectively corresponding to the plurality of discriminant information includes: Based on the discrimination accuracies of the plurality of different discriminant networks, determining the weight values respectively corresponding to the plurality of discriminant information; Wherein, the weight value corresponding to the discriminant information output by the discriminant network has a positive correlation with the discrimination accuracy of the discriminant network.
5. The method according to claim 1, characterized in that The method further includes: Obtaining temperature information corresponding to the image to be detected; wherein, the temperature information includes the temperature values corresponding to the pixel points in the image to be detected; Based on the temperature information, determining the temperature value of the target object included in the image to be detected.
6. The method according to claim 5, characterized in that, The based on the temperature information, determining the temperature value of the target object included in the image to be detected includes: Extract the target region from the image to be detected; Perform noise reduction processing on the target region to obtain the denoised target region; Obtain the temperature values corresponding to each pixel point from the denoised target region; Based on the obtained temperature values corresponding to each pixel point, determine the temperature value of the target object included in the image to be detected.
7. The method according to any one of claims 1 to 6, characterized in that, The method is implemented by a live detection model, and the live detection model includes a feature extraction network, the multiple different discriminant networks, a live detection unit, an anomaly detection unit, and a result output unit; wherein, The feature extraction network is configured to perform feature extraction processing on the image to be detected to obtain the feature information of the image to be detected; The multiple different discriminant networks are configured to respectively determine multiple discriminant information of the image to be detected based on the feature information; The live detection unit is configured to determine the first discriminant result based on the multiple discriminant information; The anomaly detection unit is configured to determine the second discriminant result based on the multiple discriminant information; The result output unit is configured to determine whether the image to be detected passes the live detection based on the first discriminant result and the second discriminant result.
8. A training method for a live detection model, characterized in that, The live detection model includes multiple different discriminant networks and an anomaly detection unit; wherein, the discriminant network is configured to determine the discriminant information of the image to be detected based on the feature information of the image to be detected, the discriminant information includes the class feature corresponding to the image to be detected, the anomaly detection unit is configured to determine the second discriminant result based on the difference parameter between the multiple discriminant information, the multiple discriminant information is respectively output by the multiple different discriminant networks, the second discriminant result is used to indicate whether the image to be detected belongs to the abnormal class, the difference parameter is used to measure the degree of difference between the multiple discriminant information, when the difference parameter belongs to the first value range, the second discriminant result is that the image to be detected belongs to the abnormal class, when the difference parameter belongs to the second value range, the second discriminant result is that the image to be detected does not belong to the abnormal class, and the lower limit value of the first value range is greater than or equal to the upper limit value of the second value range; The method includes: Obtain multiple groups of different first training samples; wherein, the first training sample includes a positive sample containing the target live body and a negative sample not containing the target live body; Train the multiple different discriminant networks with the multiple groups of different first training samples; wherein, the first training samples corresponding to different discriminant networks are different; Obtain a second training sample; wherein, the second training sample includes a sample of the normal class and a sample of the abnormal class, the normal class refers to the sample class corresponding to the first training sample, and the abnormal class refers to other classes except the sample class corresponding to the first training sample; Train the anomaly detection unit with the second training sample.
9. The method according to claim 8, wherein The training of the anomaly detection unit with the second training sample includes: Train the anomaly detection unit using the samples of the normal category to obtain a first trained anomaly detection unit; Train the first trained anomaly detection unit using the second training samples to obtain class detection results for each sample in the second training samples, where the class detection results include a first detection result and a second detection result for each sample in the second training samples; Based on the class results, obtain a first distance and a second distance; where the first distance refers to the distance between the first detection result and the second detection result corresponding to the samples of the normal category, and the second distance refers to the distance between the first detection result and the second detection result corresponding to the samples of the abnormal category; In response to the overlap degree between the first distance and the second distance being greater than a threshold, adjust the parameters of the anomaly detection unit until the overlap degree is less than the threshold.
10. The method according to claim 8, wherein The liveness detection model further includes a feature extraction network, a liveness detection unit, and a result output unit; where The feature extraction network is used to perform feature extraction processing on the image to be detected to obtain the feature information of the image to be detected; The liveness detection unit is used to determine a first discrimination result based on multiple discrimination information respectively output by the multiple different discrimination networks; where the first discrimination result is used to indicate whether the image to be detected includes a target liveness; The result output unit is used to determine whether the image to be detected passes the liveness detection based on the first discrimination result and in combination with the second discrimination result output by the anomaly detection unit.
11. A live body detection device, characterized in that, The device includes: A feature acquisition module, configured to perform feature extraction processing on the image to be detected to obtain the feature information of the image to be detected; An information determination module, configured to determine multiple discrimination information of the image to be detected by respectively using multiple different discrimination networks based on the feature information; where the discrimination information includes the class features corresponding to the image to be detected; A first determination module, configured to perform fusion processing on the multiple discrimination information to obtain a first discrimination result; where the first discrimination result is used to indicate whether the image to be detected includes a target liveness; A second determination module, configured to determine a difference parameter between the multiple discrimination information, where the difference parameter is used to measure the difference degree between the multiple discrimination information; based on the difference degree, obtain a second discrimination result; where the second discrimination result is used to indicate whether the image to be detected belongs to an abnormal category, and the abnormal category refers to a category that the multiple discrimination networks have not learned during the training process. When the difference parameter belongs to a first value range, the second discrimination result is that the image to be detected belongs to the abnormal category, and when the difference parameter belongs to a second value range, the second discrimination result is that the image to be detected does not belong to the abnormal category, and the lower limit value of the first value range is greater than or equal to the upper limit value of the second value range; A living body determination module, configured to determine that the to-be-detected image passes the living body detection when the first discrimination result is that the to-be-detected image includes the target living body and the second discrimination result is that the to-be-detected image does not belong to the abnormal category.
12. A training device for a live detection model, characterized in that, The living body detection model includes a plurality of different discrimination networks and an anomaly detection unit; wherein, the discrimination network is configured to determine discrimination information of the to-be-detected image based on the feature information of the to-be-detected image, the discrimination information includes the category feature corresponding to the to-be-detected image, the anomaly detection unit is configured to determine a second discrimination result based on the difference parameter between a plurality of discrimination information, the plurality of discrimination information is respectively output by the plurality of different discrimination networks, the second discrimination result is used to indicate whether the to-be-detected image belongs to the abnormal category, the difference parameter is used to measure the difference degree between the plurality of discrimination information, when the difference parameter belongs to a first value range, the second discrimination result is that the to-be-detected image belongs to the abnormal category, when the difference parameter belongs to a second value range, the second discrimination result is that the to-be-detected image does not belong to the abnormal category, and the lower limit value of the first value range is greater than or equal to the upper limit value of the second value range; The apparatus includes: A first acquisition module, configured to acquire multiple groups of different first training samples; wherein, the first training samples include positive samples containing the target living body and negative samples not containing the target living body; A network training module, configured to train the plurality of different discrimination networks by using the multiple groups of different first training samples; wherein, the first training samples corresponding to different discrimination networks are different; A second acquisition module, configured to acquire second training samples; wherein, the second training samples include samples of a normal category and samples of an abnormal category, the normal category refers to the sample category corresponding to the first training samples, and the abnormal category refers to other categories except the sample category corresponding to the first training samples; A unit training module, configured to train the anomaly detection unit by using the second training samples.
13. A computer device, characterized in that, The computer device includes a processor and a memory, and at least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to implement the living body detection method according to any one of claims 1 to 7, or to implement the training method of the living body detection model according to any one of claims 8 to 10.
14. A computer-readable storage medium, characterized in that, At least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement the living body detection method according to any one of claims 1 to 7, or to implement the training method of the living body detection model according to any one of claims 8 to 10.
15. A computer program product, the computer program product comprising computer instructions stored in a computer-readable storage medium, and a processor reads and executes the computer instructions from the computer-readable storage medium to implement the living body detection method according to any one of claims 1 to 7, or to implement the training method of the living body detection model according to any one of claims 8 to 10.
Citation Information
Patent Citations
Living body detection method, device and equipment
CN111178341A
Learned model generation method, learned model generation device, signal data discrimination method, signal data discrimination device, and signal data discrimination program
WO2018092747A1