Image detection method and related device

CN117408934BActive Publication Date: 2026-09-18BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210796992.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-05
Publication Date
2026-09-18
Estimated Expiration
2042-07-05

AI Technical Summary

Technical Problem

这种检测方法难以应用于各种不同的实际场景中,迁移性较差且检测精度不高

Benefits of technology

[0036] As can be seen from the above, the image detection method and related equipment provided in this disclosure obtain first-class and second-class features by performing multi-scale feature extraction on the image to be detected. The first-class features are then reduced by a deep residual network layer in a pre-trained end-to-end model to obtain abstract features with a smaller dimension than the first-class features. This balances the dimension of the input features of the end-to-end model and prevents the second-class features from being ignored by the end-to-end model during detection due to their low dimension. Subsequently, the abstract features of the first-class features are combined with the second-class features by adjusting their dimensions through a first fully connected network layer in the end-to-end model, further balancing the dimension of the feature data to obtain a dimensionally balanced third feature. The third feature is then input into the second fully connected network layer in the end-to-end model for classification. Based on the classification result, it is determined whether the image to be detected is a screen capture image. This detection method does not require a large amount of data consistent with actual application scenarios for pre-training of the end-to-end model, is easy to apply to various different real-world scenarios, has good transferability, and higher detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117408934B_ABST
    Figure CN117408934B_ABST
Patent Text Reader

Abstract

The present disclosure provides an image detection method and related equipment. The method comprises: performing feature extraction on a to-be-detected image to obtain first-type features; calling a deep residual network layer in a pre-trained end-to-end model to perform feature reduction on the first-type features to obtain abstract features of the first-type features; performing feature extraction on the to-be-detected image to obtain second-type features, the second-type features being used to represent semantic spatial features of the image and the semantic spatial features of the second-type features being more than those of the first-type features; performing dimension adjustment and combination on the abstract features of the first-type features and the second-type features through a first fully connected network layer in the end-to-end model to obtain third features; and calling a second fully connected network layer in the end-to-end model to classify the to-be-detected image based on the third features to obtain a classification result, the classification result being used to represent whether the to-be-detected image is a screen flipping image. The method disclosed in the present disclosure can improve the detection accuracy of flipping images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image processing technology, and in particular to an image detection method and related equipment. Background Technology

[0002] With increasing informatization, more and more applications require image recognition of goods, faces, and documents through photography. Currently, digital images can be forged, concealed, or modified by taking photos of screens using mobile phones, cameras, and other video recording devices. Therefore, it is necessary to determine the authenticity and reliability of the images being recognized.

[0003] Currently, artificial intelligence algorithms such as deep learning can be used to detect copied images from screens. However, these methods generally rely on texture and edge features for detection and require a large amount of data consistent with real-world application scenarios to train the model. This approach is difficult to apply to various real-world scenarios, exhibiting poor transferability and low detection accuracy. Summary of the Invention

[0004] In view of this, the purpose of this disclosure is to propose an image detection method and related equipment.

[0005] To achieve the above objectives, this disclosure provides an image detection method, comprising:

[0006] Feature extraction is performed on the image to be detected to obtain a first type of feature, which includes at least one of color feature, noise feature, edge feature and filtering feature;

[0007] The deep residual network layer in the pre-trained end-to-end model is invoked to perform feature reduction on the first type of features to obtain the abstract features of the first type of features;

[0008] The image to be detected is subjected to feature extraction to obtain a second type of feature. The second type of feature is used to characterize the semantic space features of the image, and the semantic space features of the second type of feature are more than those of the first type of feature.

[0009] The third feature is obtained by adjusting and combining the abstract features of the first type of feature and the second type of feature through the first fully connected network layer in the end-to-end model;

[0010] The second fully connected network layer in the end-to-end model is invoked to classify the image to be detected based on the third feature to obtain a classification result. The classification result is used to characterize whether the image to be detected is a screen capture image.

[0011] Optionally, the step of extracting features from the image to be detected to obtain a first type of feature includes:

[0012] The RGB three-channel features are obtained from the image to be detected as the color features of the image to be detected;

[0013] The image to be detected is filtered, and the noise features of the image to be detected are determined based on the filtered image features and the red, green and blue RGB three-channel features.

[0014] The image to be detected is subjected to grayscale transformation to obtain a grayscale image, and the edge features of the image to be detected are extracted from the grayscale image;

[0015] The image to be detected is filtered to obtain the filtered features of the image to be detected.

[0016] Optionally, the step of extracting features from the image to be detected to obtain a second type of features includes:

[0017] Texture features are obtained from the image to be detected;

[0018] The image to be detected is converted from the RGB color space to the HSV color space of the hexagonal pyramid model.

[0019] Extract the first, second, and third moment features of the RGB channels, the first, second, and third moment features of the hexagonal pyramid model HSV channels, and the contrast features from the image to be detected and the converted image to be detected;

[0020] At least one of the texture feature, the first, second and third moment features of the RGB channels, the first, second and third moment features of the HSV channels of the hexagonal pyramid model, and the contrast feature is identified as the second type of feature.

[0021] Optionally, the step of calling a deep residual network layer in a pre-trained end-to-end model to perform feature reduction on the first type of features to obtain abstract features of the first type of features includes:

[0022] Invoke a deep residual network layer in a pre-trained end-to-end model, wherein the deep residual network layer comprises multiple cascaded convolutional layers, and at least two of the multiple convolutional layers have different strides in their convolutional kernels;

[0023] The first type of features are input into the deep residual network layer to obtain the abstract features obtained by the deep residual network layer performing convolution processing on the first type of features.

[0024] Optionally, the deep residual network layer includes multiple cascaded convolutional layers: the convolutional kernels of the convolutional layers closer to the input channel of the deep residual network layer have a size of 5-9 and a stride of 3 or greater; the convolutional kernels of the convolutional layers farther from the input channel of the deep residual network layer have a size of 1 or 3 and a stride of 1 or 2.

[0025] Optionally, the step of adjusting and combining the abstract features of the first type of features and the second type of features through the first fully connected network layer in the end-to-end model to obtain the third feature includes:

[0026] The first fully connected network layer is invoked to increase the dimensionality of the abstract features of the first type of features and to reduce the dimensionality of the corresponding second type of features. The features after the dimensionality increase and reduction processes are then sequentially concatenated, and the concatenated features are used as the third feature.

[0027] This disclosure also provides an image detection apparatus, comprising:

[0028] The first feature extraction unit is configured to: extract features from the image to be detected to obtain a first type of features, wherein the first type of features includes at least one of color features, noise features, edge features, and filtering features;

[0029] The feature reduction unit is configured to: call the deep residual network layer in the pre-trained end-to-end model to perform feature reduction on the first type of features to obtain the abstract features of the first type of features;

[0030] The second feature extraction unit is configured to: extract features from the image to be detected to obtain a second type of feature, wherein the second type of feature is used to characterize the semantic space features of the image and the semantic space features of the second type of feature are more than those of the first type of feature;

[0031] The dimension adjustment and combination unit is configured to: perform dimension adjustment and combination on the abstract features of the first type of features and the second type of features through the first fully connected network layer in the end-to-end model to obtain a third feature;

[0032] The classification unit is configured to: call the second fully connected network layer in the end-to-end model to classify the image to be detected based on the third feature to obtain a classification result, wherein the classification result is used to characterize whether the image to be detected is a screen capture image.

[0033] This disclosure also provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method as described in any of the preceding claims.

[0034] This disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform any of the methods described above.

[0035] This disclosure also provides a computer program product comprising a computer-readable storage medium storing instructions, wherein the instructions, when executed, cause at least one central processing unit of a computing device to perform the method described above.

[0036] As can be seen from the above, the image detection method and related equipment provided in this disclosure obtain first-class and second-class features by performing multi-scale feature extraction on the image to be detected. The first-class features are then reduced by a deep residual network layer in a pre-trained end-to-end model to obtain abstract features with a smaller dimension than the first-class features. This balances the dimension of the input features of the end-to-end model and prevents the second-class features from being ignored by the end-to-end model during detection due to their low dimension. Subsequently, the abstract features of the first-class features are combined with the second-class features by adjusting their dimensions through a first fully connected network layer in the end-to-end model, further balancing the dimension of the feature data to obtain a dimensionally balanced third feature. The third feature is then input into the second fully connected network layer in the end-to-end model for classification. Based on the classification result, it is determined whether the image to be detected is a screen capture image. This detection method does not require a large amount of data consistent with actual application scenarios for pre-training of the end-to-end model, is easy to apply to various different real-world scenarios, has good transferability, and higher detection accuracy. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in this disclosure or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 This is a schematic flowchart of the image detection method described in the embodiments of this disclosure;

[0039] Figure 2 This is a schematic diagram of the process for feature reduction of the first type of features as described in an embodiment of this disclosure;

[0040] Figure 3 This is a schematic diagram of the structure of the image detection device described in the embodiments of this disclosure;

[0041] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.

[0043] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this disclosure should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar terms used in the embodiments of this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0044] As described in the background section, existing technologies that use machine learning models to determine whether an image is a copy have poor transferability and are difficult to apply to real-world scenarios due to the need to train the classification model with a large amount of data that matches actual usage scenarios. This also results in poor detection accuracy of existing detection methods.

[0045] In view of this, the present disclosure provides an image detection method that extracts and processes features of different scales of the image to be detected, and then inputs the processed features into a preset classification model for classification, thereby determining whether the image to be detected is a reproduced image.

[0046] like Figure 1 As shown in the embodiments of this disclosure, the image detection method includes:

[0047] Step S101: Perform feature extraction on the image to be detected to obtain a first type of feature, which includes at least one of color feature, noise feature, edge feature and filtering feature.

[0048] In this embodiment, the image to be detected is first acquired. Then, a preset feature extraction model or algorithm is used to extract features from the image at multiple scales and in multiple aspects, thereby obtaining the first type of features of the image. These first type of features may include at least one of color features, noise features, edge features, and filtering features.

[0049] Step S103: Call the deep residual network layer in the pre-trained end-to-end model to perform feature reduction on the first type of features to obtain the abstract features of the first type of features.

[0050] In this embodiment, since the first type of features all have high feature dimensions, the second type of features obtained in step S105 have low feature dimensions. However, the feature dimensions of the first type of features and the second type of features are very different. Therefore, the second type of features are easily ignored when performing end-to-end model training and classifying the image to be detected using the trained end-to-end model.

[0051] Therefore, in this embodiment, it is necessary to reduce the first type of features to obtain abstract features of the first type of features based on the reduced features. The feature dimension of the abstract features is lower than that of the first type of features, so as to balance the feature dimensions of the first type of features and the second type of features. This avoids the second type of features being ignored when performing end-to-end model training and classifying the image to be detected using the trained end-to-end model, which would lead to a decrease in detection accuracy.

[0052] Step S105: Perform feature extraction on the image to be detected to obtain a second type of feature. The second type of feature is used to characterize the semantic space features of the image, and the semantic space features of the second type of feature are more than those of the first type of feature.

[0053] In this embodiment, the second type of feature can be a higher-order feature. Higher-order features have richer semantic information and can be used to characterize the texture, color, contrast, and other features of the image to be detected. Due to the influence of factors such as lighting, the color features of an image are very unstable and difficult to use for recognition. Therefore, existing technologies usually only use texture features, edge features, etc., to detect images. However, when the image to be detected is a reproduced image, the color and contrast features of the image are also very different from the original image. Therefore, this embodiment extracts commonly used color features and combines them with other features to improve recognition performance.

[0054] Step S107: The first type of feature and the second type of feature are combined by adjusting the dimensions of the abstract features of the first type of feature and the second type of feature through the first fully connected network layer in the end-to-end model to obtain the third feature.

[0055] In this embodiment, after obtaining the abstract features of the first type of features and the second type of features, the dimensions of the abstract features of the first type of features and the second type of features are adjusted so that the dimension of the abstract features of the first type of features is reduced and the dimension of the second type of features is increased, thereby balancing the dimensions of high-order features and low-order features. Then, the abstract features of the first type of features after further dimensionality reduction and the second type of features after dimensionality increase are combined (reshaped) to further reduce the dimension of the abstract features of the first type of features with higher dimensions and increase the dimension of the second type of features with lower dimensions, thereby obtaining multiple third features with more balanced or even identical dimensions. Finally, the third features are input into a pre-trained end-to-end model for classification. The classification result obtained is the re-photographing detection result of the image to be detected, that is, whether the image to be detected is a screen re-photographed image.

[0056] Step S109: The second fully connected network layer in the end-to-end model is called to classify the image to be detected based on the third feature to obtain a classification result. The classification result is used to characterize whether the image to be detected is a screen-reproduced image.

[0057] The image detection method described in this disclosure extracts features from the image to be detected at multiple scales to obtain first-class and second-class features. The first-class features are then reduced using a deep residual network layer in a pre-trained end-to-end model to obtain abstract features with dimensions smaller than the first-class features. This balances the dimensionality of the input features to the end-to-end model, preventing the second-class features from being ignored during detection due to their low dimensionality. Next, the abstract features of the first-class features are combined with the second-class features using a first fully connected network layer in the end-to-end model to further balance the dimensionality of the feature data, resulting in a dimensionally balanced third feature. This third feature is then input into the second fully connected network layer in the end-to-end model for classification. Based on the classification result, it is determined whether the image to be detected is a screen capture image. This detection method does not require a large amount of data consistent with real-world application scenarios for pre-training of the end-to-end model, making it easily applicable to various real-world scenarios, exhibiting good transferability, and achieving higher detection accuracy.

[0058] Meanwhile, the detection method described in this embodiment can resist scaling and compression within a certain range. For example, for a detection image of about 1 MB that meets the input requirement size, compressing it to 1 / 30 of the original image will not significantly affect the detection results; similarly, for larger detection images, such as 5000*5000 images, even reducing the size of the detection image to 1 / 10 of the original image will not significantly affect the detection results.

[0059] Furthermore, the image detection method described in this disclosure has low requirements for the clarity of the image to be detected and has good robustness.

[0060] In some embodiments, the first type of feature can be a low-order feature of the image to be detected. Low-order features have less semantic information but accurate target location. The first type of feature can be obtained by extracting features from the image to be detected using filtering algorithms, LBP (Local Binary Pattern) algorithms, edge detection algorithms, etc. The obtained first type of feature can include at least one of color features, noise features, edge features, and filtering features.

[0061] Color features describe the surface properties of the image to be detected, and may include information such as RGB (red, green, blue) three-channel features. In this embodiment, feature extraction of the image to be detected to obtain color features includes: performing function transformations on the RGB three channels of the image to be detected, thereby obtaining the RGB three-channel features as the color features of the image to be detected.

[0062] Noise features can be obtained based on noise information such as Gaussian noise and impulse noise in the image to be detected. In this embodiment, feature extraction of the image to be detected to obtain noise features includes: filtering the image to be detected, and determining the noise features of the image to be detected based on the filtered image features and the RGB three-channel features. Specifically, a preset filtering algorithm can be used to filter the image to be detected. The filtering algorithm can include median filtering, mean filtering, Gaussian filtering, etc. The filtered image features can include median filtering features, mean filtering features, Gaussian filtering features, etc. In this embodiment, the result of subtracting the filtered image features from the obtained RGB three-channel features can be used as the noise features of the image to be detected.

[0063] Edge features reflect the content of the image to be detected, and edge detection algorithms can be used to obtain these features. In this embodiment, feature extraction of the image to be detected to obtain edge features includes: performing a grayscale transformation on the image to be detected to obtain a grayscale image, and extracting the edge features of the image to be detected from the grayscale image. An edge detection algorithm can be used to perform edge detection on the grayscale image to obtain the edge features of the image to be detected. Edge detection algorithms can include Canny edge detection, Laplacian edge detection, Sobel edge detection, Prewitt edge detection, CS-LBP centrosymmetric local binary algorithm, etc.

[0064] Filtered features can be obtained by filtering an image to be detected. In this embodiment, feature extraction of the image to be detected to obtain filtered features includes: filtering the image to be detected to obtain the filtered features of the image to be detected. Median filtering, mean filtering, Gaussian filtering, and other filtering algorithms can be used to filter the image to be detected or its grayscale image to obtain the filtered features of the image to be detected.

[0065] In this embodiment, the first type of features can be used to characterize low-order features such as color, noise, edges, and filtering in the image to be detected. Therefore, combining the first type of features with the image to be detected can reflect some color, noise, and edge features in the image. For example, when the image to be detected is a reproduced image, it may exhibit moiré patterns. Taking median filtering as an example, median filtering sets the gray value of each pixel to the median of the gray values ​​of all pixels within a certain neighborhood window of that pixel. Therefore, the image after median filtering is smooth. Comparing it with the image to be detected that has moiré patterns can reflect the noise features generated by the moiré patterns in the image to be detected.

[0066] In some embodiments, the second type of feature can be a low-order feature of the image to be detected, which may include the texture features (Difference-histograms, DH), the first, second and third moment features of the RGB (Red, Green, Blue) channels, the first, second and third moment features of the HSV (Hue, Saturation, Value) channels of the hexagonal pyramid model, and contrast features, etc.

[0067] In this embodiment, feature extraction is performed on the image to be detected to obtain a second type of feature, including: obtaining texture features from the image to be detected; converting the image to be detected from the RGB color space to the HSV color space; extracting first, second, and third moment features of the RGB channels, first, second, and third moment features of the HSV channels, and contrast features from the image to be detected and the converted image to be detected; and determining at least one of the texture features, the first, second, and third moment features of the RGB channels, the first, second, and third moment features of the HSV channels, and the contrast features as the second type of feature.

[0068] Texture features are used to describe the surface properties of an image or image region corresponding to a scene, such as the coarseness and density of the image texture. In this embodiment, wavelet transform algorithms and other methods can be used to extract the texture features of the image to be detected.

[0069] The first, second, and third moment features of the RGB channels are used to characterize the average intensity of each color component of the RGB image of the image to be detected, the color variance of the region to be tested, and the skewness of the color components. The first, second, and third moment features of the HSV channels of the hexagonal pyramid model are obtained by converting the RGB image of the image to be detected into a hexagonal pyramid model HSV image and then calculating the average intensity of each color component of the hexagonal pyramid model HSV image, the color variance of the region to be tested, and the skewness of the color components.

[0070] In this embodiment, by extracting the first, second, and third moment features of the RGB channels, the first, second, and third moment features of the HSV channels, the contrast features, and the texture features of the image to be detected, the end-to-end model can learn these features during subsequent classification. Combined with at least one of the aforementioned color features, noise features, edge features, and filtering features, the recognition accuracy and performance of the image to be detected can be improved.

[0071] In some embodiments, such as Figure 2 As shown, step S103, which involves calling a deep residual network layer in a pre-trained end-to-end model to perform feature reduction on the first type of features to obtain abstract features of the first type of features, includes:

[0072] Step S201: Invoke the deep residual network layer in the pre-trained end-to-end model. The deep residual network layer includes multiple cascaded convolutional layers, and at least two of the convolutional layers have different strides in their convolutional kernels.

[0073] Among them, the deep residual network (ResNet) layer uses a skip structure as the basic structure of the network, which can overcome the problem of decreased learning efficiency and ineffective improvement of accuracy due to the increase of network depth (also known as network degradation). By stacking layers of y=x on top of a shallow network (called identity mappings), the network can be prevented from degrading as its depth increases.

[0074] Step S203: Input the first type of features into the deep residual network layer to obtain the abstract features obtained by the deep residual network layer performing convolution processing on the first type of features.

[0075] In this embodiment, the first type of features is input into the deep residual network layer. Since the first type of features have multiple input channels and relatively large channel sizes, a large-kernel, large-stride convolutional layer is used to reduce the features. Simultaneously, because the features of the reproduced images are very subtle, the end-to-end model in this application does not include pooling layers, thus eliminating the need for pooling operations on the feature data. Furthermore, by setting convolutional layers of different strides in the deep residual network layer, the end-to-end model of this application will not miss the feature data of the reproduced images, thereby improving the detection accuracy of screen reproduced images.

[0076] In this embodiment, meaningful dimensionality reduction of input features can be achieved through deep residual network layers. For example, the ResNet34 model can transform 224*224*3 dimensional input features into 512 dimensional output features, and the LeNet-5 model can transform 28*28 dimensional input features into 16*5*5 dimensional output features. Therefore, when a deep residual network layer is used in the end-to-end model, the first type of features are input into this deep residual network layer. After convolution processing, the abstract features of the first type of features output have a lower dimensionality than the first features, and the abstract features of the first type of features can also reflect the same image features as the representation of the first type of features, thereby reducing the dimensionality of the features without losing image features.

[0077] In some embodiments, among the multiple cascaded convolutional layers of the deep residual network layer, the convolutional kernels of the convolutional layers closer to the input channel of the deep residual network layer have a size of 5-9 and a stride of 3 or greater; the convolutional kernels of the convolutional layers farther from the input channel of the deep residual network layer have a size of 1 or 3 and a stride of 1 or 2.

[0078] In one specific embodiment, the kernel size of the convolutional layer closest to the input channel is 7, and the kernel stride is (4, 3) (vertical stride of 4 and horizontal stride of 3). For other convolutional layers besides this one, the kernel size is 1 or 3, and the kernel stride is 1 or 2.

[0079] In this embodiment, since the features of the reproduced images are often very subtle, convolutional layers of different lengths are set in the end-to-end model. The first type of features are reduced by the convolutional layers of different lengths, so as to collect as many detailed features as possible in the first type of features. At the same time, the end-to-end model does not contain pooling layers to avoid the pooling layers discarding these detailed features during sampling, thereby avoiding the omission of features and improving the detection accuracy of the reproduced screen images.

[0080] In some other embodiments, step S107, which involves adjusting and combining the abstract features of the first type of features and the second type of features through the first fully connected network layer in the end-to-end model to obtain the third feature, includes: calling the first fully connected network layer to increase the dimensionality of the abstract features of the first type of features, reducing the dimensionality of the corresponding second type of features, sequentially concatenating the features after the dimensionality increase and the dimensionality reduction, and using the concatenated features as the third feature.

[0081] In this embodiment, the dimension of the output feature of the first fully connected network layer can be set to the preset dimension required by the user. Then, the abstract features of the first type of feature and the second type of feature are input into the first fully connected network layer. The resulting output data, i.e., the dimension of the third feature, is based on the preset dimension required by the user.

[0082] In this embodiment, the dimensionality of the abstract features of the first type of features after feature reduction is still higher than that of the second type of features. Meanwhile, within the second type of features, the dimensions of different features also vary. Therefore, to further balance the dimensions of the abstract features of the first type of features and the second type of features, a first fully connected network layer in the end-to-end model is used to further reduce the dimensionality of the abstract features of the first type of features with higher dimensions, and to increase the dimensionality of the second type of features with lower dimensions. Then, the abstract features of the first type of features that have undergone dimensionality increase and the second type of features that have undergone dimensionality reduction are sequentially concatenated, and the concatenated feature is used as the third feature, thereby further balancing the dimensions of the various high-order and low-order features.

[0083] Optionally, in this embodiment, the first fully connected network layer may include one or more fully connected sub-networks. By using one or more fully connected sub-networks to scale the abstract features of each first type of feature and the second type of feature, the computational cost and number of parameters of the network can be reduced.

[0084] The number of fully connected subnetworks can be adjusted based on actual needs. For example, if only one fully connected subnetwork is used, and two 512-dimensional inputs need to be scaled down to 512 dimensions using a single fully connected subnetwork, then the number of parameters in the fully connected subnetwork would be 2. 19 The computational cost is one 2. 10 The vector and a (2 10 ,2 9 The matrix multiplication is (2^5) / ... 17 Therefore, by setting up multiple fully connected subnetworks, the computational cost and number of parameters of the network can be reduced.

[0085] After obtaining the abstract features of the first type of features obtained through dimensionality increase processing and the second type of features obtained through dimensionality reduction processing, the abstract features of the first type of features obtained through dimensionality increase processing and the second type of features obtained through dimensionality reduction processing are sequentially concatenated. This sequential concatenation includes: placing each element of the abstract features of the first type of features obtained through dimensionality increase processing before each element of the second type of features obtained through dimensionality reduction processing; or, placing each element of the abstract features of the first type of features obtained through dimensionality increase processing after each element of the second type of features obtained through dimensionality reduction processing.

[0086] For example, if the abstract features of the first type of features after dimensionality increase include vectors [a, b], and the second type of features after dimensionality reduction include vectors [c, d], then the third feature obtained after concatenation can include [a, b, c, d] or [c, d, a, b].

[0087] Finally, the obtained third feature is input into the second fully connected network layer of the end-to-end model for classification to obtain a classification result. This classification result is used to characterize whether the image to be detected is a screen capture image. In this embodiment, the second fully connected network layer in the end-to-end model can also be a perceptron model, support vector machine model, etc., and this embodiment does not impose any restrictions on this.

[0088] It should be noted that the method of this disclosure embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this disclosure embodiment, and the multiple devices will interact with each other to complete the method described.

[0089] It should be noted that the above description describes some embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0090] Based on the same inventive concept, corresponding to any of the methods in the above embodiments, this disclosure also provides an image detection device. For example... Figure 3 As shown, the image detection device includes:

[0091] The first feature extraction unit 11 is configured to: extract features from the image to be detected to obtain a first type of features, wherein the first type of features includes at least one of color features, noise features, edge features and filtering features;

[0092] Feature reduction unit 13 is configured to: call the deep residual network layer in the pre-trained end-to-end model to perform feature reduction on the first type of features to obtain the abstract features of the first type of features;

[0093] The second feature extraction unit 15 is configured to: extract features from the image to be detected to obtain a second type of feature, wherein the second type of feature is used to characterize the semantic space features of the image and the semantic space features of the second type of feature are more than those of the first type of feature;

[0094] The dimension adjustment and combination unit 17 is configured to: perform dimension adjustment and combination on the abstract features of the first type of features and the second type of features through the first fully connected network layer in the end-to-end model to obtain a third feature;

[0095] Classification unit 19 is configured to: call the second fully connected network layer in the end-to-end model to classify the image to be detected based on the third feature to obtain a classification result, wherein the classification result is used to characterize whether the image to be detected is a screen copy image.

[0096] Optionally, the first feature extraction unit 11 is further configured to: obtain RGB three-channel features from the image to be detected as color features of the image to be detected; perform filtering processing on the image to be detected, and determine noise features of the image to be detected based on the filtered image features and the RGB three-channel features; perform grayscale transformation on the image to be detected to obtain a grayscale image, and extract edge features of the image to be detected from the grayscale image; and perform filtering processing on the image to be detected to obtain filtered features of the image to be detected.

[0097] Optionally, the second feature extraction unit 15 is further configured to: obtain texture features from the image to be detected; convert the image to be detected from the RGB color space to the HSV color space; extract the first, second, and third moment features of the RGB channels, the first, second, and third moment features of the HSV channels, and contrast features from the image to be detected and the converted image to be detected; and determine at least one of the texture features, the first, second, and third moment features of the RGB channels, the first, second, and third moment features of the HSV channels, and the contrast features as the second type of feature.

[0098] Optionally, the feature reduction unit 13 is further configured to: invoke a deep residual network layer in a pre-trained end-to-end model, the deep residual network layer comprising multiple cascaded convolutional layers, wherein at least two of the convolutional layers have different strides in their convolutional kernels; input the first type of features into the deep residual network layer to obtain abstract features obtained by the deep residual network layer performing convolution processing on the first type of features.

[0099] Optionally, the deep residual network layer includes multiple cascaded convolutional layers: the convolutional kernels of the convolutional layers closer to the input channel of the deep residual network layer have a size of 5-9 and a stride of 3 or greater; the convolutional kernels of the convolutional layers farther from the input channel of the deep residual network layer have a size of 1 or 3 and a stride of 1 or 2.

[0100] Optionally, the dimension adjustment and combination unit 17 is further configured to: call the first fully connected network layer to increase the dimension of the abstract features of the first type of features, reduce the dimension of the corresponding second type of features, sequentially concatenate the features after the dimension increase and the dimension reduction, and use the concatenated features as the third feature.

[0101] The image detection apparatus of the above embodiments is used to implement the corresponding method in any of the foregoing embodiments and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0102] Based on the same inventive concept, corresponding to any of the above embodiments, this disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in any of the above embodiments.

[0103] Figure 4 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.

[0104] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0105] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0106] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.

[0107] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0108] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.

[0109] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0110] The electronic devices described above are used to implement the corresponding methods in any of the foregoing embodiments and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0111] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the methods described in any of the above embodiments.

[0112] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0113] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to perform the methods described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0114] Based on the same inventive concept, corresponding to any of the methods in the above embodiments, this application also provides a computer program product, which includes a non-transitory tangible computer-readable medium having computer-readable instructions thereon. In some embodiments, the computer-readable instructions are executable by one or more processors to cause the processors to perform the method. Corresponding to the execution entity for each step in each embodiment of the method, the processor performing the corresponding step may belong to the corresponding execution entity.

[0115] The computer program products of the above embodiments are used to cause a processor to execute the methods described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0116] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this disclosure (including the claims) is limited to these examples; within the framework of this disclosure, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this disclosure as described above, which are not provided in detail for the sake of brevity.

[0117] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this disclosure, the provided drawings may or may not show well-known power / ground connections to integrated circuit (IC) chips and other components. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this disclosure, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this disclosure will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuitry) have been set forth to describe exemplary embodiments of this disclosure, it will be apparent to those skilled in the art that the embodiments of this disclosure may be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0118] Although this disclosure has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0119] This disclosure is intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. An image detection method, characterized in that, include: Feature extraction is performed on the image to be detected to obtain a first type of feature, which includes at least one of color feature, noise feature, edge feature and filtering feature; The deep residual network layer in the pre-trained end-to-end model is invoked to reduce the feature dimension of the first type of features to obtain the abstract features of the first type of features; The image to be detected is subjected to feature extraction to obtain a second type of feature. The second type of feature is used to characterize the semantic space features of the image and the semantic space features of the second type of feature are more than those of the first type of feature. The second type of feature includes at least one of texture features, first, second and third moment features of the red, green and blue RGB channels, first, second and third moment features of the hexagonal pyramid model HSV channels and contrast features. The feature dimension of the first type of feature is higher than that of the second type of feature. The third feature is obtained by adjusting and combining the abstract features of the first type of feature and the second type of feature through the first fully connected network layer in the end-to-end model; The second fully connected network layer in the end-to-end model is invoked to classify the image to be detected based on the third feature to obtain a classification result. The classification result is used to characterize whether the image to be detected is a screen capture image.

2. The method according to claim 1, characterized in that, The first type of features is obtained by extracting features from the image to be detected, including: The RGB three-channel features are obtained from the image to be detected as the color features of the image to be detected; The image to be detected is filtered, and the noise features of the image to be detected are determined based on the filtered image features and the red, green and blue RGB three-channel features. The image to be detected is subjected to grayscale transformation to obtain a grayscale image, and the edge features of the image to be detected are extracted from the grayscale image; The image to be detected is filtered to obtain the filtered features of the image to be detected.

3. The method according to claim 1, characterized in that, The second type of features is obtained by extracting features from the image to be detected, including: The texture features are obtained from the image to be detected; The image to be detected is converted from the RGB color space to the HSV color space of the hexagonal pyramid model. Extract the first, second, and third moment features of the RGB channels, the first, second, and third moment features of the HSV channels of the hexagonal pyramid model, and the contrast features from the image to be detected and the converted image to be detected; At least one of the texture feature, the first, second and third moment features of the RGB channels, the first, second and third moment features of the HSV channels of the hexagonal pyramid model, and the contrast feature is identified as the second type of feature.

4. The method according to claim 1, characterized in that, The step of calling the deep residual network layer in the pre-trained end-to-end model to perform feature reduction on the first type of features to obtain the abstract features of the first type of features includes: Invoke a deep residual network layer in a pre-trained end-to-end model, wherein the deep residual network layer comprises multiple cascaded convolutional layers, and at least two of the multiple convolutional layers have different strides in their convolutional kernels; The first type of features are input into the deep residual network layer to obtain the abstract features obtained by the deep residual network layer performing convolution processing on the first type of features.

5. The method according to claim 4, characterized in that, The deep residual network layer comprises multiple cascaded convolutional layers: The size of the convolutional kernel of the convolutional layer near the input channel of the deep residual network layer is 5-9, and the stride of the convolutional kernel is greater than or equal to 3; The size of the convolutional kernel of the convolutional layer that is far from the input channel of the deep residual network layer is 1 or 3, and the stride of the convolutional kernel is 1 or 2.

6. The method according to claim 1, characterized in that, The process of combining the abstract features of the first type of features and the second type of features through the first fully connected network layer in the end-to-end model by adjusting their dimensions to obtain the third feature includes: The first fully connected network layer is invoked to increase the dimensionality of the abstract features of the first type of features and to reduce the dimensionality of the corresponding second type of features. The features after the dimensionality increase and reduction processes are then sequentially concatenated, and the concatenated features are used as the third feature.

7. An image detection device, characterized in that, include: The first feature extraction unit is configured to: extract features from the image to be detected to obtain a first type of features, wherein the first type of features includes at least one of color features, noise features, edge features, and filtering features; The feature reduction unit is configured to: call the deep residual network layer in the pre-trained end-to-end model to reduce the feature dimension of the first type of features to obtain the abstract features of the first type of features; The second feature extraction unit is configured to: extract features from the image to be detected to obtain a second type of features. The second type of features is used to characterize the semantic space features of the image, and the semantic space features of the second type of features are more than those of the first type of features. The second type of features includes at least one of texture features, first, second and third moment features of the RGB channels, first, second and third moment features of the HSV channels of the hexagonal pyramid model, and contrast features. The feature dimension of the first type of features is higher than that of the second type of features. The dimension adjustment and combination unit is configured to: perform dimension adjustment and combination on the abstract features of the first type of features and the second type of features through the first fully connected network layer in the end-to-end model to obtain a third feature; The classification unit is configured to: call the second fully connected network layer in the end-to-end model to classify the image to be detected based on the third feature to obtain a classification result, wherein the classification result is used to characterize whether the image to be detected is a screen capture image.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 6.

10. A computer program product, the computer program product comprising a computer-readable storage medium storing instructions, characterized in that, When executed, the instructions cause at least one central processing unit of the computing device to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Identity document duplicated image recognition method, device and equipment and medium

    CN111275685A

  • Image copying detection method, identity verification method, model training method and device

    CN111881707A