Image tampering detection methods, apparatus, equipment and computer-readable storage media

By filtering the target attribute information of the image to determine suspected tampered images, and using the improved dual-stream fast regional convolutional neural network for detection, the problem of large amount of image tampering detection in the prior art is solved, and efficient image tampering detection is achieved.

CN114519689BActive Publication Date: 2025-03-14CHINA MOBILE COMM LTD RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011292363.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-18
Publication Date
2025-03-14
Estimated Expiration
2040-11-18

AI Technical Summary

Technical Problem

The existing image tamper detection methods have a large amount of calculation, especially in the scenario where the number of pictures to be detected is large, resulting in excessive consumption of system resources.

Method used

By obtaining the target attribute information of the image to be detected for screening, the suspected tampered pictures are determined, and the suspected pictures are detected using the tampered detection model to output the detection results. The method includes extracting the Exif information and encoding information of the picture, determining the suspected tampered picture based on the software-related fields, and pre-processing the picture before detection to improve detection accuracy.

Benefits of technology

By pre-screening of pictures, the number of pictures detected subsequently is reduced, the calculation amount of the model detection algorithm is reduced, the system resources are saved, and the detection efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114519689B_ABST
    Figure CN114519689B_ABST
Patent Text Reader

Abstract

The present invention discloses an image tampering detection method, device, equipment and computer-readable storage medium, which relates to the technical field of image analysis detection technology, in order to solve the problem of large computational complexity of existing image tampering detection methods. The method comprises: obtaining N pictures to be detected, wherein N is a positive integer; based on the target attribute information of the N pictures to be detected, screening the N pictures to be detected to obtain suspected tampered pictures; using a tampering detection model to detect the suspected tampered pictures, and outputting a detection result, wherein the detection result is used to indicate whether the suspected tampered pictures have been tampered with and at least one of the tampered areas. The embodiment of the present invention pre-screens the pictures to be detected and determines the suspected tampered pictures therein, so that only the suspected tampered pictures need to be further detected later, thereby reducing the computational complexity of the model detection algorithm and saving system resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image analysis and detection technology, and in particular to an image tampering detection method, device, equipment and computer-readable storage medium. Background Art

[0002] Image tampering detection aims to detect malicious processing of digital images, such as deleting, adding, copying, and intercepting objects in the image. At present, there are two main methods for detecting tampered images: traditional methods and deep learning-based methods. Traditional methods mainly extract the feature differences between the tampered area and the real area to achieve the purpose of detecting and locating tampering, but these methods can often only detect a certain category of tampering, and the extracted features cannot fully and effectively represent the difference between the tampered area and the real area; deep learning methods use large sample training models to automatically extract object features, which can more comprehensively detect multiple tampering methods compared to traditional methods.

[0003] In some scenarios, due to the large number of images to be detected, for example, a large number of electricity meter reading images are generated every month in the existing network. If deep learning is used to detect each image, the amount of calculation will be very large. Summary of the invention

[0004] Embodiments of the present invention provide an image tampering detection method, apparatus, device and computer-readable storage medium to solve the problem of large amount of calculation in existing image tampering detection methods.

[0005] In a first aspect, an embodiment of the present invention provides an image tampering detection method, comprising:

[0006] Get N pictures to be detected, where N is a positive integer;

[0007] Based on the target attribute information of the N to-be-detected pictures, the N to-be-detected pictures are screened to obtain suspected tampered pictures;

[0008] The suspected tampered image is detected using a tampering detection model, and a detection result is output, wherein the detection result is used to indicate whether the suspected tampered image has been tampered with and at least one of a tampered area.

[0009] Optionally, the screening the N to-be-detected pictures based on the target attribute information of the N to-be-detected pictures to obtain the suspected tampered pictures includes:

[0010] Extracting target attribute information of each picture to be detected from the N pictures to be detected respectively;

[0011] The suspected tampered images are determined based on the software related fields in the target attribute information of each image to be detected.

[0012] Optionally, the target attribute information includes exchangeable image file format Exif information and encoding information;

[0013] The step of determining the suspected tampered image based on the software related fields in the target attribute information of each image to be detected includes:

[0014] The image to be detected that contains a first preset field in the encoding information and does not contain a second preset field in the Exif information is determined as a suspected tampered image, wherein the first preset field is a field representing the image editing software, and the second preset field is a field representing the image viewing software.

[0015] Optionally, before the tampering detection model is used to detect the suspected tampered image and the detection result is output, the method further includes:

[0016] Extracting a target area image from the suspected tampered image;

[0017] The detecting the suspected tampered image using the tampering detection model and outputting the detection result includes:

[0018] The target area image is detected using a tampering detection model, and a detection result is output.

[0019] Optionally, the tampering detection model is an improved two-stream fast regional convolutional neural network Faster R-CNN, and the anchor size of the regional generation network RPN layer in the improved two-stream Faster R-CNN is determined by clustering the annotation boxes in the training picture set and then calculating the box size and aspect ratio of each cluster center, wherein the annotation box is a annotation box for the tampered area, and the training picture set and the picture to be detected are pictures of the same type.

[0020] Optionally, the ratio of positive and negative samples of the RPN layer during training is greater than 1;

[0021] Among them, the selection rules of positive and negative samples include: sorting the intersection over union (IOU) values ​​of the candidate anchor boxes and the corresponding annotation boxes in the training picture set from large to small, and taking the candidate anchor boxes whose IOU values ​​are sorted in the first interval as positive samples, and taking the candidate anchor boxes whose IOU values ​​are sorted in the second interval as negative samples, the range of the first interval is larger than the range of the second interval, and the first interval is a front-ranked interval, and the second interval is a back-ranked interval, and the candidate anchor boxes are the k anchor boxes in the anchor boxes of the training picture set that are closest to the corresponding annotation boxes, and k is an integer greater than 1.

[0022] Optionally, the positive and negative sample selection rule further includes: discarding candidate anchor boxes whose IOU values ​​are ranked in a third interval, and the third interval is an interval ranked between the first interval and the second interval.

[0023] In a second aspect, an embodiment of the present invention further provides an image tampering detection device, comprising:

[0024] An acquisition module is used to acquire N images to be detected, where N is a positive integer;

[0025] A screening module, configured to screen the N to-be-detected pictures based on target attribute information of the N to-be-detected pictures to obtain suspected tampered pictures;

[0026] The detection module is used to detect the suspected tampered image using a tampering detection model and output a detection result, wherein the detection result is used to indicate whether the suspected tampered image has been tampered with and at least one of the tampered areas.

[0027] Optionally, the screening module includes:

[0028] An extraction unit, used to extract target attribute information of each of the N pictures to be detected;

[0029] The determination unit is used to determine the suspected tampered image based on the software related fields in the target attribute information of each image to be detected.

[0030] Optionally, the target attribute information includes exchangeable image file format Exif information and encoding information;

[0031] The determination unit is used to determine the image to be detected as a suspected tampered image, whose encoding information contains a first preset field and whose Exif information does not contain a second preset field, wherein the first preset field is a field representing image editing software, and the second preset field is a field representing image viewing software.

[0032] Optionally, the image tampering detection device further includes:

[0033] An extraction module, used to extract a target area image from the suspected tampered image;

[0034] The detection module is used to detect the target area image using a tampering detection model and output a detection result.

[0035] Optionally, the tampering detection model is an improved two-stream fast regional convolutional neural network Faster R-CNN, and the anchor size of the regional generation network RPN layer in the improved two-stream Faster R-CNN is determined by clustering the annotation boxes in the training picture set and then calculating the box size and aspect ratio of each cluster center, wherein the annotation box is a annotation box for the tampered area, and the training picture set and the picture to be detected are pictures of the same type.

[0036] Optionally, the ratio of positive and negative samples of the RPN layer during training is greater than 1;

[0037] Among them, the selection rules of positive and negative samples include: sorting the intersection over union (IOU) values ​​of the candidate anchor boxes and the corresponding annotation boxes in the training picture set from large to small, and taking the candidate anchor boxes whose IOU values ​​are sorted in the first interval as positive samples, and taking the candidate anchor boxes whose IOU values ​​are sorted in the second interval as negative samples, the range of the first interval is larger than the range of the second interval, and the first interval is a front-ranked interval, and the second interval is a back-ranked interval, and the candidate anchor boxes are the k anchor boxes in the anchor boxes of the training picture set that are closest to the corresponding annotation boxes, and k is an integer greater than 1.

[0038] Optionally, the positive and negative sample selection rule further includes: discarding candidate anchor boxes whose IOU values ​​are ranked in a third interval, and the third interval is an interval ranked between the first interval and the second interval.

[0039] In a third aspect, an embodiment of the present invention further provides an image tampering detection device, comprising: a transceiver, a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor is used to read the program in the memory to implement the steps in the image tampering detection method as described above.

[0040] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the image tampering detection method as described above are implemented.

[0041] In an embodiment of the present invention, N images to be detected are obtained, where N is a positive integer; based on the target attribute information of the N images to be detected, the N images to be detected are screened to obtain suspected tampered images; the suspected tampered images are detected using a tampering detection model, and a detection result is output, wherein the detection result is used to indicate whether the suspected tampered image has been tampered with and at least one of the tampered areas. In this way, by pre-screening the images to be detected and determining the suspected tampered images therein, it is only necessary to further detect the suspected tampered images in the subsequent step, thereby reducing the amount of calculation of the model detection algorithm and saving system resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0043] Figure 1 is a flow chart of an image tampering detection method provided by an embodiment of the present invention;

[0044] Figure 2 is a schematic diagram of a network framework of an improved dual-stream Faster R-CNN provided by an embodiment of the present invention;

[0045] Figure 3 is a schematic diagram of an image tampering detection process provided by an embodiment of the present invention;

[0046] Figure 4 is a structural diagram of an image tampering detection device provided by an embodiment of the present invention;

[0047] Figure 5 It is a structural diagram of an image tampering detection device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] See also Figure 1 , Figure 1 is a flow chart of an image tampering detection method provided by an embodiment of the present invention. Figure 1 As shown, the following steps are included:

[0050] Step 101: Obtain N pictures to be detected, where N is a positive integer.

[0051] The N images to be detected can be a set of images that need to be tampered with in any scenario. For example, for a large number of meter reading images generated every month in the existing network, it is necessary to detect whether the meter readings in the images have been tampered with. Therefore, the above-mentioned acquisition of N images to be detected can be to acquire all images that need to be tampered with in a certain application scenario, and N can be any positive integer determined according to actual needs.

[0052] Step 102: Based on the target attribute information of the N pictures to be detected, the N pictures to be detected are screened to obtain suspected tampered pictures.

[0053] The target attribute information may be attribute information indicating a software-related field in the image attribute information, so that the software information storing the image can be obtained through the target attribute information of the image, and then the software information can be used to help determine whether the image has been edited. If it has been edited, it indicates that the image may have been tampered with. Because the image editing software used by the user to tamper with the image is usually recorded in the target attribute information of the image, it can be used to preliminarily determine whether the image is suspected of being tampered with.

[0054] For example, the Exchangeable image file format (Exif) information or encoding information of a picture usually includes a software-related field to indicate the software used for the picture, so the target attribute information may be Exif information and / or encoding information.

[0055] In this step, the N pictures to be detected can be screened based on the target attribute information of the N pictures to be detected. Specifically, the target attribute information of each picture to be detected can be analyzed to determine whether each picture to be detected has been edited by some picture editing software, and then the edited pictures can be screened out as suspected tampered pictures, so as to perform further image tampering detection on the suspected tampered pictures, while for other non-suspected tampered pictures, there is no need to perform subsequent image tampering detection.

[0056] In this way, by pre-screening the N pictures to be detected, the huge amount of calculation caused by using the tampering detection model to detect each picture to be detected can be avoided, especially for application scenarios with a large number of pictures to be detected, more obvious results can be achieved.

[0057] Optionally, step 102 includes:

[0058] Extracting target attribute information of each picture to be detected from the N pictures to be detected respectively;

[0059] The suspected tampered images are determined based on the software related fields in the target attribute information of each image to be detected.

[0060] That is, for any one of the N pictures to be detected, its target attribute information can be extracted first, and the software-related fields in its target attribute information can be obtained. Then, based on the software-related fields, it can be determined whether the picture to be detected is suspected of being tampered with. If so, the picture to be detected can be determined as a suspected tampered picture, so as to perform further image tampering detection on the suspected tampered picture. Otherwise, it can be determined that the picture to be detected has not been tampered with, and there is no need to perform subsequent image tampering detection on it.

[0061] In this way, the method of determining suspected tampered images based on the software-related fields in the target attribute information of the image to be detected is easy to implement and has high accuracy.

[0062] Furthermore, the target attribute information includes exchangeable image file format Exif information and encoding information;

[0063] The step of determining the suspected tampered image based on the software related fields in the target attribute information of each image to be detected includes:

[0064] The image to be detected that contains a first preset field in the encoding information and does not contain a second preset field in the Exif information is determined as a suspected tampered image, wherein the first preset field is a field representing the image editing software, and the second preset field is a field representing the image viewing software.

[0065] That is, in one implementation, for each image to be detected, its Exif information and encoding information can be extracted, and the software-related fields in these two types of information can be combined to more accurately determine whether the image to be detected is a suspected tampered image.

[0066] Among them, Exif information usually includes fields such as picture format, size, lens parameters, shooting time, shooting coordinates, and Software, and encoding information usually also includes fields such as picture format, size, and software. The encoding information of the picture and the Software field in the Exif information of the picture are key fields for determining whether the picture has been tampered with. And in the case where the picture has been edited using certain specific software, the software field in the encoding information of the picture and the Software field in the Exif information will indicate the same software name, such as "meitu". In this case, only one of them can be detected; and in the case where the picture is viewed using other specific software, the software keyword indicated by the software field in the encoding information of the picture, such as "adobe", may be the same as the software keyword in the encoding information of the picture edited by certain specific software. At this time, it is necessary to use the Software field in the Exif information of the picture for further distinction. For example, the value of the Software field in the Exif information is "viewer", which means that the picture uses a picture viewer, not a picture editing software.

[0067] In view of the above analysis, the screening rule for suspected tampered images may be to determine the image to be detected that contains the first preset field in the encoding information but does not contain the second preset field in the Exif information as a suspected tampered image, wherein the first preset field is a field representing the image editing software, and specifically the field value stored in the image encoding information of the commonly used image editing software may be determined, for example, it may be fields such as "meitu" and "adobe", and the second preset field is a field representing the image viewing software, and specifically the field value stored in the image Exif information of the commonly used image viewing software may be determined, for example, it may be fields such as "viewer".

[0068] In addition, considering that Exif information is easier to modify, while fields in the coding information are difficult to delete, during screening, the software field in the coding information of the image to be detected can be detected first to see if it contains the first preset field. If so, the Software field in the Exif information of the image to be detected is further detected to see if it does not contain the second preset field. If so, the image to be detected is determined to be a suspected tampered image. That is, in the screening stage, the detection priority of the image coding information can be higher than the Software field in the image Exif information, so that the amount of calculation in the screening can be further reduced and the processing efficiency can be improved.

[0069] It should be noted that in order to improve the screening efficiency, a corresponding preliminary screening module can be designed according to the above screening process to complete the preliminary screening of the images to be detected. In this way, when performing image tampering detection, the N images to be detected that need to be detected can be first input into the preliminary screening module, and the N images to be detected can be filtered and screened by the preliminary screening module, and the suspected tampered images therein are output. It should also be noted that the suspected tampered images can collectively refer to all the suspected tampered images in the N images to be detected, that is, the embodiment of the present invention does not limit the number of suspected tampered images.

[0070] Step 103: Use a tampering detection model to detect the suspected tampered image and output a detection result, wherein the detection result is used to indicate whether the suspected tampered image has been tampered with and at least one of the tampered areas.

[0071] The tampering detection model may be a pre-trained model for image tampering detection, that is, the tampering detection model may be a model obtained by pre-training a certain deep learning network using a large number of training samples (including tampered samples and untampered samples). For example, the tampering detection model may be a model obtained by training a convolutional neural network (CNN), a regional convolutional neural network (R-CNN) or a fast regional convolutional neural network (Faster R-CNN). And the tampering detection model may be a model used only to detect whether the image has been tampered with, that is, it can output the classification label of the image (such as "tampered" or "untampered"), or it may be a model used only to detect the tampered area in the image, that is, it can output the annotation box in the image for indicating the specific tampered area. The tampering detection model may also be a model that can detect whether the image has been tampered with and further indicate the tampered area in the image, that is, it can output the annotation box in the image for indicating the specific tampered area and the classification label for indicating the object in the annotation box.

[0072] Therefore, in this step, after determining the suspected tampered picture, the suspected tampered picture can be input into the tampering detection model, and the suspected tampered picture can be detected by the tampering detection model, and then the detection result indicating whether the suspected tampered picture has been tampered with and / or the tampered area is output, that is, the detection result can include at least one of the annotation box and classification label of the tampered area.

[0073] In this way, by using the tampering detection model to detect the suspected tampered image, the corresponding detection result can be quickly output, and the detection result output by model detection usually has a high degree of credibility.

[0074] Optionally, before step 103, the method further includes:

[0075] Extracting a target area image from the suspected tampered image;

[0076] The step 103 comprises:

[0077] The target area image is detected using a tampering detection model, and a detection result is output.

[0078] In one implementation, in order to improve the detection accuracy of small targets (i.e., relatively small tampered areas), the suspected tampered image can be preprocessed before using the model for detection. Specifically, the target area image of the suspected tampered image can be extracted, and the extracted target area image can be used as the model detection object. That is, the extracted target area image can be input into the tampering detection model for tampering detection, so as to increase the proportion of the tampered area in the entire image and relatively reduce the number of negative samples, thereby achieving the purpose of improving the detection accuracy of small targets.

[0079] The target area image may be a specific object image in the suspected tampered image. In practical applications, the target area image to be detected may be determined according to detection requirements.

[0080] For example, for an electric meter reading image, usually only the digital part needs to be detected for tampering, and the digital part only occupies a very small part of the electric meter reading image. In particular, when only one digit is tampered with, the detection model in the related technology has low detection accuracy for such a small target. Therefore, in an embodiment of the present invention, in order to improve the detection accuracy, the digital part image of the electric meter reading image suspected of tampering can be extracted before model detection, and then the extracted digital part image can be detected using the tampering detection model.

[0081] The above-mentioned extraction of the target area image from the suspected tampered picture may be to identify the target area image in the suspected tampered picture and crop the target area image from the suspected tampered picture. In order to ensure that the target area image is extracted quickly and accurately, a target detection model may be used, for example, Faster-RCNN, You Only Look Once (YOLO), Single Shot MultiBox Detector (SSD), etc. In this way, it is only necessary to input the suspected tampered picture into the target detection model, extract and match the features of the suspected tampered picture through the target detection model, locate the target object area, such as the digital area of ​​the electric meter, and then extract the image in the area.

[0082] Optionally, the tampering detection model is an improved two-stream fast regional convolutional neural network Faster R-CNN, and the anchor size of the region proposal network (RPN) layer in the improved two-stream Faster R-CNN is determined by clustering the annotation boxes in the training picture set and then calculating the box size and aspect ratio of each cluster center, wherein the annotation box is a annotation box for the tampered area, and the training picture set and the picture to be detected are pictures of the same type.

[0083] Among them, in order to ensure the accuracy of model detection, a high-precision network can be selected as the training model, for example, the two-stream fast regional convolutional neural network Faster R-CNN.

[0084] That is, in one implementation, in order to make the tampering detection model adaptable to the images to be detected in different application scenarios and ensure the detection accuracy of the model, an improved dual-stream Faster R-CNN can be used as the tampering detection model in the embodiment of the present invention. Among them, the dual streams are RGB stream and noise stream, and the main purpose of the RGB stream is to extract features from the RGB image input, so as to find tampering features (tampering artifacts) such as strong contrast differences and unnatural tampering boundaries; the noise stream mainly uses noise features to find noise inconsistencies between the real area and the tampered area; then, the features of the two streams are fused to further combine the spatial information of the two modalities and output the tampered area data.

[0085] The improved two-stream Faster R-CNN is improved on the basis of the two-stream Faster R-CNN, making it more suitable for tampering detection of images of the target type that actually needs to be detected. Specifically, the anchor size of the RPN layer in the two-stream Faster R-CNN can be adaptively modified according to the type characteristics of the image to be detected in the actual detection requirements, so that the tampered area in the image can be more accurately located through the improved two-stream Faster R-CNN, that is, the tampered area can be more accurately marked.

[0086] In the related art, the anchors of the RPN layer in the dual-stream Faster R-CNN include 9 in total, with sizes of 128×128, 256×256 and 512×512, and aspect ratios of 1:1, 1:2, and 2:1, respectively. However, the anchor size is not suitable for the images to be detected in some small target detection scenarios (such as meter reading images). Therefore, the anchor mechanism of the RPN layer in the dual-stream Faster R-CNN can be improved. Specifically, all the annotated boxes in the pre-acquired training picture set with annotated tampering areas can be clustered, such as using the K-means clustering algorithm for clustering, and then determining the box size and aspect ratio of the cluster center in each group after clustering, and determining the anchor size of the RPN layer in the improved dual-stream Faster R-CNN based on these box sizes and aspect ratios.

[0087] For example, K-Means clustering is performed on the annotated boxes of the digitally tampered parts in a large number of meter reading pictures, and the box size and aspect ratio of each cluster center are calculated, so that 16 anchors of the RPN layer in the improved two-stream Faster R-CNN are selected, with sizes of 16×16, 80×80, 144×144 and 200×200, and aspect ratios of 0.6, 1, 1.6 and 5, respectively.

[0088] It should be noted that, in the case of adopting a processing method of pre-extracting the target area image of the suspected tampered image, in this implementation, the training picture set can also be the target area image extracted from the original complete sample image as the training picture set to ensure that the anchor size determined by clustering is compatible with the input data of the improved two-stream Faster R-CNN.

[0089] Furthermore, the ratio of positive and negative samples in the RPN layer during training is greater than 1;

[0090] Among them, the selection rules of positive and negative samples include: sorting the intersection over Union (IOU) values ​​of the candidate anchor boxes and the corresponding annotation boxes in the training picture set from large to small, and taking the candidate anchor boxes whose IOU values ​​are sorted in the first interval as positive samples, and taking the candidate anchor boxes whose IOU values ​​are sorted in the second interval as negative samples, the range of the first interval is larger than the range of the second interval, and the first interval is a front-ranked interval, and the second interval is a back-ranked interval, and the candidate anchor boxes are the k anchor boxes whose distances to the corresponding annotation boxes are closest among the anchor boxes in the training picture set, and k is an integer greater than 1.

[0091] That is, in one implementation, the two-stream Faster R-CNN can be further improved by increasing the ratio of positive and negative samples in the model training process, so that it can learn more positive sample features, i.e., tampering features, and reduce the false positive rate. In other words, by increasing the positive sample ratio during the training process, it can be ensured that the model parameters of the improved two-stream Faster R-CNN obtained by training have higher accuracy, and can more accurately identify and locate the tampering features in the image.

[0092] In the related art, during the model training stage of the dual-stream Faster R-CNN, the training method of the RPN layer is to calculate the IOU between the anchor box and the real box (i.e., the labeled box), and take those greater than the threshold of 0.7 as positive samples (i.e., foreground), and those less than the threshold of 0.3 as negative samples (i.e., background), and set the ratio of the number of positive samples to negative samples to 1:1, and the total number of samples to 256. However, in actual applications, the setting of a fixed threshold makes the number of positive samples less than 128 in most cases. In order to make the total number of samples 256, the number of negative samples must be greater than 128, which results in the number of negative samples being much greater than the number of positive samples in most cases during training, which in turn causes the RPN network to learn more features of negative samples, and ultimately results in a large number of false positives.

[0093] In order to solve the above-mentioned series of problems caused by setting a fixed threshold, this implementation proposes to select positive and negative samples by introducing an adaptive dynamic threshold to increase the ratio of positive and negative samples and reduce the false detection rate of the final detection.

[0094] Specifically, during the training stage, for each annotated box in the training picture in the training picture set, the k anchor boxes closest to it are added to the candidate sample set as candidate anchor boxes, wherein the distance may be the L2 distance (i.e., the Euclidean distance), and the value of k may be set accordingly according to actual conditions or actual needs; then, for each candidate anchor box in the candidate sample set, its IOU value with the corresponding annotated box may be calculated, thereby obtaining the IOU value of each candidate anchor box in the candidate sample set and the corresponding annotated box.

[0095] Next, these IOU values ​​can be sorted in order from large to small, and positive and negative samples can be selected according to the sorted IOU value distribution. In order to increase the number of positive samples, the candidate anchor boxes corresponding to the majority of IOU values ​​at the front of the IOU value can be put into the positive sample set, and the candidate anchor boxes corresponding to the minority of IOU values ​​at the back of the IOU value can be put into the negative sample set. Specifically, the candidate anchor boxes whose IOU values ​​are sorted in the first interval can be put into the positive sample set as positive samples, and the candidate anchor boxes whose IOU values ​​are sorted in the second interval can be put into the negative sample set as negative samples. The first interval and the second interval can be set according to the number of positive and negative samples, and the first interval is the interval with the highest sorting and a large number of IOU values, and the second interval is the interval with the lowest sorting and a small number of IOU values, so as to increase the ratio of positive and negative samples. Among them, the positive sample in the embodiment of the present invention is a sample with tampering, that is, the positive sample can be a sample with a classification label of "tampering", and the negative sample in the embodiment of the present invention is a sample without tampering, that is, the negative sample can be a sample with a classification label of "not tampered".

[0096] In order to more conveniently select positive and negative samples, these IOU values ​​can be divided into multiple intervals according to the IOU value sorting. The division can be equal or unequal. For example, the equal division is into 4 intervals, namely the first 25% interval, the 25% to 50% interval, the 50% to 75% interval and the 75% to 100% interval. Taking 100 sorted IOU values ​​as an example, the first 25% interval is the first 25 IOU values ​​in the sorting, the 25% to 50% interval is the 25th to 50th IOU values ​​in the sorting, the 50% to 75% interval is the 50th to 75th IOU values ​​in the sorting, and the 75% to 100% interval is the 75th to 100th IOU values ​​in the sorting. Alternatively, it can be divided into 3 intervals unequally, namely the first 50% interval, the 50% to 75% interval and the 75% to 100% interval. The specific division intervals can be determined according to actual needs.

[0097] Taking the division of the first 25% interval, the 25% to 50% interval, the 50% to 75% interval and the 75% to 100% interval as an example, these four intervals can be marked as intervals 0 to 3 respectively. For candidate anchor boxes with IOU values ​​in the 0 interval and the 1 interval (i.e., the first 25% interval and the 25% to 50% interval), it means that they have more overlapping areas with the labeled boxes and can be put into the positive sample set; for candidate anchor boxes with IOU values ​​in the 4 interval (i.e., the 75% to 100% interval), it means that they have less or no overlapping areas with the labeled boxes and can be put into the negative sample set. That is to say, the first interval can be the first 25% interval and the 25% to 50% interval, and the second interval can be the 75% to 100% interval.

[0098] Furthermore, the selection rule of the positive and negative samples also includes: discarding candidate anchor boxes whose IOU values ​​are ranked in a third interval, and the third interval is an interval ranked between the first interval and the second interval.

[0099] That is, for the candidate anchor boxes whose IOU values ​​are ranked in the third interval, that is, the interval between the first interval and the second interval, since their IOU values ​​are neither large nor small, they have no high reference significance as positive samples or negative samples, so they can be discarded and not used as training samples.

[0100] For example, for candidate anchor boxes with IOU values ​​in the range of 3 (i.e., 50% to 75%), even if they have overlapping areas with the labeled boxes, the overlapping areas are small, and the quality of these candidate anchor boxes as positive samples or negative samples is not high, so they can be discarded.

[0101] In this way, by selecting positive and negative samples according to the above implementation, the proportion of positive samples can be increased and the proportion of negative samples can be reduced during the training process, so that the training model can learn more features of positive samples, thereby improving the detection accuracy of the model. It has been verified that the value of k is robust to the model performance.

[0102] Combine the following Figure 2 The network framework diagram of the improved two-stream Faster R-CNN shown in the figure illustrates the workflow of the improved two-stream Faster R-CNN:

[0103] like Figure 2As shown, the improved two-stream Faster R-CNN includes two detection channels, RGB stream and noise stream, wherein the RGB stream uses a separate Faster R-CNN network for bounding box regression and classification operations, and the RGB stream input is extracted through a convolutional layer network, and then input into the RPN layer to generate a more accurate candidate box area; the noise stream mainly analyzes the local noise features in the image, and the RGB stream input generates noise features through a steganalysis rich model (Steganalysis Rich Model, SRM) filtering layer, and then inputs the same convolutional layer network as the RGB stream to extract features, and shares the same region proposal with the RGB stream, which comes from the RPN layer network that only uses RGB features as input; then, the spatial features are selected from the RGB stream and the noise stream through the region of interest pooling (RoI pooling) layer, and the predicted bounding box (bbx_pred) is generated through the RGB RoI features; then, the bilinear pooling (Bilinear The pooling layer combines the spatial collinearity features of the two streams; finally, the result can be passed through a fully connected layer and a softmax layer to generate a predicted label (cls_pred) and determine whether the predicted area has been tampered with.

[0104] The following takes the tampering detection of the meter reading picture as an example, combined with Figure 3 , a specific implementation process of an embodiment of the present invention is illustrated by way of example:

[0105] like Figure 3 As shown, first, all the meter reading pictures can be input into the preliminary screening module, and the preliminary screening module can screen out suspected tampered pictures according to the Exif information of each picture and the software-related fields in the encoding information;

[0106] Then, the suspected tampered image is input into the meter digital extraction module, which extracts and matches features through a convolutional neural network, locates the digital part of the meter, and extracts the image of the digital part of the meter as the input of the tampering detection module;

[0107] The tampering detection module extracts RGB stream features and noise stream features on the digital area image of the meter. The RGB stream extracts features through the convolutional layer network and then inputs the RPN layer to generate a more accurate candidate frame area. After the RPN layer obtains the candidate frame, the features extracted by the noise stream share the same region proposal with the RGB stream. Then the RoI pooling layer selects spatial features from the RGB stream and the noise stream, and generates a predicted bounding box through the RGB RoI features. Then the spatial collinear features of the two streams are combined through the bilinear pooling layer. Finally, the results are passed through a fully connected layer and a softmax layer to generate a predicted label and determine whether the predicted area has been tampered with. The predicted bounding box and predicted label are output as the detection result.

[0108] In addition, it should be noted that considering that the effective labeling of training samples will directly affect the effect of the training model, in order to improve the quality of training samples and improve the accuracy of the model, the following labeling methods and rules can be used to effectively label the training samples (taking the meter reading picture as an example):

[0109] 1) Determine the tampered area by analyzing the compression rate of each area of ​​the image and calculating its error level (Error Level Analysis, ELA). For the original image obtained by sampling only once, the ELA values ​​of each area should be similar. If the ELA value of a region is significantly different from that of other parts of the image, then this region is likely to have been modified later. Using this principle, the training image can be compressed, its error level can be calculated, and then it can be visualized. The area with an ELA value significantly different from that of other parts of the image can be marked as a tampered area;

[0110] 2) The area where the number does not match the part of the number revealed in the context. For example, the displayed number is 8, and the number above should be 7, but the number revealed is not the tail of the number 7, so the number 8 is a tampered area;

[0111] 3) Other obvious tampering, such as inconsistent sharpness between the boundaries of numbers and other numbers, inconsistent inclination of numbers, inconsistent colors, inconsistent resolution of numbers and background, obvious inconsistency in the size of numbers, obvious inconsistency in the height of numbers, etc.

[0112] The embodiment of the present invention adopts the above implementation method, and by combining the rule filtering method based on metadata information (such as Exif information and encoding information of the picture) and the deep learning algorithm, it can bring many advantages compared with the existing technology. First, the rule filtering method is used to screen out suspected tampered pictures from a large number of meter reading pictures, reducing the calculation amount of the subsequent deep learning algorithm; secondly, the meter reading picture is preprocessed, and the digital part of the meter reading picture is cropped out and input into the model, so that the proportion of the tampered area in the whole picture is increased, and the number of negative samples is relatively reduced; thirdly, the clustering algorithm is used to calculate the anchor size and length-width ratio of the adapted meter reading picture; fourthly, the use of dynamic thresholds increases the ratio of positive and negative samples in the training stage, so that the model can better learn the tampering features of the picture. These four aspects greatly improve the performance of detecting the digital tampering area of ​​the meter reading picture in the scenario of large data volume, so that the accuracy of the tampered area finally detected is improved and the false detection rate is reduced.

[0113] The image tampering detection method of the embodiment of the present invention obtains N pictures to be detected, where N is a positive integer; based on the target attribute information of the N pictures to be detected, the N pictures to be detected are screened to obtain suspected tampered pictures; the suspected tampered pictures are detected using a tampering detection model, and a detection result is output, wherein the detection result is used to indicate whether the suspected tampered picture has been tampered with and at least one of the tampered areas. In this way, by pre-screening the pictures to be detected and determining the suspected tampered pictures therein, it is only necessary to further detect the suspected tampered pictures in the subsequent step, thereby reducing the calculation amount of the model detection algorithm and saving system resources.

[0114] The embodiment of the present invention also provides an image tampering detection device. Figure 4 , Figure 4 1 is a structural diagram of an image tampering detection device provided by an embodiment of the present invention. Since the principle of solving the problem by the image tampering detection device is similar to that of the image tampering detection method in the embodiment of the present invention, the implementation of the image tampering detection device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0115] like Figure 4 As shown, the image tampering detection device 400 includes:

[0116] The acquisition module 401 is used to acquire N images to be detected, where N is a positive integer;

[0117] A screening module 402 is used to screen the N to-be-detected pictures based on the target attribute information of the N to-be-detected pictures to obtain suspected tampered pictures;

[0118] The detection module 403 is used to detect the suspected tampered image using a tampering detection model and output a detection result, wherein the detection result is used to indicate whether the suspected tampered image has been tampered with and at least one of the tampered area.

[0119] Optionally, the screening module 402 includes:

[0120] An extraction unit, used to extract target attribute information of each of the N pictures to be detected;

[0121] The determination unit is used to determine the suspected tampered image based on the software related fields in the target attribute information of each image to be detected.

[0122] Optionally, the target attribute information includes exchangeable image file format Exif information and encoding information;

[0123] The determination unit is used to determine the image to be detected as a suspected tampered image, whose encoding information contains a first preset field and whose Exif information does not contain a second preset field, wherein the first preset field is a field representing image editing software, and the second preset field is a field representing image viewing software.

[0124] Optionally, the image tampering detection device 400 further includes:

[0125] An extraction module, used to extract a target area image from the suspected tampered image;

[0126] The detection module 403 is used to detect the target area image using a tampering detection model and output a detection result.

[0127] Optionally, the tampering detection model is an improved two-stream fast regional convolutional neural network Faster R-CNN, and the anchor size of the regional generation network RPN layer in the improved two-stream Faster R-CNN is determined by clustering the annotation boxes in the training picture set and then calculating the box size and aspect ratio of each cluster center, wherein the annotation box is a annotation box for the tampered area, and the training picture set and the picture to be detected are pictures of the same type.

[0128] Optionally, the ratio of positive and negative samples in the RPN layer during training is greater than 1;

[0129] Among them, the selection rules of positive and negative samples include: sorting the intersection over union (IOU) values ​​of the candidate anchor boxes and the corresponding annotation boxes in the training picture set from large to small, and taking the candidate anchor boxes whose IOU values ​​are sorted in the first interval as positive samples, and taking the candidate anchor boxes whose IOU values ​​are sorted in the second interval as negative samples, the range of the first interval is larger than the range of the second interval, and the first interval is a front-ranked interval, and the second interval is a back-ranked interval, and the candidate anchor boxes are the k anchor boxes in the anchor boxes of the training picture set that are closest to the corresponding annotation boxes, and k is an integer greater than 1.

[0130] Optionally, the positive and negative sample selection rule further includes: discarding candidate anchor boxes whose IOU values ​​are ranked in a third interval, and the third interval is an interval ranked between the first interval and the second interval.

[0131] The image tampering detection device provided in the embodiment of the present invention can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated in this embodiment.

[0132] The image tampering detection device 400 of the embodiment of the present invention obtains N pictures to be detected, where N is a positive integer; based on the target attribute information of the N pictures to be detected, the N pictures to be detected are screened to obtain suspected tampered pictures; the suspected tampered pictures are detected using a tampering detection model, and a detection result is output, wherein the detection result is used to indicate whether the suspected tampered picture has been tampered with and at least one of the tampered areas. In this way, by pre-screening the pictures to be detected and determining the suspected tampered pictures therein, it is only necessary to further detect the suspected tampered pictures in the future, thereby reducing the calculation amount of the model detection algorithm and saving system resources.

[0133] The embodiment of the present invention also provides an image tampering detection device. Since the principle of solving the problem by the image tampering detection device is similar to the method of the image tampering detection device in the embodiment of the present invention, the implementation of the image tampering detection device can refer to the implementation of the method, and the repeated parts will not be repeated. Figure 5 As shown, the image tampering detection device of the embodiment of the present invention includes:

[0134] The processor 500 is used to read the program in the memory 520 and execute the following process:

[0135] Get N pictures to be detected, where N is a positive integer;

[0136] Based on the target attribute information of the N to-be-detected pictures, the N to-be-detected pictures are screened to obtain suspected tampered pictures;

[0137] The suspected tampered image is detected using a tampering detection model, and a detection result is output, wherein the detection result is used to indicate whether the suspected tampered image has been tampered with and at least one of a tampered area.

[0138] Among them, Figure 5 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors represented by processor 500 and memory represented by memory 520. The bus architecture may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 510 may be a plurality of components, namely, a transmitter and a transceiver, providing a unit for communicating with various other devices on a transmission medium. The processor 500 is responsible for managing the bus architecture and general processing, and the memory 520 may store data used by the processor 500 when performing operations.

[0139] Optionally, the processor 500 is further configured to read the computer program and execute the following steps:

[0140] Extracting target attribute information of each picture to be detected from the N pictures to be detected respectively;

[0141] The suspected tampered images are determined based on the software related fields in the target attribute information of each image to be detected.

[0142] Optionally, the target attribute information includes exchangeable image file format Exif information and encoding information;

[0143] The processor 500 is further configured to read the computer program and execute the following steps:

[0144] The image to be detected that contains a first preset field in the encoding information and does not contain a second preset field in the Exif information is determined as a suspected tampered image, wherein the first preset field is a field representing the image editing software, and the second preset field is a field representing the image viewing software.

[0145] Optionally, the processor 500 is further configured to read the computer program and execute the following steps:

[0146] Extracting a target area image from the suspected tampered image;

[0147] The target area image is detected using a tampering detection model, and a detection result is output.

[0148] Optionally, the tampering detection model is an improved two-stream fast regional convolutional neural network Faster R-CNN, and the anchor size of the regional generation network RPN layer in the improved two-stream Faster R-CNN is determined by clustering the annotation boxes in the training picture set and then calculating the box size and aspect ratio of each cluster center, wherein the annotation box is a annotation box for the tampered area, and the training picture set and the picture to be detected are pictures of the same type.

[0149] Optionally, the ratio of positive and negative samples in the RPN layer during training is greater than 1;

[0150] Among them, the selection rules of positive and negative samples include: sorting the intersection over union (IOU) values ​​of the candidate anchor boxes and the corresponding annotation boxes in the training picture set from large to small, and taking the candidate anchor boxes whose IOU values ​​are sorted in the first interval as positive samples, and taking the candidate anchor boxes whose IOU values ​​are sorted in the second interval as negative samples, the range of the first interval is larger than the range of the second interval, and the first interval is a front-ranked interval, and the second interval is a back-ranked interval, and the candidate anchor boxes are the k anchor boxes in the anchor boxes of the training picture set that are closest to the corresponding annotation boxes, and k is an integer greater than 1.

[0151] Optionally, the positive and negative sample selection rule further includes: discarding candidate anchor boxes whose IOU values ​​are ranked in a third interval, and the third interval is an interval ranked between the first interval and the second interval.

[0152] The image tampering detection device provided in the embodiment of the present invention can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated in this embodiment.

[0153] In addition, the computer-readable storage medium of the embodiment of the present invention is used to store a computer program, and the computer program can be executed by a processor to implement the following steps:

[0154] Get N pictures to be detected, where N is a positive integer;

[0155] Based on the target attribute information of the N to-be-detected pictures, the N to-be-detected pictures are screened to obtain suspected tampered pictures;

[0156] The suspected tampered image is detected using a tampering detection model, and a detection result is output, wherein the detection result is used to indicate whether the suspected tampered image has been tampered with and at least one of a tampered area.

[0157] Optionally, the screening the N to-be-detected pictures based on the target attribute information of the N to-be-detected pictures to obtain the suspected tampered pictures includes:

[0158] Extracting target attribute information of each picture to be detected from the N pictures to be detected respectively;

[0159] The suspected tampered images are determined based on the software related fields in the target attribute information of each image to be detected.

[0160] Optionally, the target attribute information includes exchangeable image file format Exif information and encoding information;

[0161] The step of determining the suspected tampered image based on the software related fields in the target attribute information of each image to be detected includes:

[0162] The image to be detected that contains a first preset field in the encoding information and does not contain a second preset field in the Exif information is determined as a suspected tampered image, wherein the first preset field is a field representing the image editing software, and the second preset field is a field representing the image viewing software.

[0163] Optionally, before the tampering detection model is used to detect the suspected tampered image and the detection result is output, the method further includes:

[0164] Extracting a target area image from the suspected tampered image;

[0165] The detecting the suspected tampered image using the tampering detection model and outputting the detection result includes:

[0166] The target area image is detected using a tampering detection model, and a detection result is output.

[0167] Optionally, the tampering detection model is an improved two-stream fast regional convolutional neural network Faster R-CNN, and the anchor size of the regional generation network RPN layer in the improved two-stream Faster R-CNN is determined by clustering the annotation boxes in the training picture set and then calculating the box size and aspect ratio of each cluster center, wherein the annotation box is a annotation box for the tampered area, and the training picture set and the picture to be detected are pictures of the same type.

[0168] Optionally, the ratio of positive and negative samples in the RPN layer during training is greater than 1;

[0169] Among them, the selection rules of positive and negative samples include: sorting the intersection over union (IOU) values ​​of the candidate anchor boxes and the corresponding annotation boxes in the training picture set from large to small, and taking the candidate anchor boxes whose IOU values ​​are sorted in the first interval as positive samples, and taking the candidate anchor boxes whose IOU values ​​are sorted in the second interval as negative samples, the range of the first interval is larger than the range of the second interval, and the first interval is a front-ranked interval, and the second interval is a back-ranked interval, and the candidate anchor boxes are the k anchor boxes in the anchor boxes of the training picture set that are closest to the corresponding annotation boxes, and k is an integer greater than 1.

[0170] Optionally, the positive and negative sample selection rule further includes: discarding candidate anchor boxes whose IOU values ​​are ranked in a third interval, and the third interval is an interval ranked between the first interval and the second interval.

[0171] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0172] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0173] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform some steps of the sending and receiving method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

[0174] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for detecting image tampering, characterized in that: include: Get N pictures to be detected, where N is a positive integer; Based on the target attribute information of the N to-be-detected pictures, the N to-be-detected pictures are screened to obtain suspected tampered pictures, wherein the target attribute information includes exchangeable image file format Exif information and / or encoding information; Using a tampering detection model to detect the suspected tampered image, and output a detection result, wherein the detection result is used to indicate whether the suspected tampered image has been tampered with and at least one of a tampered area; The tampering detection model is an improved two-stream fast regional convolutional neural network Faster R-CNN, and the Faster R-CNN includes a regional generation network RPN layer, and the positive and negative sample ratio of the RPN layer during training is greater than 1; Among them, the selection rules of positive and negative samples include: sorting the intersection-over-union (IOU) values ​​of the candidate anchor boxes and the corresponding annotation boxes in the training picture set in descending order, taking the candidate anchor boxes whose IOU values ​​are sorted in the first interval as positive samples, and taking the candidate anchor boxes whose IOU values ​​are sorted in the second interval as negative samples, the range of the first interval is larger than the range of the second interval, and the first interval is a front-ranked interval, and the second interval is a back-ranked interval, and the candidate anchor boxes are the k anchor boxes whose distances from the corresponding annotation boxes in the anchor boxes of the training picture set are closest, and k is an integer greater than 1; The selection rule of the positive and negative samples also includes: discarding the candidate anchor boxes whose IOU values ​​are ranked in a third interval, and the third interval is an interval ranked between the first interval and the second interval.

2. The method according to claim 1, characterized in that The screening of the N to-be-detected pictures based on the target attribute information of the N to-be-detected pictures to obtain suspected tampered pictures includes: Extracting target attribute information of each picture to be detected from the N pictures to be detected respectively; The suspected tampered images are determined based on the software related fields in the target attribute information of each image to be detected.

3. The method according to claim 2, characterized in that The target attribute information includes exchangeable image file format Exif information and encoding information; The step of determining the suspected tampered image based on the software related fields in the target attribute information of each image to be detected includes: The image to be detected that contains a first preset field in the encoding information and does not contain a second preset field in the Exif information is determined as a suspected tampered image, wherein the first preset field is a field representing the image editing software, and the second preset field is a field representing the image viewing software.

4. The method according to claim 1, characterized in that Before detecting the suspected tampered image using the tampering detection model and outputting the detection result, the method further includes: Extracting a target area image from the suspected tampered image; The detecting the suspected tampered image using the tampering detection model and outputting the detection result includes: The target area image is detected using a tampering detection model, and a detection result is output.

5. The method according to claim 1, characterized in that The anchor size of the RPN layer is determined by clustering the annotation boxes in the training picture set and calculating the box size and aspect ratio of each cluster center, wherein the annotation box is the annotation box for the tampered area, and the training picture set and the picture to be detected are pictures of the same type.

6. An image tampering detection device, characterized in that: include: An acquisition module is used to acquire N images to be detected, where N is a positive integer; A screening module, configured to screen the N to-be-detected pictures based on target attribute information of the N to-be-detected pictures to obtain suspected tampered pictures, wherein the target attribute information includes exchangeable image file format Exif information and / or encoding information; a detection module, configured to detect the suspected tampered image using a tampering detection model, and output a detection result, wherein the detection result is used to indicate whether the suspected tampered image has been tampered with and at least one of a tampered area; The tampering detection model is an improved two-stream fast regional convolutional neural network Faster R-CNN, and the Faster R-CNN includes a regional generation network RPN layer, and the positive and negative sample ratio of the RPN layer during training is greater than 1; Among them, the selection rules of positive and negative samples include: sorting the intersection-over-union (IOU) values ​​of the candidate anchor boxes and the corresponding annotation boxes in the training picture set in descending order, taking the candidate anchor boxes whose IOU values ​​are sorted in the first interval as positive samples, and taking the candidate anchor boxes whose IOU values ​​are sorted in the second interval as negative samples, the range of the first interval is larger than the range of the second interval, and the first interval is a front-ranked interval, and the second interval is a back-ranked interval, and the candidate anchor boxes are the k anchor boxes whose distances from the corresponding annotation boxes in the anchor boxes of the training picture set are closest, and k is an integer greater than 1; The selection rule of the positive and negative samples also includes: discarding the candidate anchor boxes whose IOU values ​​are ranked in a third interval, and the third interval is an interval ranked between the first interval and the second interval.

7. An image tampering detection device, comprising: A transceiver, a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor is configured to read the program in the memory to implement the steps of the method as claimed in any one of claims 1 to 5.

8. A computer-readable storage medium for storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the image tampering detection method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Image tampering detection method, electronic apparatus and readable storage medium

    CN107464237A

  • Classroom attendance checking method and equipment based on neural network, storage medium and classroom attendance checking device based on neural network

    CN110097003A