Breast cancer ultrasonic image feature recognition and classification method based on artificial intelligence algorithm

Through the improved YOLOV8m-cls model and gradient enhancement tree classifier, combined with dynamic convolution DYC and median filtering technology, the characteristics of breast cancer ultrasound images were extracted, and the problem of low classification accuracy of breast cancer ultrasound images in the prior art was solved, achieving a more efficient and comprehensive breast cancer diagnosis.

CN120198729APending Publication Date: 2025-06-24CHONGQING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510271878.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

The existing breast cancer ultrasound image classification model has low accuracy and cannot provide sufficient analysis results, especially in areas where computing resources are limited, real-time and comprehensiveness are insufficient.

Method used

Using the improved YOLOV8m-cls model and gradient lifting tree classifier, the benign and malignant characteristics and BIRADS classification characteristics of breast cancer ultrasound images were extracted, and feature fusion was performed to construct a GBDT classification model.

Benefits of technology

It improves the classification and recognition accuracy of breast cancer ultrasound images, enhances the real-time and comprehensiveness of the model, and can run efficiently on devices with limited computing resources, providing more accurate and comprehensive analysis results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120198729A_ABST
    Figure CN120198729A_ABST
Patent Text Reader

Abstract

The invention provides a breast cancer ultrasonic image feature recognition and classification method based on an artificial intelligence algorithm, and the method comprises the steps: firstly, obtaining a breast cancer ultrasonic image and the annotation features of the breast cancer ultrasonic image; secondly, preprocessing the obtained image data set, including data denoising, contrast enhancement, image standardization processing and data enhancement, and then dividing the image data set into a training set, a verification set and a test set; then, a recognition and classification network based on improved YOLOV8m-cls is built, and models used for recognizing benign and malignant features and BIRADS classification features respectively are trained; and finally, the recognition features and the classification features extracted from the ultrasonic image are fused to obtain fusion features, a gradient boosting tree classification model is constructed to obtain a trained breast cancer classification model, and the breast cancer recognition and classification model is based on the input ultrasonic image. Four recognition features and classification results of the breast cancer are output for reference of doctors, personalized diagnosis and treatment schemes are customized, classification and recognition precision is improved, and real-time performance and comprehensiveness are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This patent relates to the field of medical image assisted recognition and analysis, and specifically relates to a method for classifying breast cancer ultrasound images based on multi-feature fusion using artificial intelligence algorithms. Background Art

[0002] Breast cancer is a malignant tumor that exists widely globally, especially among the female population. Its incidence rate remains high, becoming one of the important diseases threatening women's health. In China, due to the large population base, the incidence rate of breast cancer in women shows an increasing trend. At the same time, with the change of people's lifestyle and the increase of pressure, the number of young female breast cancer patients is also increasing. Therefore, improving the screening ability of breast cancer is of crucial significance for the prevention and treatment of breast cancer. Breast ultrasound image diagnosis is a widely used means for breast cancer diagnosis. It has the advantages of non-invasive, painless, non-radiative, high resolution, etc., and has a wide application range, being suitable for women of all ages. In addition, the cost of breast ultrasound image diagnosis is relatively low, making it easier to popularize and promote. Therefore, it has become one of the commonly used breast cancer diagnosis methods in clinical practice. However, traditional breast ultrasound image diagnosis relies on doctors' subjective judgment and experience, and is prone to misdiagnosis and missed diagnosis. Especially when faced with a large number of patients, doctors' energy is easily dispersed, which may lead to deviations in the diagnosis results. To solve this problem, with the continuous development of artificial intelligence technology, artificial intelligence assisted breast cancer diagnosis systems have emerged.

[0003] Artificial intelligence assisted breast cancer diagnosis systems use technologies such as deep learning and image processing to automatically analyze and identify breast ultrasound images. Its recognition accuracy has reached the level of professional doctors, which can effectively improve the accuracy and efficiency of breast cancer diagnosis. In addition, this system can also achieve remote diagnosis and treatment, providing high-quality medical services for remote areas and areas with scarce medical resources.

[0004] Currently, there are the following limitations in breast cancer classification based on artificial intelligence algorithms:

[0005] Due to technical limitations, there are various interference factors such as noise and artifacts in breast ultrasound images. At the same time, breast tumors are relatively similar to surrounding tissues, which may lead to false detection or missed detection, making the current deep learning algorithms have low accuracy in classification and recognition.

[0006] In remote areas with relatively backward medical technology, the computing resources are limited. When using network models with large numbers of parameters and deeper depths, such as YOLOV8 l, Resnet101, etc., the real-time performance cannot be satisfied.

[0007] Doctors need to view ultrasound images during diagnosis to identify multiple benign and malignant features, and classify them according to the number and severity of their malignant features using the Breast Imaging Reporting and Data System (BIRADS), providing personalized treatment plans for patients. However, existing breast cancer classification models can only classify breast tumors into simple categories of benign, malignant, and normal, and cannot provide doctors with more refined analysis results. Therefore, there is an urgent need for a method for identifying and classifying breast cancer ultrasound image features based on artificial intelligence algorithms to solve the problems of inaccurate and incomplete analysis results. Summary of the Invention

[0008] Based on this, the present invention provides a method for identifying and classifying breast cancer ultrasound image features based on artificial intelligence algorithms to improve the accuracy of classification and recognition, as well as real-time performance and comprehensiveness.

[0009] To achieve the above objectives, the present invention provides a method for identifying and classifying breast cancer ultrasound image features based on artificial intelligence algorithms, including the following steps:

[0010] S100. Obtain breast cancer ultrasound images and their labeled features;

[0011] S200. Preprocess the obtained image dataset, including data denoising, contrast enhancement, image normalization, and data augmentation, and then divide it into a training set, a validation set, and a test set;

[0012] S300. Build an identification and classification network based on the improved YOLOV8m-cls, and train models for identifying benign and malignant features, as well as BIRADS classification features;

[0013] S400. Fuse the recognition features and classification features extracted from the ultrasound images to obtain fused features, construct a Gradient Boosting Decision Tree (GBDT) classification model, and obtain a trained breast cancer classification model. The breast cancer recognition and classification model, based on the input ultrasound image, outputs four recognition features and classification results of breast cancer for doctors' reference to customize personalized treatment plans.

[0014] Furthermore, for preprocessing the dataset, median filtering is used for data denoising. Select the neighboring region of a certain pixel point in the image, sort the gray values within this region, and then select the median value as the gray value of the new window. Its calculation formula is as follows:

[0015] g(x,y) = med{f(x - m,y - n),(m,n ∈ w)} (1)

[0016] Wherein, f(x, y) represents the original image, g(x, y) represents the image after median processing, and w represents an optional range.

[0017] Furthermore, preprocess the dataset, use histogram equalization method for contrast enhancement, generate a new image by mapping the pixel values of the original image to new pixel values, and the distribution function of the equalized histogram presents in the form of a linear function, satisfying the form: F y (s) = sK.

[0018] Furthermore, construct an improved YOLOV8m-cls model, which includes two parts: a backbone network and a classification head:

[0019] The backbone network from top to bottom includes: the first and second CBS modules, the first C2f_DGhost module, the third CBS module, the second C2f_DGhost module, the fourth CBS module, the third C2f_DGhost module, the fifth CBS module, and the fourth C2f_DGhost module;

[0020] The CBS module is composed of a common convolution Conv2d, a BatchNorm layer, and a SiLU activation function, and its formula is as follows:

[0021] output(x) = SiLU(BatchNorm(Conv 3×3 (x))) (2)

[0022] In the formula, Conv 3×3 represents that a convolution operation is performed using a 3×3 convolution kernel;

[0023] The C2f_DGhost module is optimized and improved based on the C2f module in the original model, and the Bottleneck module in the original C2f module is replaced with a DGhost_Module module;

[0024] The DGhost_Module module is based on the Ghost module and adopts a dynamic convolution DYC module;

[0025] The Ghost module first passes through a convolution layer to obtain an intermediate feature map, and then through a series of linear operations to generate the remaining s ghost features that need to be stitched together, and the formula is as follows:

[0026] y ij = Φ i,j (y′ i ) (3)

[0027] In the formula, j = 1,..., s represents the jth ghost feature, y′i represents the i-th intermediate feature map mapping, Φ i,j represents linear operation, y ij Represents the output after linear operation;

[0028] The dynamic convolution DYC learns a specific convolution kernel parameter for each sample, breaks the traditional static convolution characteristics by inputting and calculating the convolution kernel parameters, and obtains the convolution kernel parameters and their output through the following formula:

[0029] output(x)=σ((α1W1+...α n W n )*x) (4)

[0030] In the formula, x is the output of the previous layer, n means that there are n experts in this layer, σ represents the activation function, and α=r(x) is a sample-dependent weighted parameter, which is calculated as follows:

[0031] r(x)=sigmoid(GAP(x)R) (5)

[0032] In the formula, firstly, the input is subjected to global average pooling GAP, then right-multiplied by a matrix R to map its dimensions to n experts, and finally the weights on each dimension are reduced to the range of 0 to 1 through the sigmoid function;

[0033] The classification head is connected to the output end of the fourth C2f_DGhost module of the backbone network, and the classification head is used to recognize and classify the feature map extracted by the backbone network, so as to recognize four types of benign and malignant features of breast ultrasound images and BIRADS classification features.

[0034] Furthermore, the C2f_DGhost module first uses the CBS module to perform the first convolution, and then divides the output into two parts through the Split structure, one part is directly connected to the output for the final splicing, and the other part is processed by multiple Bottleneck modules. Such a branch structure helps to increase the nonlinear ability and representation ability of the network, thereby improving the network's modeling ability for complex data; the bottleneck structure uses a Ghost module improved by dynamic convolution (Dynamic Convolution, DYC), and after multiple convolutions through the DGhost_Module module, the feature map is spliced ​​in the channel dimension, and the spliced ​​feature map is convolved for the last time to obtain the final extracted feature map.

[0035] Furthermore, the cross entropy loss function is used to measure the gap between the category distribution predicted by the model and the actual label. The calculation formula is expressed as:

[0036]

[0037] where y o,c is an indicator, which is 1 if the sample o belongs to the class c, and 0 otherwise, and p o is the probability that the model predicts that the sample o belongs to the class c;

[0038] Input the training set into the improved network model for forward propagation training, and use the backpropagation algorithm for update and optimization. Through multiple iterations of training with cross-entropy loss and the AdamW optimizer until the model converges, the best training weights are obtained after multiple rounds of training.

[0039] Furthermore, build a gradient boosting tree model and perform network optimization. The extracted benign and malignant recognition features and classification recognition features are directly concatenated to obtain fused features. In order to make the model weight distribution more uniform and avoid the excessive influence of classification features on the results, the steps are as follows:

[0040] First, perform regularization on the features. The regularization formula is as follows:

[0041]

[0042] where x ij is the initial fused feature; i is the number of rows, representing the i-th sample; j is the number of columns, representing the j-th feature; d ij is the regularized data;

[0043] Then, perform data preprocessing: input the fused features into the gradient boosting tree model for training;

[0044] Then, create a model.

[0045] Furthermore, use the GBDT algorithm to predict the results. By combining multiple decision trees, the prediction performance is improved. Each decision tree focuses on predicting different parts of the data, and the final prediction result is generated by accumulating the outputs of all the trees. The algorithm process is as follows:

[0046] First, initialize the model F0(x), select a constant c to minimize the loss function at this time. Since it is a multi-classification problem, the loss function used here is the cross-entropy loss:

[0047]

[0048] Then, gradually add decision trees. For each step m = 1,..., M, perform the following operations:

[0049] Calculate the residual r im :

[0050]

[0051] Use the residual r im As the target value, train a new decision tree h m (x) and update the model:

[0052]

[0053] F m (x) = F m-1 (x) + ηh m (x) (11)

[0054] In the formula, η represents the learning rate, which controls the contribution of each tree to the final model;

[0055] Finally, after M iterations, form the final prediction model:

[0056]

[0057] Furthermore, the grid search method is used for hyperparameter optimization. First, preset the value range of the parameters, divide this range into several grid points, and then traverse these grid points to find the optimal parameter combination. Set the parameter space and optimize with the five-fold cross-validation accuracy as the standard. The formula is as follows:

[0058]

[0059] In the formula, acc i represents the accuracy of the i-th validation, and ACC represents the average of the five accuracies.

[0060] Furthermore, optimize the model:

[0061] Through grid method parameter optimization, obtain the optimal breast cancer BIRADS classification model. The performance is evaluated using common evaluation indicators for medical images. Select accuracy, precision, recall, and F1-score to evaluate the test set. The calculation formulas for the verification indicators are as follows:

[0062]

[0063] In the formula, TP represents the number of positive classes predicted as positive classes, that is, the number of correctly predicted breast cancer samples, TN represents the number of negative class samples predicted as negative classes, FP represents the number of negative classes predicted as positive classes, that is, the number of samples that identify non-breast cancer of this class as this class, and FN represents the number of positive classes predicted as negative classes, that is, the number of incorrectly predicted breast cancer samples.

[0064] Compared with the prior art, the beneficial technical effects of the present invention:

[0065] The present invention designs an improved YOLOV8m-cls model for the recognition and classification of benign and malignant features of breast cancer ultrasound images. The C2f module of the baseline model is replaced with the C2f_DGhost module improved by dynamic convolution DYC. DYC can dynamically select which convolution kernel to use according to the input characteristics, significantly increasing the number of model parameters with minimal computational cost, improving the accuracy and generalization ability of the model. The Ghost module can enhance the performance of the network with minimal increase in floating-point operations. This method can efficiently run the model on devices with limited computing resources and has good application value in areas with limited medical equipment.

[0066] The present invention designs a GBDT classification model combining multiple features, fusing the benign and malignant recognition features and classification recognition features extracted from breast cancer ultrasound images, and training the optimal gradient boosting tree classification model using the grid search method, providing explanatory analysis data and more comprehensive and accurate analysis results for doctors. Brief Description of the Drawings

[0067] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0068] Figure 1 is a flowchart of breast cancer ultrasound image recognition and BIRADS classification based on multiple features;

[0069] Figure 2 is a schematic diagram of the improved YOLOV8m-cls model;

[0070] Figure 3 is a schematic diagram of the feature annotation of some breast cancer ultrasound images;

[0071] Figure 4 is a schematic diagram of the training process of the gradient boosting tree classification network. Detailed Embodiments

[0072] To solve the above problems, the present invention provides a method for breast cancer ultrasound image recognition and classification based on artificial intelligence algorithms. By using an improved YOLOV8m-cls model and a gradient boosting tree classifier, the model can recognize the benign and malignant features of breast tumors and combine classification features for BIRADS classification.

[0073] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. The description of the exemplary embodiments is merely illustrative and in no way limits the disclosure, its application, or its use. The present disclosure can be implemented in many different forms and is not limited to the embodiments described herein. These embodiments are provided to make the present disclosure thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0074] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, as Figure 1 shown.

[0075] The invention provides a breast cancer ultrasound image recognition and classification method based on an artificial intelligence algorithm. The steps include:

[0076] S100. Obtain breast cancer ultrasound images and their annotation features;

[0077] S200. Preprocess the obtained image dataset, including data denoising, contrast enhancement, image normalization processing, and data augmentation, and then divide it into a training set, a validation set, and a test set;

[0078] S300. Build an identification and classification network based on the improved YOLOV8m-cls, and train models for identifying benign and malignant features and BIRADS classification features respectively;

[0079] S400. Fuse the recognition features and classification features extracted from the ultrasound images to obtain fused features, construct a Gradient Boosting Decision Tree (GBDT) classification model, and obtain a trained breast cancer classification model. The breast cancer recognition and classification model, based on the input ultrasound image, outputs four recognition features and classification results of breast cancer for doctors' reference to customize personalized diagnosis and treatment plans.

[0080] First, data acquisition and its annotation.

[0081] In an alternative embodiment of the present invention, as Figure 3 shown, the breast cancer BIRADS dataset was sorted out, and a total of 2501 breast cancer ultrasound images and their annotation features were obtained. The images are three-channel RGB images. Due to the influence of various factors such as medical equipment and environment, the obtained breast cancer ultrasound images exist in two formats, PNG and JPG, with inconsistent sizes. Therefore, they need to be read and adjusted separately, and there are artifacts and noises, which increase a certain degree of difficulty for the recognition and classification of breast cancer.

[0082] BIRADS classification is a standardized breast cancer screening and diagnosis tool. It is widely used in various imaging techniques, including mammography, ultrasound, magnetic resonance imaging, and breast biopsy. BIRADS classification can help doctors accurately evaluate the risk and nature of breast lesions, thus guiding patients to receive the most appropriate treatment plan. BIRADS classification divides breast imaging results into seven grades, from grade 0 to grade 6, and each grade corresponds to specific lesion characteristics and diagnostic suggestions. Specifically, grade 0 means further examinations are needed to determine the nature of the lesion; grade 1 means the breast is normal; grade 2 means a benign lesion; grade 3 means there may be a benign or malignant lesion and further evaluation is required; grade 4 (4a, 4b, 4c) means a highly suspected malignant lesion and biopsy is needed to confirm; grade 5 means a confirmed malignant lesion and immediate further treatment and evaluation are required; grade 6 means a malignant lesion with distant metastasis has occurred. Through BIRADS classification, doctors can more accurately judge the benign or malignant nature of breast lesions, provide personalized treatment plans for patients, and thus improve the early diagnosis rate and cure rate of breast cancer.

[0083] In this embodiment, four types of feature states, namely orientation, margin, calcification, and shape, are provided. The benign features are respectively manifested as: parallel, smooth, with calcification, and regular. The malignant features are respectively manifested as: non-parallel, non-smooth, without calcification, and irregular. And there are 6 classification categories based on BIRADS rules, including: category 2, category 3, category 4a, category 4b, category 4c, and category 5, with the degree of malignancy increasing in turn.

[0084] Then, preprocessing of the data.

[0085] In an alternative embodiment of the present invention, in step 2, the size of the acquired breast ultrasound images is unified to 224×224.

[0086] Preprocess the data set. Median filtering is used for data denoising, and histogram equalization method is used for contrast enhancement to solve the problems of unclear ultrasound images and containing artifacts, and improve the image quality.

[0087] Median filtering is a non-linear signal processing technology based on sorting statistical theory, which can effectively suppress noise. Its working principle is to select the adjacent area of a certain pixel point in the image, sort the gray values in this area, and then select the median value as the gray value of the new window. In this way, isolated noise points can be eliminated and the pixel values can be closer to the actual values. Its calculation formula is as follows:

[0088] g(x,y) = med{f(x - m,y - n),(m,n∈w)} (1)

[0089] In the formula, f(x,y) represents the original image, g(x,y) represents the image after median processing, and w represents the optional range.

[0090] Histogram equalization is an image processing method that generates a new image by mapping the pixel values ​​of the original image to new pixel values. The histogram of this new image is characterized by the same number of pixels at each gray level. This conversion process is called histogram equalization, which requires that the distribution function of the equalized histogram be in the form of a linear function, that is, satisfying the form: F y (s) = sK.

[0091] Preprocessing of the acquired breast cancer ultrasound images, including denoising, contrast enhancement, image standardization and data enhancement, can improve the classification and recognition accuracy of the deep learning model;

[0092] Image Processing:

[0093] In Python, use cv2.medianBlur() and cv2.equalizeHist() to perform median denoising and histogram equalization respectively.

[0094] The images after denoising and contrast enhancement were enhanced by data enhancement, and the dataset was expanded by random horizontal and vertical flipping, color jittering, brightness adjustment, random cropping and mosaic enhancement. The less malignant samples were oversampled to solve the data imbalance problem. The processed dataset was divided into training set, validation set and test set in a ratio of 7:2:1.

[0095] Divide the dataset:

[0096] In Python, we use the train_test_split() function in the sklearn.model_selection library. First, we set test_size = 0.3 and design the random seed random_state = 1412 to ensure that the results of each division remain consistent, so that we can compare and tune the model later. The model is divided into a training set and a validation set, and then the validation set is divided into a validation set and a test set in a ratio of 2:1.

[0097] Then, build the improved YOLOV8m-cls model.

[0098] In an optional embodiment of the present invention, Figure 2 As shown in the figure, an improved YOLOV8m-cls model is constructed, which mainly consists of two parts: the backbone network and the classification head.

[0099] The backbone network from top to bottom includes: the first and second CBS modules, the first C2f_DGhost module, the third CBS module, the second C2f_DGhost module, the fourth CBS module, the third C2f_DGhost module, the fifth CBS module, and the fourth C2f_DGhost module.

[0100] The CBS module is composed of a common convolution Conv2d, a BatchNorm layer, and a SiLU activation function, and its formula is as follows:

[0101] output(x) = SiLU(BatchNorm(Conv 3×3 (x))) (2)

[0102] In the formula, Conv 3×3 represents that a convolution operation is performed using a 3×3 convolution kernel.

[0103] The C2f_DGhost module is optimized and improved based on the C2f module in the original model, and the Bottleneck module in the original C2f module is replaced with the DGhost_Module module.

[0104] The C2f_DGhost module first uses the CBS module for the first convolution, and then divides the output into two parts through the Split structure. One part is directly connected to the output for the final splicing, and the other part is processed through multiple Bottleneck modules. Such a branch structure helps to increase the network's non-linear ability and representation ability, thereby improving the network's modeling ability for complex data. The bottleneck structure uses a Ghost module improved by dynamic convolution (DynamicConvolution, DYC). After multiple convolutions through the DGhost_Module module, feature maps are spliced in the channel dimension, and a final convolution is performed on the spliced feature maps to obtain the final extracted feature maps.

[0105] The DGhost_Module module is based on the Ghost module and uses the dynamic convolution DYC module.

[0106] The Ghost module first passes through a convolution layer to obtain an intermediate feature map, and then through a series of linear operations to generate the remaining s ghost features that need to be spliced, and the formula is as follows:

[0107] y ij = Φ i,j (y′ i ) (3)

[0108] In the formula, j = 1,..., s represents the jth ghost feature, y′i Denote the i-th intermediate feature map mapping, Φ i,j Denote the linear operation, y ij Denote the output after the linear operation.

[0109] The dynamic convolution DYC can learn a specific convolution kernel parameter for each example, and break the traditional static convolution characteristics by inputting to calculate the convolution kernel parameter, which can improve the model capacity while maintaining efficient inference. The parameters of the convolution kernel and its output are obtained through the following formula:

[0110] output(x)=σ((α1W1+...α n W n )*x) (4)

[0111] In the formula, x is the output of the previous layer, n represents that there are n experts in this layer, σ represents the activation function, α=r(x) is a sample-dependent weighted parameter, and its calculation formula is as follows:

[0112] r(x)=sigmoid(GAP(x)R) (5)

[0113] In the formula, first perform global average pooling GAP on the input, then right multiply by a matrix R to map its dimension to n experts, and finally use the sigmoid function to normalize the weight on each dimension to the interval of 0 to 1. Therefore, according to different inputs, its convolution kernel is also different.

[0114] The DGhost_Module module introduced in this embodiment can significantly improve its accuracy and generalization ability by increasing the model's parameter quantity without adding too much computational cost, which is an efficient method for running the model and has good application prospects. The DGhost_Module module is proposed to replace the Bottleneck structure in the C2f module of the YOLOV8m-cls model. The dynamic convolution DYC in this module can dynamically select which convolution kernel to use according to the input characteristics, significantly increase the model's parameter quantity with extremely little additional computational cost, improve the model's accuracy and generalization ability, while the Ghost module can improve the network's performance with minimal increase in floating-point operations. This method can efficiently run the model on devices with limited computing resources and has good application value in areas with limited medical equipment.

[0115] The classification head is connected to the output end of the fourth C2f_DGhost module of the backbone network, and the classification head is used to identify and classify the feature map extracted by the backbone network, and identify the four types of benign and malignant features and BIRADS classification features of breast ultrasound images.

[0116] In this embodiment, the cross-entropy loss function is used to measure the gap between the class distribution predicted by the model and the true label. The cross-entropy loss function is a very common type of loss function in classification tasks. It can provide a significant penalty for incorrect predictions, especially when the probability predicted by the model is quite different from the actual label. Therefore, through the cross-entropy loss function, we can help the model optimize its prediction performance in classification problems, making the probability distribution predicted by the model as close as possible to the true label distribution. The expression of its calculation formula is:

[0117]

[0118] In the formula, y o,c is an indicator, which is 1 if the sample o belongs to class c, and 0 otherwise. p o is the probability that the model predicts that the sample o belongs to class c.

[0119] In this embodiment, the training set is input into the improved network model for forward propagation training, and the backpropagation algorithm is used for update and optimization. Through multiple iterations of training with cross-entropy loss and the AdamW optimizer until the model converges. The improved YOLOV8m-cls is used as the training model, with the number of iterations epochs = 200, the Batch size being 16, and the initial learning rate being 0.01. After multiple rounds of training, the best training weights are obtained, thus obtaining a model for identifying benign and malignant features and classifying features of breast cancer ultrasound images.

[0120] Finally, a gradient boosting tree model is built and network optimization is performed.

[0121] In an alternative embodiment of the present invention, as Figure 4 shown, the extracted benign and malignant identification features and classification identification features are directly concatenated to obtain fused features. In order to make the model weight distribution more uniform and avoid the excessive influence of classification features on the results, the features are first regularized. The regularization processing formula is as follows:

[0122]

[0123] In the formula, x ij is the initial fused feature; i is the number of rows, representing the i-th sample; j is the number of columns, representing the j-th feature; d ij is the regularized data.

[0124] Data preprocessing:

[0125] In Python, the dataset is read through read_csv('path') in the pandas library, where 'path' represents the path of the csv - formatted data to be read. Then, regularization processing is performed. An object is created using the function preprocessing.Normalizer() in the sklearn library, and fit_transform() is used for preprocessing.

[0126] Furthermore, the fused features are fed into the gradient - boosting tree model for training. The GBDT algorithm is an ensemble learning algorithm that improves the prediction performance by combining multiple decision trees. This algorithm is based on the principle of gradient boosting and forms the final gradient - boosting tree model by gradually accumulating the prediction results of each decision tree. In this process, each decision tree focuses on predicting different parts of the data, and the final prediction result is generated by summing up the outputs of all the trees. The algorithm flow is as follows:

[0127] 1) Initialize the model F0(x), select a constant c to minimize the loss function at this time. Since it is a multi - classification problem, the loss function used here is the cross - entropy loss:

[0128]

[0129] 2) Gradually add decision trees. For each step m = 1,..., M, perform the following operations:

[0130] Calculate the residual r of the current model im :

[0131]

[0132] Use the residual rim as the target value to train a new decision tree h m (x) and update the model:

[0133]

[0134] F m (x)=F m-1 (x)+ηh m (x)(11)

[0135] In the formula, η represents the learning rate, which controls the contribution of each tree to the final model.

[0136] 3) After M iterations, form the final prediction model:

[0137]

[0138] Create the model:

[0139] Create a model object `model` using `GradientBoostingClassifier()` in the `sklearn.ensemble` library in Python, and define the object with default parameters.

[0140] Furthermore, the learning rate `learning_rate` and the number of trees `n_estimators` are two important hyperparameters in the gradient boosting tree algorithm. A smaller learning rate can make the model more stable, but may require more trees to achieve better performance; a larger learning rate may lead to overfitting. Fewer trees may lead to underfitting; more trees may lead to overfitting.

[0141] In this embodiment, the grid search method is used for hyperparameter optimization. The grid search method is a method of finding the optimal parameters by determining a set of discrete points in the parameter space. In practical applications, especially in the parameter optimization of machine learning models, first, the value range of the parameters is preset, and this range is divided into several grid points, and then these grid points are traversed to find the optimal parameter combination. This method is suitable for the case where the number of parameters is small and the value range is small. Set the parameter space, `learning_rate` is [0.02, 0.04, …, 0.1], `n_estimators` is [15, 25, …, 85], and optimize with the five-fold cross-validation accuracy as the criterion. The formula is as follows:

[0142]

[0143] In the formula, `acc` i represents the accuracy of the i-th validation, and `ACC` represents the average of the five accuracies.

[0144] Tune the model:

[0145] Create a grid search object `grid_search` using `GridSearchCV()` in the `sklearn.model_selection` library in Python, set `cv = 5`, `scoring = 'accuracy'` and perform the search through `grid_search.fit(x, y)`. Finally, obtain the best parameter combination through `grid_search.best_params_`.

[0146] Through parameter optimization by the grid method, it is finally determined that `learning_rate = 0.1` and `n_estimators = 25` are the best parameter combination, and the optimal breast cancer BIRADS classification model is obtained.

[0147] The classification performance of the model of the present invention adopts the commonly used evaluation indicators for medical images, and selects Accuracy, Precision, Recall, and F1-score to evaluate the test set. The calculation formulas of the verification indicators are as follows:

[0148]

[0149] In the formula, TP represents the number of positive classes predicted as positive classes, that is, the number of correctly predicted breast cancer samples; TN represents the number of negative class samples predicted as negative classes; FP represents the number of negative classes predicted as positive classes, that is, the number of samples that identify non-breast cancer of this class as this class; FN represents the number of positive classes predicted as negative classes, that is, the number of incorrectly predicted breast cancer samples.

[0150] Testing the model:

[0151] In Python, the test set is tested through model.predict(), and then the accuracy of the prediction is calculated through accuracy_score() in the sklearn.metrics library, and a detailed classification report is generated through classification_report() in the sklearn.metrics library to evaluate its ability in dealing with unbalanced data sets, etc.

[0152] Saving the model:

[0153] Finally, the trained model is saved for subsequent use. In Python, the weights of the model trained by the pickle.dump() function are saved, and the model and its weights can be loaded through pickle.load() later to achieve the classification of BIRADS.

[0154] The benign and malignant features and classification features are fused, and a BIRADS classification model based on gradient boosting trees is constructed. The best parameter combination is found through the grid search method to obtain the optimal BIRADS classification model, which can provide doctors with more accurate and comprehensive analysis results.

[0155] Through the detailed elaboration of the above embodiments, it can be seen that the improved YOLOV8m-cls model of the present invention is effective in the recognition of benign and malignant features and classification features of breast cancer and feasible clinically, and can combine multiple features to provide more comprehensive and accurate analysis results for the BIRADS classification of breast cancer, provide more personalized diagnosis and treatment plans for patients, and have application value in remote areas with scarce medical resources.

[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that: it is still possible to modify the specific implementation manners of the present invention or perform equivalent replacements on some technical features; without departing from the spirit of the technical solutions of the present invention, they should all be covered within the scope of the technical solutions claimed by the present invention.

Claims

1. A method for breast cancer ultrasound image feature recognition and classification based on artificial intelligence algorithm, characterized in that: The steps include: S100. Obtaining breast cancer ultrasound images and their annotated features; S200. Preprocessing the obtained image dataset, including data denoising, contrast enhancement, image standardization and data enhancement, and then dividing it into a training set, a validation set and a test set; S300. Build recognition and classification networks based on improved YOLOV8m-cls, and train models for identifying benign and malignant features, as well as BIRADS classification features; S400. The recognition features and classification features extracted from the ultrasound image are fused to obtain fused features, and a gradient boosting tree classification model is constructed to obtain a trained breast cancer classification model. The breast cancer recognition and classification model is based on the input ultrasound image, and outputs four recognition features and classification results of breast cancer for doctors' reference to customize personalized diagnosis and treatment plans.

2. The method for breast cancer ultrasound image feature recognition and classification based on artificial intelligence algorithm according to claim 1 is characterized in that: The data set is preprocessed and data denoising is performed using median filtering. The neighboring area of ​​a pixel in the image is selected, the grayscale values ​​in the area are sorted, and then the middle value is selected as the grayscale value of the new window. The calculation formula is as follows: g(x,y)=med{f(xm,yn),(m,n∈w)} (1) Where f(x,y) represents the original image, g(x,y) represents the image after median processing, and w represents the optional range.

3. The method for breast cancer ultrasound image feature recognition and classification based on artificial intelligence algorithm according to claim 1 is characterized in that: The data set is preprocessed and the contrast is enhanced by using the histogram equalization method. A new image is generated by mapping the pixel values ​​of the original image to the new pixel values. The distribution function of the equalized histogram is in the form of a linear function, which satisfies the form: F y (s) = sK.

4. The method for breast cancer ultrasound image feature recognition and classification based on artificial intelligence algorithm according to claim 1 is characterized in that: Build an improved YOLOV8m-cls model, including the backbone network and the classification head: The backbone network includes from top to bottom: the first and second CBS modules, the first C2f_DGhost module, the third CBS module, the second C2f_DGhost module, the fourth CBS module, the third C2f_DGhost module, the fifth CBS module, and the fourth C2f_DGhost module; The CBS module is composed of ordinary convolution Conv2d, BatchNorm layer and SiLU activation function, and its formula is as follows: output(x)=SiLU(BatchNorm(Conv 3×3 (x))) (2) In the formula, Conv 3×3 Indicates that a 3×3 convolution kernel is used for convolution operation; The C2f_DGhost module is optimized and improved on the basis of the C2f module of the original model, and the Bottleneck module in the original C2f module is replaced by the DGhost_Module module; The DGhost_Module module is based on the Ghost module and adopts the dynamic convolution DYC module; The Ghost module first passes through a convolutional layer to obtain the intermediate feature map, and then passes through a series of linear operations to generate the remaining s required ghost features and concatenate them. The formula is as follows: and ij =Φ i,j (and i ′) (3) Where j=1,...,s represents the jth ghost feature, y i ′ represents the i-th intermediate feature map mapping, Φ i,j represents linear operation, y i j represents the output after linear operation; The dynamic convolution DYC learns a specific convolution kernel parameter for each sample, breaks the traditional static convolution characteristics by inputting and calculating the convolution kernel parameters, and obtains the convolution kernel parameters and their output through the following formula: output(x)=σ((α1W1+...α n W n )*x) (4) In the formula, x is the output of the previous layer, n means that there are n experts in this layer, σ represents the activation function, and α=r(x) is a sample-dependent weighted parameter, which is calculated as follows: r(x)=sigmoid(GAP(x)R) (5) In the formula, firstly, the input is subjected to global average pooling GAP, then right-multiplied by a matrix R to map its dimensions to n experts, and finally the weights on each dimension are reduced to the range of 0 to 1 through the sigmoid function; The classification head is connected to the output end of the fourth C2f_DGhost module of the backbone network, and the classification head is used to recognize and classify the feature map extracted by the backbone network, so as to recognize four types of benign and malignant features of breast ultrasound images and BIRADS classification features.

5. The method for breast cancer ultrasound image feature recognition and classification based on artificial intelligence algorithm according to claim 4 is characterized in that: The C2f_DGhost module first uses the CBS module to perform the first convolution, and then divides the output into two parts through the Split structure. One part is directly connected to the output for the final splicing, and the other part is processed by multiple Bottleneck modules. Such a branch structure helps to increase the nonlinear ability and representation ability of the network, thereby improving the network's modeling ability for complex data; the bottleneck structure uses a Ghost module improved by dynamic convolution (DYC), and after multiple convolutions through the DGhost_Module module, the feature map is spliced ​​in the channel dimension, and the spliced ​​feature map is convolved for the last time to obtain the final extracted feature map.

6. The method for breast cancer ultrasound image feature recognition and classification based on artificial intelligence algorithm according to claim 5 is characterized in that: The cross entropy loss function is used to measure the gap between the category distribution predicted by the model and the actual label. The calculation formula is expressed as: In the formula, y o,c is an indicator, if the sample o belongs to category c, it is 1, otherwise it is 0, p o is the probability that the model predicts that sample o belongs to category c; The training set is input into the improved network model for forward propagation training, and the back propagation algorithm is used for updating and optimization. The cross entropy loss and AdamW optimizer are used for multiple iterative training until the model converges, and the optimal training weights are obtained after multiple rounds of training.

7. The method for breast cancer ultrasound image feature recognition and classification based on artificial intelligence algorithm according to claim 6 is characterized in that: Build a gradient boosting tree model and perform network optimization. The extracted benign and malignant identification features and classification identification features are directly spliced ​​to obtain fusion features. In order to make the model weight distribution more even and avoid the classification features from having too much influence on the results, the steps are as follows: First, the features are regularized. The regularization formula is as follows: In the formula, x ij is the initial fusion feature; i is the number of rows, indicating the i-th sample; j is the number of columns, indicating the j-th feature; d ij is the data after regularization; Then, the data is preprocessed and the fused features are fed into the gradient boosting tree model for training; Finally, create the model.

8. The method for breast cancer ultrasound image feature recognition and classification based on artificial intelligence algorithm according to claim 7 is characterized in that: The GBDT algorithm is used to predict the results. The prediction performance is improved by combining multiple decision trees. Each decision tree focuses on predicting different parts of the data, and the final prediction result is generated by accumulating the output of all trees. The algorithm flow is as follows: First, initialize the model F0(x) and select a constant c to minimize the loss function. Because it is a multi-classification problem, the loss function used here is the cross entropy loss: Then, we add decision trees step by step, and for each step m=1,...,M, we do the following: Calculate the residual r of the current model im : Use the residual r im As the target value, train a new decision tree h m (x) and update the model: F m (x)=F m-1 (x)+ηh m (x) (11) In the formula, η represents the learning rate, which controls the contribution of each tree to the final model; Finally, after M iterations, the final prediction model is formed:

9. The method for breast cancer ultrasound image feature recognition and classification based on artificial intelligence algorithm according to claim 8, characterized in that: The grid search method is used to optimize the hyperparameters. First, the parameter value range is pre-set and the range is divided into several grid points. Then, these grid points are traversed to find the optimal parameter combination. The parameter space is set and the optimization is based on the 50% cross-validation accuracy. The formula is as follows: In the formula, acc i represents the i-th verification accuracy, and ACC represents the average of five accuracy rates.

10. The method for breast cancer ultrasound image feature recognition and classification based on artificial intelligence algorithm according to claim 9, characterized in that: Tuning the model: The optimal BIRADS classification model for breast cancer was obtained by optimizing parameters using the grid method. The performance was evaluated using commonly used evaluation indicators for medical images, including accuracy, precision, recall, and F1-score. The calculation formula for the verification indicators is as follows: In the formula, TP represents the number of positive classes predicted as positive classes, that is, the number of correctly predicted breast cancer samples, TN represents the number of negative class samples predicted as negative classes, FP represents the number of negative class samples predicted as positive classes, that is, the number of breast cancer samples that are not of this class are identified as this class, and FN represents the number of positive classes predicted as negative classes, that is, the number of incorrectly predicted breast cancer samples.