Two-stage full-mouth focus detection method and system, electronic equipment and medium

By employing a two-stage detection method and an improved YOLOv8 model, combined with a multi-task loss function and feature fusion, the accuracy and efficiency issues of lesion identification in oral CBCT images were resolved, achieving efficient detection of small lesions.

CN121481920APending Publication Date: 2026-02-06SHANDONG UNIV OF FINANCE & ECONOMICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511346569.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-19
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately identify small lesions in oral CBCT images, leading to missed or false detections. This is especially true in complex environments, where traditional models struggle to balance detection accuracy and efficiency.

Method used

A two-stage detection method is adopted. First, a single tooth is located, and then lesions are identified in the local area. The location, classification and confidence are optimized by combining a multi-task weighted loss function. The improved YOLOv8 model is used for feature fusion and attention mechanism optimization.

Benefits of technology

It significantly improves the detection accuracy and localization accuracy of small lesions, reduces the rate of missed and false detections, enhances the stability and generalization ability of the model, and is suitable for resource-constrained medical scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121481920A_ABST
    Figure CN121481920A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image recognition, and provides a two-stage full-mouth focus detection method and system, electronic equipment and a medium, and the method comprises the following steps: obtaining an oral CT image, processing the oral CT image through a pre-trained target detection model, positioning and detecting a single tooth, and obtaining a single tooth region image; utilizing the target detection model to continuously identify each single tooth area image to obtain the position and the category of a focus area; wherein a loss function adopted by the target detection model in the training process is formed by weighting a position loss function, a classification loss function and a target confidence loss function. According to the method, the single tooth is firstly positioned, then the focus area is finely identified, the multi-task weighted loss function is combined, the position, the classification and the confidence coefficient are optimized, and the accuracy and the robustness of small focus detection are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image recognition technology, specifically to a two-stage whole-mouth lesion detection method, system, electronic device, and medium. Background Technology

[0002] The statements in this section are merely background information relating to this disclosure and do not necessarily constitute prior art.

[0003] In oral medical image analysis, cone-beam computed tomography (CBCT) has been widely used in clinical diagnostic tasks such as tooth structure and lesion identification due to its high resolution and three-dimensional imaging capabilities. Especially in full-mouth CBCT images, it enables automated and accurate detection of teeth and lesions, effectively assisting dentists in quickly locating lesion areas, improving diagnostic efficiency, and reducing human error, thus possessing significant clinical application value. Because oral lesions often exhibit characteristics such as small size, low contrast, and diversity, accurate identification of these lesions places higher demands on the resolution and robustness of the detection model. Especially under the premise of maintaining real-time response and high computational efficiency, how to improve detection accuracy has become a key research issue.

[0004] Existing object detection methods, such as the YOLO series, RPN, CNN, and Transformer-based models, have been widely applied in medical image analysis, but they still face many challenges in CBCT images. First, the large image size and complex background make it difficult for models to accurately locate target teeth and their minute lesions, easily leading to missed or false detections. Second, information about small lesions is easily lost during feature extraction due to deep convolutional downsampling, making them difficult to perceive effectively in large-scale images. Third, models need to simultaneously identify multiple targets of different scales, including teeth and lesions, increasing the complexity and computational cost of the detection task, making it difficult to balance accuracy and detection efficiency, and resulting in missed or false detections. Summary of the Invention

[0005] To address the aforementioned issues, this disclosure proposes a two-stage whole-mouth lesion detection method, system, electronic device, and medium. It first locates a single tooth, then precisely identifies the lesion region, and combines a multi-task weighted loss function to simultaneously optimize location, classification, and confidence, significantly improving the accuracy and robustness of small lesion detection.

[0006] To achieve the above objectives, the present disclosure adopts the following technical solution: One or more embodiments provide a two-stage whole-mouth lesion detection method, comprising the following steps: Acquire oral CT images and process the oral CT images using a pre-trained target detection model to locate and detect individual teeth, thereby obtaining an image of the individual tooth region. The target detection model is then used to further identify the images of each individual tooth region to obtain the location and category of the lesion region; The loss function used in the training process of the target detection model is composed of a weighted sum of the location loss function, the classification loss function, and the target confidence loss function.

[0007] One or more embodiments provide a two-stage whole-mouth lesion detection system, comprising: The single tooth region recognition module is configured to acquire oral CT images and process the oral CT images using a pre-trained target detection model to locate and detect single teeth, thereby obtaining a single tooth region image. The lesion area identification module is configured to use the target detection model to continue to identify the images of each individual tooth area to obtain the location and category of the lesion area; The loss function used in the training process of the target detection model is composed of a weighted sum of the location loss function, the classification loss function, and the target confidence loss function.

[0008] An electronic device includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, perform the steps in the aforementioned two-stage whole-mouth lesion detection method.

[0009] A computer-readable storage medium for storing computer instructions, which, when executed by a processor, complete the steps in the aforementioned two-stage whole-mouth lesion detection method.

[0010] Compared with the prior art, the beneficial effects of this disclosure are as follows: This method significantly improves the detection accuracy and localization precision of small lesion areas by dividing the detection process into two stages, overcoming the problem of missed detections and false detections easily generated by traditional single-stage models in complex backgrounds. The first stage achieves efficient coarse localization of tooth targets, providing reliable input for subsequent fine detection and improving the utilization rate of effective information in the image. By detecting and segmenting individual teeth in the first stage, complex background information is effectively removed from high-resolution full-mouth images, reducing interference factors in image processing and significantly improving the localization accuracy of target teeth, thus solving the problem of false detections caused by complex backgrounds. The second stage performs high-resolution feature extraction in the focused area and identifies lesions in the segmented tooth region image, effectively addressing the problem of small lesions being easily lost due to downsampling in deep networks. By conducting high-resolution feature analysis in local regions, this method enhances the model's ability to perceive small-scale lesions, improving the completeness and accuracy of detection. In addition, the loss function design fully considers the multi-dimensional evaluation criteria in target detection, and improves the stability and generalization ability of model training through a weighted mechanism, which can improve the overall efficiency of automated analysis of oral CT images. The advantages of this disclosure, as well as its additional advantages, will be described in detail in the following specific embodiments. Attached Figure Description

[0011] The accompanying drawings, which form part of this disclosure, are used to provide a further understanding of this disclosure. The illustrative embodiments of this disclosure and their descriptions are used to explain this disclosure and do not constitute a limitation thereof.

[0012] Figure 1 This is a schematic diagram of the structure of the improved YOLOv8 model according to Embodiment 1 of this disclosure; Figure 2 This is a schematic diagram of the conventional MobileNetV3 network architecture described in Embodiment 1 of this disclosure; Figure 3 This is a schematic diagram illustrating the improved feature fusion path of the composite feature fusion network in Embodiment 1 of this disclosure; Figure 4 This is a two-stage detection framework diagram of Embodiment 1 of this disclosure; Figure 5 This is a schematic diagram of the structure of the improved C2f module according to Embodiment 1 of this disclosure; Detailed Implementation The present disclosure will be further described below with reference to the accompanying drawings and embodiments.

[0013] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of this disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains.

[0014] It should be noted that the terminology used herein is for descriptive purposes only and is not intended to limit the exemplary embodiments according to this disclosure. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof. It should be noted that, without conflict, the various embodiments and features within those embodiments can be combined with each other. The embodiments will now be described in detail with reference to the accompanying drawings.

[0015] Example 1 In one or more of the technical solutions disclosed in the embodiments, such as Figures 1 to 5 As shown, a two-stage method for detecting full-mouth lesions includes the following steps: Step 1: Acquire oral CT images and process the oral CT images using a pre-trained target detection model to locate and detect individual teeth, thereby obtaining an image of the individual tooth region. Step 2: Use the target detection model to continue identifying the images of each individual tooth region to obtain the location and category of the lesion region; The loss function used in the training process of the target detection model is composed of a weighted sum of the location loss function, the classification loss function, and the target confidence loss function.

[0016] This implementation employs a two-stage detection framework. The first stage performs target detection based on full-mouth CT images. A trained target detection model processes the entire oral cavity region, detecting the bounding box information of individual teeth and extracting corresponding local image regions to form an independent set of tooth images. The main function of this stage is to achieve preliminary segmentation and localization of the tooth targets, reducing the computational complexity of subsequent processing and enhancing the accuracy of lesion detection. The second stage continues to apply the same target detection model based on the single-tooth region images output from the first stage, further extracting feature information from the local images. Deep convolutional layers in the network structure complete the location identification and classification of lesion regions, ultimately outputting the lesion category and its location in the image for each tooth. During training, a comprehensive loss function is used, consisting of a location loss (to optimize the spatial accuracy of the predicted bounding box), a classification loss (to improve the ability to identify lesion categories), and a target confidence loss (to improve the reliability of the detection results). These losses are weighted by coefficients to ensure that the model considers localization, classification, and confidence judgment.

[0017] This method significantly improves the detection accuracy and localization precision of small lesion areas by dividing the detection process into two stages, overcoming the problem of missed detections and false detections easily generated by traditional single-stage models in complex backgrounds. The first stage achieves efficient coarse localization of tooth targets, providing reliable input for subsequent fine detection and improving the utilization rate of effective information in the image. By detecting and segmenting individual teeth in the first stage, complex background information is effectively removed from high-resolution full-mouth images, reducing interference factors in image processing and significantly improving the localization accuracy of target teeth, thus solving the problem of false detections caused by complex backgrounds. The second stage performs high-resolution feature extraction in the focused area and identifies lesions in the segmented tooth region image, effectively addressing the problem of small lesions being easily lost due to downsampling in deep networks. By conducting high-resolution feature analysis in local regions, this method enhances the model's ability to perceive small-scale lesions, improving the completeness and accuracy of detection. In addition, the loss function design fully considers the multi-dimensional evaluation criteria in target detection, and improves the stability and generalization ability of model training through a weighted mechanism, which can improve the overall efficiency of automated analysis of oral CT images. In some embodiments, step 1 is the first stage, where, for the input oral CT image I, each candidate region is detected by the target detection model. Provide a confidence score When the confidence level is greater than the set threshold The area was determined to be a dental area; Specifically, to improve the accuracy of tooth detection, the threshold is... A threshold of 60% is defined as indicating that areas exceeding this threshold contain teeth, as shown in the following formula: ; When a tooth region is detected, the teeth are cropped out from the original image. For the cropped tooth region image, use bounding boxes The area describing the teeth, where Represents the coordinates of the upper left corner of the tooth frame. Represents the coordinates of the lower right corner of the tooth frame; Step 2 is the second stage, in the area of ​​the trimmed teeth. The trained object detection model is used to detect lesions and output the lesion region. The location and category of the lesion. The confidence score for each lesion region is given by the target detection model, denoted as... ; ; After the initial lesion detection, it is necessary to determine the precise location of the lesion. The detection frame for the lesion area is set as follows: , representing the start and end coordinates of the lesion.

[0018] The Intersection over Union (IoU) ratio is used to evaluate the degree of overlap between the lesion frame and the tooth frame. ; in, It is the intersection ratio of the lesion area and the area of ​​the pruned teeth. It refers to the area of ​​teeth that have been trimmed.

[0019] Furthermore, the loss function used by the object detection model during training is: ; ; ; ; in, Indicates position loss. Represents classification loss. Represents the target confidence loss function; For prediction boxes With real frame The distance between the center points; It is the diagonal length of the smallest closed rectangle containing the predicted bounding box and the ground truth. and Used to optimize the aspect ratio and the deviation coefficient of the center point. Number of categories; This is a real label; Measure the probability for each target class to determine if the target has a true label; Confidence level regarding the target.

[0020] This embodiment uses an improved YOLOv8 model as the object detection network. The improvement to YOLOv8 includes a backbone network, a neck network, and a head. First, the backbone network is reconstructed based on MobileNetV3. Second, the feature fusion capability is enhanced by combining the characteristics of the Path Aggregation Network (PANet) and the Bidirectional Feature Pyramid Network (BiFPN), and the neck network is reconstructed. Simultaneously, adaptive spatial feature fusion (ASFF) is used to optimize feature extraction, and a composite feature extraction network is designed. Finally, the original feature fusion C2f module is improved by integrating spatial and channel attention mechanisms to form a new feature fusion C2f-SCSA module.

[0021] In some embodiments, the improved YOLOv8 model reconstructs the backbone network based on a lightweight MobileNetV3, replacing the multi-layer downsampling convolution (Conv) and feature enhancement module (C2f) in the backbone network of the YOLOv8 model with the Swish-Conv module and InvertedResidual module of the MobileNetV3 network, thus constructing a lightweight feature extraction network.

[0022] Specifically, the traditional structure of MobileNetV3 networks is as follows: Figure 2 As shown, this embodiment adopts the first two parts of its structure. The MobileNetV3 network backend includes a pooling layer (Pool), a fully connected layer (FC+ReLU), and a fully connected layer (FC+Hard-Sigmoid), which are used to model the dependencies between channels, enhance the response of key feature channels, and effectively improve the model's ability to perceive complex lesion areas.

[0023] In whole-mouth lesion detection tasks, a large number of CBCT images need to be processed. These images have high resolution and contain rich feature information, while the features of the lesions are complex and diverse. Directly improving the original backbone network would significantly increase the computational load and reduce the detection speed, making it difficult to meet the needs of rapid response in medical scenarios. To address the limitations of computational resources and the requirements of real-time detection, the backbone network is reconstructed based on the lightweight MobileNetV3. Compared with the original backbone network, by replacing the key network components in the YOLOv8 model with the Swish_Conv module and the inverted residual block (also known as the InvertedResidual module) in MobileNetV3, the overall number of parameters and computational complexity of the model are significantly reduced, thereby achieving lightweight deployment of the model, suitable for embedded terminals or resource-constrained medical scenarios. This improvement enhances the model's deployment flexibility and response speed in real-world environments, while maintaining the ability to identify small lesions in complex images. The Swish-Conv module improves non-linear expressive power while maintaining convolutional performance, helping to enhance the model's ability to perceive weak features; the InvertedResidual module optimizes the information transfer efficiency between feature channels, enhancing the model's ability to detect lesions at multiple scales. Furthermore, this lightweight model structure facilitates further optimization or integration with other deep learning models, improving the scalability and maintainability of the entire detection system.

[0024] Furthermore, given the complexity and diversity of oral lesion characteristics, the network structure of MobileNetV3 was optimized by adjusting the convolution kernel parameters and interlayer connections.

[0025] A further technical solution, the improved YOLOv8 model, combines a bidirectional feature pyramid network and a path aggregation network to construct a composite feature fusion network, replacing the Neck network of the YOLOv8 model. The composite feature fusion network introduces skip connections within the same layer on the basis of bidirectional information flow, and integrates low-level feature maps to achieve the fusion of low-level and high-level features.

[0026] One specific implementation method is that the composite feature fusion network includes multi-layer feature fusion processing branches. Each feature fusion processing branch corresponds to the features of each scale from the low layer to the high layer of the backbone network output. Each feature fusion processing branch includes a Conv module, an upsampling fusion module A, and a downsampling fusion module B connected in sequence. The upsampling fusion module A of different layers performs upsampling in sequence to form an upsampling branch and transmit deep semantic information upwards; The downsampling fusion module B of different layers performs upsampling in sequence to form a downsampling branch, which transmits shallow spatial detail information downwards. A lateral skip connection is introduced in the same feature fusion processing branch. The output of the Conv module is skipped to the downsampling fusion module B, which directly passes the low-level feature map to the deep layer for fusion.

[0027] like Figure 3 As shown, traditional Feature Pyramid Networks (FPNs) have certain limitations in multi-scale feature fusion, specifically manifested as a unidirectional flow of information from high-level features to low-level features. The fusion formula is shown below: ; ; ; in, , This represents the feature map output from Backbone; , Indicates fused output; In Feature Pyramid Networks (FPNs), as network depth increases, this unidirectional flow prevents lower-level features from fully capturing the contextual information of higher-level features, leading to the loss of detailed information, especially when dealing with complex and intricate lesions. Furthermore, lower-level features contain a large amount of spatial information due to their high resolution, while higher-level features are rich in semantic information. Without a flexible weighting mechanism, certain feature scales may be overemphasized or ignored, causing an imbalance in feature fusion.

[0028] The Bidirectional Feature Pyramid Network (BiFPN) uses learnable weights to weightedly fuse feature maps from multiple sources and then normalizes them, so that the model can automatically learn the importance of features at different scales during training. The fusion formula is shown below: ; in, This indicates the output features of the top-down path fusion. Indicates output features; - Represents the learnable weights; This is the smaller value that is set.

[0029] The improved composite feature fusion network structure in this embodiment is Figure 3 Using Ours annotation, the Bidirectional Feature Pyramid Network (BiFPN) and the Path Aggregation Network (PANet) are combined to improve the YOLOv8 Neck network, resulting in a structure that includes skip connections and alternating top-to-bottom fusion paths. This allows for the interactive transfer of multi-scale feature information through bidirectional paths from top to bottom and bottom to top. The fusion formula is shown below: ; in, This represents the fusion output from the top-down path, which combines shallower, high-resolution feature maps. This layer and the fusion results of the previous layer After upsampling, weighted normalization fusion is performed; This indicates the final output fused features; For the feature map P3 fusion process, a multi-input branch weighting mechanism is introduced. Specifically, in the top-down path, the initial fusion feature of P3 is generated by upsampling the features of P2, the current layer features of P3, and the fusion result of P4, followed by normalization and weighting. Subsequently, in a bottom-up path, the original feature map of P4 is compared with... After upsampling, the data is weighted and fused again to obtain the final output features. This fusion mechanism effectively enhances the model's response to fine-grained lesion regions and improves the overall performance of target detection by introducing a dynamic balance between shallow high-resolution feature maps and deep semantic feature maps.

[0030] Specifically, a schematic diagram of the composite feature fusion network improvement process is shown below. Figure 3 As shown, the composite feature fusion network receives multi-layer feature maps P1 to P5 from the backbone network MobileNetV3, each layer having different resolutions and semantic depths. Lateral skip connections are introduced within the same layer (e.g., P3, P4, P5) to directly pass lower-layer feature maps to deeper layers, enhancing the information pathway between upper and lower layers, mitigating semantic loss, and improving feature representation capabilities. Considering that the P2 layer feature map has higher resolution and richer edge information, it is fused with P3 to further improve sensitivity and localization capabilities for small lesion regions.

[0031] Furthermore, the fusion of the input feature maps is not a simple addition, but employs a fast normalization fusion method: Step 11: The fusion weight coefficients of each input feature map channel are activated using the ReLU activation function to ensure that the weight value of each feature map is not less than 0, thus avoiding negative values ​​from affecting stability. The fusion weight coefficients of each input feature map channel are essentially a learnable fusion weight assigned to each input feature map in the network. - ; Step 12: Normalize the activated weight values ​​so that the sum of all weight values ​​equals 1, to ensure that the fused weights have clear meaning, that is: the larger the weight, the more important the information of that layer. Step 13: Weight the feature map based on the obtained normalized weights.

[0032] In this embodiment, the weights learned through ReLU transformation are first ensured to be greater than or equal to 0, and then summed and normalized to the (0,1) interval to determine the importance of different feature maps during fusion. After multiple rounds of bidirectional fusion and weighted calculation, the final output feature map of each layer of the improved BiFPN contains both the semantic information of the feature maps of the upper and lower layers and the feature map information of the original backbone network.

[0033] Through this collaborative fusion mechanism, the improved Neck network can fully integrate semantic information and spatial details at different levels, thereby improving the object detection model's response capability and accuracy to complex structures.

[0034] A further technical solution is that the upsampling fusion module A includes an upsampling unit, a BiFPN fusion unit, and an attention-based residual feature extraction module (C2f_SCSA) connected in sequence. The downsampling fusion module B includes a convolutional downsampling unit, a BiFPN fusion unit, and an attention mechanism residual feature extraction module (C2f_SCSA) connected in sequence.

[0035] In whole-mouth lesion detection tasks, optimizing by combining spatial and channel information is crucial for improving model performance. Specifically, lesions in CBCT images have complex spatial distributions, and the lesion regions are small and irregularly shaped. Spatial attention can assign different weights to each pixel, focusing on the lesion region and suppressing irrelevant areas. CBCT images contain multi-channel information, and different lesion features are reflected in different channels. Channel attention can adjust the weights of different channels to enhance the features of the lesion region. Combining spatial and channel attention mechanisms not only enables accurate localization of lesion regions in CBCT images carrying a large amount of lesion information, but also effectively learns the features of the lesion region, thereby significantly improving the model's detection performance.

[0036] A further technical solution is to adopt an improved C2f module structure for the C2f-SCSA module. The feature extraction part of the C2f module consists of a set of BottleNeck modules. An SCSA attention mechanism is added between the convolutional layers of each BottleNeck module as the improved C2f module structure. The C2f module in YOLOv8 concatenates and fuses feature maps from different convolutional layers to extract feature information from different receptive fields. The feature extraction part of the C2f module consists of a set of BottleNeck modules. To focus on lesion regions and extract key features, a SCSA attention mechanism is introduced between the convolutional layers of each BottleNeck module, thereby improving the model's detection performance.

[0037] Specifically, such as Figure 5 As shown in the diagram, the C2f module includes an input Conv module, a Split module, multiple serially connected Bottleneck modules, a Concat module, and an output Conv module.

[0038] The Conv module receives the input feature map and performs convolution processing, with an output size of h×w×c. The Split module divides the feature map into two parts along the channel dimension, resulting in two sets of feature sub-maps with dimensions of h×w×0.5c. One set serves as the main branch and is directly connected to the Concat module, while the other set is sequentially input into n cascaded Bottleneck modules for feature extraction and expression enhancement.

[0039] The Bottleneck module is used to extract higher-dimensional semantic features, while its output features remain h×w×0.5c. After n iterations of the Bottleneck module, all output feature maps are skip-connected to the main branch. Figure 1 The input is then fed into the Concat module for channel splicing and fusion to form a new feature map with dimensions h×w×0.5(n+2)c. Finally, this fused feature map is output through the Conv module for unified feature compression and integration.

[0040] right Figure 5 The Bottleneck module has been improved. The Bottleneck module includes an input Conv module, an SCSA module, a Conv module connected in sequence, and a residual connection path, wherein: The input Conv module is used to perform preliminary convolution processing on the input feature map, and the output feature dimension is h×w×c; The output feature map is input to the SCSA module for channel compression, and its output dimension is h×w×0.5c; the SCSA module is used to perform a selective cross-attention mechanism to enhance the responsiveness of key regions by modeling cross-scale information. The output Conv module performs dimension restoration processing, and the output feature dimension is h×w×c; Meanwhile, the input feature map is directly passed to the output through a skip path, and is added element-wise with the processing results of the main branch (add=True) to form the final fused output.

[0041] While maintaining computational efficiency, this structure incorporates a cross-scale attention mechanism, which enhances the expressive power and contextual modeling capabilities of feature maps, thus helping to improve the recognition accuracy of target regions.

[0042] Furthermore, the SCSA module includes two parallel attention paths, namely the SMSA module path and the PCSA module path, both of which have input and output feature map sizes of B×C×H×W. The attention operations of the SMSA module path (Spatial Multi-Scale Attention) include: Step 21: Copy and expand the input feature map n times in the spatial dimension, and split it along the width direction (W) and height direction (H) respectively; Will Decompose along the width and height to obtain and ; The feature set is then divided into K independent sub-features, where K=4. The i-th sub-feature is calculated as follows: ; ; Step 22: The split feature maps are used for feature extraction and channel blending through the DWConv module (depth-separable convolution); ; ; in, Represents convolution kernels of different sizes; Step 23: Perform spatial attention modeling along the height and width directions using the Attn(H) and Attn(W) modules respectively; when constructing the spatial attention map, first concatenate different semantic sub-feature maps, then perform group normalization and Sigmoid function activation. The formula for calculating the output feature is: ; in, Indicates activation; Step 24: The two attention output feature maps are restored to their original size B×C×H×W after weighted fusion, and used as the output of the SMSA module.

[0043] ; The attention operations of the PCSA module path (Pooling Channel Self-Attention) include: Step 31: Perform global average pooling (AvgPool module) on the input feature map in the spatial dimension to generate two channel description vectors respectively; ; in, For the input feature map, This pooling process compresses the spatial information of the feature map, which helps to extract global contextual features, reduces computational complexity, and provides a compact input for subsequent attention calculations.

[0044] Step 32: Input the two description vectors into the Attn(Q,K,V) module (a typical self-attention mechanism structure) to calculate the inter-channel attention weights; the attention weights are used to weight the channel responses of the original input feature map to form enhanced channel features; Specifically, the PCSA module first processes the input Xp through three independent linear transformations (Linear Projection) to generate the query, key, and value vectors required by the self-attention mechanism. The specific calculation method is as follows: ; The standard self-attention mechanism calculation formula is used: ; The attention result X attn The channel weights are pooled and compressed to a 1×1 vector, then normalized using the sigmoid function to obtain the channel attention weights. These weights are used to weight and modulate the original input features Xp, thus yielding the output of the PCSA module. ; When the input is the output of the SMSA module, that is , represented as: ; The SCSA module in this embodiment combines the advantages of global channel dependency modeling (PCSA) and local spatial detail enhancement (SMSA), which can simultaneously improve the channel response selectivity and spatial structure representation ability of feature maps, and significantly enhance the model's ability to recognize small targets and complex backgrounds.

[0045] A further technical solution involves an improved YOLOv8 model where the detection head is replaced with an ASFF module.

[0046] The fused feature map output by the composite feature fusion network is then fed into the subsequent detection network to generate target category predictions and bounding box predictions. After receiving the feature map fused by BiFPN, ASFF first calculates the weights of different scales and spatial locations through an adaptive weighting mechanism to dynamically adjust the importance of each feature map. Then, based on these weighted values, it performs spatial fusion of features, effectively combining low-level detailed features with high-level semantic features. After receiving the fused feature map, the ASFF module performs the following process: Step 41: Perform adaptive weighted fusion operation on feature maps of different levels (scales); perform spatial fusion of features based on these weighted information to effectively combine low-level detail features and high-level semantic features; specifically, for feature maps with different level resolutions and number of channels, adopt different strategies to adjust them to the same shape. Step 42: Perform a 1×1 convolution operation on each aligned feature map to extract the fusion weight parameters. These parameters are processed by the softmax function to obtain the spatial importance weights of the feature maps at each level. ,and: ; Step 43: Based on the obtained weights, obtain the feature map output after fusion. : ; in, Let represent the vector of the feature map output after fusion at position (i,j). Indicates the third layer is adjusted to l The feature map of the layer is a vector at position (i,j).

[0047] This embodiment uses the ASFF module as the detection head. By learning spatial dynamic weighting parameters, it performs fine-grained spatial fusion of feature maps at different levels, so that the detailed information of the lower level and the semantic information of the higher level can be fully combined, which effectively enhances the discriminative ability of the fused features and is suitable for scenarios such as small target detection and complex background suppression.

[0048] Example 2 Based on Example 1, this example provides a two-stage whole-mouth lesion detection system, including: The single tooth region recognition module is configured to acquire oral CT images and process the oral CT images using a pre-trained target detection model to locate and detect single teeth, thereby obtaining a single tooth region image. The lesion area identification module is configured to use the target detection model to continue to identify the images of each individual tooth area to obtain the location and category of the lesion area; The loss function used in the training process of the target detection model is a weighted sum of the location loss function, the classification loss function, and the target confidence loss function.

[0049] It should be noted that each module in this embodiment corresponds one-to-one with each step in embodiment 1, and their specific implementation process is the same, so it will not be repeated here.

[0050] Example 3 This embodiment provides an electronic device, including a memory and a processor, as well as computer instructions stored in the memory and running on the processor. When the computer instructions are executed by the processor, they complete the steps in a two-stage whole-mouth lesion detection method of Embodiment 1.

[0051] Example 4 This embodiment provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, complete the steps in a two-stage whole-mouth lesion detection method of Embodiment 1.

[0052] The above description is merely a preferred embodiment of this disclosure and is not intended to limit this disclosure. Various modifications and variations can be made to this disclosure by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

[0053] While the specific embodiments of this disclosure have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of this disclosure. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of this disclosure are still within the scope of protection of this disclosure.

Claims

1. A two-stage method for detecting full-mouth lesions, characterized in that, Includes the following steps: Acquire oral CT images and process the oral CT images using a pre-trained target detection model to locate and detect individual teeth, thereby obtaining an image of the individual tooth region. The target detection model is then used to further identify the images of each individual tooth region to obtain the location and category of the lesion region; The loss function used in the training process of the target detection model is a weighted sum of the location loss function, the classification loss function, and the target confidence loss function.

2. The method for detecting two-stage whole-mouth lesions as described in claim 1, characterized in that: The object detection model adopts the improved YOLOv8 model, which is based on the lightweight MobileNetV3 reconstructed backbone network. The multi-layer downsampling convolution and feature enhancement modules in the backbone network of the YOLOv8 model are replaced by the Swish_Conv module and inverted residual block of the MobileNetV3 network.

3. The method for detecting lesions in the entire mouth in two stages as described in claim 2, characterized in that: The improved YOLOv8 model combines a bidirectional feature pyramid network and a path aggregation network to construct a composite feature fusion network, replacing the Neck network of the YOLOv8 model. Based on the bidirectional information flow, the composite feature fusion network introduces skip connections within the same layer and incorporates feature maps from lower layers, thereby fusing low-level and high-level features.

4. The two-stage whole-mouth lesion detection method as described in claim 3, characterized in that: The composite feature fusion network includes multi-layer feature fusion processing branches. Each feature fusion processing branch corresponds to the features at various scales from low to high in the output of the backbone network. Each feature fusion processing branch includes a Conv module, an upsampling fusion module A, and a downsampling fusion module B connected in sequence. The upsampling fusion module A of different layers performs upsampling in sequence to form an upsampling branch and transmit deep semantic information upwards; The downsampling fusion module B of different layers performs upsampling in sequence to form a downsampling branch, which transmits shallow spatial detail information downwards. A lateral skip connection is introduced in the same feature fusion processing branch. The output of the Conv module is skipped to the downsampling fusion module B, which directly passes the low-level feature map to the deep layer for fusion.

5. The two-stage whole-mouth lesion detection method as described in claim 4, characterized in that: The upsampling fusion module A includes an upsampling unit, a BiFPN fusion unit, and an attention-based residual feature extraction module; The downsampling fusion module B includes a convolutional downsampling unit, a BiFPN fusion unit, and a residual feature extraction module with an attention mechanism.

6. The two-stage whole-mouth lesion detection method as described in claim 1, characterized in that: The improved YOLOv8 model replaces the detection head with the ASFF module.

7. The method for detecting lesions in the entire mouth in two stages as described in claim 1, characterized in that: The loss function used by the object detection model during training is: ; ; ; ; in, Indicates position loss. Represents classification loss, Represents the target confidence loss function; For prediction boxes With real frame The distance between the center points; It is the diagonal length of the smallest closed rectangle containing the predicted bounding box and the ground truth. and Used to optimize the aspect ratio and the deviation coefficient of the center point. Number of categories; This is a real label; Measure the probability for each target class to determine if the target has a true label; Confidence level regarding the target.

8. A two-stage whole-mouth lesion detection system, characterized in that, include: The single tooth region recognition module is configured to acquire oral CT images and process the oral CT images using a pre-trained target detection model to locate and detect single teeth, thereby obtaining a single tooth region image. The lesion area identification module is configured to use the target detection model to continue to identify the images of each individual tooth area to obtain the location and category of the lesion area; The loss function used in the training process of the target detection model is a weighted sum of the location loss function, the classification loss function, and the target confidence loss function.

9. An electronic device, characterized in that, It includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, which, when executed by the processor, complete the steps in the two-stage whole-mouth lesion detection method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, Used to store computer instructions, which, when executed by a processor, complete the steps in the two-stage whole-mouth lesion detection method according to any one of claims 1-7.