Caries segmentation method for oral panoramic radiographs based on semi-supervised multi-level uncertainty perception
Through the semi-supervised multi-level uncertainty perception method, the student-teacher model and multi-level feature map are used to generate the uncertainty mask matrix, which solves the problems of high missed diagnosis and misdiagnosis rates in caries diagnosis, improves the caries segmentation accuracy and recognition rate, and is suitable for auxiliary caries diagnosis.
Patent Information
- Application Number
- CN202211597481.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-12
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-12-12
AI Technical Summary
Existing caries diagnosis methods rely on clinical experience and have high rates of missed diagnosis and misdiagnosis. Deep learning methods require a large amount of labeled data, which is difficult to obtain. The uncertainty mask matrix design in semi-supervised learning is sensitive, making it difficult to effectively distinguish between caries and artifacts.
A method based on semi-supervised multi-level uncertainty perception is adopted. Through iterative training of student-teacher models, feature maps of different scales are extracted from each layer of the decoder. The uncertainty mask matrix is generated by combining Gaussian noise perturbation and Monte Carlo method. The exponential moving average is used to update the teacher network parameters to enrich the reference value of the uncertainty mask.
It significantly improves the accuracy of caries segmentation in oral panoramic films, increases the recognition rate of small and medium-sized caries, reduces missed diagnoses and misdiagnoses, and assists clinical medical diagnosis.
Smart Images

Figure CN116228639B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of medical image segmentation and medical assistance, and relates to a method for dental caries segmentation in oral panoramic films based on semi-supervised multi-level uncertainty perception. Background Art
[0002] Dental caries is a chronic, progressive, destructive disease of dental hard tissue caused by multiple factors, primarily bacteria. It is the most common oral disease in humans. The World Health Organization has listed dental caries, along with cancer and cardiovascular disease, as the three major diseases that require human prevention and treatment. According to the 2017 Fourth China Oral Health Epidemiological Survey, the dental caries rate in deciduous teeth was 70.9% for 5-year-old children, 34.5% for 12-year-old children, 89.0% for permanent teeth in the 35-44 age group, 95.6% for the 55-64 age group, and 98.0% for the 65-74 age group. This indicates that dental caries is widespread and prevalent across all age groups in my country, yet a significant disparity exists between dental caries prevalence and treatment rates in clinical practice.
[0003] The clinical diagnosis of dental caries primarily relies on panoramic oral radiographs. Panoramic X-rays can provide a comprehensive view of the oral cavity and reveal information about most dental lesions. However, several challenges remain. First, due to the characteristics of X-ray imaging, panoramic images are often subject to significant noise from the patient, including artifacts caused by head movement, equipment quality, and the operator's experience. This significantly interferes with recognition based on low-density shadows. Second, unlike typical medical segmentation tasks, the average area of caries lesions occupies only 1.5‰ of a panoramic image, with shallow caries occupying less than 0.5‰. Currently, small object perception is a challenging problem for modern neural networks, making it difficult to extract early-stage dental caries within the deep receptive field. Given that caries is a progressive disease that arises from the enamel and gradually invades the dentin and pulp cavity, it often exhibits a progressive boundary morphology in panoramic images. Therefore, the correct interpretation of panoramic oral images relies heavily on the clinical dentist's experience, which significantly increases the uncertainty of caries diagnosis and leads to relatively high rates of missed and misdiagnoses.
[0004] With the popularity of deep convolutional neural networks in the field of medical image segmentation, encoder-decoder-based architectures, such as FPN, U-Net, and its improved variants Res-UNet and U-Net++, have been widely used in various segmentation tasks. Fully supervised deep learning methods often require large amounts of data to achieve good results. However, since medical data annotation requires expertise and high labor costs, it is difficult for researchers to obtain large amounts of data. To address this problem, semi-supervised frameworks that utilize unlabeled data have also been used in the field of medical image segmentation. Generating pseudo-label supervision and consistent regularization are the two more mainstream semi-supervised sub-directions. The key to consistent regularization lies in how to design a powerful uncertainty mask matrix, which is extremely sensitive to the semi-supervised training process. Summary of the Invention
[0005] The present invention provides a method for caries segmentation in oral panoramic films based on semi-supervised multi-level uncertainty perception. Previous studies have shown that the unified features activated by decoders at different layers are highly correlated with the confidence of the final recognition result, and the outputs of decoders at different levels can derive multi-level features of different scales. This method uses a student-teacher model for iterative training, extracts feature maps of different scales from each layer of the decoder for deep supervision. At the same time, Gaussian noise perturbation and Monte Carlo method are used to generate an uncertainty mask matrix, and multi-level output is used to assist in the generation of uncertainty masks. The teacher network uses an exponential moving average (EMA) to record historical perturbation information. Due to the differences in the receptive fields of each layer, this method expands the uncertainty perception area from two-dimensional space to three-dimensional space, that is, it simultaneously uses noise perturbation, EMA and multi-level features to enrich the reference of the uncertainty mask matrix, which can help distinguish between artifacts and caries with similar image features in oral panoramic images, and significantly improves the caries segmentation ability of oral panoramic films.
[0006] The technical solution adopted by the present invention to solve the technical problem is as follows:
[0007] The caries segmentation method for oral panoramic radiographs based on semi-supervised multi-level uncertainty perception has the following steps:
[0008] Step 1. Dataset acquisition. This method proposes a new caries dataset DC1000 for the caries segmentation task. Its clear image data comes from the Department of Stomatology of Zhejiang Provincial People's Hospital.
[0009] Step 2: Data Processing: Based on the medical image segmentation dataset obtained in Step 1, the training data is cropped into slices containing caries. The test data is cropped to the center of the oral cavity, with the bone removed. The cropped training sample images are then randomly adjusted for brightness and contrast, horizontally flipped, and randomly rotated within a fixed range to increase the diversity of the training samples.
[0010] Step 3. Define a network architecture based on multi-level uncertainty perception. This network architecture adopts a dual network structure, consisting of two branches: a teacher branch and a student branch. The labeled and unlabeled images in the training set processed in Step 2 are used as input to the student network, and supervised training is performed on the labeled images combined with their corresponding actual segmentation label maps. The unlabeled images input to the student network are also input into the teacher network, and the unlabeled images are randomly perturbed multiple times before being input into the teacher network multiple times. The gradient backpropagation of the teacher network is disabled, and the student network updates the teacher network parameters using the exponential moving average (EMA) method, saving the perturbation information of the historical version.
[0011] Step 4. Loss function. The loss function of this method is divided into three parts, including the training loss of the student model's supervised direct prediction, the training loss of multi-scale deep supervision, and the consistency loss of the dual network model's unlabeled prediction.
[0012] Step 5. Define the AdamW optimizer with an initial learning rate of 0.001. During model training, the momentum and weight decay coefficients are set to 0.9 and 0.001, respectively. The learning rate decreases with each training cycle, effectively suppressing oscillations. In a semi-supervised batch, half are labeled and half are unlabeled.
[0013] Step 6. Network Training and Testing: Network training is performed as in Step 3. The teacher network parameters are updated by the student network using an exponential moving average (EMA) approach. During the testing phase, this method uses a sliding window to slice the image at a 50% repetition rate to form a slice set. This is then fed into the student network to generate a prediction set. The predictions are then restored to the original image at the corresponding slice positions to obtain the final prediction. Evaluation metrics used are average Dice, average sensitivity, and average precision.
[0014] The DC1000 dataset described in Step 1 contains 1000 clinically used oral panoramas captured by a Planmeca X-ray machine at the Department of Stomatology at Zhejiang Provincial People's Hospital. 593 of these images are accurately labeled and 407 are unlabeled. The panoramas have a pixel size of 2943*1435.
[0015] The data processing described in step 2 is specifically implemented as follows:
[0016] The training data was cropped into 384x384 slices containing caries. The test data was cropped to 1536x768 images of the center of the oral cavity, removing the bone portion. The cropped training sample images were then adjusted for brightness and contrast with a probability of 50%, horizontally flipped with a probability of 50%, and randomly rotated between -45° and 45° around the center of the original image to increase the diversity of the training samples.
[0017] The training slice data consists of two parts: labeled data and unlabeled data. The labeled data contains the corresponding actual segmentation labels, which are binary images with values of 255 and 0 pixels representing the foreground and background respectively.
[0018] The student network and teacher network described in step 3 are specifically implemented as follows:
[0019] The student and teacher networks share the same architecture, employing an encoder and decoder structure. The encoder uses ResNet34, with 4 downsampling and 4 upsampling cycles. The student network serves as the model for training fully supervised and semi-supervised training, while the teacher network serves as the model for training unlabeled data. The teacher network does not require backpropagation, and its parameters are derived from historical versions of the student network, preserving historical perturbation information.
[0020] For the student network, the labeled and unlabeled images in the training set slices processed in step 2 and the actual segmentation label maps corresponding to the labeled images are used as inputs to its network. There are M labeled images in total. Each labeled image is trained to obtain 1 direct prediction. The supervised training is performed using the cross entropy loss and the Dice loss function. The loss function l seg The definition is as follows:
[0021]
[0022] where f(x i ) is the direct prediction output for each labeled image, y i is the corresponding true label (i.e. the actual segmentation label map).
[0023] At the same time, the supervised training prediction output also includes the L-layer multi-scale decoder output. The output results of each layer of decoders are input into L segmentation modules to obtain the prediction results of the same scale for deep supervision. This part also uses the cross entropy loss and Dice loss function. The deep supervision loss function l DS The definition is as follows:
[0024]
[0025] Among them, M (decl,i) represents the output of the i-th layer decoder, W lrepresents the corresponding segmentation module weight parameter, σ represents the sigmoid function, and y i is the true label corresponding to the sample. bce represents the cross entropy loss, l dce represents the Dice loss function.
[0026] For the teacher network, the same unlabeled image input into the student network is also not subjected to any Gaussian perturbation processing, and is directly input into the teacher network to obtain 1 direct prediction and L-layer multi-scale outputs. The unlabeled direct output obtained by the teacher network and the direct output obtained by the corresponding student network are subjected to an L2 MSE Loss. Subsequently, the present invention first performs a Gaussian noise perturbation on the unlabeled image data, and then the teacher network uses the Monte Carlo method to sample T times, and then performs another Gaussian noise perturbation during each sampling process. The perturbed unlabeled image data set is input into the teacher network again, and 1 direct output and L multi-scale outputs are also obtained. The L multi-scale outputs are also input into the corresponding L segmentation modules, and up-sampled to obtain prediction results of the same scale. After the above-mentioned T cycles of sampling, T*L prediction results are obtained, and the prediction results are fused using the Mean method to obtain The uncertainty mask matrix m is obtained using the following formula: uncertain :
[0027]
[0028] And the model will dynamically generate a threshold to adjust the uncertainty mask matrix. The formula for generating the dynamic threshold is as follows:
[0029]
[0030] Where γ and β are two hyperparameters used to adjust the threshold. c and C represent the current and maximum training times, respectively. The portion of the uncertainty measurement matrix that is less than the current training threshold is selected as the specific mask. The portion of the uncertainty mask matrix that is less than the current training threshold is selected as the final specific mask matrix.
[0031] Finally, the unsupervised training loss of the student network and the teacher network for the same batch of unlabeled sample data is the L2 MSE Loss of selecting certain areas from the direct prediction output of the previous two networks according to a specific mask matrix. Its consistency loss l con The calculation formula is shown in the figure below:
[0032]
[0033] Where M represents all labeled images, and N represents all unlabeled images. represents the direct output of the teacher network, represents the direct output of the student network.
[0034] For the teacher network, its model parameters are updated by the student network using the exponential moving average (EMA) method. The parameter update function is as follows:
[0035] θ g =αθ g +(1-α)θ f (Formula 6)
[0036] where θ g represents the parameters of the teacher network, θ f Represents the parameters of the student network. α is a hyperparameter that changes dynamically according to the current cycle.
[0037] Step 4. Loss function. Through step 3, the loss function of this method is divided into three parts, including the training loss l of the supervised direct prediction of the student model seg , multi-scale deep supervision training loss l DS And the consistency loss l for unlabeled prediction of the dual network model con The total training loss formula defined by this method is as follows:
[0038] l=l seg +l DS +λl con (Formula 7)
[0039] Where λ is a hyperparameter that represents the balance factor of the loss function between the training process with labeled data and the training process without labeled data. Its value will also change dynamically according to the cycle.
[0040] Step 5. Define the AdamW optimizer, set the initial learning rate to 0.001, and during model training, set the momentum and weight decay coefficients to 0.9 and 0.001, respectively. The learning rate slows down as the training cycle increases.
[0041] The batch sizes for fully supervised and semi-supervised training were set to 4 and 8, respectively. In the semi-supervised batch size of 8, labeled and unlabeled samples each accounted for half. Furthermore, the maximum number of epochs in the experiment was set to 200, and the number of layers in the multi-layer decoder was set to 4, i.e., C = 200, L = 4. Furthermore, α = 0.99, β = 0.75, and γ = 2 were set as the other three hyperparameters mentioned above.
[0042] Step 6. Network training and testing: The network training is performed in the same manner as in step 3, and the parameters of the teacher network are updated by the student network through the exponential moving average (EMA) method. During the testing phase, this method uses a sliding window to slice at a repetition rate of 50% to form a slice set, which is input into the student network to obtain the prediction set result, and the prediction value greater than 0.5 is taken as the final prediction set result. The prediction result is restored to the original image according to the corresponding slice position using the Mean method to obtain the final prediction result. The evaluation indicators used are average Dice, average sensitivity (Sensitivity) and average accuracy (Precision). Average Dice refers to the calculation of the Dice result of each predicted segmentation map and the true segmentation label map, and then taking the average. Similarly, sensitivity and accuracy are also calculated by accumulating the results of each map and taking the average.
[0043] The beneficial effects of the present invention are as follows:
[0044] The present invention segments caries in oral panoramic films based on a semi-supervised multi-level uncertainty perception mask matrix. This method uses the fact that the unified features activated by decoders at different layers are highly correlated with the confidence of the final recognition result, and the outputs of decoders at different layers can derive multiple scales. Iterative training is performed through the student-teacher model, and feature maps of different scales are extracted from each layer of the decoder for deep supervision. At the same time, Gaussian noise perturbation and the Monte Carlo method are used to generate the uncertainty mask matrix, and multi-level output is used to assist in the generation of the uncertainty mask. The teacher network uses EMA to update historical perturbation information. The multi-layer output has different receptive field sizes. Based on the differences in the receptive fields of each layer, this method expands the uncertainty mask matrix from two-dimensional space to three-dimensional space, that is, it uses noise perturbation, EMA and multi-level features to enrich the reference of the uncertainty mask, which can help distinguish between artifacts and caries with similar image features in oral panoramic films, improve the model's recognition rate for small and medium-sized caries, and significantly improve the recognition effect of caries of various sizes, thereby improving the accuracy of the segmentation network. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a flow chart of the present invention.
[0046] Figure 2 It is a schematic diagram of the entire model framework in the invention method.
[0047] Figure 3 This is a comparison chart of the segmentation effects of the present invention and other methods. DETAILED DESCRIPTION
[0048] The present invention will be further described below with reference to the accompanying drawings and examples.
[0049] The present invention uses a student-teacher model for iterative training, extracts feature maps of different scales from each decoder layer for deep supervision, and uses Gaussian noise perturbation and the Monte Carlo method to generate an uncertainty mask matrix. The multi-level output of the decoder at different layers assists in the generation of the uncertainty mask. Due to the differences in the receptive fields of each layer, this method expands the uncertainty mask matrix from two-dimensional space to three-dimensional space. That is, it simultaneously utilizes noise perturbation, exponential moving average (EMA), and multi-level features to enrich the reference of the uncertainty mask, thereby helping the model distinguish between artifacts and caries with similar image features in oral panoramas, improving the model's recognition performance for caries of various sizes, and thus enhancing its medical assistance role.
[0050] like Figure 1 As shown in the figure, the flow chart of the oral caries segmentation method based on semi-supervised multi-level uncertainty perception includes the following steps:
[0051] Step 1. Collect the panoramic image dataset DC1000, which contains 1,000 clinically used oral panoramas taken by a Planmeca X-ray machine from the Department of Stomatology at Zhejiang Provincial People's Hospital. 593 of these images are precisely annotated and 407 are roughly annotated. The pixel size of the panoramas is 2943*1435.
[0052] Step 2. Data processing: First, frame the tooth area in the annotated training oral panorama, then select the partial area containing the complete caries label for slicing (try not to cut off the caries at the boundary), and use it as the input of the model. The slice size is unified to 384*384. This solves the problem of unbalanced foreground and background ratio in dental panoramic images, accelerates the convergence of the model and maintains the stability of the model. Secondly, remove the bone part of the 100 test panorama data and crop it to obtain a 1536*768 image containing only the central oral position of the teeth. The cropped training sample image is then adjusted for brightness and contrast with a probability of 50%, horizontally flipped with a probability of 50%, and randomly rotated around the center of the original image within -45° to 45° to improve the model's convergence ability.
[0053] Step 3. Figure 2 The figure shows the framework of the network based on the semi-supervised multi-level uncertainty-aware mask matrix. This method uses ResNet34 as the encoder, and the entire U-shaped network architecture is used as the backbone network of the segmentation model. The entire network is a dual-model structure, namely the student model and the teacher model. The two branch network structures are the same but the parameters are not shared. The training image processed in step 2 and the actual segmentation map of the training image are used as input for supervised training. The dimension of the input image is (B Stu / 2, C, H, W), supervised training includes L-layer multi-scale output and 1 direct prediction, L-layer multi-layer output corresponds to L times of downsampling, each downsampling H and W are reduced by half, and then the multi-scale output is input to the corresponding segmentation head, in which a simple 3*3 convolution and ReLU operation will be performed first, and then up-sampled to restore to the unified label shape (B Stu / 2, 1, H, W) to calculate the loss, which includes cross entropy loss and Dice loss. The supervised loss of the student network is the average loss result of the L-layer feature map plus the loss result of the direct prediction. Then, the unlabeled data is directly input into the network without Gaussian perturbation to obtain a prediction result, whose dimension is also (B Stu / 2, 1, H, W).
[0054] For the teacher network, the same unlabeled image dimension as input to the student network is (B Tea / 2, C, H, W), and also without any Gaussian perturbation processing, it is directly input into the network to obtain 1 direct prediction and L-layer multi-scale output. The unlabeled direct output obtained by the teacher network and the direct output obtained by the corresponding student network are subjected to an L2 MSE Loss. Subsequently, this method first performs a Gaussian noise perturbation on the unlabeled data, and then the teacher network uses the Monte Carlo method to sample T times. During each sampling process, Gaussian noise perturbation is performed again. The perturbed unlabeled data is input into the teacher network again, and (1+L) outputs will be obtained. The L multi-scale outputs are also input into the corresponding L segmentation heads, and upsampled to obtain prediction results of the same scale. After T cycles of the above steps, T*(1+L)*B prediction sample results will be obtained. The prediction results are stacked together in the first dimension to obtain the dimension (T*L*B, 1, H, W). After the dimension conversion is restored to the batch level, the output dimension is (T*(1+L), B, 1, H, W). Finally, the Mean method is used to fuse the prediction results, and the final output dimension is (B, 1, H, W). The initial uncertainty mask matrix m is then calculated uncertain The model will dynamically generate a threshold to adjust the uncertainty mask matrix of each cycle, and select the part of the uncertainty mask matrix that is smaller than the current training threshold as the determination mask M. certain .
[0055] Finally, the unsupervised training loss of the student network and the teacher network for the same batch of unlabeled sample data is determined based on the mask matrix M certain Select L2 MSELoss of certain regions from the direct prediction output of the previous two networks to get the final l con loss.
[0056] Step 4. Loss function. Through step 3, the loss function of this method is divided into three parts, including the training loss l of the student model with supervised direct prediction seg , multi-scale deep supervision training loss l DS And the consistency loss l for unlabeled prediction of the dual network model con .
[0057] Step 5. Define the AdamW optimizer, set the initial learning rate to 0.001, and during model training, set the momentum and weight decay coefficients to 0.9 and 0.001 respectively. The learning rate slows down as the training cycle increases. The batch size of full supervision and semi-supervision is set to B respectively. train =4 and B train = 8. In the semi-supervised B train = 8, each batch size consists of half labeled and half unlabeled samples. This method has a maximum epoch number of 200, and the number of layers in the multi-layer decoder is set to 4, i.e., C = 200 and L = 4. Furthermore, α = 0.99, β = 0.75, and y = 2 are the other three hyperparameter settings mentioned above.
[0058] Step 6. Network training and testing: The network training is performed in the same manner as in step 3, and the parameters of the teacher network are updated by the student network through the exponential moving average (EMA) method. During the testing phase, this method uses a sliding window to slice at a repetition rate of 50% to form a slice set, which is input into the student network to obtain the prediction set result, and the prediction value greater than 0.5 is taken as the final prediction set result. The prediction result is restored to the original image according to the corresponding slice position using the Mean method to obtain the final prediction result. The evaluation indicators used are average Dice, average sensitivity (Sensitivity) and average accuracy (Precision). Average Dice refers to the calculation of the Dice result of each predicted segmentation map and the true segmentation label map, and then taking the average. Similarly, sensitivity and accuracy are also calculated by accumulating the results of each map and taking the average.
[0059] In the two experiments, the fully supervised and semi-supervised performance evaluations of this method were conducted with 265 and 530 slices, respectively, denoted as DICE. 265 、SEN 265 、Pre 265 and DICE 530 、SEN 530 and Pre 530The implemented models include MANet, FPN, DeepLabV3+, Linknet, Unet, Unet++, PAN and PSPnet. In order to make a fair comparison, some commonly used semi-supervised learning frameworks such as URPC, UAMT, and CLCC are also introduced to test the effectiveness of this method in identifying controversial areas in the caries segmentation task. The results are shown in Table 1. (The visualization effect of the segmentation of some slices in the panoramic image can be seen Figure 3 )
[0060] Table 1 Performance comparison between classic segmentation network and uncertainty-aware semi-supervised model
[0061]
[0062] As can be seen from Table 1, under the fully supervised training condition of 265 slices, the performance differences between the networks are large. MAnet performs the worst at 40.37%, while PSPnet performs the best at 54.43%. When the number of training slices is doubled to 530, the diversity of the evaluation results of each network decreases significantly, and their performance stabilizes at 65% Dice. The classic segmentation network Unet and the baseline backbone model FPN used in the network of this method have segmentation accuracies of 64.66% and 64.99%, respectively. Among the three selected semi-supervised frameworks, URPC has the worst performance, with Dice of 49.44% and 59.34% in the two experiments, respectively, while the Dice of this method is 61.40% and 71.12%, both better than UAMT and CLCC.
[0063] This method also introduces Gaussian noise, iterative training, and multi-scale interference to jointly generate the uncertainty mask matrix, successfully improving the best Dice performance in two experiments from 56.23% to 5.17% and from 66.08% to 5.04%, respectively. Furthermore, in medical tasks, it is important to maximize detection rates to minimize missed detections. This method also significantly improves sensitivity, reaching 58.77% and 68.44% in the two experiments, respectively. This is more conducive to the diagnosis of early caries and can better assist clinical care.
Claims
1. A method for dental caries segmentation in oral panoramic films based on semi-supervised multi-level uncertainty perception, characterized by The steps include: Step 1. Dataset acquisition: construct a new caries dataset DC1000 for the caries segmentation task; Step 2. Data processing: Based on the caries dataset obtained in step 1, the training data is cropped into slices containing caries, and the test data is cropped to obtain the central oral cavity position by removing the bone portion. The cropped training sample images are then randomly adjusted for brightness and contrast, horizontally flipped, and randomly rotated within a fixed range to increase the diversity of the training samples. Step 3. Define a network architecture based on multi-level uncertainty perception. This network architecture adopts a dual network structure, including two branches, namely a teacher branch and a student branch. The labeled and unlabeled images in the training set processed in step 2 are used as inputs of the student network, and the labeled images are combined with their corresponding actual segmentation label maps for supervised training. The unlabeled images input to the student network are also input into the teacher network, and the unlabeled images are randomly perturbed multiple times before being input into the teacher network multiple times. The gradient backpropagation of the teacher network is disabled, and the student network updates the teacher network parameters using the exponential moving average method, saving the perturbation information of the historical version. Step 4. Loss function, which is divided into three parts: the training loss of the student model's supervised direct prediction, the training loss of multi-scale deep supervision, and the consistency loss of the dual network model's unlabeled prediction; For the teacher network, the same unlabeled image input to the student network is directly input into the teacher network without any Gaussian perturbation processing to obtain 1 direct prediction and L-layer multi-scale output; the unlabeled direct output obtained by the teacher network and the direct output obtained by the corresponding student network are subjected to an L2 MSE loss; Then, the unlabeled image data is first perturbed with Gaussian noise, and then the teacher network is sampled T times using the Monte Carlo method. During each sampling process, Gaussian noise perturbation is performed again. The perturbed unlabeled image data set is input into the teacher network again, and 1 direct output and L multi-scale outputs are obtained. The L multi-scale outputs are also input into the corresponding L segmentation modules, and up-sampled to obtain prediction results of the same scale. After the above T cycles of sampling, T*L prediction results are obtained, and the prediction results are fused using the Mean method to obtain The uncertainty mask matrix m is obtained using the following formula: uncertain : And the model will dynamically generate a threshold to adjust the uncertainty mask matrix. The formula for generating the dynamic threshold is as follows: Among them, γ and β are two hyperparameters used to adjust the threshold; c and C represent the current and maximum training time respectively; the part of the uncertainty measurement matrix that is smaller than the current training threshold is selected as the specific mask; the part of the uncertainty mask matrix that is smaller than the current training threshold will be selected as the final specific mask matrix; Step 5. Define the AdamW optimizer and set the initial learning rate. During model training, set the momentum and weight decay coefficients separately. The learning rate slows down as the training cycle increases, effectively suppressing oscillations. In a semi-supervised batch, the number of labeled samples and unlabeled samples each accounts for half. Step 6. Network training and testing: Network training is performed according to the method in step 3. The teacher network parameters are updated by the student network through the exponential moving average method. In the test phase, a sliding window is used to slice the image at a repetition rate of 50% to form a slice set, which is input into the student network to obtain the prediction set result. The prediction result is restored to the original image according to the corresponding slice position to obtain the final prediction result.
2. The method for dental caries segmentation based on semi-supervised multi-level uncertainty perception in oral panoramic radiographs according to claim 1 is characterized in that Step 1 is as follows: The dental caries dataset DC1000 described in step 1 contains 1000 oral panoramas taken by a Planmeca series X-ray machine in the dental department of a hospital and used in clinical practice. Among them, 593 are accurately labeled and 407 are unlabeled. The pixel size of the panoramas is 2943*1435.
3. The method for caries segmentation based on semi-supervised multi-level uncertainty perception in oral panoramic films according to claim 2 is characterized in that The data processing described in step 2 is specifically implemented as follows: The training data was cropped into 384*384 slices containing caries, and the test data was cropped to obtain 1536*768 central oral position images by removing the bone part. The cropped training sample images were then adjusted for brightness and contrast with a probability of 50%, horizontally flipped with a probability of 50%, and randomly rotated around the center of the original image within a range of -45° to 45° to increase the diversity of the training samples.
4. The method for caries segmentation based on semi-supervised multi-level uncertainty perception in oral panoramic radiographs according to claim 3 is characterized in that The student network branch and teacher network branch described in step 3 are specifically implemented as follows: The student network and teacher network have the same network structure. The entire model uses an encoder and decoder structure. The encoder uses ResNet34 and the number of downsampling and upsampling is 4 times. The student network is used as a network model for training fully supervised and semi-supervised data, while the teacher network is used for training unlabeled data. The teacher network does not have backpropagation, and its parameters are derived from the historical version of the student network, thereby preserving historical perturbation information. For the student network, the labeled images and unlabeled images in the training set slices processed in step 2 and the actual segmentation label maps corresponding to the labeled images are used as the input of its network; there are M labeled images in total, and each labeled image is supervised to obtain 1 direct prediction. The supervised training is performed using the cross entropy loss and the Dice loss function. The loss function The definition is as follows: where f(x i ) is the direct prediction output for each labeled image, y i is the corresponding true label; At the same time, the supervised training prediction output also includes the L-layer multi-scale decoder output. The output results of each layer of decoder are input into L segmentation modules to obtain the prediction results of the same scale for deep supervision. This part also uses the cross entropy loss and Dice loss function. The deep supervision loss function The definition is as follows: Among them, M (decl,i) represents the output of the i-th layer decoder, W l represents the corresponding segmentation module weight parameter, σ represents the sigmoid function, and y i is the true label corresponding to the sample; represents the cross entropy loss, represents the Dice loss function; The unsupervised training loss of the student network and the teacher network for the same batch of unlabeled sample data is obtained, which is the L2 MSE Loss of selecting certain areas from the direct prediction output of the previous two networks according to a specific mask matrix; its consistency loss The calculation formula is shown in the figure below: Where M represents all labeled images, and N represents all unlabeled images. represents the direct output of the teacher network, represents the direct output of the student network; For the teacher network, its model parameters are updated by the student network through exponential moving average; the parameter update function is as follows: θ g = αθ g + (1 - α)θ f (Equation 6) where θ g represents the parameters of the teacher network, θ f Represents the parameters of the student network. α is a hyperparameter that changes dynamically according to the current cycle.
5. The method for dental caries segmentation based on semi-supervised multi-level uncertainty perception in oral panoramic radiographs according to claim 3 is characterized in that The loss function described in step 4 is divided into three parts, including the training loss of the student model with supervised direct prediction Multi-scale deep supervision training loss And the consistency loss of unlabeled prediction of the dual network model The total training loss formula is as follows: Where λ is a hyperparameter that represents the balance factor of the loss function between the training process with labeled data and the training process without labeled data. Its value will also change dynamically according to the cycle.
Citation Information
Patent Citations
Image completion method based on uncertainty estimation
CN112686817A
Semi-supervised remote sensing image semantic segmentation method and equipment based on strong transformation
CN114283329A