A method and device for segmenting an oral periapical film based on dynamic feature fusion
By employing self-supervised learning and dynamic feature fusion techniques, the problem of inaccurate training of oral periapical radiograph image segmentation models was solved, achieving efficient and accurate segmentation of oral periapical radiographs, adapting to precise control of features in different regions, and improving the image segmentation effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- UNIV OF SCI & TECH BEIJING
- Filing Date
- 2025-06-18
- Publication Date
- 2026-06-26
AI Technical Summary
In existing technologies, the image segmentation models for periapical radiographs suffer from low accuracy and comprehensiveness due to the scarcity and high cost of labeled data, making it difficult to meet the needs of large-scale clinical applications.
Self-supervised learning techniques were used to pre-train unlabeled periapical X-ray images of the oral cavity. A structured block adaptive mask autoencoder was designed and combined with a dynamic cross-scale context gating and feature adaptive calibration network to optimize the masking strategy and feature fusion process, thereby improving the model's ability to learn diagnostically valuable structural features.
By reducing reliance on manual annotation, the model's ability to recognize both small and large structures is improved, enhancing the accuracy and comprehensiveness of image segmentation. It also allows for precise control of features in different regions, thus improving the overall image segmentation effect.
Smart Images

Figure CN120725983B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image processing technology, and in particular to a method and apparatus for segmenting oral periapical radiographs based on dynamic feature fusion. Background Technology
[0002] Periapical radiographs are indispensable tools in dental diagnosis, providing high-resolution, detailed information on teeth, periodontal tissues, and periapical lesions. Precise semantic segmentation of these images—that is, automatically identifying and delineating different structures such as teeth, pulp, caries, fillings, root canal fillings, periapical lesions, and crowns—is of significant clinical importance for accurate computer-aided diagnosis, treatment outcome evaluation, and personalized treatment planning. However, traditionally manual segmentation or annotation is not only time-consuming and labor-intensive, making it difficult to meet the needs of large-scale clinical applications and research, but more importantly, obtaining a large amount of high-quality, pixel-level annotations requires substantial expert time and resources, becoming a major bottleneck hindering the widespread application of advanced image analysis technologies.
[0003] In recent years, artificial intelligence technologies, represented by deep learning, have made significant progress in medical image analysis. Algorithms such as Convolutional Neural Networks (CNNs) and Transformer-based Vision Models (ViTs) have demonstrated potential in various dental imaging tasks. U-Net and its variants have been widely used in medical image segmentation, effectively capturing multi-scale features. Instance segmentation methods such as Mask R-CNN can also handle multi-object segmentation. However, these methods still face challenges when applied to periapical radiographs. Currently, there is a scarcity of publicly available labeled periapical X-ray training data, and high-quality pixel-level annotation requires professional dentists, which is costly and makes it difficult to obtain large-scale labeled datasets. Training models with small-scale labeled data results in models that are not accurate or comprehensive enough, limiting the performance of supervised learning models and leading to a decrease in image segmentation accuracy. Summary of the Invention
[0004] To address the technical problems of insufficient accuracy and comprehensiveness of trained models and reduced image segmentation accuracy in existing technologies, this invention provides a method and apparatus for periapical radiograph segmentation based on dynamic feature fusion. The technical solution is as follows:
[0005] On the one hand, a method for segmenting periapical radiographs based on dynamic feature fusion is provided. This method is implemented by a periapical radiograph segmentation device based on dynamic feature fusion, and includes:
[0006] S1. Obtain unlabeled periapical X-ray images and labeled periapical X-ray images;
[0007] S2. Based on unlabeled periapical X-ray images of the oral cavity, the initial structured block adaptive mask autoencoder is pre-trained under self-supervision to obtain the trained structured block adaptive mask autoencoder.
[0008] S3. Based on the labeled periapical X-ray images and the trained structured block adaptive mask autoencoder, train the initial periapical X-ray multi-class structure segmentation model to obtain the trained periapical X-ray multi-class structure segmentation model.
[0009] S4. Input the periapical X-ray image to be segmented into the trained periapical X-ray multi-structure segmentation model to obtain the segmentation result corresponding to the periapical X-ray image to be segmented.
[0010] On the other hand, a periapical radiograph segmentation device based on dynamic feature fusion is provided. This device is applied to a periapical radiograph segmentation method based on dynamic feature fusion, and the device includes:
[0011] The acquisition unit is used to acquire unlabeled periapical X-ray images and labeled periapical X-ray images.
[0012] The self-supervised training unit is used to perform self-supervised pre-training on the initial structured block adaptive mask autoencoder based on unlabeled periapical X-ray images of the oral cavity, so as to obtain the trained structured block adaptive mask autoencoder.
[0013] The model training unit is used to train the initial multi-class structure segmentation model of the periapical X-ray based on the labeled periapical X-ray image and the trained structured block adaptive mask autoencoder, so as to obtain the trained multi-class structure segmentation model of the periapical X-ray.
[0014] The segmentation unit is used to input the periapical X-ray image to be segmented into the trained periapical X-ray multi-structure segmentation model to obtain the segmentation result corresponding to the periapical X-ray image to be segmented.
[0015] On the other hand, a periapical radiograph segmentation device based on dynamic feature fusion is provided. The periapical radiograph segmentation device based on dynamic feature fusion includes: a processor; a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, any one of the above-described periapical radiograph segmentation methods based on dynamic feature fusion is implemented.
[0016] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored therein, the at least one instruction being loaded and executed by a processor to implement any of the above-described methods for segmenting oral periapical radiographs based on dynamic feature fusion.
[0017] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:
[0018] This invention involves acquiring both unlabeled and labeled periapical X-ray images. Based on the unlabeled periapical X-ray images, a self-supervised pre-training process is performed on an initial structured block adaptive mask autoencoder to obtain a trained structured block adaptive mask autoencoder. Using the labeled periapical X-ray images and the trained structured block adaptive mask autoencoder, an initial multi-class structure segmentation model for periapical X-ray images is trained to obtain a trained multi-class structure segmentation model for periapical X-ray images. The periapical X-ray image to be segmented is then input into the trained multi-class structure segmentation model to obtain the segmentation result corresponding to the image. Firstly, addressing the problem of scarce labeled data, this invention proposes using self-supervised learning technology to learn effective visual representations from a large number of unlabeled periapical X-rays, reducing reliance on manual annotation. Furthermore, addressing the issue that traditional random masking strategies are unsuitable for the characteristics of dental X-ray images, this invention designs a structured block-based adaptive masking mechanism. This mechanism generates optimized masking strategies based on image intensity, gradient, and local contrast features, allowing the model to focus more on learning structural features valuable for diagnosis. Finally, addressing the lack of dynamic adaptability in the downstream segmentation framework feature fusion process, this invention proposes a dynamic cross-scale context gating and feature adaptive calibration network. This network enables precise control over the feature contributions of different regions, improving the ability to recognize both fine and large structures. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart of a method for segmenting oral periapical radiographs based on dynamic feature fusion, provided by an embodiment of the present invention.
[0021] Figure 2 This is a flowchart illustrating a Vision Transformer provided in an embodiment of the present invention;
[0022] Figure 3 This is a schematic diagram of a process for training a segmentation model based on a trained autoencoder, provided by an embodiment of the present invention.
[0023] Figure 4This is a schematic diagram of a process for interacting calibration features and query embeddings based on an image segmentation model, provided by an embodiment of the present invention.
[0024] Figure 5 This is a schematic diagram illustrating the detailed internal calculation process of a single-layer decoder layer provided in an embodiment of the present invention;
[0025] Figure 6 This is a schematic diagram of a standardized preprocessing structure provided in an embodiment of the present invention;
[0026] Figure 7 This is a block diagram of an oral periapical radiograph segmentation device based on dynamic feature fusion provided in an embodiment of the present invention;
[0027] Figure 8 This is a schematic diagram of the structure of an oral periapical radiograph segmentation device based on dynamic feature fusion provided in an embodiment of the present invention. Detailed Implementation
[0028] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0029] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0030] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.
[0031] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0032] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0033] This invention provides a method for segmenting periapical radiographs based on dynamic feature fusion. This method can be implemented using a periapical radiograph segmentation device based on dynamic feature fusion, which can be a terminal or a server. Figure 1 The flowchart shown is for a periapical radiograph segmentation method based on dynamic feature fusion. The processing flow of this method may include the following steps:
[0034] S1. Obtain unlabeled periapical X-ray images and labeled periapical X-ray images.
[0035] Optionally, S1 involves acquiring unlabeled periapical X-ray images and labeled periapical X-ray images, including:
[0036] S11. Collect the initial dataset of periapical X-ray images of the oral cavity. The initial dataset includes unlabeled data and labeled data. The labeled data includes seven types of oral structures: tooth structure, pulp, crown, filling, root canal filling, caries, and periapical lesions.
[0037] S12. The unlabeled data is scaled to 224×224 pixels using random cropping and scaling transformation, and then enhanced with random horizontal flipping. Finally, tensor quantization and standardization are performed to obtain the unlabeled periapical X-ray image of the oral cavity.
[0038] S13. The image size is adjusted by using the shortest side scaling transformation on the labeled data, a random cropping strategy is applied, color enhancement transformation is performed, random flip enhancement is applied, the image and segmentation labels are converted into tensor format, and the image size is made divisible by a specified value through a fill operation to obtain the labeled periapical X-ray image of the oral cavity.
[0039] S2. Based on unlabeled periapical X-ray images of the oral cavity, the initial structured block adaptive mask autoencoder is pre-trained under self-supervision to obtain the trained structured block adaptive mask autoencoder.
[0040] Optionally, S2 performs self-supervised pre-training on the initial structured block adaptive mask autoencoder based on unlabeled periapical X-ray images of the oral cavity, resulting in a trained structured block adaptive mask autoencoder, including:
[0041] S21. Input the unlabeled periapical X-ray images into the initial structured block adaptive mask autoencoder to obtain multiple image blocks corresponding to each unlabeled periapical X-ray image.
[0042] In one feasible implementation, a Visual Transformer (ViT) is employed. ViT's self-attention mechanism can effectively model global dependencies and capture spatial relationships between different oral structures. This capability is crucial for understanding complex oral anatomy; for example, the morphology of the pulp chamber is often closely related to the tooth contour, and there is also a close connection between tooth roots and periapical lesions. The encoder adopts a ViT-Base architecture, containing 12 Transformer blocks, each with a 768-dimensional hidden layer and 12 attention heads. The encoder segments the input 224×224 pixel oral X-ray into 196 16×16 pixel patches. Each image patch is mapped to a 768-dimensional feature vector through a linear projection layer, and learnable positional encodings are added to preserve spatial information. The decoder adopts a lightweight design, containing 8 Transformer blocks with a hidden dimension of 512, and reconstructs the occluded region through mask marking and encoder output.
[0043] S22. Calculate the variance, gradient, and local contrast of each image block in each unlabeled periapical X-ray image of the oral cavity.
[0044] In one feasible implementation, adaptive mask scoring is performed for each periapical X-ray of the oral cavity. For each image patch, three statistical features are calculated: variance, gradient, and local contrast.
[0045] The variance feature of the p-th image patch is calculated using the following formula (1):
[0046] (1)
[0047] in, is the number of pixels in a single image patch, and is the pixel intensity value. Indicates the first grayscale value of each pixel. The average pixel value within the image block;
[0048] For gradient features, the calculation formula is as follows (2):
[0049] (2)
[0050] Where, x m and y m These represent the coordinates of the m-th pixel;
[0051] For local contrast features, the calculation formula is as follows (3):
[0052] (3)
[0053] in, The average gray value of the current image patch. This is the average gray value of the image patch within its 3×3 neighborhood. The "3×3 neighborhood" refers to a specific image patch centered on itself, including the patch itself and its eight surrounding adjacent image patches. These nine image patches together form a 3×3 matrix.
[0054] S23. Perform Z-score normalization on the variance, gradient, and local contrast of each image block to calculate the comprehensive anomaly score for each image block.
[0055] In one feasible implementation, the three features mentioned above are Z-score standardized, and then the comprehensive anomaly score is calculated according to the following formula (4):
[0056] (4)
[0057] in, , and These represent the normalized intensity change, gradient magnitude, and local contrast value, respectively. , and For the corresponding weighting coefficients, .
[0058] S24. Determine multiple macroblocks based on multiple image patches, calculate the comprehensive anomaly score for each macroblock, and filter the macroblocks to be masked.
[0059] In one feasible implementation, the image patch grid (14×14) is divided into 2×2 macroblock units, each macroblock containing 4 basic image patches. The overall score of a macroblock is calculated by averaging the scores of its 4 internal image patches. A weighted sampling strategy based on softmax temperature scaling is used to select macroblocks to be masked, and the weights are calculated according to the following equation (5):
[0060] (5)
[0061] in, The average score of the j-th macroblock. =1.0 is the temperature coefficient.
[0062] After obtaining multiple weights, sort the weights from largest to smallest, and select the macroblocks with the top 75% weights for masking.
[0063] S25. Based on the unlabeled periapical X-ray image of the oral cavity after masking macroblocks and the decoder, the initial structured block adaptive mask autoencoder is trained to obtain the trained structured block adaptive mask autoencoder.
[0064] One feasible implementation method is, for example Figure 2 As shown, the Vision Transformer (ViT) is used as the encoder to extract the feature representation of the unmasked region; the decoder is used to reconstruct the pixel values of the masked region. The encoder only processes the unmasked 25% of the image patch, and the decoder reconstructs the masked region using mask markings. The training objective is to minimize the reconstruction loss, and the loss function is the mean squared error (MSE), as shown in equation (6):
[0065] (6)
[0066] in, These are the original image pixel values. To reconstruct pixel values, N is the total number of pixels in the masked area.
[0067] In this embodiment of the invention, self-supervised learning (SSL) has attracted attention as an effective pre-training paradigm, capable of learning useful feature representations from unlabeled data. Methods such as masked autoencoders (MAE) learn visual representations by masking and reconstructing image patches.
[0068] S3. Based on the labeled periapical X-ray images and the trained structured block adaptive mask autoencoder, the initial periapical X-ray multi-class structure segmentation model is trained to obtain the trained periapical X-ray multi-class structure segmentation model.
[0069] Optionally, the multi-structure segmentation model for periapical X-ray images includes feature enhancement networks and image segmentation models.
[0070] like Figure 3 As shown, S3 trains the initial multi-class structure segmentation model of periapical X-ray images based on the labeled periapical X-ray images and the trained structured block adaptive mask autoencoder, resulting in a trained multi-class structure segmentation model of periapical X-ray images, including:
[0071] S31. Input the labeled periapical X-ray image into the trained structured block adaptive mask autoencoder to obtain multi-level features and feature maps.
[0072] In one feasible implementation, the domain adaptive encoder trained in the above steps is used as the backbone network to extract multi-level features from periapical X-ray images of the oral cavity, and these features are mapped to a unified dimensional space through a projection layer to obtain feature maps at various scales.
[0073] S32. Generate calibration features based on multi-level features, feature maps, and feature enhancement networks.
[0074] Optionally, S32 generates calibration features based on multi-level features, feature maps, and feature enhancement networks, including:
[0075] S321. Calculate gradient information and content features based on multi-level features.
[0076] In one feasible implementation, gradient information G(X) and content features C(X) are calculated on the extracted feature map and used as guiding signals for subsequent dynamic gating, as shown in equations (7)-(8):
[0077] (7)
[0078] (8)
[0079] in, and Let represent the gradient operators in the horizontal and vertical directions, respectively; Conv represents the convolution operation; and X represents the multi-level features. This represents a non-linear activation function.
[0080] S322. Based on gradient information, content features, and pre-designed gating units, determine the adaptive weight map of semantic features and the adaptive weight map of detail features.
[0081] In one feasible implementation, this step utilizes a dynamic cross-scale context gating mechanism to adaptively fuse high- and low-level features. The gating unit is designed as follows (9):
[0082] (9)
[0083] In the formula, This represents the Sigmoid activation function. This represents a 1×1 convolution operation with 256 output channels, and [,] represents a tensor concatenation operation along the channel dimension. This represents the high-level features after upsampling. Indicates low-level features, and Let X represent the gradient map and content feature map of the input image X at the i-th layer resolution, respectively.
[0084] S323. Based on the feature map, the adaptive weight map of semantic features and the adaptive weight map of detail features, the semantic features and detail features are fused using a dynamic gating mechanism to obtain the fused features.
[0085] In one feasible implementation, for each pair of adjacent layer features and (i∈{1,2,3}), the dynamic gating mechanism is applied to fuse detailed features and semantic features, as shown in the following equation (10):
[0086] (10)
[0087] In the formula, This represents the features after fusing the i-th layer and the (i+1)-th layer. Represents the (i+1)th layer of high-level semantic features. This represents the low-level detail features of the i-th layer after processing with a 3×3 convolution. and An adaptive weighted graph representing the semantic and detail features generated by the gating unit. _x_ represents element-wise multiplication, and Upsample represents bilinear upsampling.
[0088] S324. Based on the improved Squeeze-and-Excitation architecture and fusion features, adaptive calibration is performed on the channel dimension to obtain a set of calibration features with different resolutions.
[0089] In one feasible implementation, the module employs an improved Squeeze-and-Excitation (SE) architecture to adaptively calibrate the channel dimension, as shown in equations (11)-(12):
[0090] (11)
[0091] (12)
[0092] In the formula, This represents the global average pooling operation, which compresses the feature map into a 1×1×C vector. and These represent the weights of the fully connected layers in dimensionality reduction (the number of channels is reduced to 1 / 16 of the original) and dimensionality increase, respectively. Represents the ReLU activation function. This represents the Sigmoid activation function. This represents the C-dimensional channel attention weight vector. This represents the calibrated features. This mechanism enhances channels that contribute to oral structure segmentation, suppresses irrelevant channels, and further optimizes feature representation.
[0093] S33. Based on the image segmentation model, the calibration features and query embeddings are interacted to generate a predicted segmentation mask.
[0094] Optionally, the image segmentation model employs an improved Mask2Former framework.
[0095] like Figure 4 As shown, S33 interacts with the calibration features and query embedding based on the image segmentation model to generate a predicted segmentation mask, including:
[0096] S331. Initialize the improved Mask2Former framework based on the trained structured block adaptive mask autoencoder. The improved Mask2Former framework includes a Transformer mask decoder and a mask terminal.
[0097] In one feasible implementation, pre-trained ViT weights initialize the backbone network of Mask2Former, and the parameters of other modules are randomly initialized.
[0098] S332. Input a set of calibration features at different resolutions and a set of learnable target query embeddings into the Transformer mask decoder to obtain updated query embedding features.
[0099] Optionally, a set of calibration features with different resolutions includes four calibration features with resolutions of 1 / 32, 1 / 16, 1 / 8 and 1 / 4, respectively.
[0100] The Transformer mask decoder consists of three identical decoder modules stacked together. Each decoder module contains three decoder layers, for a total of nine layers.
[0101] The first three calibration features are updated by query embedding features through three decoder modules, and the fourth calibration feature is directly determined as the update query embedding feature.
[0102] In each decoder layer, the learnable target query embedding is used as the Query, the calibration features at the current layer scale are used as the Key and Value, and the attention mask predicted and binarized by the previous decoder layer is used to modulate the attention computation. This mask attention mechanism enables the query features to interact with the image features.
[0103] In one feasible implementation, calibration features of different resolutions are... (Corresponding to 1 / 32, 1 / 16, 1 / 8, and 1 / 4 resolutions respectively) and a set of learnable target query embeddings are input into the Transformer mask decoder. This Transformer mask decoder consists of L=3 stacked decoder modules with identical structures, each module containing 3 decoder layers, for a total of 9 layers. The detailed computation process within a single layer is as follows: Figure 5 As shown. Specifically, in each decoder layer, the input query features are used as the Query; the corresponding calibrated image features at the current layer scale are used as the calibrated image features. The attention mask, predicted and binarized by the previous decoder layer, serves as both the key and value, and is used to modulate the attention computation. Through this masked attention mechanism, query features interact with image features.
[0104] S333. The updated query embedding features are interacted with the mask to generate the final pixel-level segmentation mask, i.e., the predicted segmentation mask.
[0105] In one feasible implementation, after processing by all Transformer decoder layers, each final query embedding predicts its corresponding oral structure category through a shared classification head and is then compared with high-resolution features via a masking mechanism. The process interactively generates the final pixel-level segmentation mask.
[0106] S34. Based on the predicted segmentation mask, sample labeling results, and loss function, train the initial multi-class structure segmentation model of periapical X-ray to obtain the trained multi-class structure segmentation model of periapical X-ray.
[0107] In one feasible implementation, the model built above is trained end-to-end using labeled data, and a hybrid loss function is used, as shown in equation (13):
[0108] (13)
[0109] in, For weighted cross-entropy loss, For Dice's loss, For classification loss.
[0110] When training a multi-class segmentation model for periapical X-ray images, weighted cross-entropy loss is used to address the imbalance of pixel classes among different oral structures, making the model focus more on minority class pixels and improving pixel classification accuracy. Dice loss focuses on measuring the overlap between the predicted and ground truth segmentation masks, optimizing the connectivity and integrity of the segmented regions, and making the segmented structures more consistent with anatomical features. The classification loss is used to optimize the classification prediction corresponding to the query embedding, improving the model's ability to recognize and classify oral structures.
[0111] S4. Input the periapical X-ray image to be segmented into the trained periapical X-ray multi-structure segmentation model to obtain the segmentation result corresponding to the periapical X-ray image to be segmented.
[0112] One feasible implementation method is, for example Figure 6 As shown, the periapical X-ray images of the oral cavity to be segmented undergo the same standardized preprocessing as the training data. Then, the trained model is used to perform forward inference on the preprocessed images, extract features and predict segmentation masks, and output segmentation results for seven types of oral structures and lesions, including tooth structure, pulp, crown, filling, root canal filling, caries, and periapical lesions.
[0113] In this embodiment of the invention, unlabeled periapical X-ray images and labeled periapical X-ray images are acquired. Based on the unlabeled periapical X-ray images, an initial structured block adaptive mask autoencoder is pre-trained under self-supervision to obtain a trained structured block adaptive mask autoencoder. Based on the labeled periapical X-ray images and the trained structured block adaptive mask autoencoder, an initial periapical X-ray multi-class structure segmentation model is trained to obtain a trained periapical X-ray multi-class structure segmentation model. The periapical X-ray image to be segmented is input into the trained periapical X-ray multi-class structure segmentation model to obtain the segmentation result corresponding to the periapical X-ray image to be segmented. Firstly, addressing the problem of scarce labeled data, this invention proposes using self-supervised learning technology to learn effective visual representations from a large number of unlabeled periapical X-rays, reducing reliance on manual annotation. Furthermore, addressing the issue that traditional random masking strategies are unsuitable for the characteristics of dental X-ray images, this invention designs a structured block-based adaptive masking mechanism. This mechanism generates optimized masking strategies based on image intensity, gradient, and local contrast features, allowing the model to focus more on learning structural features valuable for diagnosis. Finally, addressing the lack of dynamic adaptability in the downstream segmentation framework feature fusion process, this invention proposes a dynamic cross-scale context gating and feature adaptive calibration network. This network enables precise control over the feature contributions of different regions, improving the ability to recognize both fine and large structures.
[0114] Figure 7 This is a block diagram of an oral periapical radiograph segmentation device based on dynamic feature fusion, provided by an embodiment of the present invention. This device is used in an oral periapical radiograph segmentation method based on dynamic feature fusion. (Refer to...) Figure 7 The device includes an acquisition unit 710, a self-supervised training unit 720, a model training unit 730, and a segmentation unit 740, wherein:
[0115] The acquisition unit 710 is used to acquire unlabeled periapical X-ray images and labeled periapical X-ray images.
[0116] The self-supervised training unit 720 is used to perform self-supervised pre-training on the initial structured block adaptive mask autoencoder based on unlabeled periapical X-ray images of the oral cavity, so as to obtain the trained structured block adaptive mask autoencoder.
[0117] The model training unit 730 is used to train the initial multi-class structure segmentation model of the periapical X-ray based on the labeled periapical X-ray image and the trained structured block adaptive mask autoencoder, so as to obtain the trained multi-class structure segmentation model of the periapical X-ray.
[0118] The segmentation unit 740 is used to input the periapical X-ray image of the oral cavity to be segmented into the trained periapical X-ray multi-structure segmentation model to obtain the segmentation result corresponding to the periapical X-ray image of the oral cavity to be segmented.
[0119] Figure 8 This is a schematic diagram of the structure of a periapical radiograph segmentation device based on dynamic feature fusion provided in an embodiment of the present invention, as shown below. Figure 8 As shown, the oral periapical radiograph segmentation device based on dynamic feature fusion can include the above-mentioned Figure 7 The illustrated periapical radiograph segmentation device is based on dynamic feature fusion. Optionally, the periapical radiograph segmentation device 810 based on dynamic feature fusion may include a first processor 2001.
[0120] Optionally, the oral periapical radiograph segmentation device 810 based on dynamic feature fusion may also include a memory 2002 and a transceiver 2003.
[0121] The first processor 2001, memory 2002, and transceiver 2003 can be connected via a communication bus.
[0122] The following is combined with Figure 8 A detailed introduction to each component of the 810 dental periapical radiograph segmentation device based on dynamic feature fusion is provided below:
[0123] The first processor 2001 is the control center of the oral periapical segmentation device 810 based on dynamic feature fusion. It can be a single processor or a collective term for multiple processing elements. For example, the first processor 2001 can be one or more central processing units (CPUs), application-specific integrated circuits (ASICs), or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).
[0124] Optionally, the first processor 2001 can perform various functions of the oral periapical radiograph segmentation device 810 based on dynamic feature fusion by running or executing software programs stored in the memory 2002 and calling data stored in the memory 2002.
[0125] In a specific implementation, as one example, the first processor 2001 may include one or more CPUs, for example... Figure 8CPU0 and CPU1 are shown in the diagram.
[0126] In a specific implementation, as one example, the oral periapical radiograph segmentation device 810 based on dynamic feature fusion may also include multiple processors, for example... Figure 8 The first processor 2001 and the second processor 2004 are shown in the diagram. Each of these processors can be a single-core processor or a multi-core processor. Here, a processor can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).
[0127] The memory 2002 is used to store the software program that executes the present invention, and is controlled by the first processor 2001 to execute it. The specific implementation method can be referred to the above method embodiment, and will not be repeated here.
[0128] Optionally, the memory 2002 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory 2002 may be integrated with the first processor 2001 or may exist independently, and may be connected via the interface circuit of the oral periapical segmentation device 810 based on dynamic feature fusion. Figure 8 (Not shown in the image) is coupled to the first processor 2001, and this embodiment of the invention does not specifically limit this.
[0129] The transceiver 2003 is used to communicate with network devices or with terminal devices.
[0130] Alternatively, transceiver 2003 may include a receiver and a transmitter. Figure 8 (Not shown separately). The receiver is used to implement the receiving function, and the transmitter is used to implement the transmitting function.
[0131] Optionally, the transceiver 2003 can be integrated with the first processor 2001 or exist independently, and can be connected to the interface circuit of the oral periapical radiograph segmentation device 810 based on dynamic feature fusion. Figure 8 (Not shown in the image) is coupled to the first processor 2001, and this embodiment of the invention does not specifically limit this.
[0132] It should be noted that, Figure 8 The structure of the oral periapical segmentation device 810 based on dynamic feature fusion shown in the figure does not constitute a limitation on the router. Actual knowledge structure recognition devices may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0133] Furthermore, the technical effect of the oral periapical radiograph segmentation device 810 based on dynamic feature fusion can be referred to the technical effect of the oral periapical radiograph segmentation method based on dynamic feature fusion described in the above method embodiments, and will not be repeated here.
[0134] It should be understood that the first processor 2001 in the embodiments of the present invention may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0135] It should also be understood that the memory in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0136] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0137] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.
[0138] In this invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be a single item or multiple items.
[0139] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0140] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0141] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0142] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0143] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0144] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0145] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0146] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for segmenting periapical radiographs based on dynamic feature fusion, characterized in that, The method includes: S1. Obtain unlabeled periapical X-ray images and labeled periapical X-ray images; S2. Based on unlabeled periapical X-ray images of the oral cavity, the initial structured block adaptive mask autoencoder is pre-trained under self-supervision to obtain the trained structured block adaptive mask autoencoder. S3. Based on the labeled periapical X-ray images and the trained structured block adaptive mask autoencoder, train the initial periapical X-ray multi-class structure segmentation model to obtain the trained periapical X-ray multi-class structure segmentation model. S4. Input the periapical X-ray image to be segmented into the trained periapical X-ray multi-structure segmentation model to obtain the segmentation result corresponding to the periapical X-ray image to be segmented. Wherein, S1 includes: S11. Collect an initial dataset of periapical X-ray images of the oral cavity. The initial dataset includes unlabeled data and labeled data. The labeled data includes seven types of oral structures: tooth structure, pulp, crown, filling, root canal filling, caries, and periapical lesions. S12. The unlabeled data is scaled to 224×224 pixels by random cropping and scaling transformation, and then enhanced by random horizontal flipping. Finally, tensor quantization and standardization are performed to obtain unlabeled periapical X-ray images of the oral cavity. S13. The image size is adjusted by using the shortest side scaling transformation on the labeled data, a random cropping strategy is applied, color enhancement transformation is performed, random flip enhancement is applied, the image and segmentation labels are converted into tensor format, and the image size is made divisible by a specified value through a fill operation to obtain the labeled periapical X-ray image of the oral cavity. Wherein, S2 includes: S21. Input the unlabeled periapical X-ray images into the initial structured block adaptive mask autoencoder to obtain multiple image blocks corresponding to each unlabeled periapical X-ray image. S22. Calculate the variance, gradient, and local contrast of each image block in each unlabeled periapical X-ray image of the oral cavity; S23. Perform Z-score normalization on the variance, gradient, and local contrast of each image patch to calculate the comprehensive anomaly score for each image patch. S24. Determine multiple macroblocks based on multiple image patches, calculate the comprehensive anomaly score for each macroblock, and filter the macroblocks to be covered. S25. Based on the unlabeled periapical X-ray image of the oral cavity after masking macroblocks and the decoder, the initial structured block adaptive mask autoencoder is trained to obtain the trained structured block adaptive mask autoencoder. The multi-structure segmentation model for periapical X-ray images includes a feature enhancement network and an image segmentation model. S3 includes: S31. Input the labeled periapical X-ray image into the trained structured block adaptive mask autoencoder to obtain multi-level features and feature maps. S32. Generate calibration features based on multi-level features, feature maps, and feature enhancement networks; S33. Based on the image segmentation model, the calibration features and query embeddings interact to generate a predicted segmentation mask; S34. Based on the predicted segmentation mask, sample labeling results, and loss function, train the initial multi-class structure segmentation model of periapical X-ray to obtain the trained multi-class structure segmentation model of periapical X-ray.
2. The method for segmenting oral periapical radiographs based on dynamic feature fusion according to claim 1, characterized in that, The step S32 generates calibration features based on multi-level features, feature maps, and feature enhancement networks, including: S321. Calculate gradient information and content features based on multi-level features; S322. Based on gradient information, content features, and pre-designed gating units, determine the adaptive weight map of semantic features and the adaptive weight map of detail features; S323. Based on the feature map, the adaptive weight map of semantic features and the adaptive weight map of detail features, the semantic features and detail features are fused using a dynamic gating mechanism to obtain the fused features; S324. Based on the improved Squeeze-and-Excitation architecture and fusion features, adaptive calibration is performed on the channel dimension to obtain a set of calibration features with different resolutions.
3. The method for segmenting periapical radiographs based on dynamic feature fusion according to claim 2, characterized in that, The image segmentation model uses an improved Mask2Former framework; S33 involves interacting the calibration features and query embeddings based on the image segmentation model to generate a predicted segmentation mask, including: S331. Based on the trained structured block adaptive mask autoencoder, the initial improved Mask2Former framework is initialized; the improved Mask2Former framework includes a Transformer mask decoder and a mask terminal. S332. Input a set of calibration features at different resolutions and a set of learnable target query embeddings into the Transformer mask decoder to obtain updated query embedding features; S333. The updated query embedding features are interacted with the mask to generate the final pixel-level segmentation mask, i.e., the predicted segmentation mask.
4. The method for segmenting periapical radiographs based on dynamic feature fusion according to any one of claims 3, characterized in that, The set of calibration features with different resolutions includes four calibration features, the resolutions of which are 1 / 32, 1 / 16, 1 / 8 and 1 / 4 respectively; The Transformer mask decoder is composed of three identical decoder modules stacked together. Each decoder module contains three decoder layers, for a total of nine layers. The first three calibration features of the four calibration features are updated by querying the embedded features through three decoder modules, and the fourth calibration feature is directly determined as the updated query embedded feature. In each decoder layer, the learnable target query embedding is used as the Query, the calibration features at the current layer scale are used as the Key and Value, and the attention mask predicted and binarized by the previous decoder layer is used to modulate the attention calculation; through the mask attention mechanism, the query features interact with the image features.
5. A periapical radiograph segmentation device based on dynamic feature fusion, wherein the periapical radiograph segmentation device based on dynamic feature fusion is used to implement the periapical radiograph segmentation method based on dynamic feature fusion as described in any one of claims 1-4, characterized in that, The device includes: The acquisition unit is used to acquire unlabeled periapical X-ray images and labeled periapical X-ray images. The self-supervised training unit is used to perform self-supervised pre-training on the initial structured block adaptive mask autoencoder based on unlabeled periapical X-ray images of the oral cavity, so as to obtain the trained structured block adaptive mask autoencoder. The model training unit is used to train the initial multi-class structure segmentation model of the periapical X-ray based on the labeled periapical X-ray image and the trained structured block adaptive mask autoencoder, so as to obtain the trained multi-class structure segmentation model of the periapical X-ray. The segmentation unit is used to input the periapical X-ray image to be segmented into the trained periapical X-ray multi-structure segmentation model to obtain the segmentation result corresponding to the periapical X-ray image to be segmented.
6. A periapical radiograph segmentation device based on dynamic feature fusion, characterized in that, The oral periapical radiograph segmentation device based on dynamic feature fusion includes: processor; A memory storing computer-readable instructions that, when executed by the processor, implement the method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains program code that can be invoked by a processor to execute the method as described in any one of claims 1 to 4.