Image detection method, live detection method, electronic device, medium and product
By frequency domain conversion of the image to be detected, the spectrum image is generated and the first clue image is generated. Combined with remake attack detection and live detection results, the problem of insufficient remake image recognition on high-resolution display screens is solved, and accurate recognition and live detection accuracy are improved in high-definition screen remake scenes.
Patent Information
- Application Number
- CN202210434344.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-24
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2042-04-24
AI Technical Summary
The prior art cannot effectively identify remake images on high-resolution display screens, resulting in insufficient accuracy of live detection.
Spectral images are generated by frequency domain conversion of the to-detected image, and a first clue image is generated based on the spectrum image. Combined with remake attack detection and live detection results, it is determined whether the target object is live.
Improves the accuracy of remake attack detection in high-resolution screen remake scenes and improves the accuracy of live detection.
Smart Images

Figure CN114913574B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to an image detection method, a living body detection method, an electronic device, a medium, and a product. Background Art
[0002] With the development of computer technology, image detection technology has emerged. As an efficient and convenient verification method, it is widely used in many fields. In related technologies, such as liveness detection and environmental analysis, it is often necessary to determine whether the detected image is a reprinted image. A reprinted image refers to an image obtained by reprinting a captured image. For example, an image is obtained by reprinting the image displayed on a mobile phone screen.
[0003] Related art techniques can effectively detect the presence of moiré patterns in re-photographed images obtained by re-photographing a display screen. However, since moiré patterns are typically only noticeable on displays with lower resolutions, related art techniques are unable to effectively detect the presence of moiré patterns in re-photographed images obtained by re-photographing high-resolution displays (images that do not have moiré patterns or have inconspicuous moiré patterns). Summary of the Invention
[0004] To overcome the problems existing in the related art, the present disclosure provides an image detection method, a living body detection method, an electronic device, a medium and a product.
[0005] According to a first aspect of an embodiment of the present disclosure, a liveness detection method is provided, comprising:
[0006] Acquire an image to be detected; wherein the image to be detected includes a facial area of a target object; perform frequency domain conversion on the image to be detected to obtain a spectrum image of the image to be detected, generate a first clue image corresponding to the image to be detected based on the spectrum image, perform a cloning attack detection on the image to be detected based on the first clue image to obtain a cloning attack detection result; and perform liveness detection on the target object based on the image to be detected to obtain a liveness detection result; determine whether the target object is alive based on the liveness detection result and the cloning attack detection result.
[0007] In one embodiment, the first clue image corresponding to the image to be detected is generated based on the spectrum image, including: intercepting the image area including the target pixel points according to the target rule; wherein the target pixel points are the pixel points located in each target pixel row and each target pixel column in the spectrum image, and each target pixel row is arranged at equal intervals, and each target pixel column is arranged at equal intervals; each of the image areas is spliced to obtain the first clue image.
[0008] In one embodiment, the target pixel rows are pixel rows other than the central pixel row of the spectrum image, and the target pixel columns are pixel columns other than the central pixel column of the spectrum image.
[0009] In one embodiment, the target pixel row is located at a position corresponding to 1 / 8 or an integer multiple of 1 / 8 of the spectrum image, and the target pixel column is located at a position corresponding to 1 / 8 or an integer multiple of 1 / 8 of the spectrum image.
[0010] In one embodiment, the method further includes: performing brightness difference increasing processing on each of the image regions, wherein the brightness difference is the brightness difference between the bright spot pixel and the remaining pixels in the image region.
[0011] In one embodiment, the brightness difference increasing processing of each of the image areas includes: for each of the image areas, selecting a specified number of first designated pixel points in order of pixel values from large to small, and adjusting the pixel values of the pixel points in the image area other than the first designated pixel points; wherein the adjustment processing includes setting the pixel value of the pixel point to a target value or reducing the pixel value of the pixel point; or, for each of the image areas, determining a second designated pixel point whose pixel value is less than a target pixel threshold, and adjusting the pixel value of the second designated pixel point; wherein the adjustment processing includes setting the pixel value of the pixel point to a target value or reducing the pixel value of the pixel point.
[0012] According to a second aspect of an embodiment of the present disclosure, there is provided an image detection method, including:
[0013] Acquire an image to be detected; perform frequency domain conversion on the image to be detected to obtain a spectrum image of the image to be detected, and generate a first clue image corresponding to the image to be detected based on the spectrum image; perform a remake attack detection on the image to be detected based on the first clue image to obtain a remake attack detection result.
[0014] In one embodiment, the first clue image corresponding to the image to be detected is generated based on the spectrum image, including: intercepting the image area including the target pixel points according to the target rule; wherein the target pixel points are the pixel points located in each target pixel row and each target pixel column in the spectrum image, and each target pixel row is arranged at equal intervals, and each target pixel column is arranged at equal intervals; each of the image areas is spliced to obtain the first clue image.
[0015] In one embodiment, the target pixel rows are pixel rows other than the central pixel row of the spectrum image, and the target pixel columns are pixel columns other than the central pixel column of the spectrum image.
[0016] In one embodiment, the target pixel row is located at a position corresponding to 1 / 8 or an integer multiple of 1 / 8 of the spectrum image, and the target pixel column is located at a position corresponding to 1 / 8 or an integer multiple of 1 / 8 of the spectrum image.
[0017] According to a third aspect of an embodiment of the present disclosure, there is provided a living body detection device, comprising:
[0018] An acquisition unit is configured to acquire an image to be detected, wherein the image to be detected includes a facial area of a target object; a processing unit is configured to perform frequency domain conversion on the image to be detected to obtain a spectrum image of the image to be detected, generate a first clue image corresponding to the image to be detected based on the spectrum image, perform a photocopy attack detection on the image to be detected based on the first clue image to obtain a photocopy attack detection result; and perform liveness detection on the target object based on the image to be detected to obtain a liveness detection result; a determination unit is configured to determine whether the target object is alive based on the liveness detection result and the photocopy attack detection result.
[0019] In one embodiment, the processing unit generates a first clue image corresponding to the image to be detected based on the spectrum image: an image area including target pixel points is intercepted according to a target rule; wherein the target pixel points are pixel points located in each target pixel row and each target pixel column in the spectrum image, and each target pixel row is arranged at equal intervals, and each target pixel column is arranged at equal intervals; each image area is spliced to obtain the first clue image.
[0020] In one embodiment, the target pixel rows are pixel rows other than the central pixel row of the spectrum image, and the target pixel columns are pixel columns other than the central pixel column of the spectrum image.
[0021] In one embodiment, the target pixel row is located at a position corresponding to 1 / 8 or an integer multiple of 1 / 8 of the spectrum image, and the target pixel column is located at a position corresponding to 1 / 8 or an integer multiple of 1 / 8 of the spectrum image.
[0022] In one embodiment, the processing unit is further configured to perform brightness difference increasing processing on each of the image regions, wherein the brightness difference is the brightness difference between a bright spot pixel and other pixels in the image region.
[0023] In one embodiment, the processing unit performs brightness difference increase processing on each of the image areas in the following manner: for each of the image areas, a specified number of first designated pixel points are selected in descending order of pixel values, and the pixel values of the pixel points in the image area other than the first designated pixel points are adjusted; wherein the adjustment processing includes setting the pixel value of the pixel point to a target value or reducing the pixel value of the pixel point; or, for each of the image areas, a second designated pixel point whose pixel value is less than a target pixel threshold is determined, and the pixel value of the second designated pixel point is adjusted; wherein the adjustment processing includes setting the pixel value of the pixel point to a target value or reducing the pixel value of the pixel point.
[0024] According to a fourth aspect of an embodiment of the present disclosure, there is provided an image detection device, including:
[0025] An acquisition unit is used to acquire an image to be detected; a processing unit is used to perform frequency domain conversion on the image to be detected to obtain a spectrum image of the image to be detected, and generate a first clue image corresponding to the image to be detected based on the spectrum image; and is used to perform a copy attack detection on the image to be detected based on the first clue image to obtain a copy attack detection result.
[0026] In one embodiment, the processing unit generates a first clue image corresponding to the image to be detected based on the spectrum image in the following manner: an image area including target pixel points is intercepted according to a target rule; wherein the target pixel points are pixel points located in each target pixel row and each target pixel column in the spectrum image, and each target pixel row is arranged at equal intervals, and each target pixel column is arranged at equal intervals; each image area is spliced to obtain the first clue image.
[0027] In one embodiment, the target pixel rows are pixel rows other than the central pixel row of the spectrum image, and the target pixel columns are pixel columns other than the central pixel column of the spectrum image.
[0028] In one embodiment, the target pixel row is located at a position corresponding to 1 / 8 or an integer multiple of 1 / 8 of the spectrum image, and the target pixel column is located at a position corresponding to 1 / 8 or an integer multiple of 1 / 8 of the spectrum image.
[0029] According to a fifth aspect of the embodiments of the present disclosure, there is provided an electronic device, including:
[0030] a processor; a memory for storing instructions executable by the processor;
[0031] The processor is configured to: execute the liveness detection method described in the first aspect or any one of the embodiments of the first aspect, or execute the image detection method described in the second aspect or any one of the embodiments of the second aspect.
[0032] According to the sixth aspect of the embodiments of the present disclosure, a storage medium is provided, in which instructions are stored. When the instructions in the storage medium are executed by a processor, the processor is enabled to execute the liveness detection method described in the first aspect or any one of the embodiments of the first aspect, or to execute the image detection method described in the second aspect or any one of the embodiments of the second aspect.
[0033] According to the seventh aspect of the embodiments of the present disclosure, a computer program product is provided, which includes a computer program. When the computer program is executed by a processor, it implements the liveness detection method described in the first aspect or any one of the embodiments of the first aspect, or implements the image detection method described in the second aspect or any one of the embodiments of the second aspect.
[0034] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: the image to be detected can be subjected to frequency domain conversion to obtain a spectrum image of the image to be detected, and a first clue image corresponding to the image to be detected can be generated through the spectrum image. Furthermore, the image to be detected can be subjected to a remake attack detection through the first clue image to obtain a remake attack detection result, and the target object can be subjected to liveness detection through the image to be detected to obtain a liveness detection result. On this basis, whether the target object is alive can be determined through the liveness detection result and the remake attack detection result. This method uses the remake attack detection as a supplementary detection for liveness detection, which can further improve the accuracy of the liveness detection result. In addition, since this method performs remake attack detection through a clue image generated by the spectrum diagram of the image to be detected, the remake attack detection process involved is universal, and can achieve accurate recognition of the remake image obtained by remaking the display screen of a high-resolution screen (i.e., a remake image without moiré or with inconspicuous moiré), thereby realizing remake attack detection in the high-definition screen remake scenario and further improving the liveness detection accuracy.
[0035] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0037] Figure 1 The figure is a flowchart of a living body detection method according to an exemplary embodiment.
[0038] Figure 2 The present invention is a flowchart of a method for generating a first clue image corresponding to an image to be detected based on a spectrum image according to an exemplary embodiment.
[0039] Figure 3 The figure is a schematic diagram showing a target pixel point in a spectrum image according to an exemplary embodiment.
[0040] Figure 4 This is a flow chart of another method for generating a first clue image corresponding to an image to be detected based on a spectrum image according to an exemplary embodiment.
[0041] Figure 5 The figure is a schematic diagram showing a clue image obtained by reshooting an image and after brightness difference enhancement processing according to an exemplary embodiment.
[0042] Figure 6 The figure is a flow chart showing another method for detecting living body according to an exemplary embodiment.
[0043] Figure 7 The figure is a flowchart of an image detection method according to an exemplary embodiment.
[0044] Figure 8 The present invention is a flowchart of a method for generating a first clue image corresponding to an image to be detected based on a spectrum image according to an exemplary embodiment.
[0045] Figure 9 The figure is a block diagram of a living body detection device according to an exemplary embodiment.
[0046] Figure 10 The figure is a block diagram of an image detection device according to an exemplary embodiment.
[0047] Figure 11 The figure is a block diagram of an electronic device for image detection or living body detection according to an exemplary embodiment. DETAILED DESCRIPTION
[0048] Exemplary embodiments are described in detail herein, with examples illustrated in the accompanying drawings. When the following description refers to the drawings, identical numerals in different drawings represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present disclosure.
[0049] In the accompanying drawings, the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be understood as limiting the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure. The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0050] In recent years, significant progress has been made in AI-based research on computer vision, deep learning, machine learning, image processing, and image recognition. Artificial Intelligence (AI) is an emerging science and technology that studies and develops theories, methods, technologies, and application systems for simulating and extending human intelligence. AI is a comprehensive discipline encompassing numerous technologies, including chips, big data, cloud computing, the Internet of Things, distributed storage, deep learning, machine learning, and neural networks. Computer vision, a key branch of AI, specifically enables machines to understand the world. Computer vision technologies typically include face recognition, image detection, fingerprint recognition and anti-counterfeiting verification, biometric recognition, face detection, pedestrian detection, object detection, pedestrian recognition, image processing, image recognition, image semantic understanding, image retrieval, text recognition, video processing, video content recognition, behavior recognition, 3D reconstruction, virtual reality, augmented reality, simultaneous localization and mapping (SLAM), computational photography, and robotic navigation and positioning. With the research and advancement of artificial intelligence technology, this technology has been applied in many fields, such as security, urban management, traffic management, building management, park management, facial access, facial attendance, logistics management, warehouse management, robots, intelligent marketing, computational photography, mobile phone imaging, cloud services, smart homes, wearable devices, unmanned driving, autonomous driving, smart medical care, facial payment, facial unlocking, fingerprint unlocking, identity verification, smart screens, smart TVs, cameras, mobile Internet, live streaming, beauty, makeup, medical beauty, smart temperature measurement and other fields.
[0051] The liveness detection method provided by the embodiments of the present disclosure can be applied to scenarios where liveness detection is performed by determining whether an image is a re-photographed image.
[0052] With the development of computer technology, image detection technology has emerged. As an efficient and convenient verification method, it is widely used in many fields. Related technologies, such as liveness detection and environmental analysis, often require determining whether the detected image is a re-photographed image. A re-photographed image is an image obtained by re-capturing a captured image. For example, an image is obtained by re-photographing the image displayed on a mobile phone.
[0053] In the related art, it is possible to effectively detect the re-photographed image obtained by re-photographing the display screen by identifying moiré patterns. However, generally, only displays with lower resolutions (displays with a resolution less than or equal to 1280*x720) will cause more obvious moiré patterns to appear in the re-photographed image. Therefore, in the related art, it is impossible to effectively detect the re-photographed image obtained by re-photographing a high-resolution display screen (such as a display screen with a resolution higher than 1280*720, such as a 4K display screen) (the re-photographed image does not have moiré patterns, or the moiré patterns in the re-photographed image are not obvious). This also makes it impossible for the liveness detection scheme that applies the related technology for re-photographing detection to achieve relatively accurate recognition of the re-photographed image.
[0054] In view of this, the present disclosure proposes a liveness detection method, which can perform frequency domain conversion on the image to be detected to obtain the spectrum image of the image to be detected, and generate a clue image corresponding to the image to be detected through the spectrum image. Further, the image to be detected can be subjected to a remake attack detection through the clue image to obtain a remake attack detection result, and the target object can be subjected to liveness detection through the image to be detected to obtain a liveness detection result. On this basis, it can be determined whether the target object is alive through the liveness detection result and the remake attack detection result. This method uses the remake attack detection as a supplementary detection for liveness detection, which can further improve the accuracy of the liveness detection result. In addition, since this method performs remake attack detection through the clue image generated by the spectrum diagram of the image to be detected, the remake attack detection process involved is universal, and can achieve accurate recognition of the remake image obtained by remaking the display screen of a high-resolution screen (that is, the remake image without moiré or with inconspicuous moiré), realizes remake attack detection in the high-definition screen remake scene, and further improves the accuracy of liveness detection. For the convenience of description below, the clue image obtained through the spectrum image is referred to as the first clue image.
[0055] Figure 1 FIG. 1 is a flow chart showing a method for detecting a living body according to an exemplary embodiment. Figure 1 As shown, the following steps are included.
[0056] In step S11, an image to be detected is acquired.
[0057] The image to be detected includes the face area of the target object.
[0058] In step S12, the image to be detected is converted into the frequency domain to obtain a spectrum image of the image to be detected, a first clue image corresponding to the image to be detected is generated based on the spectrum image, a copy attack detection is performed on the image to be detected based on the first clue image to obtain a copy attack detection result, and a liveness detection is performed on the target object based on the image to be detected to obtain a liveness detection result.
[0059] In the disclosed embodiment, the image to be detected is a three-channel image in a three-primary color (Red, Green, Blue, RGB) color space format, and the spectrum image obtained by performing frequency domain conversion on the image to be detected is a single-channel image. The single-channel data of the spectrum image is the pixel value. For example, the frequency domain conversion of the image to be detected can be performed using a fast Fourier transform (FFT) algorithm.
[0060] In step S13 , based on the liveness detection result and the copy attack detection result, it is determined whether the target object is a live body.
[0061] For example, based on the liveness detection results and the copy attack detection results, the target object can be determined to be live by "taking the intersection" method. For example, if the liveness detection result indicates that the image to be detected is live, and the copy attack detection result indicates that the image to be detected is not a copy, then the target object is determined to be live. If the liveness detection result indicates that the image to be detected is not live, or the copy attack detection result indicates that the image to be detected is a copy, then the target object is determined to be non-live.
[0062] The liveness detection method involved in the present disclosure may be, for example, action liveness detection (such as blinking, opening the mouth, etc.), color liveness detection, lip reading liveness detection and other liveness detection methods, and the present disclosure does not make specific limitations on this. In some specific embodiments, for liveness detection and remake attack detection, one of the detection methods may be used first, and the other detection may be further performed if the detection passes. For example, liveness detection may be performed first on the image to be detected, and if the liveness detection passes, remake attack detection may be performed on the first clue image. For another example, remake attack detection may be performed first on the first clue image, and if the remake attack detection passes, liveness detection may be performed on the image to be detected. Of course, liveness detection and remake attack detection may also be performed simultaneously.
[0063] Typically, for a given image and a screen-recorded image of the given image, after performing spectral conversion on both images to obtain a spectrum image, there will be significant pixel arrangement differences in specific regions of the spectrum image. In one embodiment of the present disclosure, a first clue image can be obtained by cropping and splicing the specific regions mentioned above.
[0064] Figure 2 FIG. 1 is a flow chart of a method for generating a first clue image corresponding to an image to be detected based on a spectrum image according to an exemplary embodiment. Figure 2 As shown, the following steps are included.
[0065] In step S21, the image area including the target pixel is intercepted according to the target rule.
[0066] In the embodiment of the present disclosure, the target pixel points are the intersection points of pixels located at target pixel rows and target pixel columns in the spectrum image, wherein the target pixel rows are arranged at equal intervals, and the target pixel columns are arranged at equal intervals.
[0067] For example, the target pixel can be used as the center point for cropping the image area, or other pixels close to the target pixel can be used as the center point for cropping the image area. In addition, the cropping range can be adjusted according to the actual situation of the spectrum image (for example, a 20*20 pixel range can be used as the cropping range), and this disclosure does not specifically limit this.
[0068] In step S22, each image region is spliced together to obtain a first clue image.
[0069] In the embodiment of the present disclosure, the image area including the target pixel point is intercepted according to the target rule, and each image area is spliced to obtain the first clue image, in order to exclude the image area in the spectrum image that is not conducive to the detection of the remake attack. The image area where the feature difference between the non-remake image and the remake image is likely to appear can further improve the accuracy of the remake attack detection. Figure 3 For reference, the target pixel points selected in the spectrum image are exemplarily described.
[0070] Figure 3 FIG. 1 is a schematic diagram showing a target pixel point in a spectrum image according to an exemplary embodiment. Figure 3 As shown, the target pixel rows may include pixel rows X1, pixel rows X2, pixel rows X3, pixel rows X4, pixel rows X5, pixel rows X6 and pixel rows X7, and the target pixel columns may include pixel columns Y1, pixel columns Y2, pixel columns Y3, pixel columns Y4, pixel columns Y5, pixel columns Y6 and pixel columns Y7. The selected target pixel points may be, for example, Figure 3 The pixel intersections marked with squares and circles include pixel points [X1,Y1], [X1,Y2], [X1,Y3], [X1,Y4], [X1,Y5], [X1,Y6], [X1,Y7], [X2,Y1], [X2,Y2], [X2,Y3], [X2,Y4], [X2,Y5], [X2,Y6], [X2,Y7], [X3,Y1], [X3,Y2], [X3,Y3], [X3,Y4], [X3,Y5], [X3,Y6], [X3,Y7], [X4,Y1] , [X4,Y2], [X4,Y3], [X4,Y4], [X4,Y5], [X4,Y6], [X4,Y7], [X5,Y1], [X5,Y2], [X5,Y3], [X5,Y4], [X5,Y5], [X5,Y6], [X5, Y7], [X6,Y1], [X6,Y2], [X6,Y3], [X6,Y5], [X6,Y6], [X6,Y7], [X7,Y1], [X7,Y2], [X7,Y3], [X7,Y5], [X7,Y6] and [X7,Y7].
[0071] For example, by comparing the spectrum image of a non-reproduced image with the spectrum image of a reproduced image, it is found that pixels near the central pixel row (the pixel row to which the central pixel of the spectrum image belongs) and the central pixel column (the pixel column to which the central pixel of the spectrum image belongs) generally do not exhibit significant differences in pixel value arrangement. In one embodiment, pixel rows other than the central pixel row of the spectrum image among the equally spaced pixel rows can be used as target pixel rows, and pixel columns other than the central pixel column of the spectrum image among the equally spaced pixel columns can be used as target pixel columns.
[0072] by Figure 3 For example, the central pixel row is pixel row X4, the central pixel column is pixel column Y4, and the target pixel point can be Figure 3The pixel points marked with squares include pixel points [X1,Y1], [X1,Y2], [X1,Y3], [X1,Y5], [X1,Y6], [X1,Y7], [X2,Y1], [X2,Y2], [X2,Y3], [X2,Y5], [X2,Y6], [X2,Y7], [X3,Y1], [X3,Y2], [X3,Y3], [X3,Y5], [X3,Y6], [X The target pixels are identified as [X3,Y7], [X5,Y1], [X5,Y2], [X5,Y3], [X5,Y5], [X5,Y6], [X5,Y7], [X6,Y1], [X6,Y2], [X6,Y3], [X6,Y5], [X6,Y6], [X6,Y7], [X7,Y1], [X7,Y2], [X7,Y3], [X7,Y5], [X7,Y6], and [X7,Y7]. After excluding the pixels belonging to the center pixel row or center pixel column, the first clue image obtained can better reflect the difference between the copied image and the non-copy image, which can further improve the detection effect of copy attack.
[0073] In addition, in the actual detection process of the remake attack, it was found that the target pixel row and target pixel column should be located at the corresponding position of 1 / 8 or integer multiples of 1 / 8 (specifically including 2 / 8, 3 / 8, 4 / 8, 5 / 8, 6 / 8, 7 / 8) of the spectrum image, so that the selected target pixel point will fall into the image area of the spectrum image that is easy to identify the remake image. Figure 3As shown, the pixel row at the 1 / 8 position of the spectrum image is pixel row X1, the pixel row at the 2 / 8 position of the spectrum image is pixel row X2, and the pixel row at the 3 / 8 position of the spectrum image is pixel row X3. In addition, correspondingly, pixel row X4 to pixel row X7 are respectively the pixel row at the 4 / 8 position of the spectrum image to the pixel row at the 7 / 8 position of the spectrum image, which are not described in detail in this disclosure. By performing region division on the spectrum image based on the target pixel row, the spectrum image can be divided into 8 image regions of equal size. Similarly, the pixel column at the 1 / 8 position of the spectrum image is pixel column Y1, the pixel column at the 2 / 8 position of the spectrum image is pixel column Y2, and the pixel column at the 3 / 8 position of the spectrum image is pixel column Y3. In addition, correspondingly, pixel column Y4 to pixel column Y7 are respectively the pixel column at the 4 / 8 position of the spectrum image to the pixel column at the 7 / 8 position of the spectrum image, which are not described in detail in this disclosure. By performing column region division on the spectrum image based on the target pixel column, the spectrum image can be divided into 8 image regions of equal size. On this basis, the pixel rows located at 1 / 8 or an integer multiple of 1 / 8 of the spectrum image are used as target pixel rows, and the pixel columns located at 1 / 8 or an integer multiple of 1 / 8 of the spectrum image are used as target pixel columns, and the center pixel rows (the pixel rows located at 4 / 8 of the spectrum image) and the center pixel columns (the pixel columns located at 4 / 8 of the spectrum image) are eliminated from the target pixel rows and target pixel columns. Finally, multiple image areas that are easy to identify the re-shot images can be obtained. The multiple image areas obtained by this method are spliced to obtain the first clue image, which can be used as a preferred way to obtain the first clue image in the present disclosure.
[0074] For example, in the process of splicing multiple image regions, the positions of the spliced image regions are consistent with their original positions in the spectrum image. Figure 3 As shown, for the image area obtained with the pixel point [X1, Y1] as the center point, the corresponding image area is still located in the upper left position in the stitched image, and for the image area obtained with the pixel point [X7, Y7] as the center point, the corresponding image area is still located in the lower right position in the stitched image.
[0075] The image detection method provided by the disclosed embodiments can screen out image regions within a spectrum image that are useful for identifying remastered images. Furthermore, by cropping and splicing the designated image regions and performing remaster attack detection on the resulting first clue image, relatively accurate remaster attack detection results can be obtained.
[0076] Generally, although there are differences in spectrum arrangement between the clue image obtained through non-reproduced images and the clue image obtained through reproduced images, the differences are not obvious. If the reproducible attack detection is directly performed on the first clue image, the detection accuracy is limited. In view of this, in the embodiment of the present disclosure, each image area can be subjected to a brightness difference increase process, wherein the brightness difference is the brightness difference between the bright spot pixel and the remaining pixels in the image area. The brightness difference increase process can highlight the pixel value difference between the reproducible image and the non-reproduced image. Among them, for the spectrum image, the pixel value of the pixel can represent the brightness of the pixel, and the higher the pixel value, the brighter the pixel. The following is an illustrative description of the implementation method of performing brightness difference increase processing on the image area.
[0077] Specifically, the process of increasing the brightness difference of the image area can be performed before the various image areas are spliced together to generate the first clue image, or it can be performed after the various image areas are spliced together to generate the first clue image; the embodiment of the present disclosure does not limit the specific execution time of the above-mentioned brightness difference increasing process.
[0078] Figure 4 FIG. 1 is a flow chart showing another method for generating a first clue image corresponding to an image to be detected based on a spectrum image according to an exemplary embodiment. Figure 4 As shown, step S31 in the embodiment of the present disclosure is Figure 2 The execution method of step S21 in is similar and will not be repeated here.
[0079] In step S32 , brightness difference increasing processing is performed on each image area.
[0080] The brightness difference is the brightness difference between the bright pixel and the remaining pixels in the image area.
[0081] In step S33, the image regions after the brightness difference enhancement process are spliced to obtain a first clue image.
[0082] In the disclosed embodiment, by performing brightness difference enhancement processing on multiple different image regions respectively, the clue image difference between the re-photographed image and the non-re-photographed image can be further widened, so that the accuracy of re-photograph attack detection can be further improved.
[0083] The present disclosure hereinafter provides an example of an implementation method for brightness difference enhancement processing. For ease of description, the present disclosure hereinafter refers to the designated pixel point selected in the first method as the first designated pixel point, and the designated pixel point selected in the second method as the second designated pixel point.
[0084] Method 1: For each image area, a specified number of first designated pixels are selected in descending order of pixel values, and the pixel values of the pixels in the image area other than the first designated pixels are adjusted.
[0085] For example, the specified number can be 20, of course, it can also be other values. The specific value of the above specified number can be set according to actual needs. The embodiments of the present disclosure do not limit the specific value of the above specified number.
[0086] Method 2: For each image area, determine a second designated pixel point whose pixel value is less than the target pixel threshold, and adjust the pixel value of the second designated pixel point.
[0087] In addition, for the above-mentioned method one or method two, the adjustment processing may, for example, include setting the pixel value of the pixel point to a target value (for example, the target value may be 0), or reducing the pixel value of the corresponding pixel point (for method one, the adjusted pixel point is a pixel point other than the first specified pixel point, and for method two, the adjusted pixel point is the second specified pixel point).
[0088] In the above embodiment, the method of increasing the brightness difference of each image region is intended to further increase the clue image difference between the re-photographed image and the non-re-photographed image, so as to further improve the accuracy of re-photograph attack detection.
[0089] Figure 5 FIG. 1 is a schematic diagram showing a clue image obtained by reshooting an image and increasing the brightness difference according to an exemplary embodiment. Figure 5 As shown in the figure, the black areas in the clue image correspond to the pixels that have been adjusted during the brightness difference increase process, and the white areas correspond to the pixels that have not been adjusted during the brightness difference increase process. Generally, for the clue image obtained by the non-reproduced image after the brightness difference increase process, the pixels in the white area of the image have no obvious arrangement pattern, while for the clue image obtained by the reproduced image after the brightness difference increase process, the low pixel points in the white area of the image have a more obvious arrangement pattern (specifically, Figure 5 As shown, the pixels that are not adjusted during the brightness difference amplification process will be concentrated and regularly arranged in the clue image).
[0090] For example, the first clue image can be used to detect the remake attack through a pre-trained object detection model.
[0091] Figure 6 FIG. 1 is a flow chart showing another method for detecting a living body according to an exemplary embodiment. Figure 6 As shown, steps S41 and S43 in the embodiment of the present disclosure are the same as Figure 1The execution methods of steps S11 and S13 are similar and will not be described here in detail.
[0092] In step S42, the image to be detected is converted into the frequency domain to obtain a spectrum image of the image to be detected, a first clue image corresponding to the image to be detected is generated based on the spectrum image, the first clue image is input into the target detection model, the output information of the target detection model is obtained, the copy attack detection result of the image to be detected is obtained based on the output information, and liveness detection is performed on the target object based on the image to be detected to obtain a liveness detection result.
[0093] The object detection model is trained using a second clue image corresponding to the non-reproduced image and a third clue image corresponding to the reproduced image. Furthermore, the reproduced image, for example, includes an image captured from a screen display having a resolution higher than a specified resolution (for example, the specified resolution may be 1280*720).
[0094] For example, the target detection model can be a neural network model with a very deep convolutional network (VGG) structure.
[0095] In the embodiment of the present disclosure, the target detection model is used to determine whether the image to be detected is a remake image based on the spectral characteristics of the clue image. For example, the clue image can be input into the target detection model, and the remake attack detection result can be obtained based on the output information. Among them, the remake detection result can be, for example, a probability value that the image to be detected is a remake image. Of course, it can also be the final judgment result obtained by binary classification based on the probability value. (For example, "the image to be detected is a remake image" or "the image to be detected is not a remake image")
[0096] For example, a target probability value (0.5 in this example) can be used to determine the result of a copy detection. If the target detection model determines that the probability value of the image to be detected is a copy is greater than the target probability value, a "1" is output, indicating that the image to be detected is a copy. If the target detection model determines that the probability value of the image to be detected is less than or equal to the target probability value, a "0" is output, indicating that the image to be detected is not a copy.
[0097] Furthermore, by cropping the background area of the re-photographed image while retaining the facial area of the re-photographed image, interference from the background area in the image on the target detection model training can be reduced, thereby ensuring the training effect of the model. The facial area of the target object in the re-photographed image can be determined, for example, by a face detection algorithm. Furthermore, the facial area determined by the face detection algorithm can be manually adjusted (increasing or reducing the range of the facial area) to obtain a cropped image that only includes the facial area of the target object.
[0098] In addition, in order to further improve the feature learning efficiency of the target detection model, a two-channel position encoding (position encoding) can be configured for the second clue image and the third clue image. Among them, the position encoding is used to identify the position of each pixel in the image. Taking the position encoding [X, Y] as an example, X is used to identify the pixel row, and Y is used to identify the pixel column. Furthermore, the two-channel position encoding of the second clue image (or the third clue image) can be channel-spliced with the single-channel data (i.e., pixel value) of the second clue image (or the third clue image) to obtain a second clue image (or the third clue image) with three-channel data. Furthermore, the target detection model can be trained by the second clue image with three-channel data and the third clue image with three-channel data, and then when the target detection model converges or the number of training steps of the target detection model reaches the specified number of steps, the training is stopped to obtain the target detection model.
[0099] The liveness detection method provided by the embodiment of the present disclosure can determine whether the image to be detected is a re-photographed image through the spectral characteristics of the image to be detected. Compared with the conventional method of detecting re-photographed images through the moiré patterns contained in the image, the image detection method proposed in the present disclosure is universal. It still has a high recognition accuracy for re-photographed images without moiré patterns or with inconspicuous moiré patterns, and can meet the detection requirements for re-photographed images of high-resolution display screens. On this basis, the accuracy of liveness detection can be further improved by combining re-photographed attack detection with liveness detection. This method can achieve accurate detection of attack images such as re-photographed high-resolution display screens.
[0100] In addition, based on the same concept, the present disclosure also provides an image detection method in an embodiment of the present disclosure, which can detect re-photographed images to meet the re-photographed image detection needs of application scenarios such as living body detection and environmental analysis.
[0101] Figure 7 FIG. 1 is a flow chart of an image detection method according to an exemplary embodiment. Figure 7 As shown, the following steps are included.
[0102] In step S51, an image to be detected is acquired.
[0103] In step S52 , the image to be detected is subjected to frequency domain conversion to obtain a spectrum image of the image to be detected, and a first clue image corresponding to the image to be detected is generated based on the spectrum image.
[0104] In step S53 , a copy attack detection is performed on the image to be detected based on the first clue image to obtain a copy attack detection result.
[0105] In one embodiment, the first clue image may be obtained by cropping and splicing a specific region in the first spectrum image.
[0106] Figure 8 FIG. 1 is a flow chart of a method for generating a first clue image corresponding to an image to be detected based on a spectrum image according to an exemplary embodiment. Figure 8 As shown, the following steps are included.
[0107] In step S61, the image area including the target pixel is cut out according to the target rule.
[0108] In the embodiment of the present disclosure, the target pixel points are the intersection points of pixels located at target pixel rows and target pixel columns in the spectrum image, wherein the target pixel rows are arranged at equal intervals, and the target pixel columns are arranged at equal intervals.
[0109] For example, the target pixel can be used as the center point for cropping the image area, or other pixels close to the target pixel can be used as the center point for cropping the image area. In addition, the cropping range can be adjusted according to the actual situation of the spectrum image (for example, a 20*20 pixel range can be used as the cropping range), and this disclosure does not specifically limit this.
[0110] In step S62 , each image region is spliced together to obtain a first clue image.
[0111] In the disclosed embodiment, an image area including a target pixel point is intercepted according to a target rule, and each image area is spliced to obtain a first clue image. This can retain image areas where feature differences are likely to appear between non-reproduced images and reproduced images, thereby improving the accuracy of reproducible attack detection.
[0112] In addition, for example, the pixel rows located at 1 / 8 or an integer multiple of 1 / 8 of the spectrum image can be used as target pixel rows, and the pixel columns located at 1 / 8 or an integer multiple of 1 / 8 of the spectrum image can be used as target pixel columns, and the center pixel rows and center pixel columns can be eliminated from the target pixel rows and target pixel columns. Finally, multiple image areas that are easy to identify the re-shot images can be obtained. The multiple image areas obtained by this method are spliced to obtain the first clue image, which can be used as a preferred way to obtain the first clue image in the present disclosure.
[0113] The remake attack detection method involved in the embodiments of the present disclosure is similar to the remake attack detection method involved in the above-mentioned liveness detection method. If the relevant content in the image detection method involved in the present disclosure is unclear, you can directly refer to any embodiment involved in the liveness detection method.
[0114] Based on the same concept, an embodiment of the present disclosure also provides a living body detection device.
[0115] It is understandable that the image detection device provided by the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.
[0116] Figure 9 FIG. 1 is a block diagram of a living body detection device according to an exemplary embodiment. Figure 9 The device 100 includes an acquiring unit 101, a processing unit 102 and a determining unit 103.
[0117] An acquisition unit 101 is configured to acquire an image to be detected. The image to be detected includes the facial region of the target object. A processing unit 102 is configured to perform frequency domain conversion on the image to be detected to obtain a spectrum image of the image to be detected, generate a first clue image corresponding to the image to be detected based on the spectrum image, perform a cloning attack detection on the image to be detected based on the first clue image, and obtain a cloning attack detection result. Furthermore, a determination unit 103 is configured to determine whether the target object is alive based on the liveness detection result and the cloning attack detection result.
[0118] In one embodiment, the processing unit 102 generates a first clue image corresponding to the image to be detected based on the spectrum image by intercepting an image region containing target pixels according to a target rule. The target pixels are pixels located in target pixel rows and target pixel columns in the spectrum image, with the target pixel rows and target pixel columns being evenly spaced. The image regions are then spliced together to generate the first clue image.
[0119] In one embodiment, the target pixel rows are pixel rows other than the central pixel row of the spectrum image, and the target pixel columns are pixel columns other than the central pixel column of the spectrum image.
[0120] In one embodiment, the target pixel row is located at a position corresponding to 1 / 8 or an integer multiple of 1 / 8 of the spectrum image, and the target pixel column is located at a position corresponding to 1 / 8 or an integer multiple of 1 / 8 of the spectrum image.
[0121] In one embodiment, the processing unit 102 is further configured to perform brightness difference increasing processing on each image region, wherein the brightness difference is the brightness difference between the bright spot pixel and the remaining pixels in the image region.
[0122] In one embodiment, the processing unit 102 performs brightness difference enhancement processing on each image region in the following manner: for each image region, a specified number of first designated pixels are selected in descending order of pixel value, and the pixel values of the pixels in the image region other than the first designated pixels are adjusted. The adjustment process includes setting the pixel value of the pixel to a target value or reducing the pixel value of the pixel. Alternatively, for each image region, a second designated pixel whose pixel value is less than a target pixel threshold is determined, and the pixel value of the second designated pixel is adjusted. The adjustment process includes setting the pixel value of the pixel to a target value or reducing the pixel value of the pixel.
[0123] Based on the same concept, the present disclosure also proposes an image detection device.
[0124] Figure 10 FIG. 1 is a block diagram of an image detection device according to an exemplary embodiment. Figure 10 The device 200 includes an acquisition unit 201 and a processing unit 202.
[0125] The acquisition unit 201 is configured to acquire an image to be detected. The processing unit 202 performs frequency domain conversion on the image to obtain a spectrum image of the image to be detected. Based on the spectrum image, a first clue image corresponding to the image to be detected is generated. The image to be detected is then subjected to a photocopy attack detection based on the first clue image to obtain a photocopy attack detection result.
[0126] In one embodiment, the processing unit 202 generates a first clue image corresponding to the image to be detected based on the spectrum image by intercepting an image region containing target pixels according to a target rule. The target pixels are pixels located in target pixel rows and target pixel columns in the spectrum image, with the target pixel rows and target pixel columns being evenly spaced. The image regions are then spliced together to generate the first clue image.
[0127] In one embodiment, the target pixel rows are pixel rows other than the central pixel row of the spectrum image, and the target pixel columns are pixel columns other than the central pixel column of the spectrum image.
[0128] In one embodiment, the target pixel row is located at a position corresponding to 1 / 8 or an integer multiple of 1 / 8 of the spectrum image, and the target pixel column is located at a position corresponding to 1 / 8 or an integer multiple of 1 / 8 of the spectrum image.
[0129] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0130] Figure 11 is a block diagram of an electronic device 300 for image detection or living body detection according to an exemplary embodiment.
[0131] like Figure 11 As shown, one embodiment of the present disclosure provides an electronic device 300. The electronic device 300 includes a memory 301, a processor 302, and an input / output (I / O) interface 303. The memory 301 is used to store instructions. The processor 302 is used to call the instructions stored in the memory 301 to execute the image detection or liveness detection method of the embodiment of the present disclosure. The processor 302 is connected to the memory 301 and the I / O interface 303 respectively, for example, through a bus system and / or other forms of connection mechanisms (not shown). The memory 301 can be used to store programs and data, including the programs of the image detection or liveness detection methods involved in the embodiments of the present disclosure, and the processor 302 executes various functional applications and data processing of the electronic device 300 by running the programs stored in the memory 301.
[0132] In the embodiment of the present disclosure, the processor 302 can be implemented in at least one hardware form of a digital signal processor (DSP), a field programmable gate array (FPGA), or a programmable logic array (PLA). The processor 302 can be a central processing unit (CPU) or one or a combination of other forms of processing units with data processing capabilities and / or instruction execution capabilities.
[0133] The memory 301 in the embodiment of the present disclosure may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0134] In the embodiment of the present disclosure, the I / O interface 303 may be used to receive input commands (e.g., digital or character information, and to generate key signal input related to user settings and function control of the electronic device 300), and may also output various information (e.g., images or sounds) to the outside. In the embodiment of the present disclosure, the I / O interface 303 may include one or more of a physical keyboard, function keys (e.g., volume control keys, power keys, etc.), a mouse, a joystick, a trackball, a microphone, a speaker, and a touch panel.
[0135] In some embodiments, the present disclosure provides a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are executed by a processor, any of the methods described above is performed.
[0136] In some embodiments, the present disclosure provides a computer program product, which includes a computer program. When the computer program is executed by a processor, any of the methods described above is performed.
[0137] Although operations are described in a particular order in the drawings, this should not be understood as requiring that the operations be performed in the particular order shown or in serial order, or that all shown operations be performed to obtain the desired results. In certain circumstances, multitasking and parallel processing may be advantageous.
[0138] The methods and apparatus of the present disclosure can be implemented using standard programming techniques, utilizing rule-based logic or other logic to implement the various method steps. It should also be noted that the terms "apparatus" and "module" as used herein and in the claims are intended to include implementations using one or more lines of software code and / or hardware implementations and / or devices for receiving input.
[0139] Any steps, operations or procedures described herein may be performed or implemented using one or more hardware or software modules, either alone or in combination with other devices. In one embodiment, the software modules are implemented using a computer program product comprising a computer-readable medium containing computer program code, which can be executed by a computer processor to perform any or all of the steps, operations or procedures described.
[0140] The foregoing description of embodiments of the present disclosure has been provided for purposes of illustration and description. The foregoing description is not intended to be exhaustive or to limit the disclosure to the precise form disclosed, and various variations and modifications are possible in light of the foregoing teachings or from practice of the disclosure. These embodiments have been chosen and described to illustrate the principles of the disclosure and its practical application, so as to enable those skilled in the art to utilize the disclosure in various embodiments and with various modifications as appropriate for the particular use contemplated.
[0141] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0142] It is understood that in this disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "And / or" describes the association relationship of related objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise.
[0143] It will be further understood that the terms "first," "second," and the like are used to describe various types of information, but such information should not be limited to these terms. These terms are used solely to distinguish information of the same type from one another and do not indicate a particular order or level of importance. In fact, the terms "first," "second," and the like are fully interchangeable. For example, first information could be referred to as second information, and similarly, second information could be referred to as first information without departing from the scope of this disclosure.
[0144] It is further understood that, unless otherwise specified, “connection” includes a direct connection where there are no other components between the two elements, and also includes an indirect connection where there are other elements between the two elements.
[0145] It is further understood that although operations are described in a particular order in the drawings in the embodiments of the present disclosure, this should not be construed as requiring that the operations be performed in the particular order shown or in a serial order, or that all of the operations shown be performed to obtain the desired results. In certain circumstances, multitasking and parallel processing may be advantageous.
[0146] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered merely as exemplary, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0147] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the scope of the appended claims.
Claims
1. A method for detecting a living body, characterized in that: The living body detection method comprises: Acquire an image to be detected; wherein the image to be detected includes a facial area of a target object; performing frequency domain conversion on the image to be detected to obtain a spectrum image of the image to be detected, generating a first clue image corresponding to the image to be detected based on the spectrum image, performing a photocopy attack detection on the image to be detected based on the first clue image to obtain a photocopy attack detection result; and performing liveness detection on the target object based on the image to be detected to obtain a liveness detection result. Determining whether the target object is alive based on the liveness detection result and the copy attack detection result; The step of generating a first clue image corresponding to the image to be detected based on the spectrum image includes: Cutting off an image region including target pixel points according to a target rule; wherein the target pixel points are pixel intersections located at target pixel rows and target pixel columns in the spectrum image, the target pixel rows are arranged at equal intervals, and the target pixel columns are arranged at equal intervals; The image regions are spliced together to obtain the first clue image.
2. The living body detection method according to claim 1, characterized in that The target pixel rows are pixel rows other than the central pixel row of the spectrum image, and the target pixel columns are pixel columns other than the central pixel column of the spectrum image.
3. The living body detection method according to claim 1, characterized in that: The target pixel row is located at a position corresponding to 1 / 8 or an integral multiple of 1 / 8 of the spectrum image, and the target pixel column is located at a position corresponding to 1 / 8 or an integral multiple of 1 / 8 of the spectrum image.
4. The liveness detection method according to any one of claims 1 to 3, characterized in that: The method further comprises: A brightness difference increasing process is performed on each of the image regions, wherein the brightness difference is a brightness difference between a bright spot pixel and other pixels in the image region.
5. The method for liveness detection according to claim 4, wherein: The performing brightness difference increasing processing on each of the image regions includes: For each of the image regions, selecting a specified number of first designated pixels in descending order of pixel value, and performing pixel value adjustment processing on the pixel values of the pixels in the image region other than the first designated pixels; wherein the adjustment processing includes setting the pixel values of the pixel points to target values or reducing the pixel values of the pixel points; or, For each of the image areas, a second designated pixel point whose pixel value is less than the target pixel threshold is determined, and the pixel value of the second designated pixel point is adjusted; wherein the adjustment processing includes setting the pixel value of the pixel point to the target value or reducing the pixel value of the pixel point.
6. The living body detection method according to any one of claims 1 to 3, characterized in that: The performing the copy attack detection on the image to be detected based on the first clue image to obtain the copy attack detection result includes: The first clue image is input into the target detection model, the output information of the target detection model is obtained, and the copy attack detection result of the image to be detected is obtained based on the output information; wherein, the target detection model is trained based on the second clue image corresponding to the non-copy image and the third clue image corresponding to the copy image.
7. The living body detection method according to claim 6, characterized in that: The recaptured image is an image obtained by photographing a picture displayed on a screen having a resolution higher than a specified resolution.
8. An image detection method, characterized in that: include: Obtain the image to be detected; Performing frequency domain conversion on the image to be detected to obtain a spectrum image of the image to be detected, and generating a first clue image corresponding to the image to be detected based on the spectrum image; Performing a copy attack detection on the image to be detected based on the first clue image to obtain a copy attack detection result; The step of generating a first clue image corresponding to the image to be detected based on the spectrum image includes: Cutting off an image region including target pixel points according to a target rule; wherein the target pixel points are pixel points located in each target pixel row and each target pixel column in the spectrum image, the target pixel rows are arranged at equal intervals, and the target pixel columns are arranged at equal intervals; The image regions are spliced together to obtain the first clue image.
9. The image detection method according to claim 8, characterized in that: The target pixel rows are pixel rows other than the central pixel row of the spectrum image, and the target pixel columns are pixel columns other than the central pixel column of the spectrum image.
10. The image detection method according to claim 8 or 9, characterized in that: The target pixel row is located at a position corresponding to 1 / 8 or an integral multiple of 1 / 8 of the spectrum image, and the target pixel column is located at a position corresponding to 1 / 8 or an integral multiple of 1 / 8 of the spectrum image.
11. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to: execute the living body detection method according to any one of claims 1 to 7, or execute the image detection method according to any one of claims 8 to 10.
12. A storage medium, characterized in that: The storage medium stores instructions. When the instructions in the storage medium are executed by the processor, the processor is enabled to execute the liveness detection method described in any one of claims 1 to 7, or execute the image detection method described in any one of claims 8 to 10.
13. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the liveness detection method according to any one of claims 1 to 7, or executes the image detection method according to any one of claims 8 to 10.
Citation Information
Patent Citations
Living body detection method and device, electronic equipment and storage medium
CN112507934A
Image processing method and device, computer equipment and storage medium
CN112801057A