# US 2019/0156486 A1 · Method and system of detecting image tampering, electronic device and storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0156486 A1
- Document ID: US20190156486A1
- Status: Published application
- Kind: A1
- Application number: 16/084,227
- Filed: 2017-06-30
- Published: 2019-05-23
- Earliest claimed: 2016-12-30
- Assignees: Ping An Technology (Shenzhen) Co., Ltd.
- Applicants: Ping An Technology (Shenzhen) Co., Ltd.
- Inventors: Jianzong WANG; Jing XIAO
- Web page: https://patentgrep.com/patent/US20190156486A1

## CPC

- G06T 7/11: Region-based segmentation
- G06N 3/045: Combinations of networks
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06N 3/0499: Feedforward networks
- G06N 3/088: Non-supervised learning, e.g. competitive learning
- G06N 3/09: Supervised learning
- G06T 1/0028: {Adaptive watermarking, e.g. Human Visual System [HVS]-based watermarking}
- G06T 7/0002: {Inspection of images, e.g. flaw detection}
- G06N 3/048: Activation functions
- G06T 2201/0201: whereby only tamper or origin are detected and no embedding takes place
- G06T 2207/10004: Still image; Photographic image
- G06T 2207/20021: Dividing image into blocks, subimages or windows
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A method and system of detecting image tampering, an electronic device and a storage medium. The method includes: A. carrying out block segmentation on a to-be-detected image to segment the to-be-detected image into a plurality of image small fragments, and extracting initial tampering detection features from all the image small fragments; B. encoding the extracted initial tampering detection features with a predetermined encoder to generate complicated tampering features, and determining a tampering detection result corresponding to the to-be-detected image according to the generated complicated tampering features, wherein the tampering detection result includes an image-tampered result and an image-not-tampered result. The disclosure realizes accurate detection for different types and formats of image tampering.

## Claims

### Claim 1

A method of detecting image tampering, comprising:
step A, carrying out block segmentation on a to-be-detected image to segment the to-be-detected image into a plurality of image small fragments, and extracting initial tampering detection features from all the image small fragments;
step B, encoding the extracted initial tampering detection features with a predetermined encoder to generate complicated tampering features, and determining a tampering detection result corresponding to the to-be-detected image according to the generated complicated tampering features, wherein the tampering detection result comprises an image-tampered result and an image-not-tampered result.

### Claim 2 (depends on 1)

The method of detecting image tampering of claim 1, wherein the step A comprises:
converting the to-be-detected image from a first color space into a second color space;
carrying out the block segmentation on the to-be-detected image to segment the to-be-detected image into N*M image small fragments, wherein N and M are positive integers;
applying a preset wavelet function decomposition to each second color space component of each image small fragment to obtain multiple corresponding pixel coefficient maps, calculating a tabulate statistics coefficient of each pixel coefficient map, and obtaining multiple tabulate statistics coefficients from the each image small fragment, wherein the tabulate statistics coefficients are regarded as the initial tampering detection features of the corresponding image small fragments.

### Claim 3 (depends on 1)

The method of detecting image tampering of claim 1,
wherein the predetermined encoder is a stacked auto-encoder; the stacked auto-encoder is formed by stacking multiple layers of basic auto-encoders, and an output of each layer of the stacked auto-encoder is an input of a next layer of the stacked auto-encoder; the stacked auto-encoder further comprises a neural network multi-layer perceptron; the neural network multi-layer perceptron is jointed with a last layer of the stacked auto-encoder, and is configured to determine the tampering detection result corresponding to the to-be-detected image according to the generated complicated tampering features.

### Claim 4 (depends on 2)

The method of detecting image tampering of claim 2,
wherein the predetermined encoder is a stacked auto-encoder; the stacked auto-encoder is formed by stacking multiple layers of basic auto-encoders, and an output of each layer of the stacked auto-encoder is an input of a next layer of the stacked auto-encoder; the stacked auto-encoder further comprises a neural network multi-layer perceptron; the neural network multi-layer perceptron is jointed with a last layer of the stacked auto-encoder, and is configured to determine the tampering detection result corresponding to the to-be-detected image according to the generated complicated tampering features.

### Claim 5 (depends on 3)

The method of detecting image tampering of claim 3, wherein the step B comprises:
encoding the initial tampering detection features of all the image small fragments with the predetermined encoder to generate the complicated tampering features of all the image small fragments;
determining first tampering detection results corresponding to all the image small fragments according to the complicated tampering features of all the image small fragments, wherein the first tampering detection result comprise the image-tampered result and the image-not-tampered result;
if having a first tampering detection result corresponding to one image small fragment is the image-tampered result, determining that the tampering detection result corresponding to the to-be-detected image is the image-tampered result.

### Claim 6 (depends on 5)

The method of detecting image tampering of claim 5, wherein the stacked auto-encoder further comprises an adjacent region perception layer for determining the tampering detection result corresponding to the to-be-detected image according to a scene information of adjacent regions;
the step B further comprises,
calculating an adjacent scene information of the each image small fragment according to a preset algorithm, and determining a second tampering detection result corresponding to the each image small fragment according to the adjacent scene information of the each image small fragment, wherein the second tampering detection result comprises the image-tampered result and the image-not-tampered result;
if having a second tampering detection result corresponding to one image small fragment is the image-tampered result, determining that the tampering detection result corresponding to the to-be-detected image is the image-tampered result;
if the second tampering detection results corresponding to all the image small fragments are all image-not-tampered results, but having a first tampering detection result corresponding to one image small fragment is the image-tampered result, determining that the tampering detection result corresponding to the to-be-detected image is the image-not-tampered result.

### Claim 7 (depends on 1)

The method of detecting image tampering of claim 1, wherein a training process of the predetermined encoder comprises,
step C, obtaining a preset number of image samples, and marking the tampering result of each image sample, wherein the tampering result comprises the image-tampered result and the image-not-tampered result;
step D, carrying out block segmentation on each image sample to segment the each image sample into N*M image small fragments, wherein N and M are positive integers, and extracting initial tampering detection features from all the image small fragments of the each image sample to extract the initial tampering detection features corresponding to the each image sample;
step E, classifying all the image samples into a first data set and a second data set according to a ratio of X to Y, wherein the number of image samples in the first data set is greater than that of image samples in the second data set, the first data set is used as a training set, and the second data set is used as a test set; and X is greater than 0, and Y is greater than 0;
step F, training the encoder with the initial tampering detection features corresponding to all the image samples in the first data set, and verifying the accuracy rate of the trained encoder with the initial tampering detection features corresponding to all the image samples in the second data set;
step G, if the accuracy rate of the trained encoder is greater than or equal to a preset accuracy rate, ending the training, or if the accuracy rate of the trained encoder is less than the preset accuracy rate, increasing the number of image samples, and repeatedly executing the steps D, E and F till the accuracy rate of the trained encoder is greater than or equal to the preset accuracy rate.

### Claim 8

A system of detecting image tampering, comprising:
an extraction module configured for carrying out block segmentation on a to-be-detected image to segment the to-be-detected image into a plurality of image small fragments, and extracting initial tampering detection features from all the image small fragments;
a detection module configured for encoding the extracted initial tampering detection features with a predetermined encoder to generate complicated tampering features, and determining a tampering detection result corresponding to the to-be-detected image according to the generated complicated tampering features, wherein the tampering detection result comprises an image-tampered result and an image-not-tampered result.

### Claim 9 (depends on 8)

The system of detecting image tampering of claim 8, wherein the extraction module comprises:
a conversion unit configured for converting the to-be-detected image from a first color space into a second color space;
a segmentation unit configured for carrying out the block segmentation on the to-be-detected image to segment the to-be-detected image into N*M image small fragments, wherein N and M are positive integers;
an obtaining unit configured for applying preset wavelet function decomposition to each second color space component of each image small fragment to obtain multiple corresponding pixel coefficient maps, calculating a tabulate statistics coefficient of each pixel coefficient map, and obtaining multiple tabulate statistics coefficients from the each image small fragment, wherein the tabulate statistics coefficients are regarded as the initial tampering detection features of the corresponding image small fragments.

### Claim 10 (depends on 8)

The system of detecting image tampering of claim 8, wherein the predetermined encoder is a stacked auto-encoder; the stacked auto-encoder is formed by stacking multiple layers of basic auto-encoders, and an output of each layer of the stacked auto-encoder is an input of a next layer of the stacked auto-encoders; the stacked auto-encoder further comprises a neural network multi-layer perceptron; the neural network multi-layer perceptron is jointed with a last layer of the stacked auto-encoder, and is configured to determine the tampering detection result corresponding to the to-be-detected image according to the generated complicated tampering features.

### Claim 11 (depends on 9)

The system of detecting image tampering of claim 9, wherein the predetermined encoder is a stacked auto-encoder; the stacked auto-encoder is formed by stacking multiple layers of basic auto-encoders, and an output of each layer of the stacked auto-encoder is an input of a next layer of the stacked auto-encoder; the stacked auto-encoder further comprises a neural network multi-layer perceptron; the neural network multi-layer perceptron is jointed with a last layer of the stacked auto-encoder, and is configured to determine the tampering detection result corresponding to the to-be-detected image according to the generated complicated tampering features.

### Claim 12 (depends on 10)

The system of detecting image tampering of claim 10, wherein the detection module is configured for
encoding the initial tampering detection features of all the image small fragments with the predetermined encoder to generate the complicated tampering features of all the image small fragments;
determining first tampering detection results corresponding to all the image small fragments according to the complicated tampering features of all the image small fragments, wherein the first tampering detection results comprise the image-tampered results and the image-not-tampered results;
if having a first tampering detection result corresponding to one image small fragment is the image-tampered result, determining that the tampering detection result corresponding to the to-be-detected image is the image-tampered result.

### Claim 13 (depends on 12)

The system of detecting image tampering of claim 12, wherein the stacked auto-encoder further comprises an adjacent region perception layer for determining the tampering detection result corresponding to the to-be-detected image according to a scene information of adjacent regions;
the detection module is configured for
calculating an adjacent scene information of each image small fragment according to a preset algorithm, and determining a second tampering detection result corresponding to the each image small fragment according to the adjacent scene information of the each image small fragment, wherein the second tampering detection result comprises the image-tampered result and the image-not-tampered result;
if having a second tampering detection result corresponding to one image small fragment is the image-tampered result, determining that the tampering detection result corresponding to the to-be-detected image is the image-tampered result;
if the second tampering detection results corresponding to all the image small fragments are all image-not-tampered results, but having a first tampering detection result corresponding to one image small fragment is the image-tampered result, determining that the tampering detection result corresponding to the to-be-detected image is the image-not-tampered result.

### Claim 14 (depends on 8)

The system of detecting image tampering of claim 8, wherein a training process of the predetermined encoder comprises,
step C, obtaining a preset number of image samples, and marking the tampering result of each image sample, wherein the tampering result comprises the image-tampered result and the image-not-tampered result;
step D, carrying out block segmentation on each image sample to segment each image sample into N*M image small fragments, wherein N and M are positive integers, and extracting initial tampering detection features from all the image small fragments of each image sample to extract the initial tampering detection features corresponding to each image sample;
step E, classifying all the image samples into a first data set and a second data set according to a ratio of X to Y, wherein the number of image samples in the first data set is greater than that of image samples in the second data set, the first data set is used as a training set, and the second data set is used as a test set; and X is greater than 0, and Y is greater than 0;
step F, training the encoder with the initial tampering detection features corresponding to all the image samples in the first data set, and verifying the accuracy rate of the trained encoder with the initial tampering detection features corresponding to all the image samples in the second data set;
step G, if the accuracy rate of the trained encoder is greater than or equal to a preset accuracy rate, ending the training, or if the accuracy rate of the trained encoder is less than the preset accuracy rate, increasing the number of image samples, and repeatedly executing the steps D, E and F till the accuracy rate of the trained encoder is greater than or equal to the preset accuracy rate.

### Claim 15

An electronic device, comprising a processing equipment and a storage equipment, wherein the storage equipment stores an image tampering detection system comprising at least one computer readable instruction; and the at least one computer readable instruction is executed by the processing equipment to implement the following operations:
step A, carrying out block segmentation on a to-be-detected image to segment the to-be-detected image into a plurality of image small fragments, and extracting initial tampering detection features from all the image small fragments;
step B, encoding the extracted initial tampering detection features with a predetermined encoder to generate complicated tampering features, and determining a tampering detection result corresponding to the to-be-detected image according to the generated complicated tampering features, wherein the tampering detection result comprises an image-tampered result and an image-not-tampered result.

### Claim 16 (depends on 15)

The electronic device of claim 15, wherein the at least one computer readable instruction is executed by the processing equipment, wherein the step A comprises
converting the to-be-detected image from a first color space into a second color space;
carrying out the block segmentation on the to-be-detected image to segment the to-be-detected image into N*M image small fragments, wherein N and M are positive integers;
applying a preset wavelet function decomposition to each second color space component on the each image small fragment to obtain multiple corresponding pixel coefficient maps, calculating a tabulate statistics coefficient of each pixel coefficient map, and obtaining multiple tabulate statistics coefficients from each image small fragment, wherein the tabulate statistics coefficients are regarded as the initial tampering detection features of the corresponding image small fragments.

### Claim 17 (depends on 15)

The electronic device of claim 15, wherein the predetermined encoder is a stacked auto-encoder; the stacked auto-encoder is formed by stacking multiple layers of basic auto-encoders, and an output of each layer of the stacked auto-encoder is an input of a next layer of the stacked auto-encoder; the stacked auto-encoder further comprises a neural network multi-layer perceptron; the neural network multi-layer perceptron is jointed with a last layer of the stacked auto-encoder, and is configured to determine the tampering detection result corresponding to the to-be-detected image according to the generated complicated tampering features.

### Claim 18 (depends on 17)

The electronic device of claim 17, wherein the at least one computer readable instruction is executed by the processing equipment, wherein the step B comprises
encoding the initial tampering detection features of all the image small fragments with the predetermined encoder to generate the complicated tampering features of all the image small fragments;
determining first tampering detection results corresponding to all the image small fragments according to the complicated tampering features of all the image small fragments, wherein the first tampering detection results comprise the image-tampered results and the image-not-tampered results;
if having a first tampering detection result corresponding to one image small fragment is the image-tampered result, determining that the tampering detection result corresponding to the to-be-detected image is the image-tampered result.

### Claim 19 (depends on 18)

The electronic device of claim 18, wherein the stacked auto-encoder further comprises an adjacent region perception layer for determining the tampering detection result corresponding to the to-be-detected image according to scene information of adjacent regions; the at least one computer readable instruction is executed by the processing equipment, wherein the step B further comprises,
calculating an adjacent scene information of each image small fragment according to a preset algorithm, and determining a second tampering detection result corresponding to the each image small fragment according to the adjacent scene information of the each image small fragment, wherein the second tampering detection result comprises the image-tampered result and the image-not-tampered result;
if the second tampering detection result corresponding to one image small fragment is the image-tampered result, determining that the tampering detection result corresponding to the to-be-detected image is the image-tampered result;
if the second tampering detection results corresponding to all the image small fragments are all image-not-tampered results, but having a first tampering detection result corresponding to one image small fragment is the image-tampered result, determining that the tampering detection result corresponding to the to-be-detected image is the image-not-tampered result.

### Claim 20

(canceled)
