CN112788331B - Video recompression detection method, terminal equipment and storage medium - Google Patents

Video recompression detection method, terminal equipment and storage medium Download PDF

Info

Publication number
CN112788331B
CN112788331B CN202011619108.0A CN202011619108A CN112788331B CN 112788331 B CN112788331 B CN 112788331B CN 202011619108 A CN202011619108 A CN 202011619108A CN 112788331 B CN112788331 B CN 112788331B
Authority
CN
China
Prior art keywords
video
data set
recompression
detection
training
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011619108.0A
Other languages
Chinese (zh)
Other versions
CN112788331A (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 CN202011619108.0A priority Critical patent/CN112788331B/en
Publication of CN112788331A publication Critical patent/CN112788331A/en
Application granted granted Critical
Publication of CN112788331B publication Critical patent/CN112788331B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/004Diagnosis, testing or measuring for television systems or their details for digital television systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/75Clustering; Classification
    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression

Abstract

The invention discloses a video recompression detection method, terminal equipment and a storage medium, wherein the video recompression detection method comprises the following steps: acquiring a video data set; decoding the video data set to obtain a video frame sequence of a training data set and a test data set; extracting statistical features of the video frame sequences of the training data set and the test data set according to the video frame sequences of the training data set and the test data set; training a video recompression detection classifier according to the statistical characteristics of the video frame sequence of the training data set to obtain a video recompression detection model; and performing video recompression detection on the statistical characteristics of the video frame sequence of the test data set according to the video recompression detection model. The method and the device train the video recompression detection model through the training data set, carry out recompression detection on the test data set, finally distinguish the recompressed video and the single-time compressed video without excessively depending on the data set label, and improve the robustness of the detector.

Description

Video recompression detection method, terminal device and storage medium
Technical Field
The invention relates to the technical field of video processing, in particular to a video recompression detection method and device.
Background
Video compression is a branch of the video processing technology field, and utilizes the characteristic that a human sensory system is insensitive to redundant information to remove the redundancy in space, time or frequency and ensure the minimum distortion caused in the compression process. In addition, video compression enables people to use transmission and storage resources more efficiently.
With the changing and diversification of video editing means, the threshold of video tampering is greatly reduced, and a tamperer can tamper with the video without any professional knowledge. However, this approach (technique) is highly susceptible to illegal activities by lawbreakers, which makes it increasingly necessary to develop methods for detecting and identifying video tampering.
Since most of the current surveillance videos have a built-in video compression function, the videos extracted from the surveillance videos are all videos subjected to single compression. Tampering with these videos necessarily goes through a recompression process. Therefore, video recompression detection becomes a very effective technique in the field of video forensics.
However, existing video recompression detection is based on a method of fully supervised learning, the dependency on the label of a data set is very high, and classification is performed under the condition of a known tampering means, so that the obtained detector is often not high in robustness. In reality, it is often difficult for the detector to know the tampering means and the compression mode for tampering the video.
Thus, there is still a need for improvement and development of the prior art.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method and an apparatus for detecting video recompression, aiming at solving the excessive dependence of the traditional video recompression detection model on the data set label in the prior art and improving the robustness of the detector.
In order to solve the technical problems, the technical scheme of the invention is as follows:
in a first aspect, an embodiment of the present invention provides a video recompression detection method, where the video recompression detection method includes:
acquiring a video data set;
decoding the video data set to obtain a video frame sequence of a training data set and a test data set;
extracting statistical features of the video frame sequences of the training data set and the test data set according to the video frame sequences of the training data set and the test data set;
training a video recompression detection classifier on the statistical characteristics of the video frame sequence of the training data set to generate a video recompression detection model;
and performing video recompression detection on the statistical characteristics of the video frame sequence of the test data set according to the video recompression detection model.
In one implementation, the decoding the video data set to obtain the video frame sequence of the training data set and the test data set specifically includes:
dividing the video data set into a training data set and a testing data set;
decoding, using a video decoder, based on the training dataset and the test dataset to obtain a sequence of video frames for color images of the training dataset and the test dataset;
and converting the video frame sequence of the color image into a video frame sequence of a gray image.
In one implementation, the training data set is a data set formed by randomly selecting 50% of single-compressed videos from the video data set, and the test data set is a data set formed by selecting the remaining 50% of single-compressed videos and corresponding re-compressed videos from the video data set, where the training data set and the test data set have no repeated videos, and the single-compressed videos and the re-compressed videos exist in pairs.
In one implementation, the specific formula for converting the video frame sequence of the color image into the video frame sequence of the grayscale image is as follows:
Gray=R×0.299+G×0.587+B×0.114
r, G, B are the three channel color values of the pixel points of the single color image in the video frame sequence of the color image, Gray is the Gray value of the pixel points of the video frame sequence converted into the Gray image, and the Gray value range of the pixel points is [0, 255 ].
In an implementation manner, the extracting the statistical characteristics of the sequence of video frames of the training data set and the test data set according to the sequence of video frames of the training data set and the test data set specifically includes:
and a feature extractor based on steganalysis, wherein the feature extractor respectively extracts the dimension-reduced statistical features from the video frame sequences of the training data set and the test data set by calculating the difference value of adjacent pixels.
In one implementation, the training a video recompression detection classifier using the statistical features of the sequence of video frames of the training data set to generate a video recompression detection model specifically includes:
normalizing statistical features of a sequence of video frames of the training data set;
iteratively training the video recompression detection classifier according to the normalized statistical characteristics of the video frame sequence of the training data set to generate the video recompression detection model, wherein the video recompression detection classifier is a single classifier based on Gaussian distribution.
In one implementation, the video recompression detection of the statistical features of the sequence of video frames of the test data set according to the video recompression detection model includes:
normalizing statistical features of a sequence of video frames of the test data set;
and according to the video recompression detection model, carrying out video recompression detection on the statistical characteristics of the video frame sequence of the standardized test data set.
And determining the classification results of the single compressed video and the recompressed video of the test data set according to the video recompression detection, and acquiring corresponding accuracy.
In one implementation, the video recompression detection method further includes a video recompression integration classification detection method: and dividing the video data set into a plurality of groups of sub data sets with equal quantity according to a clustering method, respectively training corresponding sub Gaussian single classifier models, detecting the video to be detected through the obtained plurality of groups of sub Gaussian single classifier models, and fusing all generated detection results to obtain a final video recompression detection result.
In a second aspect, an embodiment of the present invention further provides a terminal device, where the terminal device includes a memory, a processor, and a video recompression detection program that is stored in the memory and is executable on the processor, and when the processor executes the video recompression detection program, the steps of the video recompression detection method in any of the above schemes are implemented.
In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a video recompression detection program is stored on the computer-readable storage medium, and when the video recompression detection program is executed by a processor, the steps of the video recompression detection method in any of the above schemes are implemented.
Has the advantages that: according to the method, the acquired video data set is divided into the training data set and the testing data set, the feature extractor of the steganography analysis is used for extracting the features of the data frames of the training data set and the testing data set, the re-compression detection model is trained by using the training data set, so that the re-compression detection is carried out on the testing data set, and then the re-compression video and the single-time compression video are distinguished.
Drawings
Fig. 1 is an exemplary diagram of a training phase of a video recompression integrated classification detection method according to an embodiment of the present invention.
Fig. 2 is an exemplary diagram of a detection stage of a video recompression integration classification detection method according to an embodiment of the present invention.
Fig. 3 is an overall flowchart of a video recompression detection method according to an embodiment of the present invention.
Fig. 4 is a flowchart of a video frame sequence obtained by a video recompression detection method according to an embodiment of the present invention.
Fig. 5 is a flowchart of generating a video recompression detection model according to a video recompression detection method provided by an embodiment of the present invention.
Fig. 6 is a flowchart of determining a single compressed video and a recompressed video of a test data set according to an embodiment of the present invention.
Fig. 7 is a schematic block diagram of an internal structure of a terminal device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and effects of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
Video compression is a branch of the video processing technology field, and utilizes the characteristic that a human sensory system is insensitive to redundant information to remove the redundancy in space, time or frequency and ensure the minimum distortion caused in the compression process. In addition, video compression enables people to use transmission and storage resources more efficiently.
With the video editing means becoming more and more diversified, the threshold of video tampering is greatly reduced, and a tamperer can achieve video tampering even without any professional knowledge. However, this approach (technique) is highly susceptible to illegal activities by lawbreakers, which makes it increasingly necessary to develop methods for detecting and identifying video tampering. Since most of the current surveillance videos have a built-in video compression function, the videos extracted from the surveillance videos are all videos subjected to single compression. Tampering with these videos necessarily goes through a recompression process. Therefore, video recompression detection becomes a very effective technique in the field of video forensics.
However, existing video recompression detection is based on a method of fully supervised learning, the dependency on a data set label is very high, and classification is performed under the condition of a known tampering means, so that the obtained detector is often not high in robustness. In reality, it is often difficult for the detector to know the tampering means and the compression mode for tampering the video.
In order to solve the problems in the prior art, the present embodiment provides a video recompression detection method, a terminal device and a storage medium. The method comprises the steps of firstly, obtaining an original video data set from the existing data set, dividing the video data set into a training data set and a testing data set, wherein the training data set comprises a data set of a single compressed video for training, the testing data set comprises a mixed video data set of the single compressed video for testing and a corresponding recompressed video, then, decoding the video data set into a video frame sequence by using a video decoder, carrying out image processing on the video frame sequence through an algorithm, extracting statistical characteristics from the video frame sequence after the image processing to respectively obtain the statistical characteristics of the video frame sequence of the training data set and the testing data set, training a video recompression detection classifier according to the algorithm by using the statistical characteristics of the video frame sequence of the training data set to obtain a video recompression detection model, and detecting the statistical characteristics of the video frame sequence of the testing data set according to the algorithm by using the video recompression detection model, therefore, the recompressed video and the single-time compressed video in the test data set are distinguished, further, the video data set can be divided into multiple groups for detection, multiple groups of recompressed detection models are trained through the method, multiple groups of detection results are obtained, and then the multiple groups of detection results are fused to obtain the final detection result. By the method, the aim of realizing more efficient and robust video recompression detection can be realized only by adopting the target class data set.
For example, in real life, various software can be used to watch videos, many videos are original, but for commercial or other reasons, these original videos are artificially modified, for example, moving objects in the videos are added, deleted, and shifted, so that the original videos become tampered videos, therefore, the present invention adopts a video detection method of semi-supervised learning to distinguish the video categories, and in the video identification technology of the present invention, the video classification is determined by detecting the state of the video being compressed, that is, detecting that if the video is a single-time compressed video, the video is the original video, and if the video is a heavy compressed video, the video is the tampered video. When the method is applied, firstly, a video data set is required to be obtained, the video data set can be obtained from the existing data set established by other mechanisms, the obtained video data set is divided into a training data set and a testing data set after being processed, the training data set comprises a data set of single-time compressed video for training, the testing data set comprises a mixed video data set of single-time compressed video for testing and recompressed video, then, the whole video data set is not directly detected, in practical situations, a falsifier does not directly falsifie a video code stream of the original video, the direct falsification is very likely to cause the video content to be completely damaged, therefore, the falsifier firstly decodes the video to obtain a video frame sequence, then performs falsification operation on a target object on the video frame sequence, and finally recompresses the video frame sequence into the video, in the tampering process, the video is decompressed and recompressed, and according to the tampering track of a tampering person, the present invention also needs to decode the obtained video data set into a video frame sequence by using a video decoder and perform image processing, then extract the statistical characteristics of the video frame sequence of the training data set and the test data set respectively according to an algorithm, train according to the algorithm by using the statistical characteristics of the video frame sequence of the training data set to obtain a recompression detection model, detect the statistical characteristics of the video frame sequence of the test data set according to the algorithm by using the recompression model, so that a single-time compressed video and a recompressed video in the test data set can be distinguished according to the detection result, that is, the original video and the tampered video are found out, for further more accurate detection, as shown in fig. 1 and fig. 2, the obtained video data sets can be grouped according to the above method to obtain a plurality of groups of detection results, and then fusing the obtained multiple groups of detection results to obtain integrated and classified detection results, and detecting the single-compression video and the recompressed video more accurately and rapidly according to the integrated and classified detection results.
Exemplary method
The video recompression detection method provided by the embodiment can be applied to an intelligent terminal, and specifically as shown in fig. 3, the method includes the following steps:
and S100, acquiring a video data set.
When the method is applied, a video data set needs to be acquired, various channels for acquiring the video data set are provided, such as an open source video data set shared by individual users, a video data set established by each organization and the like, application scenes of the video data set are also various, such as shopping malls, commercial activities and the like, and the video data set can be selected and the proportional relation between a training data set and a testing data set of the video data set can be adjusted according to actual requirements. The invention preferably screens video data from a SYSU-OBJFORG video data set, and screens 100 single-compression videos and 100 recompression videos, each video having a time length of about 11 seconds, wherein original video fragments are extracted from several static commercial monitoring cameras.
Step S200, decoding the video data set to obtain a video frame sequence of a training data set and a testing data set.
After the video data set is obtained, the obtained video data set is processed and then divided into a training data set and a testing data set, and a video decoder is used for decoding the video data set to respectively obtain a video frame sequence of the training data set and the testing data set.
In one implementation, as shown in fig. 4, the step S200 specifically includes:
s201, dividing the video data set into the training data set and the testing data set;
s202, decoding by using a video decoder based on the training data set and the test data set to obtain a video frame sequence of color images of the training data set and the test data set;
s203, converting the video frame sequence of the color image into a video frame sequence of a gray image.
In specific implementation, the obtained video data sets are classified and divided into a training data set and a test data set, the data set of 50% of single-time compressed videos is randomly selected from the video data set to form the training data set for training, then the remaining 50% of single-time compressed videos and corresponding re-compressed videos are selected from the video data set to form the test data set for testing, the training data set and the test data set have no repeated videos, and the single-time compressed videos and the re-compressed videos exist in pairs.
The invention detects a video frame sequence, therefore, a video decoder is needed to be used for decoding a training data set and a test data set into an image frame sequence, wherein the video decoder used by the invention is preferably the video decoder in JM19.0 software, the JM software is official reference software approved by an H.264 standard formulation team, all characteristics of the H.264 standard are basically realized, and the latest version of the JM19.0 is currently adopted. The image frame sequence in this case is a video frame sequence of color images, and image processing is also required.
The method comprises the following steps of carrying out image processing on an obtained video frame sequence of the color image, namely converting the video frame sequence of the color image into a video frame sequence of a gray image to obtain a processed video frame sequence so as to carry out feature extraction on the image frame sequence by a subsequent algorithm, wherein a specific conversion formula is as follows:
Gray=R×0.299+G×0.587+B×0.114
wherein R, G, B are the three channel color values of the pixel point of the single color image in the video frame sequence of the color image, Gray is the Gray value of the pixel point of the video frame sequence converted into the Gray image, and the Gray value range of the pixel point is [0, 255 ].
Step S300, extracting statistical characteristics of the video frame sequences of the training data set and the test data set according to the video frame sequences of the training data set and the test data set.
After the video frame sequences of the training data set and the test data set are obtained, a feature extractor based on steganalysis respectively extracts the dimension-reduced statistical features from the video frame sequences of the training data set and the test data set by calculating the difference value of adjacent pixels. Specifically, the existing image steganalysis feature extractor can well capture noise residual errors on an image according to the statistical features of the image, the trace left in the video recompression process can be extracted by using the feature extractor, and the SPAM feature extractor extracts features by calculating the statistical features of the difference values of adjacent pixels, so that SPAM is selected as the feature extractor of the embodiment preferentially, the statistical features can be extracted from a video frame sequence by using the SPAM feature extractor, each feature dimension is 686, the dimension is reduced, and the training and testing can be performed more quickly by replacing the video frame sequence with the dimension-reduced statistical features.
And S400, training a video recompression detection classifier by using the statistical characteristics of the video frame sequence of the training data set to generate a video recompression detection model.
After the statistical characteristics of the video frame sequence of the training data set are obtained, the video recompression detection classifier is trained according to the algorithm by the statistical characteristics, so that a video recompression detection model can be trained, and the model can be used for checking the statistical characteristics of the test data set.
In one implementation, as shown in fig. 5, the step S400 specifically includes:
s401, standardizing the statistical characteristics of the video frame sequence of the training data set;
s402, performing iterative training on the video recompression detection classifier according to the statistical characteristics of the video frame sequence of the standardized training data set to generate the video recompression detection model, wherein the video recompression detection classifier is a single classifier based on Gaussian distribution.
In specific implementation, firstly, the statistical characteristics of a video frame sequence of a training data set are standardized, namely, a closed boundary is obtained more intuitively after calculation is carried out by using a statistical Gaussian density function for convenience, then iterative training is carried out on a video recompression detection classifier by using the standardized statistical characteristics to obtain a video recompression detection model, the model is represented by a Gaussian density distribution function of statistical probability, a closed boundary can be generated and is equivalent to a probability boundary, the occurrence is represented within the probability, the occurrence is represented outside the probability, the occurrence is not represented outside the probability, and the result of detecting the statistical characteristics of the video is represented as a single-time compressed video within the closed boundary, otherwise, the result is not represented. The video recompression detection classifier is a single classifier based on Gaussian distribution, and in order to further obtain a more accurate detection model, multiple groups of video recompression detection models need to be trained, and the video recompression detection model with the best training result is selected as a final video recompression detection model.
Illustrate by way of exampleWhen training, order
Figure BDA0002873718580000121
Detecting statistical features, x, of a sequence of video frames of a training data set of a classifier function f for video recompressioniIs a d-dimensional feature vector extracted from the ith video. For a given feature vector x, the function may give a class label estimate. The function can be expressed as:
Figure BDA0002873718580000122
wherein the function f is modeled as a feature vector X to the target class data XtThe similarity between theta is a predefined threshold and I (-) is an indicator function. And gamma represents the complexity of the model. Since the statistical features of the sequence of video frames of the training data set approximately obey a gaussian distribution, the video recompression detection classifier can be selected as a single classifier based on gaussian density estimation, the p (-) can be replaced with a gaussian density function:
Figure BDA0002873718580000131
wherein the mean mu and the covariance matrix sigma are formed by the eigenvector XtAnd (4) calculating.
And in the process, the video recompression detection classifier with a plurality of different hyper-parameters is subjected to quadruple cross validation by using the statistical characteristics of the video frame sequence of the training data set, the hyper-parameters corresponding to the detection classifier with the best performance are recorded, and the video recompression detection classifier model is obtained according to the hyper-parameters.
And S500, carrying out video recompression detection on the statistical characteristics of the video frame sequence of the test data set according to the video recompression detection model.
Finally, after the video recompression detection model is obtained, video recompression detection can be performed on the statistical characteristics of the video frame sequence of the prepared test data set, and the single compressed video and the recompressed video mixed together in the test data set can be distinguished according to the output result.
In one implementation, as shown in fig. 6, the step S500 specifically includes:
s501, standardizing the statistical characteristics of the video frame sequence of the test data set;
s502, according to the video recompression detection model, video recompression detection is carried out on the statistical characteristics of the video frame sequence of the standardized test data set.
S503, according to the video recompression detection, determining the classification results of the single compressed video and the recompressed video of the test data set, and obtaining the corresponding accuracy.
In specific implementation, because the video recompression detection model is based on a standard gaussian distribution density function, the statistical characteristics of the video frame sequence of the test data set are also standardized, then the video recompression detection model is used to perform video recompression detection on the statistical characteristics of the video frame sequence of the standardized test data set, according to a closed interface generated by the video recompression detection model, if the statistical characteristics of the video frame sequence of the test data set are in the closed interface, the statistical characteristics belong to the statistical characteristics of a single-time compressed video, otherwise the statistical characteristics belong to the statistical characteristics of a recompressed video, wherein in the detection process, three indexes can reflect the detection results, True Positive Rate, True Negative Rate, and Harmonic Mean Accuracy Rate, wherein the Harmonic Mean Accuracy Rate is obtained by Harmonic Mean calculation from the True Positive Rate and the True Negative Rate, the video type in the test data set can be judged according to the three labels, the recompressed video and the single-time compressed video in the test data set are distinguished, and the accuracy of the judgment result is obtained.
Finally, the invention further provides a video recompression integration classification detection method, as shown in figures 1 and 2, since gaussian distribution estimation is sensitive to the sampling method, if the statistical feature distribution of the sequence of video frames of the training data set cannot represent the statistical feature distribution of the sequence of video frames of the test data set, the closed boundary generated by the video recompression detection model will be inaccurate, and in order to make the video recompression detection model more robust, an integrated classification strategy can be used, specifically, the video data set is divided into a plurality of groups of sub data sets with equal quantity according to a clustering method, and the sub data sets are respectively used for training corresponding sub Gaussian single classifier models, and detecting the video to be detected through the obtained several groups of sub-Gaussian single classifier models, and fusing all generated detection results to obtain a final video recompression detection result.
In summary, the acquired video data set is divided into the training data set and the testing data set, the feature extractor based on steganalysis is used for feature extraction of data frames of the training data set and the testing data set, the training data set is used for training the recompression detection model, thus the recompression detection is carried out on the testing data, and the recompression video and the single-time compression video are distinguished.
Exemplary device
Based on the above embodiment, the present invention further provides a terminal device, and a functional block diagram thereof may be as shown in fig. 7. The terminal equipment comprises a processor, a memory, a network interface, a display screen and a temperature sensor which are connected through a system bus. Wherein the processor of the terminal device is configured to provide computing and control capabilities. The memory of the terminal equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the terminal device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a video recompression detection method. The display screen of the terminal equipment can be a liquid crystal display screen or an electronic ink display screen, and the temperature sensor of the terminal equipment is arranged in the terminal equipment in advance and used for detecting the operating temperature of the internal equipment.
It will be understood by those skilled in the art that the block diagram of fig. 7 is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation to the terminal device to which the solution of the present invention is applied, and a specific terminal device may include more or less components than those shown in the figure, or may combine some components, or have different arrangements of components.
In one embodiment, a terminal device is provided, where the terminal device includes a memory, a processor, and a video recompression detection program stored in the memory and executable on the processor, and when the processor executes the video recompression detection program, the following operation instructions are implemented:
acquiring a video data set;
decoding the video data set to obtain a video frame sequence of a training data set and a test data set;
extracting statistical features of the video frame sequences of the training data set and the test data set according to the video frame sequences of the training data set and the test data set;
training a video recompression detection classifier according to the statistical characteristics of the video frame sequence of the training data set to obtain a video recompression detection model;
and performing video recompression detection on the statistical characteristics of the video frame sequence of the test data set according to the video recompression detection model.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases or other media used in the embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
In summary, the present invention discloses a video recompression detection method, a terminal device and a storage medium, wherein the video recompression detection method includes: acquiring a video data set; decoding the video data set to obtain a video frame sequence of a training data set and a testing data set; extracting statistical features of the video frame sequences of the training data set and the test data set according to the video frame sequences of the training data set and the test data set; training a video recompression detection classifier according to the statistical characteristics of the video frame sequence of the training data set to obtain a video recompression detection model; and performing video recompression detection on the statistical characteristics of the video frame sequence of the test data set according to the video recompression detection model. The method comprises the steps of training a video recompression detection model by using a training data set, then performing recompression detection on test data, finally distinguishing a recompressed video from a single-time compressed video, further training a plurality of groups of video recompression detection models by using a plurality of groups of training data sets, detecting a plurality of groups of results, and finally fusing the results to distinguish the recompressed video from the single-time compressed video more accurately.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, and not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the present invention in its responsive technical solutions.

Claims (7)

1. A video recompression detection method, the video recompression detection method comprising:
acquiring a video data set;
decoding the video data set to obtain a video frame sequence of a training data set and a test data set;
extracting statistical features of the video frame sequences of the training data set and the test data set according to the video frame sequences of the training data set and the test data set;
training a video recompression detection classifier on the statistical characteristics of the video frame sequence of the training data set to generate a video recompression detection model;
performing video recompression detection on the statistical characteristics of the video frame sequence of the test data set according to the video recompression detection model;
the extracting the statistical characteristics of the video frame sequences of the training data set and the test data set according to the video frame sequences of the training data set and the test data set specifically includes:
an SPAM feature extractor based on steganalysis respectively extracts dimension-reduced statistical features from the video frame sequences of the training data set and the test data set by calculating the difference value of adjacent pixels;
the training of the video recompression detection classifier based on the statistical features of the sequence of video frames of the training data set to generate the video recompression detection model specifically includes:
normalizing statistical features of a sequence of video frames of the training data set;
iteratively training the video recompression detection classifier according to the statistical characteristics of the video frame sequence of the normalized training data set to generate the video recompression detection model, wherein the video recompression detection classifier is a single classifier based on Gaussian distribution;
the iteratively training the video recompression detection classifier to generate the video recompression detection model comprises:
performing quadruple cross validation on a plurality of video recompression detection classifiers with different hyper-parameters by using the statistical characteristics of a video frame sequence of a training data set, recording the hyper-parameters corresponding to the detection classifier with the best performance, and acquiring the video recompression detection classifier model according to the hyper-parameters;
the video recompression integrated classification detection method further comprises the following steps: dividing the video data set into a plurality of groups of sub data sets with equal quantity according to a clustering method, respectively training corresponding sub Gaussian single classifier models, detecting the video to be detected through the obtained plurality of groups of sub Gaussian single classifier models, and fusing all generated detection results to obtain a final video recompression detection result.
2. The method according to claim 1, wherein the decoding the video data set to obtain the video frame sequences of the training data set and the test data set specifically comprises:
dividing the video data set into the training data set and the testing data set;
decoding, using a video decoder, based on the training dataset and the test dataset to obtain a sequence of video frames for color images of the training dataset and the test dataset;
and converting the video frame sequence of the color image into the video frame sequence of the gray image.
3. The method of claim 2, wherein the training data set is a data set consisting of 50% of single compressed videos randomly selected from the video data set, and the test data set is a data set consisting of the remaining 50% of single compressed videos and corresponding re-compressed videos selected from the video data set, wherein the training data set and the test data set have no repeated videos, and the single compressed videos and the re-compressed videos exist in pairs.
4. The method of claim 2, wherein the specific formula for converting the video frame sequence of color images into the video frame sequence of grayscale images is as follows:
Gray=R×0.299+G×0.987+B×0.114
wherein, r.g.b are three channel color values of pixels of a single color image in the video frame sequence of the color image, Gray is a Gray value of pixels of the video frame sequence converted into a Gray image, and a Gray value range of the pixels is [0, 255 ].
5. The method of claim 1, wherein the video recompression detection of the statistical features of the sequence of video frames of the test data set according to the video recompression detection model comprises:
normalizing statistical features of a sequence of video frames of the test data set;
according to the video recompression detection model, carrying out video recompression detection on the statistical characteristics of the video frame sequence of the standardized test data set;
and determining the classification results of the single compressed video and the recompressed video of the test data set according to the video recompression detection, and acquiring corresponding accuracy.
6. A terminal device, characterized in that the terminal device comprises a memory, a processor and a video recompression detection program stored in the memory and executable on the processor, and the processor implements the steps of the video recompression detection method according to any one of claims 1 to 5 when executing the video recompression detection program.
7. A computer-readable storage medium, having a video recompression detection program stored thereon, which when executed by a processor, performs the steps of the video recompression detection method as claimed in any one of claims 1-5.
CN202011619108.0A 2020-12-30 2020-12-30 Video recompression detection method, terminal equipment and storage medium Active CN112788331B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011619108.0A CN112788331B (en) 2020-12-30 2020-12-30 Video recompression detection method, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011619108.0A CN112788331B (en) 2020-12-30 2020-12-30 Video recompression detection method, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112788331A CN112788331A (en) 2021-05-11
CN112788331B true CN112788331B (en) 2022-07-12

Family

ID=75754183

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011619108.0A Active CN112788331B (en) 2020-12-30 2020-12-30 Video recompression detection method, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112788331B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102595136A (en) * 2012-02-27 2012-07-18 中山大学 H.264/AVC (automatic volume control) video secondary compression detection method based on quantized coefficient statistical properties
CN111178204A (en) * 2019-12-20 2020-05-19 深圳大学 Video data editing and identifying method and device, intelligent terminal and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102595136A (en) * 2012-02-27 2012-07-18 中山大学 H.264/AVC (automatic volume control) video secondary compression detection method based on quantized coefficient statistical properties
CN111178204A (en) * 2019-12-20 2020-05-19 深圳大学 Video data editing and identifying method and device, intelligent terminal and storage medium

Also Published As

Publication number Publication date
CN112788331A (en) 2021-05-11

Similar Documents

Publication Publication Date Title
CN110853033B (en) Video detection method and device based on inter-frame similarity
CN112381775B (en) Image tampering detection method, terminal device and storage medium
US8818111B2 (en) Age estimation apparatus, age estimation method, and age estimation program
CN109740609B (en) Track gauge detection method and device
CN109118420B (en) Watermark identification model establishing and identifying method, device, medium and electronic equipment
CN116453438B (en) Display screen parameter detection method, device, equipment and storage medium
CN116910752B (en) Malicious code detection method based on big data
CN111415336A (en) Image tampering identification method and device, server and storage medium
Tralic et al. Video frame copy-move forgery detection based on cellular automata and local binary patterns
US11380133B2 (en) Domain adaptation-based object recognition apparatus and method
KR102622895B1 (en) Method and system for determining abnormalities in air quality data using the ensemble structure of supervised and unsupervised learning models
CN111275687B (en) Fine-grained image stitching detection method based on connected region marks
CN112287905A (en) Vehicle damage identification method, device, equipment and storage medium
CN112788331B (en) Video recompression detection method, terminal equipment and storage medium
CN116189063B (en) Key frame optimization method and device for intelligent video monitoring
CN115292722B (en) Model safety detection method and device based on different color spaces
CN111402185A (en) Image detection method and device
CN114663899A (en) Financial bill processing method, device, equipment and medium
CN111985423A (en) Living body detection method, living body detection device, living body detection equipment and readable storage medium
CN113762136A (en) Face image occlusion judgment method and device, electronic equipment and storage medium
CN112651996A (en) Target detection tracking method and device, electronic equipment and storage medium
VidalMata et al. On the effectiveness of image manipulation detection in the age of social media
CN112614116B (en) Digital image tampering detection method and system
Doan et al. Blind forensics tool of falsification for RAW images
CN114529784B (en) Trademark infringement analysis method and system for E-commerce data

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