Liver cancer image classification method and system based on deep learning model
Through the liver cancer image classification method based on deep learning models, two neural network models are used to extract and classify liver cancer images, which solves the problem of insufficient tumor feature recognition and classification accuracy in the prior art, and supports early diagnosis and risk assessment of liver cancer.
Patent Information
- Application Number
- CN202411779671.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-18
AI Technical Summary
The existing image recognition technology lacks the accuracy of the identification and classification of tumor characteristics, making it difficult to effectively support the early diagnosis of liver cancer.
Using a liver cancer image classification method based on deep learning models, tumor features are accurately extracted and automatically identified and classified through two neural network models. The specific steps include: image preprocessing, tumor area segmentation, the first neural network model performs edge recognition and first classification of segmentation tags, and the second neural network model performs deep feature extraction and second classification of malignant tumor areas.
It realizes the accurate identification and classification of liver cancer tumor characteristics, improves the efficiency and accuracy of automated processing of liver cancer images, and supports the early diagnosis and risk assessment of liver cancer.
Smart Images

Figure CN119649129A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a liver cancer image classification method and system based on a deep learning model. Background Art
[0002] Hepatocellular carcinoma (HCC) is a primary liver cancer with a high mortality rate. Intrahepatic cholangiocarcinoma (ICC) is an adenocarcinoma originating from the epithelium of the secondary bile duct and its branches. It is a primary malignant tumor of the liver with an incidence rate second only to hepatocellular carcinoma. Early diagnosis of liver cancer is of great significance for improving patient survival rate, prognosis and reducing medical expenses.
[0003] In recent years, artificial intelligence has developed rapidly and has been applied to tumor differential diagnosis, treatment effect evaluation, and prognosis prediction. Deep learning models can automatically identify and segment medical images and extract image features that cannot be distinguished by the naked eye to classify lesions. However, the existing image recognition technology is not accurate enough in identifying and classifying tumor features. Therefore, it is necessary to design a liver cancer image classification method and system based on deep learning models. Summary of the invention
[0004] The purpose of the present invention is to provide a liver cancer image classification method based on a deep learning model, so as to achieve accurate extraction of tumor features through two neural network models, and to perform automatic identification and classification according to the tumor features.
[0005] To achieve the above object, the present invention provides the following solutions:
[0006] A liver cancer image classification method based on a deep learning model comprises the following steps:
[0007] Acquire the MRI image of the patient, and perform image preprocessing on the MRI image to obtain an original image;
[0008] Segment the tumor area in the original image to obtain a segmentation label;
[0009] Performing edge recognition on the segmentation label through the first neural network model to obtain a recognition result, and performing a first classification on the tumor area according to the recognition result to obtain a first classification result; the first classification result includes a benign tumor area and a malignant tumor area;
[0010] The second neural network model is used to perform deep feature extraction on the malignant tumor area to obtain microvascular features, and the malignant tumor area is subjected to a second classification based on the invasion degree of the microvascular features to obtain a second classification result; the second classification result includes a low-risk area and a high-risk area.
[0011] Optionally, an MRI image of the patient is acquired, and image preprocessing is performed on the MRI image to obtain an original image, including:
[0012] The MRI image is filtered by Gaussian filtering and normalization operations to obtain a filtered image;
[0013] Performing adaptive histogram equalization operation on the filtered image to obtain an enhanced image;
[0014] Resample the enhanced image to obtain the original image;
[0015] Optionally, the tumor area in the original image is segmented to obtain a segmentation label, including:
[0016] Slide the window on the original image to obtain multiple segmentation windows;
[0017] Perform consistency check on the split windows and filter out abnormal windows;
[0018] The abnormal windows are spliced together to obtain segmentation labels.
[0019] Optionally, a consistency check is performed on the split windows to filter out abnormal windows, including:
[0020] Position the split window in space to obtain the window coordinates;
[0021] Calculate the consistency of the split windows, and use the split windows with a consistency higher than the preset threshold as the boundary window; the calculation formula for the consistency is: Among them, S is the consistency, N is the number of pixels in the segmentation window, and x i is the pixel value of the i-th pixel, K1 is a constant, and H is the grayscale dynamic range;
[0022] The segmentation boundary is obtained according to the window coordinates of the boundary window, and the abnormal window is screened out according to the segmentation boundary.
[0023] Optionally, edge recognition is performed on the segmentation label by using a first neural network model to obtain a recognition result, and a first classification is performed on the tumor area according to the recognition result to obtain a first classification result, including:
[0024] The Mask R-CNN network model is used to identify the edge of the tumor area and obtain label features; the label features include: tumor area volume, tumor boundary area, normal tissue volume, tumor area, and tumor area perimeter;
[0025] The discrimination degree is calculated according to the label features, and the discrimination degree is used as the recognition result;
[0026] The tumor area is determined as a benign tumor area or a malignant tumor area according to the degree of distinction.
[0027] Optionally, the calculation formula of the distinctiveness is: Among them, V T is the volume of the tumor area, A T is the tumor boundary area, V N is the volume of normal tissue, A is the area of the tumor area, and P is the perimeter of the tumor area.
[0028] Optionally, deep feature extraction is performed on the malignant tumor region through a second neural network model to obtain microvascular features, and a second classification is performed on the malignant tumor region according to the invasion degree of the microvascular features to obtain a second classification result, including:
[0029] Microvascular features are extracted through the ResNet network model;
[0030] The invasion degree was calculated by microvascular characteristics;
[0031] The malignant tumor area is judged as a low-risk area or a high-risk area according to the degree of invasion.
[0032] Optionally, the calculation formula of the invasion degree is: Among them, I is the invasion degree, B is the number of vascular branches, M1 is the vascular density, and J is the i is the cross-sectional area of the ith blood vessel, v i is the flow velocity of the ith blood vessel, D v is the average diameter of blood vessels, L t L is the length of blood vessels penetrating normal tissues in the tumor area. n is the length of normal tissue blood vessels, L z is the length of blood vessels in the tumor area.
[0033] A liver cancer image classification system based on a deep learning model, comprising:
[0034] Image acquisition module: obtains the patient's MRI image and performs image preprocessing on the MRI image to obtain the original image;
[0035] Image segmentation module: Segment the tumor area in the original image and obtain the segmentation label;
[0036] Tumor recognition module: performing edge recognition on the segmentation label through the first neural network model to obtain a recognition result, and performing a first classification on the tumor area according to the recognition result to obtain a first classification result;
[0037] Tumor classification module: The second neural network model is used to perform deep feature extraction on the malignant tumor area to obtain microvascular features, and the malignant tumor area is classified for the second time according to the invasion degree of the microvascular features to obtain the second classification results.
[0038] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects: the liver cancer image classification method based on the deep learning model provided by the present invention comprises: obtaining the MRI image of the patient, and performing image preprocessing on the MRI image to obtain the original image; segmenting the tumor area in the original image to obtain the segmentation label; performing edge recognition on the segmentation label through the first neural network model to obtain the recognition result, and performing a first classification on the tumor area according to the recognition result to obtain the first classification result; performing deep feature extraction on the malignant tumor area through the second neural network model to obtain the microvascular feature, and performing a second classification on the malignant tumor area according to the invasion degree of the microvascular feature to obtain the second classification result. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0040] Figure 1 A flow chart of a liver cancer image classification method according to an embodiment of the present invention;
[0041] Figure 2 is a preprocessing flow chart of an embodiment of the present invention;
[0042] Figure 3 is an image segmentation flow chart of an embodiment of the present invention;
[0043] Figure 4 This is a first classification flow chart of an embodiment of the present invention;
[0044] Figure 5 This is a second classification flow chart of an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and understandable, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0047] like Figure 1 As shown, an embodiment of the present invention provides a liver cancer image classification method based on a deep learning model, comprising the following steps:
[0048] Step 100: Obtain the MRI image of the patient and perform image preprocessing on the MRI image to obtain the original image; the specific steps are as follows: Figure 2 As shown, including:
[0049] Step 101: filtering the MRI image through Gaussian filtering and normalization operations to obtain a filtered image;
[0050] Specifically, a 5*5 Gaussian kernel is used to perform a convolution operation on the MRI image to obtain a filtered image. The filtered image is then normalized, and the normalization formula is:
[0051] Among them, I norm (x, y) is the normalized pixel value, I(x, y) is the pixel value of the filtered image, and I max and I min are the maximum and minimum pixel values, respectively.
[0052] Step 102: performing an adaptive histogram equalization operation on the filtered image to obtain an enhanced image;
[0053] Specifically, the filtered image is first divided into multiple small blocks (called "grids"), the histogram of each small block is calculated and each small block is equalized, and then the equalized result is interpolated to enhance the image contrast of the filtered image.
[0054] Step 103: resampling the enhanced image to obtain the original image;
[0055] Specifically, this embodiment uses a bilinear interpolation method to resample the enhanced image.
[0056] Step 200: Segment the tumor area in the original image to obtain a segmentation label; the specific steps are as follows: Figure 3As shown, including:
[0057] Step 201: sliding a window on the original image to obtain multiple segmentation windows;
[0058] Specifically, select an appropriate window size (the window size in this implementation is 64×64 pixels). Starting from the upper left corner of the image, slide the window on the original image with a certain step until the sliding path covers the entire image. Extract the corresponding image area at each window position and generate a window list.
[0059] It should be noted that the image is divided into local areas by the window sliding technology, so that subsequent processing can be concentrated on the local areas, thereby improving the detection accuracy.
[0060] Step 202: Perform consistency check on the split windows to filter out abnormal windows;
[0061] Specifically, the segmentation window is first spatially positioned, and each segmentation window is assigned a corresponding window coordinate; then the consistency of the image in each segmentation window is calculated, and the calculation formula is:
[0062]
[0063] Among them, S is the consistency, N is the number of pixels in the segmentation window, and x i is the pixel value of the i-th pixel, K1 is a constant, and H is the grayscale dynamic range. Then, the segmentation windows with consistency higher than the preset threshold are selected through the Z-score statistical method and used as boundary windows. Finally, the window coordinates of the boundary windows are spatially connected to obtain the closed space of the tumor area segmentation boundary, and all segmentation windows whose window coordinates are within the closed space are selected as abnormal windows.
[0064] Step 203: Reconstruct the image according to the spatial coordinates of the abnormal window, and use the nearest neighbor interpolation method to splice the abnormal window back to the original image to obtain a segmentation label with the same size as the original image.
[0065] It should be noted that the segmentation process can effectively extract key features from the original image and perform segmentation, and improve the comprehensiveness of detection through the window sliding algorithm. The consistency detection is used to ensure that the screened data is more reliable. Finally, precise labeling is achieved through the spliced labels, thereby enhancing the accuracy and efficiency of image processing.
[0066] Step 300: Perform edge recognition on the segmentation label through the first neural network model to obtain a recognition result, and perform a first classification on the tumor area according to the recognition result to obtain a first classification result; the first classification result includes a benign tumor area and a malignant tumor area; the specific steps are as follows Figure 4 As shown, including:
[0067] Step 301: Identify the edge of the tumor region through the Mask R-CNN network model and obtain label features; the label features include: tumor region volume, tumor boundary area, normal tissue volume, tumor region area and tumor region perimeter;
[0068] Specifically, the Mask R-CNN network model includes a convolutional neural network (CNN) and a region proposal network (RPN). The Mask R-CNN network model extracts features through CNN and detects objects through RPN to generate a mask of the tumor area.
[0069] More specifically, the Mask R-CNN network model is trained using real labeled data from a medical image dataset in the process of generating tumor region masks, and the network weights are updated through forward propagation and back propagation during the training process.
[0070] Furthermore, the volume of the tumor region is obtained by multiplying the voxel volume by the number of pixels in the mask. The mask is contour detected using OpenCV's cv2.findContours function to obtain the tumor boundary area. The tumor region area is determined by the number of pixels in the mask. The normal tissue volume is obtained by subtracting the tumor region volume from the total image volume, and the tumor region perimeter is calculated using OpenCV's cv2.arcLength function.
[0071] Step 302: Calculate the degree of distinction based on the label features, and use the degree of distinction as the recognition result;
[0072] Specifically, the calculation formula of the distinction is:
[0073]
[0074] Among them, V T is the volume of the tumor area, A T is the tumor boundary area, V N is the normal tissue volume, A is the tumor area, and P is the perimeter of the tumor area. The discrimination is limited to the range of [0,1] through normalization. The larger the discrimination, the more irregular the edge of the tumor area and the less clear the boundary.
[0075] Step 303: Determine the tumor region as a benign tumor region or a malignant tumor region according to the degree of distinction.
[0076] Specifically, the threshold of the discrimination degree is set according to clinical standards, and this embodiment does not limit it. If the discrimination degree is less than the discrimination degree threshold, the tumor region is determined as a benign tumor region; if the discrimination degree is greater than or equal to the discrimination degree threshold, the tumor region is determined as a malignant tumor region.
[0077] It should be noted that the deep learning model is used to detect and determine the tumor area, which realizes the automated processing of medical images and improves the efficiency and accuracy of recognition. The combination of multiple label features as the basis for judgment optimizes the judgment criteria, ensures the consistency and scientificity of the results, and provides reliable support for clinical decision-making. In addition, the threshold setting of the judgment process is based on clinical standard settings, which enhances its clinical applicability and makes the assessment of benign and malignant tumors more accurate.
[0078] Step 400: Perform deep feature extraction on the malignant tumor region through the second neural network model to obtain microvascular features, and perform a second classification on the malignant tumor region according to the invasion degree of the microvascular features to obtain a second classification result; the second classification result includes a low-risk area and a high-risk area. Figure 5 As shown, including:
[0079] Step 401: extracting microvascular features through a ResNet network model;
[0080] Specifically, the image of the malignant tumor area is standardized through the input layer of the ResNet network model, and the image size is adjusted to 224×224 pixels. The feature map is obtained by extracting features through the built-in residual block. Then the average pooling operation is used to reduce the size of the feature map to achieve data dimensionality reduction and reduce the complexity of calculation. Finally, the built-in softmax activation function is used to complete the classification task and obtain the microvascular features.
[0081] Step 402: Calculate the invasion degree through microvascular characteristics;
[0082] Specifically, the calculation formula of the invasion degree is: Among them, I is the invasion degree, B is the number of vascular branches, M1 is the vascular density, and J is the i is the cross-sectional area of the ith blood vessel, v i is the flow velocity of the ith blood vessel, D v is the average diameter of blood vessels, L t L is the length of blood vessels penetrating normal tissues in the tumor area. n is the length of normal tissue blood vessels, L z is the length of blood vessels in the tumor area.
[0083] Step 403: Determine the malignant tumor region as a low-risk region or a high-risk region according to the invasion degree.
[0084] Specifically, the invasion degree threshold is determined based on historical case data and expert opinions, and this embodiment does not limit it. If the invasion degree is less than the invasion degree threshold, the malignant tumor area is determined as a low-risk area; if the invasion degree is greater than or equal to the invasion degree threshold, the malignant tumor area is determined as a high-risk area.
[0085] It should be noted that the method of combining deep learning technology with traditional machine learning methods has achieved the extraction of microvascular features and the quantification of invasion, effectively improving the accuracy of malignant tumor risk assessment and providing a scientific basis for doctors' diagnosis and treatment. In addition, through risk grading, the effective identification of high-risk and low-risk areas makes the allocation of treatment resources more reasonable, maximizing patient safety and medical quality.
[0086] The embodiment of the present invention further provides a liver cancer image classification system based on a deep learning model, comprising:
[0087] An image acquisition module is used to obtain the patient's MRI image and perform image preprocessing on the MRI image to obtain an original image;
[0088] An image segmentation module is used to segment the tumor area in the original image and obtain a segmentation label;
[0089] A tumor recognition module is used to perform edge recognition on the segmentation label through a first neural network model to obtain a recognition result, and to perform a first classification on the tumor area according to the recognition result to obtain a first classification result;
[0090] The tumor classification module is used to perform deep feature extraction on the malignant tumor area through the second neural network model to obtain microvascular features, and perform a second classification on the malignant tumor area according to the invasion degree of the microvascular features to obtain a second classification result.
[0091] The beneficial effects of the present invention are as follows:
[0092] 1) The comprehensiveness of detection is improved through the window sliding algorithm, thereby enhancing the accuracy and efficiency of image processing;
[0093] 2) Detect and determine the tumor area through deep learning models, realize the automatic processing of medical images, and improve the efficiency and accuracy of recognition;
[0094] 3) The accuracy of malignant tumor risk assessment is effectively improved by extracting microvascular characteristics and quantifying the degree of invasion.
[0095] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0096] The present invention uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only used to help understand the method and core ideas of the present invention. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A liver cancer image classification method based on a deep learning model, characterized in that: The steps include: Acquire an MRI image of a patient, and perform image preprocessing on the MRI image to obtain an original image; Segmenting the tumor area in the original image to obtain a segmentation label; Performing edge recognition on the segmentation label through a first neural network model to obtain a recognition result, and performing a first classification on the tumor region according to the recognition result to obtain a first classification result; the first classification result includes a benign tumor region and a malignant tumor region; The malignant tumor area is subjected to deep feature extraction through a second neural network model to obtain microvascular features, and the malignant tumor area is subjected to a second classification according to the invasion degree of the microvascular features to obtain a second classification result; the second classification result includes a low-risk area and a high-risk area.
2. The method for liver cancer image classification based on deep learning model according to claim 1, characterized in that: Acquiring an MRI image of a patient and performing image preprocessing on the MRI image to obtain an original image includes: Performing filtering processing on the MRI image through Gaussian filtering and normalization operations to obtain a filtered image; Performing an adaptive histogram equalization operation on the filtered image to obtain an enhanced image; A resampling operation is performed on the enhanced image to obtain the original image.
3. The method for liver cancer image classification based on deep learning model according to claim 1, characterized in that: Segmenting the tumor area in the original image to obtain a segmentation label includes: Sliding a window on the original image to obtain a plurality of segmented windows; Performing consistency detection on the split windows to filter out abnormal windows; The abnormal windows are spliced to obtain the segmentation label.
4. The method for liver cancer image classification based on deep learning model according to claim 3, characterized in that: Performing consistency check on the split windows to filter out abnormal windows includes: Positioning the split window in space to obtain window coordinates; The consistency of the split windows is calculated, and the split windows whose consistency is higher than a preset threshold are used as boundary windows; the calculation formula of the consistency is: Among them, S is the consistency, N is the number of pixels in the segmentation window, and x i is the pixel value of the i-th pixel, K1 is a constant, and H is the grayscale dynamic range; A segmentation boundary is obtained according to the window coordinates of the boundary window, and the abnormal window is screened out according to the segmentation boundary.
5. The method for liver cancer image classification based on deep learning model according to claim 1, characterized in that: Performing edge recognition on the segmentation label by using a first neural network model to obtain a recognition result, and performing a first classification on the tumor region according to the recognition result to obtain a first classification result, including: The edge of the tumor region is identified by the Mask R-CNN network model, and label features are obtained; the label features include: tumor region volume, tumor boundary area, normal tissue volume, tumor region area and tumor region perimeter; Calculate the degree of distinction according to the label features, and use the degree of distinction as the recognition result; The tumor region is determined as the benign tumor region or the malignant tumor region according to the magnitude of the distinction.
6. The method for liver cancer image classification based on deep learning model according to claim 5, characterized in that: The calculation formula of the distinction is: Among them, V T is the volume of the tumor area, A T is the tumor boundary area, V N is the volume of normal tissue, A is the area of the tumor area, and P is the perimeter of the tumor area.
7. The method for liver cancer image classification based on deep learning model according to claim 1, characterized in that: The second neural network model is used to perform deep feature extraction on the malignant tumor region to obtain microvascular features, and the malignant tumor region is secondly classified according to the invasion degree of the microvascular features to obtain a second classification result, including: Extracting the microvascular features through a ResNet network model; The invasion degree is obtained by calculating the microvascular characteristics; The malignant tumor area is determined as a low-risk area or a high-risk area according to the invasion degree.
8. The method for liver cancer image classification based on deep learning model according to claim 7, characterized in that: The calculation formula of the violation degree is: Among them, I is the invasion degree, B is the number of vascular branches, M1 is the vascular density, and J is the i is the cross-sectional area of the ith blood vessel, v i is the flow velocity of the ith blood vessel, D v is the average diameter of blood vessels, L t L is the length of blood vessels penetrating normal tissues in the tumor area. n is the length of normal tissue blood vessels, L z is the length of blood vessels in the tumor area.
9. A liver cancer image classification system based on a deep learning model, characterized in that: include: Image acquisition module: acquires the patient's MRI image and performs image preprocessing on the MRI image to obtain the original image; Image segmentation module: segmenting the tumor area in the original image to obtain a segmentation label; Tumor recognition module: performing edge recognition on the segmentation label through a first neural network model to obtain a recognition result, and performing a first classification on the tumor area according to the recognition result to obtain a first classification result; Tumor classification module: perform deep feature extraction on the malignant tumor area through a second neural network model to obtain microvascular features, and perform a second classification on the malignant tumor area according to the invasion degree of the microvascular features to obtain a second classification result.