Picture classification method and device, medium and equipment

By introducing residual connections, dense connections and attention modules into deep convolutional neural networks, combined with data enhancement and normalization processing of generated adversarial networks, automated image classification is realized, solving the low efficiency of image classification in the existing technology The problem significantly saves administrators' review time.

CN119107489AInactive Publication Date: 2024-12-10ANRUI DIGITAL INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411108426.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-12-10
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure CN119107489A_ABST
    Figure CN119107489A_ABST
Patent Text Reader

Abstract

The invention discloses a picture classification method and device, a medium and equipment. The method comprises the following steps: collecting a picture data set containing different categories; preprocessing the picture data set to generate a picture training set; a pre-constructed deep convolutional neural network is trained according to the picture training set, an image recognition model is generated, and residual connection, dense connection and an attention module are introduced into the deep convolutional neural network; and inputting the uploaded to-be-processed picture into the image recognition model, and determining the category of the to-be-processed picture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of picture classification, and more specifically, to a picture classification method, device, medium and equipment. Background Art

[0002] Currently, there are many lecturers on the platform, and lecturers need to upload a large number of training photos every quarter. The administrators need to manually screen the content of the uploaded photos for review, which will waste a lot of human resources and time. Therefore, how to efficiently classify the pictures uploaded by lecturers has become a technical problem that needs to be solved urgently. Summary of the invention

[0003] In view of the deficiencies in the prior art, the present invention provides a method, device, medium and equipment for image classification.

[0004] According to one aspect of the present invention, a method for classifying an image is provided, comprising:

[0005] Collect a dataset of images containing different categories;

[0006] Preprocess the image data set to generate an image training set;

[0007] The pre-built deep convolutional neural network is trained according to the image training set to generate an image recognition model, in which the deep convolutional neural network introduces residual connections, dense connections, and attention modules;

[0008] The uploaded image to be processed is input into the image recognition model to determine the category of the image to be processed.

[0009] Optionally, the image dataset is preprocessed to generate an image training set, including:

[0010] Use generative adversarial networks to enhance image datasets;

[0011] The enhanced image dataset is augmented and normalized to generate an image training set. The normalization formula is:

[0012] x'=(x-μ) / σ

[0013] Where x' is the normalized pixel value, x is the augmented pixel value, μ is the mean of the data set, and σ is the standard deviation of the data set.

[0014] Optionally, a pre-built deep convolutional neural network is trained according to the image training set to generate an image recognition model, including:

[0015] The model parameter adjustment algorithm uses the image training set to update the parameters of the deep convolutional neural network and generate an image recognition model, where:

[0016] The image recognition model is generated by performing parameter update convergence on the deep convolutional neural network using the picture training set through a preset loss function, wherein:

[0017] The preset loss function of the deep convolutional neural network is:

[0018] H(p,q)=-∑_{i=1}^{N}p_i*log(q_i)

[0019] Where H is the cross entropy loss function, p is the probability distribution vector of the true label, q is the probability distribution vector predicted by the model, and N is the number of categories.

[0020] Optionally, the method further includes: evaluating the image recognition model using a model evaluation algorithm to determine an evaluation result of the image recognition model, wherein the model evaluation algorithm includes: a confusion matrix, an accuracy rate, a recall rate, and an F1 score, and the accuracy rate is calculated as follows:

[0021] Accuracy=(TP+TN) / (TP+FP+TN+FN)

[0022] In the formula, TP represents true positive examples, TN represents true negative examples, FP represents false positive examples, and FN represents false negative examples.

[0023] According to another aspect of the present invention, there is provided a picture classification device, comprising:

[0024] The collection module is used to collect image datasets containing different categories;

[0025] The first generation module is used to preprocess the image data set to generate an image training set;

[0026] The second generation module is used to train the pre-built deep convolutional neural network according to the image training set to generate an image recognition model, wherein the deep convolutional neural network introduces residual connections, dense connections and attention modules;

[0027] The determination module is used to input the uploaded image to be processed into the image recognition model to determine the category of the image to be processed.

[0028] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the method described in any one of the above aspects of the present invention.

[0029] According to another aspect of the present invention, an electronic device is provided, comprising: a processor; a memory for storing instructions executable by the processor; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the method described in any one of the above aspects of the present invention.

[0030] Therefore, the present invention introduces residual connections in deep convolutional neural networks to solve the degradation problem of deep networks (ResNet); uses dense connections to improve feature transfer efficiency (DenseNet); and introduces an attention module to focus the network on important features (SENet). Thus, administrators can quickly find images that meet the requirements for review based on the classification results, saving a lot of time. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] A more complete understanding of exemplary embodiments of the present invention may be obtained by referring to the following drawings:

[0032] Figure 1 is a flowchart of a method for classifying pictures provided by an exemplary embodiment of the present invention;

[0033] Figure 2 is a structural schematic diagram of a picture classification device provided by an exemplary embodiment of the present invention;

[0034] Figure 3 This is a structure of an electronic device provided by an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0035] Below, the exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described here.

[0036] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.

[0037] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present invention are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.

[0038] It should also be understood that, in the embodiments of the present invention, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.

[0039] It should also be understood that any component, data or structure mentioned in the embodiments of the present invention can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.

[0040] In addition, the term "and / or" in the present invention is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects before and after are in an "or" relationship.

[0041] It should also be understood that the description of the various embodiments of the present invention focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.

[0042] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0043] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.

[0044] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.

[0045] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0046] Embodiments of the present invention can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.

[0047] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.

[0048] Exemplary Methods

[0049] Figure 1 FIG. 1 is a flow chart of a method for classifying pictures provided by an exemplary embodiment of the present invention. This embodiment can be applied to electronic devices, such as Figure 1 As shown, the picture classification method 100 includes the following steps:

[0050] Step 101, collecting image data sets containing different categories;

[0051] Step 102, preprocessing the image data set to generate an image training set;

[0052] Step 103, training a pre-built deep convolutional neural network according to the image training set to generate an image recognition model, wherein the deep convolutional neural network introduces residual connections, dense connections, and attention modules;

[0053] Step 104: input the uploaded image to be processed into an image recognition model to determine the category of the image to be processed.

[0054] Specifically, the present invention is based on deep learning and image processing technology, automatically identifies the content of pictures through training models, and classifies them into corresponding categories, so that users can perform corresponding operations based on the classification results. The solution is as follows:

[0055] 1. Data preparation and processing:

[0056] (1) Dataset preparation: Collect and organize image datasets of different categories for training and testing models. For example, use a web crawler to automatically download images from the Internet.

[0057] (2) Data preprocessing: Perform image enhancement (such as random cropping, rotation, color jitter), data augmentation, normalization and other preprocessing operations on the image data to make it meet the model input requirements. Among them, the normalization formula (x'=\frac{x-\mu}{\sigma}), for example, uses generative adversarial networks (GANs) for data enhancement to generate more realistic image samples.

[0058] 2. Image recognition model construction:

[0059] (1) Convolutional Neural Network (CNN): used to process image data and extract image features.

[0060] (2) Multilayer Perceptron (MLP): used to post-process the CNN output and generate the final classification results.

[0061] (3) Loss function and optimizer: Select appropriate loss function and optimizer for training the model. The convolution operation is as follows:

[0062] (O_{ij}^l=f(\sum_{m,n}W_{mn}^{l}\cdot I_{i+m,j+n}^{l-1}+b^l))

[0063] Among them, the convolutional neural network proposed in this application: introduces residual connections to solve the degradation problem of deep networks (ResNet); uses dense connections to improve feature transfer efficiency (DenseNet); introduces an attention module to make the network focus on important features (SENet).

[0064] 3. Image recognition model training and optimization:

[0065] (1) Divide the dataset into training set and test set: Divide the dataset into training set and test set for model training and evaluation.

[0066] (2) Training model: Use the training set to train the model and adjust the model parameters to make the model converge.

[0067] Model parameter adjustment is done through batch gradient descent, mini-batch gradient descent, etc. The formula is as follows:

[0068] Parameter update:

[0069] Among them, W_{new} is the updated model parameter, W_{old} is the previous model parameter, α is the learning rate, is the gradient of the loss function H with respect to the parameter W.

[0070] Among them, the learning rate scheduling strategy dynamically adjusts the learning rate according to the training process; cyclic learning rates are used to accelerate convergence.

[0071] Among them, the cross entropy loss function is used for multi-classification problems, the back propagation algorithm is used for gradient calculation, and the optimization algorithm (such as SGD, Adam) is used for parameter update. The formula of cross entropy loss is as follows:

[0072] H(p,q)=-∑_{i=1}^{N}p_i*log(q_i)

[0073] Where H is the cross entropy loss function, p is the probability distribution vector of the true label, q is the probability distribution vector predicted by the model, and N is the number of categories. Adaptive optimization algorithms (such as Adam) combine the advantages of momentum methods and RMSProp to improve training speed and stability.

[0074] (3) Model evaluation: Use the test set to evaluate the model and calculate indicators such as model accuracy and recall.

[0075] The model evaluation algorithms include confusion matrix, accuracy, recall, F1 score, etc. The accuracy formula is as follows:

[0076] Accuracy=(TP+TN) / (TP+FP+TN+FN)

[0077] Where TP stands for True Positive, i.e., the number of samples correctly predicted as positive by the model; TN stands for True Negative, i.e., the number of samples correctly predicted as negative by the model; FP stands for False Positive, i.e., the number of samples incorrectly predicted as positive by the model; FN stands for False Negative, i.e., the number of samples incorrectly predicted as negative by the model.

[0078] Innovation: Use multiple indicators to comprehensively evaluate model performance, such as ROC curve and AUC value; introduce model explanation tools (such as LIME and SHAP) to understand the decision-making process of the model.

[0079] 4. Deployment and application:

[0080] (1) Model deployment: Deploy the trained model to the application system to realize image recognition and classification.

[0081] Among them, there are model conversion tools (such as TensorFlow Lite, ONNX), containerization (such as Docker), and cloud service platforms (such as AWS SageMaker, GoogleAIPlatform).

[0082] Furthermore, model pruning, quantization, and distillation techniques are used to reduce model size and improve inference speed; an efficient model service architecture is designed to ensure low latency and high concurrent processing.

[0083] (2) User interaction: Provides a user interaction interface where users can upload images to be classified, and the system automatically identifies and classifies them.

[0084] (3) Result display: The classification results are displayed to the user, who can perform corresponding operations based on the classification results, such as viewing related images, obtaining image tags, etc.

[0085] Therefore, the present invention introduces residual connections in deep convolutional neural networks to solve the degradation problem of deep networks (ResNet); uses dense connections to improve feature transfer efficiency (DenseNet); and introduces an attention module to focus the network on important features (SENet). Thus, administrators can quickly find images that meet the requirements for review based on the classification results, saving a lot of time.

[0086] Exemplary Devices

[0087] Figure 2 FIG. 1 is a schematic diagram of the structure of an image classification device provided by an exemplary embodiment of the present invention. Figure 2 As shown, the device 200 includes:

[0088] A collection module 210, used to collect image data sets containing different categories;

[0089] A first generating module 220, configured to pre-process the image data set to generate an image training set;

[0090] A second generation module 230 is used to train a pre-built deep convolutional neural network according to the picture training set to generate an image recognition model, wherein the deep convolutional neural network introduces residual connections, dense connections and attention modules;

[0091] The determination module 240 is used to input the uploaded image to be processed into the image recognition model to determine the category of the image to be processed.

[0092] Optionally, the first generating module 220 includes:

[0093] An enhancement submodule, used to perform data enhancement on the image dataset using a generative adversarial network;

[0094] The first generation submodule is used to perform data augmentation and normalization processing on the enhanced image data set to generate the image training set, wherein the formula for the normalization processing is:

[0095] x'=(x-μ) / σ

[0096] Where x' is the normalized pixel value, x is the augmented pixel value, μ is the mean of the data set, and σ is the standard deviation of the data set.

[0097] Optionally, the second generating module 230 includes:

[0098] The second generation submodule is used to perform parameter update convergence on the deep convolutional neural network using the picture training set through a preset loss function to generate the image recognition model, wherein:

[0099] The default loss function for deep convolutional neural networks is:

[0100] H(p,q)=-∑_{i=1}^{N}p_i*log(q_i)

[0101] Where H is the cross entropy loss function, p is the probability distribution vector of the true label, q is the probability distribution vector predicted by the model, and N is the number of categories.

[0102] Optionally, the device 200 further includes: an evaluation module, which is used to evaluate the image recognition model using a model evaluation algorithm to determine the evaluation result of the image recognition model, wherein the model evaluation algorithm includes: a confusion matrix, an accuracy rate, a recall rate, and an F1 score, and the calculation formula of the accuracy rate is:

[0103] Accuracy=(TP+TN) / (TP+FP+TN+FN)

[0104] In the formula, TP represents true positive examples, TN represents true negative examples, FP represents false positive examples, and FN represents false negative examples.

[0105] Exemplary Electronic Devices

[0106] Figure 3 This is a structure of an electronic device provided by an exemplary embodiment of the present invention. Figure 3 As shown, the electronic device 30 includes one or more processors 31 and a memory 32 .

[0107] The processor 31 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.

[0108] The memory 32 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 31 may run the program instructions to implement the methods of the software programs of the various embodiments of the present invention described above and / or other desired functions. In one example, the electronic device may also include: an input device 33 and an output device 34, which are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0109] In addition, the input device 33 may also include, for example, a keyboard, a mouse, and the like.

[0110] The output device 34 can output various information to the outside. The output device 34 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto.

[0111] Of course, to simplify, Figure 3 Only some of the components related to the present invention in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application conditions, the electronic device may also include any other appropriate components.

[0112] Exemplary computer program products and computer-readable storage media

[0113] In addition to the above-mentioned methods and devices, an embodiment of the present invention may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present invention described in the above-mentioned "Exemplary Method" section of this specification.

[0114] The computer program product may be written in any combination of one or more programming languages ​​to write program code for performing the operations of the embodiments of the present invention, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0115] In addition, an embodiment of the present invention may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enables the processor to execute the steps of the method for information mining of historical change records according to various embodiments of the present invention described in the above “Exemplary Method” section of this specification.

[0116] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, system or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable 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 above.

[0117] The basic principle of the present invention is described above in conjunction with specific embodiments. However, it should be pointed out that the advantages, strengths, effects, etc. mentioned in the present invention are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. must be possessed by each embodiment of the present invention. In addition, the specific details disclosed above are only for the purpose of illustration and facilitation of understanding, rather than limitation, and the above details do not limit the present invention to being implemented by adopting the above specific details.

[0118] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0119] The block diagrams of the devices, systems, equipment, and systems involved in the present invention are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, systems, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The word "such as" used here refers to the phrase "such as but not limited to", and can be used interchangeably with it.

[0120] The method and system of the present invention may be implemented in many ways. For example, the method and system of the present invention may be implemented by software, hardware, firmware or any combination of software, hardware, firmware. The above order of steps for the method is only for illustration, and the steps of the method of the present invention are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present invention may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present invention. Thus, the present invention also covers a recording medium storing a program for executing the method according to the present invention.

[0121] It should also be noted that in the system, device and method of the present invention, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. The above description of the disclosed aspects is provided to enable any technician in the field to make or use the present invention. Various modifications to these aspects are very obvious to those skilled in the art, and the general principles defined here can be applied to other aspects without departing from the scope of the present invention. Therefore, the present invention is not intended to be limited to the aspects shown here, but in accordance with the widest range consistent with the principles and novel features disclosed here.

[0122] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present invention to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A method for image classification, characterized in that: include: Collect a dataset of images containing different categories; Preprocessing the image data set to generate an image training set; Training a pre-built deep convolutional neural network according to the picture training set to generate an image recognition model, wherein the deep convolutional neural network introduces residual connections, dense connections, and attention modules; The uploaded image to be processed is input into the image recognition model to determine the category of the image to be processed.

2. The method according to claim 1, characterized in that Preprocessing the image data set to generate an image training set includes: Using a generative adversarial network to perform data enhancement on the image dataset; The enhanced image data set is subjected to data augmentation and normalization processing to generate the image training set, wherein the normalization processing formula is: x'=(x-μ) / σ Where x' is the normalized pixel value, x is the augmented pixel value, μ is the mean of the data set, and σ is the standard deviation of the data set.

3. The method according to claim 1, characterized in that The pre-built deep convolutional neural network is trained according to the picture training set to generate an image recognition model, including: The image recognition model is generated by performing parameter update convergence on the deep convolutional neural network using the picture training set through a preset loss function, wherein: The preset loss function of the deep convolutional neural network is: H(p,q)=-∑_{i=1}^{N}p_i*log(q_i) Where H is the cross entropy loss function, p is the probability distribution vector of the true label, q is the probability distribution vector predicted by the model, and N is the number of categories.

4. The method according to claim 3, characterized in that: Also includes: The image recognition model is evaluated using a model evaluation algorithm to determine the evaluation result of the image recognition model, wherein the model evaluation algorithm includes: confusion matrix, accuracy, recall rate and F1 score, and the calculation formula of the accuracy is: Accuracy=(TP+TN) / (TP+FP+TN+FN) In the formula, TP represents true positive examples, TN represents true negative examples, FP represents false positive examples, and FN represents false negative examples.

5. A picture classification device, characterized in that: include: The collection module is used to collect image datasets containing different categories; A first generating module, used to pre-process the image data set to generate an image training set; A second generation module is used to train a pre-built deep convolutional neural network according to the picture training set to generate an image recognition model, wherein the deep convolutional neural network introduces residual connections, dense connections and attention modules; The determination module is used to input the uploaded image to be processed into the image recognition model to determine the category of the image to be processed.

6. The device according to claim 5, characterized in that The first generation module includes: An enhancement submodule, used to perform data enhancement on the image dataset using a generative adversarial network; The first generation submodule is used to perform data augmentation and normalization processing on the enhanced image data set to generate the image training set, wherein the formula for the normalization processing is: x'=(x-μ) / σ Where x' is the normalized pixel value, x is the augmented pixel value, μ is the mean of the data set, and σ is the standard deviation of the data set.

7. The device according to claim 5, characterized in that The second generation module includes: The second generation submodule is used to perform parameter update convergence on the deep convolutional neural network using the picture training set through a model parameter adjustment algorithm to generate the image recognition model, wherein: The image recognition model is generated by performing parameter update convergence on the deep convolutional neural network using the picture training set through a preset loss function, wherein: The preset loss function of the deep convolutional neural network is: H(p,q)=-∑_{i=1}^{N}p_i*log(q_i) Where H is the cross entropy loss function, p is the probability distribution vector of the true label, q is the probability distribution vector predicted by the model, and N is the number of categories.

8. The device according to claim 7, characterized in that Also includes: An evaluation module is used to evaluate the image recognition model using a model evaluation algorithm to determine the evaluation result of the image recognition model, wherein the model evaluation algorithm includes: confusion matrix, accuracy, recall rate and F1 score, and the calculation formula of the accuracy is: Accuracy=(TP+TN) / (TP+FP+TN+FN) In the formula, TP represents true positive examples, TN represents true negative examples, FP represents false positive examples, and FN represents false negative examples.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the method according to any one of claims 1 to 4.

10. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Image multi-label classification method, image multi-label classification device, equipment and medium

    CN111126514A

  • Power transformation equipment classification and identification method based on multi-head self-attention module network, electronic equipment and storage medium

    CN116912587A

  • Res-UNet model data processing method and device and electronic equipment

    CN117765254A