CN114913574A - Image detection method, living body detection method, electronic device, medium, and product - Google Patents
Image detection method, living body detection method, electronic device, medium, and product Download PDFInfo
- Publication number
- CN114913574A CN114913574A CN202210434344.8A CN202210434344A CN114913574A CN 114913574 A CN114913574 A CN 114913574A CN 202210434344 A CN202210434344 A CN 202210434344A CN 114913574 A CN114913574 A CN 114913574A
- Authority
- CN
- China
- Prior art keywords
- image
- pixel
- target
- detected
- living body
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 221
- 238000001228 spectrum Methods 0.000 claims abstract description 90
- 238000006243 chemical reaction Methods 0.000 claims abstract description 16
- 238000001727 in vivo Methods 0.000 claims abstract 6
- 238000000034 method Methods 0.000 claims description 66
- 230000003595 spectral effect Effects 0.000 claims description 41
- 238000012545 processing Methods 0.000 claims description 34
- 238000004590 computer program Methods 0.000 claims description 10
- 238000001574 biopsy Methods 0.000 claims description 7
- 238000012549 training Methods 0.000 claims description 6
- 238000003860 storage Methods 0.000 claims description 5
- 238000005516 engineering process Methods 0.000 description 12
- 238000010586 diagram Methods 0.000 description 10
- 238000013473 artificial intelligence Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000004091 panning Methods 0.000 description 4
- 238000012795 verification Methods 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 238000003891 environmental analysis Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000003796 beauty Effects 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000004397 blinking Effects 0.000 description 1
- 238000009529 body temperature measurement Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/25—Determination of region of interest [ROI] or a volume of interest [VOI]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/40—Spoof detection, e.g. liveness detection
- G06V40/45—Detection of the body part being alive
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The present disclosure relates to an image detection method, a living body detection method, an electronic device, a medium, and a product. The in vivo detection method comprises the following steps: acquiring an image to be detected; wherein the image to be detected comprises a face area of a target object; performing frequency domain conversion on the image to be detected to obtain a frequency spectrum image of the image to be detected, generating a first line image corresponding to the image to be detected based on the frequency spectrum image, and performing copying attack detection on the image to be detected based on the first line image to obtain a copying attack detection result; performing living body detection on the target object based on the image to be detected to obtain a living body detection result; and determining whether the target object is a living body or not based on the living body detection result and the copying attack detection result. The living body detection precision can be improved through the living body detection method and the living body detection device.
Description
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to an image detection method, a living body detection method, an electronic device, a medium, and a product.
Background
With the development of computer technology, an image detection technology appears, and the image detection technology is used as an efficient and convenient verification mode and is widely applied to various fields. In the related art, for example, in application scenes such as living body detection and environmental analysis, it is generally necessary to determine whether or not a detected image is a captured image. The reproduced image is an image obtained by reproducing the acquired image. For example, a screen displayed on a display screen is copied by a mobile phone to obtain an image.
In the related art, a copied image obtained by copying the display screen can be effectively detected in a mode of identifying moire fringes. However, as a rule, only the display screen with lower resolution will have a relatively obvious moire pattern in the reproduced image. Therefore, in the related art, a copied image obtained by copying the high-resolution display screen (the copied image has no moire, or the moire of the copied image is not obvious) cannot be effectively detected.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides an image detection method, a biopsy method, an electronic device, a medium, and a product.
According to a first aspect of embodiments of the present disclosure, there is provided a method of living body detection, including:
acquiring an image to be detected; wherein the image to be detected comprises a face area of a target object; performing frequency domain conversion on the image to be detected to obtain a frequency spectrum image of the image to be detected, generating a first line image corresponding to the image to be detected based on the frequency spectrum image, and performing copying attack detection on the image to be detected based on the first line image to obtain a copying attack detection result; performing living body detection on the target object based on the image to be detected to obtain a living body detection result; and determining whether the target object is a living body or not based on the living body detection result and the copying attack detection result.
In one embodiment, the generating a first cable image corresponding to the image to be detected based on the spectrum image includes: intercepting an image area containing a target pixel point according to a target rule; the target pixel points are pixel points which are positioned in each target pixel row and each target pixel column in the frequency spectrum image, each target pixel row is arranged at equal intervals, and each target pixel column is arranged at equal intervals; and splicing the image areas to obtain the first cable image.
In one embodiment, the target pixel rows are pixel rows other than a center pixel row of the spectral image, and the target pixel columns are pixel columns other than a center pixel column of the spectral image.
In one embodiment, the target pixel row is located at a position corresponding to an integer multiple of 1/8 or 1/8 of the spectrum image, and the target pixel column is located at a position corresponding to an integer multiple of 1/8 or 1/8 of the spectrum image.
In one embodiment, the method further comprises: and performing brightness difference increasing processing on each image area, wherein the brightness difference is the brightness difference between the bright point pixel and the rest pixels in the image area.
In one embodiment, the performing the brightness difference increasing process on each of the image areas includes: aiming at each image area, selecting a specified number of first specified pixel points according to the sequence of pixel values from large to small, and adjusting the pixel values of the pixel points in the image area except the first specified pixel points; the adjustment processing comprises setting the pixel value of the pixel point to be a target value or reducing the pixel value of the pixel point; or, for each image area, determining a second designated pixel point with a pixel value smaller than a target pixel threshold value, and adjusting the pixel value of the second designated pixel point; and adjusting the pixel value of the pixel point to be a target value or to be reduced.
According to a second aspect of the embodiments of the present disclosure, there is provided an image detection method including:
acquiring an image to be detected; performing frequency domain conversion on the image to be detected to obtain a frequency spectrum image of the image to be detected, and generating a first cable image corresponding to the image to be detected based on the frequency spectrum image; and carrying out copying attack detection on the image to be detected based on the first line image to obtain a copying attack detection result.
In one embodiment, the generating a first cable image corresponding to the image to be detected based on the spectrum image includes: intercepting an image area containing a target pixel point according to a target rule; the target pixel points are pixel points which are positioned in each target pixel row and each target pixel column in the frequency spectrum image, each target pixel row is arranged at equal intervals, and each target pixel column is arranged at equal intervals; and splicing the image areas to obtain the first cable image.
In one embodiment, the target pixel row is a pixel row except for a central pixel row of the spectral image, and the target pixel column is a pixel column except for a central pixel column of the spectral image.
In one embodiment, the target pixel row is located at a position corresponding to an integer multiple of 1/8 or 1/8 of the spectral image, and the target pixel column is located at a position corresponding to an integer multiple of 1/8 or 1/8 of the spectral image.
According to a third aspect of embodiments of the present disclosure, there is provided a living body detection apparatus including:
the acquisition unit is used for acquiring an image to be detected; wherein the image to be detected comprises a face area of a target object; the processing unit is used for carrying out frequency domain conversion on the image to be detected to obtain a frequency spectrum image of the image to be detected, generating a first line image corresponding to the image to be detected based on the frequency spectrum image, and carrying out copying attack detection on the image to be detected based on the first line image to obtain a copying attack detection result; the living body detection device is used for carrying out living body detection on the target object based on the image to be detected to obtain a living body detection result; a determination unit configured to determine whether the target object is a living body based on the living body detection result and the panning attack detection result.
In one embodiment, the processing unit generates a first cable image corresponding to the image to be detected, based on the spectral image: intercepting an image area containing a target pixel point according to a target rule; the target pixel points are pixel points which are positioned in each target pixel row and each target pixel column in the frequency spectrum image, each target pixel row is distributed at equal intervals, and each target pixel column is distributed at equal intervals; and splicing the image areas to obtain the first cable image.
In one embodiment, the target pixel rows are pixel rows other than a center pixel row of the spectral image, and the target pixel columns are pixel columns other than a center pixel column of the spectral image.
In one embodiment, the target pixel row is located at a position corresponding to an integer multiple of 1/8 or 1/8 of the spectral image, and the target pixel column is located at a position corresponding to an integer multiple of 1/8 or 1/8 of the spectral image.
In one embodiment, the processing unit is further configured to: and performing brightness difference increasing processing on each image area, wherein the brightness difference is the brightness difference between the bright point pixel and the rest pixels in the image area.
In one embodiment, the processing unit performs the luminance difference increasing process on each of the image areas as follows: aiming at each image area, selecting a specified number of first specified pixel points according to the sequence of pixel values from large to small, and adjusting the pixel values of the pixel points in the image area except the first specified pixel points; the adjustment processing comprises setting the pixel value of the pixel point to be a target value or reducing the pixel value of the pixel point; or, for each image area, determining a second designated pixel point with a pixel value smaller than a target pixel threshold value, and adjusting the pixel value of the second designated pixel point; and adjusting the pixel value of the pixel point to be a target value or to be reduced.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an image detection apparatus including:
the acquisition unit is used for acquiring an image to be detected; the processing unit is used for carrying out frequency domain conversion on the image to be detected to obtain a frequency spectrum image of the image to be detected and generating a first cable image corresponding to the image to be detected based on the frequency spectrum image; and the detection module is used for carrying out copying attack detection on the image to be detected based on the first line image to obtain a copying attack detection result.
In one embodiment, the processing unit generates a first cable image corresponding to the image to be detected based on the spectral image in the following manner: intercepting an image area containing a target pixel point according to a target rule; the target pixel points are pixel points which are positioned in each target pixel row and each target pixel column in the frequency spectrum image, each target pixel row is arranged at equal intervals, and each target pixel column is arranged at equal intervals; and splicing the image areas to obtain the first cable image.
In one embodiment, the target pixel rows are pixel rows other than a center pixel row of the spectral image, and the target pixel columns are pixel columns other than a center pixel column of the spectral image.
In one embodiment, the target pixel row is located at a position corresponding to an integer multiple of 1/8 or 1/8 of the spectrum image, and the target pixel column is located at a position corresponding to an integer multiple of 1/8 or 1/8 of the spectrum image.
According to a fifth aspect of the embodiments of the present disclosure, there is provided an electronic device including:
a processor; a memory for storing processor-executable instructions;
wherein the processor is configured to: the method of detecting a living body according to the first aspect or any one of the embodiments of the first aspect, or the method of detecting an image according to the second aspect or any one of the embodiments of the second aspect is performed.
According to a sixth aspect of the embodiments of the present disclosure, there is provided a storage medium having stored therein instructions, which when executed by a processor, enable the processor to execute the living body 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.
According to a seventh aspect of embodiments of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the living body detection method of the first aspect or any one of the embodiments of the first aspect, or implements the image detection method of the second aspect or any one of the embodiments of the second aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the frequency domain conversion can be carried out on the image to be detected to obtain a frequency spectrum image of the image to be detected, and a first cable image corresponding to the image to be detected is generated through the frequency spectrum image. Furthermore, the image to be detected can be subjected to copying attack detection through the first clue image to obtain a copying attack detection result, and the target object can be subjected to living body detection through the image to be detected to obtain a living body detection result. On the basis, whether the target object is a living body can be determined through a living body detection result and a copying attack detection result, the copying attack detection is used as a supplementary detection of the living body detection, and the accuracy of the living body detection result can be further improved. In addition, because the method carries out the copying attack detection through the clue image generated by the spectrogram of the image to be detected, the related copying attack detection process has universality, the accurate identification of the copied image (namely, the copied image without or without obvious moire fringes) obtained by copying the display picture of the high-resolution screen can be realized, the copying attack detection in the high-resolution screen copying scene is realized, and the living body detection precision is further improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
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 disclosure.
FIG. 1 is a flow chart illustrating a method of active detection according to an exemplary embodiment.
FIG. 2 is a flowchart illustrating a method for generating a first image of a line corresponding to an image to be detected based on spectral images, according to an exemplary embodiment.
Fig. 3 is a diagram illustrating a target pixel point in a spectrum image according to an exemplary embodiment.
Fig. 4 is a flow chart illustrating another method for generating a first cable image corresponding to an image to be detected based on a spectral image according to an exemplary embodiment.
Fig. 5 is a diagram illustrating a cue image after a brightness difference increasing process by copying the image according to an exemplary embodiment.
FIG. 6 is a flow chart illustrating another liveness detection method according to an exemplary embodiment.
FIG. 7 is a flow chart illustrating a method of image detection according to an exemplary embodiment.
Fig. 8 is a flowchart illustrating a method for generating a first cable image corresponding to an image to be detected based on a spectrum image according to an exemplary embodiment.
FIG. 9 is a block diagram illustrating an active detection apparatus according to an exemplary embodiment.
Fig. 10 is a block diagram illustrating an image sensing device according to an exemplary embodiment.
FIG. 11 is a block diagram illustrating an electronic device for image detection or liveness detection in accordance with an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure.
In the drawings, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The described embodiments are a subset of the disclosed embodiments and not all embodiments. The embodiments described below with reference to the drawings are exemplary and intended to be illustrative of the present disclosure, and should not be construed as limiting the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure. Embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
In recent years, technical research based on artificial intelligence, such as computer vision, deep learning, machine learning, image processing, and image recognition, has been actively developed. Artificial Intelligence (AI) is an emerging scientific technology for studying and developing theories, methods, techniques and application systems for simulating and extending human Intelligence. The artificial intelligence subject is a comprehensive subject and relates to various technical categories such as chips, big data, cloud computing, internet of things, distributed storage, deep learning, machine learning and neural networks. Computer vision is used as an important branch of artificial intelligence, particularly a machine is used for identifying the world, and the computer vision technology generally comprises the technologies of face identification, image detection, fingerprint identification and anti-counterfeiting verification, biological feature identification, face detection, pedestrian detection, target detection, pedestrian identification, image processing, image identification, image semantic understanding, image retrieval, character identification, video processing, video content identification, behavior identification, three-dimensional reconstruction, virtual reality, augmented reality, synchronous positioning and map construction (SLAM), computational photography, robot navigation and positioning and the like. With the research and progress of artificial intelligence technology, the technology is applied to various fields, such as security, city management, traffic management, building management, park management, face passage, face attendance, logistics management, warehouse management, robots, intelligent marketing, computational photography, mobile phone images, cloud services, smart homes, wearable equipment, unmanned driving, automatic driving, smart medical treatment, face payment, face unlocking, fingerprint unlocking, testimony verification, smart screens, smart televisions, cameras, mobile internet, live webcasts, beauty treatment, medical beauty treatment, intelligent temperature measurement and the like.
The living body detection method provided by the embodiment of the disclosure can be applied to a scene for carrying out living body detection by judging whether the image is a copied image.
With the development of computer technology, an image detection technology appears, and the image detection technology is used as an efficient and convenient verification mode and is widely applied to various fields. In the related art, for example, in application scenarios such as biopsy and environmental analysis, it is generally necessary to determine whether a detected image is a copied image. The reproduced image refers to an image obtained by re-collecting the collected image. For example, a screen displayed on a display screen is copied by a mobile phone to obtain an image.
In the related art, a copied image obtained by copying the display screen can be effectively detected in a mode of identifying moire fringes. However, since the image is usually moire-prone only in the lower resolution display (the resolution is less than or equal to 1280 × 720). Therefore, in the related art, a copied image (the copied image has no moire or the moire of the copied image is not obvious) obtained by copying a high-resolution display screen (for example, a display screen with a resolution higher than 1280 × 720, for example, a 4K display screen) cannot be effectively detected, which also makes the living body detection scheme applying the related art for copying detection unable to realize relatively accurate identification of the copied image.
In view of this, the present disclosure provides a living body detection method, which may perform frequency domain conversion on an image to be detected to obtain a spectrum image of the image to be detected, and generate a cue image corresponding to the image to be detected through the spectrum image. Furthermore, the image to be detected can be subjected to copying attack detection through the clue image to obtain a copying attack detection result, and the image to be detected is subjected to living body detection on the target object to obtain a living body detection result. On the basis, whether the target object is a living body can be determined according to the living body detection result and the copying attack detection result, the copying attack detection is used as the supplementary detection of the living body detection, and the accuracy of the living body detection result can be further improved. In addition, because the method carries out the copying attack detection through the clue image generated by the spectrogram of the image to be detected, the related copying attack detection process has universality, the accurate identification of the copied image (namely, the copied image without or without obvious moire fringes) obtained by copying the display picture of the high-resolution screen can be realized, the copying attack detection in the high-resolution screen copying scene is realized, and the living body detection precision is further improved. For convenience of description, the cue image obtained from the spectrum image will be referred to as a first cue image.
FIG. 1 is a flow chart illustrating a method of active detection, as shown in FIG. 1, according to an exemplary embodiment, including the following steps.
In step S11, an image to be detected is acquired.
The image to be detected comprises a face area of the target object.
In step S12, the image to be detected is subjected to frequency domain conversion to obtain a spectral image of the image to be detected, a first cable image corresponding to the image to be detected is generated based on the spectral image, a reproduction attack detection is performed on the image to be detected based on the first cable image to obtain a reproduction attack detection result, and a live body detection is performed on the target object based on the image to be detected to obtain a live body detection result.
In the embodiment of the disclosure, the image to be detected is a three-channel image in a three-primary-color (Red Green Blue, RGB) color space format, and a frequency 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 image to be detected may be frequency-domain transformed by fast Fourier transform (fft) algorithm.
In step S13, it is determined whether the target object is a living body based on the living body detection result and the panning attack detection result.
For example, regarding the living body detection result and the copying attack detection result, whether the target object is a living body may be determined in a manner of "taking an intersection". For example, if the living body detection result is that the image to be detected is a living body image, and the detection result of the copying attack is that the image to be detected is a non-copying image, the target object is determined to be a living body. And if the living body detection result is that the image to be detected is a non-living body image or the copying attack detection result is that the image to be detected is a copying image, judging that the target object is a non-living body.
The biopsy method according to the present disclosure may be, for example, a motion biopsy (e.g., blinking, opening a mouth, etc.), a dazzle color biopsy, a lip language biopsy, etc., which is not specifically limited by the present disclosure. In some embodiments, for the living body detection and the detection of the copying attack, the detection may be performed in one of the detection modes, and the other detection mode is further performed if the detection is passed. For example, the live body detection may be performed by passing through the image to be detected, and the first line image may be subjected to the detection of the copying attack if the live body detection passes through. For another example, the live body detection may be performed by first performing the detection of the copying attack by the first cue image and then performing the detection of the living body by the to-be-detected image when the detection of the copying attack passes. Of course, the live body detection and the detection of the copying attack may be performed simultaneously.
Generally, for a certain designated image and a copied image obtained by screen-copying the designated image, after spectrum conversion is performed on the two images to obtain spectrum images, a relatively obvious pixel arrangement difference exists for a specific region in the spectrum images. In one embodiment of the present disclosure, the first cable image may be obtained by cutting and stitching the specific region.
Fig. 2 is a flowchart illustrating a method for generating a first cable image corresponding to an image to be detected based on a spectrum image, as shown in fig. 2, including the following steps, according to an exemplary embodiment.
In step S21, the image region including the target pixel point is cut out according to the target rule.
In the embodiment of the present disclosure, the target pixel point is a pixel intersection point located in each target pixel row and each target pixel column in the frequency spectrum image. The target pixel rows are arranged at equal intervals, and the target pixel columns are arranged at equal intervals.
For example, the image region may be intercepted by using the target pixel point as an interception center point, or the image region may be intercepted by using other pixel points close to the target pixel point as interception center points. In addition, the clipping range may be adjusted according to the actual situation of the spectrum image (for example, a pixel range of 20 × 20 may be used as the clipping range), which is not specifically limited by the present disclosure.
In step S22, the image regions are stitched together to obtain a first cable image.
In the embodiment of the disclosure, image regions including target pixel points are intercepted according to a target rule, and the image regions are spliced to obtain a first cable image, so as to exclude image regions which are not beneficial to detection of a copying attack in a frequency spectrum image. The image area in which the characteristic difference is easy to occur between the non-reproduction image and the reproduction image is reserved, and the reproduction attack detection precision can be further improved. As follows, referring to fig. 3, an exemplary description is given of a target pixel point selected in a spectral image.
Fig. 3 is a diagram illustrating a target pixel point in a spectrum image according to an exemplary embodiment. For example, as shown in fig. 3, the target pixel row may include, for example, a pixel row X1, a pixel row X2, a pixel row X3, a pixel row X4, a pixel row X5, a pixel row X6, and a pixel row X7, and the target pixel column may include, for example, a pixel column Y1, a pixel column Y2, a pixel column Y3, a pixel column Y4, a pixel column Y5, a pixel column Y6, and a pixel column Y7. The target pixel point to be selected may be, for example, each pixel intersection point marked by a square or a circle in fig. 3, and specifically includes pixel points [ X, Y ], [ X, Y ], [ X, Y ], [ X, Y ], [ Y ], [ Y ], Y, [ X6, Y2], [ X6, Y3], [ X6, Y5], [ X6, Y6], [ X6, Y7], [ X7, Y1], [ X7, Y2], [ X7, Y3], [ X7, Y5], [ X7, Y6] and [ X7, Y7 ].
For example, by comparing the spectrum image of the non-copy image with the spectrum image of the copy image, it is found that pixel points near a central pixel row (a pixel row to which a central pixel point of the spectrum image belongs) and a central pixel column (a pixel column to which a central pixel point of the spectrum image belongs) generally do not have a relatively obvious pixel value arrangement difference. In one embodiment, pixel rows except for a central pixel row of the spectrum image among the pixel rows arranged at equal intervals may be taken as the target pixel row, and pixel columns except for a central pixel column of the spectrum image among the pixel rows arranged at equal intervals may be taken as the target pixel column.
Taking fig. 3 as an example, the central pixel row is a pixel row X, the central pixel row is a pixel column Y, and the target pixel point may be each pixel point marked by a square in fig. 3, specifically including pixel points [ X, Y ], [ Y ], Y ], Y ], Y ], and Y, and [ X7, Y5], [ X7, Y6] and [ X7, Y7] are determined as target pixel points. After the pixel points belonging to the central pixel row or the central pixel column are eliminated, the obtained first line image can better reflect the difference between the copied image and the non-copied image, and the detection effect of the copying attack can be further improved.
In addition, in the actual detection process of the flipping attack, when the target pixel row and the target pixel column are respectively located at positions corresponding to 1/8 or integral multiple of 1/8 (specifically including 2/8, 3/8, 4/8, 5/8, 6/8, and 7/8) of the spectrum image, the selected target pixel point falls into an image area which is easy to identify the flipped image in the spectrum image. Here, as shown in fig. 3, a pixel row at the position 1/8 of the spectrum image is a pixel row X1, a pixel row at the position 2/8 of the spectrum image is a pixel row X2, and a pixel row at the position 3/8 of the spectrum image is a pixel row X3. In addition, correspondingly, the pixel row X4 to the pixel row X7 are respectively a pixel row located at 4/8 position of the spectrum image to a pixel row located at 7/8 position of the spectrum image, and the details of the disclosure are not repeated herein. The spectral image is divided into 8 image regions of equal size by dividing the spectral image into regions by target pixel rows. 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, the pixel row Y4 to the pixel row Y7 are respectively a pixel row located at 4/8 position of the spectrum image to a pixel row located at 7/8 position of the spectrum image, and the details of the disclosure are not repeated herein. The spectral image is divided into 8 image regions of equal size by dividing the spectral image into columns of target pixels. On the basis, the pixel rows at integer multiples of 1/8 or 1/8 of the spectrum image are taken as target pixel rows, the pixel columns at integer multiples of 1/8 or 1/8 of the spectrum image are taken as target pixel columns, the central pixel rows (the pixel rows at 4/8 of the spectrum image) and the central pixel columns (the pixel columns at 4/8 of the spectrum image) are removed from the target pixel rows and the target pixel columns, finally, a plurality of image areas which are easy to identify the double-shot image can be obtained, and the plurality of image areas obtained by the method are spliced to obtain a first line image which can serve as a preferred mode for obtaining the first line image in the present disclosure.
For example, in the process of stitching a plurality of image regions, the stitched position of each image region is consistent with the original position of each image region in the spectral image. For example, as shown in fig. 3, for an image area obtained by using the pixel point [ X1, Y1] as the center point, the image area corresponding to the pixel point is still located at the upper left position in the stitched image, and for an image area obtained by using the pixel point [ X7, Y7] as the center point, the image area corresponding to the pixel point is still located at the lower right position in the stitched image.
By the image detection method provided by the embodiment of the disclosure, the image area which is beneficial to identifying the copied image can be screened out from the frequency spectrum image. Furthermore, the designated image area is cut and spliced, and the spliced first cable image is subjected to copying attack detection, so that a relatively accurate copying attack detection result can be obtained.
In general, although there is a difference in spectral arrangement between a cue image obtained from a non-reproduced image and a cue image obtained from a reproduced image, the difference is not significant. If the first cable image is directly subjected to copying attack detection, the detection precision is limited. In view of this, in the embodiments of the present disclosure, the brightness difference increasing process may be performed on each image area, where the brightness difference is a brightness difference between the bright point pixel and the remaining pixels in the image area. The difference in pixel value between the copied image and the non-copied image can be highlighted by the luminance difference increasing process. For the spectrum image, the pixel value of the pixel can represent the brightness of the pixel, and the pixel is brighter as the pixel value is higher. An embodiment of performing the luminance difference increasing process by the image area will be exemplarily described below.
Specifically, the process of performing the brightness difference increasing process on the image regions may be performed before the image regions are spliced to generate the first cable image, or may be performed after the image regions are spliced to generate the first cable image; the embodiment of the present disclosure does not limit the specific execution time of the above-described luminance difference increasing process.
Fig. 4 is a flowchart illustrating another method for generating a first line image corresponding to an image to be detected based on a spectrum image according to an exemplary embodiment, and as shown in fig. 4, step S31 in the embodiment of the present disclosure is similar to the execution method of step S21 in fig. 2, and is not repeated here.
In step S32, the brightness difference increasing process is performed for each image area.
Wherein, the brightness difference is the brightness difference between the bright pixel and the rest pixels in the image area.
In step S33, the image regions after the brightness difference increasing process are stitched together to obtain a first cable image.
In the embodiment of the present disclosure, the cue image difference between the copied image and the non-copied image can be further enlarged by respectively performing the brightness difference increasing processing on the plurality of different image areas, so that the copying attack detection accuracy is further improved.
The present disclosure exemplifies possible embodiments of the luminance difference increasing process. For convenience of description, the designated pixel point selected in the first mode is referred to as a first designated pixel point, and the designated pixel point selected in the second mode is referred to as a second designated pixel point.
The first method is as follows: and aiming at each image area, selecting a specified number of first specified pixel points according to the sequence of the pixel values from large to small, and adjusting the pixel values of the pixel points in the image area except the first specified pixel points.
For example, the specified number may be, for example, 20, and certainly, other numbers may also be used, and specific values of the specified number may be set according to actual requirements, and the specific values of the specified number are not limited in the embodiment of the present disclosure.
The second method comprises the following steps: and for each image area, determining a second designated pixel point with the pixel value smaller than the target pixel threshold value, and adjusting the pixel value of the second designated pixel point.
In addition, for the above-mentioned first mode or second mode, the adjustment processing may include, for example, setting the pixel value of the pixel point to a target value (for example, the target value may be 0), or adjusting the pixel value of the corresponding pixel point (for the first mode, the adjusted pixel point is a pixel point other than the first designated pixel point, and for the second mode, the adjusted pixel point is the second designated pixel point).
In the above embodiment, the manner of performing the brightness difference increasing process on each image area is intended to further improve the cue image difference between the copied image and the non-copied image, so as to further improve the detection accuracy of the copying attack.
Fig. 5 is a diagram illustrating a cue image after a brightness difference increasing process by copying the image according to an exemplary embodiment. For example, as shown in fig. 5, the black area in the cue image corresponds to the pixel point after the adjustment process in the brightness difference increasing process, and the white area corresponds to the pixel point that is not adjusted in the brightness difference increasing process. Generally, for the clue image obtained by the non-reproduction image after the brightness difference increasing process, there is no obvious arrangement rule for the pixel points located in the white area in the image, and for the clue image obtained by the brightness difference increasing process, there is a more obvious arrangement rule for the pixel points in the white area in the image (specifically, as shown in fig. 5, the pixel points that are not adjusted in the brightness difference increasing process are regularly arranged in the clue image in a concentrated manner).
For example, the first cable image may be subjected to a pan-attack detection through a pre-trained target detection model.
Fig. 6 is a flowchart illustrating another living body detecting method according to an exemplary embodiment, and as shown in fig. 6, steps S41 and S43 in the embodiment of the disclosure are similar to the execution method of steps S11 and S13 in fig. 1, and are not described herein again.
In step S42, the image to be detected is subjected to frequency domain conversion to obtain a spectral image of the image to be detected, a first cable image corresponding to the image to be detected is generated based on the spectral image, the first cable image is input to the target detection model, output information of the target detection model is obtained, a detection result of a copying attack of the image to be detected is obtained based on the output information, and a living body detection result is obtained by performing living body detection on the target object based on the image to be detected.
The target detection model is obtained through training of a second cable image corresponding to the non-reproduction image and a third cable image corresponding to the reproduction image. The reproduced image includes, for example, an image obtained by photographing a screen displayed at a resolution higher than a specified resolution (for example, the specified resolution may be 1280 × 720).
For example, the target detection model may be a neural network model of a Very Deep Convolutional network (VGG) structure.
In the embodiment of the disclosure, the target detection model is used for judging whether the image to be detected is a copied image or not according to the frequency spectrum characteristics of the clue image. For example, the cue images may be input into the target detection model, and the detection result of the panning attack may be obtained according to the output information. The duplication detection result may be, for example, a probability value that the image to be detected is the duplication image, or may be a final discrimination result obtained by performing two classifications according to the probability value. (for example, "the image to be detected is a reproduction image" or "the image to be detected is not a reproduction image")
For example, the target may be used to determine a target probability value (the example is represented by 0.5) of the reproduction detection result, and if the target detection model determines that the probability value of the image to be detected as the reproduction image is greater than the target probability value, "1" is output, and the image to be detected is represented as the reproduction image. If the target detection model determines that the probability value of the image to be detected as the copied image is smaller than or equal to the target probability value, outputting '0', and representing that the image to be detected is not the copied image.
In addition, the interference of the background area in the image to the training of the target detection model can be reduced by cutting the background area of the copied image and reserving the face area of the copied image, so that the training effect of the model is ensured. The face area of the target object in the copied image may be determined by a face detection algorithm, for example. Further, the face region determined by the face detection algorithm may be adjusted (the range of the face region is increased or decreased) based on a manual adjustment manner, so as to obtain a cut-out image including only the face region of the target object.
In addition, in order to further improve the feature learning efficiency of the target detection model, two-channel position encoding (position encoding) may be configured for the second cable image and the third cable image. The position code is used to identify each pixel position in the image, taking the position code [ X, Y ] as an example, X is used to identify a pixel row, and Y is used to identify a pixel column. Further, channel stitching may be performed on the two-channel position code of the second cable image (or the third cable image) and the single-channel data (i.e., pixel values) of the second cable image (or the third cable image), so as to obtain the second cable image (or the third cable image) with three-channel data. Further, the target detection model can be trained through a second cable image with three-channel data and a third cable image with three-channel data, and then when the target detection model converges or the training steps of the target detection model reach a specified number, the training is stopped, and the target detection model is obtained.
The living body detection method provided by the embodiment of the disclosure can realize the discrimination of whether the image to be detected is a copied image or not through the frequency spectrum characteristics of the image to be detected. Compared with a conventional mode of detecting the copied image through the moire fringes contained in the image, the image detection method provided by the disclosure has universality, has higher identification precision aiming at the copied image without moire fringes or with unobvious moire fringes, and can meet the detection requirement on the high-resolution display screen copied image. On the basis, the live body detection precision can be further improved by combining the copying attack detection with the live body detection, and the method can realize accurate detection aiming at the attack image of a high-resolution display screen.
In addition, the present disclosure is based on the same concept, and an embodiment of the present disclosure further provides an image detection method, which can detect a captured image, so as to meet the requirements of captured image detection in application scenarios such as living body detection and environmental analysis.
Fig. 7 is a flowchart illustrating an image detection method according to an exemplary embodiment, as shown in fig. 7, including the following steps.
In step S51, an image to be detected is acquired.
In step S52, the image to be detected is subjected to frequency domain conversion to obtain a spectral image of the image to be detected, and a first cable image corresponding to the image to be detected is generated based on the spectral image.
In step S53, a duplication attack detection is performed on the image to be detected based on the first line image, so as to obtain a duplication attack detection result.
In an embodiment, the first cable image may be obtained by cutting and splicing a specific region in the first spectrum image.
Fig. 8 is a flowchart illustrating a method for generating a first cable image corresponding to an image to be detected based on a spectrum image, as shown in fig. 8, including the following steps, according to an exemplary embodiment.
In step S61, the image region including the target pixel point is cut out according to the target rule.
In the embodiment of the present disclosure, the target pixel point is a pixel intersection point located in each target pixel row and each target pixel column in the spectral image. The target pixel rows are arranged at equal intervals, and the target pixel columns are arranged at equal intervals.
For example, the image region may be intercepted by using the target pixel point as an interception center point, or the image region may be intercepted by using other pixel points close to the target pixel point as interception center points. In addition, the clipping range may be adjusted according to the actual situation of the spectrum image (for example, a pixel range of 20 × 20 may be used as the clipping range), which is not specifically limited by the present disclosure.
In step S62, the image regions are stitched together to obtain a first cable image.
In the embodiment of the disclosure, the image areas including the target pixel points are intercepted according to the target rules, and the image areas are spliced to obtain the first cable image, so that the image areas with characteristic differences between the non-copied image and the copied image can be reserved, and the detection precision of the copying attack can be improved.
In addition, for example, a pixel row at an integer multiple position of 1/8 or 1/8 of the spectrum image may be used as a target pixel row, a pixel column at an integer multiple position of 1/8 or 1/8 of the spectrum image may be used as a target pixel column, a central pixel row and a central pixel column are removed from the target pixel row and the target pixel column, and finally, a plurality of image regions that are easy to recognize the copied image may be obtained.
Similar to the above-mentioned detection method of the copying attack, the detection method of the copying attack related to the embodiments of the present disclosure may directly refer to any embodiment related to the living body detection method where the relevant content is unclear.
Based on the same conception, the embodiment of the disclosure also provides a living body detection device.
It is understood that the image detection apparatus provided by the embodiments of the present disclosure includes a hardware structure and/or a software module for performing the above functions. The disclosed embodiments can be implemented in hardware or a combination of hardware and computer software, in combination with the exemplary elements and algorithm steps disclosed in the disclosed embodiments. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the subject matter of the embodiments of the present disclosure.
FIG. 9 is a block diagram illustrating an active detection apparatus according to an exemplary embodiment. Referring to fig. 9, the apparatus 100 includes an acquisition unit 101, a processing unit 102, and a determination unit 103.
An acquiring unit 101 is used for acquiring an image to be detected. The image to be detected comprises a face area of the target object. The processing unit 102 is configured to perform frequency domain conversion on an image to be detected to obtain a frequency spectrum image of the image to be detected, generate a first cable image corresponding to the image to be detected based on the frequency spectrum image, and perform a copying attack detection on the image to be detected based on the first cable image to obtain a copying attack detection result. And the living body detection device is used for carrying out living body detection on the target object based on the image to be detected to obtain a living body detection result. A determination unit 103 configured to determine whether the target object is a living body based on the living body detection result and the panning attack detection result.
In one embodiment, the processing unit 102 generates a first cable image corresponding to the image to be detected based on the spectral image: and intercepting an image area containing the target pixel points according to a target rule. The target pixel points are pixel points which are positioned in each target pixel row and each target pixel column in the frequency spectrum image, each target pixel row is arranged at equal intervals, and each target pixel column is arranged at equal intervals. And splicing the image areas to obtain a first cable image.
In one embodiment, the target pixel rows are pixel rows other than a center pixel row of the spectral image, and the target pixel columns are pixel columns other than a center pixel column of the spectral image.
In one embodiment, the target pixel row is located at a position corresponding to an integer multiple of 1/8 or 1/8 of the spectrum image, and the target pixel column is located at a position corresponding to an integer multiple of 1/8 or 1/8 of the spectrum image.
In one embodiment, the processing unit 102 is further configured to: and performing brightness difference increasing processing on each image area, wherein the brightness difference is the brightness difference between the bright point pixel and the rest pixels in the image area.
In one embodiment, the processing unit 102 performs the luminance difference increasing process for each image area as follows: and aiming at each image area, selecting a specified number of first specified pixel points according to the sequence of the pixel values from large to small, and adjusting the pixel values of the pixel points in the image area except the first specified pixel points. And adjusting the pixel value of the pixel point to be a target value or to be reduced. Or, for each image area, determining a second designated pixel point with a pixel value smaller than the target pixel threshold value, and performing adjustment processing on the pixel value of the second designated pixel point. And adjusting the pixel value of the pixel point to be a target value or to be reduced.
Based on the same conception, the disclosure also provides an image detection device.
Fig. 10 is a block diagram illustrating an image sensing device according to an exemplary embodiment. Referring to fig. 10, the apparatus 200 includes an acquisition unit 201 and a processing unit 202.
An acquiring unit 201 is used for acquiring an image to be detected. The processing unit 202 performs frequency domain conversion on the image to be detected to obtain a frequency spectrum image of the image to be detected, and generates a first cable image corresponding to the image to be detected based on the frequency spectrum image. And carrying out copying attack detection on the image to be detected based on the first line image to obtain a copying attack detection result.
In one embodiment, the processing unit 202 generates the first cable image corresponding to the image to be detected based on the spectrum image in the following manner: and intercepting an image area containing the target pixel points according to a target rule. The target pixel points are pixel points which are positioned in each target pixel row and each target pixel column in the frequency spectrum image, each target pixel row is arranged at equal intervals, and each target pixel column is arranged at equal intervals. And splicing the image areas to obtain a first cable image.
In one embodiment, the target pixel row is a pixel row other than a center pixel row of the spectral image, and the target pixel column is a pixel column other than the center pixel column of the spectral image.
In one embodiment, the target pixel row is located at a position corresponding to an integer multiple of 1/8 or 1/8 of the spectrum image, and the target pixel column is located at a position corresponding to an integer multiple of 1/8 or 1/8 of the spectrum image.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 11 is a block diagram illustrating an electronic device 300 for image sensing or liveness detection in accordance with an exemplary embodiment.
As shown in fig. 11, 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 for storing instructions. A processor 302 for calling the instructions stored in the memory 301 to execute the image detection or the living body 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, via a bus system and/or other connection mechanism (not shown). The memory 301 may be used to store programs and data, including the programs of the image detection or the living body 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.
The processor 302 in the embodiment of the present disclosure may be implemented in at least one hardware form of a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), and the processor 302 may be one or a combination of several Central Processing Units (CPUs) or other forms of Processing units with data Processing capability and/or instruction execution capability.
In the embodiment of the present disclosure, the I/O interface 303 may be used to receive input instructions (e.g., numeric or character information, and generate key signal inputs related to user settings and function control of the electronic device 300, etc.), and may also output various information (e.g., images or sounds, etc.) to the outside. The I/O interface 303 may comprise one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a mouse, a joystick, a trackball, a microphone, a speaker, and a touch panel, among others in embodiments of the present disclosure.
In some embodiments, the present disclosure provides a computer-readable storage medium having stored thereon computer-executable instructions that, when executed by a processor, perform any of the methods described above.
In some embodiments, the present disclosure provides a computer program product comprising a computer program that, when executed by a processor, performs any of the methods described above.
Although operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in serial order, or that all illustrated operations be performed, to achieve desirable results. In certain environments, multitasking and parallel processing may be advantageous.
The methods and apparatus of the present disclosure can be accomplished with standard programming techniques with rule-based logic or other logic to accomplish the various method steps. It should also be noted that the words "means" and "module," as used herein and in the claims, is intended to encompass implementations using one or more lines of software code, and/or hardware implementations, and/or equipment for receiving inputs.
Any of the steps, operations, or procedures described herein may be performed or implemented using one or more hardware or software modules, 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 is executable by a computer processor for performing any or all of the described steps, operations, or procedures.
The foregoing description of implementations of the present disclosure has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the disclosure to the precise form disclosed, and modifications and variations are possible in light of the above teachings or may be acquired from practice of the disclosure. The embodiments were chosen and described in order to explain the principles of the disclosure and its practical application to enable one skilled in the art to utilize the disclosure in various embodiments and with various modifications as are suited to the particular use contemplated.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
It is understood that "a plurality" in this disclosure means two or more, and other words are analogous. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. The singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It will be further understood that the terms "first," "second," and the like are used to describe various information and that such information should not be limited by these terms. These terms are only used to distinguish one type of information from another and do not denote a particular order or importance. Indeed, the terms "first," "second," and the like are fully interchangeable. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure.
It will be further understood that, unless otherwise specified, "connected" includes direct connections between the two without the presence of other elements, as well as indirect connections between the two with the presence of other elements.
It is further to be understood that while operations are depicted in the drawings in a particular order, this is not to be understood as requiring that such operations be performed in the particular order shown or in serial order, or that all illustrated operations be performed, to achieve desirable results. In certain environments, multitasking and parallel processing may be advantageous.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements 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 to be limited only by the scope of the appended claims.
Claims (15)
1. A method of in vivo detection, the method comprising:
acquiring an image to be detected; wherein the image to be detected comprises a face area of a target object;
performing frequency domain conversion on the image to be detected to obtain a frequency spectrum image of the image to be detected, generating a first line image corresponding to the image to be detected based on the frequency spectrum image, and performing copying attack detection on the image to be detected based on the first line image to obtain a copying attack detection result; performing living body detection on the target object based on the image to be detected to obtain a living body detection result;
and determining whether the target object is a living body or not based on the living body detection result and the copying attack detection result.
2. The in-vivo detection method according to claim 1, wherein said generating a first cable image corresponding to the image to be detected based on the spectrum image comprises:
intercepting an image area containing a target pixel point according to a target rule; the target pixel points are pixel intersection points of target pixel rows and target pixel columns in the frequency spectrum image, the target pixel rows are arranged at equal intervals, and the target pixel columns are arranged at equal intervals;
and splicing the image areas to obtain the first cable image.
3. The living body detection method according to claim 2, wherein the target pixel row is a pixel row other than a center pixel row of the spectral image, and the target pixel column is a pixel column other than the center pixel column of the spectral image.
4. The living body detecting method according to claim 2 or 3, wherein the target pixel row is located at a position corresponding to an integer multiple of 1/8 or 1/8 of the spectral image, and the target pixel column is located at a position corresponding to an integer multiple of 1/8 or 1/8 of the spectral image.
5. The in-vivo detection method according to any one of claims 2 to 4, wherein the method further comprises:
and performing brightness difference increasing processing on each image area, wherein the brightness difference is the brightness difference between the bright point pixel and the rest pixels in the image area.
6. The living body detection method according to claim 5, wherein the performing of the brightness difference increasing process on each of the image areas includes:
aiming at each image area, selecting a specified number of first specified pixel points according to the sequence of pixel values from large to small, and adjusting the pixel values of the pixel points in the image area except the first specified pixel points; the adjustment processing comprises setting the pixel value of the pixel point to be a target value or reducing the pixel value of the pixel point;
or,
for each image area, determining a second designated pixel point with a pixel value smaller than a target pixel threshold value, and adjusting the pixel value of the second designated pixel point; and adjusting the pixel value of the pixel point to be a target value or to be reduced.
7. The in-vivo detection method according to any one of claims 1 to 6, wherein the performing of the detection of the copying attack on the image to be detected based on the first line image to obtain a result of the detection of the copying attack comprises:
inputting the first cable image into a target detection model, acquiring output information of the target detection model, and obtaining a copying attack detection result of the image to be detected based on the output information; the target detection model is obtained by training based on a second cable image corresponding to the non-reproduction image and a third cable image corresponding to the reproduction image.
8. The biopsy method according to claim 7, wherein the reproduced image is an image obtained by photographing a screen displayed at a resolution higher than a predetermined resolution.
9. An image detection method, comprising:
acquiring an image to be detected;
performing frequency domain conversion on the image to be detected to obtain a frequency spectrum image of the image to be detected, and generating a first cable image corresponding to the image to be detected based on the frequency spectrum image;
and carrying out copying attack detection on the image to be detected based on the first line image to obtain a copying attack detection result.
10. The image detection method according to claim 9, wherein the generating a first cable image corresponding to the image to be detected based on the spectrum image comprises:
intercepting an image area containing a target pixel point according to a target rule; the target pixel points are pixel points which are positioned in each target pixel row and each target pixel column in the frequency spectrum image, each target pixel row is arranged at equal intervals, and each target pixel column is arranged at equal intervals;
and splicing the image areas to obtain the first cable image.
11. The image detection method according to claim 10, wherein the target pixel row is a pixel row other than a center pixel row of the spectrum image, and the target pixel column is a pixel column other than the center pixel column of the spectrum image.
12. The image detection method according to claim 10 or 11, wherein the target pixel row is located at a position corresponding to an integer multiple of 1/8 or 1/8 of the spectral image, and the target pixel column is located at a position corresponding to an integer multiple of 1/8 or 1/8 of the spectral image.
13. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: performing the in-vivo detection method of any one of claims 1 to 8, or performing the image detection method of any one of claims 9 to 12.
14. A storage medium having stored therein instructions that, when executed by a processor, enable the processor to perform the liveness detection method of any one of claims 1 to 8 or the image detection method of any one of claims 9 to 12.
15. A computer program product, characterized in that the computer program product comprises a computer program which, when being executed by a processor, implements the living body detection method of any one of claims 1 to 8 or performs the image detection method of any one of claims 9 to 12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210434344.8A CN114913574A (en) | 2022-04-24 | 2022-04-24 | Image detection method, living body detection method, electronic device, medium, and product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210434344.8A CN114913574A (en) | 2022-04-24 | 2022-04-24 | Image detection method, living body detection method, electronic device, medium, and product |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114913574A true CN114913574A (en) | 2022-08-16 |
Family
ID=82764250
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210434344.8A Pending CN114913574A (en) | 2022-04-24 | 2022-04-24 | Image detection method, living body detection method, electronic device, medium, and product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114913574A (en) |
-
2022
- 2022-04-24 CN CN202210434344.8A patent/CN114913574A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109325933B (en) | Method and device for recognizing copied image | |
US10832069B2 (en) | Living body detection method, electronic device and computer readable medium | |
JP7165742B2 (en) | LIFE DETECTION METHOD AND DEVICE, ELECTRONIC DEVICE, AND STORAGE MEDIUM | |
WO2022156640A1 (en) | Gaze correction method and apparatus for image, electronic device, computer-readable storage medium, and computer program product | |
CN110189336B (en) | Image generation method, system, server and storage medium | |
TW202026948A (en) | Methods and devices for biological testing and storage medium thereof | |
CN110222572B (en) | Tracking method, tracking device, electronic equipment and storage medium | |
CN112329851B (en) | Icon detection method and device and computer readable storage medium | |
CN112257729B (en) | Image recognition method, device, equipment and storage medium | |
Hu et al. | A proto-object based saliency model in three-dimensional space | |
CN111598065A (en) | Depth image acquisition method, living body identification method, apparatus, circuit, and medium | |
CN110070017B (en) | Method and device for generating human face artificial eye image | |
CN112699885A (en) | Semantic segmentation training data augmentation method and system based on antagonism generation network GAN | |
CN111325107A (en) | Detection model training method and device, electronic equipment and readable storage medium | |
CN117710868B (en) | Optimized extraction system and method for real-time video target | |
US20220237317A1 (en) | Technology for de-identifying and restoring personal information in encryption key-based image | |
CN114913574A (en) | Image detection method, living body detection method, electronic device, medium, and product | |
CN114898282A (en) | Image processing method and device | |
CN117115444B (en) | Multitasking image segmentation method, system, computer equipment and storage medium | |
RU2775162C1 (en) | System and method for tracking moving objects by video data | |
CN116993653B (en) | Camera lens defect detection method, device, equipment, storage medium and product | |
CN118365573B (en) | Image enhancement method | |
WO2024025134A1 (en) | A system and method for real time optical illusion photography | |
CN114202594A (en) | Image reconstruction method, image reconstruction device and storage medium | |
CN114926567A (en) | Image rendering method, electronic device, storage medium, and computer program product |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |