Picture classification method and device, computer equipment and storage medium
Through the optimization of deep neural network model and composite loss function, the problem of low efficiency and accuracy of auto insurance images is solved, automated classification is realized, and the reliability and efficiency of classification results are improved.
Patent Information
- Application Number
- CN202411273727.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2025-01-10
AI Technical Summary
In the prior art, auto insurance picture classification relies on manual operations, resulting in low efficiency and low accuracy, prone to missed inspections and misjudgment, which increases communication costs and review time.
The deep neural network model is used to classify auto insurance images. By obtaining the training set and test set, the composite loss function and classification task confusion matrix are constructed, the model is optimized to improve classification accuracy and efficiency, and to achieve automated classification.
It greatly improves the efficiency and accuracy of auto insurance picture classification, ensures that the final model has good generalization ability, reduces manual errors, and improves the reliability of classification results.
Smart Images

Figure CN119295800A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, computer equipment and storage medium for image classification. Background Art
[0002] As the number of cars continues to increase, the incidence of traffic accidents is bound to rise, and the demand for auto insurance claims is growing accordingly. Auto insurance inspection is a key link in the insurance company's claims process, which directly affects the efficiency and accuracy of claims. At present, the industry mainly relies on manual operations when classifying auto insurance inspection pictures. After taking photos, the surveyor needs to manually classify the photos, and the classification also involves multiple image categories.
[0003] However, manual classification is time-consuming, and each case classification process usually takes up to 10 minutes, which restricts the improvement of efficiency. Secondly, manual classification is highly subjective, and it is easy to miss detections and misjudgments, resulting in inaccurate image classification. In addition, some surveyors may upload photos at will, making it difficult to locate the image category during the review, increasing communication costs and review time. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method, apparatus, computer device and storage medium for image classification to solve the problem of low accuracy and efficiency in image classification.
[0005] In order to solve the above technical problems, the present application embodiment provides a method for image classification, which adopts the following technical solution:
[0006] Obtaining a training set and a test set for auto insurance picture classification, wherein the training set and the test set both include a plurality of auto insurance pictures and their corresponding classification labels;
[0007] Inputting each of the auto insurance pictures in the training set into a first classification model to train the first classification model to obtain a second classification model, wherein recognition of each type of picture is regarded as a classification task, and the sub-loss function corresponding to each classification task has a weight;
[0008] Inputting each auto insurance picture in the test set into the second classification model to obtain a second predicted label for each auto insurance picture in the test set;
[0009] Constructing a classification task confusion matrix according to the second predicted label and the classification label of each auto insurance picture in the test set;
[0010] The second classification model is adjusted according to the classification task confusion matrix until the classification task confusion matrix satisfies a second stopping condition, thereby obtaining a car insurance picture classification model;
[0011] Obtain the auto insurance pictures to be classified, and input the auto insurance pictures to be classified into the auto insurance picture classification model to obtain the auto insurance picture classification result.
[0012] In order to solve the above technical problems, the embodiment of the present application further provides an image classification device, which adopts the following technical solution:
[0013] An acquisition module, used to acquire a training set and a test set for classification of auto insurance pictures, wherein the training set and the test set both include a plurality of auto insurance pictures and their corresponding classification labels;
[0014] A first training module is used to input each auto insurance picture in the training set into a first classification model to train the first classification model to obtain a second classification model, wherein the recognition of each type of picture is regarded as a classification task, and the sub-loss function corresponding to each classification task has a weight;
[0015] A second classification module, used for inputting each auto insurance picture in the test set into the second classification model to obtain a second predicted label for each auto insurance picture in the test set;
[0016] A matrix construction module, used to construct a classification task confusion matrix according to the second predicted label and the classification label of each auto insurance picture in the test set;
[0017] A second training module is used to adjust the second classification model according to the classification task confusion matrix until the classification task confusion matrix meets a second stop condition, thereby obtaining a car insurance picture classification model;
[0018] The picture classification module is used to obtain the car insurance pictures to be classified, and input the car insurance pictures to be classified into the car insurance picture classification model to obtain the car insurance picture classification results.
[0019] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0020] Obtaining a training set and a test set for auto insurance picture classification, wherein the training set and the test set both include a plurality of auto insurance pictures and their corresponding classification labels;
[0021] Inputting each of the auto insurance pictures in the training set into a first classification model to train the first classification model to obtain a second classification model, wherein recognition of each type of picture is regarded as a classification task, and the sub-loss function corresponding to each classification task has a weight;
[0022] Inputting each auto insurance picture in the test set into the second classification model to obtain a second predicted label for each auto insurance picture in the test set;
[0023] Constructing a classification task confusion matrix according to the second predicted label and the classification label of each auto insurance picture in the test set;
[0024] The second classification model is adjusted according to the classification task confusion matrix until the classification task confusion matrix satisfies a second stopping condition, thereby obtaining a car insurance picture classification model;
[0025] Obtain the auto insurance pictures to be classified, and input the auto insurance pictures to be classified into the auto insurance picture classification model to obtain the auto insurance picture classification result.
[0026] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0027] Obtaining a training set and a test set for auto insurance picture classification, wherein the training set and the test set both include a plurality of auto insurance pictures and their corresponding classification labels;
[0028] Inputting each of the auto insurance pictures in the training set into a first classification model to train the first classification model to obtain a second classification model, wherein recognition of each type of picture is regarded as a classification task, and the sub-loss function corresponding to each classification task has a weight;
[0029] Inputting each auto insurance picture in the test set into the second classification model to obtain a second predicted label for each auto insurance picture in the test set;
[0030] Constructing a classification task confusion matrix according to the second predicted label and the classification label of each auto insurance picture in the test set;
[0031] The second classification model is adjusted according to the classification task confusion matrix until the classification task confusion matrix satisfies a second stopping condition, thereby obtaining a car insurance picture classification model;
[0032] Obtain the auto insurance pictures to be classified, and input the auto insurance pictures to be classified into the auto insurance picture classification model to obtain the auto insurance picture classification result.
[0033] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects: obtaining a training set and a test set for the classification of auto insurance pictures; inputting each auto insurance picture in the training set into a first classification model to train a second classification model, the first classification model uses a composite loss function to calculate the model loss, the recognition of each type of picture is regarded as a classification task, and the sub-loss function corresponding to each classification task in the composite loss function has a weight, so that the model focuses on certain classification tasks and optimizes the performance of the model on multiple tasks; inputting each auto insurance picture in the test set into the second classification model to obtain a second predicted label for each auto insurance picture in the test set; according to the auto insurance pictures in the test set, The second predicted label of the picture and its classification label are used to construct a classification task confusion matrix. The confusion matrix reflects the classification accuracy and error distribution of the model in each classification task, so that the second classification model can be adjusted in a targeted manner according to the classification task confusion matrix until the classification task confusion matrix meets the second stopping condition, and a car insurance picture classification model is obtained; the car insurance picture to be classified is obtained and input into the car insurance picture classification model to obtain the car insurance picture classification result, and the automatic classification of the car insurance picture is realized, which greatly improves the efficiency of the car insurance picture classification; through the gradual optimization of the model, it is ensured that the final car insurance picture classification model has good generalization ability, which effectively improves the accuracy of the car insurance picture classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0035] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0036] Figure 2 is a flow chart of an embodiment of a method for classifying pictures according to the present application;
[0037] Figure 3 is a structural schematic diagram of an embodiment of a picture classification device according to the present application;
[0038] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0040] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0041] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0042] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables.
[0043] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0044] The terminal devices 101, 102, and 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.
[0045] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0046] It should be noted that the image classification method provided in the embodiment of the present application is generally executed by a server, and accordingly, the image classification device is generally set in the server.
[0047] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0048] Continue to refer Figure 2 , shows a flow chart of an embodiment of a method for classifying pictures according to the present application. The method for classifying pictures comprises the following steps:
[0049] Step S201, obtaining a training set and a test set for classification of auto insurance pictures, wherein the training set and the test set both include a plurality of auto insurance pictures and their corresponding classification labels.
[0050] In this embodiment, the electronic device on which the image classification method is executed (eg Figure 1 The server shown in the figure can communicate with the terminal device through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G / 5G connection, Wi-Fi connection, Bluetooth connection, Wi MAX connection, Zigbee connection, UWB (Ultra Wi-Fi Band) connection, and other wireless connection methods currently known or to be developed in the future.
[0051] Specifically, a large number of auto insurance pictures are collected, such as auto insurance inspection photos obtained from historical data. These photos cover different types of auto insurance related pictures, such as inspection photos, inspection photos, environmental photos, vehicle damage photos, repair invoices, rescue fee invoices, and three certificates and one card. Auto insurance pictures have classification labels, which indicate which type of auto insurance picture the picture belongs to. For example, the classification label indicates that the auto insurance picture belongs to an inspection photo or an environmental photo. The obtained auto insurance pictures are divided into a training set and a test set.
[0052] Step S202, input each car insurance picture in the training set into the first classification model to train the first classification model to obtain a second classification model, wherein the recognition of each type of picture is regarded as a classification task, and the sub-loss function corresponding to each classification task has a weight.
[0053] Specifically, a first classification model is obtained, and the first classification model may be a car insurance picture classification model that is still in training and adjustment. In one embodiment, the car insurance picture classification model may be an EffectiveNet model, which is a deep neural network model for image classification. It uses a method called compound scaling to simultaneously scale the depth, width, and resolution of the network to find an efficient and high-performance network architecture. Through this scaling method, EffectiveNet can maintain or improve the accuracy of the model while reducing parameters and computational complexity.
[0054] Each car insurance picture in the training set is input into the first classification model, and the first classification model outputs the first classification labels of these pictures.
[0055] This application uses a composite loss function to calculate the model loss. The recognition of each type of auto insurance image is considered as an independent classification task. For example, for environmental images, the goal of the corresponding classification task is to identify whether a picture is an environmental picture or a non-environmental picture, that is, each classification task can be a binary classification task.
[0056] The composite loss function is composed of multiple sub-loss functions, each of which corresponds to a classification task. The sub-loss function of each classification task has a weight, and the sub-loss functions of different classification tasks can have different weights, so that the model can pay more attention to certain classification tasks during training.
[0057] Through optimization methods such as back propagation and gradient descent, the parameters of the first classification model are adjusted according to the loss calculated by the composite loss function. The training process at this stage will continuously adjust the model parameters to reduce the model loss. The training process will continue until the model loss meets the preset stop condition, such as reaching a specified loss value or after a certain number of rounds of training, thus obtaining a preliminarily optimized second classification model.
[0058] Step S203: input each car insurance picture in the test set into the second classification model to obtain a second predicted label for each car insurance picture in the test set.
[0059] Specifically, the second classification model is applied to each car insurance picture in the test set to obtain the second predicted labels of these pictures in order to evaluate the performance of the model on unseen data and provide a basis for subsequent model evaluation and adjustment.
[0060] Step S204, constructing a classification task confusion matrix according to the second predicted label and classification label of each car insurance picture in the test set.
[0061] Specifically, after using the second classification model to predict each car insurance picture in the test set, the second predicted label is compared with the true classification label to construct a classification task confusion matrix. The confusion matrix records in detail the number of TP, TN, FP, and FN of the second classification model on each classification task. By analyzing the confusion matrix, we can understand the classification accuracy and error distribution of the model on each classification task.
[0062] Step S205, adjusting the second classification model according to the classification task confusion matrix until the classification task confusion matrix meets the second stop condition, thereby obtaining a car insurance picture classification model.
[0063] Specifically, the classification errors in the classification task confusion matrix are analyzed, and the second classification model is adjusted according to the classification errors to further optimize the classification ability of the model until the classification task confusion matrix performance meets the preset second stop condition, such as the error rate is reduced to a certain range, to obtain the final optimized auto insurance image classification model.
[0064] Step S206, obtaining the auto insurance pictures to be classified, and inputting the auto insurance pictures to be classified into the auto insurance picture classification model to obtain the auto insurance picture classification results.
[0065] Specifically, in actual application, the auto insurance pictures to be classified are obtained and input into the finally optimized auto insurance picture classification model, and the model outputs the classification results of the auto insurance pictures to be classified, thereby completing the automatic classification task of the auto insurance pictures.
[0066] In this embodiment, a training set and a test set for the classification of auto insurance pictures are obtained; each auto insurance picture in the training set is input into a first classification model to train a second classification model, the first classification model uses a composite loss function to calculate the model loss, the recognition of each type of picture is regarded as a classification task, and the sub-loss function corresponding to each classification task in the composite loss function has a weight, so that the model focuses on certain classification tasks and optimizes the performance of the model on multiple tasks; each auto insurance picture in the test set is input into the second classification model to obtain a second predicted label for each auto insurance picture in the test set; according to the second predicted label of each auto insurance picture in the test set and its classification labels, construct a classification task confusion matrix, the confusion matrix reflects the classification accuracy and error distribution of the model in each classification task, so that the second classification model can be adjusted in a targeted manner according to the classification task confusion matrix, until the classification task confusion matrix meets the second stopping condition, and the car insurance picture classification model is obtained; the car insurance pictures to be classified are obtained and input into the car insurance picture classification model, and the car insurance picture classification results are obtained, so that the automatic classification of the car insurance pictures is realized, which greatly improves the efficiency of the car insurance picture classification; through the gradual optimization of the model, it is ensured that the final car insurance picture classification model has good generalization ability, which effectively improves the accuracy of the car insurance picture classification.
[0067] Furthermore, the above step S201 may include: obtaining multiple auto insurance pictures and their corresponding classification labels for auto insurance picture classification; preprocessing each auto insurance picture; performing data enhancement processing on each preprocessed auto insurance picture; and dividing each auto insurance picture after data enhancement processing into a training set and a test set.
[0068] Specifically, a large number of auto insurance pictures for auto insurance picture classification are obtained, and the auto insurance pictures have classification labels. First, these initial auto insurance pictures are preprocessed, and the preprocessing process may include cleaning, deduplication, size adjustment, color normalization, noise removal, etc., to ensure the consistency and quality of the input data.
[0069] Next, the preprocessed auto insurance pictures are subjected to data enhancement, including rotation, flipping, scaling, cropping, etc., to increase the diversity of training data and prevent model overfitting. Finally, the auto insurance pictures after data enhancement are divided into training sets and test sets to prepare data for model training and testing.
[0070] In this embodiment, after obtaining multiple auto insurance pictures and their corresponding classification labels, preprocessing is first performed to ensure the consistency of the input data and reduce classification errors caused by image quality issues; then data enhancement processing is performed to increase the diversity of training data to prevent model overfitting; the auto insurance pictures after data enhancement are divided into training sets and test sets to prepare data for model training and testing.
[0071] Furthermore, the above-mentioned step S202 may include: inputting each auto insurance picture in the training set into the first classification model to obtain the first predicted label of each auto insurance picture in the training set; based on the first predicted label of each auto insurance picture in the training set and its classification label, calculating the first loss of each classification task through the sub-loss function of each classification task; obtaining the weight of each classification task, the weight of the classification task includes static weight and dynamic weight; according to the weight of each classification task and its corresponding first loss, calculating the model loss of the composite loss function corresponding to each sub-loss function; adjusting the first classification model according to the model loss until the model loss meets the first stop condition, and obtaining the second classification model.
[0072] Specifically, each car insurance picture in the training set is input into the first classification model to obtain the first predicted label of each car insurance picture in the training set. By comparing the first predicted label of each car insurance picture in the training set with its actual classification label, the first loss of each classification task can be calculated. Each classification task can have a different sub-loss function.
[0073] In order to comprehensively consider the importance and difficulty of different classification tasks, this application sets weights for classification tasks, including static weights and dynamic weights. Static weights are pre-set, and dynamic weights are adjusted in real time according to the performance of the model during training to ensure that the model is balanced between various classification tasks.
[0074] The weight of each classification task is weighted and summed with its corresponding first loss to obtain the total model loss of the composite loss function. The composite loss function is a composite of the sub-loss functions of each classification task, which can reflect the overall performance of the model on all classification tasks.
[0075] In one embodiment, the composite loss function may be a PolyLoss function. PolyLoss is an adaptive loss function, which is mainly used in multi-task learning. In multi-task learning, the model needs to process multiple tasks at the same time, and the importance and difficulty of each task may be different. PolyLoss can adaptively adjust the loss value of each task according to the weights of different tasks, so that the model can balance between multiple tasks. PolyLoss defines a separate loss function for each task. For example, for image classification tasks, a cross entropy loss function can be used.
[0076] The first classification model is adjusted according to the model loss until the model loss meets the first stopping condition, thereby obtaining the second classification model, wherein the first stopping condition may be that the model loss is less than a preset loss threshold.
[0077] In this embodiment, based on the first predicted label and classification label of each auto insurance picture in the training set, the first loss of each classification task is calculated through the sub-loss function of each classification task; the weight of each classification task is obtained, and the weight of the classification task includes static weight and dynamic weight. The static weight is preset, and the dynamic weight is adjusted in real time according to the performance of the model during the training process to ensure that the model achieves a balance between various classification tasks and the overall classification performance; according to the weight of each classification task and its corresponding first loss, the model loss of the composite loss function corresponding to each sub-loss function is calculated, so as to accurately reflect the overall performance of the model on all classification tasks, provide clear guidance for subsequent optimization, and ensure the accuracy of the second classification model obtained through training.
[0078] Furthermore, the above-mentioned step of obtaining the weight of each classification task may include: when the weight of the classification task is a static weight, determining the weight of each classification task according to the sample ratio or business importance of each classification task; when the weight of the classification task is a dynamic weight, obtaining the weight and classification accuracy of each classification task in the previous training cycle; and calculating the weight of each classification task in the current training cycle based on the obtained weight and classification accuracy in the previous training cycle.
[0079] Specifically, the weight of the classification task can be a static weight or a dynamic weight.
[0080] Among them, the static weight can be determined according to the sample ratio or business importance of each classification task. The sample ratio refers to the ratio of the auto insurance pictures targeted by the classification task in the training set. As mentioned earlier, the recognition of each type of auto insurance picture is regarded as a classification task, which is a binary classification task; for example, for environmental pictures, the goal of the corresponding classification task is: to identify whether a picture is an environmental picture or a non-environmental picture, then the weight of the classification task for identifying environmental pictures can be determined according to the ratio of environmental pictures in the training set. If a certain type of auto insurance picture is less in the data set, in order to avoid the model ignoring the task, a higher weight can be assigned to it. In actual applications, according to business needs, some classification tasks may be more important than other tasks; for example, car damage photos are more important than environmental photos, so a higher weight can be assigned to the classification task corresponding to the car damage photos.
[0081] For dynamic weights, an initial weight can be assigned to each classification task at the beginning of training, and the initial weight can be evenly distributed. When dynamic weights are used, the training process is divided into multiple training cycles. After each training cycle, the weight and classification accuracy of each classification task are recorded.
[0082] During the current training cycle, the current weight of the classification task is dynamically adjusted according to the weight and classification accuracy of the classification task in the previous training cycle. If the classification accuracy of a classification task in the previous training cycle is low, its weight is increased so that the model pays more attention to the task in the current training cycle; conversely, if the classification accuracy of a classification task is high, its weight can be appropriately reduced.
[0083] In this embodiment, when the weight of the classification task is a static weight, the weight of each classification task is determined according to the sample ratio or business importance of each classification task to ensure that each task receives reasonable attention, which can prevent certain tasks from being neglected due to data imbalance and ensure that business-critical tasks receive higher priority; when the weight of the classification task is a dynamic weight, the weight and classification accuracy of each classification task in the previous training cycle are obtained, and the weight of each classification task in the current training cycle is calculated based on the obtained weight and classification accuracy in the previous training cycle. This adaptive adjustment enables the model to automatically identify and focus on tasks with poor classification results, which is beneficial to improving the overall performance of the model and enhancing the balance and robustness of the model on different tasks.
[0084] Furthermore, the above step S205 may include: based on the classification task confusion matrix, counting the false positive examples and false negative examples of each classification task to generate confusion statistical information for each classification task; generating a model adjustment strategy according to the confusion statistical information of each classification task; adjusting the second classification model according to the model adjustment strategy until the classification task confusion matrix meets the second stop condition, thereby obtaining a car insurance picture classification model.
[0085] Specifically, the number of false positives (FP) and false negatives (FN) for each classification task is extracted from the classification task confusion matrix. False positives refer to the number of samples that are actually negative but are mistakenly classified as positive, and false negatives refer to the number of samples that are actually positive but are mistakenly classified as negative. Based on the FP and FN of each classification task, the confusion statistics of each classification task are generated, and based on the confusion statistics, it can be determined which classification tasks have large errors in the classification process.
[0086] Based on the confusion statistics, a model adjustment strategy is formulated. The model adjustment strategy can be to adjust specific hyperparameters in the model or to adjust the model structure to improve the classification performance of a specific task.
[0087] According to the model adjustment strategy, the second classification model is adjusted to reduce the FP and FN of the classification task and improve the accuracy of the model for each classification task. After the model is adjusted, the model is retrained, and the adjusted second classification model is used to evaluate the test set and update the classification task confusion matrix. The above adjustment and evaluation process is repeated until the classification task confusion matrix meets the second stopping condition, which can be a certain accuracy threshold or error range. Through this iterative optimization, the final auto insurance image classification model is obtained.
[0088] In this embodiment, based on the classification task confusion matrix, the false positive examples and false negative examples of each classification task are counted to generate confusion statistical information of each classification task; the confusion statistical information of each classification task reflects the classification errors of the model on different tasks, indicating the source of the error, and a targeted model adjustment strategy can be generated based on the confusion statistical information; the second classification model is adjusted according to the model adjustment strategy to improve the classification performance of specific tasks, ensure the balance of the model in multi-task classification, and improve the accuracy of the car insurance picture classification model.
[0089] Furthermore, the above-mentioned step of adjusting the second classification model according to the model adjustment strategy may include: adjusting the convolution kernel in the second classification model; or, adjusting the number of channels in the second classification model; or, adjusting the convolution kernel and the number of channels in the second classification model.
[0090] Specifically, there are three model adjustment strategies:
[0091] (1) Adjust the convolution kernel:
[0092] After analyzing the confusion matrix, if the false positives (FP) and false negatives (FN) in some classification tasks are high, it may be because the model does not extract detailed features sufficiently. In this case, you can increase the size of the convolution kernel of the second classification model. For example, increase it from 3x3 to 5x5 to expand the receptive field and capture more detailed features.
[0093] (2) Adjust the number of channels:
[0094] If there are complex features in some classification tasks and the model performs poorly, you can increase the number of channels in the convolutional layer of the second classification model to improve the model's feature extraction ability. For example, increase the number of channels from 64 to 128. Increasing the number of channels can improve the model's expressiveness and enable it to capture features in more dimensions.
[0095] (3) Adjust the convolution kernel and the number of channels simultaneously:
[0096] In some cases (e.g., poor performance on multiple classification tasks, insufficient model feature extraction capabilities), adjusting the kernel size or number of channels alone may not be enough to significantly improve model performance. In this case, you can adjust both the kernel and the number of channels. For example, adjust the kernel from 3x3 to 5x5 and increase the number of channels from 64 to 128 to fully improve the model's feature extraction capabilities.
[0097] In this embodiment, the adjustment of the convolution kernel and the number of channels in the classification model is beneficial to improving the feature extraction capability and classification accuracy of the model; the convolution kernel can be adjusted individually, or the number of channels can be adjusted individually, or the convolution kernel and the number of channels can be adjusted simultaneously; this multi-dimensional optimization strategy can adaptively optimize the feature extraction capability, meet the needs of different tasks, and ensure the accuracy of the image classification model.
[0098] Furthermore, the above-mentioned step of inputting the auto insurance pictures to be classified into the auto insurance picture classification model to obtain the auto insurance picture classification results may include: inputting the auto insurance pictures to be classified into the auto insurance picture classification model to obtain the prediction results of each classification task and their confidence levels; when the highest confidence level among the confidence levels is greater than or equal to a preset confidence threshold, the prediction result corresponding to the highest confidence level is used as the auto insurance picture classification result; when the highest confidence level among the confidence levels is less than the preset confidence threshold, the prediction result corresponding to the highest confidence level is sent to a preset terminal, and the confirmation result returned by the preset terminal is used as the auto insurance picture classification result.
[0099] Specifically, the auto insurance pictures to be classified are input into the auto insurance picture classification model to obtain the prediction results of each classification task and its corresponding confidence level, wherein the confidence level is the probability that the picture output by the model belongs to the picture type corresponding to a certain classification task.
[0100] Check the confidence of all classification tasks. When the highest confidence is greater than or equal to the preset confidence threshold, the prediction result corresponding to this confidence is used as the classification result of the car insurance image.
[0101] If the highest confidence is lower than the preset confidence threshold, it means that the model is not sure enough about the classification result of the current picture, and the prediction result corresponding to the highest confidence is sent to the preset terminal for manual confirmation. After the preset terminal returns the confirmation result, this confirmation result is used as the final classification result of the auto insurance picture.
[0102] In this embodiment, the auto insurance pictures to be classified are input into the auto insurance picture classification model to obtain the prediction results and confidence levels of each classification task; when the highest confidence level is greater than or equal to the confidence threshold, it is directly used as the final classification result; when the highest confidence level is less than the confidence threshold, the prediction result is sent to a preset terminal for manual confirmation, ensuring that the model can still provide highly accurate classification results under uncertain circumstances.
[0103] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned auto insurance pictures, the above-mentioned auto insurance pictures can also be stored in a blockchain node.
[0104] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0105] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0106] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0107] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0108] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0109] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a picture classification device, and the embodiment of the device is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0110] like Figure 3 As shown, the image classification device 300 described in this embodiment includes: an acquisition module 301, a first training module 302, a second classification module 303, a matrix construction module 304, a second training module 305 and an image classification module 306, wherein:
[0111] The acquisition module 301 is used to obtain a training set and a test set for classification of auto insurance pictures, where both the training set and the test set include a plurality of auto insurance pictures and their corresponding classification labels.
[0112] The first training module 302 is used to input each car insurance picture in the training set into the first classification model to train the first classification model to obtain a second classification model, wherein the recognition of each type of picture is used as a classification task, and the sub-loss function corresponding to each classification task has a weight.
[0113] The second classification module 303 is used to input each car insurance picture in the test set into a second classification model to obtain a second predicted label for each car insurance picture in the test set.
[0114] The matrix construction module 304 is used to construct a classification task confusion matrix according to the second predicted label and classification label of each car insurance picture in the test set.
[0115] The second training module 305 is used to adjust the second classification model according to the classification task confusion matrix until the classification task confusion matrix meets the second stop condition, thereby obtaining a car insurance picture classification model.
[0116] The picture classification module 306 is used to obtain the car insurance pictures to be classified, and input the car insurance pictures to be classified into the car insurance picture classification model to obtain the car insurance picture classification results.
[0117] In this embodiment, a training set and a test set for the classification of auto insurance pictures are obtained; each auto insurance picture in the training set is input into a first classification model to train a second classification model, the first classification model uses a composite loss function to calculate the model loss, the recognition of each type of picture is regarded as a classification task, and the sub-loss function corresponding to each classification task in the composite loss function has a weight, so that the model focuses on certain classification tasks and optimizes the performance of the model on multiple tasks; each auto insurance picture in the test set is input into the second classification model to obtain a second predicted label for each auto insurance picture in the test set; according to the second predicted label of each auto insurance picture in the test set and its classification labels, construct a classification task confusion matrix, the confusion matrix reflects the classification accuracy and error distribution of the model in each classification task, so that the second classification model can be adjusted in a targeted manner according to the classification task confusion matrix, until the classification task confusion matrix meets the second stopping condition, and the car insurance picture classification model is obtained; the car insurance pictures to be classified are obtained and input into the car insurance picture classification model, and the car insurance picture classification results are obtained, so that the automatic classification of the car insurance pictures is realized, which greatly improves the efficiency of the car insurance picture classification; through the gradual optimization of the model, it is ensured that the final car insurance picture classification model has good generalization ability, which effectively improves the accuracy of the car insurance picture classification.
[0118] In some optional implementations of this embodiment, the acquisition module 301 may include: a picture acquisition submodule, a preprocessing submodule, an enhancement processing submodule, and a picture division submodule, wherein:
[0119] The picture acquisition submodule is used to obtain multiple car insurance pictures and their corresponding classification labels for car insurance picture classification.
[0120] The preprocessing submodule is used to preprocess each car insurance picture.
[0121] The enhancement processing submodule is used to perform data enhancement processing on each pre-processed auto insurance image.
[0122] The picture division submodule is used to divide each car insurance picture after data enhancement processing into a training set and a test set.
[0123] In this embodiment, after obtaining multiple auto insurance pictures and their corresponding classification labels, preprocessing is first performed to ensure the consistency of the input data and reduce classification errors caused by image quality issues; then data enhancement processing is performed to increase the diversity of training data to prevent model overfitting; the auto insurance pictures after data enhancement are divided into training sets and test sets to prepare data for model training and testing.
[0124] In some optional implementations of this embodiment, the first training module 302 may include: a first input submodule, a loss calculation submodule, a weight acquisition submodule, a composite calculation submodule, and a first adjustment submodule, wherein:
[0125] The first input submodule is used to input each auto insurance picture in the training set into a first classification model to obtain a first predicted label for each auto insurance picture in the training set.
[0126] The loss calculation submodule is used to calculate the first loss of each classification task based on the first predicted label and classification label of each car insurance picture in the training set through the sub-loss function of each classification task.
[0127] The weight acquisition submodule is used to obtain the weight of each classification task. The weight of the classification task includes static weight and dynamic weight.
[0128] The composite calculation submodule is used to calculate the model loss of the composite loss function corresponding to each sub-loss function according to the weight of each classification task and its corresponding first loss.
[0129] The first adjustment submodule is used to adjust the first classification model according to the model loss until the model loss meets a first stop condition to obtain a second classification model.
[0130] In this embodiment, based on the first predicted label and classification label of each auto insurance picture in the training set, the first loss of each classification task is calculated through the sub-loss function of each classification task; the weight of each classification task is obtained, and the weight of the classification task includes static weight and dynamic weight. The static weight is preset, and the dynamic weight is adjusted in real time according to the performance of the model during the training process to ensure that the model achieves a balance between various classification tasks and the overall classification performance; according to the weight of each classification task and its corresponding first loss, the model loss of the composite loss function corresponding to each sub-loss function is calculated, so as to accurately reflect the overall performance of the model on all classification tasks, provide clear guidance for subsequent optimization, and ensure the accuracy of the second classification model obtained through training.
[0131] In some optional implementations of this embodiment, the weight acquisition submodule may include: a static determination unit, an acquisition unit, and a weight calculation unit, wherein:
[0132] The static determination unit is used to determine the weight of each classification task according to the sample ratio or business importance of each classification task when the weight of the classification task is a static weight.
[0133] The acquisition unit is used to acquire the weight and classification accuracy of each classification task in the previous training cycle when the weight of the classification task is a dynamic weight.
[0134] The weight calculation unit is used to calculate the weight of each classification task in the current training cycle based on the weight and classification accuracy obtained in the previous training cycle.
[0135] In this embodiment, when the weight of the classification task is a static weight, the weight of each classification task is determined according to the sample ratio or business importance of each classification task to ensure that each task receives reasonable attention, which can prevent certain tasks from being neglected due to data imbalance and ensure that business-critical tasks receive higher priority; when the weight of the classification task is a dynamic weight, the weight and classification accuracy of each classification task in the previous training cycle are obtained, and the weight of each classification task in the current training cycle is calculated based on the obtained weight and classification accuracy in the previous training cycle. This adaptive adjustment enables the model to automatically identify and focus on tasks with poor classification results, which is beneficial to improving the overall performance of the model and enhancing the balance and robustness of the model on different tasks.
[0136] In some optional implementations of this embodiment, the second training module 305 may include: a statistics generation submodule, a strategy generation submodule, and a model adjustment submodule, wherein:
[0137] The statistics generation submodule is used to count the false positive examples and false negative examples of each classification task based on the classification task confusion matrix to generate confusion statistics information of each classification task.
[0138] The strategy generation submodule is used to generate model adjustment strategies based on the confusion statistics of each classification task.
[0139] The model adjustment submodule is used to adjust the second classification model according to the model adjustment strategy until the classification task confusion matrix meets the second stop condition, thereby obtaining the auto insurance picture classification model.
[0140] In this embodiment, based on the classification task confusion matrix, the false positive examples and false negative examples of each classification task are counted to generate confusion statistical information of each classification task; the confusion statistical information of each classification task reflects the classification errors of the model on different tasks, indicating the source of the error, and a targeted model adjustment strategy can be generated based on the confusion statistical information; the second classification model is adjusted according to the model adjustment strategy to improve the classification performance of specific tasks, ensure the balance of the model in multi-task classification, and improve the accuracy of the car insurance picture classification model.
[0141] In some optional implementations of this embodiment, the model adjustment submodule may include: a first adjustment unit, a second adjustment unit, and a third adjustment unit, wherein:
[0142] The first adjustment unit is used to adjust the convolution kernel in the second classification model.
[0143] The second adjustment unit is used to adjust the number of channels in the second classification model.
[0144] The third adjustment unit is used to adjust the convolution kernel and the number of channels in the second classification model.
[0145] In this embodiment, the adjustment of the convolution kernel and the number of channels in the classification model is beneficial to improving the feature extraction capability and classification accuracy of the model; the convolution kernel can be adjusted individually, or the number of channels can be adjusted individually, or the convolution kernel and the number of channels can be adjusted simultaneously; this multi-dimensional optimization strategy can adaptively optimize the feature extraction capability, meet the needs of different tasks, and ensure the accuracy of the image classification model.
[0146] In some optional implementations of this embodiment, the picture classification module 306 may include: a classification prediction submodule, a first determination submodule and a second determination submodule, wherein:
[0147] The classification prediction submodule is used to input the auto insurance pictures to be classified into the auto insurance picture classification model to obtain the prediction results and confidence levels of each classification task.
[0148] The first determination submodule is used to use the prediction result corresponding to the highest confidence level as the classification result of the vehicle insurance picture when the highest confidence level among the confidence levels is greater than or equal to a preset confidence level threshold.
[0149] The second determination submodule is used to send the prediction result corresponding to the highest confidence level to a preset terminal when the highest confidence level among the confidence levels is less than a preset confidence level threshold, and use the confirmation result returned by the preset terminal as the classification result of the vehicle insurance picture.
[0150] In this embodiment, the auto insurance pictures to be classified are input into the auto insurance picture classification model to obtain the prediction results and confidence levels of each classification task; when the highest confidence level is greater than or equal to the confidence threshold, it is directly used as the final classification result; when the highest confidence level is less than the confidence threshold, the prediction result is sent to a preset terminal for manual confirmation, ensuring that the model can still provide highly accurate classification results under uncertain circumstances.
[0151] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0152] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital processors (DSPs), embedded devices, etc.
[0153] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0154] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the image classification method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0155] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the image classification method.
[0156] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0157] The computer device provided in this embodiment can execute the above-mentioned picture classification method. Here, the picture classification method can be the picture classification method of each of the above-mentioned embodiments.
[0158] In this embodiment, a training set and a test set for the classification of auto insurance pictures are obtained; each auto insurance picture in the training set is input into a first classification model to train a second classification model, the first classification model uses a composite loss function to calculate the model loss, the recognition of each type of picture is regarded as a classification task, and the sub-loss function corresponding to each classification task in the composite loss function has a weight, so that the model focuses on certain classification tasks and optimizes the performance of the model on multiple tasks; each auto insurance picture in the test set is input into the second classification model to obtain a second predicted label for each auto insurance picture in the test set; according to the second predicted label of each auto insurance picture in the test set and its classification labels, construct a classification task confusion matrix, the confusion matrix reflects the classification accuracy and error distribution of the model in each classification task, so that the second classification model can be adjusted in a targeted manner according to the classification task confusion matrix, until the classification task confusion matrix meets the second stopping condition, and the car insurance picture classification model is obtained; the car insurance pictures to be classified are obtained and input into the car insurance picture classification model, and the car insurance picture classification results are obtained, so that the automatic classification of the car insurance pictures is realized, which greatly improves the efficiency of the car insurance picture classification; through the gradual optimization of the model, it is ensured that the final car insurance picture classification model has good generalization ability, which effectively improves the accuracy of the car insurance picture classification.
[0159] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the above-mentioned image classification method.
[0160] In this embodiment, a training set and a test set for the classification of auto insurance pictures are obtained; each auto insurance picture in the training set is input into a first classification model to train a second classification model, the first classification model uses a composite loss function to calculate the model loss, the recognition of each type of picture is regarded as a classification task, and the sub-loss function corresponding to each classification task in the composite loss function has a weight, so that the model focuses on certain classification tasks and optimizes the performance of the model on multiple tasks; each auto insurance picture in the test set is input into the second classification model to obtain a second predicted label for each auto insurance picture in the test set; according to the second predicted label of each auto insurance picture in the test set and its classification labels, construct a classification task confusion matrix, the confusion matrix reflects the classification accuracy and error distribution of the model in each classification task, so that the second classification model can be adjusted in a targeted manner according to the classification task confusion matrix, until the classification task confusion matrix meets the second stopping condition, and the car insurance picture classification model is obtained; the car insurance pictures to be classified are obtained and input into the car insurance picture classification model, and the car insurance picture classification results are obtained, so that the automatic classification of the car insurance pictures is realized, which greatly improves the efficiency of the car insurance picture classification; through the gradual optimization of the model, it is ensured that the final car insurance picture classification model has good generalization ability, which effectively improves the accuracy of the car insurance picture classification.
[0161] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0162] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A method for image classification, characterized in that: The steps include: Obtaining a training set and a test set for auto insurance picture classification, wherein the training set and the test set both include a plurality of auto insurance pictures and their corresponding classification labels; Inputting each of the auto insurance pictures in the training set into a first classification model to train the first classification model to obtain a second classification model, wherein recognition of each type of picture is regarded as a classification task, and the sub-loss function corresponding to each classification task has a weight; Inputting each auto insurance picture in the test set into the second classification model to obtain a second predicted label for each auto insurance picture in the test set; Constructing a classification task confusion matrix according to the second predicted label and the classification label of each auto insurance picture in the test set; The second classification model is adjusted according to the classification task confusion matrix until the classification task confusion matrix satisfies a second stopping condition, thereby obtaining a car insurance picture classification model; Obtain the auto insurance pictures to be classified, and input the auto insurance pictures to be classified into the auto insurance picture classification model to obtain the auto insurance picture classification result.
2. The image classification method according to claim 1, characterized in that: The step of obtaining a training set and a test set for auto insurance image classification includes: Obtain multiple auto insurance pictures and their corresponding classification labels for auto insurance picture classification; Pre-process each car insurance picture; Perform data enhancement on each pre-processed auto insurance image; The auto insurance pictures after data enhancement are divided into training set and test set.
3. The image classification method according to claim 1, characterized in that: The step of inputting each of the auto insurance pictures in the training set into the first classification model to train the first classification model to obtain the second classification model comprises: Inputting each auto insurance picture in the training set into a first classification model to obtain a first predicted label for each auto insurance picture in the training set; Based on the first predicted label and classification label of each auto insurance image in the training set, calculating the first loss of each classification task through the sub-loss function of each classification task; Obtaining the weight of each classification task, where the weight of the classification task includes a static weight and a dynamic weight; According to the weight of each classification task and its corresponding first loss, calculate the model loss of the composite loss function corresponding to each sub-loss function; The first classification model is adjusted according to the model loss until the model loss meets a first stopping condition, thereby obtaining a second classification model.
4. The image classification method according to claim 3, characterized in that: The step of obtaining the weight of each classification task comprises: When the weight of the classification task is a static weight, the weight of each classification task is determined according to the sample ratio or business importance of each classification task; When the weight of the classification task is a dynamic weight, obtaining the weight and classification accuracy of each classification task in the previous training cycle; The weight of each classification task in the current training cycle is calculated based on the weights and classification accuracy in the previous training cycle.
5. The image classification method according to claim 1, characterized in that: The step of adjusting the second classification model according to the classification task confusion matrix until the classification task confusion matrix satisfies the second stop condition to obtain the auto insurance picture classification model includes: Based on the classification task confusion matrix, counting false positive examples and false negative examples of each classification task to generate confusion statistical information of each classification task; Generate a model adjustment strategy based on the confusion statistics of each classification task; The second classification model is adjusted according to the model adjustment strategy until the classification task confusion matrix meets the second stopping condition, thereby obtaining a car insurance picture classification model.
6. The image classification method according to claim 5, characterized in that: The step of adjusting the second classification model according to the model adjustment strategy includes: Adjust the convolution kernel in the second classification model; or, Adjusting the number of channels in the second classification model; or, The convolution kernel and the number of channels in the second classification model are adjusted.
7. The image classification method according to claim 1, characterized in that: The step of inputting the to-be-classified auto insurance picture into the auto insurance picture classification model to obtain the auto insurance picture classification result comprises: Inputting the to-be-classified auto insurance pictures into the auto insurance picture classification model to obtain the prediction results of each classification task and their confidence levels; When the highest confidence level among the confidence levels is greater than or equal to a preset confidence level threshold, the prediction result corresponding to the highest confidence level is used as the classification result of the vehicle insurance image; When the highest confidence among the confidence levels is less than a preset confidence threshold, the prediction result corresponding to the highest confidence level is sent to a preset terminal, and the confirmation result returned by the preset terminal is used as the classification result of the vehicle insurance picture.
8. A picture classification device, characterized in that: include: An acquisition module, used to acquire a training set and a test set for classification of auto insurance pictures, wherein the training set and the test set both include a plurality of auto insurance pictures and their corresponding classification labels; A first training module is used to input each auto insurance picture in the training set into a first classification model to train the first classification model to obtain a second classification model, wherein the recognition of each type of picture is regarded as a classification task, and the sub-loss function corresponding to each classification task has a weight; A second classification module, used for inputting each auto insurance picture in the test set into the second classification model to obtain a second predicted label for each auto insurance picture in the test set; A matrix construction module, used to construct a classification task confusion matrix according to the second predicted label and the classification label of each auto insurance picture in the test set; A second training module is used to adjust the second classification model according to the classification task confusion matrix until the classification task confusion matrix meets a second stop condition, thereby obtaining a car insurance picture classification model; The picture classification module is used to obtain the car insurance pictures to be classified, and input the car insurance pictures to be classified into the car insurance picture classification model to obtain the car insurance picture classification results.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the image classification method according to any one of claims 1 to 7 when executing the computer-readable instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the image classification method according to any one of claims 1 to 7 are implemented.