Image classification model training method, training device and image classification method
By receiving and fusing the confidence of the image classification model, generating category labels with fine-tuned accuracy and iteratively training the model, the problem of time-consuming, labor-intensive and poor accuracy of data annotation is solved, and the accuracy of image annotation and deep learning is improved.
Patent Information
- Application Number
- CN202410151603.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-02
- Publication Date
- 2025-08-05
AI Technical Summary
In the prior art, the data annotation model depends on the performance of the initial annotation model, and there is a problem of poor accuracy, and the annotation process is time-consuming and labor-intensive.
By receiving the first image data set including the initial image and category tags, the second image classification model is trained, the confidence of the first and target classification models is fused to generate the category tags with fine-tuned accuracy, forming the second image data set, and iteratively training the target classification model.
Improves the accuracy of image annotation, thereby improving the accuracy of deep learning.
Smart Images

Figure CN120431357A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image classification, and particularly to an image classification model training method, a training device, and an image classification method. Background Art
[0002] Annotated data sets are an important step in deep learning. However, annotating data is a boring task, and repetitive labor is extremely painful for people. In the model training stage, it is inevitable to encounter a large amount of annotation. When getting a batch of unannotated data, it usually takes several days and nights to annotate, and annotating all data consumes a large amount of human and time costs.
[0003] Existing data annotation models rely on the performance of the initial annotation model and have problems with poor accuracy. Summary of the Invention
[0004] In view of this, embodiments of this application provide an image classification model training method, a training device, and an image classification method to eliminate or improve one or more defects existing in the prior art.
[0005] The first aspect of this application provides an image classification model training method, and the method includes:
[0006] Receiving a first image data set including each initial image and its respective category label, where the respective category label of each of the initial images is generated by fine-tuning the accuracy of the classification result of each of the initial images output by a first image classification model in advance;
[0007] Training a second image classification model based on the first image data set to obtain a target classification model;
[0008] Identifying the respective classification results and confidence levels corresponding to each target image in a second image data set based on the first image classification model and the target classification model; where the total number of the target images is greater than the total number of the initial images;
[0009] Based on the confidence level of each of the target images, fusing the classification results of each of the target images output by the first image classification model and the target classification model respectively with a confidence fusion strategy to obtain the respective category labels corresponding to each of the target images, so as to form a second image data set including each of the target images and its respective category label;
[0010] Iteratively training the target classification model based on the second image data set to obtain a corresponding target image classification model.
[0011] In some embodiments of the present application, the process of respectively identifying the classification results and confidence levels corresponding to each target image in the second image dataset based on the first image classification model and the target classification model includes:
[0012] Classify the second image dataset based on the first image classification model to obtain the first classification result and the first confidence level corresponding to each target image in the second image dataset;
[0013] Classify the second image dataset based on the target classification model to obtain the second classification result and the second confidence level corresponding to each target image in the second image dataset.
[0014] In some embodiments of the present application, based on the confidence levels of each target image, the classification results of each target image output by the first image classification model and the target classification model are respectively fused with a confidence fusion strategy to obtain the class label corresponding to each target image, including:
[0015] Successively determine whether the first classification result and the second classification result corresponding to each target image in the second image dataset are consistent. If so, add 1 to the correct prediction statistic value; if not, add 1 to the wrong prediction statistic value; and determine whether the first confidence level of the current image is greater than the second confidence level;
[0016] If it is determined that the first confidence level of the current image is greater than the second confidence level, take the first classification result of the current image as the target class label of the image; if it is determined that the first confidence level of the current image is less than or equal to the second confidence level, take the second classification result of the current image as the target class label of the image.
[0017] In some embodiments of the present application, the process of iteratively training the target classification model based on the second image dataset to obtain the corresponding target image classification model includes:
[0018] Calculate the prediction error percentage of the prediction error statistic value accounting for the number of images in the second image dataset;
[0019] Determine whether the prediction error percentage is greater than a preset error rate threshold. If so, train and update the current target classification model based on the target class labels corresponding to each target image in the second image dataset, and use the current target classification model and the first image classification model to test each image in the pre-acquired third image dataset until the prediction error percentage corresponding to the current target classification model is not greater than the error rate threshold, then use the current target classification model as the target image classification model.
[0020] The second aspect of the present application provides an image classification method, including:
[0021] Obtain a target detection image;
[0022] Input the target detection image into the target image classification model trained by the image classification model training method described in the first aspect to output a target image classification result.
[0023] The third aspect of the present application provides an image classification model training device, which includes:
[0024] A training data acquisition module, configured to receive a first image dataset including each initial image and its respective class label, where the class label of each of the initial images is generated by fine-tuning the accuracy of the classification result of each of the initial images output by the first image classification model in advance;
[0025] A target classification model training module, configured to train a second image classification model based on the first image dataset to obtain a target classification model;
[0026] A model testing module, configured to respectively identify the classification result and confidence level corresponding to each target image in the second image dataset based on the first image classification model and the target classification model; where the total number of the target images is greater than the total number of the initial images;
[0027] A model fusion module, configured to respectively fuse the classification results of each target image output by the first image classification model and the target classification model based on the confidence levels of each target image by a confidence level fusion strategy to obtain the class label corresponding to each target image, so as to form a second image dataset including each target image and its respective class label;
[0028] A model iterative training module, configured to iteratively train the target classification model based on the second image dataset to obtain a corresponding target image classification model.
[0029] In some embodiments of the present application, the model testing module includes:
[0030] A first image classification model testing unit, configured to classify the second image dataset based on the first image classification model to obtain the first classification result and the first confidence level corresponding to each target image in the second image dataset;
[0031] A target classification model testing unit, configured to classify the second image dataset based on the target classification model to obtain the second classification result and the second confidence level corresponding to each target image in the second image dataset.
[0032] In some embodiments of the present application, the model fusion module includes:
[0033] A classification result judgment unit, configured to sequentially judge whether the first classification result and the second classification result corresponding to each target image in the second image dataset are consistent. If so, add 1 to the correct prediction statistic value; if not, add 1 to the wrong prediction statistic value; and judge whether the first confidence level of the current image is greater than the second confidence level;
[0034] A target category label determination unit, configured to, if it is determined that the first confidence level of the current image is greater than the second confidence level, take the first classification result of the current image as the target category label of the image; if it is determined that the first confidence level of the current image is less than or equal to the second confidence level, take the second classification result of the current image as the target category label of the image.
[0035] A third aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the image classification model training method described in the first aspect or the image classification method described in the second aspect is implemented.
[0036] A fourth aspect of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the image classification model training method described in the first aspect or the image classification method described in the second aspect is implemented.
[0037] The present application provides an image classification model training method, a training device, and an image classification method. The method includes: receiving a first image dataset including each initial image and its respective category label, training a second image classification model based on the first image dataset to obtain a target classification model; identifying the classification result and confidence level of each target image based on the first image classification model and the target classification model; fusing the classification results of each target image output by the first image classification model and the target classification model respectively based on a confidence level fusion strategy to obtain the category label corresponding to each target image, so as to form a second image dataset including each target image and its respective category label; and iteratively training the target classification model based on the second image dataset to obtain a corresponding target image classification model. The present application can effectively improve the accuracy of image annotation, and further improve the accuracy of deep learning.
[0038] Additional advantages, objects, and features of the present application will be partly set forth in the following description, and will partly become apparent to those of ordinary skill in the art upon examination of the following, or may be learned by practice of the present application. The objects and other advantages of the present application may be realized and obtained by the structure particularly pointed out in the specification and the drawings.
[0039] Those skilled in the art will understand that the objects and advantages achievable by the present application are not limited to those specifically described above, and the above and other objects achievable by the present application will be more clearly understood from the following detailed description. Brief Description of the Drawings
[0040] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application, and do not limit the present application. The components in the drawings are not drawn to scale, but are only for showing the principles of the present application. For the convenience of showing and describing some parts of the present application, the corresponding parts in the drawings may be enlarged, that is, may become larger relative to other components in the exemplary device actually manufactured according to the present application. In the drawings:
[0041] Figure 1 It is a schematic flowchart of a method for training an image classification model in an embodiment of the present application.
[0042] Figure 2 It is a schematic structural diagram of an image classification model training device in another embodiment of the present application.
[0043] Figure 3 It is a schematic flowchart of an image classification method in an embodiment of the present application.
[0044] Figure 4 It is a schematic overall architecture diagram of a method for training an image classification model in an embodiment of the present application. Detailed Description of the Embodiments
[0045] To make the objects, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the embodiments and the drawings. Here, the exemplary embodiments of the present application and their descriptions are used to explain the present application, but do not limit the present application.
[0046] Here, it should also be noted that in order to avoid obscuring the present application with unnecessary details, only the structures and / or processing steps closely related to the solution according to the present application are shown in the drawings, and other details less related to the present application are omitted.
[0047] It should be emphasized that the term "comprising / including" when used herein refers to the presence of features, elements, steps, or components, but does not exclude the presence or addition of one or more other features, elements, steps, or components.
[0048] Here, it should also be noted that, unless otherwise specified, the term "connection" in this article can not only refer to direct connection, but also indirect connection with intermediaries.
[0049] In the following, embodiments of the present application will be described with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0050] Specifically, it will be described in detail through the following embodiments.
[0051] The embodiments of the present application provide an image classification model training method that can be executed by an image classification model training device or a client device. Refer to Figure 1 The image classification model training method specifically includes the following content:
[0052] Step 110: Receive a first image dataset containing each initial image and its respective class label, where the class label of each of the initial images is generated by fine-tuning the classification result of each of the initial images output by the first image classification model in terms of accuracy in advance.
[0053] Step 120: Train a second image classification model based on the first image dataset to obtain a target classification model.
[0054] Step 130: Identify the classification result and confidence level corresponding to each target image in the second image dataset based on the first image classification model and the target classification model respectively; where the total number of the target images is greater than the total number of the initial images.
[0055] Step 140: Based on the confidence level of each of the target images, fuse the classification results of each of the target images output by the first image classification model and the target classification model respectively with a confidence level fusion strategy to obtain the class label corresponding to each of the target images, so as to form a second image dataset containing each of the target images and its respective class label.
[0056] Step 150: Iteratively train the target classification model based on the second image dataset to obtain a corresponding target image classification model.
[0057] Specifically, the client device first receives a first image dataset containing each initial image and its respective class label;
[0058] Then train a second image classification model (such as yolo, vit model) based on the first image dataset until convergence to 10 epochs to obtain a target classification model.
[0059] Next, based on the first image classification model and the target classification model, respectively identify the classification results and confidence levels corresponding to each target image in the second image dataset; where the total number of target images is greater than the total number of initial images;
[0060] Then, based on the confidence levels of each target image, use a confidence level fusion strategy to fuse the classification results of each target image output by the first image classification model and the target classification model respectively, to obtain the class labels corresponding to each target image, so as to form a second image dataset containing each target image and its respective class label;
[0061] Finally, based on the second image dataset, perform iterative training on the target classification model to obtain the corresponding target image classification model, so as to effectively improve the accuracy of image annotation, and further improve the accuracy of deep learning.
[0062] Among them, the class labels of each initial image are generated by performing accuracy fine-tuning on the classification results of each initial image output by the first image classification model (such as the SAM model, segment anything); the total number of target images is greater than the total number of initial images, that is, the first image dataset is a small batch of data, and the second image dataset is a medium batch of data.
[0063] It should be noted that the accuracy fine-tuning is achieved through manual correction.
[0064] To effectively improve the accuracy of image classification, step 130 includes:
[0065] Classify the second image dataset based on the first image classification model to obtain the first classification results and first confidence levels corresponding to each target image in the second image dataset;
[0066] Classify the second image dataset based on the target classification model to obtain the second classification results and second confidence levels corresponding to each target image in the second image dataset.
[0067] Specifically, the client device classifies the second image dataset based on the first image classification model to obtain the first classification results and first confidence levels corresponding to each target image in the second image dataset; classifies the second image dataset based on the target classification model to obtain the second classification results and second confidence levels corresponding to each target image in the second image dataset, so as to effectively improve the accuracy of image classification.
[0068] To further improve the accuracy of image classification, step 140 includes:
[0069] Successively determine whether the first classification result and the second classification result corresponding to each target image in the second image dataset are consistent. If so, increment the correct prediction statistic value by 1; if not, increment the incorrect prediction statistic value by 1; and determine whether the first confidence level of the current image is greater than the second confidence level;
[0070] If it is determined that the first confidence level of the current image is greater than the second confidence level, take the first classification result of the current image as the target category label of the image; if it is determined that the first confidence level of the current image is less than or equal to the second confidence level, take the second classification result of the current image as the target category label of the image.
[0071] Specifically, the client device successively determines whether the first classification result and the second classification result corresponding to each target image in the second image dataset are consistent. If so, increment the correct prediction statistic value (initially 0) by 1; if not, increment the incorrect prediction statistic value (initially 0) by 1; and determine whether the first confidence level of the current image is greater than the second confidence level;
[0072] If it is determined that the first confidence level of the current image is greater than the second confidence level, take the first classification result of the current image as the target category label of the image; if it is determined that the first confidence level of the current image is less than or equal to the second confidence level, take the second classification result of the current image as the target category label of the image, thereby further improving the accuracy of image classification.
[0073] To further improve the accuracy of the image classification model, step 140 includes:
[0074] Calculate the prediction error percentage of the incorrect prediction statistic value accounting for the number of images in the second image dataset;
[0075] Determine whether the prediction error percentage is greater than a preset error rate threshold. If so, train and update the current target classification model based on the target category labels corresponding to each target image in the second image dataset. Use the current target classification model and the first image classification model to test each image in the pre-acquired third image dataset until the prediction error percentage corresponding to the current target classification model is not greater than the error rate threshold, then take the current target classification model as the target image classification model.
[0076] Specifically, the client device first calculates the prediction error percentage of the incorrect prediction statistic value accounting for the number of images in the second image dataset;
[0077] Determine whether the predicted error percentage is greater than a preset error rate threshold (for example, 1% can be taken). If so, train and update the current target classification model based on the target class labels corresponding to each target image in the second image dataset (such as Figure 4 the fused annotation data in), and use the current target classification model and the first image classification model to test each image in the pre-acquired third image dataset until the predicted error percentage corresponding to the current target classification model is not greater than the error rate threshold, then use the current target classification model as the target image classification model, so as to further improve the accuracy of the image classification model.
[0078] It should be noted that, as Figure 4 shown, the medium batch annotation data in each iteration process is different.
[0079] The embodiment of the present application also provides an image classification method that can be executed by an image classification model training device or a client device. Refer to Figure 1 The image classification method specifically includes the following content:
[0080] Step 210: Obtain a target detection image.
[0081] Step 220: Input the target detection image into the target image classification model trained by the image classification model training method described in the foregoing embodiment to output a target image classification result.
[0082] Specifically, the client device first obtains a target detection image. Then input the target detection image into the target image classification model trained by the image classification model training method described in the foregoing embodiment to output a target image classification result, so as to effectively improve the accuracy of image annotation and further improve the accuracy of deep learning.
[0083] From a software level, the present application also provides an image classification model training device for executing all or part of the content in the image classification model training method described above. Refer to Figure 2 The image classification model training device specifically includes the following content:
[0084] A training data acquisition module 10, configured to receive a first image dataset including each initial image and its respective class label, where the class label of each initial image is generated by performing accuracy fine-tuning on the classification result of each initial image output by the first image classification model;
[0085] A target classification model training module 20, configured to train a second image classification model based on the first image dataset to obtain a target classification model;
[0086] The model testing module 30 is used to respectively identify the classification results and confidence levels corresponding to each target image in the second image dataset based on the first image classification model and the target classification model; wherein, the total number of the target images is greater than the total number of the initial images;
[0087] The model fusion module 40 is used to respectively fuse the classification results of each target image output by the first image classification model and the target classification model based on the confidence levels of each target image with a confidence level fusion strategy, so as to obtain the class labels corresponding to each target image, and form a second image dataset containing each target image and its respective class label;
[0088] The model iterative training module 50 is used to iteratively train the target classification model based on the second image dataset to obtain the corresponding target image classification model.
[0089] In some embodiments of the present application, the model testing module includes:
[0090] The first image classification model testing unit is used to classify the second image dataset based on the first image classification model to obtain the first classification results and first confidence levels corresponding to each target image in the second image dataset;
[0091] The target classification model testing unit is used to classify the second image dataset based on the target classification model to obtain the second classification results and second confidence levels corresponding to each target image in the second image dataset.
[0092] In some embodiments of the present application, the model fusion module includes:
[0093] The classification result judgment unit is used to sequentially judge whether the first classification result and the second classification result corresponding to each target image in the second image dataset are consistent. If so, add 1 to the correct prediction statistic value; if not, add 1 to the wrong prediction statistic value; and judge whether the first confidence level of the current image is greater than the second confidence level;
[0094] The target class label determination unit is used to, if it is judged that the first confidence level of the current image is greater than the second confidence level, take the first classification result of the current image as the target class label of the image; if it is judged that the first confidence level of the current image is less than or equal to the second confidence level, take the second classification result of the current image as the target class label of the image.
[0095] The embodiment of the image classification model training device provided by this application can specifically be used to execute the processing flow of the embodiment of the image classification model training method in the above embodiment, and its functions will not be elaborated here. For details, reference can be made to the detailed description of the embodiment of the image classification model training method above.
[0096] In summary, this application provides an image classification model training device. The method executed by this device includes: receiving a first image data set containing each initial image and its respective class label, training a second image classification model based on the first image data set to obtain a target classification model; identifying the classification result and confidence level of each target image based on the first image classification model and the target classification model; fusing the classification results of each target image output by the first image classification model and the target classification model respectively based on a confidence level fusion strategy to obtain the class label corresponding to each target image, so as to form a second image data set containing each target image and its respective class label; and iteratively training the target classification model based on the second image data set to obtain a corresponding target image classification model. This application can effectively improve the accuracy of image annotation, and further improve the accuracy of deep learning.
[0097] An embodiment of this application also provides an electronic device, such as a central server. The electronic device may include a processor, a memory, a receiver, and a transmitter. The processor is used to execute the image classification model training method mentioned in the above embodiment or the image classification method described in the foregoing embodiment. The processor and the memory may be connected through a bus or other means. Taking the bus connection as an example, the receiver can be connected to the processor and the memory in a wired or wireless manner.
[0098] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. chips, or a combination of the above types of chips.
[0099] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the image classification model training method in the embodiments of the present application or the image classification method described in the foregoing embodiments. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions, and modules stored in the memory, that is, to implement the image classification model training method in the above method embodiments or the image classification method described in the foregoing embodiments.
[0100] The memory may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created by the processor and the like. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely provided relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above networks include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0101] The one or more modules are stored in the memory and, when executed by the processor, execute the image classification model training method in the embodiments or the image classification method described in the foregoing embodiments.
[0102] In some embodiments of the present application, the user equipment may include a processor, a memory, and a transceiver unit. The transceiver unit may include a receiver and a transmitter. The processor, the memory, the receiver, and the transmitter may be connected through a bus system. The memory is used to store computer instructions, and the processor is used to execute the computer instructions stored in the memory to control the transceiver unit to transmit and receive signals.
[0103] As an implementation manner, the functions of the receiver and the transmitter in the present application can be considered to be implemented through a transceiver circuit or a dedicated chip for transceiver, and the processor can be considered to be implemented through a dedicated processing chip, a processing circuit, or a general-purpose chip.
[0104] As another implementation manner, it can be considered to use a general-purpose computer to implement the server provided in the embodiments of the present application. That is, the program codes for implementing the functions of the processor, the receiver, and the transmitter are stored in the memory, and the general-purpose processor implements the functions of the processor, the receiver, and the transmitter by executing the codes in the memory.
[0105] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the foregoing image classification model training method or the image classification method described in the foregoing embodiments. The computer-readable storage medium may be a tangible storage medium, such as a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disks, removable storage disks, CD-ROMs, or any other form of storage medium well-known in the technical field.
[0106] Those of ordinary skill in the art should understand that the various exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Specifically, whether to implement in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application. When implemented in hardware, it may be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment may be stored in a machine-readable medium or transmitted through a data signal carried in a carrier wave on a transmission medium or a communication link.
[0107] It should be clear that the present application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present application.
[0108] In the present application, the features described and / or illustrated for one embodiment can be used in the same manner or in a similar manner in one or more other embodiments, and / or combined with the features of other embodiments or replace the features of other embodiments.
[0109] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, various changes and modifications can be made to the embodiments of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.
Claims
1. A method for training an image classification model, characterized in that: include: Receiving a first image dataset comprising initial images and respective category labels, wherein the category labels of the initial images are generated by pre-accuracy fine-tuning classification results of the initial images output by a first image classification model; Training a second image classification model based on the first image dataset to obtain a target classification model; Identifying, based on the first image classification model and the target classification model, classification results and confidence scores corresponding to respective target images in the second image dataset; wherein the total number of the target images is greater than the total number of the initial images; Based on the confidence of each of the target images, the classification results of each of the target images output by the first image classification model and the target classification model are respectively fused using a confidence fusion strategy to obtain a category label corresponding to each of the target images, so as to form a second image dataset including each of the target images and their respective category labels; The target classification model is iteratively trained based on the second image dataset to obtain a corresponding target image classification model.
2. The image classification model training method according to claim 1, characterized in that: The identifying, based on the first image classification model and the target classification model, respectively corresponding to the classification results and confidence levels of the respective target images in the second image dataset includes: classifying the second image dataset based on the first image classification model to obtain a first classification result and a first confidence level corresponding to each target image in the second image dataset; The second image dataset is classified based on the target classification model to obtain a second classification result and a second confidence level corresponding to each target image in the second image dataset.
3. The image classification model training method according to claim 2, characterized in that: Based on the confidence of each target image, the classification results of each target image output by the first image classification model and the target classification model are respectively fused using a confidence fusion strategy to obtain a category label corresponding to each target image, including: determining in sequence whether the first classification result and the second classification result corresponding to each target image in the second image data set are consistent; if so, adding 1 to the prediction correct statistic; if not, adding 1 to the prediction error statistic; and determining whether the first confidence level of the current image is greater than the second confidence level; If it is determined that the first confidence level of the current image is greater than the second confidence level, the first classification result of the current image is taken as the target category label of the image; if it is determined that the first confidence level of the current image is less than or equal to the second confidence level, the second classification result of the current image is taken as the target category label of the image.
4. The image classification model training method according to claim 3, characterized in that: The iteratively training the target classification model based on the second image dataset to obtain a corresponding target image classification model includes: Calculating a prediction error percentage of the prediction error statistic value to the number of images in the second image dataset; Determine whether the prediction error percentage is greater than a preset error rate threshold. If so, train and update the current target classification model based on the target category labels corresponding to each target image in the second image data set, and use the current target classification model and the first image classification model to test each image in the pre-acquired third image data set until the prediction error percentage corresponding to the current target classification model is not greater than the error rate threshold. Then, use the current target classification model as the target image classification model.
5. An image classification method, characterized in that: include: Get target detection image; The target detection image is input into the target image classification model trained by the image classification model training method according to any one of claims 1 to 4 to output the target image classification result.
6. An image classification model training device, characterized in that: include: a training data acquisition module, configured to receive a first image dataset comprising initial images and respective category labels, wherein the category labels of the initial images are generated by pre-accuracy fine-tuning the classification results of the initial images output by the first image classification model; a target classification model training module, configured to train a second image classification model based on the first image dataset to obtain a target classification model; a model testing module, configured to identify, based on the first image classification model and the target classification model, a classification result and a confidence level corresponding to each target image in the second image dataset; wherein the total number of the target images is greater than the total number of the initial images; a model fusion module, configured to fuse the classification results of each target image output by the first image classification model and the target classification model respectively using a confidence fusion strategy based on the confidence of each target image, to obtain a category label corresponding to each target image, so as to form a second image dataset containing each target image and its category label; The model iterative training module is used to iteratively train the target classification model based on the second image data set to obtain a corresponding target image classification model.
7. The image classification model training device according to claim 6, characterized in that: The model testing module includes: a first image classification model testing unit, configured to classify the second image dataset based on the first image classification model, and obtain a first classification result and a first confidence level corresponding to each target image in the second image dataset; The target classification model testing unit is used to classify the second image data set based on the target classification model to obtain a second classification result and a second confidence level corresponding to each target image in the second image data set.
8. The image classification model training device according to claim 7, characterized in that: The model fusion module includes: a classification result judgment unit, configured to sequentially judge whether the first classification result and the second classification result corresponding to each target image in the second image data set are consistent; if so, adding 1 to the prediction correct statistic; if not, adding 1 to the prediction error statistic; and judging whether the first confidence level of the current image is greater than the second confidence level; The target category label determination unit is used to take the first classification result of the current image as the target category label of the image if it is determined that the first confidence level of the current image is greater than the second confidence level; and take the second classification result of the current image as the target category label of the image if it is determined that the first confidence level of the current image is less than or equal to the second confidence level.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the image classification model training method according to any one of claims 1 to 4 or the image classification method according to claim 5 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the image classification model training method according to any one of claims 1 to 4 or the image classification method according to claim 5.