False image detection method and related device
By combining the false image detection method of multi-layer perceptron and support vector machine, the problem of reduced false image detection performance in the existing technology is solved, the detection ability of new forgery technology is improved, and higher accuracy and adaptability are achieved. .
Patent Information
- Application Number
- CN202411164263.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-08-23
AI Technical Summary
When faced with new and unseen counterfeiting technologies, existing false image detection methods suffer significant decline in detection performance and lack sufficient generalization and adaptability, resulting in low accuracy.
Using a method that combines the multi-layer perceptron classification model and the support vector machine classification model, the target feature encoding model is used to extract features of the image to be detected, and the image is classified based on the multi-layer perceptron and the support vector machine, using the prediction of the multi-layer perceptron. The training model maintains the detection performance of known forgery methods and improves the detection performance of unknown forgery methods through support vector machines.
It improves the accuracy of false image detection, achieves a good balance between adaptability to new samples and catastrophic forgetting, effectively controls the risk of small sample overfitting, improves the generalization ability and adaptability of the model, and reduces training time. .
Smart Images

Figure CN118711046A
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of artificial intelligence, and more specifically to a false image detection method and related devices. Background Art
[0002] With the rapid development of generative artificial intelligence technology, the editing of multimedia content such as images has become increasingly convenient and efficient. However, like a double-edged sword, generative artificial intelligence has greatly enriched the possibilities of creative expression, while also giving rise to a series of risks and challenges that cannot be ignored, especially the increasing prominence of information authenticity and misleading issues. This type of technology may be used maliciously to generate false or misleading images. At present, the mainstream false image detection method mainly relies on deep learning technology to learn discriminative features from large-scale annotated data to identify true and false. First, it is necessary to collect and clean real images from the Internet, and then produce a large number of realistic false image samples based on a variety of known image forgery algorithms or software. Finally, the deep learning classification model is trained based on the constructed data set to distinguish true from false. However, this type of method shows excellent detection performance for known forgery methods, but its detection performance is significantly reduced for data produced by new and unseen forgery techniques. This is because deep learning models often overfit the patterns in the training data, and once new forgery methods appear, they lack sufficient generalization and adaptability. Therefore, the accuracy of false image detection in existing technologies is low. Summary of the invention
[0003] The embodiments of the present application provide a false image detection method and related devices, which can improve the accuracy of false image detection.
[0004] In a first aspect, an embodiment of the present application provides a false image detection method, the method comprising: Acquire the image to be detected; Extracting features of the image to be detected based on a target feature coding model to obtain target image features of the image to be detected; Performing image classification on the image to be detected based on the multi-layer perceptron classification model and the target image features to obtain a first image classification result; Performing image classification on the image to be detected based on a support vector machine classification model and the target image features to obtain a second image classification result, wherein the multi-layer perceptron classification model is trained based on a first image training set, the support vector machine classification model is trained based on a second image training set, the second image training set is a subset of the first image training set, and the first image training set and the second image training set are different sets; A target image classification result of the image to be detected is determined based on the first image classification and the second image classification results.
[0005] In one embodiment, the false image detection method includes: Acquire a first image training set, wherein the first image training set includes a plurality of first image samples and corresponding first annotation labels, and the first annotation labels are real categories or false categories; Training an initial feature encoding model and a first initial classification model based on the first image training set to obtain the target feature encoding model and the multi-layer perceptron classification model; Filtering a second image training set from the first image training set; The target feature encoding model is frozen, and a second initial classification model is trained based on the second image training set to obtain the support vector machine classification model.
[0006] In one embodiment, the training of the initial feature encoding model and the first initial classification model based on the first image training set to obtain the target feature encoding model and the multi-layer perceptron classification model includes: Inputting a plurality of first image samples in the first image training set into the initial feature coding model to obtain sample features corresponding to each of the first image samples; Inputting sample features corresponding to each of the first image samples into the first initial classification model to obtain a model classification result; Calculating classification loss based on the first annotation label of each of the first image samples and the model classification result; Calculating contrast loss based on sample features corresponding to each of the first image samples and the first image training set; determining a total loss based on the classification loss and the contrast loss; The initial feature encoding model and the first initial classification model are iteratively updated based on the total loss to obtain the target feature encoding model and the multi-layer perceptron classification model.
[0007] In one embodiment, the step of selecting the second image training set from the first image training set includes: Filtering the false image samples belonging to the false category in the first image training set to obtain a false sample set; Filtering real image samples belonging to real categories in the first image training set to obtain a real sample set; The real sample set and the false sample set are combined to obtain the second image training set.
[0008] In one embodiment, the step of screening the false image samples belonging to the false category in the first image training set to obtain the false sample set includes: Inputting the false image samples in the first image training set into the target feature encoding model to obtain false image features of the false image samples; Determine an average value of the false image features of all the false image samples in the first image training set as an average false image feature; Calculating the feature similarity between each of the false image features and the false image average feature respectively; Determine a first preset number of false image samples ranked top in descending order in terms of feature similarity with the average feature of the false image as a first screening sample set, wherein the first preset number is less than the number of false image samples in the first image training set; A second preset number of the false image samples and the corresponding first annotation labels are randomly selected from the first screening sample set as the false sample set, wherein the second preset number is smaller than the first preset number.
[0009] In one embodiment, the first image training set includes a plurality of first image samples, a plurality of first annotation labels corresponding to the first image samples, and a second annotation label of the first image samples belonging to a false category, wherein the second annotation label is one of a plurality of forgery methods, and the freezing of the target feature encoding model and training a second initial classification model based on the second image training set to obtain the support vector machine classification model include: Acquire a third image training set, wherein the third image training set includes a plurality of second image samples, a plurality of first annotation labels corresponding to the second image samples, and a second annotation label of the second image samples belonging to a false category, and the second annotation label in the third image training set is different from the second annotation label of the first image training set; Combining the second image training set and the third image training set to obtain a fourth image training set, wherein the number of image samples in the fourth image training set is less than that in the first image training set; The target feature encoding model is frozen, and the second initial classification model is trained based on the fourth image training set to obtain the support vector machine classification model.
[0010] In one embodiment, freezing the target feature encoding model and training the second initial classification model based on the fourth image training set to obtain the support vector machine classification model includes: Dividing the fourth image training set into K subsets; Determine the K subsets as validation sets respectively, and determine the subsets of the K subsets other than the validation sets as target training sets; Obtaining multiple sets of candidate training parameters for the second initial classification model; Freezing the target feature encoding model, using the candidate training parameters as fixed parameters of the second initial classification model, and training the second initial classification model based on the first image training set to obtain a third initial classification model corresponding to the target training set; Verifying the third initial classification model corresponding to the target training set based on the verification set corresponding to the target training set, and obtaining a model verification parameter of the third initial classification model corresponding to the target training set; Determine the total verification parameter of the candidate training parameter based on the model verification parameters of the third initial classification model corresponding to the plurality of target training sets; Determine the candidate training parameters whose total verification parameters meet preset conditions as target training parameters; Freeze the target feature encoding model, use the target training parameters as fixed parameters of the second initial classification model, and train the second initial classification model based on the fourth image training set to obtain the support vector machine classification model.
[0011] In a second aspect, an embodiment of the present application provides a false image detection device having a function of implementing the false image detection method provided in the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, and the modules can be software and / or hardware.
[0012] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which includes instructions, which, when executed on a computer, enables the computer to execute the false image detection method as described in the first aspect.
[0013] In a fourth aspect, an embodiment of the present application provides a computing device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the false image detection method described in the first aspect when executing the computer program.
[0014] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor coupled to a transceiver of a terminal device, and is used to execute the technical solution provided in the first aspect of the embodiment of the present application.
[0015] In a sixth aspect, an embodiment of the present application provides a chip system, which includes a processor for supporting a terminal device to implement the functions involved in the first aspect above.
[0016] In a possible design, the chip system further includes a memory, which is used to store program instructions and data required by the terminal. The chip system can be composed of a chip, or can include a chip and other discrete devices.
[0017] In a seventh aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the false image detection method described in the first aspect above.
[0018] Compared with the prior art, in an embodiment of the present application, an image to be detected is obtained; feature extraction is performed on the image to be detected based on a target feature encoding model to obtain target image features of the image to be detected; image classification is performed on the image to be detected based on a multi-layer perceptron classification model and target image features to obtain a first image classification result; image classification is performed on the image to be detected based on a support vector machine classification model and target image features to obtain a second image classification result; wherein the multi-layer perceptron classification model is trained based on a first image training set, and the support vector machine classification model is trained based on a second image training set, the second image training set is a subset of the first image training set, and the first image training set and the second image training set are different sets; and the target image classification result of the image to be detected is determined based on the first image classification and the second image classification results. The present application is based on a combination of a multi-layer perceptron classifier and a support vector machine classifier. The pre-trained multi-layer perceptron classifier can maintain the detection performance of data with known forgery methods, and the support vector machine classifier can improve the detection performance of data with unknown forgery methods. The multi-layer perceptron classification model is trained based on a first image training set, and the support vector machine classification model is trained based on a second image training set, and the second image training set is a subset of the first image training set. The prediction results of the multi-layer perceptron classifier and the support vector machine classifier are combined to improve the accuracy of false image detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] By reading the detailed description of the embodiments of the present application with reference to the accompanying drawings, the objectives, features and advantages of the embodiments of the present application will become easy to understand. Among them: Figure 1 A schematic diagram of a false image detection system of a false image detection method in an embodiment of the present application; Figure 2 A schematic diagram of a flow chart of a false image detection method provided in an embodiment of the present application; Figure 3 A schematic diagram of the structure of a false image detection device according to an embodiment of the present application; Figure 4 A schematic diagram of a structure of a computing device according to an embodiment of the present application; Figure 5 A schematic diagram of the structure of a mobile phone in an embodiment of the present application; Figure 6 A schematic diagram of the structure of a server in an embodiment of the present application.
[0020] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0021] The terms "first", "second", etc. in the specification and claims of the embodiments of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described here can be implemented in an order other than the content illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device including a series of steps or modules need not be limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The division of the modules that appear in the embodiments of the present application is only a logical division. There may be other division methods when implemented in practical applications, such as multiple modules can be combined into or integrated in another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling between modules, and the communication connection can be electrical or other similar forms, which are not limited in the embodiments of the present application. Furthermore, the modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in multiple circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiment of the present application.
[0022] The general model is currently widely used in chat dialogue, text editing, artistic creation, coding, mathematical reasoning, bioinformatics and other application scenarios. Although it has created many new business models and is very powerful, after the general model is launched for users to use, there are mainly algorithmic risks, data risks and application risks in the three types of applications: translation, chat and collaboration.
[0023] The embodiment of the present application also provides a false image detection method and related device, which can be applied to a false image detection system. The false image detection system may include a false image detection device, which can be deployed in an integrated manner or separately. The false image detection device is used at least to obtain an image to be detected; extract features of the image to be detected based on a target feature encoding model to obtain target image features of the image to be detected; classify the image to be detected based on a multi-layer perceptron classification model and target image features to obtain a first image classification result; classify the image to be detected based on a support vector machine classification model and target image features to obtain a second image classification result; determine the target image classification result of the image to be detected based on the first image classification and the second image classification results.
[0024] The solutions provided in the embodiments of the present application involve technologies such as artificial intelligence (AI), computer vision (CV), and machine learning (ML), which are specifically described by the following embodiments: Among them, AI is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0025] AI technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0026] CV is a science that studies how to make machines "see". To put it more specifically, it refers to machine vision that uses cameras and computers to replace human eyes to identify, track and measure targets, and further performs graphic processing to make computer processing into images that are more suitable for human eye observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multi-dimensional data. Computer vision technology usually includes adversarial disturbance generation, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous positioning and map construction, and other technologies, as well as common biometric recognition technologies such as face recognition and fingerprint recognition.
[0027] Compared with the prior art, in the embodiment of the present application, an image to be detected is obtained; based on the target feature encoding model, feature extraction is performed on the image to be detected to obtain the target image feature of the image to be detected; based on the multi-layer perceptron classification model and the target image feature, image classification is performed on the image to be detected to obtain a first image classification result; based on the support vector machine classification model and the target image feature, image classification is performed on the image to be detected to obtain a second image classification result; based on the first image classification and the second image classification results, the target image classification result of the image to be detected is determined. The present application can improve the accuracy of false image detection.
[0028] In some embodiments, reference Figure 1 The false image detection method provided in the embodiment of the present application can be based on Figure 1 A false image detection system is shown. The false image detection system may include an electronic device 100 and a memory 200. The electronic device 100 may be a server or a terminal device.
[0029] It should be noted that the server involved in the embodiments of the present application can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms.
[0030] The terminal device involved in the embodiments of the present application may be a device that provides voice and / or data connectivity to a user, a handheld device with a wireless connection function, or other processing devices connected to a wireless modem. For example, a mobile phone (or "cellular" phone) and a computer with a mobile terminal, for example, a portable, pocket-sized, handheld, computer-built-in or vehicle-mounted mobile device, which exchanges voice and / or data with a wireless access network. For example, a personal communication service (English full name: Personal Communication Service, English abbreviation: PCS) phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (Wireless Local Loop, English abbreviation: WLL) station, a personal digital assistant (English full name: Personal Digital Assistant, English abbreviation: PDA) and other devices.
[0031] Reference Figure 2 , Figure 2 A flowchart of a false image detection method provided in an embodiment of the present application. The method can be performed by a false image detection device. The method includes steps 101-105: Step 101: Acquire an image to be detected.
[0032] In the embodiment of the present application, the image to be detected can be any image that needs to be detected.
[0033] Step 102: extract features of the image to be detected based on the target feature encoding model to obtain target image features of the image to be detected.
[0034] In the embodiment of the present application, before extracting features of the image to be detected based on the target feature encoding model and obtaining the target image features of the image to be detected, the following steps are included: (1) Obtain the first image training set.
[0035] The first image training set includes a plurality of first image samples and corresponding first annotation labels, and the first annotation labels are real categories or false categories.
[0036] Specifically, the first image training set is recorded as ,remember represents the input space, represents the output space, Indicates that Data on large-scale known forgery methods. Representation sample The first annotation label, that is, the true label, The value is 0 or 1, 0 represents the true category and 1 represents the false category.
[0037] (2) Based on the first image training set, an initial feature encoding model and a first initial classification model are trained to obtain a target feature encoding model and a multi-layer perceptron classification model.
[0038] In the embodiment of the present application, in the first image training set Train the initial feature encoding model on and a first initial classification model based on a multilayer perceptron until convergence conditions are reached.
[0039] Among them, the multilayer perceptron classification model and the support vector machine classification model are different types of classification models. Specifically, the multilayer perceptron classification model can be a classification model built based on a multilayer perceptron (Multilayer Perceptron, MLP). The support vector machine classification model is based on a support vector machine ( , ) Classification model constructed
[0040] Correspondingly, the first initial classification model is a multi-layer perceptron classification model before training, and the second initial classification model is a support vector machine classification model before training.
[0041] In a specific embodiment, training an initial feature encoding model and a first initial classification model based on a first image training set to obtain a target feature encoding model and a multi-layer perceptron classification model includes: 2-1. Input a plurality of first image samples in a first image training set into an initial feature coding model to obtain sample features corresponding to each first image sample.
[0042] In the embodiment of the present application, the sample feature corresponding to the i-th first image sample can be recorded as .
[0043] 2-2. Input the sample features corresponding to each first image sample into the first initial classification model to obtain the model classification result.
[0044] Specifically, the model classification result is the probability that the first image sample is classified as a false category. The probability that the i-th first image sample is classified as a false category is For the sample After the initial feature encoding model extracts features, it is sent to the first initial classification model to obtain the probability .
[0045] 2-3. Calculate the classification loss based on the first annotation label of each first image sample and the model classification result.
[0046] Specifically, the classification loss The calculation is as follows:
[0047] in, Represents the first image training set The total number of samples in Representation sample The first annotation label, The value is 0 or 1, 0 represents the true category and 1 represents the false category.
[0048] 2-4. Calculate the contrast loss based on the sample features corresponding to each first image sample and the first image training set.
[0049] In the embodiment of the present application, in order to further enhance the distinguishability of real features and forged features, the features extracted by the feature encoder are subjected to a supervised contrast learning loss function, which aims to narrow the distance between samples of the same category and push the distance between samples of different categories. Calculated by the following formula:
[0050] in, Represents the first image training set The total number of samples in Represents the sample features of the i-th first image sample and the sample features of the kth first image sample The similarity score between them is calculated by using cosine similarity or inner product. represents the temperature parameter, which is used to adjust the smoothness of the similarity score. represents the indicator function, when 1 if the sample is 0, otherwise it is 0, ensuring that the sample itself is excluded from the calculation. Represents the first image training set The feature set of the first image samples that have the same label as the i-th first image sample.
[0051] 2-5. Determine the total loss based on the classification loss and contrast loss.
[0052] In a specific embodiment, the classification loss and the contrast loss are weighted and summed based on the weight coefficient of the classification loss and the weight coefficient of the contrast loss to obtain the total loss.
[0053] Specifically, the classification loss and contrast loss The weighted sum is used as the total loss to guide the update of the parameters of the feature encoder and the first initial classification model. Calculated by the following formula:
[0054] in, yes The weight coefficient of .
[0055] 2-6. Iteratively update the initial feature encoding model and the first initial classification model based on the total loss to obtain the target feature encoding model and the multi-layer perceptron classification model.
[0056] In an embodiment of the present application, the initial feature encoding model and the first initial classification model are iteratively updated based on the total loss until a preset stop condition is met, thereby obtaining a target feature encoding model and a multi-layer perceptron classification model.
[0057] In a specific embodiment, the preset stop condition is that the total loss is not greater than the preset loss value. It is determined whether the total loss is greater than the preset loss value. If the total loss is greater than the preset loss value, the model parameters of the initial feature encoding model and the first initial classification model are updated to obtain a new total loss. When the new total loss is not greater than the preset loss value, it is determined that the preset stop condition is met, and the initial feature encoding model and the first initial classification model at this time are determined as the target feature encoding model and the multi-layer perceptron classification model.
[0058] In another specific embodiment, the preset stop condition is that the total loss is not greater than the preset loss value or the number of iterations is greater than the preset number of iterations. It is determined whether the total loss is greater than the preset loss value and whether the number of iterations is greater than the preset number of iterations. If the total loss is greater than the preset loss value and the number of iterations is not greater than the preset number of iterations, the model parameters of the initial feature encoding model and the first initial classification model are updated and the number of iterations is updated to obtain a new total loss and a new number of iterations. When the new total loss is not greater than the preset loss value or the new number of iterations is greater than the preset number of iterations, it is determined that the preset stop condition is met, and the initial feature encoding model and the first initial classification model at this time are determined as the target feature encoding model and the multi-layer perceptron classification model.
[0059] (3) Filter out the second image training set from the first image training set.
[0060] In a specific embodiment, selecting the second image training set from the first image training set includes: randomly selecting the second image training set from the first image training set. The number of image samples in the first image training set is greater than the number of image samples in the second image training set.
[0061] In another specific embodiment, selecting the second image training set from the first image training set includes: 3-1. A false sample set is obtained by screening false image samples belonging to the false category in the first image training set.
[0062] The number of false image samples in the false sample set is less than the number of false image samples in the first image training set.
[0063] In an embodiment of the present application, a false sample set is obtained by screening false image samples belonging to a false category in a first image training set, including: inputting the false image samples in the first image training set into a target feature encoding model to obtain false image features of the false image samples; determining the average value of the false image features of all false image samples in the first image training set as the false image average feature; respectively calculating the feature similarity between each false image feature and the false image average feature; determining a first preset number of false image samples that are ranked top in terms of feature similarity with the false image average feature from large to small as a first screening sample set, wherein the first preset number is less than the number of false image samples in the first image training set; and randomly selecting a second preset number of false image samples and corresponding first annotation labels from the first screening sample set as the false sample set, wherein the second preset number is less than the first preset number.
[0064] 3-2. A real sample set is obtained by screening real image samples belonging to the real category in the first image training set.
[0065] In the embodiment of the present application, a real sample set is obtained by screening real image samples belonging to the real category in the first image training set, including: inputting the real image samples in the first image training set into the target feature encoding model to obtain the real image features of the real image samples; determining the average value of the real image features of all real image samples in the first image training set as the real image average feature; respectively calculating the feature similarity between each real image feature and the real image average feature; determining a third preset number of real image samples and the corresponding first annotation labels whose feature similarity with the real image average feature falls within a preset similarity range as the second screening sample set, and randomly collecting a fourth preset number of real image samples and the corresponding first annotation labels in the second screening sample set to obtain the real sample set. The third preset number is less than the number of real image samples in the first image training set, and the fourth preset number is less than the third preset number. The preset similarity range includes the median of the feature similarity between each real image feature and the real image average feature.
[0066] 3-3. Merge the real sample set and the false sample set to obtain the second image training set.
[0067] (4) Freeze the target feature encoding model, and train the target feature encoding model and the second initial classification model based on the second image training set to obtain a support vector machine classification model.
[0068] In a specific embodiment, the target feature encoding model is frozen, and the target feature encoding model and the second initial classification model are trained based on the second image training set to obtain a support vector machine classification model. Specifically, multiple image samples in the second image training set are input into the target feature encoding model to obtain sample features corresponding to each image sample in the second image training set; sample features corresponding to each image sample in the second image training set are input into the second initial classification model to obtain model classification results; classification loss is calculated based on the first annotation label corresponding to each image sample in the second image training set and the model classification result; contrast loss is calculated based on the sample features corresponding to each image sample in the second image training set and the second image training set; total loss is determined based on classification loss and contrast loss; the target feature encoding model is kept unchanged, and the second initial classification model is iteratively updated based on the total loss to obtain a support vector machine classification model.
[0069] In another specific embodiment, the first image training set includes a plurality of first image samples, first annotation labels corresponding to the plurality of first image samples, and a second annotation label of the first image sample belonging to a false category. The second annotation label is one of a plurality of forgery methods. The forgery method may be forgery method A, forgery method B, forgery method C, forgery method D, etc.
[0070] Specifically, freezing the target feature coding model, and training the target feature coding model and the second initial classification model based on the second image training set to obtain a support vector machine classification model, includes: obtaining a third image training set, wherein the third image training set includes multiple second image samples, first annotation labels corresponding to the multiple second image samples, and second annotation labels of second image samples belonging to a false category, and the second annotation labels in the third image training set are different from the second annotation labels in the first image training set; merging the second image training set and the third image training set to obtain a fourth image training set, and the number of image samples in the fourth image training set is less than the number in the first image training set; freezing the target feature coding model, and training the target feature coding model and the second initial classification model based on the fourth image training set to obtain a support vector machine classification model.
[0071] Specifically, the second image training set is recorded as , the third image training set is recorded as , indicating that Data with unknown forgery methods. Merge the second image training set and the third image training set , get the fourth image training set , the fourth image training set The feature set of sample features of the image samples in . is the sample feature of the i-th image sample.
[0072] For example, the second annotation labels in the first image training set include forgery method A and forgery method B. The second annotation labels in the third image training set include forgery method C and forgery method D. Forgery method C and forgery method D are new forgery methods.
[0073] In the embodiment of the present application, the target feature encoding model is frozen, and the target feature encoding model and the second initial classification model are trained based on the fourth image training set to obtain a support vector machine classification model, including: (1) Divide the fourth image training set into K equal subsets.
[0074] (2) The K subsets are respectively determined as validation sets, and the subsets of the K subsets other than the validation sets are determined as target training sets.
[0075] (3) Obtain multiple sets of candidate training parameters for the second initial classification model.
[0076] The candidate training parameters include parameter values of multiple preset training parameters of the second initial classification model. Specifically, multiple preset training parameters of the second initial classification model are obtained, and multiple preset training parameters are assigned values respectively to obtain a group of candidate training parameters. Multiple preset training parameters are assigned values multiple times to obtain multiple groups of candidate parameters. The parameter values of the multiple groups of candidate training parameters are different.
[0077] Specifically, the second initial classification model is an SVM classifier, and the SVM classifier uses a radial basis function (RBF) kernel. The radial basis function is as follows:
[0078] in, and is a feature set The two sample features in represents the Euclidean distance, It is the kernel function width parameter of the RBF kernel, which controls the width of the kernel function and has an important influence on the complexity and generalization ability of the model.
[0079] Among them, multiple preset training parameters are kernel function width parameter and the regularization parameter . Multiple times is the kernel function width parameter and the regularization parameter Assign values to obtain multiple sets of candidate training parameters .
[0080] (4) Freeze the target feature encoding model, use the candidate training parameters as fixed parameters of the second initial classification model, and train the second initial classification model based on the target training set to obtain a third initial classification model corresponding to the target training set.
[0081] Specifically, in the process of training the second initial classification model based on the target training set to obtain the third initial classification model corresponding to the target training set, the target feature encoding model does not change, and the preset training parameters of the second initial classification model always remain unchanged as the candidate training parameters. Fixed parameters are parameters that do not change when training the second initial classification model.
[0082] (5) Verifying the third initial classification model corresponding to the target training set based on the verification set corresponding to the target training set, and obtaining a model verification parameter of the third initial classification model corresponding to the target training set.
[0083] Specifically, the model validation parameter may be the classification loss of the third initial classification model on the validation set.
[0084] (6) Determine a total validation parameter of the candidate training parameters based on the model validation parameters of the third initial classification model corresponding to the multiple target training sets.
[0085] An average value of the model validation parameters of the third initial classification model corresponding to the multiple target training sets is determined as the total validation parameter of the candidate training parameters.
[0086] (7) The candidate training parameters whose total verification parameters meet the preset conditions are determined as the target training parameters.
[0087] Specifically, the candidate training parameter with the highest total verification parameter is determined as the target training parameter.
[0088] The candidate training parameter with the highest total validation parameter is the parameter that performs best in the cross validation, and the candidate training parameter with the highest total validation parameter is determined as the target training parameter.
[0089] (8) Freezing the target feature encoding model, using the target training parameters as fixed parameters of the second initial classification model, and training the second initial classification model based on the fourth image training set to obtain a support vector machine classification model.
[0090] Specifically, freeze the target feature encoding model, use the target training parameters as fixed parameters of the second initial classification model, input multiple image samples in the fourth image training set into the target feature encoding model, and obtain sample features corresponding to each image sample in the fourth image training set; input the sample features corresponding to each image sample in the fourth image training set into the second initial classification model to obtain model classification results; calculate the classification loss based on the first annotation label corresponding to each image sample in the fourth image training set and the model classification result; calculate the contrast loss based on the sample features corresponding to each image sample in the fourth image training set and the fourth image training set; determine the total loss based on the classification loss and the contrast loss; keep the target feature encoding model unchanged, iteratively update the second initial classification model based on the total loss, and obtain a support vector machine classification model.
[0091] Use selected parameters , the feature set corresponding to the complete fourth image training set Retrain the SVM classifier on the dataset to ensure that the model achieves optimal performance on all available data.
[0092] Step 103: classify the image to be detected based on the multi-layer perceptron classification model and the target image features to obtain a first image classification result.
[0093] In the embodiment of the present application, the first image classification result is a real category or a false category.
[0094] Specifically, the target image features are input into a multi-layer perceptron classification model to obtain a first image classification result.
[0095] Step 104 , classify the image to be detected based on the support vector machine classification model and the target image features to obtain a second image classification result.
[0096] Among them, the multi-layer perceptron classification model and the support vector machine classification model are different types of classification models.
[0097] The second image classification result is a true category or a false category.
[0098] Specifically, the target image features are input into a support vector machine classification model to obtain a second image classification result.
[0099] Step 105 : determining a target image classification result of the image to be detected based on the first image classification result and the second image classification result.
[0100] Among them, the classification result of the target image is a real category or a false category.
[0101] In a specific embodiment, if there is a false category classification result in the first image classification result and the second image classification result, the target image classification result of the image to be detected is determined to be a false category, otherwise the target image classification result of the image to be detected is determined to be a true category.
[0102] This application has the following beneficial effects: (1) Excellent adaptability to new samples and mitigation of catastrophic forgetting: By adopting a replay strategy and fixing feature encoder parameters, the present invention achieves a good balance between adaptability to new samples and catastrophic forgetting. This ensures that the model can quickly adapt to new forgery techniques while maintaining memory of old knowledge.
[0103] (2) Effectively control the risk of overfitting in small samples: By fixing the feature encoder parameters and only fine-tuning the SVM classifier, the present invention effectively reduces the risk of overfitting in small sample learning. This strategy helps maintain the stability of the model in identifying known forged samples and making accurate classification decisions on new unknown samples.
[0104] (3) Strong generalization ability and adaptability: The use of SVM classifier improves the generalization ability of the model when processing high-dimensional data. Especially when the number of samples is limited, SVM can effectively avoid overfitting and maintain good generalization performance.
[0105] (4) Improved computational efficiency: The approach of fixing feature encoder parameters reduces the training time of the model, especially in an environment with limited computing resources. This strategy enables the model to adapt to new data distributions more quickly, thus improving the real-time performance of online learning.
[0106] See also Figure 3 ,like Figure 3 The false image detection device in the embodiment of the present application can realize the above-mentioned Figure 2 The steps of the false image detection method executed in the corresponding embodiment. The functions implemented by the false image detection device can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, and the modules can be software and / or hardware.
[0107] The false image detection device 50 comprises: An acquisition module 501 is configured to acquire an image to be detected; The feature extraction module 502 is configured to extract features of the image to be detected based on the target feature encoding model to obtain target image features of the image to be detected; The first classification module 503 is configured to perform image classification on the image to be detected based on the multi-layer perceptron classification model and the target image features to obtain a first image classification result; The second classification module 504 is configured to perform image classification on the image to be detected based on the support vector machine classification model and the target image features to obtain a second image classification result; The determination module 505 is configured to determine a target image classification result of the image to be detected based on the first image classification result and the second image classification result.
[0108] The false image detection device 50 in the embodiment of the present application is described above from the perspective of modular functional entities. The false image detection device in the embodiment of the present application is described below from the perspective of hardware processing.
[0109] Figure 3 The devices shown can all have Figure 4 The structure shown, when Figure 3 The false image detection device 50 shown has the following features: Figure 4 When the structure shown is Figure 4 The processor and transceiver in the device can realize the same or similar functions as the various modules provided in the device embodiment corresponding to the device described above, Figure 4 The memory in the storage device stores a computer program that needs to be called when the processor executes the above-mentioned false image detection method.
[0110] The present application also provides a terminal device, such as Figure 5 For the sake of convenience, only the parts related to the embodiments of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiments of the present application. The terminal device can be any terminal device including a mobile phone, a tablet computer, a personal digital assistant (PDA), a point of sales (POS), a car computer, etc., taking the mobile phone as an example: Figure 5 FIG. 1 is a block diagram showing a partial structure of a mobile phone related to a terminal device provided in an embodiment of the present application. Figure 5 The mobile phone includes: a radio frequency (RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, a processor 1080, and a power supply 1090. Those skilled in the art will understand that Figure 5The mobile phone structure shown in the figure does not constitute a limitation on the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0111] Combine the following Figure 5 A detailed introduction to the various components of the mobile phone: The RF circuit 1010 can be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 1080 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 1010 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the RF circuit 1010 can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.
[0112] The memory 1020 can be used to store software programs and modules. The processor 1080 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 1020. The memory 1020 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 1020 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0113] The input unit 1030 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 1030 may include a touch panel 1031 and other input devices 1032. The touch panel 1031, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 1031 or near the touch panel 1031 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 1031 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 1080, and can receive and execute commands sent by the processor 1080. In addition, the touch panel 1031 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 1031, the input unit 1030 may further include other input devices 1032. Specifically, the other input devices 1032 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
[0114] The display unit 1040 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 1040 may include a display panel 1041. Optionally, the display panel 1041 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 1031 may cover the display panel 1041. When the touch panel 1031 detects a touch operation on or near it, it is transmitted to the processor 1080 to determine the type of touch event. Subsequently, the processor 1080 provides a corresponding visual output on the display panel 1041 according to the type of touch event. Although in Figure 5 In the embodiment, the touch panel 1031 and the display panel 1041 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 1031 and the display panel 1041 can be integrated to realize the input and output functions of the mobile phone.
[0115] The mobile phone may also include at least one sensor 1050, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1041 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 1041 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0116] The audio circuit 1060, the speaker 1061, and the microphone 1062 can provide an audio interface between the user and the mobile phone. The audio circuit 1060 can transmit the received audio data to the speaker 1061 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 1062 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1060 and converted into audio data, and then the audio data is output to the processor 1080 for processing, and then sent to another mobile phone through the RF circuit 1010, or the audio data is output to the memory 1020 for further processing.
[0117] Wi-Fi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages, and access streaming media through the Wi-Fi module 1070. It provides users with wireless broadband Internet access. Figure 5 A Wi-Fi module 1070 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.
[0118] The processor 1080 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. It executes various functions of the mobile phone and processes data by running or executing software programs and / or modules stored in the memory 1020, and calling data stored in the memory 1020, so as to monitor the mobile phone as a whole. Optionally, the processor 1080 may include one or more processing units; optionally, the processor 1080 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1080.
[0119] The mobile phone also includes a power supply 1090 (such as a battery) for supplying power to various components. Optionally, the power supply can be logically connected to the processor 1080 through a power management system, thereby managing functions such as charging, discharging, and power consumption management through the power management system.
[0120] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.
[0121] In the embodiment of the present application, the processor 1080 included in the mobile phone also has the function of controlling and executing the false image detection method process performed by the false image detection device.
[0122] The present application also provides a server. Figure 6 , Figure 6 1 is a schematic diagram of a server structure provided by an embodiment of the present application. The server 1100 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 1122 (for example, one or more processors) and memory 1132, and one or more storage media 1130 (for example, one or more mass storage devices) storing application programs 1142 or data 1144. Among them, the memory 1132 and the storage medium 1130 may be short-term storage or permanent storage. The program stored in the storage medium 1130 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1122 may be configured to communicate with the storage medium 1130 to execute a series of instruction operations in the storage medium 1130 on the server 1100.
[0123] The server 1100 may also include one or more power supplies 1126, one or more wired or wireless network interfaces 1150, one or more input and output interfaces 1158, and / or one or more operating systems 1141, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc.
[0124] The steps performed by the server in the above embodiment can be based on the Figure 6 The structure of the server 1100 shown in FIG. Figure 3 The steps performed by the false image detection device 50 shown can be based on the Figure 6 For example, the CPU 1122 calls the instructions in the memory 1132 to perform the following operations: Acquire an image to be detected; extract features of the image to be detected based on a target feature encoding model to obtain target image features of the image to be detected; classify the image to be detected based on a multi-layer perceptron classification model and target image features to obtain a first image classification result; classify the image to be detected based on a support vector machine classification model and target image features to obtain a second image classification result; determine a target image classification result of the image to be detected based on the first image classification and the second image classification results.
[0125] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0126] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0127] In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0128] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0129] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.
[0130] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.
[0131] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0132] The computer program product includes one or more computer instructions. When the computer program is loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center to another website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrations. Available media may be magnetic media, (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state drive Solid State Disk (SSD)), etc.
[0133] The technical solutions provided in the embodiments of the present application are introduced in detail above. The principles and implementation methods of the embodiments of the present application are explained by using specific examples in the embodiments of the present application. The description of the above embodiments is only used to help understand the methods and core ideas of the embodiments of the present application. At the same time, for those skilled in the art, according to the ideas of the embodiments of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the embodiments of the present application.
Claims
1. A false image detection method, characterized in that: The false image detection method comprises: Acquire the image to be detected; Extracting features of the image to be detected based on a target feature encoding model to obtain target image features of the image to be detected; Performing image classification on the image to be detected based on the multi-layer perceptron classification model and the target image features to obtain a first image classification result; Performing image classification on the image to be detected based on a support vector machine classification model and the target image features to obtain a second image classification result, wherein the multi-layer perceptron classification model is trained based on a first image training set, the support vector machine classification model is trained based on a second image training set, the second image training set is a subset of the first image training set, and the first image training set and the second image training set are different sets; A target image classification result of the image to be detected is determined based on the first image classification and the second image classification results.
2. The false image detection method according to claim 1, characterized in that: The false image detection method comprises: Acquire the first image training set, wherein the first image training set includes a plurality of first image samples and corresponding first annotation labels, and the first annotation labels are real categories or false categories; Training an initial feature encoding model and a first initial classification model based on the first image training set to obtain the target feature encoding model and the multi-layer perceptron classification model; Filtering the second image training set from the first image training set; The target feature encoding model is frozen, and a second initial classification model is trained based on the second image training set to obtain the support vector machine classification model.
3. The false image detection method according to claim 2, characterized in that: The step of training the initial feature encoding model and the first initial classification model based on the first image training set to obtain the target feature encoding model and the multi-layer perceptron classification model includes: Inputting a plurality of first image samples in the first image training set into the initial feature coding model to obtain sample features corresponding to each of the first image samples; Inputting sample features corresponding to each of the first image samples into the first initial classification model to obtain a model classification result; Calculating classification loss based on the first annotation label of each of the first image samples and the model classification result; Calculating contrast loss based on sample features corresponding to each of the first image samples and the first image training set; determining a total loss based on the classification loss and the contrast loss; The initial feature encoding model and the first initial classification model are iteratively updated based on the total loss to obtain the target feature encoding model and the multi-layer perceptron classification model.
4. The false image detection method according to claim 2, characterized in that: The step of selecting a second image training set from the first image training set comprises: Filtering the false image samples belonging to the false category in the first image training set to obtain a false sample set; Filtering real image samples belonging to real categories in the first image training set to obtain a real sample set; The real sample set and the false sample set are combined to obtain the second image training set.
5. The false image detection method according to claim 4, characterized in that: The step of screening the false image samples belonging to the false category in the first image training set to obtain the false sample set includes: Inputting the false image samples in the first image training set into the target feature encoding model to obtain false image features of the false image samples; Determine an average value of the false image features of all the false image samples in the first image training set as an average false image feature; Calculating the feature similarity between each of the false image features and the false image average feature respectively; Determine a first preset number of false image samples ranked top in descending order in terms of feature similarity with the average feature of the false image as a first screening sample set, wherein the first preset number is less than the number of false image samples in the first image training set; A second preset number of the false image samples and the corresponding first annotation labels are randomly selected from the first screening sample set as the false sample set, wherein the second preset number is smaller than the first preset number.
6. The false image detection method according to claim 2, characterized in that: The first image training set includes a plurality of first image samples, a plurality of first annotation labels corresponding to the first image samples, and a second annotation label of the first image samples belonging to a false category, wherein the second annotation label is one of a plurality of forgery methods, and the target feature encoding model is frozen, and a second initial classification model is trained based on the second image training set to obtain the support vector machine classification model, including: Acquire a third image training set, wherein the third image training set includes a plurality of second image samples, a plurality of first annotation labels corresponding to the second image samples, and a second annotation label of the second image samples belonging to a false category, and the second annotation label in the third image training set is different from the second annotation label of the first image training set; Combining the second image training set and the third image training set to obtain a fourth image training set, wherein the number of image samples in the fourth image training set is less than that in the first image training set; The target feature encoding model is frozen, and the second initial classification model is trained based on the fourth image training set to obtain the support vector machine classification model.
7. The false image detection method according to claim 6, characterized in that: The freezing of the target feature encoding model and training the second initial classification model based on the fourth image training set to obtain the support vector machine classification model includes: Dividing the fourth image training set into K subsets; Determine the K subsets as validation sets respectively, and determine the subsets of the K subsets other than the validation sets as target training sets; Obtaining multiple sets of candidate training parameters for the second initial classification model; Freezing the target feature encoding model, using the candidate training parameters as fixed parameters of the second initial classification model, and training the second initial classification model based on the first image training set to obtain a third initial classification model corresponding to the target training set; Verifying the third initial classification model corresponding to the target training set based on the verification set corresponding to the target training set, and obtaining a model verification parameter of the third initial classification model corresponding to the target training set; Determine the total verification parameter of the candidate training parameter based on the model verification parameters of the third initial classification model corresponding to the plurality of target training sets; Determine the candidate training parameters whose total verification parameters meet preset conditions as target training parameters; Freeze the target feature encoding model, use the target training parameters as fixed parameters of the second initial classification model, and train the second initial classification model based on the fourth image training set to obtain the support vector machine classification model.
8. A false image detection device, characterized in that: The false image detection device comprises: An acquisition module is configured to acquire an image to be detected; A feature extraction module is configured to extract features of the image to be detected based on a target feature encoding model to obtain target image features of the image to be detected; A first classification module is configured to perform image classification on the image to be detected based on a multi-layer perceptron classification model and the target image features to obtain a first image classification result; a second classification module, configured to perform image classification on the image to be detected based on a support vector machine classification model and the target image features to obtain a second image classification result, wherein the multi-layer perceptron classification model is trained based on a first image training set, the support vector machine classification model is trained based on a second image training set, the second image training set is a subset of the first image training set, and the first image training set and the second image training set are different sets; A determination module is configured to determine a target image classification result of the image to be detected based on the first image classification and the second image classification results.
9. A computer-readable storage medium, characterized in that: The method comprises instructions, which, when executed on a computer, enable the computer to execute the false image detection method according to any one of claims 1 to 7.
10. A computing device, characterized in that The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
Citation Information
Patent Citations
Cross-event false news detection method based on emotion perception element learning
CN116450822A
Image detection model training method and device, equipment and storage medium
CN116958637A
Deep learning methods for event verification and image re-purposing detection
US20210209425A1
