A method and system for detecting tampering of certificate document images

Through the structure similarity algorithm and ScSE U-Net network combined with twin network, the problem of insufficient tampering detection capabilities of certificate text image is solved, and efficient detection and positioning of certificate document image is achieved, especially in identifying low quality and secondary The tampering of images significantly improves robustness and recognition capabilities.

CN114419633BActive Publication Date: 2024-12-17XIAMEN MEIYA PICO INFORMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111650672.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2024-12-17
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

The existing technology lacks the ability to detect and locate certificate text images, especially for low-quality images and secondary tampered images, the traditional algorithm is not robust and generalized, and the deep learning algorithm is in the report text images. Limited recognition capability.

Method used

The structural similarity algorithm is used to compare the differences between the original image and the tampered image from brightness, contrast and structure, and train it in combination with ScSE U-Net network and twin network to enhance the robustness and recognition ability of the model, and enhance feature extraction through the scSE module. Using Se-Resnet50 as the feature extraction network, two encoding blocks with no sharing parameters are instantiated to encode tampered images separately to enhance the recognition ability of the model.

Benefits of technology

Effectively improve the tamper detection and positioning capabilities of certificate document images, and can identify certificate document forged images with primary and secondary tampered tampered, providing new ways and methods for forged certificate document images such as certificates, reports, publications, etc. Identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114419633B_ABST
    Figure CN114419633B_ABST
Patent Text Reader

Abstract

Disclosed is a method and system for detecting tampering of images of certificate documents, including first tampering and post-processing of the original image, and second tampering and post-processing based on the first tampering and post-processing to obtain a tampered image; using a structural similarity algorithm to compare the differences of the grayscale images of the original image and the tampered image in terms of brightness, contrast and structure, respectively, to obtain a forged area mask image; inputting the tampered image and the forged area mask image into a ScSE U-Net network and a twin network for training to obtain a detection model; using the detection model to infer the image to be detected to obtain a predicted mask image. The present invention can effectively improve the image tampering detection and positioning capabilities of certificate documents.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a method and system for detecting tampering of certificate document images. Background Art

[0002] The basic operations of PS tampering of images can be divided into four categories, namely copying the same image (copy-move), splicing different images (splicing), removing pixels and filling them with other pixels (remove), generating characters (generated), and using tools to perform edge feathering, brush smearing, color change, etc. to generate high-quality tampered images in these operations. The difficulty in detecting tampering of certificate text is that counterfeiters often perform processing such as median filtering (Median Fitering), Gaussian Blurrin (Gaussian Blurrin), resampling (Reaampling), etc. on the image, and perform secondary tampering after the first tampering to make it difficult for the human eye and even some tampering detection models to identify.

[0003] The methods of PS tampering identification and positioning are mainly divided into traditional identification methods and deep learning-based methods. Traditional identification algorithms are algorithms that extract features based on the statistical characteristics of images, such as DCT-based forgery and tampering detection algorithms, SIFT detection algorithms, resampling trace detection algorithms, etc. Deep learning-based identification algorithms are divided into algorithms based on target detection, such as the dual-stream faster-rcnn algorithm, and algorithms based on semantic segmentation, such as the Unet-based identification algorithm.

[0004] Among all PS tampering identification and positioning algorithms, traditional identification algorithms are based on statistical characteristics for detection and positioning. They have been developed for a long time and have achieved certain detection effects, but they have limitations. For example, the DCT algorithm and SIFT algorithm can only detect the duplication of the same image. The CFA algorithm and resampling algorithm can detect images spliced ​​from different images, but they are not effective in detecting tampering of low-quality images. The shortcomings of traditional algorithms in robustness and generalization have limited their development. The detection and positioning methods based on deep learning are divided into algorithms based on target detection and algorithms based on semantic segmentation. In view of the characteristics that report text images have more text and do not have multiple complete and independent image subjects, this type of problem needs to distinguish each pixel in the image, that is, to determine whether each pixel belongs to the tampered area. Therefore, the instance segmentation algorithm is more applicable than the target detection algorithm. Summary of the invention

[0005] In order to solve the technical problems in the prior art such as weak certificate text image recognition ability, insufficient detection and positioning, etc., the present invention proposes a detection method and system for certificate document image tampering to solve the above technical problems.

[0006] According to one aspect of the present invention, a method for detecting tampering of a certificate document image is proposed, comprising:

[0007] S1: Perform the first tampering and post-processing on the original image, and perform the second tampering and post-processing on the basis of the first tampering and post-processing to obtain the tampered image;

[0008] S2: Use the structural similarity algorithm to compare the differences between the grayscale images of the original image and the tampered image in terms of brightness, contrast and structure, and obtain the mask image of the forged area;

[0009] S3: Input the tampered image and the forged area mask image into the ScSE U-Net network and the twin network for training to obtain a detection model; and

[0010] S4: Use the detection model to infer the image to be detected to obtain a predicted mask image.

[0011] In some specific embodiments, the tampering in step S1 includes copying the same image, splicing different images, removing pixels, filling other pixels and generating characters, and the post-processing includes adding Gaussian blur, JPEG compression and adding noise.

[0012] In some specific embodiments, in the forged region mask image in step S2, the pixel points at the positions without differences are black, and the pixel points at the positions with differences are white.

[0013] In some specific embodiments, the structural similarity algorithm in step S2 characterizes the similarity by the following formula:

[0014]

[0015]

[0016]

[0017] where u X 、u Y The distribution represents the mean of images X and Y, σ X , σ Y Represents the standard deviation of images X and Y, σ XY represents the covariance of images X and Y, C1, C2, and C3 are constants, and the structural similarity algorithm SSIM index is SSIM(X,Y)=L(x,y)*C(X,Y)*S(X,Y).

[0018] In some specific embodiments, the training based on the ScSE U-Net network and the twin network in step S3 specifically includes:

[0019] Based on the twin network, two encoding blocks with the same structure and no shared parameters are instantiated in the network input part, and the tampered image and the tampered image are encoded once and twice respectively; the feature maps are added and output through the decoding block, and each decoding block is followed by the scSE module, where the encoding block, decoding block and bottleneck layer are based on the U-net network structure. Based on this solution, the robustness of the model can be enhanced and the recognition ability can be enhanced.

[0020] In some specific embodiments, the encoding block uses a Se-Resnet50 feature extraction network that adds SE Block on the basis of Resnet. With this setting, the features of important channels can be enhanced.

[0021] In some specific embodiments, the features are concatenated according to the channel dimension during the upsampling process, and the scSE module is added during the upsampling process to obtain the feature map as Among them, the cSE module obtains an indicator to measure the importance of the channel by compressing the spatial information, and the sSE module obtains an indicator to measure the importance of the spatial position by compressing the channel information.

[0022] According to a second aspect of the present invention, a computer-readable storage medium is provided, on which one or more computer programs are stored. When the one or more computer programs are executed by a computer processor, any of the above methods is implemented.

[0023] According to a third aspect of the present invention, a system for detecting tampering of an image of a certificate document is provided, the system comprising:

[0024] An image processing unit is configured to perform a first tampering and post-processing on the original image, and perform a second tampering and post-processing on the basis of the first tampering and post-processing to obtain a tampered image, wherein the tampering includes copying the same image, splicing different images, removing pixels, filling other pixels and generating characters, and the post-processing includes adding Gaussian blur, JPEG compression and adding noise;

[0025] a difference comparison unit, configured to compare the differences of the grayscale images of the original image and the tampered image in terms of brightness, contrast and structure using a structural similarity algorithm, and obtain a forged region mask image, wherein the pixel points at the non-difference position in the forged region mask image are black, and the pixel points at the difference position are white;

[0026] Training model acquisition unit: configured to input the tampered image and the forged area mask map into the ScSE U-Net network and the twin network for training to obtain the detection model;

[0027] Detection unit: configured to use the detection model to reason about the image to be detected to obtain a predicted mask image.

[0028] In some specific embodiments, the structural similarity algorithm characterizes the similarity by the following formula:

[0029]

[0030]

[0031]

[0032] where u X 、u Y The distribution represents the mean of images X and Y, σ X , σ Y Represents the standard deviation of images X and Y, σ XY represents the covariance of images X and Y, C1, C2, and C3 are constants, and the structural similarity algorithm SSIM index is SSIM(X,Y)=L(x,y)*C(X,Y)*S(X,Y).

[0033] In some specific embodiments, training based on the ScSE U-Net network and the twin network specifically includes: instantiating two encoding blocks with the same structure and unshared parameters in the network input part based on the twin network, respectively encoding the first tampered image and the second tampered image; adding the feature maps and outputting them through the decoding block, each decoding block is followed by the scSE module, wherein the encoding block, the decoding block and the bottleneck layer are based on the U-net network structure. Based on this solution, the robustness of the model can be enhanced and the recognition ability can be enhanced.

[0034] In some specific embodiments, the encoding block uses a Se-Resnet50 feature extraction network that adds SE Block on the basis of Resnet. With this setting, the features of important channels can be enhanced.

[0035] In some specific embodiments, the features are concatenated according to the channel dimension during the upsampling process, and the scSE module is added during the upsampling process to obtain the feature map as Among them, the cSE module obtains an indicator to measure the importance of the channel by compressing the spatial information, and the sSE module obtains an indicator to measure the importance of the spatial position by compressing the channel information.

[0036] The present invention proposes a detection method and system for tampering of certificate document images. This method notes that traditional algorithms and existing deep learning algorithms have deficiencies in PS tampered image detection and positioning technology, adds scSE block to the network to enhance the network's image recognition ability, and instantiates two Siamese networks (Siamese Network) with the same network structure and unshared parameters in the network input part to encode the images of the first tampering and the second tampering respectively, effectively improving the image tampering detection and positioning capabilities of certificate documents, and selects Se-Resnet50 as the feature extraction network to strengthen the features of important channels. It solves the problem that forged images of certificate documents that are severely post-processed and have both first and second tampering are difficult to detect and locate, and provides new ways and methods for the forgery identification of certificate document images of various certificates, various reports, publications, various certificates, IOUs, receipts, etc. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated into and constitute a part of this specification. The accompanying drawings illustrate the embodiments and together with the description are used to explain the principles of the present invention. Other embodiments and many expected advantages of the embodiments will be readily appreciated as they become better understood by reference to the following detailed description. Other features, objects and advantages of the present application will become more apparent by reading the detailed description of the non-limiting embodiments made with reference to the following drawings:

[0038] Figure 1 It is a flow chart of a method for detecting tampering of a certificate document image according to an embodiment of the present application;

[0039] Figure 2 is a training network structure diagram of a specific embodiment of the present application;

[0040] Figure 3 This is a network structure diagram of Se-Resnet50, a specific embodiment of the present application;

[0041] Figure 4 is a structural diagram of an scSE module of a specific embodiment of the present application;

[0042] Figure 5 This is a framework diagram of a system for detecting tampering of certificate and document images according to an embodiment of the present application;

[0043] Figure 6 It is a structural diagram of a computer system suitable for implementing an electronic device of an embodiment of the present application. DETAILED DESCRIPTION

[0044] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.

[0045] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0046] According to an embodiment of the present application, a method for detecting tampering of a certificate document image is provided. Figure 1 FIG. 1 is a flow chart of a method for detecting tampering of a certificate document image according to an embodiment of the present application. Figure 1 As shown, the method includes:

[0047] S101: Performing a first tampering and post-processing on the original image, and performing a second tampering and post-processing on the basis of the first tampering and post-processing to obtain a tampered image.

[0048] In a specific embodiment, data including various certificates, reports, documents, receipts, licenses, etc. are tampered with and post-processed once by PS, and then tampered with and post-processed twice based on the first tampering. The tampering adopts copy-move, splicing, removing pixels and filling other pixels, generating characters so that they cannot be recognized by the naked eye, and the post-processing adopts Gaussian blur, JPEG compression, noise addition, etc.

[0049] S102: Using a structural similarity algorithm, the grayscale images of the original image and the tampered image are compared in terms of brightness, contrast and structure to obtain a forged region mask image.

[0050] In a specific embodiment, the SSIM (structural similarity) algorithm is used to compare the differences between the grayscale images of the real image and the tampered image in terms of brightness, contrast, and structure, and obtain a difference binary image or a forged area mask mak image, that is, the pixels at the position without difference are black, the pixels at the position with difference are white, and the part with difference is the tampered part. The SSIM algorithm characterizes similarity through the following formula:

[0051]

[0052]

[0053]

[0054] where uX 、u Y The distribution represents the mean of images X and Y, σ X , σ Y Represents the standard deviation of images X and Y, σ XY Represents the covariance of images X and Y. C1, C2, and C3 are constants to avoid the denominator being 0. The final SSIM index is SSIM(X,Y)=L(x,y)*C(X,Y)*S(X,Y).

[0055] S103: Input the tampered image and the forged area mask image into the ScSE U-Net network and the twin network for training to obtain a detection model.

[0056] In a specific embodiment, the training network is as follows: Figure 2 As shown in the figure, based on the idea of ​​twin networks, two encoder blocks with the same structure but no shared parameters are instantiated in the network input part, respectively encoding the tampered image once and the tampered image twice to enhance the robustness of the model, learn more features, add the feature maps, and finally output them through the decoder block. Each decoder block is followed by a scSE Block to enhance the recognition ability. The dotted line indicates the copying and cutting operations on the extracted features. During the upsampling process, the features are spliced ​​together according to the channel dimension to utilize the shallow features. The Encoder Blocks, Decoder Blocks, and Bottleneck Blocks bottleneck layers in the network are based on the U-net network structure.

[0057] In a specific embodiment, the feature extraction part, i.e., Encoder Blocks, selects Se-Resnet50. This feature extraction network adds SE Block on the basis of Resnet. This module strengthens the features of important channels. The structure of Se-Resnet50 is as follows: Figure 3 shown.

[0058] In a specific embodiment, a scSE module is added during the upsampling process to enhance the model recognition capability. The structure diagram of scSEBlock is as follows: Figure 4 As shown, represents convolution with a convolution kernel of size m×n and output channels p, and σ(·) represents the Sigmoid activation function. The feature map obtained based on this structure is The cSE module compresses spatial information to obtain an indicator for measuring the importance of channels; the sSE module compresses channel information to obtain an indicator for measuring the importance of spatial positions.

[0059] In a specific embodiment, in the cSE module, the input feature map is U = [u1, u2, ..., u c ], where each channel u i ,u i ∈R H*W , U passes through the global pooling layer to obtain the vector z, z∈R 1*1*C , the value of each position k is: The vector z passes through two fully connected layers, W1 and W2 are the weights of the fully connected layers respectively, and the process is: After the ReLU activation function, the whole process can be expressed by the following formula: The information represented is the i-th channel u i degree of importance.

[0060] In a specific embodiment, in the sSE module, for the input feature map U = [u 1,1 ,u 1,2 ,...u i,j ,...,u H ,W ], H, W are the sizes of the feature maps, (i, j) are the spatial positions of the feature maps, and the compression on the channel is achieved through 1×1 convolution with an output channel of 1. sq ∈R 1*1*C*1 The operation is as follows: q = W sq *U, where the output is q, q is the feature map with channel 1, and then passes through the Sigmoid activation function. The whole process is as follows: Where σ(q i,j ) represents the importance of the spatial position (i, j) in the feature map.

[0061] S104: Use the detection model to infer the image to be detected to obtain a predicted mask image.

[0062] The above method uses the binary image of the difference between the original image and the tampered image as a label, adds scSE block on the basis of U-net network to enhance the network's image recognition ability, selects Se-Resnet50 as the feature network, and instantiates two Siamese networks (Siamese Network) with the same network structure and unshared parameters in the network input part to encode the images tampered once and twice respectively, which can effectively improve the image tampering detection and positioning capabilities of certificate documents. It solves the problem that forged images of certificate documents that are severely post-processed and have both primary and secondary tampering are difficult to detect and locate, and provides new ways and methods for the forgery identification of certificate document images of various types of certificates, various reports, publications, various certificates, IOUs, receipts, etc.

[0063] Continue to refer Figure 5 , Figure 5 A framework diagram of a system for detecting tampering of certificate and document images according to an embodiment of the present invention is shown. The system specifically includes an image processing unit 501, a difference comparison unit 502, a training model acquisition unit 503 and a detection unit 504, wherein the image processing unit 501 is configured to perform a first tampering and post-processing on the original image, and perform a second tampering and post-processing on the basis of the first tampering and post-processing to obtain a tampered image, wherein the tampering includes copying the same image, splicing different images, removing pixels, filling other pixels and generating characters, and the post-processing includes adding Gaussian blur, JPEG compression and adding noise; the difference comparison unit 502 is configured to use a structural similarity algorithm to compare the differences of the grayscale images of the original image and the tampered image in terms of brightness, contrast and structure, respectively, to obtain a forged area mask image, wherein the pixels at the non-difference position in the forged area mask image are black, and the pixels at the difference position are white; the training model acquisition unit 503 is configured to input the tampered image and the forged area mask image into the ScSE U-Net network and the twin network for training to obtain a detection model; the detection unit 504 is configured to use the detection model to infer the image to be detected to obtain a predicted mask image.

[0064] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 suitable for implementing an electronic device of an embodiment of the present application. Figure 6 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0065] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0066] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0067] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above functions defined in the method of the present application are executed. It should be noted that the computer-readable storage medium of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable storage medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wireless, wireline, optical cable, RF, etc., or any suitable combination of the foregoing.

[0068] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0069] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0070] The modules involved in the embodiments of the present application may be implemented by software or by hardware.

[0071] As another aspect, the present application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or it may exist independently without being assembled into the electronic device. The above computer-readable storage medium carries one or more programs. When the above one or more programs are executed by the electronic device, the electronic device: performs a first tampering and post-processing on the original image, and performs a second tampering and post-processing on the basis of the first tampering and post-processing to obtain a tampered image; uses a structural similarity algorithm to compare the differences in the grayscale images of the original image and the tampered image from the brightness, contrast and structure, respectively, to obtain a forged area mask image; inputs the tampered image and the forged area mask image into the ScSE U-Net network and the twin network for training to obtain a detection model; uses the detection model to infer the image to be detected to obtain a predicted mask image.

[0072] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A method for detecting tampering of a certificate document image, characterized in that: include: S1: performing a first tampering and post-processing on the original image, and performing a second tampering and post-processing on the basis of the first tampering and post-processing to obtain a tampered image; S2: using a structural similarity algorithm to compare the differences between the grayscale images of the original image and the tampered image in terms of brightness, contrast and structure, to obtain a forged area mask image; S3: Inputting the tampered image and the forged area mask image into the ScSE U-Net network and the twin network for training to obtain a detection model; and S4: using the detection model to infer the image to be detected to obtain a predicted mask image; The structural similarity algorithm in step S2 characterizes the similarity by the following formula: where u X 、u Y The distribution represents the mean of images X and Y, σ X , σ Y Represents the standard deviation of images X and Y, σ XY Represents the covariance of images X and Y, C1, C2, C3 are constants, and the structural similarity algorithm SSIM index is SSIM(X,Y)=L(x,y)*C(X,Y)*S(X,Y); The training based on the ScSE U-Net network and the twin network in step S3 specifically includes: Based on the twin network, two encoding blocks with the same structure and no shared parameters are instantiated in the network input part, and the first tampered image and the second tampered image are encoded respectively; the feature maps are added and output through the decoding block, and each decoding block is connected to the scSE module, wherein the encoding block, the decoding block and the bottleneck layer are the network structures based on U-net; The encoding block adopts the Se-Resnet50 feature extraction network with SE Block added on the basis of Resnet; In the upsampling process, the features are concatenated according to the channel dimension, and the scSE module is added in the upsampling process to obtain the feature map: Among them, the cSE module obtains an indicator to measure the importance of the channel by compressing the spatial information, and the sSE module obtains an indicator to measure the importance of the spatial position by compressing the channel information.

2. The method for detecting tampering of certificate and document images according to claim 1, characterized in that: The tampering in step S1 includes copying the same image, splicing different images, removing pixels, filling other pixels and generating characters, and the post-processing includes adding Gaussian blur, JPEG compression and adding noise.

3. The method for detecting tampering of certificate and document images according to claim 1, characterized in that: In the forged region mask image in step S2, the pixels at positions without differences are black, and the pixels at positions with differences are white.

4. A computer-readable storage medium having one or more computer programs stored thereon, characterized in that: When the one or more computer programs are executed by a computer processor, the method according to any one of claims 1 to 3 is implemented.

5. A system for detecting tampering of certificate and document images, characterized in that: The system comprises: An image processing unit is configured to perform a first tampering and post-processing on the original image, and perform a second tampering and post-processing on the basis of the first tampering and post-processing to obtain a tampered image, wherein the tampering includes copying the same image, splicing different images, removing pixels, filling other pixels and generating characters, and the post-processing includes adding Gaussian blur, JPEG compression and adding noise; a difference comparison unit, configured to compare the differences between the grayscale images of the original image and the tampered image in terms of brightness, contrast and structure using a structural similarity algorithm to obtain a forged region mask image, wherein the pixel points at the non-difference position in the forged region mask image are black, and the pixel points at the difference position are white; A training model acquisition unit: configured to input the tampered image and the forged area mask image into the ScSEU-Net network and the twin network for training to obtain a detection model; Detection unit: configured to use the detection model to infer the image to be detected to obtain a predicted mask image; The structural similarity algorithm characterizes similarity through the following formula: where u X 、u Y The distribution represents the mean of images X and Y, σ X , σ Y Represents the standard deviation of images X and Y, σ XY Represents the covariance of images X and Y, C1, C2, C3 are constants, and the structural similarity algorithm SSIM index is SSIM(X,Y)=L(x,y)*C(X,Y)*S(X,Y); The training based on the ScSE U-Net network and the twin network specifically includes: instantiating two encoding blocks with the same structure and no shared parameters in the network input part based on the twin network, respectively encoding the first tampered image and the second tampered image; adding the feature maps and outputting them through the decoding block, each decoding block is connected to the scSE module, wherein the encoding block, the decoding block and the bottleneck layer are the network structures based on U-net; The encoding block adopts the Se-Resnet50 feature extraction network with SE Block added on the basis of Resnet; In the upsampling process, the features are concatenated according to the channel dimension, and the scSE module is added in the upsampling process to obtain the feature map: Among them, the cSE module obtains an indicator to measure the importance of the channel by compressing the spatial information, and the sSE module obtains an indicator to measure the importance of the spatial position by compressing the channel information.