Intelligent detection method for brain tumor focus area
By optimizing the YOLOv8 network, the deformable convolutional network DCN is introduced, the global attention mechanism GAM is improved, and the improved Wise-IoU loss function is adopted to solve the problems of misdiagnosis and misdiagnosis in brain tumor detection, achieving more efficient and accurate regional detection of brain tumor lesions.
Patent Information
- Application Number
- CN202411947595.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art has problems of misdiagnosis and misdiagnosis in brain tumor detection, mainly because manual detection relies on subjective judgment of experts, lacks unified standards, and traditional CNN structures are inefficient in dealing with complex irregular shapes and background interference.
By optimizing the YOLOv8 network, the deformable convolutional network DCN is introduced, the global attention mechanism GAM is improved, and the improved Wise-IoU loss function is adopted to form an intelligent detection model that is more suitable for brain tumor detection.
It improves the feature extraction ability of complex irregular shapes, reduces the impact of complex backgrounds on target recognition, improves the accuracy and robustness of detection, and reduces the rate of misjudgment.
Smart Images

Figure CN119887671A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an intelligent detection method for brain tumor focus area. Background Art
[0002] According to the data of the International Agency for Research on Cancer in 2018, the incidence of brain tumors in China is at an upper-middle level in the world, with an estimated annual number of new cases of brain tumors exceeding 76,000. The incidence and mortality of brain tumors in China are both the highest in the world, making it one of the most deadly cancers. Brain tumors are abnormal cells that divide and grow unnaturally in brain tissue. They have a high incidence rate and a mortality rate of more than 3%, which seriously endangers human health. The World Health Organization (WHO) divides brain tumors into four levels. The higher the level, the higher the degree of malignancy, the more difficult it is to treat, and the prognosis and survival rate also decrease. Due to the particularity of the location of occurrence, brain tumors can directly affect the integrity of human personality, cause obstacles to the body's physiological and emotional cognitive functions, and lead to huge burdens on society and families. Therefore, it is particularly important to make an accurate diagnosis of brain tumors in the early stages.
[0003] Magnetic resonance imaging (MRI) is a non-invasive brain tumor imaging technology that can produce high-resolution, non-destructive brain images, providing accurate information for doctors' clinical diagnosis, and is one of the important technologies for identifying brain tumors. According to different imaging conditions, brain images can be divided into Flair mode, T1-weighted mode, T1ce mode and T2-weighted mode. In clinical practice, doctors usually combine four different modal images for diagnosis. Due to factors such as the diverse shapes of brain tumors, uneven distribution of locations and sizes, and complex boundaries, the current detection of brain tumor images mainly relies on manual outlining by experts or detection through semi-automatic methods. The manual detection method requires experts to carefully analyze each slice of the MRI image and then manually annotate it. Therefore, this method has a huge workload and is time-consuming and labor-intensive. The quality of the segmentation results also depends entirely on the subjective judgment of the doctor. The lack of a unified standard leads to the inability to recognize each other's examination results. Therefore, studying the method of automatically detecting tumors in images can help doctors quickly identify potential problem areas in clinical practice, which is of great significance for the clinical diagnosis and treatment of brain tumors.
[0004] Medical image analysis is currently focused on three areas, including tumor detection, segmentation, and classification. Traditional methods based on brain tumor medical image analysis rely on manual operations. For example, Luan Xinhai used the fuzzy C-means (FCM) clustering method to divide the categories with the largest similarity in the same cluster and the smallest similarity in different clusters to obtain the tumor segmentation results; Ottom et al. proposed a new framework Znet, which uses deep neural networks (DNNs) and data enhancement strategies to perform two-dimensional MRI brain tumor segmentation based on skip connections, encoder-decoder architectures, and data amplification. However, this method wastes manpower and cannot be operated on a large scale. In recent years, target detection algorithms based on deep learning have achieved remarkable results in various fields. Convolutional neural networks (CNNs) have made significant breakthroughs in the field of image processing and have been widely used in medical image analysis. By training a large amount of labeled data, deep learning models can learn and capture the complex characteristics of brain tumors and achieve efficient and accurate target detection. This data-driven detection method can not only significantly reduce manual participation and improve detection efficiency, but also gradually improve the accuracy and robustness of detection through continuous optimization of the model. In recent years, CNN-based networks have gradually developed complex architectures, such as residual addition in ResNet and depthwise separable convolutions used in MobileNets. However, this reduces the inference speed of such networks and reduces memory utilization. In addition, most of the current work focuses on brain tumor classification and segmentation for MRI, while there is less exploration of detection tasks.
[0005] In the task of brain tumor detection, real-time and accuracy are crucial. The YOLO series of target detection networks, with its end-to-end detection method and fast reasoning speed, has become an ideal choice for real-time detection tasks in many scenarios. Among them, YOLOv8, as the current SOTA (state-of-the-art technology), further optimizes the detection accuracy while ensuring real-time performance, making it very suitable for automatic detection of brain tumors. Compared with the traditional CNN structure, YOLO can complete the detection task with a single forward pass, avoiding the complex multi-step reasoning process and significantly improving the detection efficiency. In addition, YOLO's unified architecture enables it to better balance model complexity and reasoning speed, especially when large-scale processing of medical images is required. However, brain tumor detection faces many challenges, including the complex morphology of the lesion area, irregular size and shape, and complex background interference in the image, all of which put higher requirements on the accuracy of detection.
[0006] Therefore, in order to solve the above problems, a method for intelligent detection of brain tumor lesion area is provided. Summary of the invention
[0007] The purpose of the present invention is to overcome the existing defects and provide an intelligent detection method for brain tumor lesion area, which solves the problems of misdiagnosis and missed diagnosis caused by subjective factors in traditional manual detection.
[0008] The technical solution to achieve the above purpose is:
[0009] A method for intelligently detecting brain tumor lesion areas, comprising:
[0010] Step S1, obtaining a brain tumor dataset and preprocessing it;
[0011] Step S2, optimizing based on the existing YOLOv8 network, and obtaining an improved brain tumor lesion area intelligent detection model after optimization;
[0012] Step S3, training and verifying an improved brain tumor lesion area intelligent detection model based on the preprocessed data set;
[0013] Step S4, using the improved brain tumor lesion area intelligent detection model to detect the video or picture, and output the detected video or picture.
[0014] Preferably, in step S1, the brain tumor dataset is Brain Tumor Detection, including 3 tumor categories and a total of 14,400 images, and the original data is divided into a training set, a validation set and a test set in a ratio of 7:2:1.
[0015] Preferably, in step S1, the preprocessing includes performing data enhancement and normalization processing on the data set, wherein the data enhancement method includes increasing brightness, reducing brightness and adding Gaussian noise.
[0016] Preferably, in step S2, optimization is performed based on the existing YOLOv8 network to obtain an improved intelligent detection model for brain tumor lesion areas, including:
[0017] Step S21, introducing a deformable convolutional network DCN, and improving the conventional convolution in the backbone network of the original YOLOv8 network into a deformable convolution DCN;
[0018] Step S22, embedding an improved global attention mechanism GAM into the improved YOLOv8 network;
[0019] Step S23: Finally, the improved Wise-I oU loss function is used to replace the original CI oU loss function, and finally an improved brain tumor lesion area intelligent detection model is obtained.
[0020] Preferably, in step S21, a deformable convolutional network DCN is introduced, the core of which is to dynamically adjust the position of the convolution kernel by learning the offset, adaptively change the sampling position, so that the YOLOv8 network can focus on the edge detail features of the rotated and irregular images, and distinguish the region of interest according to the modulation scalar, and lock the receptive field within the target range to improve the performance of the model;
[0021] The offsets are generated by two convolutional layers, one for spatial offsets and the other for channel offsets.
[0022] Preferably, in step S22, the improved global attention mechanism GAM combines global multi-head attention, local attention and channel attention;
[0023] in,
[0024] Global multi-head attention: Through the multi-head attention mechanism, the input feature map is globally modeled to capture long-distance dependencies, thereby enhancing the perception of global context information. Global multi-head attention is implemented through the following formula:
[0025]
[0026] dk=d / h;
[0027] Where Q, K, V∈R L ×d are the input query, key and value respectively, dk is the dimension of the key vector, M is, T is, k is, R L ×d is, L is, d is, and h is the number of attention heads;
[0028] Local attention: Through the deep separable convolution operation, the detailed information is extracted in the local area, the local texture characteristics of the lesion area are emphasized, and the network's ability to distinguish the boundary fuzzy area is enhanced. The local attention extracts the local correlation through one-dimensional convolution. The formula is:
[0029] LocalAttention(X)=Wlocal*X;
[0030] Where X∈R L ×d is the input, Wlocal∈Rk×d is the local convolution kernel, k is the convolution window size, and * is the convolution operation;
[0031] Channel attention: Through the channel weighting mechanism, the weights of different channels are dynamically adjusted, so that the network can pay more attention to the important feature channels related to the lesion and ignore redundant or irrelevant information;
[0032] The improved global attention mechanism GAM will introduce a learnable fusion weight parameter α to perform adaptive fusion between global and local features, fully utilize the advantages of both, and balance global semantic information with local detail features.
[0033] Preferably, in step S23, Wise-IoU adopts a dynamic non-monotonic focusing mechanism, uses "outlier degree" instead of C-IoU to evaluate the quality of the anchor frame, provides a wise gradient gain allocation strategy, adds dynamic weighting, and adds a strategy for gradually adjusting the training weights during the training process;
[0034] in,
[0035] Dynamic weighting mechanism: Dynamically adjust the weights by target size and target category, so that the YOLOv8 network pays more attention to targets of different categories and sizes. The dynamic weight formula is as follows:
[0036]
[0037] In the formula, ωi is the weight of the input node, i is the input node, k is the parameter for adjusting the slope of the curve, targetsize i is the area of the target, and μ is the median of the target size, which is used to divide small targets and large targets;
[0038] Weighted loss function: A weighted mechanism is added to the IoU loss function to dynamically adjust the contribution of each loss term based on the target size or category:
[0039]
[0040] In the formula, λc is, c is, yi is, for;
[0041] Gradually adjust the weights during training: During training, the impact of the loss is dynamically adjusted by scaling parameters γ and δ. The final loss function Wise-IoU is:
[0042]
[0043]
[0044] δ=1―γ;
[0045] Where γ is the effect of gradually enhancing the IoU loss as training progresses, and δ is the coefficient of the auxiliary loss term, which plays a dominant role in the early stage of training. is the auxiliary loss term, here it is the cross entropy loss, epoch is the batch size, and T is the time for training the batch.
[0046] The beneficial effects of the present invention are as follows: in view of the problem that the irregular morphology of brain tumor lesions makes it difficult to extract features, the present invention improves the conventional convolution in the original YOLOv8 network into a deformable convolution DCN, thereby improving the adaptive feature extraction capability for complex irregular shapes, and further improving the feature extraction capability for complex brain tumor lesions; secondly, in view of the problem that the network is difficult to pay attention to the lesion area due to the complex background in MRI, an improved global attention mechanism GAM is added to the network, so that the network can allocate attention to the lesion area, thereby minimizing the influence of the complex image background on target recognition, thereby reducing the misjudgment rate; finally, in view of the uneven quality of labeled data, the loss function is improved from CI oU to Wise-IOU function, thereby minimizing the influence of factors such as inaccurate human labeling on the recognition effect, and improving the training effect and stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a flow chart of a method for intelligent detection of brain tumor lesion area of the present invention;
[0048] Figure 2 It is a specific flow chart of the improved intelligent detection model of brain tumor lesion area obtained after optimization based on the existing YOLOv8 network in the present invention;
[0049] Figure 3 It is a diagram of ablation experiment results designed for the effect of introducing different improvements in the task of detecting brain tumor lesion areas in an embodiment of the present invention;
[0050] Figure 4 This is the PR curve of the original YOLOv8 network;
[0051] Figure 5 This is the PR curve of the original YOLOv8 network added to DCN;
[0052] Figure 6 This is the PR curve of the original YOLOv8 network with DCN and GAM added;
[0053] Figure 7 This is the PR curve of the original YOLOv8 network with DCN, GAM and Wi se-IOU functions added;
[0054] Figure 8 This is the confusion matrix diagram of the original YOLOv8 network;
[0055] Fig. 9 This is the confusion matrix diagram of the original YOLOv8 network with GAM added;
[0056] Fig.10It is a comparison diagram of the influence of the Wi se-IOU loss function and the CI oU loss function in the class-loss training process in the present invention;
[0057] Fig.11 It is a comparison diagram of the influence of the Wi se-IOU loss function and the CI oU loss function in the box-loss training process in the present invention;
[0058] Fig.12 It is a comparison diagram of the influence of the Wi se-IOU loss function and the CI oU loss function in the df ll oss training process in the present invention;
[0059] Fig.13 This is a comparative experimental result diagram of the present invention and the classic models Faster R-CNN, SSD, YOLOv5, and YOLOv8. DETAILED DESCRIPTION
[0060] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. In the description of the present invention, it should be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside" and the like indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.
[0061] The present invention will be further described below in conjunction with the accompanying drawings.
[0062] like Figure 1 As shown, a method for intelligently detecting brain tumor lesion areas comprises:
[0063] Step S1, obtaining a brain tumor dataset and preprocessing it.
[0064] In the embodiment, the brain tumor dataset is Brain Tumor Detection, which includes 3 tumor categories and a total of 14,400 images. The original data is divided into a training set, a validation set, and a test set in a ratio of 7:2:1.
[0065] In an embodiment, the preprocessing includes performing data enhancement and normalization processing on the data set, wherein the data enhancement method includes increasing brightness, reducing brightness, and adding Gaussian noise.
[0066] Step S2, optimizing based on the existing YOLOv8 network, and obtaining an improved brain tumor lesion area intelligent detection model after optimization.
[0067] In the embodiment, the existing YOLOv8 network is optimized to obtain an improved brain tumor lesion area intelligent detection model, such as Figure 2 As shown, including:
[0068] Step S21, introduce the deformable convolutional network DCN, and improve the conventional convolution in the backbone network of the original YOLOv8 network into a deformable convolution DCN.
[0069] In the embodiment, a deformable convolutional network DCN is introduced, the core of which is to dynamically adjust the position of the convolution kernel by learning the offset, adaptively change the sampling position, so that the YOLOv8 network can focus on the edge detail features of the rotated and irregular images, and distinguish the region of interest according to the modulation scalar, and lock the receptive field within the target range to improve the performance of the model;
[0070] The offsets are generated by two convolutional layers, one for spatial offsets and the other for channel offsets.
[0071] Step S22, and embed the improved global attention mechanism GAM into the improved YOLOv8 network.
[0072] In the embodiment, the improved global attention mechanism GAM combines three parts: global multi-head attention, local attention and channel attention;
[0073] in,
[0074] Global multi-head attention: Through the multi-head attention mechanism, the input feature map is globally modeled to capture long-distance dependencies, thereby enhancing the perception of global context information. Global multi-head attention is implemented through the following formula:
[0075]
[0076] dk=d / h;
[0077] Where Q, K, V∈R L ×d are the input query, key and value respectively, dk is the dimension of the key vector, M is, T is, k is, R L ×d is, L is, d is, and h is the number of attention heads;
[0078] Local attention: Through the deep separable convolution operation, the detailed information is extracted in the local area, the local texture characteristics of the lesion area are emphasized, and the network's ability to distinguish the boundary fuzzy area is enhanced. The local attention extracts the local correlation through one-dimensional convolution. The formula is:
[0079] LocalAttention(X)=Wlocal*X;
[0080] Where X∈R L ×d is the input, Wlocal∈Rk×d is the local convolution kernel, k is the convolution window size, and * is the convolution operation;
[0081] Channel attention: Through the channel weighting mechanism, the weights of different channels are dynamically adjusted, so that the network can pay more attention to the important feature channels related to the lesion and ignore redundant or irrelevant information;
[0082] The improved global attention mechanism GAM will introduce a learnable fusion weight parameter α to perform adaptive fusion between global and local features, fully utilize the advantages of both, and balance global semantic information with local detail features.
[0083] Step S23, finally, the improved Wise-IoU loss function is used to replace the original C-IoU loss function, and finally an improved brain tumor lesion area intelligent detection model is obtained.
[0084] In the embodiment, Wise-IoU adopts a dynamic non-monotonic focusing mechanism, uses "outlier degree" instead of C-IoU to evaluate the quality of anchor frames, provides a wise gradient gain allocation strategy, adds dynamic weighting, and adds a strategy for gradually adjusting training weights during training;
[0085] in,
[0086] Dynamic weighting mechanism: Dynamically adjust the weights by target size and target category, so that the YOLOv8 network pays more attention to targets of different categories and sizes. The dynamic weight formula is as follows:
[0087]
[0088] In the formula, ωi is the weight of the input node, i is the input node, k is the parameter for adjusting the slope of the curve, targetsize i is the area of the target, and μ is the median of the target size, which is used to divide small targets and large targets;
[0089] Weighted loss function: A weighted mechanism is added to the IoU loss function to dynamically adjust the contribution of each loss term based on the target size or category:
[0090]
[0091] In the formula, λc is, c is, yi is, for;
[0092] Gradually adjust the weights during training: During training, the impact of the loss is dynamically adjusted by scaling parameters γ and δ. The final loss function Wise-IoU is:
[0093]
[0094] δ=1―γ;
[0095] Where γ is the effect of gradually enhancing the IoU loss as training progresses, and δ is the coefficient of the auxiliary loss term, which plays a dominant role in the early stage of training. is the auxiliary loss term, here it is the cross entropy loss, epoch is the batch size, and T is the time for training the batch.
[0096] Step S3, based on the preprocessed data set, training and verifying the improved brain tumor lesion area intelligent detection model.
[0097] Step S4, using the improved brain tumor lesion area intelligent detection model to detect the video or picture, and output the detected video or picture.
[0098] In order to analyze the effects of different improvements introduced by this method in the task of brain tumor lesion area detection, this paper designed an ablation experiment to gradually introduce specific improvements to the baseline model to analyze the independent contribution of each improvement and the interaction between different improvements. It contains four ablation architectures, namely the original YOLOv8 model, the introduction of deformable convolution, the introduction of improved global attention mechanism, and the complete architecture after the introduction of improved Wi se-I oU loss function. The experimental results are shown in Figure 2. Figure 3 As shown in the figure, mAP@0.5 represents the average precision of the three types of lesions when IoU is set to 0.5, AP-glioma, AP-meningioma and AP-metastat ic represent the average precision of glioma, meningioma and brain metastasis, respectively.
[0099] like Figure 4-7 As shown in the figure, the PR curve can intuitively show the prediction effect of each single type of lesion area. The closer the curve is to the upper right corner, the larger the area under the curve. The larger the area value, the better the prediction effect.
[0100] from Figure 3 It can be seen that by introducing deformable convolution, the average precision mAP of the three types of brain tumors has increased by 1.8%. Figure 4-7It can also be seen from the AP value of a single disease in the PR curve that the curves of the three types of lesions are closer to the upper right corner in the architecture that introduces deformable convolution, indicating that the average recognition accuracy of the network has been improved, especially for gliomas and brain metastases. This may be because in brain tumor images, the shapes of gliomas and brain metastases are more special, with more burrs and more irregular shapes, and they show different shapes in different slices. The conventional convolution kernel used in the original YOLOv8 model lacks flexibility for feature extraction of special shapes, but after adopting the deformable convolution kernel, since the offset is added to the latter layer of the convolution kernel in the network, and the offset can be continuously learned and corrected during training, the actual distribution of the convolution kernel is closer to the shape characteristics of different types of brain tumor lesions, which helps to improve the network's ability to extract features for irregular lesions.
[0101] from Figure 3 It can be seen from the figure that after adding the improved global attention, the detection accuracy of the three brain tumor lesion areas has been greatly improved, indicating that the feature extraction ability of the lesion has been improved; Figure 8 , 9 As shown in the figure, the confusion matrix before and after the improvement shows that the situation where the image background is misjudged as the lesion area is greatly reduced after the improvement, indicating that the improved global attention mechanism plays a role in reducing the interference of complex background.
[0102] Obviously, the improved global attention mechanism guides the network's attention to pay more attention to the details of the lesion area, which is equivalent to increasing the weight of the tiny shapes near the lesion area, so that the weight of the pixel positions with a small proportion of their own pixels but important distinguishing features can be increased, so that the network pays more attention to those tiny but important areas, thereby improving the prediction accuracy. Taking brain metastases in brain tumor images as an example, their imaging features vary depending on the type and metastatic pathway of the primary tumor. Specifically, they may appear as multiple small nodules or masses in the image, or they may merge into larger masses. Although the morphology of these lesions is small, it is one of the important features that characterize their characteristics. Due to the role of the improved global attention mechanism, this feature is extracted to improve the detection accuracy. On the other hand, by improving the role of the global attention mechanism, the network can explore the dependency between the various parts of the image and the final judgment result in a larger receptive field within the entire image range, thereby guiding the network to pay attention to the effective area within the entire image range, thereby suppressing the interference of the background on the judgment of the lesion area.
[0103] Figure 10-12The training process of the two loss functions is compared to intuitively show the impact of the improvement of the loss function on model training. It can be seen that after replacing with the improved Wise-IOU loss function, the convergence speed is accelerated and the three types of loss values are reduced.
[0104] In order to verify the advancement of the present invention, the same data set is used to compare and analyze some classic models in recent years, such as FasterR-CNN, SSD, YOLOv5, and YOLOv8, and mAP is used as the evaluation index of the algorithm. Fig.13 It can be seen that the detection accuracy of the proposed algorithm reaches 82.3%, which is 20.9% higher than the two-stage algorithm Faster R-CNN; it is 21.4%, 12.8% and 5.9% higher than the single-stage algorithms SSD, YOLOv5 and YOLOv8, respectively, and the accuracy has been greatly improved.
[0105] Aiming at the problem that the current medical image detection accuracy is not high and the accuracy of some types is low, an improved brain tumor target detection model is proposed. Based on the YOLO model, this method introduces deformable convolution to enable the network to adapt to the morphology of complex lesions and improve the feature extraction ability of irregular brain tumor lesions; embeds an improved global attention mechanism to make the network pay more attention to the subtle features of the lesion area while reducing the influence of the complex background of the image to obtain higher accuracy; and uses an improved Wi se-I oU instead of the original CI oU loss function to adapt to the problem of inaccurate prediction box during manual annotation. The average accuracy of the model proposed in this invention on the test set is improved by 5.9%, which can more accurately locate and identify the brain tumor lesion area, and can provide technical support for the development of automatic brain tumor detection system.
[0106] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments may still be modified, or some or all of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for intelligent detection of brain tumor lesion areas, characterized in that: include: Step S1, obtaining a brain tumor dataset and preprocessing it; Step S2, optimizing based on the existing YOLOv8 network, and obtaining an improved brain tumor lesion area intelligent detection model after optimization; Step S3, training and verifying an improved brain tumor lesion area intelligent detection model based on the preprocessed data set; Step S4, using the improved brain tumor lesion area intelligent detection model to detect the video or picture, and output the detected video or picture.
2. The method for intelligent detection of brain tumor lesion area according to claim 1, characterized in that: In step S1, the brain tumor dataset is BrainTumor Detection, which includes three tumor categories and a total of 14,400 images. The original data is divided into a training set, a validation set, and a test set in a ratio of 7:2:
1.
3. The method for intelligent detection of brain tumor lesion area according to claim 1, characterized in that: In the step S1, the preprocessing includes performing data enhancement and normalization processing on the data set, wherein the data enhancement method includes increasing brightness, reducing brightness and adding Gaussian noise.
4. The method for intelligent detection of brain tumor lesion area according to claim 1, characterized in that: In step S2, optimization is performed based on the existing YOLOv8 network to obtain an improved brain tumor lesion area intelligent detection model, including: Step S21, introducing a deformable convolutional network DCN, and improving the conventional convolution in the backbone network of the original YOLOv8 network into a deformable convolution DCN; Step S22, embedding an improved global attention mechanism GAM into the improved YOLOv8 network; Step S23, finally, the improved Wise-IoU loss function is used to replace the original C-IoU loss function, and finally an improved brain tumor lesion area intelligent detection model is obtained.
5. The method for intelligent detection of brain tumor lesion area according to claim 1, characterized in that: In the step S21, a deformable convolutional network DCN is introduced, the core of which is to dynamically adjust the position of the convolution kernel by learning the offset, adaptively change the sampling position, so that the YOLOv8 network can focus on the edge detail features of the rotated and irregular images, and distinguish the region of interest according to the modulation scalar, and lock the receptive field within the target range to improve the performance of the model; The offsets are generated by two convolutional layers, one for spatial offsets and the other for channel offsets.
6. The method for intelligent detection of brain tumor lesion area according to claim 1, characterized in that: In step S22, the improved global attention mechanism GAM combines global multi-head attention, local attention and channel attention; in, Global multi-head attention: Through the multi-head attention mechanism, the input feature map is globally modeled to capture long-distance dependencies, thereby enhancing the perception of global context information. Global multi-head attention is implemented through the following formula: dk=d / h; Where Q, K, V∈R L ×d are the input query, key and value respectively, dk is the dimension of the key vector, M is, T is, k is, R L ×d is, L is, d is, and h is the number of attention heads; Local attention: Through the deep separable convolution operation, the detailed information is extracted in the local area, the local texture characteristics of the lesion area are emphasized, and the network's ability to distinguish the boundary fuzzy area is enhanced. The local attention extracts the local correlation through one-dimensional convolution. The formula is: LocalAttention(X)=Wlocal*X; Where X∈R L ×d is the input, Wlocal∈Rk×d is the local convolution kernel, k is the convolution window size, and * is the convolution operation; Channel attention: Through the channel weighting mechanism, the weights of different channels are dynamically adjusted, so that the network can pay more attention to the important feature channels related to the lesion and ignore redundant or irrelevant information; The improved global attention mechanism GAM will introduce a learnable fusion weight parameter α to perform adaptive fusion between global and local features, fully utilize the advantages of both, and balance global semantic information with local detail features.
7. The method for intelligent detection of brain tumor lesion area according to claim 1, characterized in that: In step S23, Wise-IoU adopts a dynamic non-monotonic focusing mechanism, uses "outlier degree" instead of C-IoU to evaluate the quality of the anchor frame, and provides a wise gradient gain allocation strategy, adds dynamic weighting, and adds a strategy for gradually adjusting the training weights during the training process; in, Dynamic weighting mechanism: Dynamically adjust the weights by target size and target category, so that the YOLOv8 network pays more attention to targets of different categories and sizes. The dynamic weight formula is as follows: In the formula, ωi is the weight of the input node, i is the input node, k is the parameter for adjusting the slope of the curve, target sizei is the area size of the target, and μ is the median value of the target size, which is used to divide small targets and large targets; Weighted loss function: A weighted mechanism is added to the IoU loss function to dynamically adjust the contribution of each loss term based on the target size or category: In the formula, λc is, c is, yi is, for; Gradually adjust the weights during training: During training, the impact of the loss is dynamically adjusted by scaling parameters γ and δ. The final loss function Wise-IoU is: δ=1―γ; Where γ is the effect of gradually enhancing the IoU loss as training progresses, and δ is the coefficient of the auxiliary loss term, which plays a dominant role in the early stage of training. is the auxiliary loss term, here it is the cross entropy loss, epoch is the batch size, and T is the time for training the batch.
Citation Information
Cited By
Palm region-of-interest lightweight extraction method applied to complex environment
CN116959039A
Ultrasonic real-time focus positioning and benign and malignant auxiliary diagnosis platform based on deep learning
CN121329943A
A Deep Learning-Based Method for Real-Time Ultrasound Lesion Localization and Auxiliary Diagnosis of Benign and M
CN121329943B