A method and system for analyzing steganalysis images
By using the steganography image analysis model training method with multi-branch and two-layer attention mechanism in the steganography analysis system, the problem of insufficient performance of the existing steganography analysis system is solved, and the ability to identify steganography images is achieved is achieved.
Patent Information
- Application Number
- CN202410712117.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-06-03
AI Technical Summary
The existing steganography analysis system has insufficient performance in steganography image analysis, especially the SRNet based on pytorch architecture has poor performance, and the traditional system has complex operation and cumbersome design, making it difficult to efficiently update and adapt to the development of steganography.
A training method for steganographic image analysis model is proposed. By inputting original images and steganographic images in pairs, using multi-branch and two-layer attention mechanisms, the model can better learn the differences and similarities between the original images and the steganographic images, reduce the impact of background noise, and improve the generalization ability of the model.
It realizes the ability to identify steganography images more accurately, improves the performance of steganography analysis system, and can better adapt to the development of steganography.
Smart Images

Figure CN118608845B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image steganography technology, and in particular to a steganographic image analysis method and system. Background Art
[0002] Steganography is one of the common means of information protection. Image steganography is to embed secret information into the carrier image without damaging its visual appearance to avoid detection. How to identify whether an image contains stego information?
[0003] In the field of steganalysis based on deep learning, how to achieve accurate judgment of steganographic images is a challenging task. Currently, the steganalysis systems on the market usually use SRNet networks for steganalysis identification. However, with the continuous improvement of steganography technology, this network has some shortcomings in steganalysis, especially the performance of SRNet based on the pytorch architecture. At present, many traditional steganalysis systems are difficult to update efficiently and adapt to the development of steganography due to complex operations and cumbersome designs. Therefore, the performance of existing steganalysis systems needs to be improved urgently. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a steganalysis method and system to eliminate or improve one or more defects in the prior art.
[0005] One aspect of the present invention provides a method for training a steganalysis model, the method comprising the following steps:
[0006] Obtaining a training sample set, wherein the training sample set includes a plurality of samples, each sample including an original image and its corresponding stego image containing stego information;
[0007] Input the original image and the corresponding stego image in each sample into a first SRNet network module in pairs to generate a first feature map and a first feature tensor; input the first feature tensor into a first fully connected layer to obtain a first predicted category score, and calculate the cross entropy loss for the first predicted category score to obtain a first loss function;
[0008] The first feature map is input into the attention stegographic positioning module to generate the target position image in the stego image; the target position image generation step includes: calculating the mean of the first feature map; using the mean of the first feature map as a standard value to determine whether the stego image area where the window slides past contains stego information; if it is determined that the stego image area where the window slides past contains stego information, graying out the stego image outside the area to generate the target position image;
[0009] Input the target position image into a second SRNet network module to generate a second feature map and a second feature tensor; input the second feature tensor into a second fully connected layer to obtain a second predicted category score, and calculate the cross entropy loss for the second predicted category score to obtain a second loss function;
[0010] Inputting the second feature map into an attention local steganalysis proposal module to generate a local position image containing steganalysis information in the steganalysis image;
[0011] Inputting the local position image into a third SRNet network module to generate a third feature tensor; inputting the third feature tensor into a third fully connected layer to obtain a third predicted category score, and calculating the cross entropy loss for the third predicted category score to obtain a third loss function;
[0012] The first loss function, the second loss function and the third loss function are added to obtain a total loss function; the total loss function is minimized to update parameters, and the updated first SRNet network module, the attention steganalysis positioning module, the second SRNet network module and the attention local steganalysis proposal module are connected as a steganalysis image analysis model.
[0013] In some embodiments of the present invention, the first SRNet network module, the second SRNet network module and the third SRNet network module have the same structure and share parameters, and the structure includes:
[0014] Two first noise extraction modules, five second noise extraction modules and four feature location modules are sequentially connected from input to output, and the fourth feature location module is respectively connected to a feature location module and a feature tensor conversion module;
[0015] The first noise extraction module includes a convolution layer, a batch normalization layer and a ReLu activation function connected continuously;
[0016] The second noise extraction module includes a convolution layer, a batch normalization, a ReLu activation function, a convolution layer and a batch normalization layer connected in series, and the output of the second noise extraction module is the sum of the input of the second noise extraction module and the output of the last batch normalization layer;
[0017] The feature localization module includes two parallel branches, the first branch includes a convolution layer, a batch normalization, a ReLu activation function, a convolution layer, a batch normalization layer and an average pooling layer, the second branch includes a convolution layer and a batch normalization layer connected continuously, the inputs of the two parallel branches are both the inputs of the feature localization module, and the output of the feature localization module is the sum of the outputs of the two parallel branches;
[0018] The feature localization module includes two parallel branches, one branch includes a convolution layer, a batch normalization, a ReLu activation function, a convolution layer, a batch normalization layer and an average pooling layer, and the other branch includes a convolution layer and a batch normalization layer connected continuously, the inputs of the two parallel branches are both the inputs of the feature localization module, and the output of the feature localization module is the sum of the outputs of the two parallel branches;
[0019] The feature tensor conversion module includes a convolution layer, a batch normalization layer, a ReLu activation function, a convolution layer, a batch normalization layer and an average pooling layer.
[0020] In some embodiments of the present invention, the mean of the first feature map is calculated using the following formula:
[0021]
[0022] B (x,y) represents the feature value of the first feature map in the area (x, y), H represents the height of the first feature map, and W represents the width of the first feature map.
[0023] In some embodiments of the present invention, inputting the second feature map into an attention local steganalysis proposal module to generate a local position image containing steganalysis information in the steganalysis image includes:
[0024] Set a preset number of sliding windows of different sizes;
[0025] Based on the second feature map, calculating the mean corresponding to each sliding window;
[0026] Filter all windows whose mean value is greater than a preset value;
[0027] A preset number of windows are slid to obtain the area containing the stego information in the stego image, and a local position image containing the stego information in the stego image is generated.
[0028] In some embodiments of the present invention, a non-maximum suppression algorithm is used to screen all windows to reduce the overlap of a preset number of obtained windows.
[0029] In some embodiments of the present invention, a first loss function is obtained by calculating the cross entropy loss for the first predicted category score, and the calculation formula is:
[0030]
[0031] Among them, raw_logits i represents the first predicted category score, N represents the number of samples, y i represents the sample label;
[0032] The cross entropy loss is calculated for the second predicted category score to obtain the second loss function, which is calculated as follows:
[0033]
[0034] Among them, local_logits i represents the second predicted category score, N represents the number of samples, and yi represents the sample label; the cross entropy loss is calculated for the third predicted category score to obtain a third loss function, and the calculation formula is:
[0035]
[0036] Among them, window_logits i represents the third predicted category score, N represents the number of samples, y i Represents the sample label.
[0037] Another aspect of the present invention provides a method for analyzing a steganalyzed image, comprising the following steps:
[0038] The stego image to be analyzed is input into the stego image analysis model obtained by the training method of the stego image analysis model as described in any one of the above items, and a local position image containing stego information in the stego image is output.
[0039] Another aspect of the present invention provides a steganalysis system, comprising a processor, a memory and a computer program stored in the memory, wherein the processor is used to execute the computer program, and when the computer program is executed, the system implements the steps of any of the above methods.
[0040] Another aspect of the present invention provides a computer program product, comprising a computer program, which implements the steps of any of the above methods when executed by a processor.
[0041] The beneficial effects of the present invention are at least:
[0042] The present invention provides a new stego image analysis model. When training the model, the original image and the stego image are input in pairs, so that the model can better learn the differences and similarities between the original image and the stego image. At the same time, a multi-branch and two-layer attention mechanism is adopted, so that the model only focuses on the detected local features, which can reduce the influence of background noise, improve the generalization ability of the model, and achieve more accurate recognition of stego images.
[0043] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically indicated in the specification and the accompanying drawings.
[0044] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of the present application, and do not constitute a limitation of the present invention. In the drawings:
[0046] Figure 1 Flow chart of a method for training a steganalysis model in one embodiment of the present invention.
[0047] Figure 2 FIG. 4 is a schematic diagram of a steganalysis model according to another embodiment of the present invention.
[0048] Figure 3 This is a structural diagram of the SRNet model described in another embodiment of the present invention.
[0049] Figure 4 This is a structural diagram of Type 1, Type 2, Type 3 and Type 4 in the model delivered according to another embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0051] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.
[0052] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0053] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.
[0054] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0055] An embodiment of the present invention provides a method for training a steganalysis model, such as Figure 1 As shown, the method includes the following steps S101 to S107:
[0056] Step S101: obtaining a training sample set, the training sample set comprising a plurality of samples, each sample comprising an original image and its corresponding steganographic image containing steganographic information.
[0057] Step S102: Input the original image and the corresponding stego image in each sample into the first SRNet network module in pairs to generate a first feature map and a first feature tensor. Input the first feature tensor into the first fully connected layer to obtain a first predicted category score, and calculate the cross entropy loss for the first predicted category score to obtain a first loss function.
[0058] Step S103: Input the first feature map into the attention steganalysis positioning module to generate a target position image in the steganalysis image.
[0059] Step S104: input the target position image into the second SRNet network module to generate a second feature map and a second feature tensor; input the second feature tensor into the second fully connected layer to obtain a second predicted category score, and calculate the cross entropy loss for the second predicted category score to obtain a second loss function.
[0060] Step S105: Input the second feature map into the attention local steganography proposal module to generate a local position image containing steganographic information in the steganographic image.
[0061] Step S106: Input the local position image into the third SRNet network module to generate a third feature tensor. Input the third feature tensor into the third fully connected layer to obtain a third predicted category score, and calculate the cross entropy loss for the third predicted category score to obtain a third loss function.
[0062] Step S107: The first loss function, the second loss function and the third loss function are added to obtain a total loss function. The total loss function is minimized to update the parameters, and the updated first SRNet network module, the attention steganalysis positioning module, the second SRNet network module and the attention local steganalysis proposal module are connected as a steganalysis image analysis model.
[0063] In step S101, the original image and the corresponding steganographic image in the training sample set are stored and marked respectively. The original image refers to the original image that has not been steganographically processed, and the steganographic image refers to the image that carries hidden information after the original image has been steganographically processed.
[0064] In step S102, cross entropy loss is a loss function commonly used in deep learning, especially suitable for classification tasks. It is used to measure the difference between the probability distribution of the model output and the actual label.
[0065] The feature map refers to the two-dimensional image data output by the middle layer of the convolutional neural network (CNN). The input image is transformed and feature representations at different levels are extracted after a series of convolution, pooling and activation operations in the CNN. These feature representations exist in the form of feature maps in the neural network.
[0066] Among them, the feature tensor refers to a three-dimensional tensor composed of multiple feature maps in deep learning. It is composed of multiple feature maps output by the convolutional neural network. The feature tensor contains the representation of the input data after feature extraction. These features are organized on different channels, thus forming a three-dimensional tensor structure. The first dimension of the feature tensor represents different feature maps, and the next two dimensions represent the height and width of the feature map.
[0067] In some embodiments, the first SRNet network module, the second SRNet network module, and the third SRNet network module have the same structure and share parameters, and their structures include:
[0068] Two first noise extraction modules, five second noise extraction modules and four feature positioning modules are sequentially connected from input to output, and the fourth feature positioning module is respectively connected to a feature positioning module and a feature tensor conversion module.
[0069] The first noise extraction module consists of a convolutional layer, a batch normalization layer and a ReLu activation function connected continuously.
[0070] The second noise extraction module includes a convolution layer, a batch normalization, a ReLu activation function, a convolution layer and a batch normalization layer which are continuously connected. The output of the second noise extraction module is the sum of the input of the second noise extraction module and the output of the last batch normalization layer.
[0071] The feature localization module includes two parallel branches. The first branch includes a convolutional layer, a batch normalization, a ReLu activation function, a convolutional layer, a batch normalization layer and an average pooling layer. The second branch includes a continuously connected convolutional layer and a batch normalization layer. The inputs of the two parallel branches are both the inputs of the feature localization module, and the output of the feature localization module is the sum of the outputs of the two parallel branches.
[0072] The feature tensor conversion module consists of a convolutional layer, a batch normalization layer, a ReLu activation function, a convolutional layer, a batch normalization layer, and an average pooling layer.
[0073] In some embodiments, the first feature map is input into the attention steganalysis positioning module to generate a target position image in the steganalysis image, including:
[0074] Compute the mean of the first feature map.
[0075] The mean value of the first feature map is used as a standard value to determine whether the stego-image area over which the window slides contains stego-information.
[0076] If it is determined that the stego image area that the slide passes contains stego information, the stego image outside the area is grayed out to generate a target position image.
[0077] Specifically, grayscale is the conversion of a color image into a black and white image. In grayscale, color information is discarded and only brightness information is retained. A common grayscale method is to weighted average the values of the red, green, and blue channels of each pixel of a color image to obtain a single grayscale value. By removing color information, grayscale can reduce the dimension of image data and make processing more efficient. Grayscale can also highlight brightness changes and contrast in an image, making the main features of the image more obvious. In this embodiment, grayscale the area outside the steganographic image can make the target location image more prominent, highlighting the hidden information, while reducing interference from non-target areas.
[0078] In some embodiments, the mean of the first feature map is calculated using the formula:
[0079]
[0080] B (x,y) represents the feature value of the first feature map in the area (x, y), H represents the height of the first feature map, and W represents the width of the first feature map.
[0081] In some embodiments, the second feature map is input into the attention local steganalysis proposal module to generate a local position image containing steganalysis information in the steganalysis image, including:
[0082] Set a preset number of sliding windows of different sizes.
[0083] Based on the second feature map, the mean corresponding to each sliding window is calculated.
[0084] Filter all windows whose means are greater than a preset value.
[0085] A preset number of windows are slid to obtain the area containing the stego information in the stego image, and a local position image containing the stego information in the stego image is generated.
[0086] In some embodiments, a non-maximum suppression algorithm is used to screen all windows to reduce the overlap of a preset number of obtained windows.
[0087] The non-maximum suppression algorithm (NMS) is often used in the field of target detection to suppress multiple overlapping bounding boxes and retain the most representative bounding boxes. NMS can reduce redundant boxes and improve the accuracy and efficiency of the detection algorithm. The NMS algorithm sorts all detection results of each category according to their confidence, starting with the bounding box with the highest confidence, and removes other bounding boxes whose intersection with the box is higher than the set threshold. Repeat this process until all bounding boxes are processed.
[0088] In some embodiments, a cross entropy loss is calculated for the first predicted category score to obtain a first loss function, which is calculated as:
[0089]
[0090] Among them, raw_logits i represents the first predicted category score, N represents the number of samples, y i Represents the sample label.
[0091] The cross entropy loss is calculated for the second predicted category score to obtain the second loss function, which is calculated as:
[0092]
[0093] Among them, local_logits i represents the second predicted category score, N represents the number of samples, y i represents the sample label;
[0094] The third loss function is obtained by calculating the cross entropy loss for the third predicted category score, and the calculation formula is:
[0095]
[0096] Among them, window_logits i represents the third predicted category score, N represents the number of samples, y i Represents the sample label.
[0097] On the other hand, this embodiment provides a method for analyzing a steganalysis image, comprising the following steps:
[0098] The stego image to be analyzed is input into the stego image analysis model obtained by any of the above stego image analysis model training methods, and a local position image containing stego information in the stego image is output.
[0099] Another embodiment of the present invention provides a stego image analysis model, the input of which adopts a paired input method, that is, the stego image is marked by cover_img during input, and the original image is stored by stego_img, because the contrast learning model can better learn the differences and similarities between the stego image and the original image, and it is more conducive to the attention mechanism to focus on these difference position areas, so that the model can more accurately identify which parts are areas containing stego information. Paired input can also provide a supervisory signal, so that the model can perform supervised learning through the original image and the corresponding stego image, so that the model converges to the optimal solution faster to reduce the possibility of overfitting.
[0100] The architecture of the model is as follows Figure 2 As shown in the figure, the model adopts a multi-branch architecture, which mainly includes three branches. It trains images at different scales to enhance the generalization ability and robustness of the model. The three branches are the original branch, the target branch, and the local branch. The parameters of the convolutional neural network and the fully connected layer (FC) of the three branches are shared. By sharing the parameters, the total number of parameters of the network is reduced, which helps prevent overfitting and makes the network easier to train. It also forces the network to learn more general feature representations, which helps it classify objects of different scales and parts.
[0101] The SRNet in this model is an improved non-original SRNet. SRNet (Steganalysis Residual Network) is a deep learning model for steganalysis image analysis. The original SRNet is usually composed of multiple convolutional layers, pooling layers and fully connected layers. The core of its design is to use deep learning technology to extract features in the image and detect and extract steganalysis information through these features. The structure of SRNet in this embodiment is as follows: Figure 3 As shown in the figure, the model contains 4 types of structures, among which the first and second types of structures are used to extract the noise embedded in the image during the steganographic process; the third type is used to reduce the dimension of the feature map and reduce the size of the feature map, and finally output the feature map for confirming the feature position to match the attention mechanism; the fourth type of structure is used to convert the feature map into a two-dimensional tensor to facilitate the subsequent classifier to calculate the prediction score.
[0102] The Type1 structure contains a convolutional layer, a batch normalization layer (BN), and a ReLu activation function, where the convolution kernel size of the convolution layer is 3×3, the stride is 1, and the padding is 1. Type2 is composed of Type1 connected to a convolutional layer. The structure of this convolutional layer is the same as that of the convolutional layer in Type1, and then passes through a BN layer, and finally the processed result is added to the original input. This is a very common residual connection method, which enables the model to learn more complex features while preventing the gradient disappearance problem. One branch of Type3 is equivalent to adding a 3×3 average pooling layer on the basis of Type2, and the other branch consists of a convolution layer with a convolution kernel size of 1 and a stride of 2 and a batch normalization layer. Finally, the outputs of the two branches are added for residual connection. Type4, that is, Type2, does not perform residual connection, but average pools the results of network processing in the second and third dimensions, namely height and width, to compress the feature map of each channel into a single value. The structures of Type 1 to Type 4 are as follows: Figure 4 shown.
[0103] In the original branch, the input image is passed through SRNet to obtain FM (feature map), and then the embedding (feature tensor) is input to a fully connected layer, which is implemented using the nn.Linear class in PyTorch. The input feature number of this fully connected layer is channels, and the output feature number is num_classes. The predicted category score raw_logits is obtained, and the score is passed through the cross entropy loss function to obtain raw_loss. The calculation process is as follows:
[0104]
[0105] where raw_logits i is the probability that sample i is predicted to be a positive class.
[0106] Where yi is the label of sample i, the positive class is 1 and the negative class is 0.
[0107] In the target branch, get the corresponding local_loss:
[0108]
[0109] where local_logits i is the probability that sample i is predicted to be a positive class.
[0110] The last branch is a local branch, and we get part_loss:
[0111]
[0112] window_logits i is the probability that sample i is predicted to be a positive class.
[0113] The total loss function of the model is to add up the above losses:
[0114] Total loss =raw loss +local loss +part loss ,
[0115] In the original branch, the original image and the steganographic image are input into the modified version of SRNet in pairs, and the feature map B (feature maps) of the input image C×H×W is obtained to determine the coordinate position of the embedded steganographic information in the steganographic image.
[0116]
[0117] where f i Represents the feature map of channel i.
[0118] In the attention steganalysis positioning module, the difference between the steganalysis image and the original image noticed by the network is determined according to B, and then the mean of B is used The standard value is used to determine whether the area obtained by sliding the window belongs to a part of the stego area to be found, and the mask area is obtained. The formula and is evaluated as follows:
[0119]
[0120] B (x,y) Refers to the eigenvalue of the feature graph at (x, y), is the resulting binary mask in the (x, y) region.
[0121] Furthermore, after the model confirms the partial location containing the stego information, the background outside this area is grayed out so that the model only focuses on the difference between the stego part and the original image part to reduce the impact of background noise. At the same time, it can also ensure that the image size is the original size without any stretching or scaling operations to prevent the stego information from being erased.
[0122] In this embodiment, the attention steganalysis positioning module is used to obtain relatively accurate location information, but the selected positioning result may only contain a part of the location of the embedded steganalysis information. Therefore, the attention local steganalysis proposal module is introduced to improve the robustness of the model.
[0123] From the feature map formula B of the attention steganalysis localization module, we can know that the connected areas with higher values in B are usually the key parts that the steganalysis model needs to learn. Therefore, the attention local steganalysis proposal module uses the sliding window in the target detection to find the partial window containing the embedded steganalysis information as the local image by giving multiple sliding windows of different sizes.
[0124] The activation average is obtained using the following formula That is, under different sliding windows To determine key information:
[0125]
[0126] The model gets all windows The values are sorted if The larger the value, the more steganographic information is contained in this window. The windows with the largest values may have a high degree of overlap. Therefore, nms (non-maximum suppression) is used to select windows that contain as many steganalytic information areas as possible under a fixed number of windows. The background outside the local area where this window is located is grayed out to reduce the impact of redundant background information, so that the model can learn the key information of the steganalytic information area as accurately and completely as possible.
[0127] In summary, the present invention provides a method and system for stego-image analysis, which designs a stego-image analysis model. The model training method includes: inputting the original image and the corresponding stego-image as training samples into the first SRNet network module to generate a first feature map and a first feature tensor, and inputting the first feature tensor into the fully connected layer to obtain a first loss function. Inputting the first feature map into the attention stego-location module to generate a target position image, and inputting the target position image into the second SRNet network module to generate a second feature map and a second feature tensor. Inputting the second feature tensor into the fully connected layer to obtain a second loss function. Inputting the second feature map into the attention local stego-proposal module to generate a local position image. Inputting the local position image into the third SRNet network module to generate a third feature tensor, and inputting the third feature tensor into the fully connected layer to obtain a third loss function. Adding the three loss functions to obtain a total loss function, minimizing the total loss function to obtain a stego-image analysis model. The present invention inputs the original image and the steganographic image in pairs when training the model, so that the model can better learn the differences and similarities between the original image and the steganographic image. At the same time, a multi-branch and two-layer attention mechanism is adopted, so that the model only focuses on the detected local features, which can reduce the influence of background noise, improve the generalization ability of the model, and achieve more accurate recognition of the steganographic image.
[0128] Corresponding to the above method, the present invention also provides a system, which includes a computer device, the computer device includes a processor and a memory, the memory stores computer instructions, the processor is used to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the system implements the steps of the method described above.
[0129] The embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the aforementioned edge computing server deployment method are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.
[0130] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.
[0131] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0132] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.
[0133] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A training method for a steganalysis model, characterized in that: The method comprises the following steps: Obtaining a training sample set, wherein the training sample set includes a plurality of samples, each sample including an original image and its corresponding stego image containing stego information; Input the original image and the corresponding stego image in each sample into a first SRNet network module in pairs to generate a first feature map and a first feature tensor; input the first feature tensor into a first fully connected layer to obtain a first predicted category score, and calculate the cross entropy loss for the first predicted category score to obtain a first loss function; The first feature map is input into the attention stegographic positioning module to generate the target position image in the stego image; the target position image generation method comprises: calculating the mean of the first feature map; using the mean of the first feature map as a standard value to determine whether the stego image area where the window slides past contains stego information; if it is determined that the stego image area where the window slides past contains stego information, graying out all the stego images outside the area to generate the target position image; Input the target position image into a second SRNet network module to generate a second feature map and a second feature tensor; input the second feature tensor into a second fully connected layer to obtain a second predicted category score, and calculate the cross entropy loss for the second predicted category score to obtain a second loss function; Inputting the second feature map into an attention local steganalysis proposal module to generate a local position image containing steganalysis information in the steganalysis image; Inputting the local position image into a third SRNet network module to generate a third feature tensor; inputting the third feature tensor into a third fully connected layer to obtain a third predicted category score, and calculating the cross entropy loss for the third predicted category score to obtain a third loss function; The first loss function, the second loss function and the third loss function are added to obtain a total loss function; the total loss function is minimized to update parameters, and the updated first SRNet network module, the attention steganalysis positioning module, the second SRNet network module and the attention local steganalysis proposal module are connected as a steganalysis image analysis model.
2. The method for training a steganalysis model according to claim 1, characterized in that: The first SRNet network module, the second SRNet network module and the third SRNet network module have the same structure and share parameters, and the structure includes: Two first noise extraction modules, five second noise extraction modules and four feature location modules are sequentially connected from input to output, and the fourth feature location module is respectively connected to a feature location module and a feature tensor conversion module; The first noise extraction module includes a convolution layer, a batch normalization layer and a ReLu activation function connected continuously; The second noise extraction module includes a convolution layer, a batch normalization, a ReLu activation function, a convolution layer and a batch normalization layer connected in series, and the output of the second noise extraction module is the sum of the input of the second noise extraction module and the output of the last batch normalization layer; The feature localization module includes two parallel branches, the first branch includes a convolution layer, a batch normalization, a ReLu activation function, a convolution layer, a batch normalization layer and an average pooling layer, the second branch includes a convolution layer and a batch normalization layer connected continuously, the inputs of the two parallel branches are both the inputs of the feature localization module, and the output of the feature localization module is the sum of the outputs of the two parallel branches; The feature tensor conversion module includes a convolution layer, a batch normalization layer, a ReLu activation function, a convolution layer, a batch normalization layer and an average pooling layer.
3. The training method of the steganalysis model according to claim 1, characterized in that: Calculate the mean of the first feature map using the following formula: B (x,y) represents the feature value of the first feature map in the area (x, y), H represents the height of the first feature map, and W represents the width of the first feature map.
4. The training method of the steganalysis model according to claim 1, characterized in that: Inputting the second feature map into the attention local steganalysis proposal module to generate a local position image containing steganalysis information in the steganalysis image, including: Set a preset number of sliding windows of different sizes; Based on the second feature map, calculating the mean corresponding to each sliding window; Filter all windows whose mean value is greater than a preset value; A preset number of windows are slid to obtain the area containing the stego information in the stego image, and a local position image containing the stego information in the stego image is generated.
5. The method for training a steganalysis model according to claim 4, characterized in that: All windows are screened using a non-maximum suppression algorithm to reduce the overlap of a preset number of windows obtained.
6. The method for training a steganalysis model according to claim 1, characterized in that: The cross entropy loss is calculated for the first predicted category score to obtain a first loss function, which is calculated as follows: Among them, raw_logits i represents the first predicted category score, N represents the number of samples, y i represents the sample label; The cross entropy loss is calculated for the second predicted category score to obtain the second loss function, which is calculated as follows: Among them, local_logits i represents the second predicted category score, N represents the number of samples, y i represents the sample label; The cross entropy loss is calculated for the third predicted category score to obtain a third loss function, which is calculated as follows: Among them, window_logits i represents the third predicted category score, N represents the number of samples, y i Represents the sample label.
7. A method for analyzing a steganalyzed image, characterized in that: The following steps are involved: The stego image to be analyzed is input into the stego image analysis model obtained by the training method of the stego image analysis model according to any one of claims 1 to 6, and a local position image containing stego information in the stego image is output.
8. A steganalysis system, comprising a processor, a memory and a computer program stored in the memory, characterized in that: The processor is used to execute the computer program. When the computer program is executed, the system implements the steps of the method according to any one of claims 1 to 7.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Steganography information identification method and device and electronic equipment
CN115375528A
Small sample image steganalysis model training method, small sample image steganalysis model analysis method and small sample image steganalysis model training device
CN116894753A