CN107679572A - A kind of image discriminating method, storage device and mobile terminal - Google Patents

A kind of image discriminating method, storage device and mobile terminal Download PDF

Info

Publication number
CN107679572A
CN107679572A CN201710909494.9A CN201710909494A CN107679572A CN 107679572 A CN107679572 A CN 107679572A CN 201710909494 A CN201710909494 A CN 201710909494A CN 107679572 A CN107679572 A CN 107679572A
Authority
CN
China
Prior art keywords
image
branching networks
tensor
module
input
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710909494.9A
Other languages
Chinese (zh)
Other versions
CN107679572B (en
Inventor
李斌
罗瑚
张浩鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen University
Original Assignee
Shenzhen University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen University filed Critical Shenzhen University
Priority to CN201710909494.9A priority Critical patent/CN107679572B/en
Publication of CN107679572A publication Critical patent/CN107679572A/en
Application granted granted Critical
Publication of CN107679572B publication Critical patent/CN107679572B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/217Validation; Performance evaluation; Active pattern learning techniques
    • G06F18/2193Validation; Performance evaluation; Active pattern learning techniques based on specific statistical tests
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Biophysics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Health & Medical Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a kind of image discriminating method, storage device and mobile terminal, method includes:Choose image and carry out DCT coefficient caused by JPEG compression, and by 20 AC coefficient subbands before the selection of zigzag orders from DCT coefficient, input tensor, is inputted into corresponding branching networks structure according to certain organizational form corresponding to composition;Convolution module in branching networks structure carries out convolution operation, batch normalized, non-linearization operation and Data Dimensionality Reduction to input tensor and handled, by input after the tensor data merging after processing to sort module;Sort module is classified the tensor data of branching networks structure output, and classification results are calculated using cross entropy loss function, judges whether image passes through dual JPEG compression according to result of calculation.The present invention improves the detection accuracy whether image passes through dual JPEG compression, effectively differentiates whether image is not distorted, and without being pre-processed to image, avoids influence of the human factor to differentiation result.

Description

A kind of image discriminating method, storage device and mobile terminal
Technical field
The present invention relates to technical field of image processing, and in particular to a kind of image discriminating method, storage device and movement are eventually End.
Background technology
With the fast development of mobile Internet, people are producing and contacted the digital picture of magnanimity daily.But with The prevalence of some easily operated image editing softwares, people can be relatively easy to that image is handled or changed, this The risk that also increase image is maliciously distorted by other people simultaneously.
JPEG (Joint Photographic Experts Group) format-patterns compress fidelity height simultaneously due to it The advantages of occupying little space, widely used by people.So if there is digital criminal to want tampered image content, his/her meeting Very maximum probability is directed to the image of jpeg format;Picture material to cover by after distorting, distorting vestige, the image can be by again Same form is saved as, this operation is called " dual JPEG compression ".Therefore judge whether image passes through " dual JPEG Compression " is just to judge the foundation whether image is tampered.
Two-dimensional dct (the Discrete Cosine carried out when being typically all in the prior art extraction compression of images Transformation) preceding 20 AC coefficient subbands in the DCT coefficient that change obtains, the frequency that their initial occurs is calculated Rate (0 to 9), composition one-dimensional vector feature (20 × 9=180 dimensions), then this one-dimensional vector feature is transported to FLD (Fisher Linear Classifier) classified in grader.This method has very for whether image passes through dual JPEG compression High verification and measurement ratio.However, this method exposes the characteristics of easily being attacked by people:The DCT coefficient is distributed in extraction initial Before feature, there is artificially to be fitted approximate obedience Benford distributions once again, so as to which the image can pass through Appropriate pretreatment and forge the vestige without dual JPEG compression so that detection difficulty increases significantly.In addition, this method Validity be based on artificial extraction feature, be to need artificial to pre-process image, that is to say, that artificial factor can Several testing result can be had an impact, so as to have influence on the accuracy of judged result.
Therefore, prior art has yet to be improved and developed.
The content of the invention
The technical problem to be solved in the present invention is, for the drawbacks described above of prior art, there is provided a kind of image discriminating side Method, storage device and mobile terminal, it is intended to solve the Detection results for whether passing through dual JPEG compression to image in the prior art Difference and need to carry out artificial pretreatment to image, the problem of influenceing testing result.
The technical proposal for solving the technical problem of the invention is as follows:
A kind of image discriminating method, wherein, methods described includes:
Choose image carry out JPEG compression caused by DCT coefficient, and from DCT coefficient by zigzag orders choose before 20 AC coefficient subbands, corresponding input tensor is formed, and sequentially input according to certain organizational form to corresponding branched network In network structure;
The convolution module preset in the branching networks structure carries out convolution operation, at batch normalization to input tensor Reason, non-linearization operation and Data Dimensionality Reduction processing, and inputted after the tensor data after each branching networks result treatment are merged To sort module;
The sort module is classified the tensor data through the branching networks structure output, and is damaged using cross entropy Lose function pair classification results to be calculated, judge whether image passes through dual JPEG compression according to result of calculation.
Described image discriminating method, wherein, DCT coefficient caused by the selection image progress JPEG compression, and from 20 AC coefficient subbands before being chosen in DCT coefficient by zigzag orders, corresponding input tensor is formed, and according to certain tissue Mode, which is sequentially input into corresponding branching networks structure, also to be included:
Incised layer provides the organizational form of tensor, and is pre-created 21 and is used to divide input tensor progress data processing Branch network structure, preceding 20 branching networks structures receive preceding 20 AC coefficient subbands in DCT coefficients successively;21st branch Network structure is used for receiving total AC coefficient subbands.
Described image discriminating method, wherein, the branching networks structure specifically includes:Preceding 20 branching networks structures It is identical, and each branching networks structure is comprising 1 take absolute value module and 3 convolution modules;
1 take absolute value module and 4 convolution modules are included in 21st branching networks structure.
Described image discriminating method, wherein, convolution module in the branching networks structure includes:Convolutional layer, criticize Amount normalization layer, activation primitive layer and pond layer;
And the creation method of convolution module includes:Convolutional neural networks model is built, and it is initial with regard to model progress parameter Change;
According to the training set of predetermined ratio setting data tensor, checking collection and test set, and training set is input to In convolutional neural networks model after initialization, the model is trained and parameter learning;
In training set after training and parameter learning, checking collection is input in convolutional neural networks model and carried out Test, then preserves the test for test set by that best generation convolutional neural networks model of result, described so as to create Convolution module.
Described image discriminating method, wherein, DCT coefficient caused by the selection image progress JPEG compression, and from 20 AC coefficient subbands before being chosen in DCT coefficient by zigzag orders, corresponding input tensor is formed, and according to certain tissue Mode sequentially inputs into corresponding branching networks structure and specifically included:
Obtain and wait to determine whether the view data by dual JPEG compression, and obtained from view data and carry out JPEG DCT coefficient caused by compression;
Preceding 20 AC coefficient subbands in DCT coefficient are chosen according to zigzag orders, and form corresponding input tensor;
Input tensor is sequentially inputted to the default 1st to the 20th branching networks knot according to preceding 20 AC coefficient subbands In structure, and total preceding 20 AC coefficient subbands are inputted into default 21st branching networks structure.
Described image discriminating method, wherein, the convolution module preset in the branching networks structure is to inputting tensor Convolution operation, batch normalized, non-linearization operation and Data Dimensionality Reduction processing are carried out, and by each branching networks structure Input to sort module specifically includes after tensor data after reason merge:
The element inputted in tensor data is converted to absolute value by the module that takes absolute value in the branching networks structure;
Convolutional layer in the convolution module that the branching networks structure is pre-set carries out convolution to input tensor data Operation;
Batch normalization layer in the convolution module is using Batch Normalization mode to inputting tensor number According to progress batch normalized;
The result that activation primitive layer in the convolution module is exported using TanH function pairs last layer carries out non-thread Propertyization processing;
Pond layer in the convolution module carries out Data Dimensionality Reduction processing using the mode of down-sampling;
Tensor after each branching networks pattern handling is merged into the input of one-dimensional characteristic vector to default classification mould Block.
Described image discriminating method, wherein, the sort module is by the tensor number through the branching networks structure output According to being classified, and classification results are calculated using cross entropy loss function, judge whether image passes through according to result of calculation Dual JPEG compression is crossed to specifically include:
Full articulamentum in the sort module uses the first nerves Internet and neuron that neuron number is 30 Number is classified for 2 nervus opticus Internet to one-dimensional vector feature;The first nerves Internet connects TanH functions, institute State nervus opticus Internet connection Softmax functions;
The calculating of classification results is finally carried out using cross entropy loss function, judges whether image passes through according to result of calculation Dual JPEG compression.
Described image discriminating method, wherein, also include in the sort module:
The gradient calculation of convolutional neural networks is carried out for the purpose of minimizing loss function, the gradient is used for adjusting convolution The initialization weight of neural network model, to optimize the performance of convolutional neural networks model.
A kind of storage device, a plurality of instruction is stored thereon with, wherein, the instruction is suitable to be loaded and performed by processor, To realize the image discriminating method described in any of the above-described.
A kind of mobile terminal, it is characterised in that including:Processor, the storage device being connected with processor communication, it is described to deposit Equipment is stored up to be suitable to store a plurality of instruction;The processor is suitable to call the instruction in the storage device, is realized with execution above-mentioned Image discriminating method described in any one.
Beneficial effects of the present invention:The present invention is detected using convolutional neural networks model to image, is effectively increased Whether image passes through the detection accuracy of dual JPEG compression, so as to effectively differentiate whether image is not distorted, and without to image Pre-processed, avoid influence of the human factor to differentiation result.
Brief description of the drawings
Fig. 1 is the flow chart of the first preferred embodiment of the image discriminating method of the present invention.
Fig. 2 is the schematic diagram of 20 AC coefficient subbands before being chosen in the present invention by zigzag orders.
Fig. 3 is the flow chart of the second preferred embodiment of the image discriminating method of the present invention.
Fig. 4 is the functional schematic block diagram of the preferred embodiment of the mobile terminal of the present invention.
Embodiment
To make the objects, technical solutions and advantages of the present invention clearer, clear and definite, develop simultaneously embodiment pair referring to the drawings The present invention is further described.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and do not have to It is of the invention in limiting.
With the appearance of the emerging medium such as the fast development of mobile Internet, especially microblogging, wechat, match somebody with somebody along with various The mobile terminal of standby camera is increasingly popularized, and people are producing and contacted the digital picture of magnanimity daily.But with Adobe Photoshop, the beautiful prevalence for scheming some easily operated image editing softwares such as elegant, people can be relatively easily Image is handled or changed according to the wish of oneself, no matter unintentionally or deliberately, the appearance of these tampered images is Huge challenge is proposed to " finding be reality ", harmful effect will be produced in specific occasion, and also increase picture material can be with The risk that meaning is distorted by other people, inconvenience is brought to user.Therefore, differentiating whether picture material is tampered just seems particularly heavy Will.
In daily life, the relatively common picture format of people is typically all jpeg format, and the image of jpeg format After being distorted by other people, offender distorts vestige to cover, and the image can be saved as same form again, and this is just It is so-called " dual JPEG compression ".In other words, if detecting a certain image process " dual JPEG compression ", can recognize It is tampered with for the image.Therefore, the main purpose of the invention to be realized is exactly that image is detected, and whether judges image By dual JPEG compression, so as to judge whether image is tampered.
As shown in figure 1, Fig. 1 is the flow chart of the first preferred embodiment of the image discriminating method of the present invention.Described image Method of discrimination comprises the following steps:
Step S100, choose image and carry out DCT coefficient caused by JPEG compression, and it is suitable by zigzag from DCT coefficient 20 AC coefficient subbands before sequence is chosen, corresponding input tensor is formed, and sequentially input according to certain organizational form to corresponding Branching networks structure in.
It is preferred that the step S100 is specifically included:
Step S101, obtain and wait to judge whether the view data by dual JPEG compression, and obtained from view data Carry out DCT coefficient caused by JPEG compression;
Step S102, preceding 20 AC coefficient subbands in DCT coefficient are chosen according to zigzag orders, and it is defeated corresponding to composition Enter tensor;
Step S103, input tensor is sequentially inputted to the default 1st to 20th point according to preceding 20 AC coefficient subbands In branch network structure, and total preceding 20 AC coefficient subbands are inputted into default 21st branching networks structure.
When it is implemented, because image discriminating method of the prior art is typically all to need to pre-process image, And this pretreatment can be to image differentiation effect have a huge impact.Therefore, in order to avoid this influence, the present invention use Raw image data, using raw image data as input feature vector, the step of completely eliminated image preprocessing, improve image and sentence Other accuracy.
Further, because jpeg image is in compression, image is first separated into M individual continuous and non-overlapping copies 8 × 8 Image block, two-dimensional dct transform is carried out to each image block, obtains the DCT coefficient of 64 subbands.The then DCT systems of each subband Number is quantized corresponding quantizing factor in table and is quantified and rounded, so as to obtain quantization DCT coefficient.Respectively to DC (Direct Current) coefficient and AC (Alternating Current) coefficient carry out Differential pulse code modulation coding and Run- Length Coding, then right Carrying out entropy code can obtain jpeg image simultaneously for the two, and here it is the first compression process of jpeg image.Therefore, the present invention is straight Caused DCT coefficient when taking compression of images is obtained, and 20 AC coefficients before being chosen according to zigzag orders from DCT coefficient Subband, and corresponding input tensor is combined sequentially into, the input tensor is the feature for the image that the present invention inputs.
Specifically, as shown in Fig. 2 Fig. 2 is the signal of 20 AC coefficient subbands before being chosen in the present invention by zigzag orders Figure.Because image has been divided into 8 × 8 image blocks in compression, and each image block carries out two-dimensional dct transform, obtains 64 The DCT coefficient of subband.20 AC coefficient subbands before being chosen in the present invention according to zigzag orders, in Fig. 2 shown in the direction of arrow i.e. For the direction of ziazag orders.It is preferred that it 1 is DC coefficients that numbering, which is, in figure, and therefore, preceding 20 AC coefficients selected by the present invention Subband is exactly from numbering 2 to numbering 21.
It is preferred that the incised layer of the present invention provides the organizational form of tensor, and several branching networks mechanisms are pre-established, The number of the branching networks mechanism is 21.And first 20 in branching networks structure are used for receiving in DCT coefficient successively Preceding 20 AC coefficient subbands;And the 21st branching networks structure is used for receiving 20 total AC coefficient subbands.That is, Input tensor corresponding to 20 AC coefficient subbands is once inputted into preceding 20 branching networks structures, and total AC coefficients Band is into the 21st branching networks structure.Because jpeg image is to carry out dct transform with nonoverlapping 8 × 8 image block, therefore So that the size of input picture is 256 × 256 as an example, the DCT coefficient dimension of every subband is 32 × 32 (256/8 × 256/8), Thus total input tensor dimension is 32 × 32 × 20.Certainly, the number of branch's neural network structure can increase according to demand Or reduce, but this should all belong to protection scope of the present invention.
Further, preceding 20 branching networks structures are identical, and each branching networks structure takes definitely comprising 1 It is worth module and 3 convolution modules;1 take absolute value module and 4 convolution modules are included in 21st branching networks structure. The absolute value block is used for being converted to non-negative numerical value to the element in input tensor, and the convolution module is used for inputting tensor Carry out data processing.
Convolution module in the branching networks structure includes:Convolutional layer, batch normalization layer, activation primitive layer and Pond layer.Of the present invention is image to be judged whether by dual JPEG compression using convolutional neural networks, because This needs to pre-establish the convolution module.First, convolutional neural networks model is built, and it is initial with regard to model progress parameter Change.Specifically, the convolution kernel in convolutional layer is carried out initially using the random numbers of Gaussian distribution that average is 0, standard deviation is 0.1 is obeyed Change, bias term is initialized using section is obeyed for the uniform random number of [0,1], and is initialized, bias term initialization For full null value.The initiation parameter of the convolutional layer is as shown in table 1, and table 1 sets for the initiation parameter of the convolution module of the present invention Put.
Table 1
Due to having 3 convolution modules in first to the 20th branching networks structure, and as can be seen from Table 1 each Convolution kernel size and output characteristic figure number in convolution module is different.And there are 4 in the 21st branching networks structure Convolution module, and each convolution kernel size and output characteristic figure number are also different.The parameter of the convolution kernel of the convolutional layer can Set with autonomous according to demand.
Then, it is and training set is defeated according to the training set of predetermined ratio setting data tensor, checking collection and test set Enter in the convolutional neural networks model to after initialization, the model is trained and parameter learning.It is preferred that set all Data iterations was 80 generations, per data set whole random permutation before generation training;By training set training and parameter learning Afterwards, checking collection being input in convolutional neural networks model and learnt, learning rate is initialized as 0.05, and with every 20 generation Decay 70%.And after the training in 40 generations, all carry out verifying the test of collection per a generation., will batch when carrying out model training Normalization layer momentum τ is arranged to 0.999, and constant ξ is arranged to 0.01.Then by that best generation convolutional neural networks mould of result Type preserves the test for test set, so as to create the convolution module.
Step S200, the convolution module preset in branching networks structure carries out convolution operation to input tensor, returned in batches One change processing, non-linearization operation and Data Dimensionality Reduction processing, and the tensor data after each branching networks pattern handling are merged After input to default sort module.
It is preferred that the step S200 is specifically included:
Step S201, the module that takes absolute value in described branching networks structure is converted to the element inputted in tensor data Absolute value;
Step S202, the convolutional layer in the convolution module that described branching networks structure is pre-set is to inputting tensor data Carry out convolution operation;
Step S203, the batch normalization layer in described convolution module uses Batch Normalization mode pair Input tensor data and carry out batch normalized;
Step S204, the activation primitive layer in described convolution module uses the result that TanH function pairs last layer exports Carry out non-linearization processing;
Step S205, the pond layer in described convolution module carries out Data Dimensionality Reduction processing using the mode of down-sampling;
Step S206, the tensor after each branching networks pattern handling is merged into input to default sort module.
When it is implemented, in the branching networks structure take absolute value module and convolution module is entered to the tensor of input The corresponding processing of row.Specifically, the convolutional layer in the convolution module carries out convolution operation, batch normalization layer (Batch Normalization, write a Chinese character in simplified form into BN) carried out in the small batch of each training of convolutional neural networks model at batch normalization Reason.The result that activation primitive layer is exported using TanH function pairs last layer carries out non-linearization processing;Under the layer use of pond The mode of sampling carries out Data Dimensionality Reduction processing;And by the tensor data through 21 branching networks structure outputs successively it is end to end into One-dimensional vector feature is simultaneously inputted to sort module.What deserves to be explained is activation primitive used in the present invention can be replaced Change, but should also belong to protection scope of the present invention after should be noted that replacement activation primitive.
Specifically, the function formula of the batch normalization layer (BN) in the present invention is:
WhereinRepresent each characteristic pattern in the convolution module of output.Specifically,
The batch normalization layer carries out batch normalized using above-mentioned formula to input tensor data.
Step S300, sort module is classified the tensor data through the branching networks structure output, and uses friendship Fork entropy loss function pair classification results are calculated, and judge whether image passes through dual JPEG compression according to result of calculation.
It is preferred that the step S300 is specifically included:
Step S301, full articulamentum in described sort module using the first nerves Internet that neuron number is 30 and The nervus opticus Internet that neuron number is 2 is classified to one-dimensional vector feature;The first nerves Internet connection TanH functions, the nervus opticus Internet connect Softmax functions;
Step S302, the calculating of classification results is finally carried out using cross entropy loss function, judges to scheme according to result of calculation It seem the dual JPEG compression of no process.
When it is implemented, the full articulamentum uses the first nerves Internet and that neuron number is respectively 30 and 2 Two neural net layers are classified to one-dimensional vector feature, and first nerves Internet connection TanH functions, and described second Neural net layer connects Softmax functions.It is preferred that the TanH function formulas are:
Wherein x represents the one-dimensional characteristic vector of input.
The Softmax function formulas are:
N=1,2 ..., c.
The calculating of classification results is finally carried out using cross entropy loss function, judges whether image passes through according to result of calculation Dual JPEG compression, so as to judge whether picture material is tampered.Further, in the present invention, the intersection entropy loss letter Number is specially:
It is preferred that the gradient of convolutional neural networks need to be carried out for the purpose of minimizing loss function in the sort module Calculate, the gradient is used for adjusting the initialization weight of convolutional neural networks model, to optimize the property of convolutional neural networks model Energy.
In order to be better understood from technical scheme, the invention also discloses another embodiment, as shown in figure 3, Fig. 3 is the flow chart of the second preferred embodiment of the image discriminating method of the present invention.
By being so that the size of input picture is 256 × 256 as an example in Fig. 2.Because jpeg image is with nonoverlapping 8 × 8 Image block carries out dct transform, and the DCT coefficient dimension of every subband is 32 × 32 (256/8 × 256/8), thus total input Tensor dimension is 32 × 32 × 20.
Incised layer provides the organizational form of tensor, and is pre-created 21 and is used to divide input tensor progress data processing Branch network structure, preceding 20 branching networks structures receive preceding 20 AC coefficient subbands in DCT coefficients successively;21st branch Network structure is used for receiving total AC coefficient subbands.20 AC coefficient subbands are inputted to branch according to certain organizational form In, specifically, preceding 20 AC coefficient subbands are sequentially input to branch #1 to branch #20, by total AC coefficient subbands input to point Branch #21.Afterwards every take absolute value module and the tensor data progress data processing to input respectively of convolution block in branch. Specifically, the convolutional layer in convolution block carries out convolution operation, batch normalization layer (Batch Normalization) in convolution god Batch normalized is carried out in the small batch of each training through network model.Activation primitive layer uses in TanH function pairs one The result of layer output carries out non-linearization processing;Pond layer carries out Data Dimensionality Reduction processing using the mode of down-sampling;And will Tensor data through 21 branching networks structure outputs are end to end successively into one-dimensional vector feature and to be inputted to full articulamentum.Entirely Articulamentum using neuron number be respectively 30 and 2 first nerves Internet and nervus opticus Internet to the number after merging According to being classified, and first nerves Internet connection TanH functions, the nervus opticus Internet connect Softmax letters Number.Last output category label, judges whether image passes through dual JPEG compression, so as to judge in image according to tag along sort Whether appearance is tampered.
The present invention has compared with prior art more accurately differentiates result, specifically as shown in table 2 and table 3, table 2 be differentiation result of the invention, and table 3 is the differentiation result of prior art.
Table 2
Table 3
As can be seen here, the present invention is analyzed and judged to raw image data using convolutional neural networks model, so as to Judge whether image passes through dual JPEG compression, for traditional method, present invention, avoiding the shadow of human factor Ring, judge that effect is more preferable, provide the user conveniently.
Certainly, the present invention except applied to resolution image be a jpeg compressed image or dual jpeg compressed image it Outside, it is possibility to have effect differentiates uncompressed image (Uncompressed images) and decompressing image (Decompressed images)。
Based on above-described embodiment, the invention also discloses a kind of mobile terminal.As Fig. 4 shows, including:Processor (processor) storage device (memory) 20 10, being connected with processor;Wherein, the processor 10 is described for calling Programmed instruction in storage device 20, to perform the method that above-described embodiment is provided, such as perform:
Step S100, choose image and carry out DCT coefficient caused by JPEG compression, and it is suitable by zigzag from DCT coefficient 20 AC coefficient subbands before sequence is chosen, corresponding input tensor is formed, and sequentially input according to certain organizational form to corresponding Branching networks structure in;
Step S200, the convolution module preset in described branching networks structure carries out convolution operation to input tensor, criticized Normalized, non-linearization operation and Data Dimensionality Reduction processing are measured, and by the tensor data after each branching networks result treatment Inputted after merging to default sort module;
Step S300, described sort module is classified the tensor data through the branching networks structure output, and is made Classification results are calculated with cross entropy loss function, judge whether image passes through dual JPEG compression according to result of calculation.
The embodiment of the present invention also provides a kind of storage device, and computer instruction, the calculating are stored in the storage device Machine instruction makes computer perform the method that the various embodiments described above are provided.
In summary, a kind of image discriminating method, storage device and mobile terminal provided by the invention, method include:Choosing Image is taken to carry out DCT coefficient caused by JPEG compression, and by 20 AC coefficients before the selection of zigzag orders from DCT coefficients Subband, corresponding input tensor is formed, and sequentially input according to certain organizational form into corresponding branching networks structure;Institute State the convolution module that is preset in branching networks structure and convolution operation, batch normalized, non-linear is carried out to input tensor Change operation and Data Dimensionality Reduction processing, and inputted after the tensor data after each branching networks result treatment are merged to default point Generic module;The sort module is classified the tensor data through the branching networks structure output, and is damaged using cross entropy Lose function pair classification results to be calculated, judge whether image passes through dual JPEG compression according to result of calculation.The present invention uses Convolutional neural networks model detects to image, whether accurate by the detection of dual JPEG compression effectively increases image Property, so as to effectively differentiate whether image is not distorted, and without being pre-processed to image, human factor is avoided to differentiating result Influence.
It should be appreciated that the application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can To be improved or converted according to the above description, all these modifications and variations should all belong to the guarantor of appended claims of the present invention Protect scope.

Claims (10)

1. a kind of image discriminating method, it is characterised in that methods described includes:
Choose image and carry out DCT coefficient caused by JPEG compression, and by 20 AC before the selection of zigzag orders from DCT coefficient Coefficient subband, corresponding input tensor is formed, and sequentially input according to certain organizational form to corresponding branching networks structure In;
The convolution module preset in the branching networks structure to input tensor carry out convolution operation, batch normalized, Non-linearization operation and Data Dimensionality Reduction processing, and input after the tensor data after each branching networks result treatment are merged and extremely divide Generic module;
The sort module is classified the tensor data through the branching networks structure output, and uses intersection entropy loss letter It is several that classification results are calculated, judge whether image passes through dual JPEG compression according to result of calculation.
2. image discriminating method according to claim 1, it is characterised in that the selection image carries out production during JPEG compression Raw DCT coefficient, and corresponding input tensor is formed by 20 AC coefficient subbands before the selection of zigzag orders from DCT coefficient, And also include before being sequentially input according to certain organizational form into corresponding branching networks structure:
Incised layer provides the organizational form of tensor, and is pre-created 21 branched networks for being used to carry out input tensor data processing Network structure, preceding 20 branching networks structures receive preceding 20 AC coefficient subbands in DCT coefficient successively;21st branching networks knot Structure is used for receiving total AC coefficient subbands.
3. image discriminating method according to claim 2, it is characterised in that the branching networks structure specifically includes:Before 20 branching networks structures are identical, and each branching networks structure is comprising 1 take absolute value module and 3 convolution moulds Block;
1 take absolute value module and 4 convolution modules are included in 21st branching networks structure.
4. image discriminating method according to claim 1, it is characterised in that the convolution module in the branching networks structure Include:Convolutional layer, batch normalization layer, activation primitive layer and pond layer;
And the creation method of convolution module includes:Convolutional neural networks model is built, and parameter initialization is carried out with regard to the model;
According to the training set of predetermined ratio setting data tensor, checking collection and test set, and training set is input to initially In convolutional neural networks model after change, the model is trained and parameter learning;
In training set after training and parameter learning, checking collection is input in convolutional neural networks model and surveyed Examination, then preserves the test for test set, so as to create the volume by that best generation convolutional neural networks model of result Volume module.
5. image discriminating method according to claim 1, it is characterised in that the selection image carries out production during JPEG compression Raw DCT coefficient, and corresponding input tensor is formed by 20 AC coefficient subbands before the selection of zigzag orders from DCT coefficient, And sequentially input into corresponding branching networks structure and specifically include according to certain organizational form:
Obtain and wait to judge whether the view data by dual JPEG compression, and produced from view data during acquisition JPEG compression DCT coefficient;
Preceding 20 AC coefficient subbands in DCT coefficient are chosen according to zigzag orders, and form corresponding input tensor;
Input tensor is sequentially inputted in the default 1st to the 20th branching networks structure according to preceding 20 AC coefficient subbands, And total preceding 20 AC coefficient subbands are inputted into default 21st branching networks structure.
6. image discriminating method according to claim 1, it is characterised in that the volume preset in the branching networks structure Volume module carries out convolution operation, batch normalized, non-linearization operation and Data Dimensionality Reduction to input tensor and handled, and will Input to sort module specifically includes after tensor data after each branching networks pattern handling merge:
The element inputted in tensor data is converted to absolute value by the module that takes absolute value in the branching networks structure;
Convolutional layer in the convolution module that the branching networks structure is pre-set carries out convolution operation to input tensor data;
Batch normalization layer in the convolution module is entered using Batch Normalization mode to input tensor data Row batch normalized;
The result that activation primitive layer in the convolution module is exported using TanH function pairs last layer carries out non-linearization Processing;
Pond layer in the convolution module carries out Data Dimensionality Reduction processing using the mode of down-sampling;
Tensor after each branching networks pattern handling is merged into one-dimensional vector feature to input to default sort module.
7. image discriminating method according to claim 1, it is characterised in that the sort module will be through the branching networks The tensor data of structure output are classified, and classification results are calculated using cross entropy loss function, are tied according to calculating Fruit judges whether image specifically includes by dual JPEG compression:
The first nerves Internet and neuron number that full articulamentum in the sort module is 30 using neuron number are 2 Nervus opticus Internet one-dimensional vector feature is classified;The first nerves Internet connects TanH functions, and described the Two neural net layers connect Softmax functions;
The calculating of classification results is finally carried out using cross entropy loss function, judges image whether by dual according to result of calculation JPEG compression.
8. image discriminating method according to claim 7, it is characterised in that also include in the sort module:
The gradient calculation of convolutional neural networks is carried out for the purpose of minimizing loss function, the gradient is used for adjusting convolutional Neural The initialization weight of network model, to optimize the performance of convolutional neural networks model.
9. a kind of storage device, it is stored thereon with a plurality of instruction, it is characterised in that the instruction is suitable to be loaded and held by processor OK, to realize the image discriminating method described in the claims any one of 1-8.
A kind of 10. mobile terminal, it is characterised in that including:Processor, the storage device being connected with processor communication, it is described to deposit Equipment is stored up to be suitable to store a plurality of instruction;The processor is suitable to call the instruction in the storage device, is realized with execution above-mentioned Image discriminating method described in claim any one of 1-8.
CN201710909494.9A 2017-09-29 2017-09-29 Image distinguishing method, storage device and mobile terminal Active CN107679572B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710909494.9A CN107679572B (en) 2017-09-29 2017-09-29 Image distinguishing method, storage device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710909494.9A CN107679572B (en) 2017-09-29 2017-09-29 Image distinguishing method, storage device and mobile terminal

Publications (2)

Publication Number Publication Date
CN107679572A true CN107679572A (en) 2018-02-09
CN107679572B CN107679572B (en) 2021-05-04

Family

ID=61138668

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710909494.9A Active CN107679572B (en) 2017-09-29 2017-09-29 Image distinguishing method, storage device and mobile terminal

Country Status (1)

Country Link
CN (1) CN107679572B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108257115A (en) * 2018-04-13 2018-07-06 中山大学 Image enhancement detection method and system based on orientation consistency convolutional neural networks
CN109035297A (en) * 2018-07-19 2018-12-18 深圳市唯特视科技有限公司 A kind of real-time tracing method based on dual Siam's network
CN109829907A (en) * 2019-01-31 2019-05-31 浙江工业大学 A kind of metal shaft surface defect recognition method based on deep learning
CN110288049A (en) * 2019-07-02 2019-09-27 北京字节跳动网络技术有限公司 Method and apparatus for generating image recognition model
CN111415323A (en) * 2019-01-04 2020-07-14 阿里巴巴集团控股有限公司 Image detection method and device and neural network training method and device
CN112184640A (en) * 2020-09-15 2021-01-05 中保车服科技服务股份有限公司 Image detection model construction method and device and image detection method and device
CN112241679A (en) * 2020-09-14 2021-01-19 浙江理工大学 Automatic garbage classification method
WO2021097675A1 (en) * 2019-11-19 2021-05-27 中国科学院深圳先进技术研究院 Smart diagnosis assistance method and terminal based on medical images
CN116347080A (en) * 2023-03-27 2023-06-27 任红梅 Intelligent algorithm application system and method based on downsampling processing

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2390251A (en) * 2002-06-27 2003-12-31 Univ Bristol Detecting and characterising attacks on a watermarked digital object
US20090067736A1 (en) * 2004-11-12 2009-03-12 Open Invention Network, Llc Enhanced Image Compression Utilizing Hilbert Curve Scanning of Quantized Discrete Cosine Transform Coefficients
CN102521606A (en) * 2011-11-29 2012-06-27 中南大学 Method for classifying pixel blocks of JPEG images and image falsification detecting and falsified area positioning methods based on same
CN105046680A (en) * 2015-03-03 2015-11-11 李鋆路 Video image authentication PS (photoshop) processing analysis technique
CN106960435A (en) * 2017-03-15 2017-07-18 华中师范大学 A kind of double compression automatic testing methods of jpeg image

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2390251A (en) * 2002-06-27 2003-12-31 Univ Bristol Detecting and characterising attacks on a watermarked digital object
US20090067736A1 (en) * 2004-11-12 2009-03-12 Open Invention Network, Llc Enhanced Image Compression Utilizing Hilbert Curve Scanning of Quantized Discrete Cosine Transform Coefficients
CN102521606A (en) * 2011-11-29 2012-06-27 中南大学 Method for classifying pixel blocks of JPEG images and image falsification detecting and falsified area positioning methods based on same
CN105046680A (en) * 2015-03-03 2015-11-11 李鋆路 Video image authentication PS (photoshop) processing analysis technique
CN106960435A (en) * 2017-03-15 2017-07-18 华中师范大学 A kind of double compression automatic testing methods of jpeg image

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
BIN LI等: ""Detecting Doubly Compressed JPEG Images by"", 《IEEE》 *
IRENE AMERINI.ET AL: ""Localization of JPEG double compression"", 《ARXIV:1706.01788V1》 *
LI, HD (LI, HAODONG).ET AL: ""Anti-forensics of double JPEG compression with the same quantization matrix"", 《WEB OF SCIENCE》 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108257115A (en) * 2018-04-13 2018-07-06 中山大学 Image enhancement detection method and system based on orientation consistency convolutional neural networks
CN109035297A (en) * 2018-07-19 2018-12-18 深圳市唯特视科技有限公司 A kind of real-time tracing method based on dual Siam's network
CN111415323B (en) * 2019-01-04 2022-05-27 阿里巴巴集团控股有限公司 Image detection method and device and neural network training method and device
CN111415323A (en) * 2019-01-04 2020-07-14 阿里巴巴集团控股有限公司 Image detection method and device and neural network training method and device
CN109829907A (en) * 2019-01-31 2019-05-31 浙江工业大学 A kind of metal shaft surface defect recognition method based on deep learning
CN110288049A (en) * 2019-07-02 2019-09-27 北京字节跳动网络技术有限公司 Method and apparatus for generating image recognition model
CN110288049B (en) * 2019-07-02 2022-05-24 北京字节跳动网络技术有限公司 Method and apparatus for generating image recognition model
WO2021097675A1 (en) * 2019-11-19 2021-05-27 中国科学院深圳先进技术研究院 Smart diagnosis assistance method and terminal based on medical images
CN112241679A (en) * 2020-09-14 2021-01-19 浙江理工大学 Automatic garbage classification method
CN112241679B (en) * 2020-09-14 2024-02-20 浙江理工大学 Automatic garbage classification method
CN112184640A (en) * 2020-09-15 2021-01-05 中保车服科技服务股份有限公司 Image detection model construction method and device and image detection method and device
CN116347080A (en) * 2023-03-27 2023-06-27 任红梅 Intelligent algorithm application system and method based on downsampling processing
CN116347080B (en) * 2023-03-27 2023-10-31 苏州利博特信息科技有限公司 Intelligent algorithm application system and method based on downsampling processing

Also Published As

Publication number Publication date
CN107679572B (en) 2021-05-04

Similar Documents

Publication Publication Date Title
CN107679572A (en) A kind of image discriminating method, storage device and mobile terminal
Wang et al. A novel image classification approach via dense‐MobileNet models
Wan et al. Regularization of neural networks using dropconnect
CN109063666A (en) The lightweight face identification method and system of convolution are separated based on depth
CN108717568A (en) A kind of image characteristics extraction and training method based on Three dimensional convolution neural network
CN107506740A (en) A kind of Human bodys' response method based on Three dimensional convolution neutral net and transfer learning model
CN110188768A (en) Realtime graphic semantic segmentation method and system
Kadam et al. [Retracted] Efficient Approach towards Detection and Identification of Copy Move and Image Splicing Forgeries Using Mask R‐CNN with MobileNet V1
US11216913B2 (en) Convolutional neural network processor, image processing method and electronic device
CN110309835A (en) A kind of image local feature extracting method and device
CN112818764A (en) Low-resolution image facial expression recognition method based on feature reconstruction model
Zou et al. High speed deep networks based on discrete cosine transformation
Yapıcı et al. Performance comparison of convolutional neural network models on GPU
CN114898157A (en) Global learning device and method for hyperspectral image classification
Pintelas et al. A multi-view-CNN framework for deep representation learning in image classification
He et al. Classification of metro facilities with deep neural networks
CN109934281B (en) Unsupervised training method of two-class network
CN116109868A (en) Image classification model construction and small sample image classification method based on lightweight neural network
Li et al. A spectral clustering based filter-level pruning method for convolutional neural networks
Chen et al. Local patch vectors encoded by fisher vectors for image classification
Reddy et al. Effect of image colourspace on performance of convolution neural networks
Liu Comparison of different Convolutional Neural Network models on Fruit 360 Dataset
CN113688715A (en) Facial expression recognition method and system
Xu et al. Deep fisher score representation via sparse coding
Keshavarz A FPGA implementation of neural/wavelet face detection system

Legal Events

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