Medical image classification method, device, equipment and storage medium
By acquiring and processing multi-frame images of medical images and their optical flow videos, and combining static and dynamic features for classification, the problem of low accuracy of existing medical image classification is solved and the accuracy of image recognition is improved.
Patent Information
- Application Number
- CN202210237545.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-11
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2042-03-11
AI Technical Summary
The accuracy of existing medical image classification methods is low, mainly due to the insufficient accuracy of machine learning models in identifying feature elements in images, resulting in inaccurate classification of medical images.
By acquiring the target medical image and the optical flow video generated, multiple frames of images are intercepted and feature extracted respectively. The feature extraction model and classification network model are used for processing, and static and dynamic features are combined for splicing analysis to improve classification accuracy.
It improves the category recognition accuracy of medical images, takes into account the static and dynamic characteristics of the human body in the images, and enhances the ability to classify target images.
Smart Images

Figure CN114582469B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to a medical image classification method, device, equipment and storage medium. Background Art
[0002] Medical imaging (also known as medical imaging) refers to the technology and processing process of obtaining internal tissue images of the human body or a part of the human body in a non-invasive manner for medical treatment or medical research.
[0003] Medical imaging includes the following two relatively independent research directions: medical imaging system and medical image processing. The former refers to the process of image formation, including the study of imaging mechanism, imaging equipment, imaging system analysis and other issues; the latter refers to further processing of the acquired images, the purpose of which is to restore the original unclear image, to highlight certain feature information in the image, or to classify the image pattern, etc. In the process of medical image processing, the medical images are usually processed through the trained machine learning model to determine whether there are characteristic elements such as lesions in the medical images, so as to classify the medical images.
[0004] In the above scheme, the accuracy of identifying a certain characteristic element in the image through the machine learning model is low, resulting in low accuracy in the classification of medical images. Summary of the invention
[0005] The present application provides a medical image classification method, device, equipment and storage medium, which improves the classification accuracy of medical images. The technical solution is as follows.
[0006] In one aspect, a medical image classification method is provided, the method comprising:
[0007] Acquire a target medical image and a target optical flow video generated by the target medical image;
[0008] Intercepting at least two frames of target medical images from the target medical image; intercepting at least two frames of target optical flow images from the target optical flow video;
[0009] The at least two frames of target medical images and the at least two frames of target optical flow images are processed respectively by a feature extraction model to obtain a first image feature and a second image feature;
[0010] The first image feature and the second image feature are spliced together, and the spliced target image feature is processed through a classification network model to obtain a category corresponding to the target medical image.
[0011] In another aspect, a medical image classification device is provided, the device comprising:
[0012] A medical image acquisition module, used to acquire a target medical image and a target optical flow video generated by the target medical image;
[0013] An image capture module, used to capture at least two frames of target medical images from the target medical image; capture at least two frames of target optical flow images from the target optical flow video;
[0014] An image feature acquisition module, used to process the at least two frames of target medical images and the at least two frames of target optical flow images respectively through a feature extraction model to obtain a first image feature and a second image feature;
[0015] The image classification module is used to splice the first image feature and the second image feature, and perform data processing on the spliced target image feature through a classification network model to obtain the category corresponding to the target medical image.
[0016] In a possible implementation, the target medical image includes at least one of an ultrasound B-mode image of the target area and a contrast image of the target area.
[0017] In a possible implementation manner, the device further includes:
[0018] A pre-training module, used to train the feature extraction model through a natural video training set to obtain a feature extraction model with pre-training parameters; the natural video data set includes a target training image and annotation information corresponding to the target training image;
[0019] The feature extraction model training module is used to train the feature extraction model through a medical video training set to obtain the feature extraction model.
[0020] In a possible implementation, when the feature extraction model is the first feature extraction model, the medical video training set includes medical training images and annotation information corresponding to the medical training images;
[0021] When the feature extraction model is the second feature extraction model, the medical video training set includes optical flow training images and annotation information corresponding to the optical flow training images.
[0022] In a possible implementation, the image feature acquisition module is further used to:
[0023] Processing the at least two frames of target medical images by using the first feature extraction model to obtain the first image feature;
[0024] The at least two frames of target optical flow images are processed by the second feature extraction model to obtain the second image features.
[0025] In a possible implementation, the feature extraction model includes at least two types of candidate feature extraction models;
[0026] The image feature acquisition module further includes:
[0027] A candidate image feature acquisition unit, used to process the at least two frames of target medical images and the at least two frames of target optical flow images respectively through respective candidate feature extraction models to obtain candidate image features corresponding to the respective candidate feature extraction models; the candidate image features include first candidate image features and second candidate image features;
[0028] The image feature determination module is used to determine the feature extraction model among various candidate feature extraction models, and determine the first candidate image feature and the second candidate image feature included in the candidate image features corresponding to the feature extraction model as the first image feature and the second image feature.
[0029] In a possible implementation, the image feature determination module is further configured to:
[0030] Obtain information values of candidate image features corresponding to each candidate feature extraction model;
[0031] Comparing the correlation coefficients between the candidate image features corresponding to the respective candidate feature extraction models;
[0032] Among the candidate feature extraction models respectively corresponding to two candidate image features whose correlation coefficients are greater than the coefficient threshold, the candidate feature extraction model with a smaller information value of the candidate image feature is discarded to determine the feature extraction model.
[0033] In a possible implementation, the image feature determination module is further configured to:
[0034] Performing a logistic regression operation on the candidate image features of each candidate feature extraction model to obtain a logistic regression weight corresponding to each candidate feature extraction model;
[0035] A candidate feature extraction model whose logistic regression weight is greater than a threshold is determined as the feature extraction model.
[0036] In a possible implementation, the image classification module is further used to:
[0037] Splicing the target image features with the medical features, and performing data processing on the spliced features through a classification network model to obtain the category corresponding to the target medical video;
[0038] The medical features are obtained by extracting the medical feature images through a medical feature extraction model.
[0039] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor to implement the above-mentioned medical image classification method.
[0040] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement the above-mentioned medical image classification method.
[0041] In another aspect, a computer program product is provided. A computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned medical image classification method.
[0042] The technical solution provided by this application may have the following beneficial effects:
[0043] When it is necessary to classify medical images, a target medical image and a target optical flow video generated based on the target medical image can be obtained. The target medical image represents the static features of the human body, while the target optical flow video represents the dynamic features of the human body. At this time, the feature extraction model processes at least two frames of the target medical image and the target optical flow image respectively to obtain the first image feature and the second image feature, so as to perform category analysis through the classification network model. The medical image category analyzed by the above scheme takes into account the static image features and dynamic image features of the human body in the target medical image, thereby improving the category recognition accuracy of the target medical image. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 It is a structural diagram of a medical image classification system according to an exemplary embodiment.
[0046] Figure 2 is a method flow chart of a medical image classification method according to an exemplary embodiment.
[0047] Figure 3 is a method flow chart of a medical image classification method according to an exemplary embodiment.
[0048] Figure 4 It is a flowchart of a medical image classification method according to an exemplary embodiment.
[0049] Figure 5 A schematic diagram of a data preprocessing process involved in an embodiment of the present application is shown.
[0050] Figure 6 It is a structural block diagram of a graph database updating device according to an exemplary embodiment.
[0051] Figure 7 It is a schematic diagram of a computer device provided according to an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0052] The technical solution of the present application will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than 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 the present application.
[0053] It should be understood that the "indication" mentioned in the embodiments of the present application can be a direct indication, an indirect indication, or an indication of an association relationship. For example, A indicates B, which can mean that A directly indicates B, for example, B can be obtained through A; it can also mean that A indirectly indicates B, for example, A indicates C, and B can be obtained through C; it can also mean that there is an association relationship between A and B.
[0054] In the description of the embodiments of the present application, the term "corresponding" may indicate a direct or indirect correspondence between two items, or an association relationship between the two items, or a relationship between indication and being indicated, configuration and being configured, and the like.
[0055] In an embodiment of the present application, "predefinition" can be achieved by pre-saving corresponding codes, tables or other methods that can be used to indicate relevant information in a device (for example, including a terminal device and a network device). The present application does not limit its specific implementation method.
[0056] Before describing the various embodiments shown in the present application, several concepts involved in the present application are first introduced.
[0057] 1) AI (Artificial Intelligence)
[0058] Artificial Intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. Artificial Intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robots, language recognition, image recognition, natural language processing and expert systems. Since the birth of artificial intelligence, the theory and technology of artificial intelligence have become increasingly mature, and the application field has continued to expand. It can be imagined that the technological products brought by artificial intelligence in the future will be the "container" of human wisdom. Artificial Intelligence can simulate the information process of human consciousness and thinking. Artificial Intelligence is not human intelligence, but it can think like humans and may also exceed human intelligence.
[0059] The main material basis for studying artificial intelligence and the machine that can realize the artificial intelligence technology platform is the computer. In addition to computer science, artificial intelligence also involves information theory, cybernetics, automation, bionics, biology, psychology, mathematical logic, linguistics, medicine and philosophy. The main contents of artificial intelligence research include: knowledge representation, automatic reasoning and search methods, machine learning and knowledge acquisition, knowledge processing systems, natural language understanding, computer vision, intelligent robots, automatic programming and other aspects.
[0060] 2) CV (Computer Vision)
[0061] Computer vision is a science that studies how to make machines "see". To put it more specifically, it refers to machine vision that uses cameras and computers to replace human eyes to identify, track and measure targets, and further performs image processing so that the computer processes the images into images that are more suitable for human observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain "information" from images or multidimensional data. The information here refers to information defined by Shannon that can be used to help make a "decision". Because perception can be seen as extracting information from sensory signals, computer vision can also be seen as a science that studies how to make artificial systems "perceive" from images or multidimensional data.
[0062] 3) Machine Learning (ML)
[0063] Machine learning is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and teaching learning.
[0064] The medical image classification method provided in the embodiment of the present application can be applied to a computer device with strong data processing capabilities. The medical image classification method can be a method for identifying and classifying features extracted from medical images through a classification network model after training the classification network model. The classification network model can process the input features to obtain image categories corresponding to the input features. In a possible implementation, the medical image classification provided in the embodiment of the present application can be applied to a personal computer, a workstation or a server, that is, the classification network model is trained by at least one of a personal computer, a workstation and a server.
[0065] Figure 1 1 is a schematic diagram of a medical image classification system according to an exemplary embodiment. The image classification system includes a server 110 and a terminal 120. The terminal 120 and the server 110 perform data communication via a communication network, which may be a wired network or a wireless network.
[0066] Optionally, an application with an image processing function is installed in the terminal 120. The application may be a professional image processing application, a social application, a virtual reality application, or an AI application with an image processing function, which is not limited in the embodiments of the present application.
[0067] Optionally, the terminal 120 may be a terminal device having an image acquisition component, which is used to acquire images and store them in a data storage module in the terminal 120; the terminal 120 may also be a terminal device having a data transmission interface, which is used to receive image data acquired by an image acquisition device having an image acquisition component.
[0068] Optionally, the terminal 120 may be a mobile terminal such as a smart phone, a tablet computer, a laptop computer, or the like, or a terminal such as a desktop computer, a projection computer, or an intelligent terminal with a data processing component, and the embodiments of the present application do not impose any restrictions on this.
[0069] The server 110 may be implemented as a single server or a server cluster consisting of a group of servers, which may be a physical server or a cloud server. In a possible implementation, the server 110 is a background server of an application in the terminal 120 .
[0070] In a possible implementation of the embodiment of the present application, the server 110 trains the classification network model through a pre-set training sample set (including each training sample image), wherein the training sample set may contain features extracted from sample medical images of different categories, and each training sample image has its own category annotation information (i.e., label value). After the server 110 completes the training process of the classification network model, the trained classification network model is sent to the terminal 120 via a wired network or a wireless network.
[0071] The terminal 120 receives the trained classification network model and sends the data information (such as weight information) corresponding to the classification network model to an application with recognition and classification functions, so that when the user uses the application, the input features can be recognized and classified.
[0072] Optionally, the above-mentioned server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms and other technical computing services.
[0073] Optionally, the system may further include a management device, which is used to manage the system (such as managing the connection status between each module and the server, etc.), and the management device is connected to the server via a communication network. Optionally, the communication network is a wired network or a wireless network.
[0074] Optionally, the above-mentioned wireless network or wired network uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any other network, including but not limited to any combination of local area network, metropolitan area network, wide area network, mobile, limited or wireless network, private network or virtual private network. In some embodiments, the technology and / or format including hypertext markup language, extensible markup language, etc. are used to represent the data exchanged through the network. In addition, conventional encryption technologies such as secure socket layer, transport layer security, virtual private network, Internet protocol security, etc. can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technology can also be used to replace or supplement the above-mentioned data communication technology.
[0075] Figure 2 is a flowchart of a method for classifying medical images according to an exemplary embodiment. The method is executed by a computer device, which may be Figure 1 The server or terminal in the medical image classification system shown in FIG. Figure 2 As shown, the medical image classification method may include the following steps:
[0076] Step 201 , obtaining a target medical image and a target optical flow video generated by the target medical image.
[0077] In a possible implementation of the embodiment of the present application, the target medical image may be a medical image generated by ultrasound B-mode; or the target medical image may be a medical image of the target area acquired by imaging technology.
[0078] In the medical field, angiography video can dynamically display the blood perfusion of the target area in real time, while ultrasound B-mode can display the echo conditions of various parts of the target area. Both can serve to indicate the condition of the target area (such as lesions).
[0079] In another possible implementation of the embodiment of the present application, the target medical image may be an ultrasound contrast imaging video, which is obtained by simultaneously acquiring an ultrasound B-mode image and a contrast imaging video of the target area.
[0080] In ultrasound contrast-enhanced video, the video is divided into two halves, namely, contrast-enhanced image and B-mode image. That is, the contrast-enhanced image and B-mode image can show the blood perfusion and echo conditions of the target area at a certain moment.
[0081] After acquiring the target medical image, in the embodiment of the present application, the computer device can acquire the target optical flow video corresponding to the target medical image through the target medical image.
[0082] In the field of video processing, optical flow is a common method for capturing motion information in videos. Optical flow is the pattern of apparent motion of image objects between two consecutive frames caused by the movement of objects or cameras. It is a 2D vector field, where each vector is a displacement vector, representing the movement of a point from the first frame to the second frame. The working principle of the optical flow method is based on the following assumptions: the grayscale value of the target pixel remains unchanged between two consecutive frames of images; there is similar motion between adjacent pixels.
[0083] In the embodiment of the present application, the Gunnar Farneback algorithm can be used to calculate the optical flow video corresponding to each video, that is, the video of motion information, so as to obtain the target optical flow video containing each optical flow image. And the pixel size of each video frame in each optical flow image is indicated as the pixel displacement value of the position. Therefore, each video frame in the optical flow image can represent the object motion at the moment corresponding to the video frame.
[0084] Step 202: capture at least two frames of target medical images from the target medical image; capture at least two frames of target optical flow images from the target optical flow video.
[0085] Since the target medical image and the target optical flow video are respectively composed of individual frame images, in order to reduce the computational burden of the computer device, in an embodiment of the present application, at least two frames of target medical images can be captured in the target medical image as images to be identified, and at least two frames of target optical flow images can be captured in the target optical flow video as images to be identified. Under the premise of reducing the computational burden of the computer device, by identifying multiple frames of images, it is ensured that changes in the target area can be noticed during the identification process.
[0086] Step 203: Process the at least two frames of target medical images and the at least two frames of target optical flow images respectively through a feature extraction model to obtain a first image feature and a second image feature.
[0087] After acquiring at least two frames of target medical images and at least two frames of target optical flow images, feature extraction can be performed using feature extraction models to obtain first image features corresponding to the target medical images and second image features corresponding to the target optical flow images.
[0088] At this time, the first image feature represents a set of image features of different target medical images extracted from the perspective of static images at different times; at this time, the second image feature represents a set of image features of different target optical flow images extracted from the perspective of dynamic optical flow at different times.
[0089] Step 204, concatenate the first image feature and the second image feature, and process the concatenated target image feature through a classification network model to obtain a category corresponding to the target medical image.
[0090] At this time, the computer device splices the first image feature and the second image feature to obtain the target image feature. At this time, the target image feature includes the features extracted from the target medical image and the features extracted from the target optical flow image. The target image feature is processed by the classification network model to obtain the category corresponding to the target medical image (for example, whether the target medical image indicates that a lesion has occurred in the target area). This is a result obtained by considering both dynamic features and static features, and has higher classification accuracy.
[0091] In summary, when it is necessary to classify medical images, a target medical image and a target optical flow video generated based on the target medical image can be obtained. The target medical image represents the static features of the human body, while the target optical flow video represents the dynamic features of the human body. At this time, the feature extraction model processes at least two frames of the target medical image and the target optical flow image respectively to obtain the first image feature and the second image feature, so as to perform category analysis through the classification network model. The medical image category analyzed by the above scheme takes into account the static image features and dynamic image features of the human body in the target medical image, thereby improving the category recognition accuracy of the target medical image.
[0092] Figure 3 is a flowchart of a method for classifying medical images according to an exemplary embodiment. The method is executed by a computer device, which may be Figure 1 The server or terminal in the medical image classification system shown in FIG. Figure 3 As shown, the medical image classification method may include the following steps:
[0093] Step 301: Acquire a target medical image and a target optical flow video generated by the target medical image.
[0094] In a possible implementation, the target medical image includes at least one of an ultrasound B-mode image of the target area and a contrast image of the target area.
[0095] Step 302: capture at least two frames of target medical images from the target medical image; capture at least two frames of target optical flow images from the target optical flow video.
[0096] In one possible implementation, when the target medical image includes both an ultrasound B-mode image and a contrast image of the target area, the computer device captures at least two frames of ultrasound B-mode images of the target area and at least two frames of contrast images of the target area from the target medical image.
[0097] Similarly, when the target medical image includes both the ultrasound B-mode image of the target area and the contrast image of the target area, the target optical flow video includes both the optical flow video generated based on the ultrasound B-mode image and the optical flow video generated based on the contrast image. Therefore, the computer device intercepts at least two frames of the target optical flow image generated based on the ultrasound B-mode image from the target optical flow video, and then intercepts at least two frames of the target optical flow image generated based on the contrast image.
[0098] Optionally, the target optical flow image and the target medical image are captured at the same time, that is, the computer device can capture the target medical image and the target optical flow image at a specified number of times in order to ensure the relevance between the data.
[0099] Step 303: Process the at least two frames of target medical images and the at least two frames of target optical flow images respectively through a feature extraction model to obtain a first image feature and a second image feature.
[0100] In one possible implementation, when the target medical image includes both an ultrasound B-mode image of the target area and a contrast image of the target area, the first image feature obtained by performing feature extraction on the target medical image may be a first image feature obtained by merging image features obtained by performing feature extraction on the ultrasound B-mode and image features obtained by performing feature extraction on the contrast image.
[0101] Optionally, the above-mentioned image features may be merged in different dimensions, for example, 100-dimensional image features are merged with 100-dimensional image features into 200-dimensional image features; or the above-mentioned image features may be merged in the same dimension, for example, 1*100 image features are merged with 1*100 image features into 2*100 image features.
[0102] At this time, the second image feature extracted from the target optical flow image can also be obtained by merging the above-mentioned image features. The specific steps are similar to the feature extraction process and image feature merging process of the above-mentioned target medical image, and will not be repeated here.
[0103] In the embodiment of the present application, the feature extraction model is trained before the target optical flow image and the target medical image are recognized, so the feature extraction model can extract features from the target medical image and the target optical flow image. In a possible implementation, the feature extraction model is trained with a natural video training set to obtain a feature extraction model with pre-trained parameters; the natural video data set contains the target training image and the annotation information corresponding to the target training image; the feature extraction model is trained with a medical video training set to obtain the feature extraction model.
[0104] Before training the feature extraction model with the medical video training set, the feature extraction model can be pre-trained with the natural video training set to obtain the pre-training parameters of the feature extraction model, and then the feature extraction model with the pre-training parameters can be re-trained with the medical video training set to obtain the feature extraction model for the target medical image and the target optical flow image, thereby avoiding as much as possible the problem of poor feature extraction ability of the feature extraction model caused by too small a medical training set and too few medical training samples.
[0105] In one possible implementation, when the feature extraction model is a first feature extraction model, the medical video training set includes medical training images and annotation information corresponding to the medical training images; when the feature extraction model is a second feature extraction model, the medical video training set includes optical flow training images and annotation information corresponding to the optical flow training images.
[0106] Correspondingly, the computer device processes the at least two frames of target medical images through the first feature extraction model to obtain the first image feature; and processes the at least two frames of target optical flow images through the second feature extraction model to obtain the second image feature.
[0107] That is, since the image contents of the target optical flow image and the target medical image are obviously quite different, in order to improve the effect of feature extraction, different models can be used to extract features from the target optical flow image and the target medical image respectively. The first feature extraction model for extracting features from the target medical image can be obtained through medical training images and the annotation information corresponding to the medical training images, so the first feature extraction model has a better feature extraction effect on the target medical image; the second feature extraction model for extracting features from the target optical flow image can be obtained through optical flow training images and the annotation information corresponding to the optical flow training images, so the second feature extraction model has a better feature extraction effect on the target optical flow image.
[0108] In one possible implementation, the feature extraction model includes at least two types of candidate feature extraction models; the at least two frames of target medical images and the at least two frames of target optical flow images are processed respectively by each candidate feature extraction model to obtain candidate image features corresponding to each candidate feature extraction model; the candidate image features include first candidate image features and second candidate image features; among each candidate feature extraction model, the feature extraction model is determined, and the first candidate image features and the second candidate image features contained in the candidate image features corresponding to the feature extraction model are determined as the first image features and the second image features.
[0109] That is, in an embodiment of the present application, when performing feature extraction of a target medical image and a target optical flow image, multiple groups of candidate feature extraction models can be used to simultaneously perform feature extraction, and according to the candidate image features extracted by each group of candidate feature extraction models, the final feature extraction model and the corresponding first image features and second image features can be determined.
[0110] In one possible implementation, the information value of the candidate image features corresponding to each candidate feature extraction model is obtained; the correlation coefficients between the candidate image features corresponding to each candidate feature extraction model are compared; among the candidate feature extraction models corresponding to two candidate image features having a correlation coefficient greater than a coefficient threshold, the candidate feature extraction model with a smaller information value of the candidate image feature is discarded to determine the feature extraction model.
[0111] In the present embodiment, an intermediate variable, WOE, is required to calculate the information value. WOE is the basis for calculating the information value. Taking the Tth feature (i.e., the Tth candidate image feature) of the image of 500 cases in the training set as an example, the values of this feature are first sorted from small to large; after sorting, they are divided into several groups. For the i-th group, its WOE value is
[0112]
[0113] # i Indicates the number of malignant images in the i-th group of images, # T Indicates the number of malignant images in the total training set images; # i Indicates the number of benign images in the i-th group of images, # T Represents the number of benign images in the total training set images; so WOE i It represents the difference between "the ratio of malignant images to benign images in the current i-th group" and "the ratio of malignant images to benign images in the total images". The larger the difference, the higher the WOE. i The bigger, otherwise, the smaller.
[0114] With the WOE of group i i Value, the information value IV of the group i The calculation formula is:
[0115]
[0116] With the information value of each group, the information value IV of the Tth feature is calculated as:
[0117]
[0118] Among them, n represents the number of groups. Obviously, the larger the IV is, the more information the feature contains.
[0119] After calculating the information value of each candidate image feature, the correlation coefficient between each candidate image feature is calculated. When the correlation coefficient is greater than the coefficient threshold, it means that the two candidate image features are relatively similar. At this time, the candidate feature extraction model corresponding to the candidate image feature with more information value is retained, and the candidate feature extraction model corresponding to the candidate image feature with less information value is discarded.
[0120] The candidate feature extraction models finally retained can be considered as feature extraction models that can extract features from the target medical image and the target optical flow image.
[0121] In one possible implementation, a logistic regression operation is performed on the candidate image features of each candidate feature extraction model to obtain the logistic regression weights corresponding to each candidate feature extraction model; and a candidate feature extraction model having a logistic regression weight greater than a threshold is determined as the feature extraction model.
[0122] The basic form of logistic regression is to assign different weights W (w1, w2, w3, w4…wn) to an input sample X (x1, x2, x3, x4…xn) to represent the importance of each feature, and then sum up each feature to get X T W and input the sigmoid function to map it to the 0-1 interval to obtain the predicted probability, as shown in the following formula.
[0123]
[0124] In an embodiment of the present application, each candidate image feature is substituted into the above formula, and a gradient descent algorithm is performed on the above formula to determine the weight corresponding to each candidate image feature, that is, the logistic regression weight corresponding to each candidate feature extraction model.
[0125] When the logistic regression weight is greater than the threshold, it means that the correlation of the candidate image features extracted by the candidate feature extraction model is relatively large, and the candidate feature extraction model can be retained as the feature extraction model.
[0126] In a possible implementation, the computer device screens the candidate feature extraction models not only by information value, but also by logistic regression weight. For example, the computer device may first discard a portion of the candidate feature extraction models by correlation coefficient and information value, and then process the candidate image features corresponding to the remaining candidate feature extraction models by logistic regression operation, and finally screen out the feature extraction model for feature extraction of the target medical image and the target optical flow image.
[0127] Step 304, splicing the target image feature with the medical feature, and processing the spliced feature through a classification network model to obtain the category corresponding to the target medical video. The target image feature is obtained by splicing the first image feature with the second image feature.
[0128] The medical feature is obtained by extracting the medical feature image through a medical feature extraction model.
[0129] In a possible implementation of the embodiment of the present application, the classification network model can be a binary classification neural network model, or a traditional machine learning classifier such as SVM, random forest, etc. The embodiment of the present application does not limit the specific structure of the classification network model.
[0130] In an embodiment of the present application, after the target image features obtained by splicing the first image features and the second image features are acquired, they can be spliced again with the pre-acquired medical image features, and the spliced features can be classified by a classification network model.
[0131] For example, the medical image features may include hepatitis features, alpha-fetoprotein features, etc. By splicing the medical image features into the target image features, the classification network model can consider the relationship between the extracted target image features and the newly added medical image features during the classification process, thereby improving the classification ability of the classification network model on medical images.
[0132] Before classifying the spliced features through the classification network model, it is also necessary to splice the sample image features with the medical features and process them through the classification network model to train the classification network model.
[0133] The sample image features may be obtained by extracting features from the sample medical video using the feature extraction model.
[0134] In summary, when it is necessary to classify medical images, a target medical image and a target optical flow video generated based on the target medical image can be obtained. The target medical image represents the static features of the human body, while the target optical flow video represents the dynamic features of the human body. At this time, the feature extraction model processes at least two frames of the target medical image and the target optical flow image respectively to obtain the first image feature and the second image feature, so as to perform category analysis through the classification network model. The medical image category analyzed by the above scheme takes into account the static image features and dynamic image features of the human body in the target medical image, thereby improving the category recognition accuracy of the target medical image.
[0135] Figure 4is a flowchart of a medical image classification method according to an exemplary embodiment. The method is executed by a computer device, which may be Figure 1 The server or terminal in the medical image classification system shown. The medical image classification method may include the following steps:
[0136] In an embodiment of the present application, a computer device stores ultrasound angiography videos of patients collected from multiple hospitals. These videos contain frames that can reflect whether the video is benign or malignant, and also contain frames that have no reference information for judging whether the video is benign or malignant; and the diagnosis results of these cases are confirmed by surgery.
[0137] After getting the ultrasound contrast video, data preprocessing is required first. The specific process is to remove sensitive information that appears in the video, such as hospital information, the name of the examiner, etc.; and because the video is divided into two halves, the contrast and B-mode images, the contrast is on the left and the B-mode is on the right; the contrast video can dynamically display the blood perfusion in real time, and the B-mode image can display the echo of each part of the ultrasound image, both of which can play a role in indicating lesions. The computer equipment cuts out the B-mode part and the contrast part of the video separately, and these two parts of the video form independent videos; the size of these two parts of the video is unified to 224 pixels in length and width, and the original length and width ratio of the image in the video is maintained; because the consecutive frames of the video are very close, in order to reduce the amount of calculation, one frame can be processed every 3 frames.
[0138] In the field of video processing, optical flow is a common method to capture motion information in videos. Computer equipment can use the Gunnar Farneback algorithm to calculate the optical flow video corresponding to each video, that is, the video of motion information. These dynamic optical flow videos and static ultrasound contrast videos will be used as input data for the prediction method. Because the computer equipment will use a 3D neural network for prediction, if the input video segment has a large number of frames, the amount of calculation will be very large, so the computer equipment will divide the video of a complete case into several small segments, each of which contains 16 frames of images. The size of the pixels in each small video segment is normalized to the range of 0 to 1, which is conducive to the convergence of neural network prediction. Finally, the video is divided into a training set and a validation set, waiting to be input into the neural network. The neural network input size is 16 frames*224*224*3. For example Figure 5 As shown, it shows a schematic diagram of a data preprocessing process involved in an embodiment of the present application.
[0139] After the video data is preprocessed, it is input into the neural network. First, the original ultrasound angiography RGB video and the optical flow video of motion information are used as two inputs into N 3D neural networks, such as I3D and CSN networks, to extract features from the video. These neural networks have different focuses, and they calculate different features of ultrasound videos, which will improve the prediction results. This part uses the transfer learning method. Because medical data sets are generally small, the weights of the neural network pre-trained with the natural video data set are used, and then iterative training is performed on the training set for 5000 times. The parameters with the best effect on the validation set are used as the final parameters. The final parameters are used to calculate the features of the neural network in each video. The extracted features are 4*7*7*1024 in size. The 4096 numbers obtained by three-dimensional average pooling are the features of each 3D neural network. The first 2048 features are angiography features, and the last 2048 are B-mode features. When training the above 3D neural networks, simple data enhancement should be performed on the video. When training the above 3D neural networks, if the categories are unbalanced, that is, the malignant samples are much smaller than the benign samples, the predicted probability of malignancy of each sample is manually reduced by 0.1, and the probability of benignity is manually increased by 0.1.
[0140] The above steps extract a total of 4096*N features. These features are screened using different screening methods, including information value, based on the weight of logistic regression, etc. It is found that the most valuable features are almost the same features; the computer device further removes the duplicate features, that is, only one of the features with a high degree of thread correlation is retained. Figure 3 The embodiments shown are similar and will not be described again here.
[0141] Finally, the above streamlined features are integrated with clinical features, and the ultrasound video is classified using a binary neural network or traditional machine learning method. The input of this part is the features calculated above; you can use commonly used and effective traditional machine learning classifiers such as logistic regression, SVM, and random forest. Clinical features include alpha-fetoprotein, hepatitis, etc. For example, the neural network features are not well classified by random forest, but better classified by logistic regression; the features of clinical data are better classified by random forest; and the fused features are better classified by SVM; when using the logistic regression model, you can check the positive and negative of the model coefficients to determine whether they are logical and then adjust them; when training the traditional machine learning classifier, the parameters are grid searched to confirm whether the best parameters searched are reasonable, that is, you can train 4 models for comparison. The main difference between these 4 models is that they use different feature combinations, that is, they use neural network features, neural network features plus hepatitis, neural network features plus alpha-fetoprotein, neural network features plus hepatitis and alpha-fetoprotein to train video classification neural networks; when using traditional machine learning for video classification, the total number of features used cannot be more than the number of training samples.
[0142] Figure 6 1 is a structural block diagram of a graph database updating device according to an exemplary embodiment. The device includes:
[0143] A medical image acquisition module 601 is used to acquire a target medical image and a target optical flow video generated by the target medical image;
[0144] An image capture module 602 is used to capture at least two frames of target medical images from the target medical image; capture at least two frames of target optical flow images from the target optical flow video;
[0145] An image feature acquisition module 603 is used to process the at least two frames of target medical images and the at least two frames of target optical flow images respectively through a feature extraction model to obtain a first image feature and a second image feature;
[0146] The image classification module 604 is used to splice the first image feature and the second image feature, and perform data processing on the spliced target image feature through a classification network model to obtain the category corresponding to the target medical image.
[0147] In a possible implementation, the target medical image includes at least one of an ultrasound B-mode image of the target area and a contrast image of the target area.
[0148] In a possible implementation manner, the device further includes:
[0149] A pre-training module, used to train the feature extraction model through a natural video training set to obtain a feature extraction model with pre-training parameters; the natural video data set includes a target training image and annotation information corresponding to the target training image;
[0150] The feature extraction model training module is used to train the feature extraction model through a medical video training set to obtain the feature extraction model.
[0151] In a possible implementation, when the feature extraction model is the first feature extraction model, the medical video training set includes medical training images and annotation information corresponding to the medical training images;
[0152] When the feature extraction model is the second feature extraction model, the medical video training set includes optical flow training images and annotation information corresponding to the optical flow training images.
[0153] In a possible implementation, the image feature acquisition module is further used to:
[0154] Processing the at least two frames of target medical images by using the first feature extraction model to obtain the first image feature;
[0155] The at least two frames of target optical flow images are processed by the second feature extraction model to obtain the second image features.
[0156] In a possible implementation, the feature extraction model includes at least two types of candidate feature extraction models;
[0157] The image feature acquisition module further includes:
[0158] A candidate image feature acquisition unit, used to process the at least two frames of target medical images and the at least two frames of target optical flow images respectively through respective candidate feature extraction models to obtain candidate image features corresponding to the respective candidate feature extraction models; the candidate image features include first candidate image features and second candidate image features;
[0159] The image feature determination module is used to determine the feature extraction model among various candidate feature extraction models, and determine the first candidate image feature and the second candidate image feature included in the candidate image features corresponding to the feature extraction model as the first image feature and the second image feature.
[0160] In a possible implementation, the image feature determination module is further configured to:
[0161] Obtain information values of candidate image features corresponding to each candidate feature extraction model;
[0162] Comparing the correlation coefficients between the candidate image features corresponding to the respective candidate feature extraction models;
[0163] Among the candidate feature extraction models respectively corresponding to two candidate image features whose correlation coefficients are greater than the coefficient threshold, the candidate feature extraction model with a smaller information value of the candidate image feature is discarded to determine the feature extraction model.
[0164] In a possible implementation, the image feature determination module is further configured to:
[0165] Performing a logistic regression operation on the candidate image features of each candidate feature extraction model to obtain a logistic regression weight corresponding to each candidate feature extraction model;
[0166] A candidate feature extraction model whose logistic regression weight is greater than a threshold is determined as the feature extraction model.
[0167] In a possible implementation, the image classification module is further used to:
[0168] Splicing the target image features with the medical features, and performing data processing on the spliced features through a classification network model to obtain the category corresponding to the target medical video;
[0169] The medical features are obtained by extracting the medical feature images through a medical feature extraction model.
[0170] In summary, when it is necessary to classify medical images, a target medical image and a target optical flow video generated based on the target medical image can be obtained. The target medical image represents the static features of the human body, while the target optical flow video represents the dynamic features of the human body. At this time, the feature extraction model processes at least two frames of the target medical image and the target optical flow image respectively to obtain the first image feature and the second image feature, so as to perform category analysis through the classification network model. The medical image category analyzed by the above scheme takes into account the static image features and dynamic image features of the human body in the target medical image, thereby improving the category recognition accuracy of the target medical image.
[0171] See also Figure 7 , which is a schematic diagram of a computer device provided according to an exemplary embodiment of the present application, the computer device includes a memory and a processor, the memory is used to store a computer program, and when the computer program is executed by the processor, the above method is implemented.
[0172] The processor may be a central processing unit (CPU). The processor 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, or a combination of the above chips.
[0173] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the method in the embodiment of the present invention. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory, that is, implementing the method in the above method embodiment.
[0174] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0175] In an exemplary embodiment, a computer-readable storage medium is also provided, which is used to store at least one computer program, and the at least one computer program is loaded and executed by a processor to implement all or part of the steps in the above method. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0176] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0177] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A medical image classification method, characterized in that: The method comprises: Acquire a target medical image and a target optical flow video generated by the target medical image; Intercepting at least two frames of target medical images from the target medical image; intercepting at least two frames of target optical flow images from the target optical flow video; The at least two frames of target medical images and the at least two frames of target optical flow images are processed respectively by a feature extraction model to obtain a first image feature and a second image feature; splicing the first image feature and the second image feature, and performing data processing on the spliced target image feature through a classification network model to obtain a category corresponding to the target medical image; The feature extraction model includes at least two types of candidate feature extraction models; The step of processing the at least two frames of target medical images and the at least two frames of target optical flow images respectively by using a feature extraction model to obtain a first image feature and a second image feature includes: The at least two frames of target medical images and the at least two frames of target optical flow images are processed respectively by each candidate feature extraction model to obtain candidate image features corresponding to each candidate feature extraction model; the candidate image features include a first candidate image feature and a second candidate image feature; Determine the feature extraction model among the candidate feature extraction models, and determine the first candidate image feature and the second candidate image feature included in the candidate image features corresponding to the feature extraction model as the first image feature and the second image feature; Determining the feature extraction model from among the candidate feature extraction models includes: Obtain information values of candidate image features corresponding to each candidate feature extraction model; Comparing the correlation coefficients between the candidate image features corresponding to the respective candidate feature extraction models; Among the candidate feature extraction models respectively corresponding to two candidate image features whose correlation coefficients are greater than the coefficient threshold, the candidate feature extraction model with a smaller information value of the candidate image feature is discarded to determine the feature extraction model.
2. The method according to claim 1, characterized in that The target medical image includes at least one of an ultrasound B-mode image of a target area and a contrast image of the target area.
3. The method according to claim 2, characterized in that Before the at least two frames of target medical images and the at least two frames of target optical flow images are processed respectively by the feature extraction model, the method further includes: The feature extraction model is trained by a natural video training set to obtain a feature extraction model with pre-trained parameters; the natural video training set includes a target training image and annotation information corresponding to the target training image; The feature extraction model is trained by using a medical video training set to obtain the feature extraction model.
4. The method according to claim 3, characterized in that When the feature extraction model is the first feature extraction model, the medical video training set includes medical training images and annotation information corresponding to the medical training images; When the feature extraction model is the second feature extraction model, the medical video training set includes optical flow training images and annotation information corresponding to the optical flow training images.
5. The method according to claim 4, characterized in that The step of processing the at least two frames of target medical images and the at least two frames of target optical flow images respectively by using a feature extraction model to obtain a first image feature and a second image feature includes: Processing the at least two frames of target medical images by using the first feature extraction model to obtain the first image feature; The at least two frames of target optical flow images are processed by the second feature extraction model to obtain the second image features.
6. The method according to claim 1 or 2, characterized in that: Determining the feature extraction model from among the candidate feature extraction models includes: Performing a logistic regression operation on the candidate image features of each candidate feature extraction model to obtain a logistic regression weight corresponding to each candidate feature extraction model; A candidate feature extraction model whose logistic regression weight is greater than a threshold is determined as the feature extraction model.
7. The method according to any one of claims 1 to 5, characterized in that: The step of processing the spliced target image features through a classification network model to obtain the category corresponding to the target medical image includes: Splicing the target image features with the medical features, and performing data processing on the spliced features through a classification network model to obtain the category corresponding to the target medical image; The medical features are obtained by extracting the medical feature images through a medical feature extraction model.
8. A medical image classification device, characterized in that: The device comprises: A medical image acquisition module, used to acquire a target medical image and a target optical flow video generated by the target medical image; An image capture module, used to capture at least two frames of target medical images from the target medical image; capture at least two frames of target optical flow images from the target optical flow video; An image feature acquisition module, used to process the at least two frames of target medical images and the at least two frames of target optical flow images respectively through a feature extraction model to obtain a first image feature and a second image feature; An image classification module, used for splicing the first image feature and the second image feature, and performing data processing on the spliced target image feature through a classification network model to obtain a category corresponding to the target medical image; The feature extraction model includes at least two types of candidate feature extraction models; The step of processing the at least two frames of target medical images and the at least two frames of target optical flow images respectively by using a feature extraction model to obtain a first image feature and a second image feature includes: The at least two frames of target medical images and the at least two frames of target optical flow images are processed respectively by each candidate feature extraction model to obtain candidate image features corresponding to each candidate feature extraction model; the candidate image features include a first candidate image feature and a second candidate image feature; Determine the feature extraction model among the candidate feature extraction models, and determine the first candidate image feature and the second candidate image feature included in the candidate image features corresponding to the feature extraction model as the first image feature and the second image feature; Determining the feature extraction model from among the candidate feature extraction models includes: Obtain information values of candidate image features corresponding to each candidate feature extraction model; Comparing the correlation coefficients between the candidate image features corresponding to the respective candidate feature extraction models; Among the candidate feature extraction models respectively corresponding to two candidate image features whose correlation coefficients are greater than the coefficient threshold, the candidate feature extraction model with a smaller information value of the candidate image feature is discarded to determine the feature extraction model.
