Image recognition method, device, electronic device and storage medium
By combining the image recognition model of the Support Vector Machine Classifier module and the convolutional neural network classification module, the problems of low efficiency and insufficient accuracy of image forgery recognition in the prior art are solved, and more efficient and accurate forgery image recognition is achieved, thereby reducing the cost of manual review.
Patent Information
- Application Number
- CN202210367044.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-08
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2042-04-08
AI Technical Summary
The prior art is inefficient and insufficient in identifying whether an image is forged, resulting in high cost of manual review and large errors.
The image recognition model combining the Support Vector Machine Classifier Module and the Convolutional Neural Network Classification Module is adopted to jointly identify images through the traditional Support Vector Machine Classifier Module and the deep learning convolutional neural network module to improve recognition accuracy and efficiency.
It significantly improves the accuracy and efficiency of forged image recognition and reduces the cost and error of manual review.
Smart Images

Figure CN114743047B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of artificial intelligence technology, and in particular, to an image recognition method, device, electronic device, and storage medium. Background Art
[0002] With the continuous development of the Internet, many offline procedures for business have gradually turned to online procedures. When online information processing systems handle procedures, they usually confirm information by authenticating and identifying the pictures submitted by users. In this process, a large amount of manpower is required to review the information to prevent someone from illegally obtaining benefits by forging pictures.
[0003] However, manually reviewing image information is inefficient and has high labor costs. Some forged images can still be reviewed and approved, and the probability of incorrect review results is high. Summary of the invention
[0004] The embodiments of the present disclosure provide an image recognition method, device, electronic device and storage medium, which can recognize an image through an image recognition model including a traditional support vector machine classifier module and a convolutional neural network classification module, determine whether it is a forged image, improve the accuracy of forged image recognition, and the efficiency of image recognition, and reduce the manual review cost of forged image recognition.
[0005] In a first aspect, an embodiment of the present disclosure provides an image recognition method, including:
[0006] Obtain an image to be recognized;
[0007] Inputting the image to be recognized into a pre-trained image recognition model to obtain an image recognition result;
[0008] In which, the image recognition model includes at least one support vector machine classifier module and a convolutional neural network classification module, wherein the input image of the convolutional neural network classification module includes the image to be recognized, and the image to be recognized processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module.
[0009] In a second aspect, the present disclosure also provides an image recognition device, including:
[0010] An image acquisition module, used for acquiring an image to be identified;
[0011] An image recognition module is used to input the image to be recognized into a pre-trained image recognition model to obtain an image recognition result;
[0012] Among them, the image recognition model includes at least one support vector machine classifier module and a convolutional neural network classification module, wherein the input image of the convolutional neural network classification module includes the image to be recognized, and the image to be recognized processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module.
[0013] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0014] one or more processors;
[0015] a storage device for storing one or more programs,
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the image recognition method as described in any one of the embodiments of the present disclosure.
[0017] In a fourth aspect, the embodiments of the present disclosure further provide a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the image recognition method as described in any one of the embodiments of the present disclosure.
[0018] The technical solution of the disclosed embodiment is to obtain an image to be identified; input the image to be identified into a pre-trained image recognition model to obtain an image recognition result; wherein the image recognition model includes at least one support vector machine classifier module and a convolutional neural network classification module, wherein the input image of the convolutional neural network classification module includes the image to be identified, and the image to be identified that has been processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module. The technical solution of the disclosed embodiment solves the problem of low efficiency and accuracy in manually identifying whether an image is fake, and realizes the recognition of an image by an image recognition model including a traditional support vector machine classifier module and a convolutional neural network classification module to determine whether it is a fake picture, thereby improving the accuracy of forged image recognition and the efficiency of image recognition, and reducing the manual review cost of forged image recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0020] Figure 1 A flowchart of an image recognition method provided in the first embodiment of the present disclosure;
[0021] Figure 2This is an example of an image to be recognized provided in the first embodiment of the present disclosure;
[0022] Figure 3 A flowchart of an image recognition method provided in Embodiment 2 of the present disclosure;
[0023] Figure 4 A schematic diagram of an image recognition model training process provided in the second embodiment of the present disclosure;
[0024] Figure 5 A schematic diagram of a training sample image processed by a preset algorithm provided in the second embodiment of the present disclosure;
[0025] Figure 6 A schematic diagram of a training sample image processed by a preset algorithm provided in the second embodiment of the present disclosure;
[0026] Figure 7 A flowchart of an image recognition method provided in Embodiment 3 of the present disclosure;
[0027] Figure 8 A schematic diagram of the structure of an image recognition device provided in Embodiment 4 of the present disclosure;
[0028] Fig. 9 This is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present disclosure. DETAILED DESCRIPTION
[0029] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0030] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0031] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0032] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0033] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0034] Embodiment 1
[0035] Figure 1 This is a flow chart of an image recognition method provided by the first embodiment of the present disclosure. The present embodiment of the present disclosure is applicable to the process of identifying an image and determining whether the image is a forged image, and is particularly applicable to the situation where an online processing system identifies a user-uploaded image. The method can be executed by an image recognition device, which can be implemented in the form of software and / or hardware, and can be configured in an electronic device, such as a mobile terminal or a server device.
[0036] like Figure 1 As shown, the image recognition method provided in this embodiment includes:
[0037] S110: Obtain an image to be recognized.
[0038] The image to be identified can be an electronic image of a form, document, or other file obtained by scanning or photographing, such as an image of a document with a signature that needs to be authenticated. Furthermore, the image to be identified can also be an image-based audit object that needs to be authenticated in any business audit process in an online information processing system.
[0039] For example, Figure 2 An image of a registered certificate with a signature is shown in the image. The image shows the company address, name, date and name signature, etc. The authenticity of the name signature needs to be identified to determine whether the registration certificate is a real certificate.
[0040] S120: input the image to be recognized into a pre-trained image recognition model to obtain an image recognition result.
[0041] In this embodiment, the image recognition model that can perform automatic image review combines the traditional machine learning model and the convolutional neural network model based on deep learning, which can improve the image recognition accuracy of the image recognition model to a certain extent. Among them, the traditional machine learning model can use a supervised learning model such as a support vector machine to classify the image to be recognized and determine whether it is a forged image. The convolutional neural network has the ability of representation learning, and can recognize the image to be recognized after learning a large number of training samples. Further, the convolutional neural network is an algorithm model based on traditional statistical foundations. The statistical result is a statistical property when the sample data tends to infinity. When the actual sample data is limited, the generalization ability of the neural network model still has certain limitations. The support vector machine is based on statistical theory and has strong approximation and generalization capabilities. In the image recognition model, at least one support vector machine classifier module and a convolutional neural network classification module are included at the same time, so that the two complement each other's shortcomings, which can effectively improve the image recognition accuracy and generalization ability of the image recognition model.
[0042] Specifically, each support vector machine classifier module corresponds to a support vector machine classifier, and each support vector machine classifier corresponds to a traditional preset image analysis algorithm, which is a classifier obtained by learning the training sample image after analysis and processing by the corresponding image analysis algorithm. Each traditional image processing algorithm is an algorithm used to analyze whether the image has been modified or smeared or other special processing, such as noise distribution analysis (Noise Analysis), error level analysis (Error Level Analysis, ELA) and histogram equalization (Histogram Equalization) and other image analysis methods. When the image to be identified is input into at least one support vector machine classifier module in the image recognition model, the image to be identified will be processed by the image processing algorithm corresponding to each support vector machine classifier, and then the image processed by each algorithm will be input into the trained support vector machine classifier, and each support vector machine classifier will output the corresponding image recognition result. When the image to be recognized is input into the convolutional neural network classification module in the image recognition model, the original image to be recognized and the image to be recognized that has been processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module are simultaneously input into the convolutional neural network classification module, so that the convolutional neural network model simultaneously learns the original image to be recognized and the image to be recognized that has been processed by at least one preset image analysis algorithm, and more comprehensively extracts the image features of the image to be recognized for image analysis and recognition, thereby obtaining the result output by the convolutional neural network classification module.
[0043] After the above image analysis process, when the image to be identified is input into the image recognition model, at least one preliminary image recognition result outputted by at least one support vector machine classifier module and a convolutional neural network classification module will be initially obtained. The image recognition model will further conduct a comprehensive analysis on the at least one preliminary image recognition result to determine a final image recognition result as the output result of the image recognition model, thereby ending the analysis and recognition process of the image to be identified.
[0044] In a preferred embodiment, in order to better support manual image review and improve the efficiency of manual image review, further analysis prompts can be given to relevant users based on the output results of the image recognition model. For example, when the confidence level corresponding to the image recognition result is lower than the preset confidence threshold, a manual image review prompt can be issued, and the image to be recognized that has been processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module is fed back to the user, so that the user can further analyze the image in a targeted manner.
[0045] The technical solution of the disclosed embodiment can obtain the image recognition result by, after obtaining the image to be recognized, inputting the image to be recognized into a pre-trained image recognition model. The image recognition model includes at least one support vector machine classifier module and a convolutional neural network classification module, and the two different image recognition classification modules can complement each other, wherein the input image of the convolutional neural network classification module includes the image to be recognized, and the image to be recognized that has been processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module. The technical solution of the disclosed embodiment solves the problem of low efficiency and accuracy in manually identifying whether an image is fake, and realizes the recognition of an image by an image recognition model including a traditional support vector machine classifier module and a convolutional neural network classification module, and determines whether it is a forged image, thereby improving the accuracy of forged image recognition and the efficiency of image recognition, and reducing the manual review cost of forged image recognition.
[0046] Embodiment 2
[0047] The embodiments of the present disclosure can be combined with the various optional solutions in the image recognition method provided in the above embodiments. The image recognition method provided in this embodiment is optimized on the basis of the above embodiments, and further describes the training process of the image recognition model.
[0048] Figure 3 This is a flow chart of an image recognition method provided by Embodiment 2 of the present disclosure. Figure 3 As shown, the image recognition method provided in this embodiment includes:
[0049] S210: Process the training sample images using at least one preset image analysis algorithm, and input the image processing results into a corresponding support vector machine classifier to obtain an image recognition result of at least one support vector machine classifier.
[0050] In this step, the main function is to complete the training of the support vector machine classifier module of the target forged image recognition model. The training sample image is an image with a forged or non-forged label. For any training sample image, at least one preset image analysis algorithm is used for processing, and then the image processing results are respectively input into the corresponding support vector machine classifier for supervised machine learning, thereby obtaining at least one support vector machine classifier. Then, the training sample images processed by at least one preset image analysis algorithm are respectively input into the trained support vector machine classifier, where the image recognition result of at least one support vector machine classifier can be obtained, and the recognition result includes the category of the corresponding training sample image, that is, whether it is a processed image, and the result confidence of the corresponding classification result.
[0051] For example, in a specific example, three support vector machine classifiers may be provided in the support vector machine classifier module, and each support vector machine classifier respectively identifies training sample images processed by different image analysis algorithms. Figure 4 Schematic diagram of the training process of the target forged image recognition model.
[0052] exist Figure 4 In the training part of the support vector machine classification module shown in , the noise distribution analysis method is used to perform image analysis processing on the training sample images, and the images processed by the noise distribution analysis are input into the first support vector machine classifier to obtain the image recognition result of the first support vector machine classifier; the error level analysis method is used to perform image analysis processing on the training sample images, and the images processed by the image compression rate error analysis are input into the second support vector machine classifier to obtain the image recognition result of the second support vector machine classifier; at the same time, the histogram normalization analysis method is also used to perform image analysis processing on the training sample images, and the images processed by the histogram normalization analysis are input into the third support vector machine classifier to obtain the image recognition result of the third support vector machine classifier. Among them, the noise distribution analysis method (Noise Analysis) is used for image processing because if a picture has not been post-processed, the distribution of noise should be uniform. By analyzing the noise distribution of the picture, areas with abnormal noise distribution can be found (often appearing as large black blocks). Abnormal areas are usually post-processed areas, and there is a high possibility of image fraud. Figure 2 is the training sample image, which can be obtained by processing with the noise distribution analysis method. Figure 5The image shown. The principle of Error Level Analysis (ELA) is to determine whether the image has been post-processed by PS (Photoshop) splicing, modification, smearing, etc. by analyzing the compression rate of each area of the JPEG (Joint Photographic Experts Group) format image and calculating its error level. In principle, the ELA values of each area of the original JPEG image obtained by only one sampling should be similar. If an area has an ELA value significantly different from other parts of the same image, this area is likely to have been modified later, so it can be analyzed whether it is a forged image. Figure 2 is the training sample image, which can be obtained by processing with the error level analysis method. Figure 6 The image shown. Histogram Equalization (HE) method improves the contrast of the image by enhancing the histogram. Since the histogram distribution of different images is different, the difference between different images can be made more obvious after the equalization process, thus highlighting the modified part of the image.
[0053] The support vector machine classifier module obtained through the training process of the above steps can analyze from different aspects whether an image is subsequently processed to perform image forgery. The analysis is more comprehensive and can improve the accuracy of image recognition.
[0054] S220, inputting the training sample image and the image processing result into a preset convolutional neural network classification module at the same time, training the preset convolutional neural network classification module, and obtaining a convolutional neural network classifier image recognition result.
[0055] In this step, the main goal is to train the convolutional neural network classification module of the target forged image recognition model. Figure 4 In the training process of the convolutional neural network classification module, the original image of the training sample image and the image processed by the preset image analysis algorithm in step S210 are simultaneously input into the convolutional neural network. In this embodiment, the convolutional neural network adopts the densenet classification model structure for classification. It can be understood that classification models with other structures can also be used. Densenet achieves feature reuse by connecting features on channels. Thereby, densenet can achieve better model performance with fewer parameters and computational costs. The densenet classification model structure includes a convolutional layer (conv), a pooling layer (pooling), a linear processing layer (linear) and a dense connection block (dens block).
[0056] During the training process of the convolutional neural network, after multiple rounds of learning of sample images, the model parameters are adjusted to finally obtain a trained convolutional neural network. By simultaneously inputting the training sample image and the corresponding sample image processed by the preset image analysis algorithm into the convolutional neural network model, an image recognition classification result and the corresponding classification result confidence can be obtained.
[0057] S230. Determine a final image recognition result based on the image recognition result of the at least one support vector machine classifier and the image recognition result of the convolutional neural network classifier, and update weight parameters between the image recognition results of each classifier based on the final image recognition result to obtain a target image recognition model.
[0058] Specifically, step S210 and step S220 can be performed simultaneously. For the same training sample image, multiple image recognition results (categories) and corresponding confidence levels can be obtained through step S210 and step S220, which can be used as preliminary image recognition results. Then, a voting algorithm is used to comprehensively analyze the preliminary image recognition results to obtain a final image recognition result.
[0059] Among them, the voting algorithm is specifically used to learn the weight coefficients of each preliminary image recognition result to obtain a better weight configuration scheme, thereby obtaining the target forged image recognition model. The value of the weight coefficient in the voting algorithm is adjusted according to the final image recognition result. When the final image recognition result does not meet the preset model training end condition, the weight parameters between the image recognition results of each classifier are adjusted, and the final image recognition result is updated; when the updated final image recognition result meets the preset model training end condition, the model training process is terminated to obtain the target forged image recognition model. Among them, the preset model training end condition can be that the loss function value of the trained model is lower than the preset loss function threshold, or that the number of model training rounds has reached a preset number. A model training round can be understood as the process of inputting all training sample images into the trained model in sequence for model training. The trained model can be repeatedly trained using the same model training sample set.
[0060] S240: Obtain an image to be identified.
[0061] S250: input the image to be recognized into the target image recognition model to obtain an image recognition result.
[0062] The trained target image recognition model can be configured in various online information processing systems with corresponding image recognition functions for use. After obtaining the image to be recognized, the image to be recognized can be input into the target image recognition model, which will recognize and process the image and output the image recognition result to replace or assist the manual image review process.
[0063] The technical solution of the disclosed embodiment is to train the support vector machine classification module and the convolutional neural network classification module respectively in the process of training the target image recognition model, learn and analyze the features of the training samples through different machine learning methods, and use a variety of preset image analysis algorithms to process the image when training the support vector machine classification module. When training the convolutional neural network classification module, the training sample image and the image processed by at least one preset image analysis algorithm are simultaneously input into the convolutional neural network for learning, so that the features of the training sample image can be more comprehensively learned to obtain a model with higher recognition result accuracy. In the process of using the target image recognition model, after obtaining the image to be recognized, the image to be recognized can be directly input into the target image recognition model to obtain the image recognition result. The technical solution of the disclosed embodiment solves the problem of inefficiency and accuracy of artificial recognition of whether an image is fake, and realizes the recognition of an image by an image recognition model including a traditional support vector machine classifier module and a convolutional neural network classification module, determines whether it is a forged image, improves the accuracy of forged image recognition, and the efficiency of image recognition, and reduces the manual review cost of forged image recognition.
[0064] Embodiment 3
[0065] The various optional solutions in the image recognition method provided in the embodiment of the present disclosure and the above embodiment can be combined. The image recognition method provided in this embodiment is optimized on the basis of the above embodiment, and further describes the process of training and using the image recognition model starting from the construction process of the training sample set.
[0066] Figure 7 This is a flow chart of an image recognition method provided by Embodiment 3 of the present disclosure. Figure 7 As shown, the image recognition method provided in this embodiment includes:
[0067] S310: Process the images in the preset image data set to construct a training sample image set.
[0068] Considering that in the process of model training, the relevant open source training sample data is very scarce, a data set enhancement strategy can be used in this step to expand the training sample data. Usually, in the process of data expansion, data expansion is based on existing data, and the preset image data set is the existing open source data.
[0069] When performing data enhancement, for each image in the preset image data set, the text in the image can be identified. The text recognition method can use the OCR (Optical Character Recognition) recognition method to detect the text in the image. The specific text detection result is marked with a text box, and the pixel of the area where the text box corresponding to the recognized text is located can be adjusted to modify the original image to obtain more target training sample images. The pixel adjustment method includes filling, copying, moving and / or splicing.
[0070] Specifically, among the recognized text boxes, some are large in area and cover more text content, while some are small in area and contain only a small amount of text. You can directly perform pixel adjustment operations on the area where the larger text boxes are located. For text boxes that are small in area and relatively densely distributed, you can merge multiple small text boxes into a large text box, and then perform pixel adjustment operations.
[0071] Among them, pixel filling (inpainting) refers to filling the area with the color of the pixels adjacent to the area where the text box is located, imitating the smearing tampering at the line level. Copy-move (copy-move) is to copy the pixels in the area where the text box is located and randomly flip them, imitating the splicing tampering at the line level. Splicing (splicing) can be the random flipping of text boxes, especially referring to the large text box formed by merging small text boxes, imitating the text block level tampering.
[0072] S320: Based on the training sample set, train the image recognition model of the preset structure to obtain a target image recognition model.
[0073] Among them, the image recognition model includes at least one support vector machine classifier module and a convolutional neural network classification module, wherein the input image of the convolutional neural network classification module includes the image to be recognized, and the image to be recognized that is processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module.
[0074] Based on the training sample set after data enhancement, model training can be performed, and the training process can refer to the model training process described in Example 2. As the number of training samples increases, the generalization ability of the trained model can be improved to a certain extent.
[0075] S330: Obtain an image to be recognized.
[0076] S340: Input the image to be recognized into the target image recognition model to obtain an image recognition result.
[0077] S350. When the confidence level corresponding to the image recognition result is lower than a preset confidence threshold, a manual image review prompt is issued, and the image to be recognized that has been processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module is fed back to the user.
[0078] This step is to better support manual image review and improve the efficiency of manual image review. It can further provide analysis prompts to relevant users based on the output results of the target image recognition model. Figure 4 Taking the result return module in as an example, the entire target forged image recognition model finally returns a classification result for direct filtering of fake images; here, when the "true / false" confidence (probability value) is greater than 70%, it is directly mapped to true / false; when the probability value is less than or equal to 70%, it is mapped to be unable to judge and requires manual intervention. At the same time, 3 images to be identified after being processed by the preset image analysis algorithm are returned to assist manual judgment.
[0079] The technical solution of the disclosed embodiment obtains a richer model training sample by pre-amplifying the existing open source image data before model training. Then, the model training is performed based on the amplified model training sample to obtain the target image recognition model. During the use of the target image recognition model, the image to be recognized is directly input into the target image recognition model to obtain the image recognition result; wherein, the target image recognition model includes at least one support vector machine classifier module and a convolutional neural network classification module, wherein the input image of the convolutional neural network classification module includes the image to be recognized, and the image to be recognized that is processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module. The technical solution of the disclosed embodiment solves the problem of inefficiency and accuracy of manual recognition of whether an image is fake, and realizes the recognition of an image by an image recognition model including a traditional support vector machine classifier module and a convolutional neural network classification module, and determines whether it is a forged picture, thereby improving the accuracy of forged image recognition, the generalization ability of the model, and the efficiency of image recognition, and reducing the manual review cost of forged image recognition.
[0080] Embodiment 4
[0081] Figure 8 This is a schematic diagram of the structure of an image recognition device provided in the fourth embodiment of the present disclosure. The image recognition device provided in this embodiment is suitable for recognizing an image and determining whether the image is a forged image, and is particularly suitable for the situation where an online processing system recognizes a user-uploaded image. The device can be configured in an electronic device, such as a mobile terminal or a server device.
[0082] like Figure 8As shown, the image recognition device includes: an image acquisition module 410 and an image recognition module 420 .
[0083] Among them, the image acquisition module 410 is used to acquire the image to be identified; the image recognition module 420 is used to input the image to be identified into a pre-trained image recognition model to obtain an image recognition result; wherein the image recognition model includes at least one support vector machine classifier module and a convolutional neural network classification module, wherein the input image of the convolutional neural network classification module includes the image to be identified, and the image to be identified that has been processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module.
[0084] The technical solution of the disclosed embodiment is to obtain an image to be identified; input the image to be identified into a pre-trained image recognition model to obtain an image recognition result; wherein the image recognition model includes at least one support vector machine classifier module and a convolutional neural network classification module, wherein the input image of the convolutional neural network classification module includes the image to be identified, and the image to be identified that has been processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module. The technical solution of the disclosed embodiment solves the problem of low efficiency and accuracy in manually identifying whether an image is fake, and realizes the recognition of an image by an image recognition model including a traditional support vector machine classifier module and a convolutional neural network classification module to determine whether it is a fake picture, thereby improving the accuracy of forged image recognition and the efficiency of image recognition, and reducing the manual review cost of forged image recognition.
[0085] In some optional implementations, the image recognition device further includes a model training module for training the image recognition model, specifically including: a first model training submodule, a second model training submodule and a third model training submodule;
[0086] The first model training submodule is used to: process the training sample image using the at least one preset image analysis algorithm, and input the image processing result into the corresponding support vector machine classifier to obtain the image recognition result of at least one support vector machine classifier;
[0087] The second model training submodule is used to: input the training sample image and the image processing result into the convolutional neural network classification module at the same time, train the convolutional neural network classification module, and obtain the convolutional neural network classifier image recognition result;
[0088] The third model training submodule is used to determine the final image recognition result based on the image recognition result of the at least one support vector machine classifier and the image recognition result of the convolutional neural network classifier, and update the weight parameters between the image recognition results of each classifier based on the final image recognition result to obtain the image recognition model.
[0089] In some optional implementations, the first model training submodule is specifically used to:
[0090] Performing image analysis processing on the training sample image using a noise distribution analysis method, and inputting the image processed by the noise analysis into a first support vector machine classifier to obtain an image recognition result of the first support vector machine classifier; and / or,
[0091] Performing image analysis processing on the training sample image using an error level analysis method, and inputting the image processed by the image compression rate error analysis into a second support vector machine classifier to obtain an image recognition result of the second support vector machine classifier; and / or,
[0092] The training sample images are analyzed and processed by using a histogram normalization analysis method, and the images processed by the histogram normalization analysis are input into a third support vector machine classifier to obtain an image recognition result of the third support vector machine classifier.
[0093] In some optional implementations, the third model training submodule is specifically used to:
[0094] When the final image recognition result does not meet the preset model training end condition, the weight parameters between the image recognition results of each classifier are adjusted, and the final image recognition result is updated;
[0095] When the updated final image recognition result meets the preset model training end condition, the model training process is ended to obtain the image recognition model.
[0096] In some optional implementations, the image recognition device further includes a training sample set construction module for:
[0097] Process the images in the preset image dataset to construct a training sample image set.
[0098] In some optional implementations, the training sample set construction module is specifically used to:
[0099] Identifying text contained in each image in the preset image data set;
[0100] The target training sample image is obtained by performing pixel adjustment on the area where the text box corresponding to the text is located.
[0101] In some optional implementations, the image recognition device further includes an image feedback module, which is used to:
[0102] When the confidence level corresponding to the image recognition result is lower than a preset confidence threshold, a manual image review prompt is issued, and the image to be recognized, which has been processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module, is fed back to the user.
[0103] The image recognition device provided in the embodiments of the present disclosure can execute the image recognition method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0104] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0105] Embodiment 5
[0106] Reference below Fig. 9 , which shows an electronic device (eg, Fig. 9 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0107] like Fig. 9 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 to a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0108] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Fig. 9 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0109] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the image recognition method of the embodiment of the present disclosure are executed.
[0110] The electronic device provided in the embodiment of the present disclosure and the image recognition method provided in the above embodiment belong to the same disclosed concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0111] Embodiment 6
[0112] The embodiments of the present disclosure provide a computer storage medium on which a computer program is stored. When the program is executed by a processor, the image recognition method provided by the above embodiments is implemented.
[0113] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or a flash memory (FLASH), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0114] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0115] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0116] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0117] Obtain an image to be recognized;
[0118] Inputting the image to be recognized into a pre-trained image recognition model to obtain an image recognition result;
[0119] Among them, the image recognition model includes at least one support vector machine classifier module and a convolutional neural network classification module, wherein the input image of the convolutional neural network classification module includes the image to be recognized, and the image to be recognized processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module.
[0120] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0121] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0122] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The names of the units and modules do not, in some cases, limit the units and modules themselves. For example, the data generation module may also be described as a "video data generation module".
[0123] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: Field Programmable Gate Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Parts (ASSP), System on Chip (SOC), Complex Programmable Logic Device (CPLD), etc.
[0124] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0125] According to one or more embodiments of the present disclosure, [Example 1] provides an image recognition method, the method comprising:
[0126] Obtain an image to be recognized;
[0127] Inputting the image to be recognized into a pre-trained image recognition model to obtain an image recognition result;
[0128] Among them, the image recognition model includes at least one support vector machine classifier module and a convolutional neural network classification module, wherein the input image of the convolutional neural network classification module includes the image to be recognized, and the image to be recognized processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module.
[0129] According to one or more embodiments of the present disclosure, [Example 2] provides an image recognition method, further comprising:
[0130] In some optional implementations, the training process of the image recognition model includes the following steps:
[0131] Performing image processing on the training sample image using the at least one preset image analysis algorithm, and inputting the image processing result into the corresponding support vector machine classifier to obtain an image recognition result of at least one support vector machine classifier;
[0132] Inputting the training sample image and the image processing result into the convolutional neural network classification module at the same time, training the convolutional neural network classification module, and obtaining the convolutional neural network classifier image recognition result;
[0133] A final image recognition result is determined based on the image recognition result of the at least one support vector machine classifier and the image recognition result of the convolutional neural network classifier, and a weight parameter between the image recognition results of each classifier is updated based on the final image recognition result to obtain the image recognition model.
[0134] According to one or more embodiments of the present disclosure, [Example 3] provides an image recognition method, further comprising:
[0135] In some optional implementations, the processing of the training sample images using the at least one preset image analysis algorithm and inputting the image processing results into the corresponding support vector machine classifier to obtain the image recognition results of at least one support vector machine classifier includes:
[0136] Performing image analysis processing on the training sample image using a noise distribution analysis method, and inputting the image processed by the noise analysis into a first support vector machine classifier to obtain an image recognition result of the first support vector machine classifier; and / or,
[0137] Performing image analysis processing on the training sample image using an error level analysis method, and inputting the image processed by the image compression rate error analysis into a second support vector machine classifier to obtain an image recognition result of the second support vector machine classifier; and / or,
[0138] The training sample images are analyzed and processed by using a histogram normalization analysis method, and the images processed by the histogram normalization analysis are input into a third support vector machine classifier to obtain an image recognition result of the third support vector machine classifier.
[0139] According to one or more embodiments of the present disclosure, [Example 4] provides an image recognition method, further comprising:
[0140] In some optional implementations, updating the weight parameters between the image recognition results of each classifier according to the final image recognition result to obtain the image recognition model includes:
[0141] When the final image recognition result does not meet the preset model training end condition, the weight parameters between the image recognition results of each classifier are adjusted, and the final image recognition result is updated;
[0142] When the updated final image recognition result meets the preset model training end condition, the model training process is ended to obtain the image recognition model.
[0143] According to one or more embodiments of the present disclosure, [Example 5] provides an image recognition method, further comprising:
[0144] In some optional implementations, the training process of the image recognition model further includes:
[0145] Process the images in the preset image dataset to construct a training sample image set.
[0146] According to one or more embodiments of the present disclosure, [Example 6] provides an image recognition method, further comprising:
[0147] In some optional implementations, the processing of the image in the preset image data set includes:
[0148] Identifying text contained in each image in the preset image data set;
[0149] A pixel adjustment operation is performed on the area where the text box corresponding to the text is located to obtain a target training sample image.
[0150] According to one or more embodiments of the present disclosure, [Example 7] provides an image recognition method, further comprising:
[0151] In some optional implementations, when the confidence level corresponding to the image recognition result is lower than a preset confidence threshold, a manual image review prompt is issued, and the image to be recognized that has been processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module is fed back to the user.
[0152] According to one or more embodiments of the present disclosure, [Example 8] provides an image recognition device, further comprising:
[0153] An image acquisition module, used for acquiring an image to be recognized;
[0154] An image recognition module is used to input the image to be recognized into a pre-trained image recognition model to obtain an image recognition result;
[0155] Among them, the image recognition model includes at least one support vector machine classifier module and a convolutional neural network classification module, wherein the input image of the convolutional neural network classification module includes the image to be recognized, and the image to be recognized processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module.
[0156] According to one or more embodiments of the present disclosure, [Example 9] provides an image recognition device, further comprising:
[0157] In some optional implementations, the image recognition device further includes a model training module for training the image recognition model, specifically including: a first model training submodule, a second model training submodule and a third model training submodule;
[0158] The first model training submodule is used to: respectively process the training sample images using the at least one preset image analysis algorithm, and input the image processing results into the corresponding support vector machine classifier to obtain the image recognition results of at least one support vector machine classifier;
[0159] The second model training submodule is used to: input the training sample image and the image processing result into the convolutional neural network classification module at the same time, train the convolutional neural network classification module, and obtain the convolutional neural network classifier image recognition result;
[0160] The third model training submodule is used to determine the final image recognition result based on the image recognition result of the at least one support vector machine classifier and the image recognition result of the convolutional neural network classifier, and update the weight parameters between the image recognition results of each classifier based on the final image recognition result to obtain the image recognition model.
[0161] According to one or more embodiments of the present disclosure, [Example 10] provides an image recognition device, further comprising:
[0162] In some optional implementations, the first model training submodule is specifically used to:
[0163] Performing image analysis processing on the training sample image using a noise distribution analysis method, and inputting the image processed by the noise analysis into a first support vector machine classifier to obtain an image recognition result of the first support vector machine classifier; and / or,
[0164] Performing image analysis processing on the training sample image using an error level analysis method, and inputting the image processed by the image compression rate error analysis into a second support vector machine classifier to obtain an image recognition result of the second support vector machine classifier; and / or,
[0165] The training sample images are analyzed and processed by using a histogram normalization analysis method, and the images processed by the histogram normalization analysis are input into a third support vector machine classifier to obtain an image recognition result of the third support vector machine classifier.
[0166] According to one or more embodiments of the present disclosure, [Example 11] provides an image recognition device, further comprising:
[0167] In some optional implementations, the third model training submodule is specifically used to:
[0168] When the final image recognition result does not meet the preset model training end condition, the weight parameters between the image recognition results of each classifier are adjusted, and the final image recognition result is updated;
[0169] When the updated final image recognition result meets the preset model training end condition, the model training process is ended to obtain the image recognition model.
[0170] According to one or more embodiments of the present disclosure, [Example 12] provides an image recognition device, further comprising:
[0171] In some optional implementations, the image recognition device further includes a training sample set construction module for:
[0172] Process the images in the preset image dataset to construct a training sample image set.
[0173] According to one or more embodiments of the present disclosure, [Example 13] provides an image recognition device, further comprising:
[0174] In some optional implementations, the training sample set construction module is specifically used to:
[0175] Identifying text contained in each image in the preset image data set;
[0176] The target training sample image is obtained by performing pixel adjustment on the area where the text box corresponding to the text is located.
[0177] According to one or more embodiments of the present disclosure, [Example 14] provides an image recognition device, further comprising:
[0178] In some optional implementations, the image recognition device further includes an image feedback module, which is used to:
[0179] When the confidence level corresponding to the image recognition result is lower than a preset confidence threshold, a manual image review prompt is issued, and the image to be recognized, which has been processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module, is fed back to the user.
[0180] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0181] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0182] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. An image recognition method, characterized in that: include: Obtain an image to be recognized; Inputting the image to be recognized into a pre-trained image recognition model to obtain an image recognition result; In which, the image recognition model includes at least one support vector machine classifier module and a convolutional neural network classification module, wherein the input image of the convolutional neural network classification module includes the image to be recognized, and the image to be recognized processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module, and the image to be recognized and the image to be recognized processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module are input into the convolutional neural network classification module at the same time.
2. The method according to claim 1, characterized in that The training process of the image recognition model includes the following steps: Performing image processing on the training sample image using the at least one preset image analysis algorithm, and inputting the image processing result into the corresponding support vector machine classifier to obtain an image recognition result of at least one support vector machine classifier; Inputting the training sample image and the image processing result into the convolutional neural network classification module at the same time, training the convolutional neural network classification module, and obtaining the convolutional neural network classifier image recognition result; A final image recognition result is determined based on the image recognition result of the at least one support vector machine classifier and the image recognition result of the convolutional neural network classifier, and a weight parameter between the image recognition results of each classifier is updated based on the final image recognition result to obtain the image recognition model.
3. The method according to claim 2, characterized in that The step of processing the training sample image using the at least one preset image analysis algorithm and inputting the image processing result into a corresponding support vector machine classifier to obtain an image recognition result of at least one support vector machine classifier includes: Performing image analysis processing on the training sample image using a noise distribution analysis method, and inputting the image processed by the noise analysis into a first support vector machine classifier to obtain an image recognition result of the first support vector machine classifier; and / or, Performing image analysis processing on the training sample image using an error level analysis method, and inputting the image processed by the image compression rate error analysis into a second support vector machine classifier to obtain an image recognition result of the second support vector machine classifier; and / or, The training sample images are analyzed and processed by using a histogram normalization analysis method, and the images processed by the histogram normalization analysis are input into a third support vector machine classifier to obtain an image recognition result of the third support vector machine classifier.
4. The method according to claim 2, characterized in that: The updating of the weight parameters between the image recognition results of each classifier according to the final image recognition result to obtain the image recognition model includes: When the final image recognition result does not meet the preset model training end condition, the weight parameters between the image recognition results of each classifier are adjusted, and the final image recognition result is updated; When the updated final image recognition result meets the preset model training end condition, the model training process is ended to obtain the image recognition model.
5. The method according to claim 2, characterized in that: The training process of the image recognition model also includes: Process the images in the preset image dataset to construct a training sample image set.
6. The method according to claim 5, characterized in that The processing of the images in the preset image data set includes: Identifying text contained in each image in the preset image data set; The target training sample image is obtained by performing pixel adjustment on the area where the text box corresponding to the text is located.
7. The method according to claim 1, characterized in that The method further comprises: When the confidence level corresponding to the image recognition result is lower than a preset confidence threshold, a manual image review prompt is issued, and the image to be recognized, which has been processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module, is fed back to the user.
8. An image recognition device, characterized in that: include: An image acquisition module, used for acquiring an image to be identified; An image recognition module is used to input the image to be recognized into a pre-trained image recognition model to obtain an image recognition result; In which, the image recognition model includes at least one support vector machine classifier module and a convolutional neural network classification module, wherein the input image of the convolutional neural network classification module includes the image to be recognized, and the image to be recognized processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module, and the image to be recognized and the image to be recognized processed by at least one preset image analysis algorithm and input into the corresponding support vector machine classifier module are input into the convolutional neural network classification module at the same time.
9. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the image recognition method as described in any one of claims 1 to 7.
10. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to perform the image recognition method according to any one of claims 1 to 7 when executed by a computer processor.
Citation Information
Patent Citations
True and false picture recognition method and device and computer readable storage medium
CN108288073A