CN113012152B - Image tampering chain detection method, device and electronic equipment - Google Patents
Image tampering chain detection method, device and electronic equipment Download PDFInfo
- 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
- pixel size
- channel number
- 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
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 59
- 238000012545 processing Methods 0.000 claims abstract description 108
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 101
- 238000013519 translation Methods 0.000 claims abstract description 57
- 239000013598 vector Substances 0.000 claims abstract description 45
- 238000000034 method Methods 0.000 claims abstract description 24
- 230000007246 mechanism Effects 0.000 claims abstract description 12
- 238000000605 extraction Methods 0.000 claims abstract description 9
- 230000015654 memory Effects 0.000 claims description 20
- 238000011176 pooling Methods 0.000 claims description 15
- 230000009467 reduction Effects 0.000 claims description 13
- 238000010586 diagram Methods 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 4
- 238000005070 sampling Methods 0.000 claims 2
- 230000008569 process Effects 0.000 description 11
- 238000013528 artificial neural network Methods 0.000 description 7
- 230000006835 compression Effects 0.000 description 6
- 238000007906 compression Methods 0.000 description 6
- 230000007423 decrease Effects 0.000 description 5
- 239000000284 extract Substances 0.000 description 5
- 238000012549 training Methods 0.000 description 4
- 238000007635 classification algorithm Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 208000037170 Delayed Emergence from Anesthesia Diseases 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000013145 classification model Methods 0.000 description 1
- 230000019771 cognition Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/213—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/44—Local 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; 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)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Software Systems (AREA)
- Computer Security & Cryptography (AREA)
- Computational Linguistics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Mathematical Physics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Computing Systems (AREA)
- Molecular Biology (AREA)
- Evolutionary Biology (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Multimedia (AREA)
- Quality & Reliability (AREA)
- Computer Hardware Design (AREA)
- Bioethics (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
Description
技术领域technical field
本发明涉及图像检测技术领域,具体涉及一种图像篡改链检测方法、装置及电子设备。The invention relates to the technical field of image detection, in particular to an image tampering chain detection method, device and electronic equipment.
背景技术Background technique
篡改链(Manipulation-Chain)是指图像的篡改历史,即图像从产生至今经过的有限种图像处理算法的有序组合,图像处理算法一般有:JEPG压缩、中值滤波、高斯模糊、超分辨等,若一图像先经过了JEPG压缩,再经过中值滤波处理,最后经过高斯模糊处理,其相应的篡改链则为;JEPG压缩-中值滤波-高斯模糊。分析图像的篡改链在图像溯源多媒体取证中扮演着重要角色,且现今各种各样的图像处理软件为数字图像的操作带来了极大便利,与此同时,也显著地降低了图像伪造的成本,并且通过肉眼难以察觉。Manipulation-Chain refers to the tampering history of an image, that is, the orderly combination of a limited number of image processing algorithms that the image has undergone since its generation. Image processing algorithms generally include: JPEG compression, median filtering, Gaussian blur, super-resolution, etc. , if an image is first compressed by JPEG, then processed by median filter, and finally processed by Gaussian blur, the corresponding tampering chain is: JEPG compression-median filter-Gaussian blur. Analyzing the tampering chain of images plays an important role in image traceability multimedia forensics, and today's various image processing software brings great convenience to the operation of digital images, and at the same time, it also significantly reduces the risk of image forgery. cost and are imperceptible to the naked eye.
现有图像处理算法的识别依赖于神经网络良好的分类性能,得益于神经网络强大的表征能力,检测仅有一种图像处理算法的篡改链已经基本成熟。但对于图像处理算法大于2的情况,目前基于分类的算法效果难以达到应用要求,主要存在以下难点:(1)隐蔽性:图像经过N种算法处理后,算法与算法之间相互影响,导致残留在篡改图像上的痕迹不明显;(2)有序性:由于篡改链是有限种算法的有序组合,在检测出有限种算法之后,算法之间的顺序难以确定。(3)复杂性:篡改留下痕迹错综复杂,分类网络难以实现,且随着有限种算法数目的增加,篡改链作为分类网络的类别,数目将呈指数型增加,例如对于仅含有2种算法的篡改链而言,其排列数目为分类问题很容易解决二分类问题,而对于含4种算法的篡改链而言,其排列数为而通过分类问题解决篡改链检测这一难题似乎更不乐观。故亟待提出一种新的图像篡改链检测方式以提高图像篡改链检测结果的准确性。The identification of existing image processing algorithms depends on the good classification performance of neural networks. Thanks to the strong representation capabilities of neural networks, the detection of tampering chains with only one image processing algorithm is basically mature. However, for the case where the image processing algorithm is greater than 2, the effect of the current classification-based algorithm is difficult to meet the application requirements. The traces on the tampered image are not obvious; (2) Order: Since the tampering chain is an ordered combination of finite algorithms, after the finite algorithms are detected, the order of the algorithms is difficult to determine. (3) Complexity: The tampering leaves intricate traces, and the classification network is difficult to implement. With the increase of the number of limited algorithms, the number of tampering chains will increase exponentially as a category of the classification network. For example, for a network with only 2 algorithms For the tampering chain, the number of permutations is The classification problem is easy to solve the binary classification problem, and for the tampering chain with 4 algorithms, the number of permutations is and Solving the difficult problem of tamper chain detection through classification problems seems even less optimistic. Therefore, it is urgent to propose a new image tampering chain detection method to improve the accuracy of image tampering chain detection results.
发明内容Contents of the invention
因此,本发明要解决的技术问题在于克服现有使用神经网络分类性能对多种算法的图像篡改链的识别准确性低缺陷,从而提供一种图像篡改链检测方法、装置及电子设备。Therefore, the technical problem to be solved by the present invention is to overcome the defect of low recognition accuracy of image tampering chains of various algorithms using neural network classification performance, thereby providing a method, device and electronic equipment for detecting image tampering chains.
根据第一方面,本发明实施例公开了一种图像篡改链检测方法,包括:将待检测图像输入到预设图像特征提取器进行特征提取,得到所述待检测图像对应的目标特征图;将所述目标特征图与目标数量的卷积核进行卷积操作,将卷积结果进行展平得到目标维度的词向量表示;将所述词向量表示输入到预设图像处理算法翻译模型进行图像处理算法识别,得到所述待检测图像的篡改链检测结果,其中所述预设图像处理算法翻译模型基于注意力机制模型构建得到。According to the first aspect, the embodiment of the present invention discloses an image tampering chain detection method, comprising: inputting the image to be detected to a preset image feature extractor for feature extraction, and obtaining a target feature map corresponding to the image to be detected; The target feature map is convolved with the target number of convolution kernels, and the convolution result is flattened to obtain the word vector representation of the target dimension; the word vector representation is input to the preset image processing algorithm translation model for image processing Algorithm identification to obtain the detection result of the tampering chain of the image to be detected, wherein the translation model of the preset image processing algorithm is constructed based on the attention mechanism model.
可选地,所述预设图像特征提取器,包括:第一卷积层、池化层、残差网络层和第二卷积层;所述第一卷积层,用于将输入的第一通道数、第一像素大小的待检测图像转换为第二通道数、第一像素大小的待检测图像特征图,其中所述第二通道数大于所述第一通道数;所述池化层,用于对所述第二通道数、第一像素大小的待检测图像特征图进行下采样处理,得到第二通道数、第二像素大小的待检测图像特征图,其中所述第二像素大小所包含的像素数小于所述第一像素大小所包含的像素数;所述残差网络层,用于对所述第二通道数、第二像素大小的待检测图像特征图进行处理,得到第二通道数、第三像素大小的待检测图像特征图,其中所述第三像素大小所包含的像素数小于所述第二像素大小所包含的像素数;所述第二卷积层,用于对所述第二通道数、第三像素大小的待检测图像特征图进行下采样处理,得到第三通道数、第三像素大小的待检测图像特征图,将所述第三通道数、第三像素大小的待检测图像特征图作为所述待检测图像对应的目标特征图,其中所述第三通道数小于所述第二通道数且所述第三通道数大于所述第一通道数。Optionally, the preset image feature extractor includes: a first convolutional layer, a pooling layer, a residual network layer, and a second convolutional layer; the first convolutional layer is used to input the first An image to be detected with a number of channels and a first pixel size is converted into a feature map of an image to be detected with a second number of channels and a first pixel size, wherein the second number of channels is greater than the first number of channels; the pooling layer , for downsampling the feature map of the image to be detected with the second number of channels and the first pixel size to obtain the feature map of the image to be detected with the second number of channels and the second pixel size, wherein the second pixel size The number of pixels included is less than the number of pixels included in the first pixel size; the residual network layer is used to process the feature map of the image to be detected with the second channel number and the second pixel size to obtain the first An image feature map to be detected with two channels and a third pixel size, wherein the number of pixels included in the third pixel size is smaller than the number of pixels included in the second pixel size; the second convolutional layer is used for The image feature map to be detected with the second channel number and the third pixel size is down-sampled to obtain the image feature map with the third channel number and the third pixel size, and the third channel number, the third pixel size A pixel-sized feature map of the image to be detected is used as a target feature map 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 greater than the first channel number.
可选地,将所述词向量表示输入到预设图像处理算法翻译模型进行图像处理算法识别,包括:对所述词向量表示进行降维处理,将降维处理后的词向量表示输入到预设图像处理算法翻译模型进行图像处理算法识别。Optionally, inputting the word vector representation into a preset image processing algorithm translation model for image processing algorithm recognition includes: performing dimensionality reduction processing on the word vector representation, and inputting the dimensionality reduction processed word vector representation into the preset The image processing algorithm translation model is set up to identify the image processing algorithm.
可选地,所述卷积核的数量大于能够对所述待检测图像进行处理的图像处理算法的数量。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 the second aspect, the embodiment of the present invention also discloses an image tampering chain detection device, including: a feature map acquisition module, which is used to input the image to be detected to a preset image feature extractor for feature extraction, and obtain the image to be detected The target feature map corresponding to the image; the word vector representation acquisition module, which is used to perform a convolution operation on the target feature map and the target number of convolution kernels, and flatten the convolution result to obtain the word vector representation of the target dimension; the detection result An acquisition module, configured to input the word vector representation into a preset image processing algorithm translation model for image processing algorithm recognition, and obtain the tampering chain detection result of the image to be detected, wherein the preset image processing algorithm translation model is based on attention The force mechanism model is constructed.
可选地,所述预设图像特征提取器,包括:第一卷积层、池化层、残差网络层和第二卷积层;所述第一卷积层,用于将输入的第一通道数、第一像素大小的待检测图像转换为第二通道数、第一像素大小的待检测图像特征图,其中所述第二通道数大于所述第一通道数;所述池化层,用于对所述第二通道数、第一像素大小的待检测图像特征图进行下采样处理,得到第二通道数、第二像素大小的待检测图像特征图,其中所述第二像素大小所包含的像素数小于所述第一像素大小所包含的像素数;所述残差网络层,用于对所述第二通道数、第二像素大小的待检测图像特征图进行处理,得到第二通道数、第三像素大小的待检测图像特征图,其中所述第三像素大小所包含的像素数小于所述第二像素大小所包含的像素数;所述第二卷积层,用于对所述第二通道数、第三像素大小的待检测图像特征图进行下采样处理,得到第三通道数、第三像素大小的待检测图像特征图,将所述第三通道数、第三像素大小的待检测图像特征图作为所述待检测图像对应的目标特征图,其中所述第三通道数小于所述第二通道数且所述第三通道数大于所述第一通道数。Optionally, the preset image feature extractor includes: a first convolutional layer, a pooling layer, a residual network layer, and a second convolutional layer; the first convolutional layer is used to input the first An image to be detected with a number of channels and a first pixel size is converted into a feature map of an image to be detected with a second number of channels and a first pixel size, wherein the second number of channels is greater than the first number of channels; the pooling layer , for downsampling the feature map of the image to be detected with the second number of channels and the first pixel size to obtain the feature map of the image to be detected with the second number of channels and the second pixel size, wherein the second pixel size The number of pixels included is less than the number of pixels included in the first pixel size; the residual network layer is used to process the feature map of the image to be detected with the second channel number and the second pixel size to obtain the first An image feature map to be detected with two channels and a third pixel size, wherein the number of pixels included in the third pixel size is smaller than the number of pixels included in the second pixel size; the second convolutional layer is used for The image feature map to be detected with the second channel number and the third pixel size is down-sampled to obtain the image feature map with the third channel number and the third pixel size, and the third channel number, the third pixel size A pixel-sized feature map of the image to be detected is used as a target feature map 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 greater than the first channel number.
可选地,所述检测结果获取模块,还用于对所述词向量表示进行降维处理,将降维处理后的词向量表示输入到预设图像处理算法翻译模型进行图像处理算法识别。Optionally, the detection result acquisition module is further configured to perform dimensionality reduction processing on the word vector representation, and input the dimensionality reduction processed word vector representation to 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 the third aspect, the embodiment of the present invention also discloses an electronic device, including: at least one processor; and a memory connected in communication with the at least one processor; wherein, the memory stores information that can be used by the at least one processor An instruction executed by a processor, the instruction is executed by the at least one processor, so that the at least one processor executes the image tampering chain detection method described in the first aspect or any optional implementation manner of the first aspect step.
根据第四方面,本发明实施方式还公开了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面或第一方面任一可选实施方式所述的图像篡改链检测方法的步骤。According to the fourth aspect, the embodiment of the present invention also discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the first aspect or any optional implementation of the first aspect can be realized. The steps of the image tampering chain detection method described in the manner.
本发明技术方案,具有如下优点:The technical solution of the present invention has the following advantages:
本发明提供的图像篡改链检测方法/装置,通过将待检测图像输入到预设图像特征提取器进行特征提取,得到待检测图像对应的目标特征图,将目标特征图与目标数量的卷积核进行卷积操作,将卷积结果进行展平得到目标维度的词向量表示,将词向量表示输入到基于注意力机制模型构建得到的预设图像处理算法翻译模型进行图像处理算法识别,得到待检测图像的篡改链检测结果;相比于使用神经网络的分类性能直接对图像篡改链进行分类检测,本发明提供的方法通过在待检测图像上进行特征提取,并对提取到的目标特征图进行卷积与展平操作,将展平后得到的词向量表示输入到预设图像处理算法翻译模型以使得该预设图像处理算法翻译模型对该待检测图像对应的图像处理算法直接进行翻译,随着翻译结果的输出使得该待检测图像所对应的可能的篡改链数量呈指数型下降,降低了多算法下的篡改链检测的复杂性,对于篡改链检测任务而言,翻译模型更符合人类的认知,抽丝剥茧,逐字翻译,在同一长度的图像篡改链检测的任务下,相较于分类模型,利用翻译模型对篡改链的检测结果准确度更高,同时该预设图像处理算法翻译模型基于注意力机制模型构建得到,使得基于该预设图像处理算法翻译模型翻译出的篡改链的有序性结果更准确。The image tampering chain detection method/device provided by the present invention, by inputting the image to be detected into the preset image feature extractor for feature extraction, obtains the target feature map corresponding to the image to be detected, and combines the target feature map with the number of target convolution kernels Perform a convolution operation, flatten the convolution result to obtain the word vector representation of the target dimension, input the word vector representation into the preset image processing algorithm translation model based on the attention mechanism model, and perform image processing algorithm recognition to obtain the target dimension The tampering chain detection result of the image; compared with using the classification performance of the neural network to directly classify and detect the image tampering chain, the method provided by the present invention extracts features on the image to be detected, and performs convolution on the extracted target feature map Product and flattening operations, the word vector representation obtained after flattening is input to the translation model of the preset image processing algorithm so that the translation model of the preset image processing algorithm can directly translate the image processing algorithm corresponding to the image to be detected. The output of the translation results makes the number of possible tampering chains corresponding to the image to be detected decrease exponentially, which reduces the complexity of tampering chain detection under multi-algorithms. For tampering chain detection tasks, the translation model is more in line with human recognition. Knowing, stripping away cocoons, translating word by word, under the task of detecting image tampering chains of the same length, compared with classification models, using translation models to detect tampering chains has higher accuracy. At the same time, the preset image processing algorithm translation model is based on The attention mechanism model is constructed, which makes the ordering result of the tampering chain translated based on the preset image processing algorithm translation model more accurate.
附图说明Description of drawings
为了更清楚地说明本发明具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the specific implementation of the present invention or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings that need to be used in the specific implementation or description of the prior art. Obviously, the accompanying drawings in the following description The drawings show some implementations of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative work.
图1为本发明实施例中图像篡改链检测方法的一个具体示例的流程图;Fig. 1 is the flow chart of a specific example of image tampering chain detection method in the embodiment of the present invention;
图2为本发明实施例中图像篡改链检测方法的一个具体网络架构示意图;Fig. 2 is a schematic diagram of a specific network architecture of an image tampering chain detection method in an embodiment of the present invention;
图3为本发明实施例中图像篡改链检测方法的一个具体图像特征提取器示意图;Fig. 3 is a schematic diagram of a specific image feature extractor of the image tampering chain detection method in the embodiment of the present invention;
图4为本发明实施例中图像篡改链检测方法的一个具体残差网络层示意图;4 is a schematic diagram of a specific residual network layer of the image tampering chain detection method in the embodiment of the present invention;
图5为本发明实施例中图像篡改链检测装置的一个具体示例的原理框图;FIG. 5 is a functional block diagram of a specific example of an image tampering chain detection device in an embodiment of the present invention;
图6为本发明实施例中电子设备的一个具体示例图。Fig. 6 is a diagram of a specific example of an electronic device in an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合附图对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Apparently, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to 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. The indicated orientation or positional relationship is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the referred device or element must have a specific orientation, or in a specific orientation. construction and operation, therefore, should not be construed as limiting the invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and should not be construed as indicating or implying relative importance.
在本发明的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,还可以是两个元件内部的连通,可以是无线连接,也可以是有线连接。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本发明中的具体含义。In the description of the present invention, it should be noted that unless otherwise specified and limited, the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it can be a fixed connection or a detachable connection. Connected, or integrally connected; it can be mechanically or electrically connected; it can be directly connected, or indirectly connected through an intermediary, or it can be the internal communication of two components, which can be wireless or wired connect. Those of ordinary skill in the art can understand the specific meanings of the above terms in the present invention in specific situations.
此外,下面所描述的本发明不同实施方式中所涉及的技术特征只要彼此之间未构成冲突就可以相互结合。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 there is no conflict with each other.
本发明实施例公开了一种图像篡改链检测方法,结合图1、图2所示,该方法包括如下步骤:The embodiment of the present invention discloses an image tampering chain detection method, as shown in Figure 1 and Figure 2, the method includes the following steps:
步骤101,将待检测图像输入到预设图像特征提取器进行特征提取,得到所述待检测图像对应的目标特征图。
示例性地,该待检测图像可以是未使用任何图像处理算法进行处理的图像,也可以是使用至少一个图像处理算法处理过的图像,其中图像处理算法可以包括但不限于JPEG压缩、中值滤波、高斯模糊、图像超分辨、添加噪声等。将得到的待检测图像输入到预设图像特征提取器进行特征提取,得到待检测图像对应的目标特征图,本申请实施例对该预设图像特征提取器的具体结构不作限定,本领域技术人员可以根据实际使用需要确定,如可根据想要获取到的目标特征图的大小来选择相应的图像特征提取器。本申请实施例中选择256×256×1的待检测图像,目标特征图的大小为32×32×32。Exemplarily, the image to be detected may be an image not processed by any image processing algorithm, or an image processed by at least one image processing algorithm, wherein the image processing algorithm may include but not limited to JPEG compression, median filter , Gaussian blur, image super-resolution, adding noise, etc. The obtained image to be detected is input to the preset image feature extractor for feature extraction, and the target feature map corresponding to the image to be detected is obtained. The embodiment of the present application does not limit the specific structure of the preset image feature extractor. Those skilled in the art It can be determined according to actual needs, for example, a corresponding image feature extractor can be selected according to the size of the target feature map to be obtained. In the embodiment of the present application, a 256×256×1 image to be detected is selected, and the size of the target feature map is 32×32×32.
步骤102,将所述目标特征图与目标数量的卷积核进行卷积操作,将卷积结果进行展平得到目标维度的词向量表示。
示例性地,提取到的目标特征图的每个通道隐藏了各种图像处理算法的痕迹,故将目标特征图与目标数量的卷积核进行卷积操作,并将卷积得到的结果进行展平处理得到C×H*W的词向量表示,其中展平处理后得到的词向量表示亦可称为“句向量”。Exemplarily, each channel of the extracted target feature map hides the traces of various image processing algorithms, so the target feature map is convolved with the target number of convolution kernels, and the result obtained by the convolution is unfolded The word vector representation of C×H*W is obtained by the flattening process, and the word vector representation obtained after the flattening process can also be called a “sentence vector”.
作为本发明一个可选实施方式,所述卷积核的数量大于能够对所述待检测图像进行处理的图像处理算法的数量。As an optional implementation manner 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,将所述词向量表示输入到预设图像处理算法翻译模型进行图像处理算法识别,得到所述待检测图像的篡改链检测结果,其中所述预设图像处理算法翻译模型基于注意力机制模型构建得到。
示例性地,将得到的包含篡改痕迹的词向量表示输入到预设图像处理算法翻译模型进行编码、译码处理,得到待检测图像的篡改链检测结果。本申请实施例对该预设图像处理算法翻译模型不作限定,本领域技术人员可以根据实际使用需求基于注意力机制模型构建得到该翻译模型,也可以选用Transformer网络。该预设图像处理算法翻译模型可以是根据要翻译的待检测图像可能对应的图像处理算法的类别进行预先训练得到,在进行模型训练过程中,可以使用先验信息(Decin),使得Transformer翻译模型能够实现并行训练,提高模型的训练效率。Exemplarily, the obtained word vector representation containing tampering traces is input to the translation model of the preset image processing algorithm for encoding and decoding processing, and the tampering chain detection result of the image to be detected is obtained. The embodiment of the present application does not limit the translation model of the preset image processing algorithm. Those skilled in the art can construct the translation model based on the attention mechanism model according to actual usage requirements, or choose a Transformer network. The preset image processing algorithm translation model can be obtained by pre-training according to the category of the image processing algorithm that may correspond to the image to be translated. During the model training process, prior information (Dec in ) can be used to make the Transformer translate The model can realize parallel training and improve the training efficiency of the model.
例如,要翻译的待检测图像可能对应的图像处理算法的类别有以下五种:JPEG压缩、中值滤波、高斯模糊、超分辨、添加高斯噪声,分别用JP、MF、GB、SR、GN表示,构建相应的字典如表1所示,若一图像依次经过了上述五种操作,则其篡改链为JP-MF-GB-SR-GN,由字典可得到对应的真实标签y=[0,1,2,3,4]。For example, there are five types of image processing algorithms that may correspond to the image to be translated: JPEG compression, median filter, Gaussian blur, super-resolution, and adding Gaussian noise, respectively represented by JP, MF, GB, SR, and GN , build the corresponding dictionary as shown in Table 1, if an image has undergone the above five operations in sequence, its tampering chain is JP-MF-GB-SR-GN, and the corresponding real label y=[0, 1,2,3,4].
表1处理算法字典Table 1 Processing Algorithm Dictionary
本申请实施例中采用的损失函数如下式所示:The loss function used in the embodiment of this application is shown in the following formula:
通过交叉熵损失函数优化训练的图像处理算法翻译模型,使得预测的篡改链逼近真实篡改链y。The image processing algorithm translation model trained by optimizing the cross-entropy loss function makes the predicted tampering chain Approximate the real tampering chain y.
相比于使用神经网络的分类性能对图像篡改链进行分类检测,本发明实施例提供的方法通过直接在待检测图像上进行特征提取,并对提取到的目标特征图进行卷积与展平操作,将展平后得到的词向量表示输入到预设图像处理算法翻译模型以使得该预设图像处理算法翻译模型对该待检测图像对应的图像处理算法直接进行翻译,随着翻译结果的输出使得该待检测图像所对应的可能的篡改链数量呈指数型下降,降低了多算法下的篡改链检测的复杂性,且该预设图像处理算法翻译模型基于注意力机制模型构建得到,使得基于该预设图像处理算法翻译模型翻译出的篡改链的有序性结果更准确。Compared with using the classification performance of the neural network to classify and detect image tampering chains, the method provided by the embodiment of the present invention extracts features directly on the image to be detected, and performs convolution and flattening operations on the extracted target feature map , the word vector representation obtained after flattening is input to the translation model of the preset image processing algorithm so that the translation model of the preset image processing algorithm directly translates the image processing algorithm corresponding to the image to be detected, and the output of the translation result makes The number of possible tampering chains corresponding to the image to be detected decreases exponentially, which reduces the complexity of tampering chain detection under multi-algorithms, and the translation model of the preset image processing algorithm is constructed based on the attention mechanism model, so that based on the The sequence result of the tampering chain translated by the preset image processing algorithm translation model is more accurate.
针对篡改链存在的有序性、复杂性等问题,本发明实施例提供的基于机器翻译技术实现的图像篡改链检测方法,不再局限于神经网络的分类问题检测篡改图像的篡改链,而是结合了机器翻译的优势,逐“词”对篡改图像中包含的有限种算法进行有序的翻译得到其相应的篡改链,符合人们处理事务的认知,打破了原始分类算法的固有思维,能够高效地检测篡改图像相应的篡改链;随着机器翻译的进行,篡改链的数目也将由于前“词”的译出,呈指数型下降,解决了篡改链存储在的有序性、复杂性难题,如对于包含5种图像处理算法的篡改链而言,当第一个“词”被译出后,译码结果的可能情况从原先的120种降到了24种,翻译结果相当可观,进一步提高了图像篡改链检测效率。Aiming at the order and complexity of tampering chains, the image tampering chain detection method based on machine translation technology provided by the embodiment of the present invention is no longer limited to the classification problem of neural networks to detect tampering chains of tampered images, but Combining the advantages of machine translation, the limited algorithm contained in the tampered image is translated in an orderly manner one by one "word" to obtain its corresponding tampering chain, which conforms to people's cognition of handling affairs, breaks the inherent thinking of the original classification algorithm, and can Efficiently detect tampering chains corresponding to tampered images; with the progress of machine translation, the number of tampering chains will also decrease exponentially due to the translation of the previous "words", which solves the order and complexity of tampering chain storage Difficulties, for example, for a tampering chain containing five image processing algorithms, when the first "word" is decoded, the possible decoding results are reduced from the original 120 to 24, and the translation results are quite impressive. Improved image tampering chain detection efficiency.
作为本发明一个可选实施方式,所述预设图像特征提取器,包括:第一卷积层、池化层、残差网络层和第二卷积层;本申请实施例对该预设图像特征提取器包含的卷积层、池化层以及残差网络层的数量不作限定,本领域技术人员可以根据实际需要确定。本申请实施例采用的图像特征提取器结构如图3所示。As an optional implementation of the present invention, the preset image feature extractor includes: a first convolutional layer, a pooling layer, a residual network layer, and a second convolutional layer; The number of convolutional layers, pooling layers, and residual network layers included in the feature extractor is not limited, and can be determined by those skilled in the art according to actual needs. The structure of the image feature extractor used in the embodiment of the present application is shown in FIG. 3 .
所述第一卷积层,用于将输入的第一通道数、第一像素大小的待检测图像转换为第二通道数、第一像素大小的待检测图像特征图,其中所述第二通道数大于所述第一通道数;The first convolutional layer is used to convert the input image to be detected with the first number of channels and the first pixel size into a feature map of the image to be detected with the second number of channels and the first pixel size, wherein the second channel The number is greater than the first channel number;
所述池化层,用于对所述第二通道数、第一像素大小的待检测图像特征图进行下采样处理,得到第二通道数、第二像素大小的待检测图像特征图,其中所述第二像素大小所包含的像素数小于所述第一像素大小所包含的像素数;The pooling layer is used to perform downsampling processing on the feature map of the image to be detected with the second number of channels and the first pixel size to obtain the feature map of the image to be detected with the second number of channels and the second pixel size, wherein the The number of pixels included in the second pixel size is smaller than the number of pixels included in the first pixel size;
所述残差网络层,用于对所述第二通道数、第二像素大小的待检测图像特征图进行处理,得到第二通道数、第三像素大小的待检测图像特征图,其中所述第三像素大小所包含的像素数小于所述第二像素大小所包含的像素数;The residual network layer is used to process the feature map of the image to be detected with the second number of channels and the second pixel size to obtain the feature map of the image to be detected with the second number of channels and the third pixel size, wherein the the number of pixels contained in the third pixel size is less than the number of pixels contained in the second pixel size;
所述第二卷积层,用于对所述第二通道数、第三像素大小的待检测图像特征图进行下采样处理,得到第三通道数、第三像素大小的待检测图像特征图,将所述第三通道数、第三像素大小的待检测图像特征图作为所述待检测图像对应的目标特征图,其中所述第三通道数小于所述第二通道数且所述第三通道数大于所述第一通道数。The second convolutional layer is configured to perform downsampling processing on the feature map of the image to be detected with the second number of channels and the third pixel size to obtain the feature map of the image to be detected with the third number of channels and the third pixel size, Using the feature map of the image to be detected with the third channel number and the third pixel size as the target feature map corresponding to the image to be detected, wherein the third channel number is smaller than the second channel number and the third channel number greater than the first channel number.
示例性地,本申请实施例对上述各个网络层的图像特征图像素大小以及通道数量不作限定,本领域技术人员可以根据实际需要确定。具体地,如图3所示,图像特征提取器的输入为256×256×1的图像,其通道个数为1,通过图像特征提取器提取特征得到H×W×C为32×32×32的特征图。在图像特征提取器中第一卷积层(Conv)将输入的图像(256×256×1)从1个通道转换成64个通道(256×256×64),再经过最大池化层(MaxPool)下采样输出得到(128×128×64),再经过残差网络层输出得到(32×32×64),最后经过一层卷积层进行下采样输出特征图(32×32×32)。本申请实施例中该残差网络层(ResNet)由16个残差块与2个最大池化层构成,具体结构如图4所示。由残差网络组成的更深的卷积神经网络,可以更好地提取图像处理算法所留下的特征,构建更合适的句向量。Exemplarily, the embodiment of the present application does not limit the pixel size and the number of channels of the image feature map of each network layer above, which can be determined by those skilled in the art according to actual needs. Specifically, as shown in Figure 3, the input of the image feature extractor is a 256×256×1 image, and the number of channels is 1, and the H×W×C is 32×32×32 obtained by extracting features through the image feature extractor. feature map of . In the image feature extractor, the first convolutional layer (Conv) converts the input image (256×256×1) from 1 channel to 64 channels (256×256×64), and then passes through the maximum pooling layer (MaxPool ) downsampled output to obtain (128×128×64), then output through the residual network layer to obtain (32×32×64), and finally pass through a layer of convolutional layer for downsampling output 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 . A deeper convolutional neural network composed of a residual network can better extract the features left by the image processing algorithm and construct a more suitable sentence vector.
作为本发明一个可选实施方式,将所述词向量表示输入到预设图像处理算法翻译模型进行图像处理算法识别,包括:对所述词向量表示进行降维处理,将降维处理后的词向量表示输入到预设图像处理算法翻译模型进行图像处理算法识别。为了提高机器翻译效率,对输入到预设图像处理算法翻译模型的词向量表示进行降维处理,降低词向量表示中的冗余特征向量,以保证翻译结果准确性的同时提高翻译效率。As an optional embodiment of the present invention, inputting the word vector representation into a preset image processing algorithm translation model for image processing algorithm recognition includes: performing dimensionality reduction processing on the word vector representation, and converting the dimensionality reduction processed word The vector representation is input to the preset image processing algorithm translation model for image processing algorithm identification. In order to improve the efficiency of machine translation, dimensionality reduction is performed on the word vector representation input to the translation model of the preset image processing algorithm to reduce redundant feature vectors in the word vector representation, so as to ensure the accuracy of translation results and improve translation efficiency.
作为本申请一个具体实施方式,将原始图像切分为若干256×256的子图像,之后将其按照一定的顺序进行篡改得到相应篡改链作为先验信息。假设篡改算法有高斯模糊、中值滤波、超分辨、JPEG压缩、高斯噪声(GB-MF-RS-JP-GN),其中高斯模糊与中值滤波采用3×3的模板进行滤波;超分辨采用的算法是先将图像缩的大小小为原来的四分之一,再通过双线性差值的算法放大四倍进行超分辨;JPEG压缩的压缩因子QF为70;添加的高斯噪声为0均值,方差的范围在5-10之间。经过上述实施例提供的图像篡改链检测算法的准确性翻译结果如下表2所示:As a specific implementation of the present application, the original image is divided into several 256×256 sub-images, and then they are tampered in a certain order to obtain the corresponding tampering chain as prior information. It is assumed that the tampering algorithm includes Gaussian blur, median filter, super-resolution, JPEG compression, and Gaussian noise (GB-MF-RS-JP-GN), where Gaussian blur and median filter use a 3×3 template for filtering; super-resolution uses The algorithm is to reduce the size of the image to a quarter of the original size first, and then enlarge it four times through the bilinear difference algorithm for super-resolution; the compression factor QF of JPEG compression is 70; the added Gaussian noise is 0 mean , with a variance in the range of 5-10. The accuracy translation results of the image tampering chain detection algorithm provided by the above embodiments are shown in Table 2 below:
表2图像篡改链预测的准确率Table 2 The accuracy of image tampering chain prediction
其中,A为排列数;Accuracy为篡改链完全一致的准确率;双语评估替换分数(BLEU),完美匹配的得分为1.0,而完全不匹配则得分为0.0。Among them, A is the number of permutations; Accuracy is the accuracy rate of tampering chains that are completely consistent; Bilingual Evaluation Replacement Score (BLEU), the score of a perfect match is 1.0, and the score of a complete mismatch is 0.0.
由表2可见,由于篡改痕迹的隐秘性,随着算法总数的增加,先前算法所留下的篡改痕迹被后来的算法所覆盖,导致准确率降低,但由BLEU指标可见,其性能指标依旧可观。下表3为基于先前最优分类算法MISLnet对篡改链的检测结果的混淆矩阵、下表4为基于本申请技术方案对篡改链的检测结果的混淆矩阵:It can be seen from Table 2 that due to the concealment of tampering traces, with the increase of the total number of algorithms, the tampering traces left by the previous algorithm are covered by the later algorithm, resulting in a decrease in accuracy, but as can be seen from the BLEU index, its performance index is still considerable . The following table 3 is the confusion matrix of the detection results of the tampering chain based on the previous optimal classification algorithm MISLnet, and the following table 4 is the confusion matrix of the detection results of the tampering chain based on the technical solution of this application:
表3为基于先前最优分类算法MISLnet对篡改链的检测结果Table 3 shows the detection results of the tampering chain based on the previous optimal classification algorithm MISLnet
表4为基于本申请技术方案对篡改链的检测结果Table 4 is the detection result of tampering chain based on the technical solution of this application
结合上述表3和表4中记载的数据,可以看出通过本申请实施例记载的方案对篡改链检测结果的准确性更高;且结合表2-表4可以看出对于短链而言,本申请实施例记载的方案的性能明显优于MISLnet网络的同时对更长链的检测结果同样非常可观。Combining the data recorded in the above Table 3 and Table 4, it can be seen that the scheme recorded in the embodiment of the present application has a higher accuracy of the tampering chain detection results; and in combination with Table 2-Table 4, it can be seen that for short chains, The performance of the solution described in the embodiment of the present application is obviously better than that of the MISLnet network, and the detection results for longer chains are also very impressive.
本申请实施例提供的方法可以使用深度学习框架Pytorch实现,也可以使用TensorFlow、Caffe等深度学习框架实现。给定一待检测图像,通过本申请实施例提供的方法能在检测其经历过的所有图像处理算法及其顺序,打破了篡改链检测的固有思维,提出用机器翻译的技术对篡改链进行逐“词”翻译,对图像伪造检测、图像溯源分析和多媒体安全等领域的研究有重要意义。The method provided in the embodiment of the present application can be implemented using the deep learning framework Pytorch, or can be implemented using deep learning frameworks such as TensorFlow and Caffe. Given an image to be detected, the method provided by the embodiment of this application can detect all the image processing algorithms and their sequences that it has experienced, breaking the inherent thinking of tampering chain detection, and proposing to use machine translation technology to process the tampering chain one by one. "Word" translation is of great significance to the research of image forgery detection, image traceability analysis, and multimedia security.
本发明实施例还公开了一种图像篡改链检测装置,如图5所示,该装置包括:The embodiment of the present invention also discloses an image tampering chain detection device, as shown in Figure 5, the device includes:
特征图获取模块501,用于将待检测图像输入到预设图像特征提取器进行特征提取,得到所述待检测图像对应的目标特征图;A feature map acquisition module 501, configured to input the image to be detected to a preset image feature extractor for feature extraction, to obtain a target feature map corresponding to the image to be detected;
词向量表示获取模块502,用于将所述目标特征图与目标数量的卷积核进行卷积操作,将卷积结果进行展平得到目标维度的词向量表示;A word vector representation acquisition module 502, configured to perform a convolution operation on the target feature map and a target number of convolution kernels, and flatten the convolution result to obtain a word vector representation of the target dimension;
检测结果获取模块503,用于将所述词向量表示输入到预设图像处理算法翻译模型进行图像处理算法识别,得到所述待检测图像的篡改链检测结果,其中所述预设图像处理算法翻译模型基于注意力机制模型构建得到。The detection result acquisition module 503 is used to input the word vector representation into the translation model of the preset image processing algorithm to identify the image processing algorithm, and obtain the tampering chain detection result of the image to be detected, wherein the preset image processing algorithm translates The model is constructed based on the attention mechanism model.
本发明提供的图像篡改链检测装置,相比于使用神经网络的分类性能对图像篡改链进行分类检测,本发明实施例提供的装置通过直接在待检测图像上进行特征提取,并对提取到的目标特征图进行卷积与展平操作,将展平后得到的词向量表示输入到预设图像处理算法翻译模型以使得该预设图像处理算法翻译模型对该待检测图像对应的图像处理算法直接进行翻译,随着翻译结果的输出使得该待检测图像所对应的可能的篡改链数量呈指数型下降,降低了多算法下的篡改链检测的复杂性,且该预设图像处理算法翻译模型基于注意力机制模型构建得到,使得基于该预设图像处理算法翻译模型翻译出的篡改链的有序性结果更准确。The image tampering chain detection device provided by the present invention, compared to using the classification performance of the neural network to classify and detect the image tampering chain, the device provided by the embodiment of the present invention directly extracts features on the image to be detected, and extracts the extracted The target feature map is convolved and flattened, and the word vector representation obtained after the flattening is input to the preset image processing algorithm translation model so that the preset image processing algorithm translation model directly corresponds to the image processing algorithm corresponding to the image to be detected. Translate, with the output of the translation results, the number of possible tampering chains corresponding to the image to be detected decreases exponentially, reducing the complexity of tampering chain detection under multi-algorithms, and the preset image processing algorithm translation model is based on The attention mechanism model is constructed, which makes the ordering result of the tampering chain translated by the translation model based on the preset image processing algorithm more accurate.
作为本发明一个可选实施方式,所述预设图像特征提取器,包括:第一卷积层、池化层、残差网络层和第二卷积层;As an optional implementation of the present invention, the preset image feature extractor includes: a first convolutional layer, a pooling layer, a residual network layer, and a second convolutional layer;
所述第一卷积层,用于将输入的第一通道数、第一像素大小的待检测图像转换为第二通道数、第一像素大小的待检测图像特征图,其中所述第二通道数大于所述第一通道数;The first convolutional layer is used to convert the input image to be detected with the first number of channels and the first pixel size into a feature map of the image to be detected with the second number of channels and the first pixel size, wherein the second channel The number is greater than the first channel number;
所述池化层,用于对所述第二通道数、第一像素大小的待检测图像特征图进行下采样处理,得到第二通道数、第二像素大小的待检测图像特征图,其中所述第二像素大小所包含的像素数小于所述第一像素大小所包含的像素数;The pooling layer is used to perform downsampling processing on the feature map of the image to be detected with the second number of channels and the first pixel size to obtain the feature map of the image to be detected with the second number of channels and the second pixel size, wherein the The number of pixels included in the second pixel size is smaller than the number of pixels included in the first pixel size;
所述残差网络层,用于对所述第二通道数、第二像素大小的待检测图像特征图进行处理,得到第二通道数、第三像素大小的待检测图像特征图,其中所述第三像素大小所包含的像素数小于所述第二像素大小所包含的像素数;The residual network layer is used to process the feature map of the image to be detected with the second number of channels and the second pixel size to obtain the feature map of the image to be detected with the second number of channels and the third pixel size, wherein the the number of pixels contained in the third pixel size is less than the number of pixels contained in the second pixel size;
所述第二卷积层,用于对所述第二通道数、第三像素大小的待检测图像特征图进行下采样处理,得到第三通道数、第三像素大小的待检测图像特征图,将所述第三通道数、第三像素大小的待检测图像特征图作为所述待检测图像对应的目标特征图,其中所述第三通道数小于所述第二通道数且所述第三通道数大于所述第一通道数。The second convolutional layer is configured to perform downsampling processing on the feature map of the image to be detected with the second number of channels and the third pixel size to obtain the feature map of the image to be detected with the third number of channels and the third pixel size, Using the feature map of the image to be detected with the third channel number and the third pixel size as the target feature map corresponding to the image to be detected, wherein the third channel number is smaller than the second channel number and the third channel number greater than the first channel number.
作为本发明一个可选实施方式,所述检测结果获取模块,还用于对所述词向量表示进行降维处理,将降维处理后的词向量表示输入到预设图像处理算法翻译模型进行图像处理算法识别。As an optional embodiment of the present invention, the detection result acquisition module is also used to perform dimensionality reduction processing on the word vector representation, and input the dimensionality reduction processed word vector representation into a preset image processing algorithm translation model for image processing. Process Algorithm Identification.
作为本发明一个可选实施方式,所述卷积核的数量大于能够对所述待检测图像进行处理的图像处理算法的数量。As an optional implementation manner 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.
本发明实施例还提供了一种电子设备,如图6所示,该电子设备可以包括处理器601和存储器602,其中处理器601和存储器602可以通过总线或者其他方式连接,图6中以通过总线连接为例。The embodiment of the present invention also provides an electronic device. As shown in FIG. 6, the electronic device may include a
处理器601可以为中央处理器(Central Processing Unit,CPU)。处理器601还可以为其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等芯片,或者上述各类芯片的组合。The
存储器602作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序、非暂态计算机可执行程序以及模块,如本发明实施例中的图像篡改链检测方法对应的程序指令/模块。处理器601通过运行存储在存储器602中的非暂态软件程序、指令以及模块,从而执行处理器的各种功能应用以及数据处理,即实现上述方法实施例中的图像篡改链检测方法。The
存储器602可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储处理器601所创建的数据等。此外,存储器602可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施例中,存储器602可选包括相对于处理器601远程设置的存储器,这些远程存储器可以通过网络连接至处理器601。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The
所述一个或者多个模块存储在所述存储器602中,当被所述处理器601执行时,执行如图1所示实施例中的图像篡改链检测方法。The one or more modules are stored in the
上述电子设备具体细节可以对应参阅图1所示的实施例中对应的相关描述和效果进行理解,此处不再赘述。Specific details of the above-mentioned electronic device can be understood by referring to corresponding descriptions and effects in the embodiment shown in FIG. 1 , and details are not repeated here.
本领域技术人员可以理解,实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)、随机存储记忆体(RandomAccessMemory,RAM)、快闪存储器(Flash Memory)、硬盘(Hard Disk Drive,缩写:HDD)或固态硬盘(Solid-State Drive,SSD)等;所述存储介质还可以包括上述种类的存储器的组合。Those skilled in the art can understand that all or part of the processes in the methods of the above-mentioned embodiments can be completed by instructing related hardware through computer programs, and the programs can be stored in a computer-readable storage medium. During execution, it may include the processes of the embodiments of the above-mentioned methods. Wherein, the storage medium can be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a flash memory (Flash Memory), a hard disk (Hard Disk Drive) , abbreviation: HDD) or solid-state hard disk (Solid-State Drive, SSD) etc.; The storage medium may also include a combination of the above-mentioned types of memory.
虽然结合附图描述了本发明的实施例,但是本领域技术人员可以在不脱离本发明的精神和范围的情况下作出各种修改和变型,这样的修改和变型均落入由所附权利要求所限定的范围之内。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 present invention, and such modifications and variations all fall into the scope of the appended claims. within the limited range.
Claims (8)
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, 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, 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, device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113012152B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2628754B (en) * | 2023-03-27 | 2025-07-02 | Imagination Tech Ltd | A method and data processing system for resampling a set of samples |
CN117952869B (en) * | 2024-03-27 | 2024-06-18 | 西南石油大学 | Drilling fluid rock debris counting method based on weak light image enhancement |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111539942A (en) * | 2020-04-28 | 2020-08-14 | 中国科学院自动化研究所 | Detection method of face depth forgery based on multi-scale depth feature fusion |
Family Cites Families (2)
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 |
-
2021
- 2021-04-27 CN CN202110463677.9A patent/CN113012152B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111539942A (en) * | 2020-04-28 | 2020-08-14 | 中国科学院自动化研究所 | Detection method of face depth forgery 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 |
---|---|---|
CN112016543B (en) | A text recognition network, a neural network training method and related equipment | |
CN109190752B (en) | Image Semantic Segmentation Based on Deep Learning Global and Local Features | |
CN112766220B (en) | Dual-channel micro-expression recognition method and system, storage medium and computer equipment | |
TW201732651A (en) | Word segmentation method and apparatus | |
CN116030074A (en) | A road disease identification method, re-identification method and related equipment | |
CN112613502A (en) | Character recognition method and device, storage medium and computer equipment | |
CN110084238B (en) | Finger vein image segmentation method and device based on LadderNet network and storage medium | |
CN113012152B (en) | Image tampering chain detection method, device and electronic equipment | |
CN114266794A (en) | Pathological section image cancer region segmentation system based on full convolution neural network | |
CN114581646B (en) | Text recognition method, device, electronic device and storage medium | |
CN114037699B (en) | Pathological image classification method, equipment, system and storage medium | |
CN111753714A (en) | A multi-directional natural scene text detection method based on character segmentation | |
CN113537119B (en) | Transmission line connecting part detection method based on improved Yolov4-tiny | |
CN116797792A (en) | Remote sensing image semantic segmentation method based on boundary information guided multi-information fusion | |
CN110910388A (en) | A Cancer Cell Image Segmentation Method Based on U-Net and Density Estimation | |
CN110991374B (en) | Fingerprint singular point detection method based on RCNN | |
CN118711038A (en) | Automatic quality inspection method and system for inverter assembly based on improved YOLOv8 detection algorithm | |
CN113727050B (en) | Video super-resolution processing method and device for mobile equipment and storage medium | |
CN116189162A (en) | A ship plate detection and recognition method, device, electronic equipment and storage medium | |
CN112699898B (en) | A method for image orientation recognition based on multi-layer feature fusion | |
CN109740682B (en) | An image recognition method based on domain transformation and generative model | |
CN113221991A (en) | Method for re-labeling data set by utilizing deep learning | |
CN118038045A (en) | Remote sensing image segmentation method based on improved Swin-Unet | |
CN111091550A (en) | Multi-size self-adaptive PCB solder paste area detection system and detection method | |
CN116884027A (en) | Electrical element symbol identification method of distribution network engineering drawing based on improved detection algorithm |
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 |