Image tracing method and device
By performing multi-dimensional feature extraction and differential analysis on the images, the shortcomings in accuracy and application scope of traditional image traceability methods are solved, and efficient traceability of complex and variable depth synthetic images are achieved.
Patent Information
- Application Number
- CN202411840068.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-03-28
AI Technical Summary
Traditional image traceability methods have shortcomings in accuracy and application scope, and it is particularly difficult to effectively process complex and variable depth synthetic images.
By extracting multi-dimensional feature of the traceable image, performing differential analysis to obtain multi-dimensional difference information, and image traceability is carried out based on this information to improve the accuracy and reliability of traceability.
This method can improve the accuracy and reliability of image traceability, expand the scope of application, and effectively deal with complex and changeable depth synthesis images.
Smart Images

Figure CN119723107A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image tracing method and device. Background Art
[0002] Image tracing technology refers to a technical means of determining the source of image production or modification by analyzing the characteristic information of an image. It is widely used in criminal investigation and evidence collection, copyright protection, forensic identification and other fields.
[0003] However, traditional image tracing methods are mostly based on a single feature of the image, which will affect the accuracy of image tracing to a certain extent, and are difficult to cope with the tracing of complex and changeable deep synthetic images, and their application scope is also relatively limited.
[0004] Therefore, there is an urgent need to propose a better image tracing solution. Summary of the invention
[0005] In order to overcome the problems existing in the related art, the present application provides an image tracing method and device to solve the technical problems existing in the prior art, such as affecting the accuracy of image tracing and the limited application scope.
[0006] According to a first aspect of an embodiment of the present application, a method for tracing an image is provided, the method comprising:
[0007] Obtain the image to be traced;
[0008] Performing multi-dimensional feature extraction on the image to be traced to obtain multi-dimensional feature information of the image to be traced;
[0009] Performing difference analysis on the multi-dimensional feature information to obtain multi-dimensional difference information of the image to be traced, wherein the multi-dimensional difference information is used to indicate difference features of the image to be traced in multiple dimensions;
[0010] Image tracing is performed based on the multi-dimensional difference information to obtain a corresponding tracing result, and the tracing result is at least used to indicate the tracing category to which the image to be traced belongs.
[0011] In some embodiments, performing difference analysis on the multi-dimensional feature information to obtain multi-dimensional difference information of the image to be traced includes:
[0012] Compare and calculate the difference between the multi-dimensional feature information and the reference feature information of the corresponding dimension in the preset feature library to obtain feature difference information of the corresponding dimension;
[0013] The feature difference information of the corresponding dimensions is weightedly fused to obtain the multi-dimensional difference information.
[0014] In some embodiments, performing difference analysis on the multi-dimensional feature information to obtain multi-dimensional difference information of the image to be traced includes:
[0015] Performing feature fusion on the multi-dimensional feature information to obtain corresponding fused feature information;
[0016] The fused feature information and the preset reference feature information are compared and calculated to obtain the multi-dimensional difference information.
[0017] In some embodiments, performing difference analysis on the multi-dimensional feature information to obtain multi-dimensional difference information of the image to be traced includes:
[0018] Performing difference comparison calculation on the multi-dimensional feature information and the feature information of a preset dimension to obtain feature difference information corresponding to each of the multiple dimensions, wherein the preset dimension is any dimension in the multiple dimensions;
[0019] The feature difference information corresponding to each of the multiple dimensions is weightedly fused to obtain the multi-dimensional difference information.
[0020] In some embodiments, the image tracing is performed based on the multi-dimensional difference information to obtain a corresponding tracing result, including:
[0021] Performing weighted fusion on the multi-dimensional feature information to obtain corresponding weighted feature information;
[0022] The image to be traced is classified and traced based on the weighted feature information and the multi-dimensional difference information to obtain the tracing result.
[0023] In some embodiments, the multi-dimensional feature information includes first stream feature information and second stream feature information, the first stream feature information is feature information extracted using deep learning technology, the second stream feature information is feature information in the multi-dimensional feature information except the first stream feature information, and the weighted fusion of the multi-dimensional feature information to obtain the corresponding weighted feature information includes:
[0024] The first stream feature information and the second stream feature information are deeply fused to obtain the weighted feature information.
[0025] In some embodiments, the deep fusion of the first stream feature information and the second stream feature information to obtain the weighted feature information includes:
[0026] Using an attention mechanism to weightedly fuse the first stream feature information and the second stream feature information to obtain the weighted feature information; or,
[0027] Pyramid fusion is performed on the first stream feature information and the second stream feature information to obtain the weighted feature information.
[0028] In some embodiments, the performing multi-dimensional feature extraction on the image to be traced to obtain multi-dimensional feature information of the image to be traced includes at least any one of the following:
[0029] Extracting pixel noise from the image to be traced to obtain corresponding noise feature information;
[0030] Extracting time domain features of the image to be traced to obtain corresponding time domain feature information;
[0031] Extracting frequency domain features of the image to be traced to obtain corresponding frequency domain feature information;
[0032] Extracting local features of the image to be traced to obtain corresponding local feature information;
[0033] Extracting statistical features of the image to be traced to obtain corresponding statistical feature information;
[0034] Extracting depth features of the image to be traced to obtain corresponding depth feature information;
[0035] Extracting spatial features of the image to be traced to obtain corresponding spatial feature information;
[0036] Extracting color features of the image to be traced to obtain corresponding color feature information;
[0037] Extracting texture features of the image to be traced to obtain corresponding texture feature information;
[0038] Extracting shape features of the image to be traced to obtain corresponding shape feature information;
[0039] Structural features are extracted from the image to be traced to obtain corresponding structural feature information.
[0040] In some embodiments, the method is applied to an image provenance model, and the method further includes:
[0041] Acquire a training sample set, wherein the training sample set includes at least one sample image and a true source tracing classification of the sample image;
[0042] The training sample set is divided into a test set and (K-1) training sets by using cross validation K-Fold, where K is a positive integer;
[0043] The image tracing model to be trained is trained based on the test set and (K-1) training sets to obtain the trained image tracing model.
[0044] In some embodiments, the image tracing model is trained based on a label-smoothed classification loss function, and the label-smoothed classification loss function is used to indicate the sum of the loss values between the predicted tracing classification of each of the sample images obtained by inference of the image tracing model and the true tracing classification of each of the sample images.
[0045] According to a second aspect of an embodiment of the present application, there is provided an image tracing device, the device comprising:
[0046] An acquisition module, used to acquire the image to be traced;
[0047] A processing module, used for performing multi-dimensional feature extraction on the image to be traced, to obtain multi-dimensional feature information of the image to be traced;
[0048] The processing module is further used to perform difference analysis on the multi-dimensional feature information to obtain multi-dimensional difference information of the image to be traced, wherein the multi-dimensional difference information is used to indicate difference features of the image to be traced in multiple dimensions;
[0049] The processing module is further used to perform image tracing based on the multi-dimensional difference information to obtain a corresponding tracing result, and the tracing result is at least used to indicate the tracing category to which the image to be traced belongs.
[0050] For the contents not introduced or described in the embodiments of the present application, please refer to the relevant introduction in the method embodiment provided in the first aspect above, and the embodiments of the present application are not limited thereto.
[0051] According to a third aspect of an embodiment of the present application, a computer device is provided, comprising: a processor; and a memory for storing processor executable instructions; wherein the processor is configured to execute the executable instructions to implement the steps of the image tracing method provided in the first aspect above.
[0052] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the image tracing method provided in the first aspect of the present application are implemented.
[0053] According to a fifth aspect of an embodiment of the present application, a chip is provided, comprising: a processor and an interface; the processor is used to read instructions to execute the steps of the image tracing method provided in the first aspect above.
[0054] According to a sixth aspect of an embodiment of the present application, a computer program product is provided, comprising a computer program and / or instructions, which, when executed by a processor, implement the steps of the image tracing method provided in the first aspect of the present application.
[0055] The technical solution provided by the embodiments of the present application may include the following beneficial effects: a computer device acquires an image to be traced; performs multi-dimensional feature extraction on the image to be traced to obtain multi-dimensional feature information of the image to be traced; performs difference analysis on the multi-dimensional feature information to obtain multi-dimensional difference information of the image to be traced, and the multi-dimensional difference information is used to indicate the difference characteristics of the image to be traced in multiple dimensions; performs image tracing based on the multi-dimensional difference information to obtain a corresponding tracing result, and the tracing result is at least used to indicate the tracing classification to which the image to be traced belongs. The present application can trace the image to be traced by comprehensively and systematically analyzing the multi-dimensional feature information of the image to be traced, and further performing multi-dimensional feature difference analysis on the multi-dimensional feature information, which can not only improve the accuracy and reliability of image tracing, but also solve the technical problems existing in traditional image tracing solutions, such as affecting the accuracy of image tracing and the limited scope of application.
[0056] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0058] Figure 1 The figure is a flowchart of an image tracing method according to an exemplary embodiment.
[0059] Figure 2 The figure is a flow chart of a difference analysis according to an exemplary embodiment.
[0060] Figure 3 The figure is a flowchart of another difference analysis according to an exemplary embodiment.
[0061] Figure 4 The figure is a flowchart of another difference analysis according to an exemplary embodiment.
[0062] Figure 5 The figure is a processing diagram of an image tracing model according to an exemplary embodiment.
[0063] Figure 6 The figure is a flowchart of an image tracing process according to an exemplary embodiment.
[0064] Figure 7 It is a flowchart of a model training according to an exemplary embodiment.
[0065] Figure 8 The figure is a schematic diagram of the structure of an image tracing device according to an exemplary embodiment.
[0066] Fig. 9 The diagram is a schematic structural diagram of a computer device according to an exemplary embodiment.
[0067] Fig.10 The figure is a schematic diagram showing the structure of a chip according to an exemplary embodiment. DETAILED DESCRIPTION
[0068] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0069] It should be noted that all actions of acquiring signals, information or data in this application are performed with the authorization of the corresponding device owner.
[0070] The deep synthetic image tracing task is often regarded as a complex multi-classification problem from a traditional perspective. In the existing technology, the generalization of deep synthetic image tracing technology is limited due to the lack of data set diversity, the overfitting of facial identity features caused by the model training relying on a large amount of data, and the rapid iteration of the model. For example, the easy detectability of image fingerprints may become a breakthrough for attackers, affecting the reliability of tracing technology. Reverse engineering technology cannot completely and accurately infer all hyperparameters, especially some complex hyperparameters. Directly performing multi-classification tasks on the features extracted from the image will not only increase the complexity, but also lead to poor classification generalization effects.
[0071] At present, multi-classification on the Generative Adversarial Networks (GAN) model has achieved a high accuracy rate, but it is limited to model-level tracing, and can only trace the images generated by the model with specific training initialization seeds, loss functions and data sets. Reverse engineering technology mostly relies on prior knowledge of the model, which limits its extensiveness and accuracy in practical applications. To solve the above problems, the application proposes an image tracing method, device, equipment, medium, program product and chip.
[0072] See also Figure 1 FIG. 1 is a flow chart of an image tracing method according to an exemplary embodiment. Figure 1The method shown can be applied to a computer device, and the method includes the following implementation steps:
[0073] S101, obtaining an image to be traced.
[0074] The above-mentioned image to be traced in the present application may refer to an image waiting to be traced, which may include but is not limited to, for example, a depth synthesis image (also referred to as a depth image), a color image, a grayscale image, a binary image or other custom images.
[0075] The present application does not limit the implementation method of acquiring the above-mentioned image to be traced, for example, it can be directly obtained from a local database, or it can be obtained from other devices (such as servers or terminals, etc.) through the network. In one possible implementation, the present application can first obtain a target image, which can be an image to be traced selected by a user or a system. Then, the present application can preprocess the above-mentioned target image to obtain the above-mentioned image to be traced. The preprocessing here may include but is not limited to, for example, image resizing, normalization, image enhancement, image segmentation or other custom image processing operations, etc., which the present application does not make too many restrictions and details. Among them, image enhancement can be to highlight certain key information in the target image according to the actual needs of the system / user, while weakening or removing certain unnecessary information. Image segmentation can be to segment out certain local areas of interest in the image according to the actual needs of the system / user, so as to perform subsequent operations such as image analysis.
[0076] S102: Perform multi-dimensional feature extraction on the image to be traced to obtain multi-dimensional feature information of the image to be traced.
[0077] The present application can perform feature extraction on the above-mentioned image to be traced from different dimensions, so as to obtain multi-dimensional feature information of the above-mentioned image to be traced. The dimensions involved in the present application can be determined according to actual conditions, which may include but are not limited to any one or more of the following combinations: pixel noise dimension, time domain feature dimension, frequency domain feature dimension, local feature dimension, spatial feature dimension, color feature dimension, texture feature dimension, shape feature dimension, depth feature dimension (such as convolutional neural network CNN feature dimension, etc.), statistical feature dimension, structural feature dimension, scale-invariant feature transform (Scale-Invariant Feature Transform, SIFT) feature dimension or other custom feature extraction dimension, etc. The feature extraction corresponding to these dimensions will be described in detail below in this application, and will not be introduced here.
[0078] S103 . Perform difference analysis on the multi-dimensional feature information to obtain multi-dimensional difference information of the image to be traced, where the multi-dimensional difference information is used to indicate difference features of the image to be traced in multiple dimensions.
[0079] The above-mentioned multi-dimensional difference information of the present application can be used to indicate / reflect the difference characteristics of the above-mentioned image to be traced in the above-mentioned multi-dimensional aspects. These difference characteristics also reflect the unique or subtle characteristic traces left by the above-mentioned image to be traced during the image synthesis / generation process, such as pixel-level noise patterns, spectral distribution characteristics and other difference characteristics. The present application does not make too many limitations and details on this.
[0080] S104: Perform image tracing based on the multi-dimensional difference information to obtain a corresponding tracing result, where the tracing result is at least used to indicate the tracing category to which the image to be traced belongs.
[0081] In the present application, the above-mentioned tracing result may refer to the result after tracing the above-mentioned image to be traced, which may include but is not limited to the tracing category to which the above-mentioned image to be traced belongs, for example, whether the above-mentioned image to be traced is a synthetic image, such as an image generated by artificial intelligence (AI) or a deep synthetic image, etc.; the image source of the above-mentioned image to be traced (such as a website platform, etc.); the device source of the above-mentioned image to be traced (such as the image shooting device, etc.); the dissemination path of the above-mentioned image to be traced; the modification history of the above-mentioned image to be traced or other relevant information used to describe the above-mentioned image to be traced, etc., and the present application does not make too many restrictions and details on this.
[0082] The computer equipment involved in this application may refer to a server, an electronic device or other equipment with image processing capabilities. The electronic device may also be referred to as a terminal device, a user equipment (UE), a mobile station (MS), a mobile terminal device (MT), etc. The electronic device may be a car with communication function, a smart car, a mobile phone (Mobile Phone), a wearable device, a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (Virtual Reality, VR) terminal device, an augmented reality (Augmented Reality, AR) terminal device, a wireless terminal device in industrial control (Industrial Control), a wireless terminal device in self-driving, a wireless terminal device in remote medical surgery, a wireless terminal device in smart grid (Smart Grid), a wireless terminal device in transportation safety (Transportation Safety), a wireless terminal device in smart city (Smart City), a wireless terminal device in smart home (Smart Home), etc. The embodiments of this application do not limit the specific technology and specific device form adopted by the above-mentioned computer equipment.
[0083] By implementing the embodiments of the present application, a computer device obtains an image to be traced; performs multi-dimensional feature extraction on the image to be traced to obtain multi-dimensional feature information of the image to be traced; performs difference analysis on the multi-dimensional feature information to obtain multi-dimensional difference information of the image to be traced, and the multi-dimensional difference information is used to indicate the difference characteristics of the image to be traced in multiple dimensions; performs image tracing based on the multi-dimensional difference information to obtain a corresponding tracing result, and the tracing result is at least used to indicate the tracing classification to which the image to be traced belongs. The present application can trace the image to be traced by comprehensively and systematically analyzing the multi-dimensional feature information of the image to be traced, and further performing multi-dimensional feature difference analysis on the above-mentioned multi-dimensional feature information, which can not only improve the accuracy and reliability of image tracing, but also solve the technical problems existing in traditional image tracing solutions, such as affecting the accuracy of image tracing and limited application scope.
[0084] In step S102, the present application does not limit the specific implementation of the above multi-dimensional feature extraction, which can be determined according to actual conditions. For example, it can include but is not limited to any one or more combinations of the following implementations:
[0085] In one embodiment, the above-mentioned multiple dimensions include a pixel noise dimension. The present application may perform pixel noise extraction on the above-mentioned image to be traced, so as to obtain the pixel noise characteristic information of the above-mentioned image to be traced. In a specific implementation, the present application may adopt a noise extraction method to extract the pixel noise characteristic information of the above-mentioned image to be traced. The noise extraction method may include but is not limited to, for example, mean filtering, median filtering, Gaussian filtering, statistical sorting filtering, wavelet denoising or other custom noise extraction methods, etc., which the present application does not limit or elaborate too much. The noise extraction here can be to extract / suppress the noise of the image to be traced while retaining the image detail features, so as to improve the effectiveness and reliability of subsequent image tracing.
[0086] In another embodiment, the above-mentioned multiple dimensions include a time domain feature dimension. The present application can perform time domain feature extraction on the above-mentioned image to be traced, so as to analyze the temporal change characteristics of the above-mentioned image to be traced, and obtain the time domain feature information of the above-mentioned image to be traced. The time domain feature extraction here can analyze the change feature information of the above-mentioned image to be traced in time, which is conducive to improving the accuracy and reliability of subsequent image tracing.
[0087] In another embodiment, the above-mentioned multiple dimensions include frequency domain feature dimensions. The present application can perform frequency domain feature extraction on the above-mentioned image to be traced, so as to analyze the change characteristics of the above-mentioned image to be traced in frequency, such as spectrum distribution characteristics / features, etc., and obtain the frequency domain feature information of the above-mentioned image to be traced. The frequency domain feature extraction here can analyze the change feature information of the above-mentioned image to be traced in the frequency domain, which is conducive to improving the accuracy and reliability of subsequent image tracing.
[0088] In practical applications, the present application may use a convolutional neural network (CNN) to extract the frequency domain feature information of the above-mentioned image to be traced. In specific implementation, for example, the present application may first use a discrete cosine Fourier transform (DTC) to convert the above-mentioned image to be traced from the spatial domain to the frequency domain, and obtain a corresponding frequency domain feature vector, for example, including N vectors. N is a positive integer pre-customized by the system according to actual conditions, such as N is 64, etc. Then, the N vectors are sampled to a fixed length L, where L is a positive integer custom-set by the system according to actual needs, such as L is 250, etc. Finally, the N vectors of fixed length L are combined into an N×L matrix vector, input into the convolutional neural network, and processed by the fully connected layer and activation function in the convolutional neural network to obtain the frequency domain feature information of the above-mentioned image to be traced. The frequency domain feature information includes more detailed image details and texture information, which is conducive to improving the accuracy and reliability of subsequent image tracing.
[0089] In another embodiment, the above-mentioned multiple dimensions include local feature dimensions. The present application can extract local features of interest from the above-mentioned image to be traced, so as to analyze the key feature information of the user-specified or interested area in the above-mentioned image to be traced, and obtain the local feature information of the above-mentioned image to be traced. The local feature extraction here can not only reduce the amount of equipment calculation, but also save equipment resources, such as computing resources and storage resources, and can also improve the accuracy and reliability of subsequent image tracing.
[0090] In another embodiment, the above-mentioned multiple dimensions include spatial feature dimensions. The present application can perform spatial feature extraction on the above-mentioned image to be traced, so as to analyze the key feature information of the pixels of the above-mentioned image to be traced in space, and obtain the spatial feature information of the above-mentioned image to be traced. The spatial feature dimension here can capture the geometric shape and structure of the image by combining techniques such as points (such as Harris corner points, SIFT), lines (such as Hough transform) and surfaces (such as image segmentation), which is conducive to improving the accuracy and reliability of subsequent image tracing.
[0091] In another embodiment, the multiple dimensions include color feature dimensions. The present application can extract color features from the image to be traced, for example, by using color histogram, color moment quantization, color distribution and statistical characteristics to extract features, thereby obtaining color feature information of the image to be traced.
[0092] In another embodiment, the above-mentioned multiple dimensions include texture feature dimensions. The present application can extract texture features from the above-mentioned image to be traced, for example, gray level co-occurrence matrix, local binary pattern and other means can be used to describe the texture structure of different regions in the above-mentioned image to be traced, so as to obtain texture feature information of the above-mentioned image to be traced.
[0093] In another embodiment, the multiple dimensions include shape feature dimensions. The present application can extract shape features from the image to be traced, for example, by obtaining object contour and shape information through edge detection and contour extraction, thereby obtaining shape feature information of the image to be traced.
[0094] In another embodiment, the multi-dimensionality includes a depth feature dimension. The present application can perform deep feature extraction on the above-mentioned image to be traced, so as to obtain the depth feature information of the above-mentioned image to be traced. For example, the present application can use a deep learning model to learn and extract different levels of feature information from the above-mentioned image to be traced, and these feature information can be gradually abstracted from local (such as edges, textures) to global (such as shapes, categories). The deep learning model may include, but is not limited to, for example, a visual transformation model (Vision Transformers), a residual network model (ResNet), a deep neural network with aggregated residual transformation (ResNeXt), an improved deep residual network model (Res2Net) or other deep learning models, etc., and this application does not make too many restrictions and details.
[0095] In another embodiment, the multiple dimensions include statistical feature dimensions. The present application can extract statistical features of the image to be traced, for example, by using histogram, mean, variance, entropy, etc. to extract the statistical features of the image to be traced, thereby obtaining statistical feature information of the image to be traced.
[0096] In another embodiment, the above-mentioned multiple dimensions include structural feature dimensions. The present application can extract structural features of the above-mentioned image to be traced, such as texture analysis based on gray level co-occurrence matrix, texture analysis based on wavelet transform, texture analysis based on structure, etc., so as to obtain structural feature information of the above-mentioned image to be traced.
[0097] It should be noted that the above-mentioned implementation methods can be implemented separately or in combination with any one or more of them, which can be determined according to the actual needs of the system. This application does not make too many restrictions and details on this.
[0098] In step S103, the present application does not limit the specific implementation of the above difference analysis. For example, several possible implementations are exemplarily introduced below.
[0099] In one implementation, the present application can directly perform a difference comparison analysis on the multi-dimensional feature information, thereby analyzing and obtaining the multi-dimensional difference information of the image to be traced. The present application does not limit the specific implementation of the difference comparison analysis. For example, analysis methods such as variance analysis, regression analysis, and t-test can be used to perform a difference analysis on the multi-dimensional feature information. The present application does not make too many limitations and details on this.
[0100] In yet another embodiment, see Figure 2 FIG. 1 is a flow chart showing a difference analysis process according to an exemplary embodiment. Figure 2 The process shown may include the following implementation steps:
[0101] S201. Perform difference comparison calculation on the multi-dimensional feature information and the reference feature information of the corresponding dimension in the preset feature library to obtain feature difference information of the corresponding dimension.
[0102] In the present application, the preset feature library mentioned above may be pre-configured by the system, which may include one or more benchmark feature information. In order to ensure the accuracy and reliability of image traceability, the preset feature library includes benchmark feature information corresponding to each image in different dimensions, and usually one dimension corresponds to one benchmark feature information. The benchmark feature information is used to determine the similarity or difference of the feature information of the image in the corresponding dimension. In practical applications, the present application may combine the feature information of each dimension calculated in step S102 to form a multi-dimensional feature set, which includes the multi-dimensional feature information mentioned above. The present application may compare and analyze the benchmark feature information in the multi-dimensional feature set and the preset feature library, and then calculate the feature difference information between them.
[0103] The present application does not limit the specific implementation methods of the above-mentioned difference comparison calculation. For example, a statistical or machine learning algorithm can be used to quantitatively analyze the feature differences between multidimensional features, so as to extract significant feature difference information. These feature difference information reflects the unique or subtle traces left by the above-mentioned image to be traced during the image synthesis or generation process. Specifically, the present application can use a similarity or difference calculation method to calculate the feature difference information between the above-mentioned multidimensional feature information and the baseline feature information of the corresponding dimension in the preset feature library. For example, the present application can use a difference calculation method to identify and calculate the difference features of the above-mentioned depth feature information and the corresponding baseline feature information in the preset feature library, so as to calculate the corresponding feature difference information on the above-mentioned depth feature dimension. The above-mentioned similarity or difference calculation method can be referred to the relevant description of the traditional similarity or difference calculation method, which will not be described in detail here.
[0104] S202: Perform weighted fusion on the feature difference information of the corresponding dimensions to obtain the multi-dimensional difference information.
[0105] In order to describe the image more comprehensively, the present application can fuse the feature difference information of each of the above-mentioned multiple dimensions to obtain the above-mentioned multi-dimensional difference information. For example, the present application can use a weighted fusion method to integrate the feature difference information of different dimensions into a unified traceability feature vector to improve the richness and robustness of the feature expression. Among them, the present application does not limit the implementation method of the above-mentioned weighted fusion. For example, the present application can pre-configure corresponding weighting coefficients for different dimensions according to actual conditions. Usually, dimensions that the system pays more attention to, such as depth feature dimensions, can be configured with larger weighting coefficients.
[0106] In yet another embodiment, see Figure 3 FIG. 1 is a flow chart of another difference analysis according to an exemplary embodiment. Figure 3 The process shown may include the following implementation steps:
[0107] S301. Perform difference comparison calculation on the multi-dimensional feature information and the feature information of a preset dimension to obtain feature difference information corresponding to each of the multiple dimensions, where the preset dimension is any dimension in the multiple dimensions.
[0108] The present application can perform a difference comparison calculation on the feature information of each dimension and the feature information of the preset dimension, so as to obtain feature difference information corresponding to each dimension. The introduction of the above difference comparison calculation can be referred to the relevant introduction in the above embodiment, which will not be repeated here.
[0109] S302: weighted fusion of the feature difference information corresponding to each of the multiple dimensions to obtain the multi-dimensional difference information. The introduction of step S302 may refer to the introduction of the aforementioned step S202, which will not be repeated here.
[0110] In yet another embodiment, see Figure 4 FIG. 1 is a flow chart of another difference analysis according to an exemplary embodiment. Figure 4 The process shown may include the following implementation steps:
[0111] S401: Perform feature fusion on the multi-dimensional feature information to obtain corresponding fused feature information.
[0112] The present application does not limit the specific implementation methods of the above-mentioned feature fusion. For example, the present application can directly combine and superimpose the feature information of each dimension to obtain the above-mentioned fused feature information. For another example, the present application can use statistical or machine learning methods (such as normalization) to quantize the feature information of each dimension to obtain the quantitative feature information of the corresponding dimension; then, the quantitative feature information of each dimension is combined and superimposed to obtain the above-mentioned fused feature information, etc. For another example, the present application can use a weighted fusion method to weightedly fuse the above-mentioned multi-dimensional feature information to obtain the above-mentioned fused feature information. For the weighted fusion method, please refer to the relevant introduction in the aforementioned embodiment, which will not be repeated here.
[0113] S402: Perform difference comparison calculation on the fused feature information and the preset reference feature information to obtain the multi-dimensional difference information.
[0114] The above-mentioned preset benchmark feature information in the present application is pre-customized by the system or user according to actual conditions. For example, it can be the benchmark feature information stored in a preset benchmark feature library, or it can be calculated based on a series of experimental image data. This application does not make too many restrictions and details on this.
[0115] The present application can perform a difference comparison analysis and calculation on the above fusion feature information and the preset reference feature information, so as to obtain the above multi-dimensional difference information. The above difference comparison analysis and calculation can be referred to the relevant introduction in the above embodiment, which will not be repeated here.
[0116] In step S104, the present application does not limit the specific implementation of the above-mentioned image tracing. For example, in one implementation, the present application can directly perform image tracing based on the above-mentioned multi-dimensional difference information to obtain the corresponding tracing result. The present application does not limit the specific implementation of the above-mentioned image tracing. For example, an image tracing model can be used to perform classification tracing. The internal structure of the image tracing model is not limited in the present application. For example, see Figure 5 FIG. 1 is a schematic diagram showing the internal processing of an image tracing model according to an exemplary embodiment. Figure 5 As shown, the image tracing model may include a classification prediction network (also referred to as a classification tracing network), which may include but is not limited to a fully connected layer and an output layer. After receiving the input information (such as the above-mentioned multi-dimensional difference information), the fully connected layer further abstracts the feature information useful for tracing classification through the linear transformation of the weight matrix and the optional bias adjustment, and maps these feature information to the category space. In the output layer, the scores generated by the fully connected layer are converted into probability distributions through the activation function softmax, and these probabilities represent the possibility that the input information belongs to each category. The category corresponding to the highest probability value is the tracing classification result predicted by the above-mentioned image tracing model. This application does not make too many restrictions and details on this.
[0117] In yet another embodiment, see Figure 6 FIG. 1 is a flow chart showing an image tracing process according to an exemplary embodiment. Figure 6 The process shown may include the following implementation steps:
[0118] S601: Perform weighted fusion on the multi-dimensional feature information to obtain corresponding weighted feature information.
[0119] The present application can fuse the feature information of each dimension together to more comprehensively describe the image to be traced, thereby obtaining the corresponding weighted feature information. The specific implementation method of the above-mentioned weighted fusion can be referred to the relevant introduction in the above-mentioned embodiment, which will not be repeated here. The following is an exemplary introduction to a possible specific embodiment of its existence. In practical applications, the above-mentioned multi-dimensional feature information may include two-stream feature information, specifically including first-stream feature information and second-stream feature information, which may also be referred to as automatic stream feature information and manual stream feature information. The above-mentioned first-stream feature information (or automatic stream feature information) may refer to image feature information extracted by deep learning technology, for example, the above-mentioned deep learning feature information may be used as the above-mentioned first-stream feature information. The above-mentioned second-stream feature information (or manual stream feature information) may refer to other feature information in the above-mentioned multi-dimensional feature information except the above-mentioned first-stream feature information, for example, it may be image feature information extracted by non-deep learning technology. For example, the above-mentioned spatial feature information, the above-mentioned color feature information, the above-mentioned texture feature information, the above-mentioned shape feature information, or other feature information that needs to be manually extracted can be used as the above-mentioned second-stream feature information, etc., and this application does not make too many restrictions and details.
[0120] The present application can perform a dual-stream deep fusion of the first-stream feature information and the second-stream feature information at the feature level to obtain the weighted feature information. In this way, the generalization ability of deep learning feature information and the accuracy of manual stream feature information can be combined to provide a rich source of information for image tracing, thereby greatly improving the real-time and accuracy of image tracing, and realizing accurate and efficient identification and tracking of the generation model corresponding to the source image. Thereby, the efficiency and accuracy of image tracing are also achieved. The present application does not limit the specific implementation method of the above-mentioned deep fusion. For example, in one implementation method, the present application can use the attention mechanism (Attention) to perform weighted fusion of the first-stream feature information and the second-stream feature information, so as to highlight the response of important feature information and obtain the weighted feature information. The internal structure and specific implementation of the attention mechanism are not too limited or detailed here. In another implementation method, the present application can perform pyramid fusion of the first-stream feature information and the second-stream feature information to obtain the weighted feature information. The present application does not limit the specific implementation of the pyramid fusion. For example, atrous spatial convolutional pyramid pooling (ASPP) can be used to perform feature fusion on the first-stream feature information and the second-stream feature information. For another example, pyramid pooling can be used to perform feature pooling and fusion on the first-stream feature information and the second-stream feature information, and the present application does not make too many limitations and details on this.
[0121] S602: Classify and trace the image to be traced based on the weighted feature information and the multi-dimensional difference information to obtain the tracing result.
[0122] This application does not limit the specific implementation methods of the above classification and tracing. For example, the above image tracing model can be used to classify and trace the above weighted feature information and the above multi-dimensional difference information. In this way, the image tracing can be combined with the multi-dimensional feature information and the significant multi-dimensional difference information at the same time, which can improve the accuracy and reliability of image tracing. The introduction of the above image tracing model can be referred to the relevant introduction in the above embodiment, which will not be repeated here.
[0123] Some optional embodiments of the present application are introduced below.
[0124] In an optional embodiment, the above method of the present application can be applied to an image tracing model (also referred to as an image tracing framework). Before using the above image tracing model for image tracing, the above image tracing model needs to be trained. The training process can be applied to a training device, which may include but is not limited to the above computer device, training platform or other device with model training capabilities. Please refer to Figure 7 FIG. 1 is a flow chart showing a model training process according to an exemplary embodiment. Figure 7 The process shown can be applied to a training device, and the process may include the following implementation steps:
[0125] S701: Acquire a training sample set, where the training sample set includes at least one sample image and a true source tracing classification of the sample image.
[0126] In this application, the training sample set may include one or more sample images, and the real traceability results of each sample image, such as the real traceability classification, whether it is an AI-generated image or a deep synthetic image, etc. This application does not limit the implementation method of obtaining the training sample set, for example, it can be downloaded from a website gallery, or obtained from other devices (such as a terminal or server) through the network, etc.
[0127] S702. Use cross-validation K-Fold to divide the training sample set into a test set and (K-1) training sets, where K is a positive integer.
[0128] S703 , training the image tracing model to be trained based on the test set and (K-1) training sets to obtain the trained image tracing model.
[0129] The present application can use cross-validation (K-Fold) to evenly divide the above training sample set into K subsets. K is a positive integer customized by the system or user according to actual conditions, for example, K is 5, etc. In each model iteration training, the present application can select (K-1) subsets from the K subsets as training sets for training the above image tracing model to be trained. The remaining 1 subset is used as a test set to verify and evaluate the performance of the image tracing model. This ensures that each subset can be used as a test set in turn, which not only makes full use of all the data in the training sample set, but also reduces the risk of overfitting and underfitting. At the same time, because of multiple segmentation and testing, the model training results are more stable and reliable, thereby improving the stability, reliability and accuracy of the model training.
[0130] In another optional embodiment, the present application may use a loss function to train the image tracing model. The present application does not limit the type of the above loss function, for example, it may include but is not limited to classification loss function, cross entropy loss function or other loss functions. In order to prevent model overfitting, the present application also adopts a label smoothing regularization strategy to train the model, and specifically, a label smoothing regularization loss function may be used to train the model. That is, the above image tracing model can also be trained based on a label smoothing regularization loss function (also referred to as a label smoothing loss function). The above loss function can be specifically used to indicate the sum of the loss values between the predicted tracing classification of each sample image obtained by inference of the above image tracing model and the true tracing classification of each sample image. When the loss function of the above label smoothing regularization is a label smoothing regularization cross entropy loss function, its loss function can be specifically as shown in the following formula (1):
[0131]
[0132] Among them, L represents the cross entropy loss function of label smoothing regularization. ε∈[0,1], K represents the number of categories or the number of classifications, p(k) represents the probability of predicting belonging to category k, and p(y) represents the probability of predicting belonging to category y.
[0133] By implementing the embodiment of the present application, a computer device obtains an image to be traced; performs multi-dimensional feature extraction on the image to be traced to obtain multi-dimensional feature information of the image to be traced; performs difference analysis on the multi-dimensional feature information to obtain multi-dimensional difference information of the image to be traced, and the multi-dimensional difference information is used to indicate the difference characteristics of the image to be traced in multiple dimensions; based on the multi-dimensional difference information, image tracing is performed to obtain a corresponding tracing result, and the tracing result is at least used to indicate the tracing classification to which the image to be traced belongs. The present application can trace the source of the image to be traced by comprehensively and systematically analyzing the multi-dimensional feature information of the image to be traced, and further performing multi-dimensional feature difference analysis on the multi-dimensional feature information, so as to cope with unknown and newly appeared image generation models (models for generating the above-mentioned images to be traced), with strong generalization ability and wide applicability. At the same time, it can also improve the efficiency, accuracy and reliability of image tracing, and can also solve the technical problems existing in traditional image tracing solutions, such as affecting the accuracy of image tracing and limited application scope.
[0134] Based on the above examples, see Figure 8 FIG. 1 is a schematic diagram showing a structure of an image tracing device according to an exemplary embodiment. Figure 8 The device 800 shown can be applied to a computer device, and the device may include an acquisition module 801 and a processing module 802. Among them:
[0135] The acquisition module 801 is used to acquire the image to be traced;
[0136] The processing module 802 is used to extract multi-dimensional features of the image to be traced, so as to obtain multi-dimensional feature information of the image to be traced;
[0137] The processing module 802 is further used to perform difference analysis on the multi-dimensional feature information to obtain multi-dimensional difference information of the image to be traced, where the multi-dimensional difference information is used to indicate the difference features of the image to be traced in multiple dimensions;
[0138] The processing module 802 is further used to perform image tracing based on the multi-dimensional difference information to obtain a corresponding tracing result, and the tracing result is at least used to indicate the tracing category to which the image to be traced belongs.
[0139] In some embodiments, the processing module 802 is specifically used to:
[0140] Compare and calculate the difference between the multi-dimensional feature information and the reference feature information of the corresponding dimension in the preset feature library to obtain feature difference information of the corresponding dimension;
[0141] The feature difference information of the corresponding dimensions is weightedly fused to obtain the multi-dimensional difference information.
[0142] In some embodiments, the processing module 802 is specifically used to:
[0143] Performing feature fusion on the multi-dimensional feature information to obtain corresponding fused feature information;
[0144] The fused feature information and the preset reference feature information are compared and calculated to obtain the multi-dimensional difference information.
[0145] In some embodiments, the processing module 802 is specifically used to:
[0146] Performing weighted fusion on the multi-dimensional feature information to obtain corresponding weighted feature information;
[0147] The image to be traced is classified and traced based on the weighted feature information and the multi-dimensional difference information to obtain the tracing result.
[0148] In some embodiments, the multi-dimensional feature information includes first stream feature information and second stream feature information, the first stream feature information is feature information extracted using deep learning technology, and the second stream feature information is feature information in the multi-dimensional feature information except the first stream feature information, and the processing module 802 is specifically used to:
[0149] The first stream feature information and the second stream feature information are deeply fused to obtain the weighted feature information.
[0150] In some embodiments, the processing module 802 is specifically used to:
[0151] Using an attention mechanism to weightedly fuse the first stream feature information and the second stream feature information to obtain the weighted feature information; or,
[0152] Pyramid fusion is performed on the first stream feature information and the second stream feature information to obtain the weighted feature information.
[0153] In some embodiments, the processing module 802 is specifically configured to perform at least one of the following:
[0154] Extracting pixel noise from the image to be traced to obtain corresponding noise feature information;
[0155] Extracting time domain features of the image to be traced to obtain corresponding time domain feature information;
[0156] Extracting frequency domain features of the image to be traced to obtain corresponding frequency domain feature information;
[0157] Extracting local features of the image to be traced to obtain corresponding local feature information;
[0158] Extracting statistical features of the image to be traced to obtain corresponding statistical feature information;
[0159] Extracting depth features of the image to be traced to obtain corresponding depth feature information;
[0160] Extracting spatial features of the image to be traced to obtain corresponding spatial feature information;
[0161] Extracting color features of the image to be traced to obtain corresponding color feature information;
[0162] Extracting texture features of the image to be traced to obtain corresponding texture feature information;
[0163] Extracting shape features of the image to be traced to obtain corresponding shape feature information;
[0164] Structural features are extracted from the image to be traced to obtain corresponding structural feature information.
[0165] In some embodiments, the method is applied to an image provenance model.
[0166] The acquisition module 801 is further used to acquire a training sample set, wherein the training sample set includes at least one sample image and a true source tracing classification of the sample image;
[0167] The processing module 802 is further used to divide the training sample set by using cross-validation K-Fold to obtain a test set and (K-1) training sets, where K is a positive integer;
[0168] The processing module 802 is further used to train the image tracing model to be trained based on the test set and (K-1) training sets to obtain the trained image tracing model.
[0169] In some embodiments, the image tracing model is trained based on a label-smoothed classification loss function, and the label-smoothed classification loss function is used to indicate the sum of the loss values between the predicted tracing classification of each of the sample images obtained by inference of the image tracing model and the true tracing classification of each of the sample images.
[0170] For the contents not introduced or described in the embodiments of the present application, please refer to the relevant introduction in the aforementioned method embodiments, which will not be repeated here.
[0171] The present application also provides a computer-readable storage medium on which computer program instructions are stored. When the program instructions are executed by a processor, all or part of the steps in the above-mentioned image tracing method provided by the present application are implemented.
[0172] The present application also provides a computer program product, including a computer program and / or instructions, characterized in that when the computer program and / or instructions are executed by a processor, all or part of the steps in the above-mentioned image tracing method provided in the present application are implemented.
[0173] Fig. 9 1 is a schematic diagram of a computer device according to an exemplary embodiment. The computer device 900 may be an electronic device, a server or other device with image traceability capability. The internal structure is specifically introduced by taking the computer device 900 as an electronic device as an example. The computer device 900 may include, but is not limited to, a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0174] Reference Fig. 9 , the computer device 900 may include one or more of the following components: a processing component 902 , a memory 904 , a power component 906 , a multimedia component 908 , an audio component 910 , an input / output interface 912 , a sensor component 914 , and a communication component 916 .
[0175] The processing component 902 generally controls the overall operation of the device 900, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above-mentioned image tracing method. In addition, the processing component 902 may include one or more modules to facilitate the interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.
[0176] The memory 904 is configured to store various types of data to support operations on the device 900. Examples of such data include instructions for any application or method operating on the device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 904 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0177] The power supply component 906 provides power to the various components of the device 900. The power supply component 906 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 900.
[0178] The multimedia component 908 includes a screen that provides an output interface between the device 900 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the device 900 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0179] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC), and when the device 900 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 904 or sent via the communication component 916. In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.
[0180] The input / output interface 912 provides an interface between the processing component 902 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0181] The sensor assembly 914 includes one or more sensors for providing various aspects of status assessment for the device 900. For example, the sensor assembly 914 can detect the open / closed state of the device 900, the relative positioning of components, such as the display and keypad of the device 900, and the sensor assembly 914 can also detect the position change of the device 900 or a component of the device 900, the presence or absence of user contact with the device 900, the orientation or acceleration / deceleration of the device 900, and the temperature change of the device 900. The sensor assembly 914 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0182] The communication component 916 is configured to facilitate wired or wireless communication between the device 900 and other devices. The device 900 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0183] In an exemplary embodiment, the device 900 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform all or part of the steps in the above-mentioned image tracing method.
[0184] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 904 including instructions, and the instructions can be executed by a processor 920 of the device 900 to complete all or part of the steps in the above-mentioned image tracing method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0185] In addition to being an independent electronic device, the above-mentioned device can also be a part of an independent electronic device. For example, in one embodiment, the device can be an integrated circuit (IC) or a chip, wherein the integrated circuit can be an IC or a collection of multiple ICs; the chip can include but is not limited to the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip, SoC), etc. The above-mentioned integrated circuit or chip can be used to execute executable instructions (or codes) to implement all or part of the steps in the above-mentioned image tracing method. The executable instructions can be stored in the integrated circuit or chip, or can be obtained from other devices or equipment. For example, the integrated circuit or chip includes a processor, a memory, and an interface for communicating with other devices. The executable instructions can be stored in the memory, and when the executable instructions are executed by the processor, all or part of the steps in the above-mentioned image tracing method are implemented. Alternatively, the integrated circuit or chip may receive executable instructions through the interface and transmit the instructions to the processor for execution, so as to implement all or part of the steps in the above-mentioned image tracing method.
[0186] In another exemplary embodiment, a computer program product is also provided. The computer program product includes a computer program that can be executed by a programmable device. When the computer program is executed by the programmable device, it is used to execute all or part of the steps in the above-mentioned image tracing method.
[0187] See also Fig.10 FIG. 1 is a schematic diagram showing the structure of a chip according to an exemplary embodiment. Fig.10 The chip 1000 shown includes a processor 1001 and an interface 1002. Optionally, it may also include a memory 1003. The number of the processors 1001 may be one or more, and the number of the interfaces 1002 may be multiple.
[0188] In one embodiment, for a chip used to implement the method embodiment described in this application:
[0189] The interface 1002 is used to receive or output signals;
[0190] The processor 1001 is used to execute part or all of the contents in the embodiment of the image tracing method.
[0191] Understandably, the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, a digital signal processor (DigitalSignal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0192] Understandably, the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0193] It should be noted here that the description of the above storage medium, device and chip embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium, storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0194] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the present application. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0195] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. An image tracing method, characterized in that: include: Obtain the image to be traced; Performing multi-dimensional feature extraction on the image to be traced to obtain multi-dimensional feature information of the image to be traced; Performing difference analysis on the multi-dimensional feature information to obtain multi-dimensional difference information of the image to be traced, wherein the multi-dimensional difference information is used to indicate difference features of the image to be traced in multiple dimensions; Image tracing is performed based on the multi-dimensional difference information to obtain a corresponding tracing result, and the tracing result is at least used to indicate the tracing category to which the image to be traced belongs.
2. The method according to claim 1, characterized in that: The performing difference analysis on the multi-dimensional feature information to obtain the multi-dimensional difference information of the image to be traced includes: Compare and calculate the difference between the multi-dimensional feature information and the reference feature information of the corresponding dimension in the preset feature library to obtain feature difference information of the corresponding dimension; The feature difference information of the corresponding dimensions is weightedly fused to obtain the multi-dimensional difference information.
3. The method according to claim 1, characterized in that: The performing difference analysis on the multi-dimensional feature information to obtain the multi-dimensional difference information of the image to be traced includes: Performing feature fusion on the multi-dimensional feature information to obtain corresponding fused feature information; The fused feature information and the preset reference feature information are compared and calculated to obtain the multi-dimensional difference information.
4. The method according to claim 1, characterized in that The image tracing is performed based on the multi-dimensional difference information to obtain the corresponding tracing result, including: Performing weighted fusion on the multi-dimensional feature information to obtain corresponding weighted feature information; The image to be traced is classified and traced based on the weighted feature information and the multi-dimensional difference information to obtain the tracing result.
5. The method according to claim 4, characterized in that The multi-dimensional feature information includes first stream feature information and second stream feature information, the first stream feature information is feature information extracted using deep learning technology, and the second stream feature information is feature information in the multi-dimensional feature information except the first stream feature information, and the weighted fusion of the multi-dimensional feature information to obtain the corresponding weighted feature information includes: The first stream feature information and the second stream feature information are deeply fused to obtain the weighted feature information.
6. The method according to claim 5, characterized in that The deeply fusing the first stream feature information and the second stream feature information to obtain the weighted feature information includes: Using an attention mechanism to weightedly fuse the first stream feature information and the second stream feature information to obtain the weighted feature information; or, Pyramid fusion is performed on the first stream feature information and the second stream feature information to obtain the weighted feature information.
7. The method according to claim 1, characterized in that The performing multi-dimensional feature extraction on the image to be traced to obtain multi-dimensional feature information of the image to be traced includes at least any one of the following: Extracting pixel noise from the image to be traced to obtain corresponding noise feature information; Extracting time domain features of the image to be traced to obtain corresponding time domain feature information; Extracting frequency domain features of the image to be traced to obtain corresponding frequency domain feature information; Extracting local features of the image to be traced to obtain corresponding local feature information; Extracting statistical features of the image to be traced to obtain corresponding statistical feature information; Extracting depth features of the image to be traced to obtain corresponding depth feature information; Extracting spatial features of the image to be traced to obtain corresponding spatial feature information; Extracting color features of the image to be traced to obtain corresponding color feature information; Extracting texture features of the image to be traced to obtain corresponding texture feature information; Extracting shape features of the image to be traced to obtain corresponding shape feature information; Structural features are extracted from the image to be traced to obtain corresponding structural feature information.
8. The method according to claim 1, characterized in that The method is applied to an image tracing model, and the method further includes: Acquire a training sample set, wherein the training sample set includes at least one sample image and a true source tracing classification of the sample image; The training sample set is divided into a test set and (K-1) training sets by using cross validation K-Fold, where K is a positive integer; The image tracing model to be trained is trained based on the test set and (K-1) training sets to obtain the trained image tracing model.
9. The method according to claim 8, characterized in that The image tracing model is obtained by training based on a label-smoothed classification loss function, and the label-smoothed classification loss function is used to indicate the sum of the loss values between the predicted tracing classification of each sample image obtained by reasoning with the image tracing model and the true tracing classification of each sample image.
10. A computer device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the executable instructions to implement the steps of the method according to any one of claims 1 to 9.
Citation Information
Cited By
Commodity traceability management intelligent anti-counterfeiting method and system based on Internet of Things
CN121391301A