CN113012152B - Image tampering chain detection method and device and electronic equipment - Google Patents

Image tampering chain detection method and device and electronic equipment Download PDF

Info

Publication number
CN113012152B
CN113012152B CN202110463677.9A CN202110463677A CN113012152B CN 113012152 B CN113012152 B CN 113012152B CN 202110463677 A CN202110463677 A CN 202110463677A CN 113012152 B CN113012152 B CN 113012152B
Authority
CN
China
Prior art keywords
image
detected
channel number
pixel size
feature map
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110463677.9A
Other languages
Chinese (zh)
Other versions
CN113012152A (en
Inventor
游嘉祥
李元满
李霞
周建涛
王娜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen University
Original Assignee
Shenzhen University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen University filed Critical Shenzhen University
Priority to CN202110463677.9A priority Critical patent/CN113012152B/en
Publication of CN113012152A publication Critical patent/CN113012152A/en
Application granted granted Critical
Publication of CN113012152B publication Critical patent/CN113012152B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computing Systems (AREA)
  • Evolutionary Biology (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Multimedia (AREA)
  • Bioethics (AREA)
  • Computer Hardware Design (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses an image tampering chain detection method, an image tampering chain detection device and electronic equipment, wherein the method comprises the following steps: inputting an image to be detected into a preset image feature extractor for feature extraction to obtain a target feature map corresponding to the image to be detected; performing convolution operation on the target characteristic graph and convolution kernels of the target number, and flattening a convolution result to obtain word vector representation of target dimensionality; and inputting the word vector representation into a preset image processing algorithm translation model for image processing algorithm recognition to obtain a tampering chain detection result of the image to be detected, wherein the preset image processing algorithm translation model is constructed on the basis of an attention mechanism model.

Description

Image tampering chain detection method and device and electronic equipment
Technical Field
The invention relates to the technical field of image detection, in particular to a method and a device for detecting an image tampering chain and electronic equipment.
Background
The tamper Chain (Manipulation-Chain) refers to the history of image tampering, that is, the ordered combination of a limited number of image processing algorithms that the image has passed from generation to now, and the image processing algorithms generally include: JEPG compression, median filtering, gaussian blur, super resolution and the like, wherein if an image is firstly subjected to JEPG compression, then to median filtering processing and finally to gaussian blur processing, the corresponding tampered chain is; JEPG compression-median filtering-gaussian blur. The falsification chain of the analysis image plays an important role in the image traceability multimedia forensics, and various image processing software brings great convenience to the operation of the digital image, and meanwhile, the cost of image falsification is also obviously reduced and is difficult to be perceived by naked eyes.
The identification of the existing image processing algorithm depends on the good classification performance of the neural network, and the tampering chain of only one image processing algorithm is detected to be basically mature due to the strong characterization capability of the neural network. However, for the case that the image processing algorithm is greater than 2, the current classification-based algorithm effect is difficult to meet the application requirement, and the following difficulties mainly exist: (1) concealment: after the image is processed by N algorithms, the algorithms are mutually influenced, so that traces remained on the tampered image are not obvious; (2) ordering: since the tamper chain is an ordered combination of a limited number of algorithms, the order between the algorithms is difficult to determine after the limited number of algorithms is detected. (3) complexity: the tampering leaves a mark intricately, the classification network is difficult to realize, and as the number of limited algorithms increases, the number of tampering chains as the classification network category increases exponentially, for example, for the tampering chain containing only 2 algorithms, the number is arranged as
Figure BDA0003042720810000011
The classification problem is easily solved by the two classification problems, and for a falsified chain containing 4 algorithms, the permutation number is ≦ based on ≦ the ≦ value>
Figure BDA0003042720810000012
And->
Figure BDA0003042720810000013
Solving the problem of tamper chain detection by classification problems seems less optimistic. Therefore, a new image falsification chain detection method is urgently needed to be provided to improve the accuracy of the image falsification chain detection result.
Disclosure of Invention
Therefore, the technical problem to be solved by the invention is to overcome the defect that the existing method for identifying the image tampering chain of multiple algorithms by using the neural network classification performance has low identification accuracy, so that the method and the device for detecting the image tampering chain and the electronic equipment are provided.
According to a first aspect, an embodiment of the present invention discloses an image tamper chain detection method, including: inputting an image to be detected into a preset image feature extractor for feature extraction to obtain a target feature map corresponding to the image to be detected; performing convolution operation on the target characteristic graph and convolution kernels of the target number, and flattening the convolution result to obtain word vector representation of the target dimension; and inputting the word vector representation into a preset image processing algorithm translation model for image processing algorithm recognition to obtain a tampering chain detection result of the image to be detected, wherein the preset image processing algorithm translation model is constructed on the basis of an attention mechanism model.
Optionally, the preset image feature extractor includes: the device comprises a first convolution layer, a pooling layer, a residual error network layer and a second convolution layer; the first convolution layer is used for converting an input first channel number and an input image to be detected with a first pixel size into a feature map of an image to be detected with a second channel number and a first pixel size, wherein the second channel number is greater than the first channel number; the pooling layer is used for performing down-sampling processing on the second channel number and the to-be-detected image feature map with the first pixel size to obtain a second channel number and a to-be-detected image feature map with a second pixel size, wherein the number of pixels contained in the second pixel size is smaller than that contained in the first pixel size; the residual error network layer is used for processing the second channel number and the image characteristic diagram to be detected with the second pixel size to obtain a second channel number and an image characteristic diagram to be detected with a third pixel size, wherein the number of pixels contained in the third pixel size is smaller than the number of pixels contained in the second pixel size; the second convolution layer is used for performing downsampling processing on the second channel number and the to-be-detected image feature map with the third pixel size to obtain a third channel number and a to-be-detected image feature map with the third pixel size, and taking the third channel number and the to-be-detected image feature map with the third pixel size as target feature maps corresponding to the to-be-detected image, wherein the third channel number is smaller than the second channel number and is larger than the first channel number.
Optionally, inputting the word vector representation into a preset image processing algorithm translation model for image processing algorithm recognition, including: and performing dimension reduction on the word vector representation, and inputting the word vector representation subjected to dimension reduction into a preset image processing algorithm translation model for image processing algorithm identification.
Optionally, the number of convolution kernels is greater than the number of image processing algorithms capable of processing the image to be detected.
According to a second aspect, an embodiment of the present invention further discloses an image falsification chain detection apparatus, including: the characteristic diagram acquisition module is used for inputting an image to be detected into a preset image characteristic extractor for characteristic extraction to obtain a target characteristic diagram corresponding to the image to be detected; the word vector representation acquisition module is used for performing convolution operation on the target characteristic graph and the convolution kernels of the target quantity, and flattening the convolution result to obtain word vector representation of the target dimension; and the detection result acquisition module is used for inputting the word vector representation into a preset image processing algorithm translation model for image processing algorithm recognition to obtain a tampering chain detection result of the image to be detected, wherein the preset image processing algorithm translation model is constructed on the basis of an attention mechanism model.
Optionally, the preset image feature extractor includes: the device comprises a first convolution layer, a pooling layer, a residual error network layer and a second convolution layer; the first convolution layer is used for converting an input first channel number and an input image to be detected with a first pixel size into a second channel number and an input image feature map to be detected with the first pixel size, wherein the second channel number is larger than the first channel number; the pooling layer is used for performing down-sampling processing on the second channel number and the to-be-detected image feature map with the first pixel size to obtain a second channel number and a to-be-detected image feature map with a second pixel size, wherein the number of pixels contained in the second pixel size is smaller than that contained in the first pixel size; the residual error network layer is used for processing the second channel number and the image characteristic diagram to be detected with the second pixel size to obtain a second channel number and an image characteristic diagram to be detected with a third pixel size, wherein the number of pixels contained in the third pixel size is smaller than the number of pixels contained in the second pixel size; the second convolutional layer is used for performing downsampling processing on the second channel number and the image feature map to be detected with the third pixel size to obtain a third channel number and a third pixel size image feature map to be detected, and the third channel number and the image feature map to be detected with the third pixel size are used as target feature maps corresponding to the image to be detected, wherein the third channel number is smaller than the second channel number and the third channel number is larger than the first channel number.
Optionally, the detection result obtaining module is further configured to perform dimension reduction on the word vector representation, and input the word vector representation after the dimension reduction into a preset image processing algorithm translation model for image processing algorithm recognition.
Optionally, the number of convolution kernels is greater than the number of image processing algorithms capable of processing the image to be detected.
According to a third aspect, an embodiment of the present invention further discloses an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to cause the at least one processor to perform the steps of the image tamper chain detection method according to the first aspect or any one of the optional embodiments of the first aspect.
According to a fourth aspect, the embodiments of the present invention also disclose a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the image tamper chain detection method according to the first aspect or any one of the optional embodiments of the first aspect.
The technical scheme of the invention has the following advantages:
the image tampering chain detection method/device provided by the invention comprises the steps of inputting an image to be detected into a preset image feature extractor for feature extraction to obtain a target feature map corresponding to the image to be detected, carrying out convolution operation on the target feature map and convolution kernels of a target number, flattening the convolution result to obtain word vector representation of a target dimension, inputting the word vector representation into a preset image processing algorithm translation model constructed based on an attention mechanism model for image processing algorithm identification to obtain a tampering chain detection result of the image to be detected; compared with the method for directly classifying and detecting the image tampering chain by using the classification performance of the neural network, the method provided by the invention has the advantages that the characteristic extraction is carried out on the image to be detected, the convolution and flattening operation is carried out on the extracted target characteristic diagram, the word vector representation obtained after flattening is input into the preset image processing algorithm translation model, so that the preset image processing algorithm translation model directly translates the image processing algorithm corresponding to the image to be detected, the number of possible tampering chains corresponding to the image to be detected is exponentially reduced along with the output of the translation result, the complexity of tampering chain detection under multiple algorithms is reduced, for a tampering chain detection task, the translation model is more in line with the cognition of human, silk cocoon extraction and word-by-word translation, under the image tampering chain detection task with the same length, the detection result accuracy of the tampering chain by using the translation model is higher, meanwhile, the preset image processing algorithm translation model is constructed on the basis of the attention machine model, and the orderliness result of the tampering chain translated on the basis of the preset image processing algorithm translation model is more accurate.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a specific example of an image falsification chain detection method in an embodiment of the present invention;
fig. 2 is a schematic diagram of a specific network architecture of an image falsification chain detection method according to an embodiment of the present invention;
FIG. 3 is a diagram of an image feature extractor of an embodiment of an image tamper chain detection method according to the invention;
FIG. 4 is a diagram of a specific residual network layer of an image tampering chain detection method according to an embodiment of the present invention;
FIG. 5 is a schematic block diagram of a specific example of an image falsification chain detection apparatus according to an embodiment of the present invention;
fig. 6 is a diagram illustrating an exemplary electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it is to be understood that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplification of description, but do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; the two elements may be directly connected or indirectly connected through an intermediate medium, or may be connected through the inside of the two elements, or may be connected wirelessly or through a wire. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
The embodiment of the invention discloses a method for detecting an image tampering chain, which is shown by combining fig. 1 and fig. 2 and comprises the following steps:
step 101, inputting an image to be detected into a preset image feature extractor for feature extraction, and obtaining a target feature map corresponding to the image to be detected.
Illustratively, the image to be detected may be an image that is not processed by any image processing algorithm, or may be an image that is processed by at least one image processing algorithm, wherein the image processing algorithm may include, but is not limited to, JPEG compression, median filtering, gaussian blurring, super-resolution of the image, noise addition, and the like. The method includes the steps that an obtained image to be detected is input to a preset image feature extractor to be subjected to feature extraction, and a target feature map corresponding to the image to be detected is obtained. In the embodiment of the application, 256 × 256 × 1 images to be detected are selected, and the size of the target feature map is 32 × 32 × 32.
And 102, performing convolution operation on the target characteristic graph and convolution kernels of the target number, and flattening the convolution result to obtain word vector representation of the target dimension.
Each channel of the extracted target feature map hides traces of various image processing algorithms, so that the target feature map is convolved with a target number of convolution kernels, and a flattening process is performed on a result obtained by convolution to obtain a word vector representation of C × H × W, wherein the word vector representation obtained after the flattening process may also be referred to as a "sentence vector".
As an optional embodiment of the present invention, the number of the convolution kernels is greater than the number of image processing algorithms capable of processing the image to be detected.
103, inputting the word vector representation into a preset image processing algorithm translation model for image processing algorithm recognition to obtain a tampering chain detection result of the image to be detected, wherein the preset image processing algorithm translation model is constructed on the basis of an attention mechanism model.
Exemplarily, the obtained word vector representation containing the tampering trace is input into a preset image processing algorithm translation model for encoding and decoding, and a tampering chain detection result of the image to be detected is obtained. The preset image processing algorithm translation model is not limited in the embodiment of the application, and a person skilled in the art can construct the translation model according to actual use requirements based on an attention mechanism model and can also select a Transformer network. The preset image processing algorithm translation model can be obtained by pre-training according to the type of the image processing algorithm possibly corresponding to the image to be detected to be translated, and prior information (Dec) can be used in the model training process in ) Therefore, the Transformer translation model can realize parallel training, and the training efficiency of the model is improved.
For example, the image processing algorithms to be translated for the image to be detected may correspond to the following five categories: JPEG compression, median filtering, gaussian blur, super resolution and Gaussian noise addition are respectively expressed by JP, MF, GB, SR and GN, a corresponding dictionary is constructed as shown in table 1, if an image is subjected to the five operations in sequence, the falsification chain is JP-MF-GB-SR-GN, and the corresponding real label y = [0,1,2,3,4] can be obtained from the dictionary.
TABLE 1 processing Algorithm dictionary
Figure BDA0003042720810000071
The loss function employed in the examples of the present application is shown below:
Figure BDA0003042720810000072
loss of function advantage by cross entropyAdapting a trained image processing algorithm translation model to enable a predicted falsification chain
Figure BDA0003042720810000073
Approaching the true tamper chain y.
Compared with the method for detecting the image tampering chain in a classified mode by using the classification performance of the neural network, the method provided by the embodiment of the invention has the advantages that the characteristic extraction is directly carried out on the image to be detected, the convolution and flattening operation is carried out on the extracted target characteristic diagram, the word vector representation obtained after flattening is input into the preset image processing algorithm translation model, so that the preset image processing algorithm translation model directly translates the image processing algorithm corresponding to the image to be detected, the possible tampering chain quantity corresponding to the image to be detected is exponentially reduced along with the output of the translation result, the complexity of tampering chain detection under multiple algorithms is reduced, and the preset image processing algorithm translation model is constructed on the basis of the attention machine model, so that the orderliness result of the tampering chain translated on the basis of the preset image processing algorithm translation model is more accurate.
Aiming at the problems of orderliness, complexity and the like of a tampered chain, the image tampered chain detection method based on the machine translation technology provided by the embodiment of the invention is not limited to the classification problem of a neural network to detect the tampered chain of the tampered image, but combines the advantages of machine translation, carries out ordered translation on limited algorithms contained in the tampered image one by one to obtain the corresponding tampered chain, accords with the cognition of people for processing affairs, breaks through the inherent thinking of the original classification algorithm, and can efficiently detect the corresponding tampered chain of the tampered image; with the progress of machine translation, the number of the falsification chains is exponentially reduced due to the translation of the previous "word", and the problems of orderliness and complexity of the falsification chains stored in the falsification chains are solved, for example, for a falsification chain including 5 image processing algorithms, when the first "word" is translated, the possible situations of the decoding results are reduced from the original 120 to 24, the translation results are considerable, and the image falsification chain detection efficiency is further improved.
As an optional embodiment of the present invention, the preset image feature extractor includes: a first convolution layer, a pooling layer, a residual network layer and a second convolution layer; the number of convolution layers, pooling layers, and residual network layers included in the preset image feature extractor is not limited in the embodiment of the present application, and can be determined by those skilled in the art according to actual needs. The image feature extractor structure adopted in the embodiment of the present application is shown in fig. 3.
The first convolution layer is used for converting an input first channel number and an input image to be detected with a first pixel size into a feature map of an image to be detected with a second channel number and a first pixel size, wherein the second channel number is greater than the first channel number;
the pooling layer is used for performing down-sampling processing on the second channel number and the to-be-detected image feature map with the first pixel size to obtain a second channel number and a to-be-detected image feature map with a second pixel size, wherein the number of pixels contained in the second pixel size is smaller than that contained in the first pixel size;
the residual error network layer is used for processing the second channel number and the image characteristic diagram to be detected with the second pixel size to obtain a second channel number and an image characteristic diagram to be detected with a third pixel size, wherein the number of pixels contained in the third pixel size is smaller than the number of pixels contained in the second pixel size;
the second convolutional layer is used for performing downsampling processing on the second channel number and the image feature map to be detected with the third pixel size to obtain a third channel number and a third pixel size image feature map to be detected, and the third channel number and the image feature map to be detected with the third pixel size are used as target feature maps corresponding to the image to be detected, wherein the third channel number is smaller than the second channel number and the third channel number is larger than the first channel number.
For example, the size of the image feature image pixels and the number of channels of each network layer are not limited in the embodiments of the present application, and can be determined by a person skilled in the art according to actual needs. Specifically, as shown in fig. 3, the input of the image feature extractor is a 256 × 256 × 1 image, the number of channels is 1, and the feature extraction by the image feature extractor results in a feature map having H × W × C of 32 × 32 × 32. In the image feature extractor, a first convolution layer (Conv) converts an input image (256 × 256 × 1) from 1 channel into 64 channels (256 × 256 × 64), then the input image is down-sampled and output by a maximum pooling layer (MaxPool) to obtain (128 × 128 × 64), then the input image is output by a residual error network layer to obtain (32 × 32 × 64), and finally the input image is down-sampled by a convolution layer to output a feature map (32 × 32 × 32). In the embodiment of the present application, the residual network layer (ResNet) is composed of 16 residual blocks and 2 maximum pooling layers, and the specific structure is shown in fig. 4. The deeper convolutional neural network formed by the residual error network can better extract the characteristics left by the image processing algorithm and construct a more appropriate sentence vector.
As an optional implementation manner of the present invention, the inputting the word vector representation into a preset image processing algorithm translation model for image processing algorithm recognition includes: and performing dimension reduction on the word vector representation, and inputting the word vector representation subjected to dimension reduction into a preset image processing algorithm translation model for image processing algorithm identification. In order to improve the machine translation efficiency, the word vector representation input into the translation model of the preset image processing algorithm is subjected to dimension reduction processing, and redundant feature vectors in the word vector representation are reduced, so that the translation efficiency is improved while the accuracy of a translation result is ensured.
As a specific embodiment of the present application, an original image is divided into a plurality of 256 × 256 sub-images, and then the sub-images are tampered in a certain order to obtain a corresponding tamper chain as a priori information. The falsification algorithm is assumed to comprise Gaussian blur, median filtering, super resolution, JPEG compression and Gaussian noise (GB-MF-RS-JP-GN), wherein the Gaussian blur and the median filtering are filtered by adopting a template of 3 multiplied by 3; the super-resolution adopts an algorithm that the size of the image is reduced to one fourth of the original size, and then the image is amplified by four times through a bilinear difference algorithm to carry out super-resolution; the compression factor QF of JPEG compression is 70; the gaussian noise added is 0-mean and the variance ranges between 5 and 10. The accuracy translation result of the image tampering chain detection algorithm provided by the above embodiment is shown in table 2 below:
TABLE 2 accuracy of image tamper chain prediction
Figure BDA0003042720810000101
Wherein A is the number of arrangement; accuracy is the Accuracy rate at which the chain is tampered with completely consistently; a bilingual evaluation substitution score (BLEU) with a score of 1.0 for a perfect match and 0.0 for a complete mismatch.
As can be seen from table 2, due to the secrecy of the tamper trace, as the total number of algorithms increases, the tamper trace left by the previous algorithm is covered by the subsequent algorithm, resulting in a decrease in accuracy, but as can be seen from the BLEU index, the performance index is still considerable. The following table 3 is a confusion matrix of the detection result of the tamper chain based on the MISLnet of the previous optimal classification algorithm, and the following table 4 is a confusion matrix of the detection result of the tamper chain based on the technical scheme of the present application:
table 3 shows the detection results of the falsification chain based on the previous optimal classification algorithm MISLnet
0R MF GB RS MF-GB GB-MF MF-RS RS-MF GB-RS RS-GB
0R 99.16 0.42 0.00 0.39 0.00 0.03 0.00 0.00 0.00 0.00
MF 0.09 88.40 0.00 0.00 0.00 0.20 0.66 10.37 0.29 0.00
GB 0.00 0.00 89.76 0.18 0.44 0.00 0.21 0.00 0.00 9.42
RS 0.03 0.00 0.55 99.25 0.00 0.00 0.14 0.03 0.00 0.00
MF-GB 0.00 0.00 0.11 0.00 94.21 1.67 0.58 0.00 2.64 0.78
GB-MF 0.00 0.03 0.00 0.00 0.60 91.41 1.75 5.49 0.72 0.00
MF-RS 0.00 0.00 0.00 0.14 0.00 0.03 99.80 0.00 0.03 0.00
RS-MF 0.00 2.97 0.06 0.06 0.00 16.28 2.17 76.01 2.45 0.00
GB-RS 0.00 0.00 0.00 0.00 0.15 0.09 0.15 0.00 99.44 0.18
RS-GB 0.00 0.00 2.95 0.00 0.09 0.00 0.00 0.00 0.79 96.17
Table 4 shows the detection results of the falsification chain based on the technical scheme of the present application
0R MF GB RS MF-GB GB-MF MF-RS RS-MF GB-RS RS-GB
0R 100.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
MF 0.00 96.06 0.00 0.00 0.00 0.16 0.13 3.65 0.00 0.00
GB 0.00 0.00 94.97 0.17 0.10 0.00 0.00 0.00 0.00 4.76
RS 0.00 0.00 0.19 99.68 0.00 0.00 0.13 0.00 0.00 0.00
MF-GB 0.00 0.00 0.03 0.00 98.69 1.25 0.00 0.00 0.00 0.03
GB-MF 0.00 0.13 0.00 0.00 0.58 96.96 0.00 2.23 0.10 0.00
MF-RS 0.00 0.00 0.00 0.10 0.00 0.00 99.90 0.00 0.00 0.00
RS-MF 0.00 3.36 0.00 0.00 0.00 4.65 0.13 91.72 0.13 0.00
GB-RS 0.00 0.00 0.00 0.00 0.00 0.13 0.00 0.03 99.78 0.06
RS-GB 0.00 0.00 2.68 0.00 0.03 0.00 0.00 0.03 0.32 96.94
By combining the data described in the above tables 3 and 4, it can be seen that the accuracy of the detection result of the tamper chain is higher by the scheme described in the embodiment of the present application; and it can be seen from the combination of table 2-table 4 that the performance of the scheme described in the examples of the present application is significantly better than that of the MISLnet network for short chains and at the same time the detection results for longer chains are also very considerable.
The method provided by the embodiment of the application can be realized by using a deep learning frame Pythrch, and can also be realized by using deep learning frames such as TensorFlow, caffe and the like. Given an image to be detected, all image processing algorithms and sequences thereof which the image to be detected goes through can be detected through the method provided by the embodiment of the application, the inherent thinking of tampering chain detection is broken through, a word-by-word translation technology for the tampering chain is provided, and the method has important significance for the research in the fields of image counterfeiting detection, image traceability analysis, multimedia security and the like.
The embodiment of the invention also discloses an image tampering chain detection device, as shown in fig. 5, the device comprises:
the feature map obtaining module 501 is configured to input an image to be detected into a preset image feature extractor for feature extraction, so as to obtain a target feature map corresponding to the image to be detected;
a word vector representation obtaining module 502, configured to perform convolution operation on the target feature map and convolution kernels of the target number, and flatten a convolution result to obtain a word vector representation of a target dimension;
the detection result obtaining module 503 is configured to input the word vector representation to a preset image processing algorithm translation model for image processing algorithm recognition, so as to obtain a tampering chain detection result of the image to be detected, where the preset image processing algorithm translation model is constructed based on an attention mechanism model.
Compared with the image tampering chain detection device based on the classification performance of the neural network, the image tampering chain detection device provided by the embodiment of the invention has the advantages that the characteristic extraction is directly carried out on the image to be detected, the convolution and flattening operation is carried out on the extracted target characteristic diagram, the word vector representation obtained after flattening is input into the preset image processing algorithm translation model, so that the preset image processing algorithm translation model directly translates the image processing algorithm corresponding to the image to be detected, the possible tampering chain number corresponding to the image to be detected is exponentially reduced along with the output of the translation result, the complexity of tampering chain detection under multiple algorithms is reduced, and the preset image processing algorithm translation model is constructed based on the attention mechanism model, so that the ordering result of the tampering chain translated based on the preset image processing algorithm translation model is more accurate.
As an optional embodiment of the present invention, the preset image feature extractor includes: the device comprises a first convolution layer, a pooling layer, a residual error network layer and a second convolution layer;
the first convolution layer is used for converting an input first channel number and an input image to be detected with a first pixel size into a second channel number and an input image feature map to be detected with the first pixel size, wherein the second channel number is larger than the first channel number;
the pooling layer is used for performing down-sampling processing on the second channel number and the to-be-detected image feature map with the first pixel size to obtain a second channel number and a to-be-detected image feature map with the second pixel size, wherein the number of pixels contained in the second pixel size is smaller than that contained in the first pixel size;
the residual error network layer is used for processing the second channel number and the to-be-detected image feature map with the second pixel size to obtain a to-be-detected image feature map with the second channel number and the third pixel size, wherein the number of pixels contained in the third pixel size is smaller than that contained in the second pixel size;
the second convolutional layer is used for performing downsampling processing on the second channel number and the image feature map to be detected with the third pixel size to obtain a third channel number and a third pixel size image feature map to be detected, and the third channel number and the image feature map to be detected with the third pixel size are used as target feature maps corresponding to the image to be detected, wherein the third channel number is smaller than the second channel number and the third channel number is larger than the first channel number.
As an optional implementation manner of the present invention, the detection result obtaining module is further configured to perform dimension reduction processing on the word vector representation, and input the word vector representation after the dimension reduction processing into a preset image processing algorithm translation model for image processing algorithm recognition.
As an optional embodiment of the present invention, the number of the convolution kernels is greater than the number of image processing algorithms capable of processing the image to be detected.
An embodiment of the present invention further provides an electronic device, as shown in fig. 6, the electronic device may include a processor 601 and a memory 602, where the processor 601 and the memory 602 may be connected through a bus or in another manner, and fig. 6 takes the connection through the bus as an example.
Processor 601 may be a Central Processing Unit (CPU). The Processor 601 may also be other general purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof.
The memory 602, a non-transitory computer-readable storage medium, may be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to the image falsification chain detection method in the embodiment of the present invention. The processor 601 executes various functional applications and data processing of the processor by running non-transitory software programs, instructions and modules stored in the memory 602, that is, the image tamper chain detection method in the above method embodiment is implemented.
The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 601, and the like. Further, the memory 602 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 602 may optionally include memory located remotely from the processor 601, which may be connected to the processor 601 through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 602 and when executed by the processor 601 perform the image tamper chain detection method as in the embodiment shown in fig. 1.
The details of the electronic device may be understood with reference to the corresponding related description and effects in the embodiment shown in fig. 1, and are not described herein again.
Those skilled in the art will appreciate that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can include the processes of the embodiments of the methods described above when executed. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk Drive (Hard Disk Drive, abbreviated as HDD), or a Solid State Drive (SSD); the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (8)

1. An image tamper chain detection method, comprising:
inputting an image to be detected into a preset image feature extractor for feature extraction to obtain a target feature map corresponding to the image to be detected;
performing convolution operation on the target characteristic graph and convolution kernels of the target number, and flattening the convolution result to obtain word vector representation of the target dimension;
inputting the word vector representation into a preset image processing algorithm translation model for image processing algorithm recognition to obtain a tampering chain detection result of the image to be detected, wherein the preset image processing algorithm translation model is constructed on the basis of an attention mechanism model; the preset image feature extractor includes: a first convolution layer, a pooling layer, a residual network layer and a second convolution layer;
the first convolution layer is used for converting an input first channel number and an input image to be detected with a first pixel size into a second channel number and an input image feature map to be detected with the first pixel size, wherein the second channel number is larger than the first channel number;
the pooling layer is used for performing down-sampling processing on the second channel number and the to-be-detected image feature map with the first pixel size to obtain a second channel number and a to-be-detected image feature map with the second pixel size, wherein the number of pixels contained in the second pixel size is smaller than that contained in the first pixel size;
the residual error network layer is used for processing the second channel number and the to-be-detected image feature map with the second pixel size to obtain a to-be-detected image feature map with the second channel number and the third pixel size, wherein the number of pixels contained in the third pixel size is smaller than that contained in the second pixel size;
the second convolutional layer is used for performing downsampling processing on the second channel number and the image feature map to be detected with the third pixel size to obtain a third channel number and a third pixel size image feature map to be detected, and the third channel number and the image feature map to be detected with the third pixel size are used as target feature maps corresponding to the image to be detected, wherein the third channel number is smaller than the second channel number and the third channel number is larger than the first channel number.
2. The method of claim 1, wherein inputting the word vector representation into a pre-defined image processing algorithm translation model for image processing algorithm recognition comprises:
and performing dimension reduction on the word vector representation, and inputting the word vector representation subjected to dimension reduction into a preset image processing algorithm translation model for image processing algorithm identification.
3. Method according to claim 1 or 2, characterized in that the number of convolution kernels is greater than the number of image processing algorithms capable of processing the image to be detected.
4. An image tamper chain detection device, comprising:
the characteristic diagram acquisition module is used for inputting an image to be detected into a preset image characteristic extractor for characteristic extraction to obtain a target characteristic diagram corresponding to the image to be detected;
the word vector representation acquisition module is used for performing convolution operation on the target characteristic graph and the convolution kernels of the target quantity, and flattening the convolution result to obtain word vector representation of the target dimension;
the detection result acquisition module is used for inputting the word vector representation into a preset image processing algorithm translation model for image processing algorithm recognition to obtain a tampering chain detection result of the image to be detected, wherein the preset image processing algorithm translation model is constructed on the basis of an attention mechanism model; the preset image feature extractor includes: a first convolution layer, a pooling layer, a residual network layer and a second convolution layer;
the first convolution layer is used for converting an input first channel number and an input image to be detected with a first pixel size into a second channel number and an input image feature map to be detected with the first pixel size, wherein the second channel number is larger than the first channel number;
the pooling layer is used for performing down-sampling processing on the second channel number and the to-be-detected image feature map with the first pixel size to obtain a second channel number and a to-be-detected image feature map with a second pixel size, wherein the number of pixels contained in the second pixel size is smaller than that contained in the first pixel size;
the residual error network layer is used for processing the second channel number and the image characteristic diagram to be detected with the second pixel size to obtain a second channel number and an image characteristic diagram to be detected with a third pixel size, wherein the number of pixels contained in the third pixel size is smaller than the number of pixels contained in the second pixel size;
the second convolutional layer is used for performing downsampling processing on the second channel number and the image feature map to be detected with the third pixel size to obtain a third channel number and a third pixel size image feature map to be detected, and the third channel number and the image feature map to be detected with the third pixel size are used as target feature maps corresponding to the image to be detected, wherein the third channel number is smaller than the second channel number and the third channel number is larger than the first channel number.
5. The apparatus according to claim 4, wherein the detection result obtaining module is further configured to perform dimension reduction processing on the word vector representation, and input the word vector representation after dimension reduction processing into a preset image processing algorithm translation model for image processing algorithm recognition.
6. The apparatus according to claim 4 or 5, characterized in that the number of convolution kernels is larger than the number of image processing algorithms capable of processing the image to be detected.
7. An electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the steps of the image tamper chain detection method according to any one of claims 1-3.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the image tamper chain detection method according to any one of claims 1 to 3.
CN202110463677.9A 2021-04-27 2021-04-27 Image tampering chain detection method and device and electronic equipment Active CN113012152B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110463677.9A CN113012152B (en) 2021-04-27 2021-04-27 Image tampering chain detection method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110463677.9A CN113012152B (en) 2021-04-27 2021-04-27 Image tampering chain detection method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN113012152A CN113012152A (en) 2021-06-22
CN113012152B true CN113012152B (en) 2023-04-14

Family

ID=76380460

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110463677.9A Active CN113012152B (en) 2021-04-27 2021-04-27 Image tampering chain detection method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113012152B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117952869A (en) * 2024-03-27 2024-04-30 西南石油大学 Drilling fluid rock debris counting method based on weak light image enhancement

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111539942A (en) * 2020-04-28 2020-08-14 中国科学院自动化研究所 Method for detecting face depth tampered image based on multi-scale depth feature fusion

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106846303A (en) * 2016-12-30 2017-06-13 平安科技(深圳)有限公司 Distorted image detection method and device
CN111080628B (en) * 2019-12-20 2023-06-20 湖南大学 Image tampering detection method, apparatus, computer device and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111539942A (en) * 2020-04-28 2020-08-14 中国科学院自动化研究所 Method for detecting face depth tampered image based on multi-scale depth feature fusion

Also Published As

Publication number Publication date
CN113012152A (en) 2021-06-22

Similar Documents

Publication Publication Date Title
JP7415251B2 (en) Apparatus and method for image processing and system for training neural networks
Manap et al. Non-distortion-specific no-reference image quality assessment: A survey
CN107133622B (en) Word segmentation method and device
CN110084238B (en) Finger vein image segmentation method and device based on LadderNet network and storage medium
CN111914654B (en) Text layout analysis method, device, equipment and medium
CN109977762B (en) Text positioning method and device and text recognition method and device
CN115359370B (en) Remote sensing image cloud detection method and device, computer device and storage medium
CN111488805A (en) Video behavior identification method based on saliency feature extraction
CN111126401A (en) License plate character recognition method based on context information
CN114387641A (en) False video detection method and system based on multi-scale convolutional network and ViT
CN113012152B (en) Image tampering chain detection method and device and electronic equipment
Majumder et al. A tale of a deep learning approach to image forgery detection
CN115775350A (en) Image enhancement method and device and computing equipment
Rana et al. MSRD-CNN: Multi-scale residual deep CNN for general-purpose image manipulation detection
CN110852292A (en) Sketch face recognition method based on cross-modal multi-task depth measurement learning
CN111753714B (en) Multidirectional natural scene text detection method based on character segmentation
CN111079585B (en) Pedestrian re-identification method combining image enhancement with pseudo-twin convolutional neural network
Li Saliency prediction based on multi-channel models of visual processing
CN113727050B (en) Video super-resolution processing method and device for mobile equipment and storage medium
CN111368602A (en) Face image blurring degree evaluation method and device, readable storage medium and equipment
CN116091763A (en) Apple leaf disease image semantic segmentation system, segmentation method, device and medium
Singh et al. Performance Analysis of ELA-CNN model for Image Forgery Detection
CN115147895A (en) Face counterfeit discrimination method and device and computer program product
Rani et al. Object Detection in Natural Scene Images Using Thresholding Techniques
Das et al. Image splicing detection using feature based machine learning methods and deep learning mechanisms

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant