Image tampering detection method and device based on high-frequency information enhancement

By using Sobel filter and dual-stream network to extract high-frequency information and multi-scale features in image tampering detection, and performing feature fusion, the problem of insufficient detection performance in the existing technology is solved and more accurate image tampering detection is achieved.

CN118570622AInactive Publication Date: 2024-08-30ANHUI AGRICULTURAL UNIVERSITY

Patent Information

Application Number
CN202411035294.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-08-30
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing image tampering detection methods based on deep learning have insufficient detection performance and are difficult to effectively distinguish tampered areas, and direct feature extraction will introduce irrelevant features that affect performance.

Method used

The Sobel filter is used to obtain the high-frequency information of the image, and the dual-stream network is used to extract multi-scale features. The feature fusion module focuses on important features and suppresses unnecessary features to generate a tampered area mask.

Benefits of technology

It improves the performance of image tampering detection, enhances the ability to identify tampered areas, and reduces the impact of irrelevant features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570622A
    Figure CN118570622A
Patent Text Reader

Abstract

The invention discloses an image tampering detection method and device based on high-frequency information enhancement, and the method comprises the steps: obtaining a to-be-detected image, and carrying out the filtering of the to-be-detected image, and obtaining the high-frequency information of the to-be-detected image; respectively carrying out feature extraction on the to-be-detected image and the high-frequency information to obtain multi-scale feature information of the to-be-detected image and the high-frequency information; performing feature fusion on the to-be-detected image and the multi-scale feature information of the high-frequency information; and obtaining a tampering region mask of the fused features to realize image tampering detection. According to the embodiment of the invention, the image tampering detection performance can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image recognition and evidence collection, and in particular to an image tampering detection method and device based on high-frequency information enhancement. Background Art

[0002] With the continuous development of image modification software, people can easily use the software to modify the content of images to achieve different purposes. These software can generate very realistic images simply and efficiently, playing an important role in design, games and other fields. Compared with the original images, some processed images can even be regarded as beautiful works of art. However, malicious users can also use the software to maliciously manipulate the content of images. Some tampered images are so deceptive that people cannot easily distinguish the authenticity of the image, which makes it challenging to detect the tampered area. Therefore, it is crucial to design an effective image tampering detection method to protect the credibility of the image.

[0003] As one of the most promising methods for image tampering detection, methods based on deep learning have been widely studied. These methods usually use deep learning networks with different structures to extract features from tampered images. Unlike early methods based on manual features, methods based on deep learning have achieved better detection performance and generalization. However, in the process of implementing the present invention, the inventors found that the aforementioned image tampering detection methods based on deep learning still have the technical problem of insufficient detection performance. Summary of the invention

[0004] The purpose of the present invention is to provide an image tampering detection method and device based on high-frequency information enhancement to solve the deficiencies in the prior art and effectively improve the image tampering detection performance.

[0005] An embodiment of the present application provides an image tampering detection method based on high-frequency information enhancement, the method comprising:

[0006] Acquire an image to be detected and filter the image to be detected to obtain high-frequency information of the image to be detected;

[0007] Performing feature extraction on the image to be detected and the high-frequency information respectively to obtain multi-scale feature information of the image to be detected and the high-frequency information;

[0008] Performing feature fusion on the multi-scale feature information of the image to be detected and the high-frequency information;

[0009] Obtain the tampered area mask of the fused features to achieve image tampering detection.

[0010] Optionally, acquiring the image to be detected and filtering the image to be detected to obtain high-frequency information of the image to be detected includes:

[0011] Acquire an image to be detected, and preprocess the image to be detected;

[0012] The preprocessed image to be detected is filtered using a Sobel filter to obtain high-frequency information of the image to be detected.

[0013] Optionally, the extracting features of the image to be detected and the high-frequency information respectively to obtain multi-scale feature information of the image to be detected and the high-frequency information includes:

[0014] An encoder is used to perform feature extraction on the image to be detected and the high-frequency information respectively, so as to obtain multi-scale feature information of the image to be detected and the high-frequency information respectively, wherein the encoder is a dual-stream network.

[0015] Optionally, the step of fusing the multi-scale feature information of the image to be detected and the high-frequency information includes:

[0016] The multi-scale feature information of the image to be detected and the multi-scale feature information of the high-frequency information are feature fused to focus on necessary features and suppress unnecessary features, and the feature information is weightedly selected to obtain fused features.

[0017] Optionally, obtaining a tampered region mask of the fused features includes:

[0018] The fused features are input into the decoder corresponding to the encoder to obtain a first prediction result as a tampered area mask.

[0019] Another embodiment of the present application provides an image tampering detection device based on high-frequency information enhancement, the device comprising:

[0020] A filtering module, used to acquire an image to be detected and filter the image to be detected to obtain high-frequency information of the image to be detected;

[0021] An extraction module, used to perform feature extraction on the image to be detected and the high-frequency information respectively, to obtain multi-scale feature information of the image to be detected and the high-frequency information;

[0022] A fusion module, used for fusing the multi-scale feature information of the image to be detected and the high-frequency information;

[0023] The acquisition module is used to obtain the tampered area mask of the fused features to realize image tampering detection.

[0024] Yet another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, wherein the computer program is configured to execute any of the above methods when running.

[0025] Yet another embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any of the methods described above.

[0026] Compared with the prior art, the present invention provides an image tampering detection method based on high-frequency information enhancement, which obtains the high-frequency information of the image to be detected by acquiring the image to be detected and filtering the image to be detected; performs feature extraction on the image to be detected and the high-frequency information respectively to obtain multi-scale feature information of the image to be detected and the high-frequency information; performs feature fusion on the multi-scale feature information of the image to be detected and the high-frequency information; obtains the tampering area mask of the fused feature to realize image tampering detection, thereby effectively improving the image tampering detection performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A hardware structure block diagram of a computer terminal for an image tampering detection method based on high-frequency information enhancement provided by an embodiment of the present invention;

[0028] Figure 2 A schematic diagram of a flow chart of an image tampering detection method based on high-frequency information enhancement provided by an embodiment of the present invention;

[0029] Figure 3 A filtering schematic diagram of a Sobel filter provided in an embodiment of the present invention;

[0030] Figure 4 A schematic diagram of the principle of an image tampering detection method based on high-frequency information enhancement provided by an embodiment of the present invention;

[0031] Figure 5 A schematic diagram of the structure of a multi-scale feature fusion module provided by an embodiment of the present invention;

[0032] Figure 6 A schematic diagram of the structure of an image tampering detection device based on high-frequency information enhancement provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0033] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, but should not be construed as limiting the present invention.

[0034] Ideally, existing methods usually use deep learning networks to directly extract features of tampered images and effectively locate tampered areas. However, tampered images contain a lot of irrelevant information. These irrelevant features are irrelevant to the tampering detection task and may even affect the detection performance. Therefore, directly extracting features from tampered images will introduce irrelevant features, resulting in poor detection performance.

[0035] Existing image tampering detection methods either only consider features of a single scale or simply fuse features of different scales. Considering only a single scale usually ignores the high-level semantic features of the image and ignores low-level texture, edge information, etc. Simply fusing features of different scales requires convolution operations, which inevitably loses some effective information, making the representation ability of the features lower than expected. Therefore, it is difficult to fully utilize the potential complementary (heterogeneous) information between multiple layers of features by simply using single-scale features or feature fusion.

[0036] The embodiment of the present invention first provides an image tampering detection method based on high-frequency information enhancement. The method can be applied to electronic devices such as computer terminals, specifically ordinary computers, etc.

[0037] The following describes it in detail by taking running on a computer terminal as an example. Figure 1 The hardware structure block diagram of a computer terminal of an image tampering detection method based on high-frequency information enhancement provided by an embodiment of the present invention. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the computer terminal may also include a transmission device 106 for communication functions and an input and output device 108. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0038] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / modules corresponding to the image tampering detection method based on high-frequency information enhancement in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0039] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0040] See also Figure 2-Figure 5 , an embodiment of the present invention provides an image tampering detection method based on high-frequency information enhancement, the method may include the following steps:

[0041] S201, acquiring an image to be detected and filtering the image to be detected to obtain high-frequency information of the image to be detected;

[0042] Specifically, an image to be detected may be acquired, and the image to be detected may be preprocessed; the preprocessed image to be detected may be filtered using a Sobel filter to obtain high-frequency information of the image to be detected.

[0043] It is understandable that the image to be detected can be obtained by, but not limited to, online shooting, manual uploading, database downloading or network acquisition. Subsequently, the image to be detected is preprocessed, and the preprocessing may be an image preprocessing method commonly performed in the art, such as, but not limited to, image size compression, normalization and defogging, and other image noise reduction operations, as long as the image to be detected can adapt to the input requirements of the image tampering detection model based on high-frequency information enhancement corresponding to the present method. The model may include: a filter module, an encoder module, a multi-scale feature fusion module and a decoder module. At the same time, for the image to be detected, the Sobel filter is used to filter the image to be detected, and the steps are:

[0044]

[0045] in, Represents the preprocessed image to be detected, whose size is , Indicates the width of the image. Indicates the height of the image. represents the two-dimensional signal convolution operation, and Representing Sobel in Axis and The convolution kernel in the axis direction, Represents the high-frequency information after filtering, and its size is .like Figure 3 As shown, for example, The value of the convolution kernel is , The value of the convolution kernel is .

[0046] S202, performing feature extraction on the image to be detected and the high-frequency information respectively to obtain multi-scale feature information of the image to be detected and the high-frequency information;

[0047] Specifically, an encoder may be used to perform feature extraction on the image to be detected and the high-frequency information respectively, to obtain multi-scale feature information of the image to be detected and the high-frequency information respectively, wherein the encoder is a dual-stream network.

[0048] Exemplarily, regarding the encoder part, the embodiment of the present invention uses a two-stream Segformer network as an encoder, which can extract features of different scales from the tampered image. The specific steps of the above operation are:

[0049]

[0050]

[0051] Given the above image and high frequency information ,in, represents the Segformer encoder, Indicates that from the image The multi-scale features extracted from ; Indicates that high frequency information The multi-scale features extracted from .

[0052] S203, performing feature fusion on the multi-scale feature information of the image to be detected and the high-frequency information;

[0053] Specifically, the multi-scale feature information of the image to be detected and the multi-scale feature information of the high-frequency information may be fused to focus on necessary features and suppress unnecessary features, and weighted selection may be performed on the feature information to obtain fused features.

[0054] The multi-scale feature fusion module can be used to effectively fuse the multi-scale features of the two branches, focus on important features and suppress unnecessary features, perform weighted selection on feature information, and improve detection performance. Figure 5 As shown in Figure 1, the main operation steps of the multi-scale feature fusion module include:

[0055]

[0056] in, Represents feature splicing along the direction of the channel, represent Activation function, represents a batch normalization layer, Representative 1 The convolution layer has a convolution kernel of 1. Given the input features and ,in , we can get the fused features ,in .

[0057] In getting After that, Input to a two-branch attention module, one of which includes an average pooling layer (Avgpool), Layer and Activation function, another branch includes the maximum pooling layer (Maxpool), Layer and The outputs of the two branches are combined by adding the corresponding elements and then Activation function, get the weighted matrix, and add the weighted matrix and feature The corresponding elements are multiplied to reweight, and finally combined with the feature The main steps are:

[0058]

[0059]

[0060] in, represent, Represents the fused features, represents the addition of corresponding elements, represents the average pooling layer, represents the maximum pooling layer, represent Activation function, represents the multiplication of corresponding elements, Represents the addition of corresponding elements.

[0061] S204, obtaining a tampered region mask of the fused features to implement image tampering detection.

[0062] Specifically, the fused features may be input into a decoder corresponding to the encoder to obtain a first prediction result as a tampered region mask.

[0063] like Figure 4 As shown, for the fused features , you can Input to the FPN decoder to obtain the final prediction result , as the tampered area mask. At the same time, in the training process of the image tampering detection model based on high-frequency information enhancement, in order to supervise the features learned by high-frequency information , you can Also input into the FPN decoder and output the prediction result , the final prediction result and prediction results With the label through the loss function Calculate the loss and update the network parameters of the image tampering detection model based on high-frequency information enhancement through the back propagation algorithm. The loss function is:

[0064]

[0065] in, Represents a tag, To tamper with the region edge information, the edge information can be obtained from the label, and They are all hybrid losses. The calculation formula of hybrid loss is as follows:

[0066]

[0067] in, and Indicates the number of input samples. Class and The labels and predictions for pixels. Represents the number of image pixels in one input sample.

[0068] In summary, the present invention aims at the technical problem that the existing image tampering detection technology has insufficient detection performance, and provides an image tampering detection method based on high-frequency information enhancement. The method first uses a Sobel filter to filter the low-frequency information of the tampered image and retains the high-frequency information of the image to obtain richer image tampering features. At the same time, a dual-branch (dual-stream) network is used to extract multi-scale features of the image to be detected and high-frequency information. Finally, a multi-scale feature fusion module is used to fuse the above two features, focus on important features and suppress unnecessary features, and perform weighted selection on feature information to improve detection performance; finally, the fused features are decoded to obtain the final tampering area mask.

[0069] It can be seen that by acquiring the image to be detected and filtering the image to be detected, the high-frequency information of the image to be detected is obtained; feature extraction is performed on the image to be detected and the high-frequency information respectively to obtain multi-scale feature information of the image to be detected and the high-frequency information; feature fusion is performed on the multi-scale feature information of the image to be detected and the high-frequency information; the tampering area mask of the fused feature is obtained to realize image tampering detection, thereby effectively improving the image tampering detection performance.

[0070] Another embodiment of the present invention provides an image tampering detection device based on high-frequency information enhancement, see Figure 6 , the device may include:

[0071] A filtering module 601 is used to obtain an image to be detected and filter the image to be detected to obtain high-frequency information of the image to be detected;

[0072] An extraction module 602 is used to perform feature extraction on the image to be detected and the high-frequency information respectively to obtain multi-scale feature information of the image to be detected and the high-frequency information;

[0073] A fusion module 603 is used to perform feature fusion on the multi-scale feature information of the image to be detected and the high-frequency information;

[0074] The acquisition module 604 is used to obtain the tampering area mask of the fused features to achieve image tampering detection.

[0075] It can be seen that by acquiring the image to be detected and filtering the image to be detected, the high-frequency information of the image to be detected is obtained; feature extraction is performed on the image to be detected and the high-frequency information respectively to obtain multi-scale feature information of the image to be detected and the high-frequency information; feature fusion is performed on the multi-scale feature information of the image to be detected and the high-frequency information; the tampering area mask of the fused feature is obtained to realize image tampering detection, thereby effectively improving the image tampering detection performance.

[0076] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0077] Specifically, in this embodiment, the above storage medium may be configured to store a computer program for performing the following steps:

[0078] S201, acquiring an image to be detected and filtering the image to be detected to obtain high-frequency information of the image to be detected;

[0079] S202, performing feature extraction on the image to be detected and the high-frequency information respectively to obtain multi-scale feature information of the image to be detected and the high-frequency information;

[0080] S203, performing feature fusion on the multi-scale feature information of the image to be detected and the high-frequency information;

[0081] S204, obtaining a tampered region mask of the fused features to implement image tampering detection.

[0082] Specifically, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0083] It can be seen that by acquiring the image to be detected and filtering the image to be detected, the high-frequency information of the image to be detected is obtained; feature extraction is performed on the image to be detected and the high-frequency information respectively to obtain multi-scale feature information of the image to be detected and the high-frequency information; feature fusion is performed on the multi-scale feature information of the image to be detected and the high-frequency information; the tampering area mask of the fused feature is obtained to realize image tampering detection, thereby effectively improving the image tampering detection performance.

[0084] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0085] Specifically, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0086] Specifically, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0087] S201, acquiring an image to be detected and filtering the image to be detected to obtain high-frequency information of the image to be detected;

[0088] S202, performing feature extraction on the image to be detected and the high-frequency information respectively to obtain multi-scale feature information of the image to be detected and the high-frequency information;

[0089] S203, performing feature fusion on the multi-scale feature information of the image to be detected and the high-frequency information;

[0090] S204, obtaining a tampered region mask of the fused features to implement image tampering detection.

[0091] Specifically, the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0092] It can be seen that by acquiring the image to be detected and filtering the image to be detected, the high-frequency information of the image to be detected is obtained; feature extraction is performed on the image to be detected and the high-frequency information respectively to obtain multi-scale feature information of the image to be detected and the high-frequency information; feature fusion is performed on the multi-scale feature information of the image to be detected and the high-frequency information; the tampering area mask of the fused feature is obtained to realize image tampering detection, thereby effectively improving the image tampering detection performance.

[0093] The above describes in detail the structure, features and effects of the present invention based on the embodiments shown in the drawings. The above is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the drawings. Any changes made according to the concept of the present invention, or modifications to equivalent embodiments with equivalent changes, which still do not exceed the spirit covered by the description and drawings, should be within the protection scope of the present invention.

Claims

1. An image tampering detection method based on high-frequency information enhancement, characterized in that: The method comprises: Acquire an image to be detected and filter the image to be detected to obtain high-frequency information of the image to be detected; Performing feature extraction on the image to be detected and the high-frequency information respectively to obtain multi-scale feature information of the image to be detected and the high-frequency information; Performing feature fusion on the multi-scale feature information of the image to be detected and the high-frequency information; Obtain the tampered area mask of the fused features to achieve image tampering detection.

2. The method according to claim 1, characterized in that The step of acquiring the image to be detected and filtering the image to be detected to obtain high-frequency information of the image to be detected includes: Acquire an image to be detected, and preprocess the image to be detected; The preprocessed image to be detected is filtered using a Sobel filter to obtain high-frequency information of the image to be detected.

3. The method according to claim 2, characterized in that The extracting features of the image to be detected and the high-frequency information respectively to obtain multi-scale feature information of the image to be detected and the high-frequency information includes: An encoder is used to perform feature extraction on the image to be detected and the high-frequency information respectively, so as to obtain multi-scale feature information of the image to be detected and the high-frequency information respectively, wherein the encoder is a dual-stream network.

4. The method according to claim 3, characterized in that The step of fusing the multi-scale feature information of the image to be detected and the high-frequency information comprises: The multi-scale feature information of the image to be detected and the multi-scale feature information of the high-frequency information are feature fused to focus on necessary features and suppress unnecessary features, and the feature information is weighted and selected to obtain fused features.

5. The method according to claim 4, characterized in that The step of obtaining the tampered region mask of the fused features includes: The fused features are input into the decoder corresponding to the encoder to obtain a first prediction result as a tampered area mask.

6. An image tampering detection device based on high-frequency information enhancement, characterized in that: The device comprises: A filtering module, used to acquire an image to be detected and filter the image to be detected to obtain high-frequency information of the image to be detected; An extraction module, used to perform feature extraction on the image to be detected and the high-frequency information respectively, to obtain multi-scale feature information of the image to be detected and the high-frequency information; A fusion module, used for fusing the multi-scale feature information of the image to be detected and the high-frequency information; The acquisition module is used to obtain the tampered area mask of the fused features to realize image tampering detection.

7. The device according to claim 6, characterized in that The filtering module is specifically used for: Acquire an image to be detected, and preprocess the image to be detected; The preprocessed image to be detected is filtered using a Sobel filter to obtain high-frequency information of the image to be detected.

8. The device according to claim 7, characterized in that The extraction module is specifically used for: An encoder is used to perform feature extraction on the image to be detected and the high-frequency information respectively, so as to obtain multi-scale feature information of the image to be detected and the high-frequency information respectively, wherein the encoder is a dual-stream network.

9. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 5 when executed.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Image tampering detection method based on CNN multi-scale feature extraction and hierarchical fusion

    CN115294096A

  • Image tampering area detection method and device, electronic equipment and storage medium

    CN116109597A

  • Image tampering detection method and system based on double-flow network

    CN117557562A

  • Data processing method and apparatus, and device and readable storage medium

    WO2023207408A1

Cited By

  • Rack rail defect detection method based on machine vision

    CN118781123A