Target identification method and device, electronic equipment and medium

The spot image generated by the dual-brightness diffraction grating reflects the target's depth information and surface features, solving the problem that face recognition in the prior art is difficult to distinguish between live objects and planar images, and achieving higher-precision target recognition and liveness detection.

CN119028028APending Publication Date: 2024-11-26ZHEJIANG UNIVIEW TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310606679.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-23
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

Existing facial recognition technologies struggle to quickly and accurately distinguish between live objects and flat images, and are unable to effectively defend against attacks such as masks, face swapping, occlusion, 3D animation, and video re-enactment.

Method used

A dual-brightness diffraction grating is used for supplementary lighting. By controlling the supplementary light to emit light through the dual-brightness diffraction grating to illuminate the target, a light spot image reflecting the target's depth information and surface features is generated, which is then combined with an image acquisition device for identification.

Benefits of technology

It improves the accuracy and effectiveness of target recognition, effectively distinguishes between live and non-live objects, resists common attack methods, and enhances the precision of facial recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119028028A_ABST
    Figure CN119028028A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a target identification method and device, electronic equipment and a medium. The method comprises the following steps: controlling the light emitted by the light supplement lamp to penetrate through the dual-brightness diffraction grating to irradiate a target; wherein the dual-brightness diffraction grating comprises at least one first light-transmitting area and at least one second light-transmitting area; the brightness of light rays is different after the light rays pass through the first light-transmitting area and the second light-transmitting area; receiving the light reflected by the target through an image collector, and carrying out image collection on the target to obtain a light spot image; and identifying the target according to the light spot image. According to the technical scheme, the target is supplemented with light based on the double-brightness diffraction grating, so that the light spot image can reflect the depth information of the target and the surface feature information of the target, and the target recognition effect and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a target recognition method, device, electronic device and medium. Background Art

[0002] At present, face recognition is widely used in various fields such as e-commerce, security and defense, and remote identity authentication. Face recognition generally first determines whether there is a face in an image or video stream. If there is a face, it further extracts the position, size, and position of each major facial organ of each face in the image, and further extracts the identity features corresponding to each face based on the above information, and compares it with known faces to determine the identity corresponding to each face. However, it cannot detect common attack methods such as masks, face swapping, occlusion, 3D animation, video, and screen reshoots.

[0003] For liveness detection in face recognition, the target needs to complete preset actions, such as blinking, opening the mouth, shaking the head, nodding, etc., in order to track and identify the key positions of the face. Although liveness detection can be achieved through face dynamic tracking, it is difficult to quickly and accurately distinguish between live objects and targets in flat images. Summary of the invention

[0004] The present application provides a target recognition method, device, electronic device and medium, which supplement the target with light based on a dual-brightness diffraction grating so that the spot image can reflect the depth information and surface feature information of the target, thereby improving the effect and accuracy of target recognition.

[0005] Controlling the fill light to emit light through the dual-brightness diffraction grating to illuminate the target; wherein the dual-brightness diffraction grating includes at least one first light-transmitting area and at least one second light-transmitting area; the brightness of the light after passing through the first light-transmitting area and the second light-transmitting area is different;

[0006] Receiving the light reflected by the target through an image collector, and acquiring an image of the target to obtain a light spot image;

[0007] The target is identified according to the light spot image.

[0008] According to another aspect of the present application, a target recognition device is provided, the device comprising:

[0009] A target fill light module is used to control the fill light to emit light through the dual-brightness diffraction grating to illuminate the target; wherein the dual-brightness diffraction grating includes at least one first light-transmitting area and at least one second light-transmitting area; the brightness of the light after passing through the first light-transmitting area and the second light-transmitting area is different;

[0010] An image acquisition module, used to receive the light reflected by the target through an image acquisition device, and acquire an image of the target to obtain a light spot image;

[0011] A target recognition module is used to recognize the target according to the light spot image.

[0012] According to another aspect of the present application, an electronic device is provided, the device comprising:

[0013] at least one processor; and

[0014] a memory communicatively connected to at least one processor; wherein,

[0015] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the target recognition method of any embodiment of the present application.

[0016] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the target recognition method of any embodiment of the present application when executed.

[0017] The technical solution of the embodiment of the present application is to control the fill light to emit light through the dual-brightness diffraction grating to illuminate the target; wherein the dual-brightness diffraction grating includes at least one first light-transmitting area and at least one second light-transmitting area; the brightness of the light after passing through the first light-transmitting area and the second light-transmitting area is different; the image collector receives the light reflected by the target, and the image of the target is collected to obtain a spot image; the target is identified based on the spot image. This technical solution is based on the dual-brightness diffraction grating to fill the target with light, so that the spot image can reflect the depth information and surface feature information of the target, thereby improving the effect and accuracy of target identification.

[0018] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 A flowchart of a target recognition method provided in Example 1 of the present application;

[0021] Figure 2 A schematic diagram of a plane light spot provided in Example 1 of the present application;

[0022] Figure 3 The light path diagram for collecting the spot image provided in the first embodiment of the present application;

[0023] Figure 4 A schematic diagram of a facial light spot provided in Example 1 of the present application;

[0024] Figure 5 A flowchart of a target recognition method provided in Example 2 of the present application;

[0025] Figure 6 A flowchart of a target recognition method provided in Example 3 of the present application;

[0026] Figure 7 A schematic diagram of the structure of a target recognition device provided in Embodiment 4 of the present application;

[0027] Figure 8 It is a structural diagram of an electronic device that implements a target recognition method provided in Example 5 of the present application. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] Embodiment 1

[0031] Figure 1This is a flow chart of a target recognition method provided in the first embodiment of the present application. The embodiment of the present application can be applied to the case of detecting a living target. The method can be executed by a target recognition device, which can be implemented in the form of hardware and / or software, and the target recognition device can be configured in an electronic device. Figure 1 As shown, the method includes:

[0032] S110, controlling the fill light to emit light through the dual-brightness diffraction grating to illuminate the target, wherein the dual-brightness diffraction grating includes at least one first light-transmitting area and at least one second light-transmitting area; the brightness of the light after passing through the first light-transmitting area and the second light-transmitting area is different.

[0033] The fill light is used to fill light in the target area, and may be an invisible light fill light, such as an infrared fill light.

[0034] Among them, the dual-brightness diffraction grating can be used to modulate the light emitted by the fill light so that when the light passes through the dual-brightness diffraction grating and shines on the target, it can generate a specific optical pattern with double brightness. The five dominant principles of diffraction grating are: (1) Diffraction. The basic principle of diffraction optical elements is diffraction. When light passes through a medium with a periodic structure, it produces multiple orders of scattering. When the light enters the diffraction grating, the diffraction grating splits the light beam into multiple beams, which can then be redirected, shaped or combined in various ways. (2) Interference. Interference occurs when two or more waves are superimposed and reinforce or cancel each other. In the diffraction grating, the diffracted light beams interfere with each other to produce a characteristic intensity distribution shape, thereby producing a specific pattern through the design of the diffraction grating. (3) Phase control. The phase of the diffracted light beam is an important factor in determining the intensity distribution of light. By controlling the phase of the light beam, characteristic patterns and shapes can be produced. (4) Surface relief thickness. Diffraction gratings usually have a surface relief thickness, which is a relief pattern on the surface of the component. This pattern is responsible for diffracting light and determining the intensity distribution of the diffracted light beam. The surface relief structure can be designed to produce specific patterns and shapes, and can also be manufactured using various technologies, such as photolithography or etching. (5) Wavelength sensitivity. Diffraction gratings are designed for light of a specific wavelength. Only when the wavelength is correct can the correct delay time be determined when the light passes through the surface relief structure. For a certain relief depth, only the correct wavelength will be diffracted appropriately. This feature can be used in the field of spectral filtering or color separation generation. In the embodiment of the present application, the phase value of the diffraction grating corresponding to the first light-transmitting area and the second light-transmitting area or the material characteristics of the diffraction grating can be adjusted respectively to strengthen or weaken the fill light brightness of the corresponding area, so that the brightness of the light after passing through the first light-transmitting area and the second light-transmitting area is different. For example, the thickness of the surface relief of the diffraction grating is adjusted so that the transmittance of the first light-transmitting area and the second light-transmitting area is different. For another example, the material of the first light-transmitting area of ​​the diffraction grating is different from that of the second light-transmitting area, so that the transmittance of the first light-transmitting area is different from that of the second light-transmitting area.

[0035] In the embodiment of the present invention, the brightness of the light emitted by the fill light after passing through the first light-transmitting area may be greater than the brightness after passing through the second light-transmitting area, or may be less than the brightness after passing through the second light-transmitting area, so as to more effectively identify the target in a targeted manner.

[0036] Optionally, light spots formed when the light passes through the first light-transmitting area and irradiates the plane are arranged in an array.

[0037] For example, Figure 2 This is a schematic diagram of a planar light spot provided in Example 1 of the present application. Figure 2As shown, the light-colored grids arranged in an array can represent the light spot image formed when the light passes through the first light-transmitting area and irradiates the plane, and the dark-colored grids arranged in an array can represent the light spot image formed when the light passes through the second light-transmitting area and irradiates the plane. Figure 2 The size information and spacing of the light grid or dark grid in the diffraction grating can be adjusted by changing the diffraction grating constant, such as adjusting the slit spacing of the diffraction grating. The size information and spacing of the light spot can also be changed by adjusting the relevant parameters in the above five dominant principles.

[0038] In the embodiment of the present invention, the size information and the spacing of the light spots are determined, including but not limited to the following processes from steps A1 to A2:

[0039] Step A1: determining a target range for acquiring a target image at a maximum distance according to the field of view of the image collector.

[0040] Among them, the field of view range can be determined according to the device parameters of the image collector; the farthest distance can be the maximum effective working distance of the image collector, that is, the farthest distance at which the target can be identified; the target range can be the area range containing the target feature information, such as the facial area.

[0041] Step A2: Determine the size information and spacing of the light spots formed by the light passing through the first light-transmitting area according to the target range, so that the light spots passing through the first light-transmitting area can cover the target range. The size information and the spacing are used to construct the dual-brightness diffraction grating.

[0042] by Figure 2 Taking an example for explanation, the size information of the light spot may be the length and width of the same type of grids, and the spacing of the light spots may be the horizontal distance and the vertical distance between the same type of grids.

[0043] Specifically, since the brightness of the light passing through the first light-transmitting area and the light passing through the second light-transmitting area is different, the light passing through the first light-transmitting area and the light passing through the second light-transmitting area are irradiated onto the plane to form a light spot, such as Figure 2 As shown, the phase value of the diffraction grating corresponding to the first light-transmitting area or the thickness of the surface relief can be adjusted according to the target range to adjust the size information and spacing of the light spots formed by the light passing through the first light-transmitting area, ensuring that the light spots passing through the first light-transmitting area can cover the target range. The phase value of the diffraction grating corresponding to the second light-transmitting area or the thickness of the surface relief can also be adjusted to make the spacing between the light spots passing through the second light-transmitting area as small as possible, ensuring that the light spots formed after the light passes through the second light-transmitting area can cover the background area of ​​the target. In theory, the spacing between the light spots passing through the second light-transmitting area can be made zero, that is, a continuous fill light area is formed.

[0044] The beneficial effect of the above technical solution is that the light spots presented by light of different brightness after being reflected by the target can reflect the depth information of the target, thereby improving the accuracy of target recognition.

[0045] S120, receiving the light reflected by the target through an image collector, and performing image acquisition on the target to obtain a light spot image.

[0046] The image collector may be composed of a lens and an image sensor. The lens is used to focus the light reflected by the target onto the image sensor. The image sensor is used to convert the light signal focused on the image sensor into an electrical signal, such as a pixel value. Specifically, the electrical signals formed by each image sensor unit are combined together to generate a light spot image of the target. Figure 3 As shown, the light emitted by the fill light passes through the dual-brightness diffraction grating and then irradiates the target. After being reflected by the target, it enters the image collector and is received by the image collector to form a light spot image.

[0047] The spot image may be a structured spot image with two brightness distributions formed when light passes through a dual-brightness diffraction grating and is irradiated onto a target. It is understandable that if the target surface is not a plane, the distances between different positions on the target surface and the emission points of the fill light, as well as the incident angles of the light emitted by the fill light to the target surface are different, and the light reflected to the image collector and presented in the bright spot image or dark spot image will show certain deformation and displacement of each spot.

[0048] For example, Figure 4 This is a schematic diagram of a facial spot provided in Example 1 of the present application. Figure 4 As shown, the light passes through the first light-transmitting area to fill in the target face, and the light spot projected on the face forms a diffraction light spot array distributed in an array. It should be noted that Figure 4 It is only a schematic diagram. In the actual spot image, in the diffraction spot array, each spot will show a certain degree of deformation and displacement due to the distance between different positions on the face surface and the emission point of the fill light, as well as the different incident angles of the fill light emitted to the target surface.

[0049] S130: Identify the target according to the light spot image.

[0050] The target is identified, for example, whether the target is a target stored in a database, whether the target is a living body, or the type of the target. The embodiment of the present invention does not limit this, and the identification result can be determined according to actual needs.

[0051] It should be noted that the image generally used for target recognition is a plane image, which only contains the pixel value information of each pixel point of the image. However, in the embodiment of the present invention, the spot image formed by the reflection of the dual-brightness diffraction grating contains not only the pixel value information of the target area, the pixel value information of the target and the target background area, but also the deformation information and displacement information of each spot, and the depth information of the target surface can be determined according to the deformation information and displacement information of each spot. Therefore, in the embodiment of the present invention, the target can be identified according to the pixel value information of the target area in the spot image, the pixel value information of the target and the target background area, and the depth information of the target surface, so as to achieve high-precision three-dimensional face recognition.

[0052] Specifically, the target recognition result can be determined by inputting the spot image into the constructed target recognition model. For example, the target recognition result can be determined by inputting the spot image into a deep learning model. For another example, the spot image can be firstly binarized and segmented by Blob analysis method, and then connected area detection can be performed to determine the target recognition result.

[0053] The embodiment of the present application provides a target recognition method, which controls the fill light to emit light through a dual-brightness diffraction grating to illuminate the target; wherein the dual-brightness diffraction grating includes at least one first light-transmitting area and at least one second light-transmitting area; the brightness of the light after passing through the first light-transmitting area and the second light-transmitting area is different; the image collector receives the light reflected by the target, and the image of the target is collected to obtain a spot image; the target is recognized based on the spot image. This technical solution, based on the dual-brightness diffraction grating, performs fill light on the target, so that the spot image can reflect the depth information and surface feature information of the target, thereby improving the effect and accuracy of target recognition.

[0054] Embodiment 2

[0055] Figure 5 This is a flow chart of a target recognition method provided in Example 2 of this application. This embodiment of this application is optimized based on the above embodiment. For solutions not described in detail in this embodiment of this application, please refer to the above embodiment. Figure 5 As shown, the method of the embodiment of the present application specifically includes the following steps:

[0056] S210, controlling the fill light to emit light through the dual-brightness diffraction grating to illuminate the target, wherein the dual-brightness diffraction grating includes at least one first light-transmitting area and at least one second light-transmitting area; the brightness of the light after passing through the first light-transmitting area and the second light-transmitting area is different.

[0057] In an embodiment of the present application, the fill light is an invisible light fill light, such as an infrared fill light, so as to detect the surface information of the target, distinguish between three-dimensional objects and two-dimensional objects, and reduce the mutual interference between light and the external environment.

[0058] S220: Receive the light reflected by the target through an image collector, and collect an image of the target to obtain a light spot image.

[0059] S230: Input the spot image into a liveness detection model, and identify surface information and depth information of the target in the spot image through the liveness detection model.

[0060] Wherein, the surface information is determined by the grayscale value of the first image area in the spot image and the grayscale value of the second image area in the spot image, and the depth information is determined by the deformation information and displacement information of the first image area in the spot image formed by the light passing through the first light-transmitting area; the first image area is formed in the spot image by the light passing through the first light-transmitting area, and the second image area is formed in the spot image by the light passing through the second light-transmitting area.

[0061] Among them, liveness detection can be used to detect whether the target is a real living person, and can effectively resist common attack methods such as photos, videos, masks, occlusions, 3D animations, and screen reshoots.

[0062] Among them, the surface information can be converted into a grayscale value according to the brightness information of each pixel unit of the target in the spot image, the grayscale value of the first image area can be adjusted according to the brightness of the first light-transmitting area, and the grayscale value of the second image area can be adjusted according to the brightness of the second light-transmitting area. Specifically, the grayscale value of the first image area in the spot image can represent the surface information of the target, and the grayscale value of the second image area can represent the surface information of the background area other than the target; of course, the grayscale value of the first image area can also represent the surface information of the background area other than the target, and the grayscale value of the second image area in the spot image can also represent the surface information of the target.

[0063] Among them, the depth information can be determined based on the deformation information and displacement information of the light spot in the light spot image. The deformation information can be the change of the light spot size information, and the displacement information can be the change of the position of the center point of the light spot. Specifically, the light emitted by the fill light passes through the dual-brightness diffraction grating and is modulated by the height of the target. The modulated light is collected by the image collector and transmitted to the computer for analysis and calculation to obtain the depth information of the target. Among them, the modulation method can be time modulation or space modulation. The time modulation can be the time-of-flight method, which calculates the depth information of the target by recording the flight time of the light in space; the space modulation can be the depth information of the target determined by the change of the phase, light intensity and other property parameters of the diffraction grating.

[0064] Optionally, the process of determining the liveness detection model includes: controlling the fill light to emit light through a dual-brightness diffraction grating to illuminate a live target, receiving light reflected by the live target through an image collector, and capturing an image of the live target to obtain a live target spot image, and / or controlling the fill light to emit light through a dual-brightness diffraction grating to illuminate a non-living target, receiving light reflected by the non-living target through an image collector, and capturing an image of the non-living target to obtain a non-living target spot image; using the live target spot image and / or the non-living target spot image as training samples to perform model training to obtain a liveness detection model.

[0065] Exemplarily, first, part of the live target spot images and part of the non-live target spot images can be used as training sample sets, and the remaining live target spot images and part of the non-live target spot images can be used as test sample sets, and the test sample sets can be divided into positive sample sets and negative sample sets according to type and proportion; secondly, the live target spot images and model parameters are input into a preset model for training to output surface information and depth information of the target in the live target spot images. During the model training process, the gradient descent method or other optimization algorithms can be used to minimize the loss function; finally, the non-live target spot images are input into the trained model to determine the evaluation indicators of the model, such as accuracy, precision and recall, to evaluate whether the liveness detection model is trained.

[0066] As another example, first, the live target light spot images can be divided into a training sample set and a test sample set in proportion; secondly, the images in the training sample set are input into a preset model for training to output the surface information and depth information of the target in the live target light spot image. During the model training process, the gradient descent method or other optimization algorithms can be used to minimize the loss function; finally, the live target light spot images in the test sample set are input into the trained model to determine the evaluation indicators of the model, such as accuracy, precision and recall rate, so as to evaluate whether the liveness detection model has been trained.

[0067] S240: Determine a liveness detection result of the target through recognition results of the surface information and depth information of the target in the spot image by the liveness detection model.

[0068] Specifically, it can be determined whether the target is a living body based on the deep learning algorithm and the recognition result of the surface information and depth information of the target in the spot image by the living body detection model. Specifically, the surface information of the target is detected by invisible light. If the target is a three-dimensional physical object, the surface is not a complete plane. If the target is a planar object, the surface of the target is a complete plane, thereby distinguishing three-dimensional objects from planar objects. Through the solution of double transparent diffraction gratings, the depth information of the target can be obtained. The depth information of the living body is different from the depth information of other 3D models, thereby distinguishing the living body from other three-dimensional models. Combining surface information and depth information, planar objects and other three-dimensional models can be excluded, thereby identifying living targets.

[0069] The embodiment of the present application provides a target recognition method, which controls the fill light to emit light through a dual-brightness diffraction grating to illuminate the target; wherein the dual-brightness diffraction grating includes at least one first light-transmitting area and at least one second light-transmitting area; the brightness of the light after passing through the first light-transmitting area and the second light-transmitting area is different; the light reflected by the target is received by an image collector, and the image of the target is acquired to obtain a spot image; the spot image is input into a liveness detection model, and the surface information and depth information of the target in the spot image are recognized by the liveness detection model; the liveness detection result of the target is determined by the recognition result of the surface information and depth information of the target in the spot image by the volume detection model. This technical solution realizes liveness detection of the target according to the surface information and depth information of the target in the spot image obtained by the dual-brightness diffraction grating, distinguishes three-dimensional objects from planar objects by surface information, and distinguishes live objects from three-dimensional models by depth information, and the combination of surface information and depth information can improve the accuracy of target liveness detection.

[0070] Embodiment 3

[0071] Figure 6 This is a flow chart of a target recognition method provided in Example 3 of the present application. The present application example is optimized based on the above example. For solutions not described in detail in the present application example, see the above example. Figure 6 As shown, the method of the embodiment of the present application specifically includes the following steps:

[0072] S310, controlling the fill light to emit light through the dual-brightness diffraction grating to illuminate the target, wherein the dual-brightness diffraction grating includes at least one first light-transmitting area and at least one second light-transmitting area; the brightness of the light after passing through the first light-transmitting area and the second light-transmitting area is different.

[0073] S320: Receive the light reflected by the target through an image collector, and collect an image of the target to obtain a light spot image.

[0074] S330: Based on a facial recognition model, identify the target according to the light spot image and the facial image of the user in a database.

[0075] The facial recognition model can be used to match the target in the spot image with the user in the database. The facial image of the user in the database can be an image with a double brightness diffraction grating superimposed, or a conventional image without a double brightness diffraction grating superimposed.

[0076] When the facial image of the user in the database is an image with a superimposed dual-brightness diffraction grating, the facial recognition model can be trained based on the image sample set with the superimposed dual-brightness diffraction grating.

[0077] When the facial image of the user in the database is an image without superimposed dual-brightness diffraction grating, in order to ensure the accuracy of the target recognition result in the spot image, the facial image with superimposed dual-brightness diffraction grating and the facial image without superimposed dual-brightness diffraction grating can be composed of a facial multimodal sample set, and feature learning is performed on the facial image with superimposed dual-brightness diffraction grating and the facial image without superimposed dual-brightness diffraction grating belonging to the same user, respectively, so that the feature similarity of the two images belonging to the same user is the highest, thereby obtaining an effective facial recognition model.

[0078] S340: Determine a user corresponding to the target according to the facial image having the highest feature similarity to the light spot image.

[0079] Specifically, the spot image is input into the facial recognition model, the features of the target in the spot image are extracted, and the similarity is calculated with the features of the facial images of each user in the database. The user corresponding to the facial image with the highest feature similarity to the target in the spot image and meeting the preset similarity is determined as the user corresponding to the target.

[0080] It is understandable that the spot image captured by the image collector may have a large contrast between light and dark due to the brightness of the fill light or the ambient brightness, which may cause a part of the spot image to lose details due to being too dark or a part of the spot image to lose details due to being too bright. Therefore, it is necessary to perform image compensation on the spot image captured by the image collector to ensure the completeness of the details of the target in the spot image as much as possible and improve the accuracy of target recognition.

[0081] On the basis of the above embodiment, optionally, before identifying the target based on the facial recognition model, according to the light spot image and the facial image of the user in the database, the method further includes but is not limited to the following steps C1 to C2:

[0082] Step C1, determining a first brightness value of a first image area in the spot image and a second brightness value of a second image area in the spot image, wherein the first image area is formed in the spot image by light passing through the first light-transmitting area, and the second image area is formed in the spot image by light passing through the second light-transmitting area.

[0083] The brightness value can be obtained by converting the pixel value of the reflected light received by each pixel unit in the image sensor. Specifically, the pixel values ​​of the first image area and the second image area in the spot image can be obtained respectively, and then the pixel values ​​are converted to obtain the brightness value.

[0084] Step C2: adjusting the first brightness value or the second brightness value according to the deviation between the first brightness value and the second brightness value, so that the brightness of the first image area and the second image area is smooth and continuous.

[0085] The deviation value may be the difference between the average value of the first brightness value of the first image area and the average value of the second brightness value of the second image area, or the difference between the maximum value of the first brightness value and the minimum value of the second brightness value, or the difference between the minimum value of the first brightness value and the maximum value of the second brightness value. This embodiment of the application does not limit this, and it can be determined according to actual conditions.

[0086] Specifically, the first brightness value or the second brightness value is adjusted, and the high brightness center can be determined according to the deviation value between the first brightness value and the second brightness value, and then the highlighted area is determined to be the first image area or the second image area according to the high brightness center, and then the brightness negative gain compensation is performed on the highlighted area according to the deviation value, and the brightness positive gain compensation is performed on the image area except the highlighted area.

[0087] Exemplarily, the gain compensation method may be to compensate the brightness value of each pixel point according to the distance between the high brightness center and each pixel point, the positive gain compensation function, and the negative gain compensation function.

[0088] As another example, the gain compensation method may also be to compensate the brightness value of each pixel point according to a brightness filtering and smoothing algorithm.

[0089] The beneficial effect of the above technical solution is that it can ensure the completeness of the details of the target in the spot image as much as possible and improve the accuracy of target recognition.

[0090] The embodiment of the present application provides a target recognition method, which controls the fill light to emit light through a dual-brightness diffraction grating to illuminate the target; wherein the dual-brightness diffraction grating includes at least one first light-transmitting area and at least one second light-transmitting area; the brightness of the light after passing through the first light-transmitting area and the second light-transmitting area is different; the light reflected by the target is received by an image collector, and the target is imaged to obtain a spot image; based on a facial recognition model, the target is recognized according to the spot image and the facial image of the user in the database; the user corresponding to the target is determined according to the facial image with the highest feature similarity to the spot image. This technical solution realizes higher-precision facial recognition based on the depth information and size information of the target in the spot image acquired by the dual-brightness diffraction grating.

[0091] Embodiment 4

[0092] Figure 7 This is a schematic diagram of the structure of a target recognition device provided in the fourth embodiment of the present application. The device can execute the target recognition method provided in any embodiment of the present application and has the corresponding functional modules and beneficial effects of the execution method. Figure 7 As shown, the device comprises:

[0093] The target fill light module 410 is used to control the fill light to emit light through the dual-brightness diffraction grating to illuminate the target; wherein the dual-brightness diffraction grating includes at least one first light-transmitting area and at least one second light-transmitting area; the brightness of the light after passing through the first light-transmitting area and the second light-transmitting area is different;

[0094] An image acquisition module 420 is used to receive the light reflected by the target through an image acquisition device, and acquire an image of the target to obtain a light spot image;

[0095] The target recognition module 430 is used to recognize the target according to the light spot image.

[0096] The embodiment of the present application provides a target recognition device, which controls the fill light to emit light through a dual-brightness diffraction grating to illuminate the target; wherein the dual-brightness diffraction grating includes at least one first light-transmitting area and at least one second light-transmitting area; the brightness of the light after passing through the first light-transmitting area and the second light-transmitting area is different; the image collector receives the light reflected by the target, and the image of the target is collected to obtain a spot image; the target is recognized based on the spot image. This technical solution, based on the dual-brightness diffraction grating, performs fill light on the target, so that the spot image can reflect the depth information and surface feature information of the target, thereby improving the effect and accuracy of target recognition.

[0097] Furthermore, after the light passes through the first light-transmitting area and is irradiated onto the plane, the light spots formed are arranged in an array.

[0098] Furthermore, the device also includes:

[0099] A target range determination module, used to determine the target range for acquiring a target image at the farthest distance according to the field of view range of the image collector;

[0100] A light spot information determination module is used to determine the size information and spacing of the light spot formed by the light passing through the first light-transmitting area according to the target range, so that the light spot passing through the first light-transmitting area can cover the target range; wherein the size information and the spacing are used to construct the dual-brightness diffraction grating.

[0101] Furthermore, the target identification module 430 includes:

[0102] a target information recognition unit, configured to input the light spot image into a liveness detection model, and recognize surface information and depth information of a target in the light spot image through the liveness detection model;

[0103] The surface information is determined by the grayscale value of the first image area in the spot image and the grayscale value of the second image area in the spot image, and the depth information is determined by the deformation information and displacement information of the first image area in the spot image formed by the light passing through the first light-transmitting area; the first image area is formed in the spot image by the light passing through the first light-transmitting area, and the second image area is formed in the spot image by the light passing through the second light-transmitting area;

[0104] The liveness detection unit is used to determine the liveness detection result of the target through the recognition result of the surface information and depth information of the target in the spot image by the liveness detection model.

[0105] Furthermore, the process of determining the liveness detection model includes:

[0106] Controlling the fill light to emit light through the dual-brightness diffraction grating to illuminate the living target, receiving the light reflected by the living target through the image collector, performing image acquisition on the living target to obtain a living target spot image, and / or,

[0107] Controlling the fill light to emit light through the dual-brightness diffraction grating to illuminate the non-living target, receiving the light reflected by the non-living target through the image collector, and performing image acquisition on the non-living target to obtain a non-living target spot image;

[0108] The living object light spot image and / or the non-living object light spot image are used as training samples to perform model training to obtain a living object detection model.

[0109] Furthermore, the target identification module 430 includes:

[0110] An image recognition unit, configured to recognize the target based on a facial recognition model, according to the light spot image and a facial image of a user in a database;

[0111] A user determination unit is used to determine a user corresponding to the target according to a facial image having the highest feature similarity to the light spot image.

[0112] Furthermore, the device also includes:

[0113] An image brightness determination module, used to determine a first brightness value of a first image area in the spot image and a second brightness value of a second image area in the spot image before identifying the target based on a facial recognition model and according to the spot image and a facial image of a user in a database; wherein the first image area is formed in the spot image by light passing through a first light-transmitting area, and the second image area is formed in the spot image by light passing through a second light-transmitting area;

[0114] The image brightness compensation module is used to adjust the first brightness value or the second brightness value according to the deviation value between the first brightness value and the second brightness value, so as to make the brightness of the first image area and the second image area smooth and continuous.

[0115] A target recognition device provided in an embodiment of the present application can execute a target recognition method provided in any embodiment of the present application, and has functional modules and beneficial effects corresponding to the execution method.

[0116] Embodiment 5

[0117] Figure 8 A schematic diagram of an electronic device 10 that can be used to implement an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0118] like Figure 8As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0119] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0120] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a target recognition method.

[0121] In some embodiments, the target recognition method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the target recognition method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the target recognition method in any other appropriate manner (e.g., by means of firmware).

[0122] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0123] The computer programs for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable target recognition device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0124] In the context of the present application, a computer readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device or equipment. A computer readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium may be a machine readable signal medium. A more specific example of a machine readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0125] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0126] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0127] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0128] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the information expected by the technical solution of this application can be achieved, and this document is not limited here.

[0129] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A target recognition method, characterized in that: The method comprises: Controlling the fill light to emit light through the dual-brightness diffraction grating to illuminate the target; wherein the dual-brightness diffraction grating includes at least one first light-transmitting area and at least one second light-transmitting area; the brightness of the light after passing through the first light-transmitting area and the second light-transmitting area is different; Receiving the light reflected by the target through an image collector, and acquiring an image of the target to obtain a light spot image; The target is identified according to the light spot image.

2. The method according to claim 1, characterized in that After the light passes through the first light-transmitting area, the light spots formed on the plane are arranged in an array.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: Determine the target range for acquiring the target image at the farthest distance according to the field of view range of the image collector; The size information and spacing of the light spots formed by the light passing through the first light-transmitting area are determined according to the target range, so that the light spots passing through the first light-transmitting area can cover the target range; wherein the size information and the spacing are used to construct the dual-brightness diffraction grating.

4. The method according to claim 1, characterized in that According to the light spot image, identifying the target includes: Inputting the spot image into a liveness detection model, and identifying surface information and depth information of the target in the spot image through the liveness detection model; The surface information is determined by the grayscale value of the first image area in the spot image and the grayscale value of the second image area in the spot image, and the depth information is determined by the deformation information and displacement information of the first image area in the spot image formed by the light passing through the first light-transmitting area; the first image area is formed in the spot image by the light passing through the first light-transmitting area, and the second image area is formed in the spot image by the light passing through the second light-transmitting area; The liveness detection result of the target is determined through the recognition result of the liveness detection model on the surface information and depth information of the target in the spot image.

5. The method according to claim 4, characterized in that The process of determining the liveness detection model includes: Controlling the fill light to emit light through the dual-brightness diffraction grating to illuminate the living target, receiving the light reflected by the living target through the image collector, performing image acquisition on the living target to obtain a living target spot image, and / or, Controlling the fill light to emit light through the dual-brightness diffraction grating to illuminate the non-living target, receiving the light reflected by the non-living target through the image collector, and performing image acquisition on the non-living target to obtain a non-living target spot image; The living object light spot image and / or the non-living object light spot image are used as training samples to perform model training to obtain a living object detection model.

6. The method according to claim 1, characterized in that According to the light spot image, identifying the target includes: Based on a facial recognition model, identifying the target according to the light spot image and the facial image of the user in the database; A user corresponding to the target is determined according to a facial image having the highest feature similarity to the light spot image.

7. The method according to claim 6, characterized in that Before identifying the target based on the facial recognition model according to the light spot image and the facial image of the user in the database, the method further includes: Determine a first brightness value of a first image area in the spot image, and a second brightness value of a second image area in the spot image; wherein the first image area is formed in the spot image by light passing through a first light-transmitting area, and the second image area is formed in the spot image by light passing through a second light-transmitting area; The first brightness value or the second brightness value is adjusted according to the deviation value between the first brightness value and the second brightness value, so that the brightness of the first image area and the second image area is smooth and continuous.

8. A target recognition device, characterized in that: The device comprises: A target fill light module is used to control the fill light to emit light through the dual-brightness diffraction grating to illuminate the target; wherein the dual-brightness diffraction grating includes at least one first light-transmitting area and at least one second light-transmitting area; the brightness of the light after passing through the first light-transmitting area and the second light-transmitting area is different; An image acquisition module, used for receiving the light reflected by the target through an image acquisition device, and acquiring an image of the target to obtain a light spot image; A target recognition module is used to recognize the target according to the light spot image.

9. An electronic device, characterized in that: The device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the target recognition method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the target recognition method according to any one of claims 1 to 7 when executed.