Image classification model training method, device, computer equipment and storage medium

Through the combination of multiple region segmentation and labeling tools, the training samples are enriched and the model is optimized, and the problems of high manual labeling cost and model dependence on sample distribution are solved, which improves the prediction performance of image classification models and reduces the labeling cost.

CN115564985BActive Publication Date: 2025-09-05GUANGZHOU KINGMED CENTER FOR CLINICAL LABORATORY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211082729.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-06
Publication Date
2025-09-05
Estimated Expiration
2042-09-06

AI Technical Summary

Technical Problem

In the prior art, manual labeling costs are high and the trained models rely on sample distribution, resulting in poor prediction performance for images other than sample distribution.

Method used

Multiple region segmentation method and labeling tools are used to train the deep learning model in image blocks. The first segmentation is used to train the model, the second segmentation is used to optimize the model, and the third segmentation is used to further optimize the training samples, using different segmentation methods to enrich the training samples and reduce the number of labeled images.

Benefits of technology

It improves the prediction performance of the training model, reduces the annotation cost, improves the segmentation efficiency, and reduces the amount of annotation for the target image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115564985B_ABST
    Figure CN115564985B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention disclose a method, apparatus, computer device, and storage medium for training an image classification model. The method comprises: training a preset deep learning model for image block classification based on a preset first region segmentation method, a preset annotation tool, and an acquired target image to obtain a first model; training the first model for image block classification based on a preset second region segmentation method, the annotation tool, and the target image to obtain a second model; and training the second model for image block classification based on a preset third region segmentation method, the annotation tool, and the target image to obtain an image classification model. The use of different segmentation methods improves the sample richness of the training model, and the double optimization and enriched sample size improve the predictive performance of the trained model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of digital medical technology, and in particular to a training method, device, computer equipment and storage medium for an image classification model. Background Art

[0002] With the application and promotion of artificial intelligence technology, especially in the field of machine vision, it has gradually replaced some human work. Medical scenarios are an important application scenario for machine vision. Artificial intelligence is increasingly used in the recognition, interpretation and prediction of medical images, such as AI (artificial intelligence) assisted diagnosis of lung CT (computerized tomography) nodules, cervical cell pathology assisted screening, etc. The training of deep learning models requires a lot of manual work to annotate the contours of positive areas in the image or annotate each pixel one by one. The existing technology uses manual annotation of a large number of samples to train the model at one time. The annotation cost is high, and the trained model depends on the sample distribution, resulting in poor prediction performance of the trained model for images outside the sample distribution. Summary of the Invention

[0003] Based on this, it is necessary to address the technical problems that the existing technology uses manual labeling of a large number of image samples to train the model at one time, the labeling cost is high, and the trained model depends on the sample distribution, resulting in poor prediction performance of the trained model for images outside the sample distribution. A training method, device, computer equipment and storage medium for an image classification model are proposed.

[0004] A method for training an image classification model, the method comprising:

[0005] Performing image block classification training on a preset deep learning model according to a preset first region segmentation method, a preset annotation tool, and the acquired target image to obtain a first model;

[0006] Performing image block classification training on the first model according to a preset second region segmentation method, the annotation tool, and the target image to obtain a second model;

[0007] According to the preset third region segmentation method, the annotation tool and the target image, the second model is trained for image block classification to obtain an image classification model.

[0008] Furthermore, the step of performing image block classification training on a preset deep learning model according to the preset first region segmentation method, the preset annotation tool and the acquired target image to obtain the first model includes:

[0009] Performing image block segmentation on the target image according to the first region segmentation method to obtain a first image block set;

[0010] Using the annotation tool, displaying each image block in the first image block set and obtaining the user's annotation results to obtain a first annotation result;

[0011] According to the first image block set and each of the first annotation results, the deep learning model is trained on image block classification to obtain the first model.

[0012] Furthermore, the step of performing image block classification training on the first model according to the preset second region segmentation method, the annotation tool and the target image to obtain the second model includes:

[0013] Using the first sub-segmentation method in the second region segmentation method, the target image is segmented into image blocks to obtain a second image block set;

[0014] Inputting the second image block set into the first model to perform classification prediction on each image block to obtain a first prediction vector;

[0015] Obtaining, from each of the first prediction vectors, each first prediction vector whose positive vector element is within a preset probability range as a first hit vector;

[0016] Using the annotation tool, displaying the image blocks in the second image block set corresponding to the first hit vector and obtaining the user's annotation results to obtain a second annotation result;

[0017] Performing image block classification training on the first model according to each image block in the second image block set corresponding to each first hit vector and each second annotation result to obtain a model to be processed;

[0018] Using the second sub-segmentation method in the second region segmentation method, the target image is segmented into image blocks to obtain a third image block set;

[0019] Inputting the third image block set into the model to be processed to perform classification prediction on each image block to obtain a second prediction vector;

[0020] Acquire, from each of the second prediction vectors, each second prediction vector whose positive vector element is within the probability range as a second hit vector;

[0021] Using the annotation tool, displaying the image blocks in the third image block set corresponding to the second hit vector and obtaining the user's annotation results to obtain a third annotation result;

[0022] Performing image block classification training on the model to be processed according to each image block in the third image block set corresponding to each second hit vector and each third annotation result to obtain the second model;

[0023] The first sub-segmentation method, the second sub-segmentation method and the first region segmentation method are different.

[0024] Furthermore, the segmentation position of the first sub-segmentation method is the horizontal center line and the vertical center line of the image block segmented by the first region segmentation method;

[0025] The horizontal coordinate of the segmentation position of the second sub-segmentation method is mx and the vertical coordinate is nx, where m is the horizontal coordinate of the vertex of the lower right corner of the target image block, and n is the vertical coordinate of the vertex of the lower right corner of the target image block, x is greater than 0, x is less than the length of the target image block, and x is less than the width of the target image block, wherein the target image block is any image block segmented by the first region segmentation method.

[0026] Furthermore, the step of performing image block classification training on the second model according to the preset third region segmentation method, the annotation tool and the target image to obtain the image classification model includes:

[0027] Using the third region segmentation method, the target image is segmented into image blocks to obtain a fourth image block set;

[0028] Inputting the fourth image block set into the second model to perform classification prediction on each image block to obtain a third prediction vector;

[0029] Obtaining, from each of the third prediction vectors, each of the third prediction vectors whose positive vector elements are within a preset probability range as a third hit vector;

[0030] Using the annotation tool, displaying the image blocks in the fourth image block set corresponding to the third hit vector and obtaining annotation results from the user to obtain a fourth annotation result;

[0031] According to each image block in the fourth image block set corresponding to each third hit vector and each fourth labeling result, image block classification training is performed on the second model to obtain the image classification model.

[0032] Furthermore, the step of using the third region segmentation method to segment the target image into image blocks to obtain a fourth image block set includes:

[0033] Divide each image block in the first image block set into four image blocks respectively to obtain an image block set to be combined;

[0034] Combining four image blocks in the set of image blocks to be combined to obtain an image combination block;

[0035] Each of the image combination blocks is used as the fourth image block set.

[0036] Furthermore, the annotation tool includes: an image display area and a plurality of operation icons;

[0037] The operation functions carried by the operation icon include: marking as a negative sample and entering the next image block, marking as a positive sample and entering the next image block, entering the next image block, and entering the previous image block.

[0038] A training device for an image classification model, comprising:

[0039] A first training module is configured to perform image block classification training on a preset deep learning model based on a preset first region segmentation method, a preset annotation tool, and an acquired target image to obtain a first model;

[0040] A second training module is configured to perform image block classification training on the first model according to a preset second region segmentation method, the annotation tool, and the target image to obtain a second model;

[0041] The third training module is used to perform image block classification training on the second model according to the preset third region segmentation method, the annotation tool and the target image to obtain an image classification model.

[0042] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps:

[0043] Performing image block classification training on a preset deep learning model according to a preset first region segmentation method, a preset annotation tool, and the acquired target image to obtain a first model;

[0044] Performing image block classification training on the first model according to a preset second region segmentation method, the annotation tool, and the target image to obtain a second model;

[0045] According to the preset third region segmentation method, the annotation tool and the target image, the second model is trained for image block classification to obtain an image classification model.

[0046] A computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to perform the following steps:

[0047] Performing image block classification training on a preset deep learning model according to a preset first region segmentation method, a preset annotation tool, and the acquired target image to obtain a first model;

[0048] Performing image block classification training on the first model according to a preset second region segmentation method, the annotation tool, and the target image to obtain a second model;

[0049] According to the preset third region segmentation method, the annotation tool and the target image, the second model is trained for image block classification to obtain an image classification model.

[0050] The training method of the image classification model of the present application performs image block classification training on a preset deep learning model according to a preset first region segmentation method, a preset annotation tool and an acquired target image to obtain a first model, performs image block classification training on the first model according to a preset second region segmentation method, the annotation tool and the target image to obtain a second model, performs image block classification training on the second model according to a preset third region segmentation method, the annotation tool and the target image to obtain an image classification model, performs model training by the first segmentation, performs first model optimization by the second segmentation, and performs second model optimization by the third segmentation, improves the richness of samples of the training model by different segmentation methods, and improves the prediction performance of the trained model by two optimizations and rich samples; and the target image is segmented and annotated each time during the entire training process, does not require a large number of annotated images, and annotates the segmentation results based on the annotation tool, thereby improving segmentation efficiency and reducing annotation costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0052] in:

[0053] Figure 1 is a flowchart of a method for training an image classification model in one embodiment;

[0054] Figure 2 A schematic diagram of a scenario of a training method for an image classification model in one embodiment;

[0055] Figure 3 A flowchart of a best implementation method of a training method for an image classification model in one embodiment;

[0056] Figure 4 is a structural block diagram of a training device for an image classification model in one embodiment;

[0057] Figure 5 FIG. 1 is a structural block diagram of a computer device in one embodiment. DETAILED DESCRIPTION

[0058] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0059] like Figure 1 and Figure 2 As shown, in one embodiment, a method for training an image classification model is provided. This method can be applied to both a terminal and a server. This embodiment uses the application to a terminal as an example. The training method of the image classification model specifically includes the following steps:

[0060] S1: Performing image block classification training on a preset deep learning model according to a preset first region segmentation method, a preset annotation tool, and an acquired target image to obtain a first model;

[0061] Specifically, the target image can be obtained from a database, a target image input by a user, or a target image from a third-party application; the target image is segmented into image blocks using a first region segmentation method, and an annotation tool is used to display the segmented image blocks and obtain the user's annotations; based on the annotation results of all segmented image blocks and all segmented image blocks, the preset deep learning model is classified and trained, and the deep learning model that has completed the training is used as the first model.

[0062] The target image may be a medical image, such as a digital pathology slide image.

[0063] S2: performing image block classification training on the first model according to a preset second region segmentation method, the annotation tool, and the target image to obtain a second model;

[0064] Specifically, the target image is segmented into image blocks using the second region segmentation method, the segmented image blocks are displayed using a labeling tool and the user's labeling is obtained, the first model is classified and trained based on the labeling results of all segmented image blocks and all segmented image blocks, and the trained first model is used as the second model.

[0065] S3: Perform image block classification training on the second model according to the preset third region segmentation method, the annotation tool and the target image to obtain an image classification model.

[0066] Specifically, the target image is segmented into image blocks using the third region segmentation method, the segmented image blocks are displayed using a labeling tool and the user's labeling is obtained, and the second model is classified and trained based on the labeling results of all segmented image blocks and all segmented image blocks, and the trained second model is used as the image classification model.

[0067] Optionally, the first region segmentation method and the second region segmentation method may be partially the same or completely different; the second region segmentation method and the third region segmentation method may be partially the same or completely different; and the first region segmentation method and the third region segmentation method may be partially the same or completely different. This improves the sample richness of the training model and thus improves the prediction performance of the trained model.

[0068] Optionally, the first region segmentation method is to segment the target image into a preset number of image blocks.

[0069] Optionally, the second region segmentation method is to segment the target image into a preset number of image blocks, and the segmentation positions are different from the segmentation positions of the first region segmentation method.

[0070] Optionally, the third region segmentation method is to segment each image block segmented by the first region segmentation method, combine at least two segmented image sub-blocks, and use the combined data as an image combination block. Each image combination block is used to label and train the second model.

[0071] Optionally, after the step of training the second model for image block classification based on the preset third region segmentation method, the annotation tool, and the target image to obtain the image classification model, the method further includes: obtaining the image to be segmented; performing image block segmentation on the image to be segmented to obtain a set of image blocks to be predicted; inputting each image block in the set of image blocks to be predicted into the image classification model for classification prediction to obtain a single image block classification prediction result; and concatenating the single image block classification prediction results to obtain a target classification result. In other words, the size of the target classification result is the same as the size of the image to be segmented.

[0072] In this embodiment, a first model is obtained by performing image block classification training on a preset deep learning model according to a preset first region segmentation method, a preset annotation tool and an acquired target image; a second model is obtained by performing image block classification training on the first model according to a preset second region segmentation method, the annotation tool and the target image; and an image classification model is obtained by performing image block classification training on the second model according to a preset third region segmentation method, the annotation tool and the target image. The model is trained by the first segmentation, the first model is optimized by the second segmentation, and the second model is optimized by the third segmentation. The richness of the samples of the training model is improved by different segmentation methods, and the prediction performance of the trained model is improved by the two optimizations and rich samples. Moreover, the target image is segmented and annotated each time during the entire training process, and a large number of annotated images are not required. The segmentation results are annotated based on the annotation tool, which improves the segmentation efficiency and reduces the annotation cost.

[0073] In one embodiment, the step of performing image block classification training on a preset deep learning model based on a preset first region segmentation method, a preset annotation tool, and an acquired target image to obtain a first model includes:

[0074] S11: Segmenting the target image into image blocks according to the first region segmentation method to obtain a first image block set;

[0075] Specifically, according to the first region segmentation method, the target image is segmented into image blocks, and each image block obtained by segmentation is used as a first image block set.

[0076] Optionally, the image blocks in the first image block set have the same size.

[0077] S12: using the annotation tool, displaying each image block in the first image block set and obtaining the user's annotation result to obtain a first annotation result;

[0078] Specifically, each image block in the first image block set is displayed in the annotation tool, and the user annotates the image blocks displayed by the annotation tool. The annotation tool uses the user's annotation results for each image block as a first annotation result.

[0079] The value range of the first annotation result includes: negative and positive.

[0080] S13: Perform image block classification training on the deep learning model according to the first image block set and each of the first annotation results to obtain the first model.

[0081] Specifically, the first annotation result is used as the label of the image block corresponding to the first annotation result in the first image block set, and an image block in the first image block set and the label corresponding to the image block are used as a first training sample; each first training sample is used to perform image block classification training on the deep learning model, and the deep learning model after training is used as the first model.

[0082] This embodiment uses the first region segmentation method to segment the target image, and uses the annotation tool to display the segmented image blocks and obtain the user's annotation results. The deep learning model is trained for image block classification based on the annotation results and the segmented image blocks, thereby realizing the first training of the deep learning model.

[0083] like Figure 3 As shown, in one embodiment, the step of performing image block classification training on the first model according to the preset second region segmentation method, the annotation tool and the target image to obtain the second model includes:

[0084] S21: using the first sub-segmentation method in the second region segmentation method to segment the target image into image blocks to obtain a second image block set;

[0085] Specifically, the target image is segmented into image blocks using the first sub-segmentation method in the second region segmentation method, and each image block obtained by segmentation is used as the second image block set.

[0086] S22: Inputting the second image block set into the first model to perform classification prediction on each image block to obtain a first prediction vector;

[0087] Specifically, the second image block set is input into the first model to perform classification prediction on each image block, and data obtained from the classification prediction is used as the first prediction vector.

[0088] The first prediction vector includes two vector elements, a positive vector element and a negative vector element. The value corresponding to the positive vector element in the first prediction vector represents the probability that the image block is positive. The value corresponding to the positive vector element in the first prediction vector represents the probability that the image block is negative.

[0089] S23: acquiring, from each of the first prediction vectors, each first prediction vector whose positive vector element is within a preset probability range as a first hit vector;

[0090] Specifically, each first prediction vector whose positive vector element is within a preset probability range is obtained from each first prediction vector, and each obtained first prediction vector is used as a first hit vector, thereby selecting the first prediction vector corresponding to the image block whose model classification is questionable.

[0091] S24: using the annotation tool, displaying the image blocks in the second image block set corresponding to the first hit vector and obtaining the user's annotation results to obtain a second annotation result;

[0092] Specifically, each image block in the second image block set is displayed in the annotation tool, and the user annotates according to the image blocks displayed by the annotation tool. The annotation tool uses the user's annotation result for each image block as a second annotation result.

[0093] The value range of the second annotation result includes: negative and positive.

[0094] S25: performing image block classification training on the first model according to each image block in the second image block set corresponding to each first hit vector and each second annotation result to obtain a model to be processed;

[0095] Specifically, the second annotation result is used as the label of the image block corresponding to the second annotation result in the second image block set, and an image block in the second image block set and the label corresponding to the image block are used as a second training sample; each second training sample is used to perform image block classification training on the first model, and the first model after training is used as the model to be processed.

[0096] S26: using the second sub-segmentation method in the second region segmentation method to segment the target image into image blocks to obtain a third image block set;

[0097] Specifically, the target image is segmented into image blocks using the second sub-segmentation method in the second region segmentation method, and each image block obtained by segmentation is used as the third image block set.

[0098] S27: Inputting the third image block set into the model to be processed to perform classification prediction on each image block to obtain a second prediction vector;

[0099] Specifically, the third image block set is input into the model to be processed to perform classification prediction on each image block, and data obtained from the classification prediction is used as the second prediction vector.

[0100] The second prediction vector includes two vector elements, a positive vector element and a negative vector element. The value corresponding to the positive vector element in the second prediction vector represents the probability that the image block is positive. The value corresponding to the negative vector element in the second prediction vector represents the probability that the image block is negative.

[0101] S28: acquiring, from each of the second prediction vectors, each second prediction vector whose positive vector element is within the probability range as a second hit vector;

[0102] Specifically, each second prediction vector whose positive vector element is within a preset probability range is obtained from each second prediction vector, and each obtained second prediction vector is used as a second hit vector, thereby selecting the second prediction vector corresponding to the image block whose model classification is questionable.

[0103] S209: using the annotation tool, displaying the image blocks in the third image block set corresponding to the second hit vector and obtaining the user's annotation results to obtain a third annotation result;

[0104] Specifically, each image block in the third image block set is displayed in the annotation tool, and the user annotates according to the image blocks displayed by the annotation tool. The annotation tool uses the user's annotation results for each image block as a third annotation result.

[0105] The value range of the third annotation result includes: negative and positive.

[0106] S210: performing image block classification training on the model to be processed according to each image block in the third image block set corresponding to each second hit vector and each third annotation result to obtain the second model;

[0107] The first sub-segmentation method, the second sub-segmentation method and the first region segmentation method are different.

[0108] Specifically, the third annotation result is used as the label of the image block corresponding to the third annotation result in the third image block set, and an image block in the third image block set and the label corresponding to the image block are used as a third training sample; each third training sample is used to perform image block classification training on the model to be processed, and the model to be processed after the training is completed is used as the second model.

[0109] In this embodiment, only questionable image blocks need to be manually annotated, which reduces the number of annotated image blocks and reduces the annotation cost. The annotation results of questionable image blocks are used to optimize the model training, thereby achieving training for sample distributions with poor prediction effects and improving the prediction performance of the trained model.

[0110] In one embodiment, the segmentation position of the first sub-segmentation method is the horizontal center line and the vertical center line of the image block segmented by the first region segmentation method;

[0111] The horizontal coordinate of the segmentation position of the second sub-segmentation method is mx and the vertical coordinate is nx, where m is the horizontal coordinate of the vertex of the lower right corner of the target image block, and n is the vertical coordinate of the vertex of the lower right corner of the target image block, x is greater than 0, x is less than the length of the target image block, and x is less than the width of the target image block, wherein the target image block is any image block segmented by the first region segmentation method.

[0112] The first sub-segmentation method of this embodiment is completely different from the first region segmentation method, the first sub-segmentation method is completely different from the first region segmentation method, and the first sub-segmentation method is partially different from the second sub-segmentation method, thereby improving the richness of the samples of the training model and improving the prediction performance of the trained model through the rich samples.

[0113] like Figure 3 As shown, in one embodiment, the step of performing image block classification training on the second model according to the preset third region segmentation method, the annotation tool and the target image to obtain the image classification model includes:

[0114] S31: using the third region segmentation method to segment the target image into image blocks to obtain a fourth image block set;

[0115] S32: Inputting the fourth image block set into the second model to perform classification prediction on each image block to obtain a third prediction vector;

[0116] Specifically, the fourth image block set is input into the second model to perform classification prediction on each image block, and data obtained from the classification prediction is used as the third prediction vector.

[0117] The third prediction vector includes two vector elements, a positive vector element and a negative vector element. The value corresponding to the positive vector element in the third prediction vector represents the probability that the image block is positive. The value corresponding to the negative vector element in the third prediction vector represents the probability that the image block is negative.

[0118] S33: acquiring, from each of the third prediction vectors, each of the third prediction vectors whose positive vector elements are within a preset probability range as a third hit vector;

[0119] Specifically, each third prediction vector whose positive vector element is within a preset probability range is obtained from each of the third prediction vectors, and each obtained third prediction vector is used as a third hit vector, thereby selecting the third prediction vector corresponding to the image block whose model classification is questionable.

[0120] S34: using the annotation tool, displaying the image blocks in the fourth image block set corresponding to the third hit vector and obtaining the user's annotation results to obtain a fourth annotation result;

[0121] Specifically, each image block in the fourth image block set is displayed in the annotation tool, and the user annotates according to the image blocks displayed by the annotation tool. The annotation tool uses the user's annotation results for each image block as a fourth annotation result.

[0122] The value range of the fourth annotation result includes: negative and positive.

[0123] S35: Perform image block classification training on the second model according to each image block in the fourth image block set corresponding to each third hit vector and each fourth labeling result to obtain the image classification model.

[0124] Specifically, the fourth annotation result is used as the label of the image block corresponding to the fourth annotation result in the fourth image block set, and an image block in the fourth image block set and the label corresponding to the image block are used as a fourth training sample; each fourth training sample is used to perform image block classification training on the second model, and the second model after the training is completed is used as the image classification model.

[0125] In this embodiment, only questionable image blocks need to be manually annotated, which reduces the number of annotated image blocks and reduces the annotation cost. The annotation results of questionable image blocks are used to optimize the model training, thereby achieving training for sample distributions with poor prediction effects and improving the prediction performance of the trained model.

[0126] like Figure 3 As shown, in one embodiment, the step of using the third region segmentation method to segment the target image into image blocks to obtain a fourth image block set includes:

[0127] S311: Divide each image block in the first image block set into four image blocks to obtain an image block set to be combined;

[0128] Specifically, each image block in the first image block set is divided into four image blocks, each image block obtained by division is used as an image block to be combined, and all image blocks to be combined are used as an image block set to be combined.

[0129] Optionally, each image block in the first image block set is divided into four image blocks of the same size to obtain an image block set to be combined.

[0130] S312: combining four image blocks in the set of image blocks to be combined to obtain an image combination block;

[0131] Specifically, any four image blocks in the set of image blocks to be combined are combined, and the combined data is used as an image combination block.

[0132] S313: Taking each of the image combination blocks as the fourth image block set.

[0133] This embodiment further improves the richness of samples for training the model by combining four image blocks to be combined, and improves the prediction performance of the trained model through the rich samples.

[0134] In one embodiment, the annotation tool includes: an image display area and a plurality of operation icons;

[0135] The operation functions carried by the operation icon include: marking as a negative sample and entering the next image block, marking as a positive sample and entering the next image block, entering the next image block, and entering the previous image block.

[0136] Specifically, the user only needs to click on an operation icon, and the annotation tool will process the operation according to the operation function carried by the operation icon. For example, if the operation function carried by the operation icon clicked by the user is a negative sample and moves on to the next image block, the annotation tool will mark the current image block as negative and display the next image block. For another example, if the operation function carried by the operation icon clicked by the user is a positive sample and moves on to the next image block, the annotation tool will mark the current image block as positive and display the next image block.

[0137] Optionally, the annotation tool also includes the ability to save the image by double-clicking the screen.

[0138] In this embodiment, through the annotation tool, users can quickly perform negative or positive annotations on image blocks, which improves annotation efficiency, reduces annotation costs, and helps users use fragmented time to perform annotations; image blocks have fewer pixels than the entire target image, which further facilitates users to quickly annotate.

[0139] like Figure 4 As shown, in one embodiment, a training device for an image classification model is provided, the device comprising:

[0140] A first training module 801 is configured to perform image block classification training on a preset deep learning model based on a preset first region segmentation method, a preset annotation tool, and an acquired target image to obtain a first model;

[0141] A second training module 802 is configured to perform image block classification training on the first model according to a preset second region segmentation method, the annotation tool, and the target image to obtain a second model;

[0142] The third training module 803 is used to perform image block classification training on the second model according to the preset third region segmentation method, the annotation tool and the target image to obtain an image classification model.

[0143] In this embodiment, a first model is obtained by performing image block classification training on a preset deep learning model according to a preset first region segmentation method, a preset annotation tool and an acquired target image; a second model is obtained by performing image block classification training on the first model according to a preset second region segmentation method, the annotation tool and the target image; and an image classification model is obtained by performing image block classification training on the second model according to a preset third region segmentation method, the annotation tool and the target image. The model is trained by the first segmentation, the first model is optimized by the second segmentation, and the second model is optimized by the third segmentation. The richness of the samples of the training model is improved by different segmentation methods, and the prediction performance of the trained model is improved by the two optimizations and rich samples. Moreover, the target image is segmented and annotated each time during the entire training process, and a large number of annotated images are not required. The segmentation results are annotated based on the annotation tool, which improves the segmentation efficiency and reduces the annotation cost.

[0144] Figure 5 FIG1 shows an internal structure diagram of a computer device in an embodiment. The computer device can be a terminal or a server. Figure 5 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor may implement the training method of the image classification model. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor may implement the training method of the image classification model. It will be understood by those skilled in the art that Figure 5The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0145] In one embodiment, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps:

[0146] Performing image block classification training on a preset deep learning model according to a preset first region segmentation method, a preset annotation tool, and the acquired target image to obtain a first model;

[0147] Performing image block classification training on the first model according to a preset second region segmentation method, the annotation tool, and the target image to obtain a second model;

[0148] According to the preset third region segmentation method, the annotation tool and the target image, the second model is trained for image block classification to obtain an image classification model.

[0149] In this embodiment, a first model is obtained by performing image block classification training on a preset deep learning model according to a preset first region segmentation method, a preset annotation tool and an acquired target image; a second model is obtained by performing image block classification training on the first model according to a preset second region segmentation method, the annotation tool and the target image; and an image classification model is obtained by performing image block classification training on the second model according to a preset third region segmentation method, the annotation tool and the target image. The model is trained by the first segmentation, the first model is optimized by the second segmentation, and the second model is optimized by the third segmentation. The richness of the samples of the training model is improved by different segmentation methods, and the prediction performance of the trained model is improved by the two optimizations and rich samples. Moreover, the target image is segmented and annotated each time during the entire training process, and a large number of annotated images are not required. The segmentation results are annotated based on the annotation tool, which improves the segmentation efficiency and reduces the annotation cost.

[0150] In one embodiment, a computer-readable storage medium is provided, storing a computer program. When the computer program is executed by a processor, the processor performs the following steps:

[0151] Performing image block classification training on a preset deep learning model according to a preset first region segmentation method, a preset annotation tool, and the acquired target image to obtain a first model;

[0152] Performing image block classification training on the first model according to a preset second region segmentation method, the annotation tool, and the target image to obtain a second model;

[0153] According to the preset third region segmentation method, the annotation tool and the target image, the second model is trained for image block classification to obtain an image classification model.

[0154] In this embodiment, a first model is obtained by performing image block classification training on a preset deep learning model according to a preset first region segmentation method, a preset annotation tool and an acquired target image; a second model is obtained by performing image block classification training on the first model according to a preset second region segmentation method, the annotation tool and the target image; and an image classification model is obtained by performing image block classification training on the second model according to a preset third region segmentation method, the annotation tool and the target image. The model is trained by the first segmentation, the first model is optimized by the second segmentation, and the second model is optimized by the third segmentation. The richness of the samples of the training model is improved by different segmentation methods, and the prediction performance of the trained model is improved by the two optimizations and rich samples. Moreover, the target image is segmented and annotated each time during the entire training process, and a large number of annotated images are not required. The segmentation results are annotated based on the annotation tool, which improves the segmentation efficiency and reduces the annotation cost.

[0155] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0156] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0157] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.

Claims

1. A method for training an image classification model, the method comprising: Performing image block classification training on a preset deep learning model according to a preset first region segmentation method, a preset annotation tool, and the acquired target image to obtain a first model; Performing image block classification training on the first model according to a preset second region segmentation method, the annotation tool, and the target image to obtain a second model; Performing image block classification training on the second model according to the preset third region segmentation method, the annotation tool, and the target image to obtain an image classification model; Wherein, the annotation tool includes: an image display area and a plurality of operation icons; The operation functions carried by the operation icon include: marking as a negative sample and entering the next image block, marking as a positive sample and entering the next image block, entering the next image block, and entering the previous image block; The step of performing image block classification training on a preset deep learning model according to a preset first region segmentation method, a preset annotation tool, and an acquired target image to obtain a first model includes: Performing image block segmentation on the target image according to the first region segmentation method to obtain a first image block set; Using the annotation tool, displaying each image block in the first image block set and obtaining the user's annotation results to obtain a first annotation result; Performing image block classification training on the deep learning model according to the first image block set and each of the first annotation results to obtain the first model; The step of performing image block classification training on the second model according to the preset third region segmentation method, the annotation tool, and the target image to obtain the image classification model includes: Using the third region segmentation method, the target image is segmented into image blocks to obtain a fourth image block set; the fourth image block set is input into the second model to perform classification prediction on each image block to obtain a third prediction vector; Obtaining, from each of the third prediction vectors, each of the third prediction vectors whose positive vector elements are within a preset probability range as a third hit vector; Using the annotation tool, displaying the image blocks in the fourth image block set corresponding to the third hit vector and obtaining annotation results from the user to obtain a fourth annotation result; According to each image block in the fourth image block set corresponding to each third hit vector and each fourth labeling result, image block classification training is performed on the second model to obtain the image classification model.

2. The image classification model training method according to claim 1, characterized in that: The step of performing image block classification training on the first model according to the preset second region segmentation method, the annotation tool, and the target image to obtain the second model includes: Using the first sub-segmentation method in the second region segmentation method, the target image is segmented into image blocks to obtain a second image block set; Inputting the second image block set into the first model to perform classification prediction on each image block to obtain a first prediction vector; obtaining, from each of the first prediction vectors, each first prediction vector whose positive vector element is within a preset probability range as a first hit vector; Using the annotation tool, displaying the image blocks in the second image block set corresponding to the first hit vector and obtaining the user's annotation results to obtain a second annotation result; Performing image block classification training on the first model according to each image block in the second image block set corresponding to each first hit vector and each second annotation result to obtain a model to be processed; Using the second sub-segmentation method in the second region segmentation method, the target image is segmented into image blocks to obtain a third image block set; Inputting the third image block set into the to-be-processed model to perform classification prediction on each image block to obtain a second prediction vector; obtaining, from each of the second prediction vectors, each second prediction vector whose positive vector element is within the probability range as a second hit vector; Using the annotation tool, displaying the image blocks in the third image block set corresponding to the second hit vector and obtaining the user's annotation results to obtain a third annotation result; Performing image block classification training on the model to be processed according to each image block in the third image block set corresponding to each second hit vector and each third annotation result to obtain the second model; The first sub-segmentation method, the second sub-segmentation method and the first region segmentation method are different.

3. The image classification model training method according to claim 2, characterized in that: The segmentation position of the first sub-segmentation method is the horizontal center line and the vertical center line of the image block segmented by the first region segmentation method; The horizontal coordinate of the segmentation position of the second sub-segmentation method is mx and the vertical coordinate is nx, where m is the horizontal coordinate of the vertex of the lower right corner of the target image block, and n is the vertical coordinate of the vertex of the lower right corner of the target image block, x is greater than 0, x is less than the length of the target image block, and x is less than the width of the target image block, wherein the target image block is any image block segmented by the first region segmentation method.

4. The image classification model training method according to claim 1, characterized in that: The step of using the third region segmentation method to segment the target image into image blocks to obtain a fourth image block set includes: Divide each image block in the first image block set into four image blocks respectively to obtain an image block set to be combined; Combining four image blocks in the set of image blocks to be combined to obtain an image combination block; Each of the image combination blocks is used as the fourth image block set.

5. A training device for an image classification model, characterized in that: A training method for applying an image classification model according to any one of claims 1 to 4, the apparatus comprising: A first training module is configured to perform image block classification training on a preset deep learning model based on a preset first region segmentation method, a preset annotation tool, and an acquired target image to obtain a first model; A second training module is configured to perform image block classification training on the first model according to a preset second region segmentation method, the annotation tool, and the target image to obtain a second model; The third training module is used to perform image block classification training on the second model according to the preset third region segmentation method, the annotation tool and the target image to obtain an image classification model.

6. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 4.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Image segmentation annotation method and device

    CN110570434A

  • Model training method and device, computer equipment and storage medium

    CN111210024A