A method for evaluating tooth root canal filling quality based on semi-supervised semantic segmentation
Through the image segmentation model and improved network structure based on semi-supervised learning, the problems of manual analysis and high error rate in the evaluation of tooth root canal filling quality are solved, fast and accurate root canal filling quality evaluation is achieved, and overfilling is identified. , under-filling and non-densification problems, and improves the efficiency of evaluating the quality of tooth root canal filling.
Patent Information
- Application Number
- CN202410393236.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-02
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-04-02
Smart Images

Figure CN118212412B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of image processing and relates to a tooth root canal filling quality assessment method based on semi-supervised semantic segmentation. Background Art
[0002] Root canal filling is the main treatment for pulp disease and apical periodontitis. If the deficiencies in root canal filling are not promptly assessed after treatment, the patient may be at risk of reinfection, so it is particularly important to promptly assess the quality of root canal filling after treatment. Each human tooth consists of a crown, root, and neck. The crown is the visible part, while the neck and root are hidden inside the tooth. Currently, small dental films based on X-ray technology are used for inspection and diagnosis. Small dental films can clearly show the shape and structure of the tooth. The pulp cavity is low-density inside the tooth, and the root canal filling material will appear bright white. Dentists judge whether the root canal is properly filled based on the small dental films after treatment, and promptly remedy the insufficiently filled root canals to prevent patients from secondary infection.
[0003] The two main factors that affect the quality of root canal filling are the degree of filling in the apical area and the density of root canal filling. The evaluation standards for the apical position at home and abroad are relatively consistent: it is acceptable for the root canal filling material to be within the range of 0 to 2 mm from the X-ray apical position. Underfilling or overfilling will reduce the effect of root canal treatment. In addition, loose filling in the apical area will also significantly reduce the long-term effect of root canal treatment. Loose filling in the apical area allows microorganisms to survive, and there are many lateral root canals at the apex. In the case of loose filling, tissue fluid is easy to infiltrate, providing nutrition for bacteria, and ultimately leading to the failure of root canal treatment. In summary, loose filling on the root canal is loose filling, and X-ray shows that the distance from the root apex to the tooth apex is less than or equal to 2 mm, which is just filling, greater than 2 mm is underfilling, and the root apex beyond the tooth is overfilling.
[0004] Currently, after observing the small tooth film after root canal filling, dentists need to manually use VistaScanMini imaging plate scanner to select the tooth apex and root canal apex, calculate the distance between the two points, and judge whether the filling is insufficient based on the distance and experience. Due to the large number of patients, hospitals will produce a large number of X-ray films. Single manual analysis is very time-consuming and has certain subjective factors, which may result in some false detection and missed detection samples.
[0005] The existing evaluation schemes mentioned above have the following defects: dentists analyze root canal overfilling, underfilling and non-density problems based on small dental films of patients, which is time-consuming and may result in some false detections and missed detections, resulting in low evaluation efficiency. Summary of the invention
[0006] In view of this, an object of the present invention is to provide a tooth root canal filling quality assessment method based on semi-supervised semantic segmentation.
[0007] In order to achieve the above object, the present invention provides the following technical solutions:
[0008] 1. Image segmentation model based on semi-supervised learning
[0009] Since the semantic information of the processed small tooth images is unclear, the small tooth images are complex and diverse, the texture near the cusp is unclear and contains a lot of noise, the edges of the teeth and root canals are blurred, and there is a problem that the cusp edges and root canal edges cannot be accurately segmented. There are many unlabeled data in small tooth images, and semi-supervised learning can use a large amount of unlabeled data to improve model performance. Consistency learning in semi-supervised learning is widely used. Its core idea is to add perturbations to the input or model, and the output prediction remains stable. However, the existing perturbation methods only perform a single perturbation on the input or model, and some detailed information may be lost during the perturbation. For example, when noise perturbation is added to the input, the edges of the teeth in the small tooth images may become blurred. When the model adds attention mechanism perturbation, it may guide the model to pay more attention to the high confidence area of the segmentation target and pay too little attention to the boundaries, making it difficult for the segmentation model to accurately identify and segment the teeth and root canal edges. This single perturbation method limits the generalization ability of the model, and the model may overfit to a specific perturbation, resulting in poor performance of the model on the test data. In order to solve this problem, the image segmentation model based on semi-supervised learning is improved: (1) the 4-branch network structure with double upsampling and double attention mechanism cross perturbation is improved, (2) the labeled consistency loss function is improved, and (3) the unlabeled cross mutual consistency loss function is improved.
[0010] Figure 3 It is an image segmentation model based on semi-supervised learning; Figure 3 (a) is a 4-branch network structure with double upsampling and double attention mechanism cross perturbation; Figure 3 (b) There is a label consistency constraint; Figure 3 (c) is the unlabeled cross-consistency constraint.
[0011] (1) Improve the four-branch network structure with double upsampling and double attention mechanism cross-perturbation, and use different perturbation methods for cross-combination to increase the diversity of the model, which helps the model learn more detailed information and improves the generalization ability and robustness of the model.
[0012] In deep learning, due to multiple downsampling operations, the size of the feature map gradually decreases and the image details are lost. Using multiple upsampling perturbations can more comprehensively retain the detail information of the feature map boundary in the segmentation result, but simply adding different upsampling methods does not introduce more semantic information, while different attention mechanism perturbations can make the model pay more attention to important areas or features in the image. The decoder is perturbed by cross-combining different upsampling and different attention mechanisms, and different attention mechanisms are introduced after upsampling to ensure that the model pays attention to important areas after retaining more detail information, thereby improving the performance and generalization ability of the segmentation model and more accurately segmenting the teeth and root canal edges.
[0013] The decoder structure of the cross-combination of upsampling and attention mechanism is shown in Figure 2 The encoder contains 5 convolution blocks, each of which consists of a 3x3 convolution layer (Conv), a batch normalization layer (BN), and a rectified linear unit (ReLU) activation function layer. Each convolution block is specifically [Conv 3x3+BN+ReLU] repeated twice. The decoder contains 4 upsampling blocks, 2 attention modules, and 2 convolution blocks. The upsampling module consists of a 1x1 convolution layer (Conv) and upsampling (Upsampel). The attention module consists of a 3x3 convolution layer (Conv), an attention mechanism (Attention), a batch normalization layer (BN), and a rectified linear unit (ReLU) activation function layer. The attention module is specifically [Conv 3x3+BN+ReLU+Conv3x3+Attention+BN+ReLU].
[0014] The decoder is perturbed by cross-combining upsampling and attention mechanisms, forming a 4-branch network structure with double upsampling and double attention mechanism cross-perturbation, such as Figure 3 As shown in (a), the attention mechanism perturbs μ, the upsampling method perturbs η, and there are four perturbation methods after cross-combination. Figure 3In (a), from left to right, they are μ1+η1, μ2+η1, μ1+η2, and μ2+η2. The first two layers of the first two decoders from left to right use different attention mechanism perturbations, and the last two decoders use different upsampling perturbations. Specifically, the attention mechanism μ1 uses CBAM, μ2 uses the position attention mechanism (CA), the upsampling method η1 uses linear interpolation (bilinear), and η2 uses the nearest interpolation (nearest). There are four perturbation methods after cross-combination. The perturbation methods of the four decoders from left to right in the figure are CBAM+bilinear, CA+bilinear, CBAM+nearest, and CA+nearest. Let the four branches be denoted as CBAM_b, CA_b, CBAM_n, and CA_n. Among them, the decoder with CBAM_b and CA_n perturbation methods is the main decoder, and the decoder with CBAM_n and CA_b perturbation methods is the auxiliary decoder, which acts as an auxiliary bridge to perform consistency regularization on CBAM_b and CA_n.
[0015] Each small dental film has a high resolution and the resolution is inconsistent. In a deeper network structure, a large input image will cause the gradient to disappear or explode. For this reason, the input original image is adjusted to a uniform size (512x512) and input into a 4-branch network. After Softmax, the segmentation prediction results of the 4 branches are obtained. The prediction result of a branch is expressed as:
[0016]
[0017] represents the segmentation prediction result of a branch, x is the input image, μ is the attention mechanism perturbation, and η is the upsampling perturbation. Specifically, the input attention mechanism μ1 uses CBAM, μ2 uses the position attention mechanism (CA), the upsampling method η1 uses linear interpolation (bilinear), and η2 uses the nearest interpolation (nearest), so 4 different segmentation prediction results are obtained. It is the segmentation prediction after CBAM+ linear interpolation (bilinear) perturbation, is the segmentation prediction after CA+ linear interpolation (bilinear) perturbation, It is the segmentation prediction after CBAM+ nearest interpolation perturbation. It is the segmentation prediction after CA+nearest perturbation.
[0018] (2) Improve the labeled consistency loss function.
[0019] The labeled consistency loss function is used to evaluate the difference between the prediction and the label. The traditional labeled consistency loss directly uses the predicted segmentation result and the label to perform cross entropy loss and Dice loss. It is specifically expressed as:
[0020]
[0021] Where L ce and L dice Represent cross entropy loss and Dice loss respectively, represents the segmentation prediction result of the k-th branch, label represents the true label. Since the network model has 4 branches, each branch needs to calculate the cross entropy loss and Dice loss. k represents the k-th branch, and K represents the total number of branches. Take K=4.
[0022] When the segmentation target accounts for a large proportion of the overall image, the high confidence area accounts for a large proportion, and the low confidence area of the segmentation boundary accounts for a small proportion. However, clearly segmenting the low confidence area of the boundary is the key issue of the segmentation task. Only using the two-dimensional spatial feature information of the real label for consistency constraints pays more attention to the high confidence area with a large proportion, and underestimates the importance of the low confidence area of the segmentation boundary.
[0023] In order to increase the attention paid to the low-confidence region of the segmentation boundary and obtain a more accurate segmentation boundary, the labeled consistency loss function is improved and a low-confidence region loss function is proposed. The traditional boundary loss function can increase the attention paid to the low-confidence region and punish the segmentation model for incorrect prediction of the target boundary, but the boundary loss function only applies higher weights to the boundary pixels and does not pay enough attention to other low-confidence regions. The boundary loss function judges the difference between the predicted boundary and the label boundary based on the boundary information of the true label. Taking the boundary information of the true label as the guide will make the model overly dependent on the boundary information of the true label. The improved low-confidence region loss function is dominated by the low-confidence region of the segmentation prediction, and reversely evaluates the difference between the low-confidence region in the segmentation prediction and the same region in the true label. The specific steps are:
[0024] ①Determine the low confidence region of the segmentation prediction results,
[0025]
[0026] Low(u,v) indicates the prediction confidence of the coordinates (u,v) in a branch segmentation prediction map. When Low(u,v)=1, it means that the prediction at the coordinates (u,v) is at low confidence. The original image and mask size are 512x512, so u,v∈[0,512]. It represents the segmentation prediction when the coordinates in a branch segmentation prediction map are (u, v). δ and ξ are hyperparameters. The low confidence value range is determined by adjusting δ and ξ. In the segmentation task, the low confidence area is at the boundary. It cannot be clearly classified as the region of interest or the background area at the pixel level. At this time, the prediction probability of the region of interest and the background area is about 0.5, so the area with the prediction probability in the range of (0.45, 0.55) is selected as the low confidence interval. Take δ = 0.45, ξ = 0.55. By traversing and finding the points where the segmentation prediction of each coordinate of the segmentation prediction map is in the range of (δ, ξ), the low confidence area matrix Low can be obtained. The segmentation model has a total of 4 branches, and each branch needs to calculate the low confidence area.
[0027] ② Get the prediction of the low confidence area of the segmentation prediction result and the true label of the corresponding area:
[0028]
[0029] Low_label=label*Low (5)
[0030] Where Low_y represents the prediction of the low confidence area of the segmentation prediction map, and Low_label represents the true label of the area corresponding to the low confidence area. It represents the segmentation prediction result of a branch, label represents the true label, and the segmentation model has 4 branches in total. Each branch needs to calculate the prediction of the low confidence area and the true label of the corresponding area.
[0031] ③The low confidence region loss function is used to evaluate the difference between the low confidence region in the segmentation prediction and the same region in the true label, which is specifically expressed as:
[0032]
[0033] Where L low represents the low confidence region loss, L ce represents the cross entropy loss, Low_y k Represents the prediction of the low confidence region of the segmentation prediction result of the kth branch, Low_label k Indicates the true label of the area corresponding to the low confidence region of the k-th branch. Since the segmentation model has 4 branches, all 4 branches have low confidence regions, and each branch needs to calculate the low confidence region loss. k represents the k-th branch, and K represents the total number of branches. K = 4.
[0034] The labeled consistency loss function is specifically expressed as:
[0035] L sup =αL low +βL original (7)
[0036] Where L sup Indicates that there is label consistency loss, L low represents the low confidence region loss, L original Indicates the use of the predicted segmentation results and labels for cross entropy loss and Dice loss, α, β are hyperparameters. Take α = 0.7, β = 0.3.
[0037] (3) Improve the unlabeled cross-consistency loss function.
[0038] The unlabeled cross-consistency loss function is used to evaluate the differences between network model predictions of different perturbation methods. The loss function of the unlabeled cross-consistency is to minimize the differences between soft pseudo-labels between different branches, and improve the unlabeled cross-consistency loss function to enhance the ability of the network model to utilize unlabeled images. The present invention introduces a cross-combination of two perturbation methods to perturb the encoder, and the four branches are CBAM_b, CA_b, CBAM_n, and CA_n. The decoder of the CBAM_b and CA_n perturbation methods is the main decoder, and the decoder introducing the CBAM_n and CA_b perturbation methods is the auxiliary decoder, which serves as an auxiliary bridge to perform consistency regularization on the main decoders CBAM_b and CA_n. Using the predictions of the auxiliary branches as pseudo-labels to supervise the main branches will avoid overfitting deviations in each branch. and As a bridge with a common perturbation mode in the middle, it ultimately forces the two models with different upsampling and different attention mechanism perturbations to predict the output and The specific and Supervision and Supervision and Mutual supervision. Figure 3 (c) and right When supervision is performed, it is represented by L CBAM_b , and right When supervision is performed, it is represented by L CA_n , and Mutual supervision is denoted as L major The specific expression is:
[0039]
[0040] Where L C represents the mean square error, LCBAM_b Indicates that the two auxiliary branch results supervise the main decoder CBAM_b, L CA_n Indicates that the two auxiliary branch results supervise the main decoder CA_n, L major Indicates that the results of the two main decoders are mutually consistent, and finally L UN represents the total unlabeled cross-consistency loss.
[0041] The goal of the semi-supervised semantic segmentation model is to minimize the total loss function, which is specifically expressed as:
[0042] min(L sup +λL UN )(12)
[0043] Where L sup Indicates that there is label consistency loss, L UN represents the unlabeled cross-consistency loss and λ is a hyperparameter.
[0044] First, we use the labeled tooth dataset for training and save the best model parameters for tooth segmentation. Then we use the labeled root canal dataset for training and save the best model parameters for root canal segmentation. We use the trained tooth and root canal prediction models to test the small tooth slices in the test set and obtain the segmentation results of the tooth area and root canal area respectively. The segmentation results are shown in Figure 2. Figure 4 As shown, Figure 4 (a) is the original image; Figure 4 (b) is a segmented tooth; Figure 4 (c) is a segmented root canal; Figure 4 (d) is the extracted root canal area.
[0045] 2. Segmentation-based root canal filling quality assessment algorithm
[0046] The two main factors that affect the quality of root canal filling are the filling degree of the apical area and the density of the root canal filling. The standard for evaluating the quality of root canal filling based on the filling degree of the apical area is: if the distance from the root apex to the tooth apex is less than or equal to 2mm on the X-ray film, it is just filled, and if it is greater than 2mm, it is underfilled; if the root apex exceeds the tooth, it is overfilled. On the other hand, the standard for evaluating the quality of root canal filling based on the density of the root canal filling is: if there are dark holes or breaks in the bright root canal area on the X-ray film, it is not densely filled.
[0047] Overfilling assessment requires the apex point and segmented teeth, underfilling and adequate filling assessment requires the apex, cusp and 2mm information, and non-dense assessment requires non-dense area information. Therefore, the root canal filling quality assessment is divided into 3 steps, namely overfilling assessment, underfilling and adequate filling assessment, and non-dense assessment. Figure 5 Evaluate the results for overfilled, underfilled, and properly filled root canals; Figure 5 (a) is the original image; Figure 5 (b) From left to right, the evaluation results of root canal filling, overfilling, overfilling, and overfilling are shown respectively; Figure 5 (c) is the original image; Figure 5 (d) is the result of root canal underfilling assessment.
[0048] 1. Overfill assessment
[0049] All the segmented root canals are independent areas. The t root canal contours in the small tooth film are traversed, and the lowest point of each root canal contour is the apex position of each root canal in the small tooth film. That is, the point where each independent contour v0 is the largest. Where T represents the number of root canals in a small dental film, A t (u0, v0) represents the coordinates of the tth root apex. The origin of the coordinates is at the upper left vertex of the small tooth film. The right side of the origin is the positive direction of the horizontal axis, and the bottom of the origin is the positive direction of the longitudinal axis.
[0050] Assign a value of 1 to all apex points, traverse all apexes, and perform AND operation on the apex with coordinates (u0, v0) and the value of the segmented tooth region with coordinates (u0, v0). Since the tooth region is 1, the background is 0, and the apex point is 1, when the AND operation is performed, the true value is 1, which means that the apex is inside the tooth, indicating that the apex does not extend beyond the tooth; otherwise, it means that the apex extends beyond the tooth, and the root canal that extends beyond the tooth is evaluated as overfilled, and the non-dense evaluation is continued. The root canal with the apex inside the tooth needs to be further evaluated to see whether it is underfilled or just filled. The overfilling result is shown in Figure 5 (b) There are four root canals, and the second, third, and fourth canals from left to right are all overfilled.
[0051] 2. Underfill and overfill assessment
[0052] Since the resolution of each small dental film is different, the evaluation indicator of 2mm cannot be quantified by resolution. However, the actual physical size of all small dental films is fixed, assuming it is H×W, with the longer side being H and the shorter side being W. It is necessary to obtain the number of pixels n represented by the actual physical size of the small dental film 2mm to facilitate subsequent evaluation. Assuming that the pixel resolution of each small dental film is h×w, and the side with a larger pixel resolution is h, and the side with a smaller pixel resolution is w, the small dental film has an outer border. Based on the calculation in the h direction, the width of the two outer borders needs to be subtracted, and the fixed pixel of the outer border is set to q.
[0053] According to the proportionality of the corresponding sides, the corresponding proportional relationship is shown in (13):
[0054]
[0055] Where n represents the number of pixels contained in the actual physical size of 2mm of each small dental film image.
[0056] The calculation formula for each small dental film image with an actual physical size of 2 mm and containing n pixels is shown in (14):
[0057]
[0058] Since the teeth are closely arranged, the teeth obtained by semantic segmentation are not independent regions, and it is impossible to directly find the lowest point of the contour to obtain the position of the tooth cusp. However, all the tooth cusps are at the lower end of the teeth. Based on the characteristic that all the tooth cusps are at the lower end of the teeth, the position of the tooth cusp corresponding to the root canal in the small tooth film is obtained. The specific steps are:
[0059] ① Assume that Y represents the test set segmentation result. Take each pixel point in the lowest row of the segmentation result Y as the starting point, move vertically from bottom to top, and move upward row by row until you encounter a point where the pixel value changes from 0 to 255. Save the coordinates of this point as Where S represents the number of points, E s (i,j) represents the coordinates of the sth point.
[0060] ② Sort them from left to right according to the horizontal axis and connect them in sequence to form curve Q.
[0061] ③ Since the vertical positive direction is below the origin, all the tooth tips are at the lower end of the teeth, so find the maximum point according to the curve Q, and save each maximum point on the curve Q as the tooth tip position Where Z represents the number of maximum points, B z (i,j) represents the coordinates of the zth maximum point.
[0062] ④ Calculate the position of the tooth apex corresponding to each root canal. Since the tooth apex corresponding to the root apex exists within a certain range around the horizontal coordinate of the root apex, take each root apex position A t (u0, v0) as the center, on all tooth cusps Select the maximum point in the range of horizontal coordinate i∈[u0-fw,u0+fw] from the set as A t (u0, v0) corresponds to the tooth tip position B t (u1, v1), t represents the tth root canal in the small tooth. Take fw = 100, and use represents the set of cusps corresponding to all root canals, and T represents the total number of root canals.
[0063] The t-th root apex coordinate and the corresponding tooth apex coordinate are obtained in sequence according to the increasing direction of the transverse coordinate u0, and the distance between the root apex and the corresponding tooth apex is calculated according to the root apex coordinate and the corresponding tooth apex coordinate. The specific formula is:
[0064]
[0065] According to the distance D of each root canal tThe root canals in the small dental films were evaluated one by one to determine whether all the root canals in the small dental films were underfilled or adequately filled. t When ≥n, the distance between the root apex and the tooth apex exceeds 2mm, and the root canal is evaluated as underfilled. t When <n, the root canal is evaluated as properly filled, where n is the number of pixels contained in the actual physical size of 2mm of each small dental film image. Figure 5 (b) There are 4 root canals, and the first canal from left to right is just filled. Figure 5 (d), the distance D between the root tip and the tooth tip t =144, the original resolution of the small tooth film is 1252x1628, the outer frame resolution is 20, and the actual physical size is 40.4*31mm, so according to formula (14), n≈78, D t >n, the root canal is assessed as underfilled.
[0066] 3. Assessment of root canal non-density
[0067] The grayscale levels of the non-dense area and the root canal area of each small tooth film are inconsistent, and it is impossible to directly perform global threshold segmentation on all root canals to obtain the non-dense area. In order to find a suitable segmentation threshold, a root canal adaptive threshold segmentation method is proposed. The specific steps are:
[0068] ① In the small tooth film based on X-ray technology, the root canal filling material appears bright white, and the non-dense area is relatively dark. In order to highlight the difference between the non-dense dark area and the bright root canal area, the root canal area extracted by segmentation is firstly gamma enhanced, and the image contrast is improved by nonlinear transformation. The grayscale of the non-dense area is made darker by gamma enhancement technology. The specific formula is shown in (16):
[0069]
[0070] Where I represents the input image, and O represents the enhanced output. The original grayscale distribution is concentrated in a narrow range, resulting in an unclear contrast in the image. When γ>1, the narrow grayscale range in the image will be stretched and expanded to enhance the contrast between the areas with higher grayscale and those with lower grayscale. When γ=2, there is a clear difference between the non-dense dark area and the bright area of the root canal. The comparison of the root canal area before and after gamma enhancement is shown in Figure 2. Figure 6 , Figure 6 (a) is the root canal without enhancement. Figure 6 (b) The root canal after gamma enhancement.
[0071] ② Figure 7 It is the process of calculating the adaptive threshold value for the root canal; Figure 7 (a) Histogram is the gray level histogram. Figure 7 (b)CDF is the gray level cumulative distribution diagram, Figure 7(c) First Derivative is the first-order derivative curve after smoothing the cumulative distribution graph. Figure 7 (d) Second Derivative is the curve obtained by taking the derivative of the smoothed first-order curve. After gamma enhancement, there is a clear difference between the non-dense dark area and the bright root canal area. The grayscale levels of the non-dense area and the root canal area of each small tooth film are different. It is impossible to perform global threshold segmentation on all root canals to obtain the non-dense area. It is necessary to analyze the grayscale of the root canal area. Therefore, the histogram is used to statistically analyze the distribution of the grayscale of the enhanced root canal area. The grayscale histogram is shown in Figure 7 (a). The non-dense area is darker and has a lower grayscale, while the root canal area is brighter and has a higher grayscale. Therefore, taking the grayscale at the time when the histogram changes most rapidly from dark to bright as the segmentation threshold can better segment the non-dense area. However, the histogram fluctuates greatly, and it is impossible to directly calculate the position where the change from dark to bright is most rapid.
[0072] ③ In order to solve the problem that the histogram fluctuates greatly and the position where the change from dark to bright is fastest cannot be calculated, the cumulative distribution function (CDF) of the histogram is first calculated. The CDF of the grayscale cumulative distribution diagram is shown in Figure 7 (b).
[0073] ④ Smooth the cumulative distribution function to reduce noise and fluctuations. Use the Savitzky-Golay filter to smooth the cumulative distribution function. The specific formula is:
[0074]
[0075] Where CDF is the cumulative distribution function of the histogram, cdf a is the filtered value of the ath data point, M is a hyperparameter, which is the half-window size of the filter and is used to specify the number of data points around each data point for fitting the polynomial, CDF a+b Indicates the bth data point around the ath data point for fitting the polynomial. b is the coefficient of the polynomial fitting. Take M=13.
[0076] ⑤ Calculate the first derivative curve of the smoothed cumulative distribution function First Derivative Figure 7 (c) Then, the derivative of the smoothed first-order derivative is obtained as the Second Derivative. Figure 7 (d) The position where the histogram changes most rapidly from dark to bright is located at the maximum peak of the curve in Second Derivative. The grayscale value at the maximum peak of Second Derivative is taken as the threshold H for threshold segmentation.
[0077] ⑥ Figure 8 for non-density assessment processes and outcomes; Figure 8 (a) is the image before threshold segmentation. Figure 8 (b) is the result after threshold segmentation. Figure 8 (c) is a non-dense area. Threshold segmentation is performed on the root canal area. The grayscale value of the pixel value in the root canal area is less than or equal to the segmentation threshold Th is 0, and the grayscale value of the pixel value in the root canal area is greater than the segmentation threshold Th is 255. Then the darker non-dense area is 0, and the root canal area is 1. The threshold segmentation result is shown in Figure 8 (b).
[0078] ⑦ Traverse each root canal contour and perform morphological area filling for each root canal area after threshold segmentation. Since the grayscale value of the non-dense area is 0, the non-dense area after filling becomes 255. Subtract the area after filling from the area before filling. The area with a grayscale value of 255 in the result image is represented as a non-dense area. If there is a non-dense area, this root canal is evaluated as non-dense. The detected non-dense area is shown in Figure 8 (c).
[0079] In order to achieve the purpose of the present invention, the technical solution adopted by the present invention includes the following steps:
[0080] S1: Construct a semi-supervised semantic segmentation model. The segmentation model includes an improved 4-branch network and an improved consistency constraint function. The 4-branch network consists of a shared encoder and 4 decoders. Different upsampling and different attention cross perturbations are performed on the 4 decoders to form a 4-branch network structure with double upsampling and double attention cross perturbations. The improved consistency constraint function includes an improved labeled consistency loss function and an improved unlabeled cross mutual consistency loss function.
[0081] S2: Improve the labeled consistency loss function and introduce the low confidence region loss function, which takes the low confidence region of the segmentation prediction as the main factor and evaluates the difference between the low confidence region in the segmentation prediction and the same region in the true label.
[0082] S3: Improve the unlabeled cross-consistency loss function, use two auxiliary branches as bridges to constrain the prediction outputs of the two main branches to remain consistent, specifically: and Supervision and Supervision and Supervise each other. and As a bridge with a common perturbation method in the middle, it ultimately encourages the prediction output of the model with two different upsampling and different attention mechanism perturbations and Consistent.
[0083] S4: First, use the labeled tooth dataset for training and save the best model parameters for tooth segmentation. Then use the labeled root canal dataset for training and save the best model parameters for root canal segmentation. Use the trained tooth and root canal prediction model to test the small tooth slices in the test set. Adjust the small tooth slices in the test set to a uniform size (512x512) to match the prediction model input requirements, and obtain the segmentation prediction probability map of the four branches. Superimpose the prediction results of the two main branches and average them. Finally, restore them to the original image pixel size for subsequent evaluation, and obtain the final tooth segmentation binary map, extracted root canals and evaluation indicators.
[0084] S5: Traverse each root canal contour, find the lowest point in each contour and save the position information. The lowest point in each contour is determined as the apex position of each root canal in the small tooth film. Traverse all apex positions. When the apex position is ANDed with the segmented tooth area, if the true value is 1, it means that the apex is inside the tooth; otherwise, it means that the apex exceeds the tooth. The root canal that exceeds the tooth is evaluated as overfilled, and then the non-dense evaluation is performed according to S7. The root canal with the apex inside the tooth needs to be further evaluated according to S6 to see whether it is underfilled or just filled.
[0085] S6: Obtain the number of pixels representing the actual physical size of 2 mm of the small dental film according to formula (14). Take each pixel point of the lowest row of the segmentation result Y as the starting point, move from bottom to top in the vertical direction, and move up row by row until you encounter a point where the pixel value changes from 0 to 255, and save the coordinates of the point. Sort the saved point coordinates from left to right by the horizontal coordinate, and connect them in sequence to form a curve Q. Find the minimum point according to the curve Q, and save each minimum point on the curve Q as the cusp position. Calculate the position of the cusp corresponding to each root canal. Since the cusp corresponding to the root apex must be within the range of the root apex horizontal coordinate, with each root apex position as the center, select the point in the range of the horizontal coordinate i∈[u0-fw,u0+fw] from all cusp sets as the cusp position corresponding to the root apex. Calculate the distance between the root apex and the corresponding cusp according to the root apex coordinates and the corresponding cusp coordinates, and calculate the distance between the root apex and the corresponding cusp according to the distance D between the root apex and the cusp. t The root canals in the small dental films were evaluated one by one to determine whether all the root canals in the small dental films were underfilled or adequately filled. t When ≥n, the distance between the root apex and the tooth apex exceeds 2mm, and the root canal is evaluated as underfilled. t When <n, the root canal is evaluated as adequately filled. Then the root canal is evaluated as not dense according to S7.
[0086] S7: According to formula (16), gamma enhancement is performed on the root canal area extracted by S4 segmentation. The grayscale of the non-dense area is made darker by gamma enhancement technology. γ=2 is taken, and there is a clear difference between the non-dense dark part and the bright part of the root canal. The histogram and cumulative distribution function (CDF) of the enhanced image are calculated, the cumulative distribution function is smoothed, the first-order derivative of the smoothed cumulative distribution function and the derivative after smoothing the first-order derivative are calculated, and the maximum peak of the Second Derivative curve is taken as the threshold of threshold segmentation to realize automatic acquisition of the segmentation threshold of the root canal area. The root canal area is threshold segmented. The grayscale value of the pixel value in the root canal area is less than or equal to the segmentation threshold Th is 0, and the grayscale value of the pixel value in the root canal area is greater than the segmentation threshold Th is 255, and the root canal after threshold segmentation is obtained.
[0087] S8: traverse each root canal contour after the threshold segmentation obtained in S7, perform morphological region filling on each root canal area, and subtract the filled area from the area before filling. Since the gray value of the non-dense area is 0, the non-dense area after filling becomes 255. Subtract the filled area from the area before filling. The area with a gray value of 255 in the result image is represented as a non-dense area. If there is a non-dense area, the root canal is evaluated as non-dense.
[0088] The beneficial effects of the present invention are as follows: First, the present invention provides a medical image segmentation algorithm based on semi-supervised learning, which perturbs the network structure by cross-combining different upsampling and different attention mechanisms, and encourages the consistency of different prediction outputs of two different perturbation combinations. This algorithm can not only be applied to the field of tooth segmentation, but can also be extended to other medical image segmentation fields. Secondly, the present invention provides a tooth root canal filling quality assessment algorithm based on segmentation, which can quickly assess the root canals with overfilling, underfilling and non-dense problems, and improve the time-consuming and low assessment efficiency of tooth root canal filling quality assessment.
[0089] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:
[0091] Figure 1 Flowchart for quality assessment of root canal fillings;
[0092] Figure 2 for improved encoder and decoder structures;
[0093] Figure 3 It is an image segmentation model based on semi-supervised learning; Figure 3 (a) is a 4-branch network structure with double upsampling and double attention mechanism cross perturbation; Figure 3 (b) There is a label consistency constraint; Figure 3 (c) is the unlabeled cross-consistency constraint;
[0094] Figure 4 is the segmentation result; Figure 4 (a) is the original image. Figure 4 (b) is a segmented tooth, Figure 4 (c) is a segmented root canal. Figure 4 (d) is the extracted root canal area;
[0095] Figure 5 Provide assessment results for overfill, underfill and exact fill; Figure 5 (a) is the original image; Figure 5 (b) is the result of the assessment of just-filled, over-filled, over-filled, or over-filled; Figure 5 (c) is the original image; Figure 5 (d) is the result of underfill assessment;
[0096] Figure 6 This is a comparison of the root canal before and after gamma enhancement; Figure 6 (a) is the root canal without enhancement. Figure 6 (b) is the root canal after gamma enhancement;
[0097] Figure 7 It is the process of calculating the adaptive threshold value for the root canal; Figure 7 (a) Histogram is the gray level histogram. Figure 7 (b)CDF is the gray level cumulative distribution diagram, Figure 7 (c) First Derivative is the first-order derivative curve after smoothing the cumulative distribution graph. Figure 7 (d) Second Derivative is the curve obtained by taking the derivative of the smoothed first-order curve;
[0098] Figure 8 for non-density assessment processes and outcomes; Figure 8 (a) is the image before threshold segmentation. Figure 8 (b) is the result after threshold segmentation. Figure 8 (c) is the non-dense area. DETAILED DESCRIPTION
[0099] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0100] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.
[0101] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "front", "rear", etc. indicate the orientation or position relationship, they are based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.
[0102] Figure 1 The present invention is a flowchart of a tooth root canal filling quality assessment method based on improved semi-supervised image segmentation.
[0103] The following is an example of a tooth root canal filling quality assessment process based on improved semi-supervised image segmentation. In this example, about 1,000 small tooth films are obtained by sampling teeth after root canal filling, including several small tooth films with overfilling, underfilling and non-density problems.
[0104] Divide the small tooth film dataset. The small tooth film images after root canal filling surgery are used as the tooth root canal filling quality assessment dataset, and the dataset is divided into training set, validation set and test set according to 7:2:1. The training set is divided into labeled training set and unlabeled training set according to 1:4. Expand the training set. In order to improve the generalization ability of the semi-supervised segmentation model and avoid overfitting, data augmentation technology is used to rotate and flip the training set. By rotating, horizontally or vertically flipping the small tooth film images, more diverse training samples can be generated, so that the model can better learn the characteristics of teeth and root canals at different angles and directions. The corresponding labels also need to be transformed accordingly to maintain label consistency.
[0105] Annotated small dental film dataset. Segment and annotate the annotated training set, validation set, and test set, annotate the tooth area and root canal area respectively, and convert the annotated json file into a mask image. The small dental film training set includes annotated image data and unannotated image data. The annotated image data in the training set accounts for 20%, and the validation set and test set only have annotated image data.
[0106] Build a semi-supervised semantic segmentation model. Figure 2 and Figure 3 As shown. The decoder is perturbed by cross-combining the two perturbation methods of upsampling and attention mechanism to form a 4-branch network structure of double upsampling and double attention mechanism cross-perturbation. The upsampling method uses linear interpolation (bilinear) and nearest interpolation (nearest). The attention mechanism uses CBAM and position attention mechanism (CA). There are 4 perturbation methods after cross-combination, namely CBAM+bilinear, CA+bilinear, CBAM+nearest, CA+nearest. The improved low confidence region loss function is dominated by the low confidence region of the segmentation prediction, and reversely evaluates the difference between the low confidence region in the segmentation prediction and the same region in the true label. In the segmentation task, the low confidence region is at the boundary, and it cannot be clearly divided into the region of interest or the background region during pixel-level classification, so the region with a prediction probability in the range of (0.45, 0.55) is selected as the low confidence region. The improved unlabeled cross-consistency loss function uses two auxiliary branches as a bridge to constrain the prediction outputs of the two main branches to remain consistent. Specifically: and Supervision and Supervision and Supervise each other. and As a bridge with a common perturbation method in the middle, it ultimately encourages the prediction output of the model with two different upsampling and different attention mechanism perturbations and Consistent.
[0107] Perform optimization training and save model parameters. First, the training set and validation set need to be normalized. Each small tooth film has high resolution and different resolutions. The input original image is adjusted to a uniform size (512x512) and input into the 4-branch network. After Softmax, the segmentation predictions of the 4 branches are obtained. The overall training goal of the model is to minimize the consistency constraint function, determine the weight coefficient and hyperparameters, and select the best model as the prediction model based on the performance of the validation set. Finally, save the model parameters with the best verification results. First, use the dataset composed of tooth-annotated masks for training and save the best model parameters for tooth segmentation. Then use the dataset composed of root canal-annotated masks for training and save the best model parameters for root canal segmentation.
[0108] The trained tooth and root canal prediction model was used to test the small tooth films in the test set. The small tooth films in the test set were adjusted to a uniform size (512x512) to match the prediction model input requirements, and the segmentation prediction probability maps of the two main branches were obtained. The prediction results of the two main branches were superimposed and averaged, and finally restored to the original image pixel size for subsequent evaluation to obtain the final segmentation binary image. The Dice coefficient, average Jaccard coefficient, and average surface distance ASD were output as evaluation indicators. The test set was feature extracted through the binary image to obtain the segmentation results of the tooth area and the root canal area, respectively. The segmentation results are shown in Figure 2. Figure 4 shown.
[0109] 1. Overfill assessment.
[0110] All segmented root canals are independent regions. Traverse the t root canal contours in the small tooth film, and take the lowest point of each root canal contour as the apex position of each root canal in the small tooth film. Traverse all apex positions. When the apex position is ANDed with the segmented tooth region, the true value is 1, which means the apex is inside the tooth; otherwise, it means the apex exceeds the tooth. The root canal that exceeds the tooth is evaluated as overfilled, and go to step 3 for non-dense evaluation. For the root canal with the apex inside the tooth, go to step 2 for further evaluation to see if it is underfilled or just filled.
[0111] 2. Underfill or overfill assessment.
[0112] The actual physical size of all small dental films is fixed. In this embodiment, the physical size of the small dental film is 40.4*31mm. The pixel resolution of each small dental film is not fixed. According to formula (14), the number of pixels n represented by the actual physical size of the small dental film 2mm is obtained. According to the obtained n pixels represented by 2mm,
[0113] Starting from each pixel point in the lowest row of the segmentation result Y, move vertically from bottom to top, row by row until a point is encountered where the pixel value changes from 0 to 255, save the coordinates of the point and do not move upward; otherwise, continue to move upward until it reaches the first row. Sort the saved point coordinates from left to right by the horizontal coordinate and connect them in sequence to form a curve Q. Find the minimum point based on curve Q, and save each minimum value on curve Q as the tooth tip position.
[0114] Calculate the position of the tooth cusp corresponding to each root canal. Since the tooth cusp corresponding to the root cusp must be within the range of the root cusp horizontal coordinate, take each root cusp position as the center, select the point within the range of the horizontal coordinate i∈[u0-fw,u0+fw] from all the tooth cusp sets as the tooth cusp position corresponding to the root cusp. Take fw=100.
[0115] The distance between the root apex and the corresponding tooth apex is calculated based on the root apex coordinates and the corresponding tooth apex coordinates. The root canals in the small dental film are evaluated in turn based on the distance between the root apex and the tooth apex to evaluate whether all the root canals in the small dental film are underfilled or just filled. t When ≥n, the distance between the root apex and the tooth apex exceeds 2mm, and the root canal is evaluated as underfilled. t When the value is less than n, the root canal is considered adequately filled. Continue with step 3 for poor filling assessment.
[0116] 3. Not a dense assessment.
[0117] In the small tooth film based on X-ray technology, the root canal filling material appears bright white, and the non-dense area is relatively dark. The grayscale of the non-dense area is made darker by gamma enhancement technology. According to formula (16), the root canal area extracted by segmentation is gamma enhanced. The grayscale of the non-dense area is made darker by gamma enhancement technology. When γ=2, there is a clear difference between the non-dense dark part and the bright part of the root canal.
[0118] Calculate the histogram of the enhanced image. Use the histogram to statistically analyze the grayscale distribution of the enhanced root canal area. In order to solve the problem that the histogram fluctuates greatly and the position where the change from dark to bright is the fastest cannot be calculated, the cumulative distribution function (CDF) of the histogram is calculated to further analyze the grayscale distribution of the image.
[0119] The cumulative distribution function is smoothed according to formula (17) to reduce noise and fluctuation. The cumulative distribution function is smoothed using a Savitzky-Golay filter. The window size M is taken as 13.
[0120] Calculate the First Derivative curve and the Second Derivative curve of the smoothed cumulative distribution function. The position where the dark part changes most rapidly to the bright part is located at the maximum peak of the Second Derivative curve. The maximum peak of the Second Derivative curve is taken as the threshold for threshold segmentation.
[0121] The root canal area is segmented by threshold value. The grayscale value of the pixel value in the root canal area is less than or equal to the segmentation threshold Th, and the grayscale value of the pixel value in the root canal area is greater than the segmentation threshold Th is 255, and the threshold segmentation result is obtained.
[0122] Traverse each root canal contour, perform morphological region filling on each root canal area after threshold segmentation, and subtract the filled area from the area before filling. Since the gray value of the non-dense area is 0, the non-dense area after filling becomes 255. Subtract the filled area from the area before filling, and the area with a gray value of 255 in the result image is represented as a non-dense area. If there is a non-dense area, this root canal is evaluated as non-dense.
[0123] The results show that the improved segmentation algorithms based on semi-supervised learning can correctly classify the teeth and root canal areas in small dental films as target areas, and can correctly reflect the shapes of teeth and root canals. Since all parameters in the above steps are automatically calculated, this method can automatically segment teeth and root canals. Then, based on the segmented teeth and root canal results, the overfilling, underfilling and non-density of root canals in small dental films can be automatically and accurately evaluated.
[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.
Claims
1. A tooth root canal filling quality assessment method based on semi-supervised semantic segmentation, characterized by: The method comprises the following steps: S1: Construct a semi-supervised semantic segmentation model. The semi-supervised semantic segmentation model includes an improved 4-branch network and an improved consistency constraint function. The 4-branch network consists of a shared encoder and 4 decoders. Different upsampling and different attention cross-perturbations are performed on the 4 decoders to form a 4-branch network structure with double upsampling and double attention cross-perturbations. The input original image is adjusted to a uniform size and input into the 4-branch network. After Softmax, the segmentation prediction results of the 4 branches are obtained. The prediction result of a branch is expressed as: represents the segmentation prediction result of a branch, x is the input image, μ is the attention mechanism perturbation, and η is the upsampling method perturbation; specifically, the input attention mechanism μ1 adopts CBAM, μ2 adopts the position attention mechanism, the upsampling method η1 adopts linear interpolation, and η2 adopts the nearest interpolation, so 4 different segmentation prediction results are obtained. It is the segmentation prediction after CBAM+ linear interpolation perturbation, is the segmentation prediction after CA+ linear interpolation perturbation, is the segmentation prediction after CBAM+ recent interpolation perturbation, is the segmentation prediction after CA + the most recent interpolation perturbation; S2: Improve the labeled consistency loss function and introduce the low confidence region loss function, which takes the low confidence region of the segmentation prediction as the main factor and evaluates the difference between the low confidence region in the segmentation prediction and the same region in the true label; S3: Improve the unlabeled cross-consistency loss function, using two auxiliary branches as bridges to constrain the prediction outputs of the two branches to remain consistent. Specifically: and Supervision and Supervision and Monitor each other, and As a bridge with a common perturbation method in the middle, it ultimately encourages the prediction output of the model with two different upsampling and different attention mechanism perturbations and Consistency; S4: First, use the labeled tooth dataset for training and save the best model parameters for tooth segmentation. Then use the labeled root canal dataset for training and save the best model parameters for root canal segmentation. Use the trained tooth and root canal prediction model to test the small tooth slices in the test set. Adjust the small tooth slices in the test set to a uniform size to match the prediction model input requirements to obtain the segmentation prediction probability map of the four branches. Superimpose the prediction results of the two main branches and average them. Finally, restore them to the original image pixel size for subsequent evaluation to obtain the final tooth segmentation binary map, extracted root canals and evaluation indicators. S5: traverse each root canal contour, find the lowest point in each contour and save the position information. The lowest point in each contour is determined as the apex position of each root canal in the small tooth film; traverse all apex positions, and when the apex position is ANDed with the segmented tooth area, if the true value is 1, it means that the apex is inside the tooth, otherwise it means that the apex exceeds the tooth. The root canal exceeding the tooth is evaluated as overfilled, and then the non-dense evaluation is performed according to S7; the root canal with the apex inside the tooth needs to be further evaluated according to S6 to see whether it is underfilled or just filled; S6: According to The longer physical size side is H, the shorter physical size side is W, h represents the side with a larger pixel resolution, q represents the number of pixels of the outer frame, and it is necessary to obtain the number of pixels n represented by the actual physical size of the small tooth film 2mm to facilitate subsequent evaluation; obtain the number of pixels represented by the actual physical size of the small tooth film 2mm, take each pixel point of the lowest row of the segmentation result Y as the starting point, move from bottom to top in the vertical direction, move up row by row until encountering a point where the pixel value changes from 0 to 255, and save the coordinates of the point; save the point coordinates in the horizontal direction The marks are sorted from left to right and connected in sequence to form a curve Q. The minimum point is found according to the curve Q, and each minimum value on the curve Q is saved as the cusp position; the position of the cusp corresponding to each root canal is calculated. Since the cusp corresponding to the root apex must exist within the left and right range of the root apex horizontal coordinate, with each root apex position as the center, select the point within the range of the horizontal coordinate i∈[u0-fw,u0+fw] from all cusp sets as the cusp position corresponding to the root apex; the distance between the root apex and the corresponding cusp is calculated according to the root apex coordinates and the corresponding cusp coordinates, and the distance D between the root apex and the cusp is calculated according to the distance D between the root apex and the cusp. t The root canals in the small dental films were evaluated one by one to determine whether all the root canals in the small dental films were underfilled or properly filled. t When ≥n, the distance between the root apex and the tooth apex exceeds 2mm, and the root canal is evaluated as underfilled. t When <n, the root canal is assessed as adequately filled, and then assessed as not dense according to S7; S7: According to I represents the gray value of the input image. Gamma enhancement is performed on the root canal area extracted by S4 segmentation. The gray scale of the non-dense area is made darker by gamma enhancement technology. γ=2 is taken, and there is an obvious difference between the non-dense dark part and the bright part of the root canal. The histogram and cumulative distribution function CDF of the enhanced image are calculated. The cumulative distribution function is smoothed, and the first-order derivative and second-order derivative of the smoothed cumulative distribution function are calculated. The maximum peak value of the second-order derivative of CDF is taken as the threshold of threshold segmentation, so as to realize automatic acquisition of the segmentation threshold of the root canal area; threshold segmentation is performed on the root canal area. The gray scale value of the pixel value in the root canal area is less than or equal to the segmentation threshold Th is 0, and the gray scale value of the pixel value in the root canal area is greater than the segmentation threshold Th is 255, and the threshold segmentation result of the non-dense area is obtained; S8: traverse each root canal contour, check whether there are holes in the root canal area, perform morphological area filling on each root canal area, and subtract the area after filling from the area before filling. Since the non-dense area is 0, the area after filling is all 255. The area with a value of 255 after subtracting the area before filling is represented as a non-dense area. If there is a non-dense area, the root canal is evaluated as non-dense.
2. The tooth root canal filling quality assessment method based on semi-supervised semantic segmentation according to claim 1, characterized in that: In S2, the improved labeled consistency loss function is used to evaluate the difference between the prediction and the label; the traditional labeled consistency loss directly uses the predicted segmentation result and the label to perform cross entropy loss and Dice loss; specifically expressed as: Where L ce and L dice Represent cross entropy loss and Dice loss respectively, represents the segmentation prediction result of the k-th branch, label represents the true label; since the network model has 4 branches, each branch needs to calculate the cross entropy loss and Dice loss, k represents the k-th branch, K represents the total number of branches; take K = 4; To improve the labeled consistency loss function, the specific steps are as follows: ①Determine the low confidence region of the segmentation prediction results, Low(u,v) indicates the prediction confidence of the coordinates (u,v) in a branch segmentation prediction map. When Low(u,v)=1, it means that the prediction at the coordinates (u,v) is at the confidence level. The original image and mask size are 512x512, u,v∈[0,512]; Indicates the segmentation prediction when the coordinates in a branch segmentation prediction map are (u, v). δ and ξ are hyperparameters. The low confidence value range is determined by adjusting δ and ξ. In the segmentation task, the low confidence area is at the boundary. It cannot be clearly divided into the region of interest or the background area at the pixel level classification. The prediction probability of the region of interest and the background area is 0.
5. The area with the prediction probability in the range of (0.45, 0.55) is selected as the low confidence interval. Take δ = 0.45, ξ = 0.
55. Traverse and find the points in the range of (δ, ξ) for the segmentation prediction of each coordinate of the segmentation prediction map to obtain the low confidence area matrix Low. There are 4 branches in total, and each branch needs to calculate the low confidence area. ② Get the prediction of the low confidence area of the segmentation prediction result and the true label of the corresponding area: Low_label=label*Low (5) Where Low_y represents the prediction of the low confidence region of the segmentation prediction map, and Low_label represents the true label of the area corresponding to the low confidence region; It represents the segmentation prediction result of a branch, label represents the true label, there are 4 branches in total, each branch needs to calculate the prediction of the low confidence area and the true label of the corresponding area; ③The low confidence region loss function is used to evaluate the difference between the low confidence region in the segmentation prediction and the same region in the true label, which is specifically expressed as: Where L low represents the low confidence region loss, L ce represents the cross entropy loss, Low_y k Represents the prediction of the low confidence region of the segmentation prediction result of the kth branch, Low_label k Indicates the true label of the area corresponding to the low confidence region of the k-th branch; since the network model has 4 branches, all 4 branches have low confidence regions, and each branch needs to calculate the low confidence region loss, k represents the k-th branch, and K represents the total number of branches; K = 4; The labeled consistency loss function is specifically expressed as: L sup =αL low +βL original (7) Where L sup Indicates that there is label consistency loss, L low represents the low confidence region loss, L original Indicates the use of the predicted segmentation results and labels for cross entropy loss and Dice loss. α and β are hyperparameters; α = 0.7 and β = 0.
3.
3. The tooth root canal filling quality assessment method based on semi-supervised semantic segmentation according to claim 1, characterized in that: In S3, an improved unlabeled cross-consistency loss function is used to evaluate the difference between network model predictions of different perturbation methods; two perturbation methods are introduced to cross-combine and perturb the encoder, and the four branches are CBAM_b, CA_b, CBAM_n, and CA_n; The decoder with CBAM_b and CA_n perturbation mode is the main decoder, and the decoder with CBAM_n and CA_b perturbation mode is the auxiliary decoder, which acts as an auxiliary bridge to regularize the consistency of CBAM_b and CA_n; using the prediction of the auxiliary branch as a pseudo-label to supervise the main branch will avoid overfitting bias of each branch; and As a bridge with a common perturbation mode in the middle, it ultimately forces the two models with different upsampling and different attention mechanism perturbations to predict the output and consistent; specifically and Supervision and Supervision and Monitor each other; and right When supervision is performed, it is represented by L CBAM_b , and right When supervision is performed, it is represented by L CA_n , and Mutual supervision is denoted as L major ; The specific expression is: Where L C represents the mean square error, L CBAM_b Indicates that the two auxiliary branch results supervise the main decoder CBAM_b, L CA_n Indicates that the two auxiliary branch results supervise the main decoder CA_n, L major Indicates that the results of the two main decoders are mutually consistent, and finally L UN represents the total unlabeled cross-consistency loss; The goal of the semi-supervised semantic segmentation model is to minimize the total loss function, which is specifically expressed as: min(L sup +λL UN )(12) where L sup Indicates that there is label consistency loss, L UN represents the unlabeled cross-consistency loss and λ is a hyperparameter.
Citation Information
Patent Citations
Root canal therapy history detection model training method, image processing method and device
CN113792773A
Oral cavity image processing method and device, electronic equipment and computer storage medium
CN114187303A
