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

By expanding the medical image training set and extracting the mean gray level co-occurrence matrix, and using support vector machines and convolutional neural networks to train the classification model, the problem of insufficient accuracy of traditional methods in complex medical image classification is solved, and the accuracy of image classification is improved. .

CN113936191BActive Publication Date: 2024-09-13SHENZHEN PING AN SMART HEALTHCARE TECH CO LTD
5 Cites 0 Cited by

Patent Information

Application Number
CN202111227964.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-21
Publication Date
2024-09-13
Estimated Expiration
2041-10-21

Smart Images

  • Figure CN113936191B
    Figure CN113936191B
Patent Text Reader

Abstract

The present application relates to the field of artificial intelligence technology, and discloses a method, device, equipment and storage medium for training a picture classification model. The method comprises obtaining a first picture training set, wherein the picture types of the first picture training set include CT pictures and MR pictures, and are provided with category labels corresponding to the main element categories, performing picture transformation on the first picture training set to obtain a second picture training set, performing feature extraction on the pictures of the second picture training set, and generating a corresponding mean grayscale co-occurrence matrix according to the extracted features to train a support vector machine to obtain a first classification model, wherein the first classification model is used to determine whether an input picture is a CT picture or an MR picture, and the pictures of the second picture training set are classified using the first classification model, and the type labels of the pictures are set according to the classification results; and a convolutional neural network is trained according to the second picture training set to obtain a second classification model, wherein the second classification model is used to identify the main element category of the input picture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of artificial intelligence, and in particular to a method, device, equipment and storage medium for training an image classification model. Background Art

[0002] In the prior art, the traditional method of image classification is feature description and detection. This type of traditional method is effective for some simple image classifications, but it is not competent for the classification and recognition of complex medical images such as pituitary tumors, gliomas and meningiomas. Summary of the invention

[0003] The main purpose of this application is to provide a method, device, equipment and storage medium for training an image classification model, aiming to improve the classification accuracy of complex medical images by the trained image classification model.

[0004] In a first aspect, the present application provides a method for training an image classification model, comprising:

[0005] Acquire a first image training set, wherein the image type of each first image in the first image training set includes a first medical image and a second medical image, and each first image is provided with a category label corresponding to a main element category;

[0006] Performing image transformation processing on the first image in the first image training set to obtain a second image training set, wherein the number of images in the second image training set is greater than the number of images in the first image training set;

[0007] Extracting features from each second image in the second image training set, and generating a mean gray-level co-occurrence matrix corresponding to each second image according to the extracted features;

[0008] training a support vector machine according to the mean gray-level co-occurrence matrix corresponding to each second picture in the second picture training set to obtain a first classification model, wherein the first classification model is used to determine whether the picture type corresponding to the input picture is the first medical picture or the second medical picture;

[0009] Using the first classification model to classify each second image in the second image training set, and setting a type label for the second image according to the classification result;

[0010] The convolutional neural network is trained according to the second image training set to obtain a second classification model, where the second classification model is used to identify the main element category corresponding to the input image.

[0011] In a second aspect, the present application further provides a picture classification model training device, the picture classification model training device comprising:

[0012] A first image acquisition module, configured to acquire a first image training set, wherein the image type of each first image in the first image training set includes a first medical image and a second medical image, and each first image is provided with a category label corresponding to a main element category;

[0013] A second picture acquisition module, used to perform picture transformation processing on the first picture in the first picture training set to obtain a second picture training set, wherein the number of pictures in the second picture training set is greater than the number of pictures in the first picture training set;

[0014] A grayscale matrix generation module, used to extract features from each second image in the second image training set, and generate a mean grayscale co-occurrence matrix corresponding to each second image according to the extracted features;

[0015] a first model training module, configured to train a support vector machine according to the mean gray-level co-occurrence matrix corresponding to each second picture in the second picture training set to obtain a first classification model, wherein the first classification model is used to determine whether the picture type corresponding to the input picture is the first medical picture or the second medical picture;

[0016] A picture type labeling module, used to classify each second picture in the second picture training set by using the first classification model, and set a type label of the second picture according to the classification result;

[0017] The second model training module is used to train the convolutional neural network according to the second image training set to obtain a second classification model, and the second classification model is used to identify the main element category corresponding to the input image.

[0018] In a third aspect, the present application also provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the image classification model training method as described above are implemented.

[0019] In a fourth aspect, the present application further provides a storage medium, wherein the computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the image classification model training method as described above are implemented.

[0020] The present application provides a method, device, equipment and storage medium for training an image classification model. In the present application, firstly, the first image training set is subjected to image transformation processing, and more training images are obtained on the basis of the limited first image training set to form a second image training set. The mean grayscale co-occurrence matrix of each second image in the second image training set is obtained, and the support vector machine is trained to obtain a first classification model that can identify whether the input image is a first medical image or a second medical image, wherein the first medical image corresponds to a CT image and the second medical image corresponds to an MR image. The second image in the second image training set is classified using the first classification model, and the image type label of the second image is set according to the classification result. The convolutional neural network is trained using the second image training set to obtain a second classification model, and the main element category corresponding to the input image can be identified through the second classified image.

[0021] In the present application, when it is necessary to identify the input image, the first classification model is first used to identify whether the image type is a first medical image or a second medical image, and a corresponding image type label is set for the input image. Then, the second classification model is used to identify the main element category of the input image to determine which disease the input image corresponds to.

[0022] Through the method provided in this application, the classification accuracy of the trained second classification model for complex medical images can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0024] Figure 1 A schematic diagram of the steps of a method for training an image classification model provided in an embodiment of the present application;

[0025] Figure 2 yes Figure 1 A flowchart of steps corresponding to a specific implementation of step S12;

[0026] Figure 3 yes Figure 1 A flowchart of steps corresponding to a specific implementation of step S13;

[0027] Figure 4 A schematic block diagram of an image classification model training device provided in an embodiment of the present application;

[0028] Figure 5A schematic block diagram of the structure of a computer device provided in an embodiment of the present application.

[0029] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0031] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor do they have to be executed in the order described. For example, some operations / steps can also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions. In addition, although the functional modules are divided in the device schematic, in some cases, the module division can be different from that in the device schematic.

[0032] The embodiment of the present application provides a method, apparatus, device and storage medium for training a picture classification model. The picture classification model training method can be applied to a terminal device or a server, and the terminal device can be an electronic device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant and a wearable device; the server can be a single server or a server cluster composed of multiple servers. The following is an explanation using the picture classification model training method applied to a server as an example.

[0033] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0034] Please refer to Figure 1 , Figure 1 A schematic diagram of the steps of a method for training an image classification model provided in an embodiment of the present application.

[0035] like Figure 1 As shown, the image classification model training method includes steps S11 to S16.

[0036] Step S11, obtaining a first image training set, wherein the image type of each first image in the first image training set includes a first medical image and a second medical image, and each first image is provided with a category label corresponding to a main element category.

[0037] It can be understood that the pictures in the first picture training set are first pictures, and the first pictures are all medical pictures. The first pictures in the first picture training set include pictures whose picture types correspond to first medical pictures and pictures whose picture types correspond to second medical pictures.

[0038] The first image training set includes first images of multiple main element categories, and each first image is correspondingly provided with a category label representing the main element category.

[0039] In some embodiments, the first image training set includes a first image whose main element categories are pituitary tumor, glioma and meningioma. That is, the category label set for the first image is one of pituitary tumor, glioma and meningioma.

[0040] In some implementations, the first medical image corresponds to a CT image, and the second medical image corresponds to an MR image.

[0041] It can be understood that CT (Computed Tomography) images are images obtained through electronic computer tomography, and MR (Magnetic Resonance) images are magnetic resonance imaging images.

[0042] Step S12: performing image transformation processing on the first images in the first image training set to obtain a second image training set, wherein the number of images in the second image training set is greater than the number of images in the first image training set.

[0043] It can be understood that the image transformation processing performed on the first image may include performing mirror transformation, rotation transformation, translation transformation and the like on the first image.

[0044] In some embodiments, the second image training set includes horizontal mirror images of the first image, vertically reversed mirror images, horizontally and vertically reversed mirror images, rotated mirror images, mirror images cut according to a certain ratio of width to height, and mirror images that are translated to the lower right, upper left, lower left, and upper right according to given coordinates.

[0045] In the process of performing image transformation processing on each first image in the first image training set, each first image will generate multiple result images, and the set composed of the result images is the second image training set, wherein the number of images in the second image training set is greater than the number of images in the first image training set. Through step S12, a small number of initial training images can be expanded to obtain a large number of training images.

[0046] like Figure 2As shown, in some implementations, performing image transformation processing on the first image in the first image training set to obtain a second image training set includes: steps S121 to S125.

[0047] Step S121, performing mirror transformation on each of the first pictures in the first picture training set to obtain a mirror picture training set;

[0048] Step S122, performing a rotation transformation on each of the first pictures in the first picture training set to obtain a rotated picture training set;

[0049] Step S123, scaling each of the first pictures in the first picture training set to obtain a scaled picture training set;

[0050] Step S124, performing translation transformation on each of the first pictures in the first picture training set to obtain a translation picture training set;

[0051] Step S125 , obtaining a second picture training set according to the mirror picture training set, the rotated picture training set, the scaled picture training set and the translated picture training set.

[0052] It can be understood that the set consisting of all pictures in the mirror picture training set, the rotated picture training set, the scaled picture training set and the translated picture training set is the second picture training set.

[0053] Through step S121 to step S125, the training pictures are effectively expanded, and the number of pictures in the second picture training set is much larger than the number of pictures in the first picture training set.

[0054] In some embodiments, when the first image in the first image training set is rotated, scaled, or translated, it is necessary to crop the image. Blank areas will appear in the cropped image. In this case, the blank areas can be filled with the original image background color to obtain the transformed image.

[0055] Step S13: extract features from each second image in the second image training set, and generate a mean gray-level co-occurrence matrix corresponding to each second image based on the extracted features.

[0056] It can be understood that each feature extracted from the second image can generate a corresponding gray level co-occurrence matrix, and the gray level co-occurrence matrix of the second image is averaged to obtain the mean gray level co-occurrence matrix corresponding to the second image. Each second image in the second image training set has its corresponding mean gray level co-occurrence matrix.

[0057] like Figure 3As shown, in some embodiments, step S13 includes: step S131 to step S133.

[0058] Step S131: extracting features from each second picture in the second picture training set according to a preset method to obtain a plurality of features corresponding to each second picture;

[0059] Step S132: generating a plurality of gray-level co-occurrence matrices corresponding to each of the second images according to the plurality of features corresponding to each of the second images;

[0060] Step S133: perform mean processing on the plurality of gray-level co-occurrence matrices to obtain a mean gray-level co-occurrence matrix corresponding to each of the second images.

[0061] It can be understood that feature extraction is performed on the second image to extract feature images of multiple dimensions of the second image. According to the grayscale values ​​corresponding to each pixel in each feature image, a grayscale co-occurrence matrix of the corresponding feature image can be generated, and multiple grayscale co-occurrence matrices are averaged to obtain the mean grayscale co-occurrence matrix corresponding to the second image.

[0062] In some embodiments, step S131 includes: step S1311 to step S1315.

[0063] Step S1311: performing principal component analysis on the second image to obtain a first feature corresponding to the second image;

[0064] Step S1312: performing LBP feature extraction on the second image to obtain a second feature corresponding to the second image;

[0065] Step S1313: extract edge features from the second image to obtain a third feature corresponding to the second image;

[0066] Step S1314: performing HOG feature extraction on the second image to obtain a fourth feature corresponding to the second image;

[0067] Step S1315: perform color histogram feature extraction on the second image to obtain a fifth feature corresponding to the second image.

[0068] It can be understood that by performing principal component analysis, LBP (Local Binary Pattern) feature extraction, edge feature extraction, HOG (Histogram of Oriented Gradient) feature extraction and color histogram feature extraction on the second image respectively, the feature result graphs of the second image corresponding to these five dimensions can be obtained, which are the first feature, the second feature, the third feature, the fourth feature and the fifth feature respectively.

[0069] Each feature result image can generate a corresponding grayscale co-occurrence matrix, that is, by obtaining the first feature, second feature, third feature, fourth feature and fifth feature of the second image, five grayscale co-occurrence matrices can be generated accordingly, and these five grayscale co-occurrence matrices are homogenized to obtain the mean grayscale co-occurrence matrix of the second image.

[0070] In some embodiments, when edge features are extracted from the second image, the edge features can be extracted by using a Canny edge detection algorithm, or by using a Sobel edge detection algorithm, or by using other edge detection algorithms. The specific use can be selected according to the situation.

[0071] Step S14: training a support vector machine according to the mean gray-level co-occurrence matrix corresponding to each second picture in the second picture training set to obtain a first classification model, wherein the first classification model is used to determine whether the picture type corresponding to the input picture is the first medical picture or the second medical picture.

[0072] It can be understood that the support vector machine (SVM) is a binary classification model, and the support vector machine is trained by the mean grayscale co-occurrence matrix corresponding to the second image, that is, the first classification model is obtained. Through the first classification model, it can be identified whether the image type corresponding to the input image is a first medical image or a second medical image. That is, when the first medical image and the second medical image correspond to a CT image and an MR image, respectively, through the first classification model, it can be identified whether the input image is a CT image or an MR image.

[0073] In traditional methods, the features of the original image are usually used directly to train the support vector machine. The classification model trained by the traditional method has a relatively poor ability to classify images. In the present application, the first classification model is obtained by training the support vector machine with the mean grayscale co-occurrence matrix obtained after extracting features of multiple dimensions from the second image. The training method of the first classification model in the present application can improve the recognition accuracy of the support vector machine for the image type of the input image.

[0074] Step S15: Classify each second picture in the second picture training set using the first classification model, and set a type label for the second picture according to the classification result.

[0075] It can be understood that the first classification model is obtained by training according to the mean grayscale co-occurrence matrix corresponding to the second picture, and the first classification model is used to classify each second picture in the second picture training set, that is, the mean grayscale co-occurrence matrix corresponding to the second picture is input into the first classification model for identification and classification, and the type label of the second picture is set according to the classification result.

[0076] When the first medical image and the second medical image correspond to a CT image and an MR image respectively, in step S15, it is possible to identify whether the second image is a CT image or an MR image through the type labels of each second image in the second image training set.

[0077] Step S16: training the convolutional neural network according to the second image training set to obtain a second classification model, where the second classification model is used to identify the main element category corresponding to the input image.

[0078] It can be understood that the convolutional neural network can be trained and learned according to the image features of the input image and the label corresponding to the image. During the training process, the loss is calculated through the loss function, and the network parameters are optimized through back propagation. When the training is completed, the parameters of the convolutional neural network are locked, and the second classification model is obtained.

[0079] In the present application, the second picture training set is obtained according to the first picture training set, and each first picture in the first picture training set is provided with a category label corresponding to the main element category, that is, each second picture in the second picture training set is also provided with a category label corresponding to the main element category. On this basis, each second picture in the second picture training set is further classified by the first classification model, and a corresponding type label is set for the second picture. The second picture is input into the convolutional neural network, and the convolutional neural network can perform supervised learning according to the category label and type label corresponding to the second picture. The training method provided in the present application can improve the training effect of the convolutional neural network.

[0080] In some implementations, before training the convolutional neural network according to the second image training set, the method further includes: performing image enhancement processing on each of the second images in the second image training set.

[0081] It can be understood that performing image enhancement processing on the second image can filter out the noise of the second image, and using the enhanced second image training set to train the convolutional neural network can improve the training effect of the convolutional neural network. Further, the classification accuracy of the obtained second classification model for complex medical images can be improved.

[0082] In some implementations, performing image enhancement processing on each of the second images in the second image training set includes:

[0083] Sequentially obtain the second pictures in the second picture training set;

[0084] Performing a wavelet transform on the second image to obtain a wavelet transform result image corresponding to the second image;

[0085] Calculating a grayscale histogram of the wavelet transform result image, and performing equalization processing on the wavelet transform result image according to the grayscale histogram to obtain a grayscale result image corresponding to the second image;

[0086] Perform a gamma transform on the grayscale result image to obtain an image enhancement result image corresponding to the second image.

[0087] It can be understood that the second image in the second image training set is subjected to wavelet transform in turn, the grayscale histogram is calculated based on the wavelet transform result image, and the grayscale histogram is equalized and then subjected to gamma transform, thus completing the enhancement processing of the second image. The obtained image is the image enhancement result image corresponding to the second image.

[0088] By performing wavelet transform on the second image, noise reduction processing on the second image can be achieved.

[0089] By calculating the grayscale histogram of the wavelet transform result image, you can check the grayscale distribution of the wavelet transform result image. If the grayscale distribution of the grayscale histogram is concentrated in a narrow range, the grayscale distribution is uneven, which will make the image details unclear and the contrast low. At this time, equalizing the wavelet transform result image according to the grayscale histogram can make the grayscale of the wavelet transform result image evenly distributed, thereby increasing the contrast and making the image details clear, so as to achieve the purpose of image enhancement.

[0090] By performing a gamma transformation on the grayscale result image, the overexposed or underexposed image areas in the grayscale result image can be corrected, which can also achieve an image enhancement effect.

[0091] In some implementations, performing image enhancement processing on each of the second images in the second image training set includes:

[0092] Sequentially obtain the second pictures in the second picture training set;

[0093] Performing noise reduction processing on the second image by using an anisotropic diffusion method to obtain an anisotropic diffusion result image corresponding to the second image;

[0094] Using a multi-scale enhancement method, the second image is enhanced to obtain a multi-scale enhancement result image corresponding to the second image;

[0095] The anisotropic diffusion result map and the multi-scale enhancement result map are weightedly fused to obtain an image enhancement result map corresponding to the second image.

[0096] It can be understood that image denoising can be achieved by anisotropic diffusion method, and the second image is processed by anisotropic diffusion method, and the obtained image is the anisotropic diffusion result image. The details of the image can be enhanced by multi-scale detail boosting method, and the second image is processed by multi-scale enhancement method, and the obtained image is the multi-scale enhancement result image.

[0097] By weighted fusion of the anisotropic diffusion result map and the multi-scale enhancement result map, the surface and fuzzy boundary of the tumor in the image enhancement result map become clearly visible, and at the same time, the information loss of the tumor surface is not much.

[0098] In this embodiment, by performing image enhancement processing on the second image and using the enhanced second image to train the convolutional neural network, the training effect of the convolutional neural network can be improved. At the same time, the trained second classification model can achieve higher accuracy when classifying complex medical images.

[0099] This application also provides a method for using an image classification model, including:

[0100] S21. When receiving a picture to be classified, obtaining a mean gray-level co-occurrence matrix corresponding to the picture to be classified;

[0101] S22, setting a type label for the image to be classified according to the classification result of the mean gray-level co-occurrence matrix by a first classification model, wherein the first classification model is obtained according to steps S11 to S14;

[0102] S23. Classify the to-be-classified pictures using a second classification model to obtain picture categories corresponding to the to-be-classified pictures, wherein the second classification model is obtained according to steps S15 to S16.

[0103] It can be understood that when the first medical image and the second medical image correspond to a CT image and an MR image respectively, through steps S21 to S22, it is possible to identify whether the image to be classified belongs to a CT image or an MR image, and according to the identification result of the first classified image, a corresponding type label is set for the image to be classified. Through step S23, the image category corresponding to the image to be classified can be identified.

[0104] In the present application, the first picture training set is subjected to picture transformation processing to obtain more training pictures to constitute the second picture training set. The mean grayscale co-occurrence matrix of each second picture in the second picture training set is obtained, and the support vector machine is trained to obtain a first classification model that can identify the picture type of the input picture. The first classification model is used to classify each second picture in the second picture training set, and the picture type label of the second picture is set according to the classification result. The convolutional neural network is trained using the second picture training set to obtain a second classification model, and the main element category corresponding to the input picture can be identified through the second classification model.

[0105] In this application, when it is necessary to perform image recognition on the image to be processed, the image type corresponding to the image to be processed is first identified through the first classification model and the corresponding image type label is set, and then the image to be processed is input into the second classification model, and the main element category of the image to be processed is identified through the second classification model. The method provided in this application can improve the classification accuracy of the image classification model for medical images.

[0106] Please refer to Figure 4 , Figure 4 A schematic block diagram of an image classification model training device provided in an embodiment of the present application.

[0107] like Figure 4 As shown, the image classification model training device 201 includes:

[0108] A first image acquisition module 2011 is used to acquire a first image training set, wherein the image type of each first image in the first image training set includes a first medical image and a second medical image, and each first image is provided with a category label corresponding to a main element category;

[0109] A second picture acquisition module 2012 is used to perform picture transformation processing on the first picture in the first picture training set to obtain a second picture training set, wherein the number of pictures in the second picture training set is greater than the number of pictures in the first picture training set;

[0110] A grayscale matrix generation module 213, used for extracting features from each second image in the second image training set, and generating a mean grayscale co-occurrence matrix corresponding to each second image according to the extracted features;

[0111] A first model training module 214 is used to train a support vector machine according to the mean gray-level co-occurrence matrix corresponding to each second picture in the second picture training set to obtain a first classification model, wherein the first classification model is used to determine whether the picture type corresponding to the input picture is the first medical picture or the second medical picture;

[0112] A picture type labeling module 2015, configured to classify each second picture in the second picture training set using the first classification model, and set a type label for the second picture according to the classification result;

[0113] The second model training module 2016 is used to train the convolutional neural network according to the second image training set to obtain a second classification model, and the second classification model is used to identify the main element category corresponding to the input image.

[0114] In some implementations, when the second picture acquisition module 2012 performs picture transformation processing on the first picture in the first picture training set to obtain the second picture training set, the second picture acquisition module 2012 includes:

[0115] Performing mirror transformation on each of the first pictures in the first picture training set to obtain a mirror picture training set;

[0116] Performing a rotation transformation on each of the first pictures in the first picture training set to obtain a rotated picture training set;

[0117] Performing scaling transformation on each of the first pictures in the first picture training set to obtain a scaled picture training set;

[0118] Performing a translation transformation on each of the first pictures in the first picture training set to obtain a translation picture training set;

[0119] A second picture training set is obtained according to the mirror picture training set, the rotated picture training set, the scaled picture training set and the translated picture training set.

[0120] In some implementations, when the grayscale matrix generation module 2013 extracts features from each second image in the second image training set and generates a mean grayscale co-occurrence matrix corresponding to each second image according to the extracted features, it includes:

[0121] Extracting features from each second picture in the second picture training set according to a preset method to obtain a plurality of features corresponding to each second picture;

[0122] generating a plurality of gray-level co-occurrence matrices corresponding to each of the second images according to the plurality of features corresponding to each of the second images;

[0123] The plurality of gray-level co-occurrence matrices are averaged to obtain a mean gray-level co-occurrence matrix corresponding to each of the second images.

[0124] In some implementations, when the grayscale matrix generation module 2013 extracts features from each second image in the second image training set according to a preset method to obtain a plurality of features corresponding to each second image, the grayscale matrix generation module 2013 includes:

[0125] Performing principal component analysis on the second image to obtain a first feature corresponding to the second image;

[0126] Performing LBP feature extraction on the second image to obtain a second feature corresponding to the second image;

[0127] Performing edge feature extraction on the second image to obtain a third feature corresponding to the second image;

[0128] Performing HOG feature extraction on the second image to obtain a fourth feature corresponding to the second image;

[0129] Perform color histogram feature extraction on the second image to obtain a fifth feature corresponding to the second image.

[0130] In some embodiments, the image classification model training device 201 also includes an image enhancement module 2017, and before the second model training module 2016 trains the convolutional neural network according to the second image training set, the image enhancement module 2017 is used to perform image enhancement processing on each of the second images in the second image training set.

[0131] In some implementations, when the picture enhancement module 2017 performs picture enhancement processing on each of the second pictures in the second picture training set, the steps include:

[0132] Sequentially obtain the second pictures in the second picture training set;

[0133] Performing a wavelet transform on the second image to obtain a wavelet transform result image corresponding to the second image;

[0134] Calculating a grayscale histogram of the wavelet transform result image, and performing equalization processing on the wavelet transform result image according to the grayscale histogram to obtain a grayscale result image corresponding to the second image;

[0135] Perform a gamma transform on the grayscale result image to obtain an image enhancement result image corresponding to the second image.

[0136] In some implementations, when the picture enhancement module 2017 performs picture enhancement processing on each of the second pictures in the second picture training set, the steps include:

[0137] Sequentially obtain the second pictures in the second picture training set;

[0138] Performing noise reduction processing on the second image by using an anisotropic diffusion method to obtain an anisotropic diffusion result image corresponding to the second image;

[0139] Using a multi-scale enhancement method, the second image is enhanced to obtain a multi-scale enhancement result image corresponding to the second image;

[0140] The anisotropic diffusion result map and the multi-scale enhancement result map are weightedly fused to obtain an image enhancement result map corresponding to the second image.

[0141] It should be noted that technicians in the relevant field can clearly understand that for the convenience and conciseness of description, the specific working process of the above-described device and each module and unit can refer to the corresponding process in the aforementioned image classification model training method embodiment, and will not be repeated here.

[0142] The apparatus provided in the above embodiment may be implemented in the form of a computer program. The computer program may be Figure 5 Runs on the computer device shown.

[0143] See also Figure 5 , Figure 5 The present invention provides a schematic block diagram of a computer device according to an embodiment of the present invention. The computer device includes but is not limited to a server.

[0144] like Figure 5 As shown, the computer device 301 includes a processor 3011, a memory and a network interface connected via a system bus, wherein the memory may include a storage medium 3012 and an internal memory 3015, and the storage medium 3012 may be non-volatile or volatile.

[0145] The storage medium 3012 can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor 3011 can execute any one of the image classification model training methods.

[0146] Processor 3011 is used to provide computing and control capabilities and support the operation of the entire computer device.

[0147] The internal memory 3015 provides an environment for the operation of the computer program in the storage medium 3012. When the computer program is executed by the processor 3011, the processor 3011 can execute any image classification model training method.

[0148] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will appreciate 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 those shown in the figure, or combine certain components, or have a different arrangement of components.

[0149] It should be understood that the processor 3011 may be a central processing unit (CPU), and the processor 3011 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0150] In some implementations, the processor 3011 is used to run a computer program stored in the memory to implement the following steps:

[0151] Acquire a first image training set, wherein the image type of each first image in the first image training set includes a first medical image and a second medical image, and each first image is provided with a category label corresponding to a main element category;

[0152] Performing image transformation processing on the first image in the first image training set to obtain a second image training set, wherein the number of images in the second image training set is greater than the number of images in the first image training set;

[0153] Extracting features from each second image in the second image training set, and generating a mean gray-level co-occurrence matrix corresponding to each second image according to the extracted features;

[0154] training a support vector machine according to the mean gray-level co-occurrence matrix corresponding to each second picture in the second picture training set to obtain a first classification model, wherein the first classification model is used to determine whether the picture type corresponding to the input picture is the first medical picture or the second medical picture;

[0155] Using the first classification model to classify each second image in the second image training set, and setting a type label for the second image according to the classification result;

[0156] The convolutional neural network is trained according to the second image training set to obtain a second classification model, where the second classification model is used to identify the main element category corresponding to the input image.

[0157] In some implementations, the first medical image corresponds to a CT image, and the second medical image corresponds to an MR image.

[0158] In some implementations, when the processor 3011 performs image transformation processing on the first image in the first image training set to obtain the second image training set, it is configured to implement:

[0159] Performing mirror transformation on each of the first pictures in the first picture training set to obtain a mirror picture training set;

[0160] Performing a rotation transformation on each of the first pictures in the first picture training set to obtain a rotated picture training set;

[0161] Performing scaling transformation on each of the first pictures in the first picture training set to obtain a scaled picture training set;

[0162] Performing a translation transformation on each of the first pictures in the first picture training set to obtain a translation picture training set;

[0163] A second picture training set is obtained according to the mirror picture training set, the rotated picture training set, the scaled picture training set and the translated picture training set.

[0164] In some implementations, when the processor 3011 extracts features from each second image in the second image training set and generates a mean gray-level co-occurrence matrix corresponding to each second image according to the extracted features, it is configured to implement:

[0165] Extracting features from each second picture in the second picture training set according to a preset method to obtain a plurality of features corresponding to each second picture;

[0166] generating a plurality of gray-level co-occurrence matrices corresponding to each of the second images according to the plurality of features corresponding to each of the second images;

[0167] The plurality of gray-level co-occurrence matrices are averaged to obtain a mean gray-level co-occurrence matrix corresponding to each of the second images.

[0168] In some implementations, when the processor 3011 extracts features from each second image in the second image training set according to a preset method to obtain a plurality of features corresponding to each second image, it is configured to implement:

[0169] Performing principal component analysis on the second image to obtain a first feature corresponding to the second image;

[0170] Performing LBP feature extraction on the second image to obtain a second feature corresponding to the second image;

[0171] Performing edge feature extraction on the second image to obtain a third feature corresponding to the second image;

[0172] Performing HOG feature extraction on the second image to obtain a fourth feature corresponding to the second image;

[0173] Perform color histogram feature extraction on the second image to obtain a fifth feature corresponding to the second image.

[0174] In some embodiments, before training the convolutional neural network according to the second image training set, the processor 3011 is used to implement: performing image enhancement processing on each of the second images in the second image training set.

[0175] In some implementations, when the processor 3011 performs image enhancement processing on each of the second images in the second image training set, it is configured to implement:

[0176] Sequentially obtain the second pictures in the second picture training set;

[0177] Performing a wavelet transform on the second image to obtain a wavelet transform result image corresponding to the second image;

[0178] Calculating a grayscale histogram of the wavelet transform result image, and performing equalization processing on the wavelet transform result image according to the grayscale histogram to obtain a grayscale result image corresponding to the second image;

[0179] Perform a gamma transform on the grayscale result image to obtain an image enhancement result image corresponding to the second image.

[0180] In some implementations, when the processor 3011 performs image enhancement processing on each of the second images in the second image training set, it is configured to implement:

[0181] Sequentially obtain the second pictures in the second picture training set;

[0182] Performing noise reduction processing on the second image by using an anisotropic diffusion method to obtain an anisotropic diffusion result image corresponding to the second image;

[0183] Using a multi-scale enhancement method, the second image is enhanced to obtain a multi-scale enhancement result image corresponding to the second image;

[0184] The anisotropic diffusion result map and the multi-scale enhancement result map are weightedly fused to obtain an image enhancement result map corresponding to the second image.

[0185] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the computer device described above can refer to the corresponding process in the aforementioned picture classification model training method embodiment, and will not be repeated here.

[0186] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the various embodiments of the image classification model training method of the present application.

[0187] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.

[0188] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0189] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.

[0190] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for training an image classification model. It is characterized in that include: Acquire a first image training set, wherein the image type of each first image in the first image training set includes a first medical image and a second medical image, and each first image is provided with a category label corresponding to a main element category, the category label of the first medical image is a CT image, the category label of the second medical image is an MR image, and the main element categories include pituitary tumor, glioma and meningioma; Performing image transformation processing on the first image in the first image training set to obtain a second image training set, wherein the number of images in the second image training set is greater than the number of images in the first image training set; Performing principal component analysis on the second image to obtain a first feature corresponding to the second image; Performing LBP feature extraction on the second image to obtain a second feature corresponding to the second image; Performing edge feature extraction on the second image to obtain a third feature corresponding to the second image; Performing HOG feature extraction on the second image to obtain a fourth feature corresponding to the second image; Performing color histogram feature extraction on the second image to obtain a fifth feature corresponding to the second image; generating a plurality of gray-level co-occurrence matrices corresponding to each of the second images according to a plurality of features corresponding to each of the second images; Performing mean processing on the plurality of gray-level co-occurrence matrices to obtain mean gray-level co-occurrence matrices corresponding to the respective second images; training a support vector machine according to the mean gray-level co-occurrence matrix corresponding to each second picture in the second picture training set to obtain a first classification model, wherein the first classification model is used to determine whether the picture type corresponding to the input picture is the first medical picture or the second medical picture; Using the first classification model to classify each second image in the second image training set, and setting a type label for the second image according to the classification result; The convolutional neural network is trained according to the second image training set to obtain a second classification model, where the second classification model is used to identify the main element category corresponding to the input image.

2. The method according to claim 1, It is characterized in that The performing image transformation processing on the first image in the first image training set to obtain a second image training set includes: Performing mirror transformation on each of the first pictures in the first picture training set to obtain a mirror picture training set; Performing a rotation transformation on each of the first pictures in the first picture training set to obtain a rotated picture training set; Performing scaling transformation on each of the first pictures in the first picture training set to obtain a scaled picture training set; Performing a translation transformation on each of the first pictures in the first picture training set to obtain a translation picture training set; A second picture training set is obtained according to the mirror picture training set, the rotated picture training set, the scaled picture training set and the translated picture training set.

3. The method according to claim 1 or 2, It is characterized in that Before training the convolutional neural network according to the second picture training set, the method further includes: Perform image enhancement processing on each of the second images in the second image training set.

4. The method according to claim 3, It is characterized in that The performing image enhancement processing on each of the second images in the second image training set includes: Sequentially obtain the second pictures in the second picture training set; Performing a wavelet transform on the second image to obtain a wavelet transform result image corresponding to the second image; Calculating a grayscale histogram of the wavelet transform result image, and performing equalization processing on the wavelet transform result image according to the grayscale histogram to obtain a grayscale result image corresponding to the second image; Perform a gamma transform on the grayscale result image to obtain an image enhancement result image corresponding to the second image.

5. The method according to claim 3, It is characterized in that The performing image enhancement processing on each of the second images in the second image training set includes: Sequentially obtain the second pictures in the second picture training set; Performing noise reduction processing on the second image by using an anisotropic diffusion method to obtain an anisotropic diffusion result image corresponding to the second image; Using a multi-scale enhancement method, the second image is enhanced to obtain a multi-scale enhancement result image corresponding to the second image; The anisotropic diffusion result map and the multi-scale enhancement result map are weightedly fused to obtain an image enhancement result map corresponding to the second image.

6. A device for training a picture classification model, It is characterized in that The device comprises: A first image acquisition module, used to acquire a first image training set, wherein the image type of each first image in the first image training set includes a first medical image and a second medical image, and each first image is provided with a category label corresponding to a main element category, the category label of the first medical image is a CT image, the category label of the second medical image is an MR image, and the main element categories include pituitary tumor, glioma and meningioma; A second picture acquisition module, used to perform picture transformation processing on the first picture in the first picture training set to obtain a second picture training set, wherein the number of pictures in the second picture training set is greater than the number of pictures in the first picture training set; A grayscale matrix generation module, used to perform principal component analysis on the second image to obtain a first feature corresponding to the second image; perform LBP feature extraction on the second image to obtain a second feature corresponding to the second image; perform edge feature extraction on the second image to obtain a third feature corresponding to the second image; perform HOG feature extraction on the second image to obtain a fourth feature corresponding to the second image; perform color histogram feature extraction on the second image to obtain a fifth feature corresponding to the second image; generate multiple grayscale co-occurrence matrices corresponding to each of the second images according to multiple features corresponding to each of the second images; perform mean processing on the multiple grayscale co-occurrence matrices to obtain a mean grayscale co-occurrence matrix corresponding to each of the second images; a first model training module, configured to train a support vector machine according to the mean gray-level co-occurrence matrix corresponding to each second picture in the second picture training set to obtain a first classification model, wherein the first classification model is used to determine whether the picture type corresponding to the input picture is the first medical picture or the second medical picture; A picture type labeling module, used to classify each second picture in the second picture training set by using the first classification model, and set a type label of the second picture according to the classification result; The second model training module is used to train the convolutional neural network according to the second image training set to obtain a second classification model, and the second classification model is used to identify the main element category corresponding to the input image.

7. A computer device, It is characterized in that The computer device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the image classification model training method as described in any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the image classification model training method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Mineral content monitoring system based on videos

    CN104134075A

  • Deep learning algorithm-based classification method of bacterial pneumonia and viral pneumonia in children

    CN108171232A

  • Multi-class medical image judgment method and system

    CN109635846A

  • Pipeline visual inspection system and method based on machine learning

    CN112845159A

  • Image quality classification method, system and terminal device

    WO2019144469A1