ID Card Re-photograph Recognition Method, Device, Computer Readable Medium, and Electronic Device

By preprocessing identity card images into time and frequency domains and comparing waveforms in orthogonal coordinates, the method improves the accuracy and efficiency of identity card photo replication recognition, addressing the limitations of existing methods.

CN116503883BActive Publication Date: 2025-07-15BEIJING AGILESTAR TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211703765.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-29
Publication Date
2025-07-15
Estimated Expiration
2042-12-29

AI Technical Summary

Technical Problem

In the prior art, the accuracy of ID card remake recognition is low, the existing methods have strict requirements on image features and poor applicability, and insufficient training data leads to low recognition accuracy.

Method used

By preprocessing the target ID card image to generate a time domain feature map, Fourier transform to obtain the frequency domain feature map, and map feature points to a two-dimensional coordinate system, compare the peak intersection areas, and identify them in combination with the graph neural network.

Benefits of technology

It improves the accuracy and efficiency of ID card remake recognition, and can more comprehensively determine whether the ID card image is a remake image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116503883B_ABST
    Figure CN116503883B_ABST
Patent Text Reader

Abstract

The present application discloses an identity card photographing and recognition method, a device, a computer-readable medium, and an electronic device. By preprocessing a target identity card image to obtain a time-domain feature map and performing a Fourier transform operation on the target identity card image to obtain a frequency-domain feature map, it is possible to extract the time-domain and frequency-domain feature maps and distribute the feature points therein in a two-dimensional coordinate system to compare the feature distributions in these two spaces of the time domain and the frequency domain, so as to determine whether there is a region where the parts with gentle peak changes intersect with each other, and determine whether the identity card image is a photographed image based on this. Compared with the existing solution that only determines through image feature recognition, it is possible to perform photographing recognition through each feature point in the image, greatly improving the recognition accuracy and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a method and device for identifying a duplicate photo of an ID card, as well as a computer-readable medium and an electronic device. Background Art

[0002] With the development of science and technology, electronic documents are increasingly used in people's lives and work. In particular, electronic documents avoid people from carrying paper originals with them, making it very convenient for people to exchange files in daily life and transfer files at work. In particular, with the popularization of Internet technology in people's lives, people can use electronic documents through the Internet, which further facilitates people's use of electronic documents. However, in scenarios where users need to use identity cards issued by designated authoritative agencies to handle business, users can present photos of their own identity cards as electronic documents to prove their identity. For example, in scenarios such as mobile business account opening, users can provide photos or copies of their identity cards for identity authentication. Therefore, a solution is needed that can identify whether the photo of the identity card provided by the user is a photo taken of the original. Summary of the invention

[0003] The embodiments of the present application provide a method and device for identifying a duplicate photo of an ID card, as well as a computer-readable medium and an electronic device, to solve the defect of low accuracy in identifying a duplicate photo of an ID card in the prior art.

[0004] To achieve the above-mentioned purpose, the embodiment of the present application provides a method for identifying a photocopy of an ID card, comprising:

[0005] Preprocessing the target ID card image to obtain a time domain feature map of the target ID card image, wherein each feature point in the time domain feature map has a first feature value and a first time value corresponding to the first feature value;

[0006] Performing a Fourier transform operation on the target ID card image to obtain a frequency domain feature map, wherein each feature point in the frequency domain feature map has a second feature value and a second frequency value corresponding to the second feature value;

[0007] Mapping each feature point in the time domain feature map to a first two-dimensional coordinate system, and mapping each feature point in the frequency domain feature map to a second two-dimensional coordinate system, wherein a first horizontal coordinate direction of the first two-dimensional coordinate system and a second horizontal coordinate direction of the second two-dimensional coordinate system are perpendicular to each other, and a first vertical coordinate direction of the first two-dimensional coordinate system and a second vertical coordinate direction of the second two-dimensional coordinate system are parallel to each other;

[0008] Comparing a plurality of first peaks in a first waveform diagram formed by each feature point of the time domain feature diagram in the first two-dimensional coordinate system with a plurality of second peaks in a second waveform diagram formed by each feature point of the frequency domain feature diagram in the second two-dimensional coordinate system to determine whether there is a peak intersection region, in which the change amplitudes of the first peak and the second peak are less than a preset threshold and the first peak and the second peak intersect with each other;

[0009] According to the wave peak intersection area, it is determined that the target ID card image is a first copy recognition mark of the secondary copy image.

[0010] The present application also provides a device for identifying a photocopy of an ID card, comprising:

[0011] A preprocessing module, used for preprocessing a target ID card image to obtain a time domain feature map of the target ID card image, wherein each feature point in the time domain feature map has a first feature value and a first time value corresponding to the first feature value;

[0012] A transformation module, used for performing Fourier transformation operation on the target ID card image to obtain a frequency domain feature map, wherein each feature point in the frequency domain feature map has a second feature value and a second frequency value corresponding to the second feature value;

[0013] A mapping module, used to map each feature point in the time domain feature map to a first two-dimensional coordinate system, and map each feature point in the frequency domain feature map to a second two-dimensional coordinate system, wherein a first horizontal coordinate direction of the first two-dimensional coordinate system and a second horizontal coordinate direction of the second two-dimensional coordinate system are perpendicular to each other, and a first vertical coordinate direction of the first two-dimensional coordinate system and a second vertical coordinate direction of the second two-dimensional coordinate system are parallel to each other;

[0014] a comparison module, configured to compare a plurality of first peaks in a first waveform diagram formed by each feature point of the time domain feature diagram in the first two-dimensional coordinate system with a plurality of second peaks in a second waveform diagram formed by each feature point of the frequency domain feature diagram in the second two-dimensional coordinate system, so as to determine whether there is a peak intersection region, in which the variation amplitudes of the first peak and the second peak are less than a preset threshold and the first peak and the second peak intersect with each other;

[0015] The determination module is used to determine that the target ID card image is a first re-photographed identification mark of a secondary re-photographed image according to the wave peak intersection area.

[0016] The present application also provides an electronic device, including:

[0017] Memory, used to store programs;

[0018] A processor for running the program stored in the memory, and when the program runs, it executes the ID card reshooting recognition method provided by the embodiments of the present application.

[0019] The embodiments of the present application also provide a computer-readable storage medium, on which a computer program executable by a processor is stored. When the program is executed by the processor, it implements the ID card reshooting recognition method provided by the embodiments of the present application.

[0020] The ID card reshooting recognition method, device, computer-readable medium, and electronic device provided by the embodiments of the present application obtain a time-domain feature map by preprocessing a target ID card image and perform a Fourier transform operation on the target ID card image to obtain a frequency-domain feature map. Each feature point in the time-domain feature map and the frequency-domain feature map is respectively mapped to the first and second two-dimensional coordinate systems. The vertical coordinate directions of the first two-dimensional coordinate system and the second two-dimensional coordinate system are parallel to each other, and the horizontal coordinate directions are perpendicular to each other. Then, it compares multiple first wave peaks in the first waveform diagram formed by the feature points of the time-domain feature map in the first two-dimensional coordinate system with multiple second wave peaks in the second waveform diagram formed by the feature points of the frequency-domain feature map in the second two-dimensional coordinate system to determine whether there is a wave peak intersection area. According to the wave peak intersection area, a first reshooting recognition mark for determining that the target ID card image is a secondary reshooting image is determined. Therefore, by extracting the time-domain and frequency-domain feature maps and distributing the feature points therein in the two-dimensional coordinate system, the feature distributions in these two spaces of time domain and frequency domain can be compared to determine whether there is an area where the parts with gentle wave peak changes intersect each other, and based on this, it is determined whether the ID card image is a reshot image. Compared with the prior art solution that only determines by image feature recognition, it can perform reshooting recognition through each feature point in the image, greatly improving the recognition accuracy and efficiency.

[0021] The above description is only an overview of the technical solution of the present application. In order to be able to understand the technical means of the present application more clearly, it can be implemented according to the content of the description. And in order to make the above and other purposes, features, and advantages of the present application more obvious and understandable, the specific embodiments of the present application are hereinafter specifically exemplified. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present application. And throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:

[0023] Figure 1 It is a flowchart of an embodiment of the ID card reshooting recognition method provided by the present application;

[0024] Figure 2 A schematic diagram of the structure of an embodiment of the ID card photocopying and recognition device provided in this application;

[0025] Figure 3 A schematic diagram of the structure of an electronic device embodiment provided in this application. DETAILED DESCRIPTION

[0026] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0027] Embodiment 1

[0028] In today's society, along with the rapid development of the Internet, people have used electronic documents as the main medium used in daily work, so that they can be directly generated and processed using electronic devices such as computers and mobile phones. At the same time, due to the properties of electronic files, they can be transmitted between devices through the Internet or other networks. However, in the scenario where a user needs to use an ID card issued by a designated authority to handle business, the user can present a photo of his or her ID card as an electronic document to prove the identity. For example, in scenarios such as opening a mobile business account, the user can provide a photo or a copy of the ID card for identity authentication. However, since such photos are obtained by taking photos of the object, if the user uses a photo or a copy of the ID card as the subject of the photo when taking photos, the user can still obtain an ID card image with the content of the ID card, but such an ID card image is a re-photographed image that does not meet the shooting requirements of the electronic image of the ID card. That is, it is not photographed against the actual original ID card, but rather photographed against a photo or paper copy of the ID card. Therefore, in business scenarios where users are required to provide an electronic file of their ID card, if the ID card photo provided by the user is such a copied photo, it is necessary to identify it and remind the user to replace it with an ID card image that meets the requirements and is obtained by photographing the original.

[0029] In the prior art, it has been proposed to perform specific pattern recognition on the ID card image provided by the user by edge detection or texture detection, but such a scheme usually has certain requirements for the image, that is, only the ID card image with specific features can be recognized, and if the ID card image as the identification object does not have specific features, then the pattern recognition scheme cannot be applied, so that due to its low applicability, the accuracy rate fluctuates, and the actual applicability is poor. In addition, the prior art also proposes to use an artificial intelligence deep learning model to obtain a trained model through a large amount of training to match the features in the ID card reprint image, and determine the ID card reprint image with a high degree of matching as having reprint features. However, such a technical scheme requires the use of a large amount of training data to train the model so that the model can recognize the image features of the ID card reprint image, and thus, if the number of training data is small or the ID card reprint features involved in the training data are only concentrated in a few features, then the model trained in this way also has the defect of low applicability, and will also lead to a low recognition accuracy rate.

[0030] To this end, according to an embodiment of the present application, a scheme for identifying photocopied ID card images is proposed, which can generate a time domain feature map and a frequency domain feature map by processing the target ID card image separately, and map the feature points in these two maps to two two-dimensional coordinate systems for peak comparison, so that the ID card image can be judged more comprehensively.

[0031] For example, in the embodiment of the present application, the target ID card image may be preprocessed first to obtain the time domain feature map of the target ID card image. Specifically, the target ID card image in the embodiment of the present application may be uploaded by the user at the ID card usage site, for example, uploaded to the server of the reviewer through the user's mobile terminal for processing, or the reviewer's server may obtain the ID card image pre-uploaded by the user from the cloud server via the Internet as the target ID card image.

[0032] When the target ID card image thus acquired is preprocessed, the ID card area containing the ID card information and the blank area without the ID card information or any information in the target ID card image can be identified, for example, by various image recognition algorithms used in the art, and then the blank area thus identified can be removed in the preprocessing to generate a time domain feature map. In particular, in the embodiment of the present application, the time domain feature map can also be generated by further performing feature recognition on the ID card image from which the blank area has been removed.

[0033] After the time domain feature map is generated, moire detection can also be performed on the target ID card image or the generated time domain feature map. Moire is caused by irregular stripes superimposed on the generated digital image due to high-frequency interference on the photosensitive element when the image is generated using a digital image generation tool such as a digital camera or a scanner. For example, during the shooting or scanning process, the photosensitive element of the digital camera is subjected to high-frequency interference with a similar frequency, which will cause the amplitude of the generated signal to change due to the superposition of the sine wave of the high-frequency signal emitted from the photographed object and the photographed object or behind the photographed object, thereby generating moire. For example, when a digital camera is used to copy the ID card image displayed on the screen to form the ID card image, the light signal entering the photosensitive element of the digital camera not only includes the light signal reflected by the ID card image displayed on the screen, but also includes the light signal emitted by the light-emitting element of the screen. Therefore, in the photosensitive element of the digital camera, these two light signals are superimposed due to the close frequency, resulting in the generation of moire superimposed on the ID card image when the photosensitive element generates image data based on such superimposed light signals. Therefore, in the embodiment of the present application, after the time domain feature map is generated, the time domain feature map may be firstly subjected to moire detection, and when the time domain feature map is detected to contain moire, a remake identification mark for the target ID card image that identifies the image as a screen remake image may be output. When no moire is detected, the subsequent recognition process of the embodiment of the present application may be continued. In particular, in the embodiment of the present application, as described above, since moire recognition is a feature recognition based on the image features of known moire, if the image features of the moire in the current target ID card image become deviated from the known moire image features due to the superposition with the ID card image itself, or even have a large difference, then the detection based on such moire image features may easily lead to failure to recognize it, or even in some cases, since the user uses the original ID card as the shooting object to shoot the ID card image, but the ID card image obtained by shooting still produces moire or moire-like features due to the influence of ambient light or the position where the original ID card is placed, then if only relying on moire detection to identify whether it is a remake of the ID card image, it will lead to misjudgment or missed judgment. Therefore, in an embodiment of the present application, when the time domain feature map is obtained, moiré feature detection can be performed first, and when the moiré feature is detected, the image can be marked with a copy recognition mark representing the screen copy image, and subsequent recognition processing can be continued.In addition, when no moiré pattern feature is detected by detecting the moiré pattern feature in the time-domain feature map, or the detected feature has a low degree of match with the pre-known moiré standard feature, so that the moiré detection result indicates that no moiré pattern is detected in the time-domain feature map, this may also be caused by the user using a moiré removal tool on the captured ID card image containing moiré after photographing an ID card image displayed on, for example, a screen. In other words, due to the digital nature of the ID card image, it can actually be processed using various digital tools. Therefore, if the user uses such a processed captured image, it is very likely that when using the moiré detection tool to detect the moiré pattern in the time-domain feature map as described above, no image feature sufficient to match the moiré standard feature can be detected, resulting in misidentifying it as a non-screen-captured image. Therefore, in the embodiments of the present application, when the above moiré detection processing result indicates that no moiré pattern feature is detected, the time-domain feature map can be further input into, for example, a neural network model to detect whether there is a moiré removal tool used in the time-domain feature map. For example, images with moiré patterns removed using a moiré removal tool can be prepared in advance as training data to train the neural network model, and when no moiré pattern is detected in the above moiré detection, the time-domain feature map without detected moiré pattern can be input into the neural network model to detect whether there is information on the use of a moiré removal tool. For example, the detected image features in the image can be compared with the image features of an image using a moiré removal tool, and if the degree of match is close, it can be determined that the time-domain feature map is an image obtained by processing using a moiré removal tool.

[0034] Therefore, when the recognition result output using the graph neural network model in this way indicates that there is information on the use of a moiré removal tool in the time-domain feature map, a second capture recognition mark indicating that the target ID card image is a screen-captured image can be output.

[0035] In addition, in the embodiments of the present application, simultaneously with or after generating the time-domain feature map, a Fourier transform process can also be performed on the target ID card image to obtain a frequency-domain feature map. In this frequency-domain feature map, there can be multiple feature points with eigenvalue and frequency value, and these feature points can be obtained based on the image features extracted from the target ID card image. In addition, in the embodiments of the present application, a Fourier transform process can also be performed based on the time-domain feature map to obtain this frequency-domain feature map.

[0036] After obtaining the frequency-domain feature map, the time-domain feature map and the frequency-domain feature map obtained as above can be respectively mapped into their respective two-dimensional coordinate systems. For example, each feature point in the time-domain feature map can be mapped into a first two-dimensional coordinate system, which can be a two-dimensional coordinate system with the time dimension as the abscissa and the eigenvalue of the point in the time-domain feature map as the ordinate. Also, each feature point in the frequency-domain feature map can be mapped into a second two-dimensional coordinate system, which can be a two-dimensional coordinate system with the frequency dimension as the abscissa and the eigenvalue of the feature point in the frequency-domain feature map as the ordinate. And in the embodiments of the present application, the first two-dimensional coordinate system and the second two-dimensional coordinate system can also be adjusted so that their abscissa directions are perpendicular to each other. For example, the abscissas of the first two-dimensional coordinate system and the second two-dimensional coordinate system can be located on the same plane, and the time abscissa of the first two-dimensional coordinate system can be in the left-to-right direction, while the frequency abscissa of the second two-dimensional coordinate system can start from the right end of the time abscissa of the first two-dimensional coordinate system and extend vertically away from the time abscissa in the left-right direction perpendicular to the time abscissa. Thus, the abscissas of the first two-dimensional coordinate system and the second two-dimensional coordinate system can form a rectangular shape perpendicular to each other on the same plane. And the ordinates of the first two-dimensional coordinate system and the second two-dimensional coordinate system can be formed to extend parallel to each other in the direction perpendicular to the plane where the abscissa is located, and the extension directions are also the same. Therefore, by arranging the first two-dimensional coordinate system mapping the feature points in the time-domain feature map and the second two-dimensional coordinate system mapping the feature points in the frequency-domain feature map in this way, they can be formed to be perpendicularly superimposed on each other. Specifically, for example, in the calculation of the frequency-domain feature map, essentially the periodic function in the time-domain feature map is converted into a frequency-domain function. Therefore, there are multiple sine and cosine waves in the frequency-domain feature space. And when mapped into the second two-dimensional coordinate system, the amplitude of each sine and cosine wave among these sine and cosine waves can be represented by the ordinate, while the frequency of each sine and cosine wave among these sine and cosine waves can be represented by the abscissa. Therefore, in the second two-dimensional coordinate system where each point in the frequency-domain feature map is projected, the smaller the abscissa of a point, the lower the change frequency of the corresponding sine and cosine wave can be represented, and the larger the ordinate of a point, the larger the amplitude of the corresponding sine and cosine wave can be represented. Therefore, the frequency-domain feature map projected into the second two-dimensional coordinate system can be formed into multiple line segments vertically extending along the direction of the vertical axis with a predetermined width interval on the abscissa, and the longer the line segment, the larger the change amplitude of the corresponding sine and cosine wave can be represented. And because its change amplitude is large, its corresponding change frequency is also lower, so it is closer to the zero point on the abscissa.Therefore, by projecting onto a two-dimensional coordinate system, the gently changing part among the peaks of multiple sine and cosine waves in the frequency domain space obtained based on the target ID card image, that is, the part with the lowest changing frequency, for example, the vertices of the peaks with the largest amplitudes of each sine and cosine wave are connected into a line. Similarly, the connection line of the gently changing part among the peaks with the largest amplitudes in the waveform diagram formed by each point in the time-domain feature map projected onto the first two-dimensional coordinate system is compared with the connection line of the peak vertices determined in the second two-dimensional coordinate system to determine whether there is an intersection area. And when it is determined that there is an intersection area, the target ID card image can be determined based on this intersection area. For example, when it is recognized that there is an intersection area, the information in the intersection area can be input into a pre-trained graph neural network for recognition. For example, the peak data, amplitude frequency, and the amplitudes and their time information of the corresponding part in the waveform diagram in the corresponding time-domain feature map in the intersection area can be input into the graph neural network to determine whether it is a photocopied ID card image. For example, the matching value or probability between the features in the intersection area and the pre-set features of the photocopied ID card can be calculated as the evaluation value for each feature, and the evaluation values for each feature can be sorted, or the evaluation values for each feature can be calculated by weighted average, and it is determined whether the calculated result is greater than the pre-set recognition threshold.

[0037] In addition, in the embodiments of the present application, in order to improve the recognition accuracy, before obtaining the frequency-domain feature map, histogram equalization processing can also be performed on the target ID card image or the time-domain feature map to obtain a target ID card image or a time-domain feature map with a predetermined brightness.

[0038] In addition, in the embodiments of the present application, after the recognition process of the intersection area, the recognition result can be processed to reversely obtain the point or area in the target ID card image that has the greatest impact on the recognition result, and can be superimposed on the target ID card image for output. For example, in the embodiments of the present application, reverse gradient derivation can be performed on the recognition result, and based on the derivation result, the point or area in the target ID card image that has the greatest impact on the recognition result can be determined.

[0039] In addition, in order to enhance the robustness of the graph neural network recognition process, adversarial training can be further performed on the graph neural network used. For example, multiple original ID card images, that is, original ID card images that have been manually recognized as non-photocopied images, can be obtained, and random noise can be added to the original ID card images to obtain adversarial sample images. For example, in the embodiments of the present application, moiré patterns or adversarial patterns bound to other label categories are used as random noise and added to the original ID card images through image processing to construct adversarial samples. Then, the adversarial sample images are input into the graph neural network model used, and the recognition results of the graph neural network model for such adversarial sample images are obtained. If the recognition result is a non-photocopied image, it means that the adversarial sample fails, and random noise can be further added until the graph neural network model recognizes it as a photocopied image. Then, the adversarial sample is a qualified adversarial sample for the graph neural network model.

[0040] In addition, for the graph neural network used in the present application, various image processing operations can also be performed on the original ID card images, that is, ID card images obtained by photographing the ID card entity, to obtain multiple training data, which are then input into the graph neural network for training to enhance the robustness of the graph neural network model. For example, one or more of random rotation processing, displacement processing, random shearing processing, flipping processing, brightness adjustment processing, contrast adjustment processing, and hue adjustment processing can be performed on the original ID card images to obtain a variety of images to form an image dataset, and the image dataset obtained in this way is input into the graph neural network for training, thereby enhancing the robustness of the graph neural network model during the recognition process.

[0041] Figure 1 It is a flowchart of an embodiment of the ID card photocopy recognition method provided in the present application. The execution subject of this method can be a server device with image processing capabilities, or a device or chip integrated on these devices. As Figure 1 shown, the ID card photocopy recognition method includes the following steps:

[0042] S101, perform preprocessing on the target ID card image to obtain the time-domain feature map of the target ID card image.

[0043] In step S101, the obtained target ID card image can be preprocessed to obtain a time-domain feature map of the target ID card image. Each point in this time-domain feature map can respectively have a first eigenvalue and a first time value corresponding to the first eigenvalue. For example, the user can upload the target ID card image by themselves at the ID card usage site. For example, the user uses their mobile terminal to upload the ID card image to the server of the auditing party, or the auditing party can also use the server to obtain the ID card image pre-uploaded by the user from the cloud server according to the user's information through the Internet as the target ID card image.

[0044] When preprocessing the target ID card image obtained in this way in step S101, for example, various image recognition algorithms used in the art can be used to identify the ID card area containing ID card information and the blank area without ID card information or any information in the target ID card image, and then the blank area identified in this way can be removed during preprocessing to generate a time-domain feature map. In particular, in the embodiment of the present application, a time-domain feature map can also be generated by further performing feature recognition on the ID card image from which the blank area has been removed.

[0045] S102, perform a Fourier transform operation on the target ID card image to obtain a frequency-domain feature map.

[0046] In step S102, a Fourier transform operation can be performed on the user's target ID card image to obtain a frequency-domain feature map. Each point in this frequency-domain feature map can respectively have a second eigenvalue and a second frequency value corresponding to the second eigenvalue. For example, in this frequency-domain feature map, there can be multiple feature points with eigenvalues and frequency values. These feature points can be obtained based on the image features extracted from the target ID card image, or a Fourier transform process can be performed based on the time-domain feature map obtained in step S101 to obtain this frequency-domain feature map.

[0047] S103, map each feature point in the time-domain feature map to a first two-dimensional coordinate system, and map each feature point in the frequency-domain feature map to a second two-dimensional coordinate system.

[0048] In step S103, the respective feature points in the time-domain feature map obtained in step S101 and the frequency-domain feature map obtained in step S102 can be mapped to the first two-dimensional coordinate system and the second two-dimensional coordinate system respectively. For example, the first horizontal coordinate direction of the first two-dimensional coordinate system is perpendicular to the second horizontal coordinate direction of the second two-dimensional coordinate system, and the first vertical coordinate direction of the first two-dimensional coordinate system is parallel to the second vertical coordinate direction of the second two-dimensional coordinate system.

[0049] For example, each feature point in the time-domain feature map can be mapped to a first two-dimensional coordinate system, which can be a two-dimensional coordinate system with the abscissa being the time dimension and the ordinate being the eigenvalue of the point in the time-domain feature map. Also, each feature point in the frequency-domain feature map can be mapped to a second two-dimensional coordinate system, which can be a two-dimensional coordinate system with the abscissa being the frequency dimension and the ordinate being the eigenvalue of the feature point in the frequency-domain feature map. In the embodiments of the present application, the first two-dimensional coordinate system and the second two-dimensional coordinate system can also be adjusted so that their abscissa directions are perpendicular to each other. For example, the abscissas of the first two-dimensional coordinate system and the second two-dimensional coordinate system can be located in the same plane, and the time abscissa of the first two-dimensional coordinate system can be in the left-to-right direction, while the frequency abscissa of the second two-dimensional coordinate system can start from the right end of the time abscissa of the first two-dimensional coordinate system and extend vertically away from the time abscissa in a left-right direction perpendicular to the time abscissa. Thus, the abscissas of the first two-dimensional coordinate system and the second two-dimensional coordinate system can form a rectangular shape perpendicular to each other in the same plane. And the ordinates of the first two-dimensional coordinate system and the second two-dimensional coordinate system can be formed to extend parallel to each other in a direction perpendicular to the plane where the abscissa is located, and the extension directions are also the same. Therefore, by arranging the first two-dimensional coordinate system mapping the feature points in the time-domain feature map and the second two-dimensional coordinate system mapping the feature points in the frequency-domain feature map in this way, they can be formed to be perpendicularly superimposed on each other. Specifically, for example, in the calculation of the frequency-domain feature map, essentially, the periodic function in the time-domain feature map is converted into a frequency-domain function. Therefore, there are multiple sine and cosine waves in the frequency-domain feature space. When mapped to the second two-dimensional coordinate system, the amplitude of each sine and cosine wave can be represented by the ordinate, and the frequency of each sine and cosine wave can be represented by the abscissa. Therefore, in the second two-dimensional coordinate system where the points in the frequency-domain feature map are projected, the smaller the abscissa of a point, the lower the change frequency of the corresponding sine and cosine wave, and the larger the ordinate of a point, the larger the amplitude of the corresponding sine and cosine wave. Therefore, when the frequency-domain feature map is projected onto the second two-dimensional coordinate system, it can be formed into multiple line segments vertically extending along the longitudinal coordinate axis with a predetermined width interval on the abscissa. And the longer the line segment, the larger the change amplitude of the corresponding sine and cosine wave. And because its change amplitude is large, its corresponding change frequency is also low, so it is closer to the zero point on the abscissa..

[0050] S104. Compare multiple first wave peaks in the first waveform diagram formed by the respective feature points of the time-domain feature map in the first two-dimensional coordinate system with multiple second wave peaks in the second waveform diagram formed by the respective feature points of the frequency-domain feature map in the second two-dimensional coordinate system to determine whether there is a wave peak intersection region.

[0051] S105: Determine, based on the intersection area of the wave peaks, that the target ID card image is a first re-photographed identification mark of the secondary re-photographed image.

[0052] In step S104, the peaks in the waveform formed by the characteristic points of the time domain feature graph projected into the first two-dimensional coordinate system in step S103 and the peaks in the waveform formed by the characteristic points of the frequency domain feature graph projected into the second two-dimensional coordinate system in step S103 can be compared. For example, the peaks whose variation amplitudes are both less than a preset threshold can be selected by comparing the variation amplitudes of the first peak and the second peak, and it is determined whether such first peak and second peak intersect with each other.

[0053] For example, by projecting to a two-dimensional coordinate system in step S103, the slowly changing parts of the peaks of multiple sine and cosine waves in the frequency domain space acquired based on the target ID card image, that is, the parts with the lowest changing frequency, such as the vertices of the peaks with the largest amplitudes of each sine and cosine wave, can be connected into a line in step S104, and similarly, the slowly changing parts of the peaks with the largest amplitudes in the waveform graph composed of the points in the time domain feature graph projected into the first two-dimensional coordinate system can be compared with the connecting line of the peak vertices determined in the second two-dimensional coordinate system to determine whether there is an intersection area, and when it is determined that there is an intersection area, the target ID card image can be determined based on the intersection area.

[0054] In step S105, when the existence of an intersection region is identified in step S104, the information in the intersection region can be input into a pre-trained graph neural network for identification. For example, the peak data and amplitude frequency in the intersection region and the amplitude and time information of the corresponding part of the waveform graph in the corresponding time domain feature graph can be input into the graph neural network to determine whether it is a photocopied ID card image. For example, the matching value or probability of the feature in the intersection region and the pre-set photocopied ID card feature can be calculated as the evaluation value of each feature, and the evaluation value of each feature can be sorted, or the evaluation value of each feature can be weighted averaged, and it is determined whether the calculated result is greater than a preset recognition threshold.

[0055] In addition, in an embodiment of the present application, in order to improve the recognition accuracy in step S105, the target ID card image or time domain feature map can be subjected to histogram equalization processing before obtaining the frequency domain feature map in step S101 to obtain a target ID card image or time domain feature map with a predetermined brightness.

[0056] In addition, in the embodiments of the present application, after the intersection area is identified and processed in step S105, the identification result can be processed to inversely obtain the point or area in the target ID card image that has the greatest impact on the identification result, and can be superimposed on the target ID card image for output. For example, in the embodiments of the present application, the inverse gradient can be derived for the identification result, and based on the derivative result, the point or area in the target ID card image that has the greatest impact on the identification result can be determined.

[0057] In addition, in order to enhance the robustness of the graph neural network identification process, the graph neural network used can also be pre-trained adversarially. For example, multiple original ID card images, that is, original ID card images that have been manually identified as non-photocopied images, can be obtained, and random noise can be added to the original ID card images to obtain adversarial sample images. For example, in the embodiments of the present application, moiré patterns or adversarial patterns bound to other label categories are used as random noise and added to the original ID card images through image processing to construct adversarial samples. Then, the adversarial sample images are input into the graph neural network model used, and the identification results of the graph neural network model for such adversarial sample images are obtained. If the identification result is a non-photocopied image, it means that the adversarial sample fails, and random noise can be further added until the graph neural network model identifies it as a photocopied image. Then, the adversarial sample is a qualified adversarial sample for the graph neural network model.

[0058] In addition, for the graph neural network used in the present application, various image processing operations can also be performed on the original ID card image, that is, the ID card image obtained by photographing the ID card entity, to obtain multiple training data, which are then input into the graph neural network for training to enhance the robustness of the graph neural network model. For example, one or more of random rotation processing, displacement processing, random shearing processing, flipping processing, brightness adjustment processing, contrast adjustment processing, and hue adjustment processing can be performed on the original ID card image to obtain a variety of images to form an image dataset, and the image dataset obtained in this way is input into the graph neural network for training, thereby enhancing the robustness of the graph neural network model during the identification process.

[0059] In addition, in the embodiment of the present application, after the time domain feature map is obtained in step S101, moiré detection can be further performed on the target ID card image or the generated time domain feature map. Moiré is irregular stripes superimposed on the generated digital image due to high-frequency interference on the photosensitive element when the image is generated using a digital image generation tool such as a digital camera or scanner. For example, during the shooting or scanning process, the photosensitive element of the digital camera is subjected to high-frequency interference with a similar frequency, which will cause the amplitude of the generated signal to change due to the superposition of the sine waves of the high-frequency signal emitted from the photographed object and the photographed object or behind the photographed object, thereby generating moiré.

[0060] For example, when using a digital camera to copy the ID card image displayed on the screen to form an ID card image, the light signal entering the photosensitive element of the digital camera not only includes the light signal reflected by the ID card image displayed on the screen, but also includes the light signal emitted by the light-emitting element of the screen. As a result, in the photosensitive element of the digital camera, these two light signals are superimposed due to their close frequencies, causing the photosensitive element to generate moiré patterns superimposed on the ID card image when generating image data based on such superimposed light signals.

[0061] Therefore, in the embodiment of the present application, after the time domain feature map is generated, the time domain feature map may be firstly subjected to moire detection, and when the time domain feature map is detected to contain moire, a remake identification mark for the target ID card image that identifies the image as a screen remake image may be output. When no moire is detected, the subsequent recognition process of the embodiment of the present application may be continued. In particular, in the embodiment of the present application, as described above, since moire recognition is a feature recognition based on the image features of known moire, if the image features of the moire in the current target ID card image become deviated from the known moire image features due to the superposition with the ID card image itself, or even have a large difference, then the detection based on such moire image features may easily lead to failure to recognize it, or even in some cases, since the user uses the original ID card as the shooting object to shoot the ID card image, but the ID card image obtained by shooting still produces moire or moire-like features due to the influence of ambient light or the position where the original ID card is placed, then if only relying on moire detection to identify whether it is a remake of the ID card image, it will lead to misjudgment or missed judgment.

[0062] Therefore, in an embodiment of the present application, after obtaining the time domain feature map in step S101, moiré feature detection can be performed first, and when the moiré feature is detected, the image is first marked with a copy recognition mark representing the screen copy image, and subsequent recognition processing is continued.

[0063] In addition, when no moiré pattern feature is detected by detecting the moiré pattern feature in the time-domain feature map, or the detected feature has a low degree of matching with the pre-known moiré pattern standard feature, so that the moiré pattern detection result indicates that no moiré pattern is detected in the time-domain feature map, this may also be because after the user takes a photo of, for example, an ID card image displayed on the screen, an additional moiré pattern removal tool is used for the obtained photo of the ID card image containing moiré patterns. In other words, due to the digital nature of the ID card image, it can actually use various digital tools for image processing. Therefore, if the user uses such a photo of the ID card image after image processing, it is very likely that when the moiré pattern detection tool is used to detect the moiré pattern in the time-domain feature map as described above, no image feature sufficient to match the moiré pattern standard feature can be detected, resulting in misidentifying it as a non-screen photo image. Therefore, in the embodiment of the present application, when the above moiré pattern detection processing result indicates that no moiré pattern feature is detected, the time-domain feature map can be further input into, for example, a neural network model to detect whether there is a moiré pattern removal tool in the time-domain feature map.

[0064] For example, an image that has used a moiré pattern removal tool to remove moiré patterns can be prepared in advance as training data to train the neural network model, and when no moiré pattern is detected in the above moiré pattern detection, the time-domain feature map without detected moiré pattern can be input into the neural network model to detect whether there is usage information of the moiré pattern removal tool. For example, the detected image features in the image can be compared with the image features of the image that has used the moiré pattern removal tool, and if the degree of matching is close, it can be determined that the time-domain feature map is an image obtained by processing using the moiré pattern removal tool.

[0065] The ID card reshooting recognition method provided by the embodiment of the present application obtains a time-domain feature map by preprocessing a target ID card image and performs a Fourier transform operation on the target ID card image to obtain a frequency-domain feature map. Each feature point in the time-domain feature map and the frequency-domain feature map is respectively mapped into the first and second two-dimensional coordinate systems. The vertical coordinate directions of the first two-dimensional coordinate system and the second two-dimensional coordinate system are parallel to each other, and the horizontal coordinate directions are perpendicular to each other. Then, a plurality of first wave peaks in the first waveform diagram formed by the feature points of the time-domain feature map in the first two-dimensional coordinate system are compared with a plurality of second wave peaks in the second waveform diagram formed by the feature points of the frequency-domain feature map in the second two-dimensional coordinate system to determine whether there is a wave peak intersection area. According to the wave peak intersection area, a first reshooting recognition mark for determining that the target ID card image is a second reshooting image is determined. Therefore, by extracting the time-domain and frequency-domain feature maps and distributing the feature points therein in the two-dimensional coordinate system, the feature distributions in these two spaces of time domain and frequency domain can be compared to determine whether there is an area where the parts with gentle wave peak changes intersect each other, and thereby determine whether the ID card image is a reshot image. Compared with the existing solution that only determines by image feature recognition, it can perform reshooting recognition through each feature point in the image, greatly improving the recognition accuracy and efficiency.

[0066] Embodiment 2

[0067] Figure 2 It is a schematic structural diagram of an embodiment of the ID card reshooting recognition device provided by the present application. As Figure 2 shown, the ID card reshooting recognition device provided by the embodiment of the present application includes: a preprocessing module 21, a transformation module 22, a mapping module 23, a comparison module 24, and a determination module 25.

[0068] The preprocessing module 21 can be used to preprocess the target ID card image to obtain the time-domain feature map of the target ID card image.

[0069] The preprocessing module 21 can preprocess the obtained target ID card image to obtain the time-domain feature map of the target ID card image. Each point in the time-domain feature map can respectively have a first eigenvalue and a first time value corresponding to the first eigenvalue. For example, the user can upload the target ID card image by himself at the ID card usage site. For example, the user uses his mobile terminal to upload the ID card image to the server of the auditing party, or the auditing party can also use the server to obtain the ID card image pre-uploaded by the user from the cloud server according to the user's information through the Internet as the target ID card image.

[0070] When the preprocessing module 21 preprocesses the obtained target ID card image, for example, various image recognition algorithms used in the art can be employed to identify the ID card area containing ID card information and the blank area without ID card information or any information in the target ID card image. Furthermore, the blank area thus identified can be removed during preprocessing to generate a time-domain feature map. In particular, in the embodiments of the present application, a time-domain feature map can also be generated by further performing feature recognition on the ID card image from which the blank area has been removed.

[0071] The transformation module 22 can be used to perform a Fourier transform operation on the target ID card image to obtain a frequency-domain feature map.

[0072] The transformation module 22 can perform a Fourier transform operation on the user's target ID card image to obtain a frequency-domain feature map. Each point in the frequency-domain feature map can respectively have a second eigenvalue and a second frequency value corresponding to the second eigenvalue. For example, in the frequency-domain feature map, there can be multiple feature points with eigenvalue and frequency values. These feature points can be obtained based on the image features extracted from the target ID card image, or a Fourier transform process can be performed on the time-domain feature map obtained by the preprocessing module 21 to obtain the frequency-domain feature map.

[0073] The mapping module 23 can be used to map each feature point in the time-domain feature map to the first two-dimensional coordinate system and map each feature point in the frequency-domain feature map to the second two-dimensional coordinate system.

[0074] The mapping module 23 can map the respective feature points in the time-domain feature map obtained by the preprocessing module 21 and the frequency-domain feature map obtained by the transformation module 22 to the first two-dimensional coordinate system and the second two-dimensional coordinate system respectively. For example, the first horizontal coordinate direction of the first two-dimensional coordinate system is perpendicular to the second horizontal coordinate direction of the second two-dimensional coordinate system, and the first vertical coordinate direction of the first two-dimensional coordinate system is parallel to the second vertical coordinate direction of the second two-dimensional coordinate system.

[0075] For example, the mapping module 23 may map each feature point in the time-domain feature map to a first two-dimensional coordinate system, where the first two-dimensional coordinate system may be a two-dimensional coordinate system with the abscissa being the time dimension and the ordinate being the eigenvalue of the point in the time-domain feature map. It may also map each feature point in the frequency-domain feature map to a second two-dimensional coordinate system, where the second two-dimensional coordinate system may be a two-dimensional coordinate system with the abscissa being the frequency dimension and the ordinate being the eigenvalue of the feature point in the frequency-domain feature map. In the embodiments of the present application, the first two-dimensional coordinate system and the second two-dimensional coordinate system may also be adjusted so that their abscissa directions are perpendicular to each other. For example, it may be such that the abscissas of the first two-dimensional coordinate system and the second two-dimensional coordinate system are both in the same plane, and the time abscissa of the first two-dimensional coordinate system may be in the left-to-right direction, while the frequency abscissa of the second two-dimensional coordinate system may start from the right end of the time abscissa of the first two-dimensional coordinate system and extend perpendicularly away from the time abscissa in the left-right direction perpendicular to the time abscissa. Thus, the abscissas of the first two-dimensional coordinate system and the second two-dimensional coordinate system may form a rectangular shape perpendicular to each other in the same plane. And the ordinates of the first two-dimensional coordinate system and the second two-dimensional coordinate system may be formed to extend parallel to each other in the direction perpendicular to the plane where the abscissa is located, and the extension directions are also the same. Therefore, by arranging the first two-dimensional coordinate system mapping the feature points in the time-domain feature map and the second two-dimensional coordinate system mapping the feature points in the frequency-domain feature map in this way, they may be formed to be perpendicularly superimposed on each other. Specifically, for example, in the calculation of the frequency-domain feature map, essentially, the periodic function in the time-domain feature map is converted into a frequency-domain function. Therefore, there are multiple sine and cosine waves in the frequency-domain feature space. When mapped to the second two-dimensional coordinate system, the amplitude of each sine and cosine wave among these sine and cosine waves may be represented by the ordinate, and the frequency of each sine and cosine wave among these sine and cosine waves may be represented by the abscissa. Therefore, in the second two-dimensional coordinate system where the points in the frequency-domain feature map are projected, the smaller the abscissa of a point, the lower the change frequency of the corresponding sine and cosine wave it represents, and the larger the ordinate of a point, the larger the amplitude of the corresponding sine and cosine wave it represents. Therefore, when the frequency-domain feature map is projected onto the second two-dimensional coordinate system, it may be formed into multiple line segments that are vertically extended along the direction of the vertical axis with a predetermined width interval on the abscissa, and the longer the line segment, the larger the change amplitude of the corresponding sine and cosine wave, and because its change amplitude is large, its corresponding change frequency is also lower, so it is closer to the zero point on the abscissa..

[0076] The comparison module 24 may be used to compare multiple first wave peaks in the first waveform formed by the respective feature points of the time-domain feature map in the first two-dimensional coordinate system with multiple second wave peaks in the second waveform formed by the respective feature points of the frequency-domain feature map in the second two-dimensional coordinate system to determine whether there is a wave peak intersection region.

[0077] The determination module 25 can be used to determine a first reshooting identification mark for the target ID card image as a secondary reshot image according to the peak intersection region.

[0078] The comparison module 24 can compare the peaks in the waveform diagrams formed by the characteristic points of the time-domain characteristic diagram projected by the mapping module 23 into the first two-dimensional coordinate system with the peaks in the waveform diagrams formed by the characteristic points of the frequency-domain characteristic diagram projected into the second two-dimensional coordinate system. For example, the comparison module 24 can select the peaks whose change amplitudes are both less than a preset threshold by comparing the change amplitudes of the first peak and the second peak, and determine whether such a first peak and a second peak intersect with each other.

[0079] For example, by projecting through the mapping module 23 into a two-dimensional coordinate system, the comparison module 24 can connect the parts with gentle changes, that is, the parts with the lowest change frequencies, among the peaks of multiple sine and cosine waves in the frequency-domain space obtained based on the target ID card image. For example, the vertices of the peaks with the largest amplitudes of each sine and cosine wave are connected into a line, and similarly, the parts with the gentlest changes among the peaks with the largest amplitudes in the waveform diagram formed by each point in the time-domain characteristic diagram projected into the first two-dimensional coordinate system are compared with the connection line of the peak vertices determined in the second two-dimensional coordinate system to determine whether there is an intersection region. And when it is determined that there is an intersection region, the target ID card image can be determined based on this intersection region.

[0080] When the comparison module 24 identifies an intersection region, the determination module 25 can input the information in this intersection region into a pre-trained graph neural network for identification. For example, the peak data, amplitude frequency, and the amplitudes and time information of the corresponding parts in the waveform diagram in the corresponding time-domain characteristic diagram in this intersection region can be input into this graph neural network to determine whether it is a reshot ID card image. For example, the matching value or probability between the characteristics in this intersection region and the pre-set characteristics of the reshot ID card can be calculated as the evaluation value of each characteristic, and the evaluation values of each characteristic can be sorted, or the evaluation values of each characteristic can be calculated by weighted average, and it is determined whether the calculated result is greater than the preset identification threshold.

[0081] In addition, in the embodiments of the present application, in order to improve the identification accuracy of the determination module 25, the preprocessing module 21 can perform histogram equalization processing on the target ID card image or the time-domain characteristic diagram before obtaining the frequency-domain characteristic diagram, so as to obtain a target ID card image or a time-domain characteristic diagram with a predetermined brightness.

[0082] In addition, in the embodiments of the present application, after the determination module 25 identifies and processes the intersection area, the recognition result can be processed to inversely obtain the point or area in the target ID card image that has the greatest impact on the recognition result, and can be superimposed on the target ID card image for output. For example, in the embodiments of the present application, the inverse gradient can be calculated for the recognition result, and based on the derivative result, the point or area in the target ID card image that has the greatest impact on the recognition result can be determined.

[0083] In addition, in order to enhance the robustness of the graph neural network recognition process, adversarial training can also be performed on the graph neural network used in advance. For example, multiple original ID card images, that is, original ID card images that have been manually identified as non-photocopied images, can be obtained, and random noise can be added to the original ID card images to obtain adversarial sample images. For example, in the embodiments of the present application, moiré patterns or adversarial patterns bound to other label categories can be used as random noise and added to the original ID card images through image processing to construct adversarial samples. Then, the adversarial sample images are input into the graph neural network model used, and the recognition results of the graph neural network model for such adversarial sample images are obtained. If the recognition result is a non-photocopied image, it means that the adversarial sample fails, and random noise can be further added until the graph neural network model identifies it as a photocopied image. Then, the adversarial sample is a qualified adversarial sample for the graph neural network model.

[0084] In addition, for the graph neural network used in the present application, various image processing operations can also be performed on the original ID card image, that is, the ID card image obtained by photographing the ID card entity, to obtain multiple training data, which are then input into the graph neural network for training to enhance the robustness of the graph neural network model. For example, one or more of random rotation processing, displacement processing, random shearing processing, flipping processing, brightness adjustment processing, contrast adjustment processing, and hue adjustment processing can be performed on the original ID card image to obtain a variety of images to form an image dataset, and the image dataset obtained in this way is input into the graph neural network for training, thereby enhancing the robustness of the graph neural network model during the recognition process.

[0085] In addition, in the embodiment of the present application, after the preprocessing module 21 obtains the time domain feature map, it can further perform moiré detection on the target ID card image or the generated time domain feature map. Moiré is irregular stripes superimposed on the generated digital image due to high-frequency interference on the photosensitive element when the image is generated using a digital image generation tool such as a digital camera or scanner. For example, during the shooting or scanning process, the photosensitive element of the digital camera is subjected to high-frequency interference with a similar frequency, which will cause the amplitude of the generated signal to change due to the superposition of the sine waves of the high-frequency signal emitted from the photographed object and the photographed object or behind the photographed object, thereby generating moiré.

[0086] For example, when using a digital camera to copy the ID card image displayed on the screen to form an ID card image, the light signal entering the photosensitive element of the digital camera not only includes the light signal reflected by the ID card image displayed on the screen, but also includes the light signal emitted by the light-emitting element of the screen. As a result, in the photosensitive element of the digital camera, these two light signals are superimposed due to their close frequencies, causing the photosensitive element to generate moiré patterns superimposed on the ID card image when generating image data based on such superimposed light signals.

[0087] Therefore, in the embodiment of the present application, the preprocessing module 21 can first perform moire detection on the time domain feature map after generating the time domain feature map, and when the time domain feature map is detected to contain moire, a remake identification mark for the target ID card image can be output to identify the image as a screen remake image. When no moire is detected, the subsequent recognition process of the embodiment of the present application can be continued. In particular, in the embodiment of the present application, as described above, since moire recognition is a feature recognition based on the image features of known moire, if the image features of the moire in the current target ID card image become a certain deviation from the known moire image features due to the superposition with the ID card image itself, or even a large difference, then the detection based on such moire image features is likely to fail to recognize it, or even in some cases, because the user uses the original ID card as the shooting object to shoot the ID card image, but the ID card image obtained by shooting still produces moire or moire-like features due to the influence of ambient light or the position where the original ID card is placed, then if only relying on moire detection to identify whether it is a remake of the ID card image, it will lead to misjudgment or missed judgment.

[0088] Therefore, in the embodiment of the present application, after obtaining the time domain feature map, the preprocessing module 21 first performs moiré feature detection, and when the moiré feature is detected, the image is first marked with a copy recognition mark representing the screen copy image, and then the subsequent recognition processing is continued.

[0089] In addition, when no moiré pattern feature is detected by detecting the moiré pattern feature in the time-domain feature map, or the detected feature has a low degree of match with the pre-known moiré pattern standard feature, so that the moiré pattern detection result indicates that no moiré pattern is detected in the time-domain feature map, this may also be because after the user takes a photo of, for example, an ID card image displayed on the screen, an additional moiré removal tool is used for the obtained ID card photo image containing moiré patterns. In other words, due to the digital nature of the ID card image, it can actually use various digital tools for image processing. Therefore, if the user uses such a processed photo image, it is very likely that when the moiré pattern detection tool is used to detect the moiré pattern in the time-domain feature map as described above, image features sufficient to match the moiré pattern standard feature cannot be detected, resulting in misidentifying it as a non-screen photo image. Therefore, in the embodiment of the present application, when the above moiré pattern detection processing result indicates that no moiré pattern feature is detected, the time-domain feature map can be further input into, for example, a neural network model to detect whether there is a moiré removal tool used in the time-domain feature map.

[0090] For example, an image that has been processed to remove moiré patterns using a moiré removal tool can be prepared in advance as training data to train the neural network model, and when no moiré pattern is detected in the above moiré pattern detection, the time-domain feature map in which no moiré pattern is detected can be input into the neural network model to detect whether there is information on the use of a moiré removal tool. For example, the image features detected in the image can be compared with the image features of an image that has used a moiré removal tool, and if the degree of match is close, it can be determined that the time-domain feature map is an image obtained by processing using a moiré removal tool.

[0091] The ID card reshooting recognition device provided by the embodiment of the present application preprocesses the target ID card image to obtain a time-domain feature map and performs a Fourier transform operation on the target ID card image to obtain a frequency-domain feature map. Each feature point in the time-domain feature map and the frequency-domain feature map is respectively mapped into the first and second two-dimensional coordinate systems. The vertical coordinate directions of the first two-dimensional coordinate system and the second two-dimensional coordinate system are parallel to each other, and the horizontal coordinate directions are perpendicular to each other. Then, it compares multiple first wave peaks in the first waveform formed by the feature points of the time-domain feature map in the first two-dimensional coordinate system with multiple second wave peaks in the second waveform formed by the feature points of the frequency-domain feature map in the second two-dimensional coordinate system to determine whether there is a wave peak intersection area. According to the wave peak intersection area, it determines the first reshooting recognition mark that the target ID card image is a secondary reshooting image. Therefore, by extracting the time-domain and frequency-domain feature maps and distributing the feature points therein in the two-dimensional coordinate system, it can compare the feature distributions in these two spaces of time domain and frequency domain to determine whether there is an area where the parts with gentle wave peak changes intersect each other, and thereby determine whether the ID card image is a reshot image. Compared with the existing solution that only determines by image feature recognition, it can perform reshooting recognition through each feature point in the image, greatly improving the recognition accuracy and efficiency.

[0092] Embodiment III

[0093] The internal functions and structures of the ID card reshooting recognition device have been described above, and this device can be implemented as an electronic device. Figure 3 It is a schematic structural diagram of the electronic device embodiment provided by the present application. As Figure 3 shown, this electronic device includes a memory 31 and a processor 32.

[0094] The memory 31 is used to store programs. In addition to the above programs, the memory 31 can also be configured to store various other data to support operations on the electronic device. Examples of these data include instructions for any application program or method for operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc.

[0095] The memory 31 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0096] The processor 32 is not limited to a central processing unit (CPU), but may also be a processing chip such as a graphics processing unit (GPU), a field-programmable gate array (FPGA), an embedded neural network processor (NPU), or an artificial intelligence (AI) chip. The processor 32 is coupled to the memory 31 and executes the program stored in the memory 31. When the program runs, it executes the ID card reshooting and recognition method of the first embodiment above.

[0097] Further, as Figure 3 shown, the electronic device may further include other components such as a communication component 33, a power supply component 34, an audio component 35, and a display 36. Figure 3 Only some components are schematically shown in Figure 3 the figure, which does not mean that the electronic device only includes

[0098] The communication component 33 is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device can access a wireless network based on communication standards, such as WiFi, 3G, 4G, or 5G, or a combination thereof. In an exemplary embodiment, the communication component 33 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 33 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0099] The power supply component 34 provides power for various components of the electronic device. The power supply component 34 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device.

[0100] The audio component 35 is configured to output and / or input audio signals. For example, the audio component 35 includes a microphone (MIC). When the electronic device is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive external audio signals. The received audio signals can be further stored in the memory 31 or sent via the communication component 33. In some embodiments, the audio component 35 further includes a speaker for outputting audio signals.

[0101] The display 36 includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can detect not only the boundaries of touch or swipe actions, but also the duration and pressure associated with the touch or swipe operations.

[0102] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments; and the foregoing storage medium includes: various media such as ROM, RAM, magnetic disks, or optical discs that can store program codes.

[0103] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for photographing and recognizing an identity card, characterized in that, include: Preprocessing the target ID card image to obtain a time domain feature map of the target ID card image, wherein each point in the time domain feature map has a first feature value and a first time value corresponding to the first feature value; Performing a Fourier transform operation on the target ID card image to obtain a frequency domain feature map, wherein each point in the frequency domain feature map has a second eigenvalue and a second frequency value corresponding to the second eigenvalue; Mapping each feature point in the time domain feature map to a first two-dimensional coordinate system, and mapping each feature point in the frequency domain feature map to a second two-dimensional coordinate system, wherein a first horizontal coordinate direction of the first two-dimensional coordinate system and a second horizontal coordinate direction of the second two-dimensional coordinate system are perpendicular to each other, and a first vertical coordinate direction of the first two-dimensional coordinate system and a second vertical coordinate direction of the second two-dimensional coordinate system are parallel to each other; Comparing a plurality of first peaks in a first waveform diagram formed by each feature point of the time domain feature diagram in the first two-dimensional coordinate system with a plurality of second peaks in a second waveform diagram formed by each feature point of the frequency domain feature diagram in the second two-dimensional coordinate system to determine whether there is a peak intersection region, in which the change amplitudes of the first peak and the second peak are less than a preset threshold and the first peak and the second peak intersect with each other; According to the wave peak intersection area, it is determined that the target ID card image is a first copy recognition mark of the secondary copy image.

2. The method for identifying a photographed identity card according to claim 1, wherein Before performing Fourier transform operation on the target ID card image to obtain the frequency domain feature map, the method further includes: The target ID card image is subjected to a histogram equalization process to obtain a target ID card image with a predetermined brightness.

3. The method for identifying a photographed ID card according to claim 1, wherein The comparing a plurality of first wave peaks in a first waveform graph formed by each feature point of the time domain feature graph in the first two-dimensional coordinate system with a plurality of second wave peaks in a second waveform graph formed by each feature point of the frequency domain feature graph in the second two-dimensional coordinate system comprises: Inputting the time domain feature map and the frequency domain feature map into a first graph neural network model; Determine the weight coefficients of the time domain feature graph and the frequency domain feature graph using the first graph neural network model to respectively perform weighted processing on the first eigenvalue and the first time value of each feature point in the time domain feature graph and the second eigenvalue and the second frequency value of each feature point in the frequency domain feature graph; Overlapping a first two-dimensional coordinate system to which each feature point in the time domain feature map after weighted processing is mapped and a second two-dimensional coordinate system to which each feature point in the frequency domain feature map after weighted processing is mapped; Acquire a region where the change amplitude of the first wave crest and the second wave crest in the first two-dimensional coordinate system and the second two-dimensional coordinate system after being overlapped and superimposed is less than a preset threshold and intersects with each other as the wave crest intersection region, Determining, based on the wave peak intersection area, a first re-photographed identification mark indicating that the target ID card image is a second-photographed image includes: Calculate the time-domain feature information and frequency-domain feature information included in the peak intersection region by using a pre-trained classification model to obtain a classification evaluation value of the peak intersection region; Determine the first reshooting identification mark according to the classification evaluation value.

4. The method for identifying a photocopy of an identity card according to claim 1, wherein It further includes: Perform moiré detection on the time-domain feature map; When the moiré detection result indicates that the time-domain feature map contains moiré, output a second reshooting identification mark indicating that the target ID card image is a screen reshot image.

5. The method for identifying the photographed ID card according to claim 4, wherein It further includes: When the moiré detection result indicates that the time-domain feature map does not contain moiré, input the time-domain feature map into a second graph neural network model to obtain an identification result indicating whether there is moiré removal tool usage information in the time-domain feature map; When the identification result output by the second graph neural network model indicates that there is moiré removal tool usage information in the time-domain feature map, output a second reshooting identification mark indicating that the target ID card image is a screen reshot image.

6. The identity card photographing and recognition method according to claim 3, characterized in that It further includes: Obtain an original ID card image, where the original ID card image is an existing ID card image; Perform a random rotation process on the original ID card image to obtain a first processed image; Perform a displacement process on the original ID card image to obtain a second processed image; Perform a shearing process on the original ID card image to obtain a third processed image; Perform a flipping process on the original ID card image to obtain a fourth processed image; Perform a brightness adjustment process on the original ID card image to obtain a fifth processed image; Perform a contrast adjustment process on the original ID card image to obtain a sixth processed image; Perform a hue adjustment process on the original ID card image to obtain a seventh processed image; Form an image data set with one or more of the original ID card image, the first processed image, the second processed image, the third processed image, the fourth processed image, the fifth processed image, the sixth processed image, and the seventh processed image; Use the image data set to train the first graph neural network model.

7. The method for identifying a photographed ID card according to claim 3, wherein It further includes: Obtain an original ID card image, where the original ID card image is an existing ID card image; Add random noise to the original ID card image to obtain an adversarial sample image, where the random noise is moiré or an adversarial pattern bound to other label categories; Input the adversarial sample image into the first graph neural network model for adversarial training.

8. An identity card photographing and recognition device, characterized in that It includes: A preprocessing module for preprocessing a target ID card image to obtain a time-domain feature map of the target ID card image, where each feature point in the time-domain feature map has a first feature value and a first time value corresponding to the first feature value; A transformation module for performing a Fourier transform operation on the target ID card image to obtain a frequency-domain feature map, where each feature point in the frequency-domain feature map has a second feature value and a second frequency value corresponding to the second feature value; A mapping module, used to map each feature point in the time domain feature map to a first two-dimensional coordinate system, and map each feature point in the frequency domain feature map to a second two-dimensional coordinate system, wherein a first horizontal coordinate direction of the first two-dimensional coordinate system and a second horizontal coordinate direction of the second two-dimensional coordinate system are perpendicular to each other, and a first vertical coordinate direction of the first two-dimensional coordinate system and a second vertical coordinate direction of the second two-dimensional coordinate system are parallel to each other; a comparison module, configured to compare a plurality of first peaks in a first waveform diagram formed by each feature point of the time domain feature diagram in the first two-dimensional coordinate system with a plurality of second peaks in a second waveform diagram formed by each feature point of the frequency domain feature diagram in the second two-dimensional coordinate system, so as to determine whether there is a peak intersection region, in which the variation amplitudes of the first peak and the second peak are less than a preset threshold and the first peak and the second peak intersect with each other; The determination module is used to determine that the target ID card image is a first re-photographed identification mark of a secondary re-photographed image according to the wave peak intersection area.

9. A computer-readable storage medium having stored thereon a computer program executable by a processor, wherein, When the program is executed by a processor, the ID card photocopying and recognition method as described in any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that, include: Memory, used to store programs; A processor is used to run the program stored in the memory to execute the ID card photocopying and recognition method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Training method and detection method for automatically identifying copied images of original document

    CN110717450A

  • Copied image recognition method and device, equipment and medium

    CN111191568A