A method for locating image tampering regions based on DAUnet network, and a storage medium.
By using the feature extraction and processing flow of the DAUnet network, the problems of insufficient accuracy and generalization performance in the localization of image tampering regions in existing technologies are solved, and more efficient localization of tampering regions and identification of image authenticity are achieved.
Patent Information
- Application Number
- CN202211511337.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-29
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2042-11-29
AI Technical Summary
Existing technologies have insufficient generalization performance in locating tampered regions of images, resulting in poor localization performance. The Unet model has limited feature extraction capabilities during the downsampling stage, making it difficult to effectively distinguish tampered regions with different semantic information.
A method for locating image tampering regions based on the DAUnet network is adopted. Feature extraction and channel enhancement are performed through the First Block layer, and feature extraction is combined with the Dense Block module of DenseNet. Downsampling compression is performed using the Transition layer, detail extraction is performed using the Spatial Pooling Pyramid (ASPP) module, and image upsampling and feature stitching are performed in the deconvolution module. Finally, dimensionality reduction is performed through the Last Block layer.
It improves the accuracy and speed of locating and identifying tampered areas in images, enhances feature extraction capabilities, reduces the loss of detailed information, and improves the accuracy of image authenticity identification.
Smart Images

Figure CN116246151B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, specifically to a method for locating image tampering regions based on the DAUnet network and a storage medium. Background Technology
[0002] With the rapid development of digital cameras, mobile phones, and other imaging devices, internet users share countless images daily, recording the "reality" before their eyes. However, as image editing software like Photoshop has significantly enhanced its functionality and lowered its barrier to entry, some criminals have easily exploited this software to create maliciously altered images. After being "carefully" processed by the perpetrators, it is difficult for people to distinguish the real from the fake. In today's information society, communication is extremely convenient, and a maliciously altered image can spread rapidly, causing incalculable consequences. Therefore, vigorously developing digital image forensics technology and accurately identifying the authenticity of images will be a future research hotspot and direction in the field of information security. Traditional image stitching and localization algorithms mainly rely on manually selecting certain features to distinguish between altered and real areas, which not only has insufficient generalization performance but also poor localization performance. Existing technologies have also emerged that use the Unet model to extract features through continuous 3x3 convolutions at each stage of downsampling. The Unet model can achieve good results when dealing with simple semantic information of the same category of content. However, for the problem of locating image splicing and tampering, the tampered areas often come from different categories of information and will be subject to different semantic information interference. It can be seen that the existing Unet model has limited ability to extract features in the downsampling stage and cannot perform localization well. Summary of the Invention
[0003] One of the objectives of this invention is to overcome the shortcomings of existing technologies and provide a method for locating image tampered areas based on the DAUnet network. This method can effectively improve the location accuracy of image tampered areas, thereby improving the speed and accuracy of identifying the authenticity of digital images.
[0004] The second objective of this invention is to provide a storage medium.
[0005] To achieve one of the above objectives, the present invention provides the following technical solution:
[0006] A method for locating image tampering regions based on the DAUnet network is provided, comprising the following steps:
[0007] S1. The target image is processed through the First Block layer for feature extraction and channel enhancement, and then through the Dense Block module in DenseNet for feature extraction. The extracted image features are then downsampled and compressed through the Transition layer to obtain a compressed feature image.
[0008] S2. The compressed feature image is processed by the ASPP (Space Pooling Pyramid) module for detail extraction;
[0009] S3. The feature image extracted from the details is upsampled by the deconvolution module. At the same time, before the feature image enters the deconvolution module, the feature image and the corresponding downsampled feature image are concatenated by channel, so that the semantic information of the lower layer of the downsampled image participates in the processing of the deconvolution module. Finally, the image is reduced in dimensionality by the Last Block layer to obtain a binary image, which displays the image of the tampered area.
[0010] In some implementations, the First Block layer includes a Convolution layer, a BatchNormalization layer, and a ReLU layer.
[0011] In some implementations, in step S1, four Dense Block modules are set up, and a Transition layer is set between adjacent Dense Block modules. Image features are transmitted and processed along the arrangement order of the Dense Block modules and the Transition layer.
[0012] In some implementations, the Dense Block module consists of a Batch Normalization layer, a ReLU layer, and a 3x3 convolutional layer.
[0013] In some implementations, the four Dense Block modules employ 6, 12, 16, and 12 layers respectively, according to the data transmission direction.
[0014] In some implementations, the Transition layer consists of a Batch Normalization layer, a ReLU activation layer, a 1x1 convolutional layer, and a 3x3 average pooling layer.
[0015] In some implementations, the ASPP module employs four expansion rates of 1, 6, 12, and 18, and the ASPP module simultaneously uses fill and pooling operations.
[0016] In some implementations, in step S3, the feature image is upsampled sequentially through three deconvolution modules, and the downsampling and compression processing of each Transition layer is concatenated to the adjacent deconvolution modules.
[0017] In some implementations, each deconvolution module contains three deconvolution layers.
[0018] The beneficial effects of the image tampering region localization method based on DAUnet network of the present invention are as follows:
[0019] (1) The image tampering region localization method based on DAUnet network of the present invention first performs feature extraction and channel enhancement in the First Block layer, and then integrates the extracted features into the DenseBlock in DenseNet for feature extraction, which effectively enhances feature reuse and feature extraction capabilities. That is, the DenseBlock module replaces the 3x3 convolutional layer of the existing Une model with upsampling. The dense skip connection characteristics of the DenseBlock module enhance feature reuse and propagation, and solve the problem of insufficient feature extraction.
[0020] (2) In the image tampering region localization method based on DAUnet network of the present invention, each feature image processed by the DenseBlock model is downsampled and compressed through the Transition layer to reduce the number of channels and thus reduce the number of model parameters.
[0021] (3) The image tampering region localization method based on DAUnet network of the present invention is processed by the hollow spatial pooling pyramid module ASPP module after the compressed image is processed. It overcomes the problem of loss of detail information caused by the downsampling link of Unet model. While expanding the receptive field of the network, ASPP module also extracts multi-scale information, reduces the loss of detail information, and helps to improve the accuracy of segmentation.
[0022] (4) The image tampering region localization method based on DAUnet network of the present invention improves the existing Unet model and effectively enhances the feature extraction capability.
[0023] A storage medium is also provided, on which program code is stored. When the program code is executed by a processor, it implements the above-described method for locating image tampering areas based on the DAUnet network. Attached Figure Description
[0024] Figure 1 This is the algorithm framework of the image tampering region localization method based on the DAUnet network in the embodiment.
[0025] Figure 2 This is a diagram of the Dense Block module in an embodiment.
[0026] Figure 3 This is a diagram of the Transition layer in an embodiment.
[0027] Figure 4 This is a diagram of the hollow space pooling pyramid ASPP module in an embodiment. Detailed Implementation
[0028] Preferred embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While preferred embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that the invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
[0029] The terminology used in this invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The singular forms “a” and “the” as used in this invention and the appended claims are intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0030] It should be understood that although the terms "first," "second," "third," etc., may be used in this invention to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this invention, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Thus, features defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0031] Example 1
[0032] This embodiment discloses a method for locating image tampering regions based on the DAUnet network. Figure 1 As shown,
[0033] S1. A 256x256x3 target image (the size of the target image can also be other sizes, which is not limited here) is passed through the First Block layer for feature extraction and channel enhancement, and then through the DenseBlock module in DenseNet for further feature extraction. The extracted image features are then passed through the Transition layer for downsampling and compression. The Transition layer downsamples the number of channels while compressing the image size, thereby reducing the number of model parameters and obtaining a compressed feature image.
[0034] S2. Considering that the tampered areas of different images have different shapes and sizes, the compressed feature images are extracted for details through the dilated spatial pooling pyramid ASPP module, thereby adjusting the convolutional receptive field of the model and preventing the loss of too much feature information.
[0035] S3. The feature image extracted from the details is upsampled by the deconvolution module. At the same time, before the feature image enters the deconvolution module, the feature image and the corresponding downsampled feature image are concatenated by channel, so that the semantic information of the lower layer of the downsampled image participates in the processing of the deconvolution module. Finally, the image is reduced in dimensionality by the Last Block layer to obtain a binary image, which displays the image of the tampered area.
[0036] The aforementioned image tampering region localization method based on the DAUnet network first performs feature extraction and channel enhancement in its First Block layer. The extracted features are then incorporated into the DenseBlock module of DenseNet for further feature extraction, effectively enhancing feature reuse and extraction capabilities. Specifically, this DenseBlock module replaces the upsampling 3x3 convolutional layer of the existing Unet model. The dense skip connections of the DenseBlock module enhance feature reuse and propagation, solving the problem of insufficient feature extraction. Each feature image processed by the DenseBlock model is downsampled and compressed through a Transition layer to reduce the number of channels and thus the number of model parameters. The compressed image is then processed by the Spatial Pooling Pyramid (ASPP) module, which overcomes the problem of detail loss caused by the downsampling stage of the Unet model. The ASPP module expands the network's receptive field while extracting multi-scale information, reducing the loss of detail and contributing to improved segmentation accuracy. This method improves upon the existing Unet model, effectively enhancing feature extraction capabilities.
[0037] In this embodiment, the First Block layer includes a Convolution layer, a Batch Normalization layer, and a ReLU layer.
[0038] The target image of 256x256x3 was transformed in three layers, increasing the number of image channels from 3 to 64.
[0039] In this embodiment, Figure 1 As shown, in step S1, four Dense Block modules are set up, and a Transition layer is set between adjacent Dense Block modules. Image features are transmitted and processed along the arrangement order of the Dense Block modules and the Transition layer.
[0040] The above setup includes multiple Dense Block modules and Transition layers. Each time the image passes through a Transition layer, the image size is reduced by half. Finally, after passing through the DAUnet downsampling stage, the image is extracted to produce a 32x32x64 feature image.
[0041] In this embodiment, Figure 2 As shown, the Dense Block module consists of a Batch Normalization layer, a ReLU layer, and a 3x3 convolutional layer.
[0042] In this embodiment, Figure 2 As shown, according to the data transmission direction, the four Dense Block modules use 6, 12, 16, and 12 layers respectively.
[0043] In this embodiment, Figure 3 As shown, the Transition layer consists of a Batch Normalization layer, a ReLU activation layer, a 1x1 convolutional layer, and a 3x3 average pooling layer.
[0044] In this embodiment, Figure 4 As shown, the ASPP module employs four dilation rates: 1, 6, 12, and 18. The ASPP module also uses fill and pooling operations to ensure that the image size remains constant after passing through the ASPP module.
[0045] In this embodiment, Figure 1 As shown, in step S3, the feature image is upsampled by three deconvolution modules in sequence, and the downsampling and compression processing of each Transition layer is concatenated to the adjacent deconvolution modules, so that the semantic information of the lower-level image can also participate in the deconvolution process.
[0046] In this embodiment, Figure 1 As shown, each deconvolution module contains three deconvolution layers.
[0047] The channel is then reduced in dimensionality by a Last Block layer to obtain a 256x256x32 binary image, which shows the tampered area.
[0048] Example 2
[0049] The storage medium disclosed in this embodiment stores program code. When the program code is executed by a processor, it implements the image tampering area localization method based on the DAUnet network in Embodiment 1.
[0050] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps described in these embodiments do not limit the scope of this application. It should also be understood that, for ease of description, the dimensions of the various parts shown in the drawings are not drawn to actual scale. Techniques, methods, and devices known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and devices should be considered part of the specification. In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters in the following drawings denote similar items; therefore, once an item is defined in one drawing, it need not be further discussed in subsequent drawings.
[0051] In the description of this application, it should be understood that the orientation or positional relationship indicated by directional terms such as "front, back, up, down, left, right", "horizontal, vertical, horizontal" and "top, bottom" is usually based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing this application and simplifying the description. Unless otherwise stated, these directional terms do not indicate or imply that the device or element referred to must have a specific orientation or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on the scope of protection of this application; the directional terms "inner" and "outer" refer to the inner and outer contours relative to the outline of each component itself.
[0052] For ease of description, spatial relative terms such as "above," "on top of," "on the upper surface of," "above," etc., are used herein to describe the spatial positional relationship of a device or feature as shown in the figures to other devices or features. It should be understood that spatial relative terms are intended to encompass different orientations in use or operation beyond the orientation of the device as described in the figures. For example, if the device in the figures were inverted, a device described as "above" or "on top of" other devices or structures would subsequently be positioned as "below" or "under" other devices or structures. Thus, the exemplary term "above" can include both "above" and "below." The device may also be positioned in other different ways (rotated 90 degrees or in other orientations), and the spatial relative descriptions used herein will be interpreted accordingly.
[0053] Furthermore, it should be noted that the use of terms such as "first" and "second" to define components is merely for the purpose of distinguishing the corresponding components. Unless otherwise stated, the above terms have no special meaning and therefore cannot be construed as limiting the scope of protection of this application.
[0054] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for locating image tampering regions based on DAUnet network, characterized by: Includes the following steps, S1. The target image is processed through the First Block layer for feature extraction and channel enhancement, and then through the Dense Block module in DenseNet for further feature extraction. The extracted image features are then downsampled and compressed through the Transition layer to obtain a compressed feature image. S2. The compressed feature image is processed by the Spatial Pooling Pyramid (ASPP) module for detail extraction; the ASPP module uses four dilation rates, namely 1, 6, 12 and 18, and the ASPP module simultaneously uses padding and pooling operations; S3. The feature image extracted from the details is upsampled by the deconvolution module. At the same time, before the feature image enters the deconvolution module, the feature image and the corresponding downsampled feature image are concatenated by channel, so that the semantic information of the lower layer of the downsampled image participates in the processing of the deconvolution module. Finally, the image is reduced in dimensionality by the Last Block layer to obtain a binary image, which displays the image of the tampered area.
2. The image tampering region localization method based on DAUnet network according to claim 1, characterized in that: The First Block layer includes a Convolution layer, a Batch Normalization layer, and a ReLU layer.
3. The image tampering region localization method based on DAUnet network according to claim 1, characterized in that: In step S1, four Dense Block modules are set up, and a Transition layer is set between adjacent Dense Block modules. Image features are transmitted and processed along the arrangement order of the Dense Block modules and the Transition layer.
4. The image tampering region localization method based on DAUnet network according to claim 3, characterized in that: The Dense Block module consists of a Batch Normalization layer, a ReLU layer, and a 3x3 convolutional layer.
5. The image tampering region localization method based on DAUnet network according to claim 3, characterized in that: According to the data transmission direction, the four Dense Block modules use 6, 12, 16, and 12 layers respectively.
6. The image tampering region localization method based on DAUnet network according to claim 3, characterized in that: The Transition layer consists of a Batch Normalization layer, a ReLU activation layer, a 1x1 convolutional layer, and a 3x3 average pooling layer.
7. The image tampering region localization method based on DAUnet network according to claim 1, characterized in that: In step S3, the feature image is upsampled sequentially through three deconvolution modules, and the downsampling and compression processing of each Transition layer is concatenated to the adjacent deconvolution modules.
8. The image tampering region localization method based on DAUnet network according to claim 1, characterized in that: Each deconvolution module contains three deconvolution layers.
9. A storage medium, characterized in that: The storage medium stores program code, which, when executed by a processor, implements the image tampering region localization method based on the DAUnet network as described in any one of claims 1-8.
Citation Information
Patent Citations
Double-flow U-Net image tampering detection network system and image tampering detection method thereof
CN114998261A