A high-imitation fake certificate detection method and device

CN116543408BActive Publication Date: 2026-08-18ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310438971.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-18
Publication Date
2026-08-18
Estimated Expiration
2043-04-18

AI Technical Summary

Technical Problem

而彩色打印证件和高仿证件等假证与真证件区别较小,真实的假证数据也较少,从而证件检测的难度增大了

Benefits of technology

[0047] The beneficial effects of the high-quality counterfeit document detection method described in the embodiments of this specification are as follows: by collecting multiple frames of document images under different environments, rich document information can be obtained, and then the content of the document images can be analyzed in multiple dimensions; the process of dividing each frame of document image into blocks includes a dimensionality reduction process, which can save space costs and effectively improve the computing speed; by performing spatial and temporal encoding on the features of each block in the document image, the spatiotemporal features representing the changes of each position of the document image under different environments can be obtained, thereby accurately identifying and intercepting high-quality counterfeit documents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116543408B_ABST
    Figure CN116543408B_ABST
Patent Text Reader

Abstract

The embodiment of the specification discloses a high-imitation fake certificate detection method, comprising: acquiring multiple frames of certificate images under different environments collected by a client; performing block division on each frame of certificate image respectively by using the same division mode; performing feature extraction on each block in each frame of certificate image to obtain block features corresponding to each block respectively; performing spatial coding on the features of each block according to the position of each block in the certificate image to obtain spatial features corresponding to each block in the certificate image; for each position divided in any certificate image, performing time coding on the spatial features of the blocks located at the position in different frames of certificate image to obtain space-time features corresponding to the position, so as to represent the changes of the part in the certificate located at the position under different environments; and judging whether the certificate is a fake certificate according to the space-time features corresponding to each position respectively. Accordingly, the application discloses a high-imitation fake certificate detection device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to image processing technology, and more particularly to a method and apparatus for detecting high-quality counterfeit documents. Background Technology

[0002] In the ongoing promotion of the digital economy, digital identities have been widely adopted. As credentials authorizing merchants to use real-name information, the security of user digital identities is paramount, and the core of digital identity commercialization lies in document anti-counterfeiting algorithms. During the eKYC (online remote account opening) identity verification process, attackers frequently use color-printed documents or high-quality counterfeit documents to deceive the eKYC system. Therefore, regulations require that online identity verification services be able to intercept all high-quality counterfeit documents. Since color-printed documents and high-quality counterfeit documents are very similar to genuine documents, and there is relatively little genuine counterfeit data, document detection becomes more difficult.

[0003] Therefore, we hope to obtain a new method for detecting high-quality counterfeit documents to enhance the ability to intercept color-printed documents and high-quality counterfeit documents, and improve the accuracy of counterfeit document identification. Summary of the Invention

[0004] One of the objectives of this invention is to provide a method for detecting high-quality counterfeit documents. This method can detect changes in documents under different environments, thereby effectively distinguishing high-quality counterfeit documents from genuine documents, strengthening the interception capability of color-printed documents and high-quality counterfeit documents, and improving the accuracy of counterfeit document identification.

[0005] In accordance with the aforementioned objective, this specification provides an embodiment of a method for detecting high-quality counterfeit documents, the method comprising:

[0006] Acquire multiple frames of document images captured by the client under different environments;

[0007] Using the same partitioning method, each frame of the document image is divided into blocks;

[0008] Feature extraction is performed on each block in each frame of the ID image to obtain the block features corresponding to each block in the ID image;

[0009] Based on the location of each block in the document image, the block features corresponding to each block are spatially encoded to obtain the spatial features corresponding to each block in the document image.

[0010] For each location defined in any document image, the spatial features of the block located at that location in different frames of document images are temporally encoded to obtain the spatiotemporal features corresponding to that location. The spatiotemporal features are used to represent the changes of the part of the document located at that location under different environments.

[0011] The document is determined to be fake based on the spatiotemporal characteristics corresponding to each location.

[0012] The high-quality counterfeit document detection method described in this specification acquires multiple frames of document images under different environments, which is beneficial for obtaining rich document information and performing multi-dimensional analysis of the content of the document images. The block division of each frame of document image includes a dimensionality reduction process, which can save space costs and effectively improve the computing speed. By performing spatial and temporal encoding on the features of each block in the document image, the spatiotemporal features representing the changes of each position of the document image under different environments can be obtained, thereby accurately identifying and intercepting high-quality counterfeit documents.

[0013] Furthermore, in some implementations, the same partitioning method is used to divide each frame of the ID image into blocks, including:

[0014] Using the same division method, each frame of the ID card image is divided into several overlapping blocks.

[0015] Furthermore, in some embodiments, for each location defined in any document image, the spatial features of the block located at that location in different frames of document images are temporally encoded to obtain the spatiotemporal features corresponding to that location, including:

[0016] The spatial features located at different positions in the same frame of the document image are stitched together;

[0017] For each location defined in any document image, the spatial features of the block located at that location in different frames of document images are temporally encoded to obtain the spatiotemporal features corresponding to that location.

[0018] Furthermore, in some embodiments, the different environments include ordinary lighting environments and flash lighting environments.

[0019] In some more specific implementations, since the anti-counterfeiting marks of genuine certificates change significantly under different lighting conditions, while those of counterfeit certificates remain unchanged, counterfeit certificates can be effectively and accurately identified and intercepted based on the spatiotemporal characteristics of the anti-counterfeiting mark positions in the certificate image. The anti-counterfeiting marks include laser film, laser anti-counterfeiting patterns, and chips.

[0020] In some other implementations, in order to more clearly obtain the changes of the document in different environments, the document images can be captured from different angles by a mobile client device.

[0021] Furthermore, in some implementations, after acquiring multiple frames of document images under different environments collected by the client, the method further includes aligning the multiple frames of document images under different environments.

[0022] In some more specific implementations, the SIFT algorithm or optical flow tracing algorithm can be used to align multiple frames of document images under different environments.

[0023] Furthermore, in some embodiments, aligning multiple frames of document images under different environments includes:

[0024] Corner point extraction was performed on multiple frames of document images under different environments;

[0025] Based on the first frame of the multi-frame document images, affine transformations are performed on the remaining document images according to the extracted corner points.

[0026] Furthermore, in some implementations, after acquiring multiple frames of document images from different environments captured by the client, the process further includes:

[0027] The quality of the multiple frames of document images is checked;

[0028] If the quality check passes, feature extraction is performed on the multiple frames of the ID card image to obtain several feature vectors corresponding to each frame of the ID card image; if the quality check fails, the client is required to re-capture the multiple frames of the ID card image.

[0029] Another objective of this invention is to provide a high-quality counterfeit document detection device. This device can detect changes in the document under different environments based on multiple frames of document images collected, thereby effectively distinguishing high-quality counterfeit documents from genuine documents and enhancing the interception capability of color-printed documents and high-quality counterfeit documents.

[0030] In accordance with the aforementioned objective, this specification provides an embodiment of a high-quality counterfeit document detection device, comprising:

[0031] The sample acquisition module is used to acquire multiple frames of document images under different environments;

[0032] The feature extraction module is used to divide each frame of the ID image into blocks using the same partitioning method; and to extract features from each block in each frame of the ID image to obtain the block features corresponding to each block in the ID image.

[0033] The spatiotemporal modeling module is used to spatially encode the block features corresponding to each block according to the position of each block in the document image, so as to obtain the spatial features corresponding to each block in the document image; for each position divided in any document image, the spatial features of the block located at that position in different frames of document images are temporally encoded to obtain the spatiotemporal features corresponding to that position, and the spatiotemporal features are used to represent the changes of the part of the document located at that position in different environments;

[0034] The judgment module is used to determine whether the document is a fake document based on the spatiotemporal characteristics corresponding to each location.

[0035] Furthermore, in some embodiments, the sample acquisition module aligns the client mobile device with the document to be detected; the client mobile device is moved to acquire at least two frames of document images under different environments.

[0036] Furthermore, in some embodiments, the different environments include ordinary lighting environments and flash lighting environments.

[0037] In some more specific implementations, since the anti-counterfeiting marks of genuine certificates change significantly under different lighting conditions, while those of counterfeit certificates remain unchanged, counterfeit certificates can be effectively and accurately identified and intercepted based on the spatiotemporal characteristics of the anti-counterfeiting mark positions in the certificate image. The anti-counterfeiting marks include laser film, laser anti-counterfeiting patterns, and chips.

[0038] Furthermore, in some embodiments, the feature extraction module uses the same division method to divide each frame of the document image into several overlapping blocks.

[0039] Furthermore, in some embodiments, the spatiotemporal modeling module stitches together the spatial features located at different positions in the same frame of the ID card image; for each position divided in any ID card image, the spatial features of the block located at that position in different frames of the ID card image are temporally encoded to obtain the spatiotemporal features corresponding to that position.

[0040] Furthermore, in some embodiments, after the sample acquisition module acquires multiple frames of document images under different environments collected by the client, it also includes aligning the multiple frames of document images under different environments.

[0041] In some more specific implementations, the SIFT algorithm or optical flow tracing algorithm can be used to align multiple frames of document images under different environments.

[0042] Furthermore, in some embodiments, the sample acquisition module extracts corner points from multiple frames of document images under different environments; based on the first frame of the multiple document images, an affine transformation is performed on the remaining document images according to the extracted corner points.

[0043] Furthermore, in some embodiments, after the sample acquisition module acquires multiple frames of document images under different environments collected by the client, it further includes:

[0044] The sample acquisition module performs quality detection on the multi-frame document images;

[0045] If the quality check passes, feature extraction is performed on the multiple frames of the ID card image to obtain several feature vectors corresponding to each frame of the ID card image; if the quality check fails, the client is required to re-capture the multiple frames of the ID card image.

[0046] This specification also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the program to implement the above-described high-quality counterfeit document detection method.

[0047] The beneficial effects of the high-quality counterfeit document detection method described in the embodiments of this specification are as follows: by collecting multiple frames of document images under different environments, rich document information can be obtained, and then the content of the document images can be analyzed in multiple dimensions; the process of dividing each frame of document image into blocks includes a dimensionality reduction process, which can save space costs and effectively improve the computing speed; by performing spatial and temporal encoding on the features of each block in the document image, the spatiotemporal features representing the changes of each position of the document image under different environments can be obtained, thereby accurately identifying and intercepting high-quality counterfeit documents.

[0048] The high-quality counterfeit document detection device described in the embodiments of this specification also has the above-mentioned beneficial effects. Attached Figure Description

[0049] Figure 1 An exemplary schematic diagram illustrates the application of the high-quality counterfeit document detection method described in the embodiments of this specification in a specific embodiment.

[0050] Figure 2 The following is an exemplary schematic diagram illustrating the steps of one implementation of the high-quality counterfeit document detection method described in the embodiments of this specification.

[0051] Figure 3 An exemplary flowchart of one implementation of the high-quality counterfeit document detection method described in the embodiments of this specification is shown.

[0052] Figure 4 The illustration shows a schematic diagram of the block division method in one embodiment of the high-quality counterfeit document detection method described in this specification.

[0053] Figure 5 The illustration shows a schematic diagram of the spatiotemporal coding method in one implementation of the high-quality counterfeit document detection method described in the embodiments of this specification.

[0054] Figure 6 The diagram illustrates, by way of example, a structural schematic of the high-quality counterfeit document detection device described in one embodiment of this specification. Detailed Implementation

[0055] The following will provide a more detailed description of the high-quality counterfeit document detection method and apparatus described in the embodiments of this specification, in conjunction with the accompanying drawings and specific examples. However, this detailed description does not constitute a limitation on the embodiments of this specification.

[0056] During the online identity verification process, it is necessary to collect and recognize the user's document image to verify the authenticity of the document. After confirming the compliance of the document, the user's identity information in the image is extracted to facilitate subsequent services. Figure 1 An exemplary schematic diagram illustrates the application of the high-quality counterfeit document detection method described in the embodiments of this specification in a specific embodiment.

[0057] The document recognition process generally consists of two modules: a data acquisition module and a recognition module. The data acquisition module includes document acquisition, quality compliance testing, anti-counterfeiting detection, and OCR recognition. In the acquisition module, the client acquires at least two clear and complete image frames of the document through document positioning and tracking, and uploads them to the server. These image frames can be acquired from different environments; for example, normal frames can be acquired under normal lighting conditions, while flash frames can be acquired under flash lighting conditions. In the recognition module, the server first performs simple preprocessing on the acquired image frames, including image classification, document positioning and alignment, and document orientation correction. This unifies the size and shape of each image frame and removes background interference. Furthermore, the server performs quality compliance testing on the image frames, checking their clarity, completeness, reflectivity, and signature to ensure they meet regulations.

[0058] Methods for identifying counterfeit documents include anti-material attack detection and information tampering detection. Anti-material attack detection is used to intercept counterfeit documents obtained through screen capture, color printing, and high-quality imitations. Information tampering detection is used to intercept alterations such as occlusion of the image, text line alteration, and Photoshop manipulation. This specification's embodiments improve the anti-counterfeiting detection algorithms for physical counterfeit documents, such as color-printed and high-quality imitations. After passing the document anti-counterfeiting detection, the server uses OCR to extract the identity information from the document image for verification.

[0059] Figure 2 The following is an exemplary schematic diagram illustrating the steps of one implementation of the high-quality counterfeit document detection method described in the embodiments of this specification.

[0060] The steps of the anti-counterfeiting detection algorithm in the embodiments of this specification include: receiving at least two frames of document images collected by the client; extracting block features at different locations in each frame of document images through a feature extraction network such as CNN; inputting all obtained block features into a spatiotemporal modeling network such as Transformer network for spatiotemporal encoding; and determining whether the document is a fake document based on the spatiotemporal features obtained by spatiotemporal encoding. The spatiotemporal encoding can represent the changes in different locations in the document image under different environments.

[0061] In one embodiment of this specification, a method for detecting highly counterfeit documents is proposed. Figure 3 An exemplary flowchart of one implementation of the high-quality counterfeit document detection method described in the embodiments of this specification is shown.

[0062] like Figure 3 As shown, the specific methods include:

[0063] 100: Acquire multi-frame ID card images collected by the client under different environments, wherein each multi-frame ID card image contains at least two frames.

[0064] The client can be a smartphone, tablet, camera, or other device with image acquisition capabilities. It can also communicate with the server to upload the acquired images to the server for processing.

[0065] In some embodiments, different environments include ordinary lighting environments and flash lighting environments, wherein the ordinary lighting environment includes environments with various natural light intensity, artificial light intensity, and other light source brightness.

[0066] Because the anti-counterfeiting features of genuine documents change significantly under different lighting conditions, while those of counterfeit documents remain unchanged, counterfeit documents can be effectively and accurately identified and intercepted based on the spatiotemporal characteristics of the anti-counterfeiting feature's position in the document image. In some more specific embodiments, the anti-counterfeiting features include a laser film, a laser anti-counterfeiting pattern, and a chip. Under flash illumination, the laser anti-counterfeiting pattern and chip will appear bright, while the laser film will appear bright with color.

[0067] In some specific embodiments, when capturing document images, the client is aligned with the document to be detected, and the client is moved to capture at least two frames of document images under different environments. This allows for a more complete record of how the document changes under different lighting conditions by capturing images from different angles, thus better distinguishing between high-quality counterfeit documents and genuine documents.

[0068] In some embodiments, after acquiring multiple frames of document images under different environments collected by the client, the method further includes aligning the multiple frames of document images under different environments.

[0069] Preprocessing multiple frames of document images before analysis can unify the size and shape of each frame, remove background interference, improve the processing speed of high-quality counterfeit document detection, and save computing costs.

[0070] In some more specific embodiments, the document alignment method includes:

[0071] Corner point extraction is performed on multiple frames of ID card images under different environments;

[0072] Based on the first frame of a multi-frame ID card image, affine transformations are performed on the remaining ID card images according to the extracted corner points.

[0073] Optionally, a regression-based corner detection algorithm can be used to extract corners, and the SIFT algorithm or optical flow tracing algorithm can be used to align multiple frames of document images under different environments, which can quickly achieve image alignment.

[0074] 102: Using the same partitioning method, each frame of the document image is divided into blocks.

[0075] By pre-setting the desired block size and step size, the pixels in the ID card image are traversed to divide each frame of the ID card image into blocks, transforming the original two-dimensional image into a series of one-dimensional blocks, thus turning the visual problem into a more easily solved encoding-decoding problem.

[0076] Each block in each frame of the ID card image represents a fixed position in that frame. Therefore, it is necessary to maintain a table to store the position information of the blocks. The number of rows in the table is the same as the number of blocks, and each row represents the position code represented by the corresponding block.

[0077] In some embodiments, each frame of the document image is divided into several overlapping blocks using the same partitioning method.

[0078] Figure 4 The illustration shows a schematic diagram of the block division method in one embodiment of the high-quality counterfeit document detection method described in this specification.

[0079] like Figure 4 As shown, in some embodiments, the block partitioning method combines the characteristics of nonlinearity, overlapping features and progressive channel expansion. By adding two convolutional layers to the backbone network for feature extraction, it not only reduces the dimensionality of the original multi-frame ID image, saving space costs and effectively improving the computing speed, but also obtains more representative block features with a larger receptive field and stronger local information expression ability.

[0080] 104: For each frame of the ID card image, feature extraction is performed on each block in the ID card image to obtain the block features corresponding to each block in the ID card image.

[0081] In some specific embodiments, CNN or other existing feature extraction networks can be used to extract features from each block in each frame of the document image.

[0082] 106: Based on the location of each block in the document image, spatial encoding is performed on the block features corresponding to each block to obtain the spatial features corresponding to each block in the document image.

[0083] To facilitate the combined description of spatial and temporal coding, they will not be elaborated upon here, but will be explained in specific embodiments.

[0084] 108: For each location defined in any document image, the spatial features of the block located at that location in different frames of document images are temporally encoded to obtain the spatiotemporal features corresponding to that location. The spatiotemporal features are used to represent the changes of the part of the document located at that location under different environments.

[0085] 110: Determine whether the document is fake based on the spatiotemporal characteristics corresponding to each location.

[0086] Spatiotemporal features can represent the changes of a particular location on a document under different environments. For example, the changes of anti-counterfeiting marks on a document under different lighting conditions. Under flash lighting, the anti-counterfeiting marks on a genuine document will appear as bright marks, while those on a counterfeit document will not change. Therefore, the spatiotemporal features contain the brightness and color information of the anti-counterfeiting marks. Counterfeit documents can be effectively and accurately identified and intercepted based on these spatiotemporal features. These spatiotemporal features are then input into the fully connected layer of the model for classification.

[0087] Figure 5 The illustration shows a schematic diagram of the spatiotemporal coding method in one implementation of the high-quality counterfeit document detection method described in the embodiments of this specification.

[0088] In some embodiments, after dividing multiple frames of document images into blocks and extracting block features, the block features corresponding to each block are spatially encoded according to the position of each block in the document image, so as to obtain the spatial features corresponding to each block in the document image. For example... Figure 5 As shown, each frame of the ID card image uses a spatial encoder. In each frame, each block contains its corresponding index and an extracted block feature vector. The same index represents the same location in different frames, while the block feature vector represents the features of the image location corresponding to that block. Each block is encoded with other blocks in the same frame by the spatial encoder to obtain the positional relationship between the block and other blocks, thus obtaining the spatial features of that block. Specifically, a cls value is added at index 0 to summarize the features of each frame of the ID card image for input into the fully connected MLP layer for classification.

[0089] Next, for each location defined in any frame of the ID card image, the spatial features of the block located at that location in different frames of the ID card image are temporally encoded to obtain the spatiotemporal features corresponding to that location. These spatiotemporal features are used to represent the changes in the portion of the ID card located at that location under different environments. For example... Figure 5As shown, for blocks with the same index in different frames of ID card images, a time encoder is used for time encoding to obtain the change in the position of the block corresponding to that index in the ID card image under different environments, which serves as the spatiotemporal feature of that position. During time encoding, a cls value is also added at index 0 to facilitate classification.

[0090] In some embodiments, spatial features located at different positions in the same frame of an ID card image are stitched together; then, for each position divided in any ID card image, the spatial features of the block located at that position in different frames of ID card images are temporally encoded to obtain the spatiotemporal features corresponding to that position.

[0091] By stitching together the spatial features of each block in the same frame of the document image, the problem is transformed into encoding between multiple long vectors, making the temporal encoding process more orderly and avoiding omissions. Finally, the input to the fully connected layer is also a long vector, which can reduce the workload of the fully connected layer.

[0092] In some embodiments, a Transformer network can be used to encode multiple frames of document images, with Transformer encoders serving as both spatial and temporal encoders. Since real fake document data is scarce, and the model has low data dependency during training and possesses certain computational efficiency, it can quickly and effectively complete model training and high-quality fake document detection.

[0093] The high-quality counterfeit document detection method described in this specification acquires multiple frames of document images under different environments, and further acquires multiple frames of document images from different angles under different lighting conditions. This allows for the acquisition of relatively complete document information, facilitating multi-dimensional analysis of the document image content. The method includes a dimensionality reduction process when dividing each frame of the document image into blocks, which saves space costs and effectively improves the computing speed. Dividing each frame of the document image into overlapping blocks gives the resulting blocks a stronger ability to express local information. By spatially and temporally encoding the features of each block in the document image, spatiotemporal features representing the changes in various positions of the document image under different environments can be obtained. These spatiotemporal features further imply the morphological changes of anti-counterfeiting marks in the document image under different environments, thereby enabling accurate identification and interception of high-quality counterfeit documents.

[0094] In another embodiment of this specification, a high-quality counterfeit document detection device is proposed. Figure 6 The diagram illustrates, by way of example, a structural schematic of the high-quality counterfeit document detection device described in one embodiment of this specification.

[0095] like Figure 6 As shown, it includes:

[0096] The sample acquisition module 20 is used to acquire multi-frame ID card images under different environments, wherein the multi-frame ID card images contain at least two frames.

[0097] The feature extraction module 22 is used to divide each frame of the ID image into blocks using the same division method; for each frame of the ID image, feature extraction is performed on each block in the ID image to obtain the block features corresponding to each block in the ID image.

[0098] The spatiotemporal modeling module 24 is used to spatially encode the block features corresponding to each block according to the position of each block in the document image, so as to obtain the spatial features corresponding to each block in the document image; for each position divided in any document image, the spatial features of the block located at that position in different frames of document images are temporally encoded to obtain the spatiotemporal features corresponding to that position, and the spatiotemporal features are used to represent the changes of the part of the document located at that position in different environments.

[0099] The judgment module 26 is used to determine whether the document is fake based on the spatiotemporal characteristics corresponding to each location.

[0100] In the sample acquisition module, devices with image acquisition capabilities, such as smartphones, tablets, and cameras, can be used to acquire samples. They can also communicate with the server to upload the acquired images to the server for processing.

[0101] In some embodiments, different environments include normal lighting environments and flash lighting environments.

[0102] Because the anti-counterfeiting features of genuine documents change significantly under different lighting conditions, while those of counterfeit documents remain unchanged, counterfeit documents can be effectively and accurately identified and intercepted based on the spatiotemporal characteristics of the anti-counterfeiting feature's position in the document image. In some more specific embodiments, the anti-counterfeiting features include a laser film, a laser anti-counterfeiting pattern, and a chip. Under flash illumination, the laser anti-counterfeiting pattern and chip will appear bright, while the laser film will appear bright with color.

[0103] In some specific embodiments, the sample acquisition module aligns the client image acquisition device with the document to be detected and moves the image acquisition device to acquire at least two frames of document images under different environments. This allows for a more complete record of how the document changes under different lighting conditions by acquiring images from different angles, thus better distinguishing between high-quality counterfeit documents and genuine documents.

[0104] In some embodiments, after the sample acquisition module acquires multiple frames of document images under different environments, it further includes aligning the multiple frames of document images under different environments.

[0105] Before analyzing multiple frames of document images, the sample acquisition module preprocesses them, which can unify the size and shape of each frame of document images and remove the interference of background factors, thereby improving the computing speed of high-quality counterfeit document detection and saving computing costs.

[0106] In some more specific embodiments, the document alignment method includes:

[0107] The sample acquisition module extracts corner points from multiple frames of document images under different environments;

[0108] Based on the first frame of a multi-frame ID card image, affine transformations are performed on the remaining ID card images according to the extracted corner points.

[0109] Optionally, a regression-based corner detection algorithm can be used to extract corners, and the SIFT algorithm or optical flow tracing algorithm can be used to align multiple frames of document images under different environments, which can quickly achieve image alignment.

[0110] In the feature extraction module, the desired block size and step size are preset, and the pixels in the document image are traversed to divide each frame of the document image into blocks, transforming the original two-dimensional image into a series of one-dimensional blocks, thus transforming the visual problem into a more easily solved encoding-decoding problem.

[0111] In some embodiments, the feature extraction module divides each frame of the ID image into several overlapping blocks using the same partitioning method. This block partitioning method combines the characteristics of nonlinearity, overlapping features, and progressive channel expansion. By adding two convolutional layers to the backbone network for feature extraction, it not only reduces the dimensionality of the original multi-frame ID image, saving space costs and effectively improving the computation speed, but also obtains more representative block features with a larger receptive field and stronger local information representation ability.

[0112] In some specific embodiments, the feature extraction module may use CNN or other existing feature extraction networks to extract features from each block in each frame of the document image.

[0113] In the spatiotemporal modeling module, in some embodiments, each frame of the ID card image corresponds to a spatial encoder. Each block in each frame contains its corresponding index and an extracted block feature vector. The same index represents the same location in different frames, while the block feature vector represents the features of the image location corresponding to that block. Each block is encoded with other blocks in the same frame by the spatial encoder in the spatiotemporal modeling module to obtain the positional relationship between the block and other blocks, thereby obtaining the spatial features of the block. Specifically, a cls value is added at index 0 to summarize the features of each frame of the ID card image for input into the fully connected MLP layer for classification.

[0114] Next, for each location defined in any frame of the ID card image, the spatial features of the block located at that location in different frames of the ID card image are temporally encoded to obtain the corresponding spatiotemporal features. These spatiotemporal features represent the changes in the portion of the ID card located at that location under different environments. For blocks with the same index in different frames of the ID card image, temporal encoding is performed using the temporal encoder in the spatiotemporal modeling module to obtain the changes in the block position corresponding to that index in the ID card image under different environments, which serve as the spatiotemporal features for that location. During temporal encoding, a cls value is also added at index 0 to facilitate classification.

[0115] In some embodiments, the spatiotemporal modeling module stitches together spatial features located at different positions in the same frame of the ID card image; then, for each position divided in any ID card image, the spatial features of the block located at that position in different frames of the ID card image are temporally encoded to obtain the spatiotemporal features corresponding to that position.

[0116] By stitching together the spatial features of each block in the same frame of the document image, the problem is transformed into encoding between multiple long vectors, making the temporal encoding process more orderly and avoiding omissions. Finally, the input to the fully connected layer is also a long vector, which can reduce the workload of the fully connected layer.

[0117] In some embodiments, the spatiotemporal modeling module can use a Transformer network to encode multiple frames of document images, employing Transformer encoders as both spatial and temporal encoders. Since real fake document data is scarce, and the model has low data dependency during training and possesses certain computational efficiency, it can quickly and effectively complete model training and high-quality fake document detection.

[0118] In the judgment module, spatiotemporal features can represent the changes of this position of the document in different environments. For example, the changes of the anti-counterfeiting mark on the document under different lighting conditions. Under flash lighting, the anti-counterfeiting mark on the genuine document will appear as a bright shape, while the counterfeit document will not have any change. Therefore, the spatiotemporal features contain the brightness and color information of the anti-counterfeiting mark. Based on these spatiotemporal features, counterfeit documents can be effectively and accurately identified and intercepted. The judgment module classifies the spatiotemporal features through a fully connected layer.

[0119] This specification also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the program to implement the above-described high-quality counterfeit document detection method.

[0120] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0121] It should be noted that the above examples are merely specific embodiments of the present invention, and the present invention is obviously not limited to the above embodiments, with many similar variations. All modifications that can be directly derived or conceived by those skilled in the art from the content disclosed in this invention should fall within the protection scope of this invention.

Claims

1. A method for detecting high-quality counterfeit documents, the method comprising: Acquire multiple frames of ID card images captured by the client under different lighting conditions; Using the same partitioning method, each frame of the ID card image is divided into several overlapping blocks. Each block has a corresponding index, and the same index represents the same position in different frames of the ID card image. Feature extraction is performed on each block in each frame of the ID image to obtain the block features corresponding to each block in the ID image; Based on the location of each block in the document image, the spatial encoder encodes each block with other blocks in the same frame of the document image to obtain the positional relationship between the block and other blocks, so as to obtain the spatial features corresponding to each block in the document image. The spatial features located in different block positions in the same frame of the ID card image are stitched together. For each block position divided in any ID card image, the spatial features of the blocks with the same index in different frames of ID card images are temporally encoded using a time encoder to obtain the change of the block position corresponding to the index in the ID card image under different environments, which is used as the spatiotemporal feature corresponding to the block position. The document is determined to be fake based on the spatiotemporal characteristics corresponding to the location of each block.

2. The method for detecting high-quality counterfeit documents as described in claim 1, wherein the different lighting environments include ordinary lighting environments and flash lighting environments.

3. The high-fidelity fake document detection method as described in claim 1, after acquiring multiple frames of document images under different lighting conditions collected by the client, further includes aligning the multiple frames of document images under different lighting conditions.

4. The method for detecting high-quality counterfeit documents as described in claim 3, wherein aligning the multiple frames of document images under different lighting conditions includes: Corner point extraction was performed on multiple frames of document images under different lighting conditions; Based on the first frame of the multi-frame document images, affine transformations are performed on the remaining document images according to the extracted corner points.

5. The high-fidelity fake document detection method as described in claim 1, after acquiring multiple frames of document images under different lighting conditions collected by the client, further includes: The quality of the multiple frames of document images is checked; If the quality check passes, feature extraction is performed on the multiple frames of the ID card image to obtain several feature vectors corresponding to each frame of the ID card image; if the quality check fails, the client is required to re-capture the multiple frames of the ID card image.

6. A high-quality counterfeit document detection device, comprising: The sample acquisition module is used to acquire multiple frames of document images under different lighting conditions captured by the client. The feature extraction module is used to divide each frame of the ID card image into several overlapping blocks using the same partitioning method. Each block has a corresponding index, and the same index represents the same position in different frames of the ID card image. Feature extraction is performed on each block in each frame of the ID card image to obtain the block features corresponding to each block in the ID card image. The spatiotemporal modeling module is used to encode each block with other blocks in the same frame of the document image based on the location of each block in the document image, and obtain the positional relationship between the block and other blocks, so as to obtain the spatial features corresponding to each block in the document image. The spatial features located in different block positions in the same frame of the ID card image are stitched together. For each block position divided in any ID card image, the spatial features of the blocks with the same index in different frames of ID card images are temporally encoded using a time encoder to obtain the change of the block position corresponding to the index in the ID card image under different environments, which is used as the spatiotemporal feature corresponding to the block position. The judgment module is used to determine whether the document is a fake document based on the spatiotemporal characteristics corresponding to the location of each block.

7. The high-quality counterfeit document detection device as described in claim 6, wherein the sample collection module is specifically used for: Align the mobile device corresponding to the client with the document to be detected; The mobile device is moved to capture at least two frames of document images under different lighting conditions.

8. The high-quality counterfeit document detection device as described in claim 6, wherein the different lighting environments include ordinary lighting environments and flash lighting environments.

9. The high-quality counterfeit document detection device as described in claim 6, wherein after the sample acquisition module acquires multiple frames of document images under different lighting conditions collected by the client, it further includes aligning the multiple frames of document images under different lighting conditions.

10. The high-quality counterfeit document detection device as described in claim 9, wherein the sample collection module is specifically used for: Corner point extraction was performed on multiple frames of document images under different lighting conditions; Based on the first frame of the multi-frame document images, affine transformations are performed on the remaining document images according to the extracted corner points.

11. The high-quality counterfeit document detection device as described in claim 6, wherein after the sample acquisition module acquires multiple frames of document images under different lighting conditions collected by the client, it further includes: The sample acquisition module performs quality detection on the multi-frame document images; If the quality check passes, feature extraction is performed on the multiple frames of the ID card image to obtain several feature vectors corresponding to each frame of the ID card image; if the quality check fails, the client is required to re-capture the multiple frames of the ID card image.

12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method described in any one of claims 1-5.

Citation Information

Patent Citations

  • Ticket authentication method and device based on image identification, and mobile equipment

    CN102903173A

  • Data authentic identification method, device, equipment and medium

    CN113034433A