Root canal length determination method, device, equipment and medium

By using pre-trained root canal instance segmentation model and feature extraction model, combined with three-dimensional scanned images and feature maps, accurately positioning the root canal orifice and root canal acupoint, the problems of missegment and error in root canal length measurement are solved, achieving higher measurement accuracy and key point positioning accuracy.

CN119784675APending Publication Date: 2025-04-08BEIJING NATONG MEDICAL ROBOT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411647561.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The prior art has caused missegmentation problems due to individual differences and complexity of root canal structure in the measurement of root canal length, which affects the accuracy of reconstruction and the error of key points.

Method used

The three-dimensional scanning image was segmented with a pre-trained root canal instance segmentation model to generate a three-dimensional root canal model, and feature extraction model was used to obtain feature points. Combined with the root canal instance segmentation diagram and feature map, the root canal orifice and root canal tip are accurately positioned, and the root canal length is calculated.

Benefits of technology

It improves the accuracy of root canal length measurement, enhances the accuracy of key point positioning, meets the actual root canal length measurement needs, and ensures the independence of the three-dimensional reconstruction of root canal and key point detection process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119784675A_ABST
    Figure CN119784675A_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method, device, equipment and medium for determining the length of a root canal. The method comprises: using a root canal instance segmentation model to segment a three-dimensional scanned image of a tooth to be repaired, obtaining a root canal instance segmentation map, and generating a root canal three-dimensional model of a target root canal in the tooth to be repaired based on the root canal instance segmentation map; using a feature extraction model to extract feature points of the three-dimensional scanned image to generate a target feature map; according to the number of root canals contained in the root canal instance segmentation map, obtaining the root canal key points of the target root canal from the feature points contained in the target feature map; based on the coordinate data of the root canal key points and the root canal instance segmentation map, obtaining the root canal orifice key points and the root canal apex key points from the root canal key points; based on the root canal three-dimensional model of the target root canal, the coordinate data of the root canal orifice key points of the target root canal and the coordinate data of the root canal apex key points of the target root canal, calculating the root canal length of the target root canal. Thus, the accuracy of the root canal length measurement is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of root canal analysis technology, and in particular to a method, device, equipment and medium for determining root canal length. Background Art

[0002] The root canal length is the distance from the entrance of the pulp cavity at the crown of the tooth (commonly called the root canal orifice) to the apical foramen (the opening at the root tip). Accurately determining the root canal length helps ensure thorough cleaning and precise filling of the root canal, avoiding problems such as apical perforation.

[0003] At present, 3D segmentation and reconstruction technology is generally used to generate root canal models, and then traditional methods are used to identify key points. However, due to individual differences and the complexity of root canal structure, mis-segmentation may occur in multi-category root canal instance segmentation, affecting the accuracy of reconstruction, resulting in errors in the position of key points, affecting the positioning accuracy of key points, and further reducing the accuracy of root canal length measurement. Summary of the invention

[0004] In order to solve the above technical problems, the present disclosure provides a method, device, equipment and medium for determining root canal length.

[0005] In a first aspect, the present disclosure provides a method for determining a root canal length, comprising:

[0006] Using a pre-trained root canal instance segmentation model, performing root canal instance segmentation on a three-dimensional scanned image of the tooth to be repaired, obtaining a root canal instance segmentation map of the tooth to be repaired, and generating a root canal three-dimensional model of a target root canal in the tooth to be repaired based on the root canal instance segmentation map;

[0007] Using a pre-trained feature extraction model, extracting feature points from the three-dimensional scanned image to obtain a target feature map of the tooth to be repaired;

[0008] According to the number of root canals included in the root canal instance segmentation map, obtaining root canal key points of the target root canal from the feature points included in the target feature map;

[0009] Based on the coordinate data of the root canal key points of the target root canal and the root canal instance segmentation map, obtaining the root canal orifice key points and the root canal apex key points of the target root canal from the root canal key points of the target root canal;

[0010] Based on the root canal three-dimensional model of the target root canal, the coordinate data of the key points of the root canal orifice of the target root canal and the coordinate data of the key points of the root canal apex of the target root canal, the length of the target root canal is calculated to obtain the root canal length of the target root canal.

[0011] In a second aspect, the present disclosure provides a root canal length determination device, comprising:

[0012] A root canal instance segmentation module is used to perform root canal instance segmentation on the three-dimensional scanned image of the tooth to be repaired using a pre-trained root canal instance segmentation model to obtain a root canal instance segmentation map of the tooth to be repaired;

[0013] A root canal three-dimensional model generation module, used to generate a root canal three-dimensional model of a target root canal in a tooth to be repaired based on the root canal instance segmentation map;

[0014] A feature map generation module, used to extract feature points from the three-dimensional scanned image using a pre-trained feature extraction model to obtain a target feature map of the tooth to be repaired;

[0015] A key point coordinate data acquisition module, used to acquire the root canal key points of the target root canal from the feature points included in the target feature map according to the number of root canals included in the root canal instance segmentation map;

[0016] A root canal category determination module, configured to obtain a root canal orifice key point and a root canal apex key point of a target root canal from the root canal key points of the target root canal based on the coordinate data of the root canal key points of the target root canal and the root canal instance segmentation map;

[0017] A root canal length determination module is used to calculate the length of the target root canal based on the root canal three-dimensional model of the target root canal, the coordinate data of the key points of the root canal orifice of the target root canal, and the coordinate data of the key points of the root canal apex of the target root canal, so as to obtain the root canal length of the target root canal.

[0018] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the device comprising:

[0019] one or more processors;

[0020] a storage device for storing one or more programs,

[0021] When one or more programs are executed by one or more processors, the one or more processors implement the method provided in the first aspect.

[0022] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method provided in the first aspect is implemented.

[0023] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0024] A method, device, equipment and medium for determining the length of a root canal according to an embodiment of the present disclosure include: performing root canal instance segmentation on a three-dimensional scanned image of a tooth to be restored by using a pre-trained root canal instance segmentation model to obtain a root canal instance segmentation map of the tooth to be restored, and generating a root canal three-dimensional model of a target root canal in the tooth to be restored based on the root canal instance segmentation map; performing feature point extraction on the three-dimensional scanned image by using a pre-trained feature extraction model to obtain a target feature map of the tooth to be restored; obtaining root canal key points of the target root canal from the feature points included in the target feature map according to the number of root canals included in the root canal instance segmentation map; obtaining a root canal orifice key point and a root canal apex key point of the target root canal from the root canal key points of the target root canal based on the coordinate data of the root canal key points of the target root canal and the root canal instance segmentation map; performing length calculation on the target root canal based on the root canal three-dimensional model of the target root canal, the coordinate data of the root canal orifice key point of the target root canal and the coordinate data of the root canal apex key point of the target root canal to obtain the root canal length of the target root canal. Therefore, by combining the root canal 3D reconstruction method, the root canal orifice and apex orifice coordinate detection method, and the root canal length measurement method, it is possible to improve the accuracy of key point positioning while realizing the 3D shape reconstruction of the root canal, thereby meeting the actual root canal length measurement needs. At the same time, the root canal 3D reconstruction process and the key point detection process are independent of each other, ensuring the accuracy of key point positioning, thereby improving the accuracy of root canal length measurement. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0027] Figure 1 A schematic diagram of a process for determining a root canal length provided in an embodiment of the present disclosure;

[0028] Figure 2 A schematic diagram of the structure of a root canal instance segmentation model provided in an embodiment of the present disclosure;

[0029] Figure 3 A schematic structural diagram of a root canal length determination device provided in an embodiment of the present disclosure;

[0030] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0031] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0032] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0033] The key step in measuring the root canal length is to locate the root canal orifice and the root canal apex. The root canal orifice positioning result helps the user find a suitable position to introduce the root canal system to remove the infected tissue in the root canal and avoid the local infected tissue not being removed. The root canal apex positioning result can prevent the root canal system introduced from the root canal orifice from exceeding the root canal apex and thus damaging the tissue around the tooth, and can also ensure that the root canal system introduced from the root canal orifice reaches the root canal apex to fully remove the infected tissue. However, the above-mentioned traditional key point recognition method is only applicable to fixed point detection, and the number and position of tooth key points also vary depending on the type of tooth, resulting in the difficulty of accurately locating the root canal orifice and the root canal apex using the traditional key point recognition method, which affects the measurement result of the root canal length and the removal effect of the root canal system on the infected tissue.

[0034] In order to improve the accuracy of root canal length measurement, the following Figure 1-Figure 2 The root canal length determination method provided in the embodiment of the present disclosure is described. In the embodiment of the present disclosure, the root canal length determination method can be executed by an electronic device. The electronic device can be a control device of a medical robot.

[0035] Figure 1 A schematic flow chart of a method for determining root canal length provided in an embodiment of the present disclosure is shown.

[0036] like Figure 1 As shown, the root canal length determination method may include the following steps.

[0037] S110, using a pre-trained root canal instance segmentation model to perform root canal instance segmentation on the three-dimensional scanned image of the tooth to be repaired, to obtain a root canal instance segmentation map of the tooth to be repaired, and based on the root canal instance segmentation map, to generate a root canal three-dimensional model of the target root canal in the tooth to be repaired.

[0038] In this embodiment, for a tooth in the oral cavity that needs to have the infected area cleaned (for example, a tooth with pulp and periapical disease), the tooth is used as a tooth to be repaired, and an electronic device obtains a three-dimensional scanned image obtained by a three-dimensional scanning device performing three-dimensional scanning processing on the tooth to be repaired. Then, a pre-trained root canal instance segmentation model is used to perform root canal instance segmentation on the three-dimensional scanned image to obtain a root canal instance segmentation map, and the root canal instance segmentation map is three-dimensionally reconstructed to obtain a root canal three-dimensional model of the target root canal in the tooth to be repaired.

[0039] The root canal instance segmentation model refers to a neural network model with instance segmentation capability. Optionally, the root canal instance segmentation model includes but is not limited to a deep learning model based on a U-Net architecture (Neural Network U-Net, nn-Unet).

[0040] The root canal instance segmentation map is a segmentation image containing one or more root canals, and the root canal instance segmentation map contains the number of root canals and may also include the root canal category. The root canal category includes the root canal orifice and the root canal apex, and the number of root canals is one or more.

[0041] The target root canal refers to any root canal in the tooth to be repaired, and its corresponding root canal three-dimensional model can be obtained by three-dimensionally reconstructing the root canal instance segmentation map through a reconstruction algorithm or a pre-trained three-dimensional reconstruction model.

[0042] Considering the poor quality of 3D scanned images, such as low brightness, uneven exposure, blurred regional boundaries, etc., these problems reduce the reliability of 3D scanned image processing results. For this reason, before determining the root canal instance segmentation map of the tooth to be repaired, the method also includes: preprocessing the 3D scanned image to obtain a root canal instance segmentation map after preprocessing.

[0043] Optionally, the preprocessing method of the three-dimensional scanned image includes but is not limited to a data normalization method, a data enhancement method, etc. The data normalization method may specifically be a standard score normalization (Z-score data normalization) method, which helps to eliminate the difference in pixel values ​​between different images, making it easier to learn features during the training process of the root canal instance segmentation model, and can accelerate the convergence process of the model and improve the stability of the model. The data enhancement method may specifically be a data enhancement method based on Gaussian noise, and may also include processing methods such as rotation, scaling, flipping, shearing, and noise addition.

[0044] Optionally, the data enhancement method based on Gaussian noise can be expressed as follows:

[0045] I_ce(x,y,z;σ)=αI(x,y,z)+βG(x,y,z;σ)*I(x,y,z)+γ

[0046] Among them, * is the convolution operator, G(x, y, z; σ) is a Gaussian filter with a standard deviation of σ, I(x, y, z) is the three-dimensional scanned image of the tooth to be restored, α, β, and γ are parameters. When α=4, β=-3, σ=128 / 30, and γ=128, the data enhancement method based on Gaussian noise has the best data enhancement effect. The three-dimensional scanned image after data enhancement has a higher contrast between the gap area and the teeth, making it easier to find the edge line.

[0047] S120, using a pre-trained feature extraction model to extract feature points from the three-dimensional scanned image, and obtaining a target feature map of the tooth to be repaired.

[0048] In this embodiment, the electronic device calls a pre-trained feature extraction model to directly extract feature points from the three-dimensional scanned image or extract feature points from the pre-processed three-dimensional scanned image to obtain a target feature map of the tooth to be repaired.

[0049] Among them, the feature extraction model has the ability to predict the possibility that each feature point in the three-dimensional scanning image is a root canal key point. The possibility can be characterized by confidence. Using the feature extraction model, a target feature map containing feature points and their corresponding confidence levels can be obtained.

[0050] Among them, the higher the confidence of the feature point in the three-dimensional scanning image, the greater the possibility that the feature point is a root canal key point. Conversely, the lower the confidence of the feature point in the three-dimensional scanning image, the smaller the possibility that the feature point is a root canal key point.

[0051] Among them, the target feature map can be a three-channel feature map, the 0th channel is used to output the background, the first channel is used to output the feature points that may belong to the key points of the root canal orifice and their corresponding confidences, and the second channel is used to output the feature points that may belong to the key points of the root canal apex and their corresponding confidences.

[0052] In actual situations, S110 and S120 are independent of each other, so that the extracted target feature map has no influence on the root canal instance segmentation process and the three-dimensional reconstruction process, thereby avoiding the root canal instance segmentation process and the three-dimensional reconstruction process affecting the target feature map extraction process.

[0053] S130. According to the number of root canals included in the root canal instance segmentation map, the root canal key points of the target root canal are obtained from the feature points included in the target feature map.

[0054] In this embodiment, the electronic device uses the number of root canals contained in the root canal instance segmentation map as the number of key points of the root canal orifice category and the number of key points of the root canal apex category in the target feature map, and based on the confidence corresponding to each feature point in the target feature map, filters out the key points of the root canal orifice category and the key points of the root canal apex category from the feature points contained in the target feature map as the root canal key points of the target root canal.

[0055] The number of root canals contained in the root canal instance segmentation map is not only equal to the number of root canal orifice key points, but also equal to the number of root canal apex key points.

[0056] S140, based on the coordinate data of the root canal key points of the target root canal and the root canal instance segmentation map, obtain the root canal orifice key points and the root canal apex key points of the target root canal from the root canal key points of the target root canal.

[0057] In this embodiment, the electronic device places the root canal key point of the target root canal on the corresponding voxel point of the root canal instance segmentation map based on the coordinate data of the root canal key point of the target root canal, so that the root canal type of the root canal key point of the target root canal is accurately determined based on the root canal category of the corresponding voxel point in the root canal instance segmentation map, thereby obtaining the root canal orifice key point and the root canal apex key point of the target root canal.

[0058] In this way, the root canal instance segmentation map determined based on the root canal instance segmentation process and the root canal key points determined based on the feature extraction model and the root canal instance segmentation map are combined to specifically determine the root canal type, thereby improving the reliability of root canal type determination.

[0059] S150, based on the root canal three-dimensional model of the target root canal, the coordinate data of the key points of the root canal orifice of the target root canal, and the coordinate data of the key points of the root canal apex of the target root canal, calculate the length of the target root canal to obtain the root canal length of the target root canal.

[0060] In this embodiment, the electronic device can add the root canal orifice key point and the root canal apex key point to the root canal three-dimensional model based on the coordinate data of the root canal orifice key point of the target root canal and the coordinate data of the root canal apex key point of the target root canal, and then calculate the curve distance from the root canal orifice key point to the root canal apex key point based on the coordinate data of the root canal orifice key point on the root canal three-dimensional model, the coordinate data of the root canal apex key point on the three-dimensional model and the three-dimensional data of other points on the root canal three-dimensional model as the root canal length of the target root canal.

[0061] A method for determining the length of a root canal in an embodiment of the present disclosure includes: performing root canal instance segmentation on a three-dimensional scanned image of a tooth to be restored using a pre-trained root canal instance segmentation model to obtain a root canal instance segmentation map of the tooth to be restored, and generating a root canal three-dimensional model of a target root canal in the tooth to be restored based on the root canal instance segmentation map; performing feature point extraction on the three-dimensional scanned image using a pre-trained feature extraction model to obtain a target feature map of the tooth to be restored; obtaining root canal key points of the target root canal from the feature points included in the target feature map according to the root canal category and the number of root canals included in the root canal instance segmentation map; obtaining a root canal orifice key point and a root canal apex key point of the target root canal from the root canal key points of the target root canal based on the coordinate data of the root canal key points of the target root canal and the root canal instance segmentation map; performing length calculation on the target root canal based on the root canal three-dimensional model of the target root canal, the coordinate data of the root canal orifice key point of the target root canal, and obtaining the root canal length of the target root canal. Therefore, by combining the root canal 3D reconstruction method, the root canal orifice and apex orifice coordinate detection method, and the root canal length measurement method, it is possible to improve the accuracy of key point positioning while realizing the 3D shape reconstruction of the root canal, thereby meeting the actual root canal length measurement needs. At the same time, the root canal 3D reconstruction process and the key point detection process are independent of each other, ensuring the accuracy of key point positioning, thereby improving the accuracy of root canal length measurement.

[0062] In another embodiment of the present disclosure, a specific implementation process of the root canal length determination method is explained in detail.

[0063] In some embodiments of the present disclosure, the specific implementation method of "using the pre-trained root canal instance segmentation model to perform root canal instance segmentation on the three-dimensional scanned image of the tooth to be repaired to obtain a root canal instance segmentation map of the tooth to be repaired" in S110 includes:

[0064] S1101, based on a first feature extraction network of a root canal instance segmentation model, extract features from the three-dimensional scanned image to obtain a root canal instance feature map having the same size as the three-dimensional scanned image;

[0065] S1102. Based on the second feature extraction network of the root canal instance segmentation model, feature extraction processing is performed on the three-dimensional scanning image and the root canal instance feature map to obtain a root canal instance segmentation map of the tooth to be repaired.

[0066] The root canal instance segmentation model includes two stages of feature extraction networks, namely the first feature extraction network and the second feature extraction network. Figure 2The structural schematic diagram of the root canal instance segmentation model shown in the figure, the electronic device inputs the three-dimensional scanning image (specifically, it can be the preprocessed three-dimensional scanning image) into the first feature extraction network of the root canal instance segmentation model to obtain a root canal instance feature map with the same size as the three-dimensional scanning image, and then inputs the three-dimensional scanning image (specifically, it can be the preprocessed three-dimensional scanning image) and the root canal instance feature map into the second feature extraction network to obtain a root canal instance segmentation map.

[0067] Among them, the specific implementation method of S1101 includes: using the encoder in the first feature extraction network to perform multiple convolution and pooling processes on the three-dimensional scanned image to obtain the first down-sampled features obtained each time; using the decoder in the first feature extraction network to up-sample the first down-sampled features obtained each time to obtain a root canal instance feature map.

[0068] Among them, the specific implementation method of S1102 includes: using the encoder in the second feature extraction network to perform multiple convolution and pooling processes on the three-dimensional scanning image and the root canal instance feature map to obtain the second down-sampled features obtained each time; using the decoder in the second feature extraction network to up-sample the second down-sampled features obtained each time to obtain a root canal instance segmentation map.

[0069] Continue to see Figure 2 After the electronic device inputs the three-dimensional scanned image (specifically, it can be the pre-processed three-dimensional scanned image) into the first feature extraction network, first, through the encoder in the first feature extraction network, the spatial dimension is gradually reduced through multi-layer convolution and pooling operations, and the number of feature channels is increased at the same time, the high-level features of the image are extracted, and the first down-sampled features obtained each time are obtained. Since the encoder and the decoder in the first feature extraction network adopt a jump connection method, the first down-sampled features obtained each time are input into the corresponding number of layers of the decoder in the first feature extraction network for up-sampling to restore the spatial dimension and obtain a root canal instance feature map with the same size as the three-dimensional scanned image; then, through the encoder in the second feature extraction network, the three-dimensional scanned image and the root canal instance feature map are subjected to multiple convolution and pooling processes to obtain the high-level features of the image, thereby obtaining the second down-sampled features obtained each time; since the encoder and the decoder in the second feature extraction network adopt a jump connection method, the second down-sampled features obtained each time are input into the corresponding number of layers of the decoder in the second feature extraction network for up-sampling, and the output is a root canal instance segmentation map with the same size as the three-dimensional scanned image.

[0070] In this way, by utilizing the two-stage feature extraction network in the root canal instance segmentation model, the three-dimensional scanned image is subjected to two-stage downsampling and upsampling, thereby realizing instance segmentation of the three-dimensional scanned image and obtaining a root canal instance segmentation map, thereby improving the accuracy of instance segmentation.

[0071] In some embodiments of the present disclosure, the specific implementation method of "generating a root canal three-dimensional model of a target root canal in a tooth to be repaired based on a root canal instance segmentation map" in S110 includes: dividing the three-dimensional space where the root canal instance segmentation map is located into cubes according to a preset resolution; drawing the root canal surface of the root canal from the root canal instance segmentation map based on the positions of each vertex on the cube in the three-dimensional space and the distribution range of the root canal in the root canal instance segmentation map; performing curve fitting on the root canal surface of the root canal to generate a root canal three-dimensional model of the target root canal.

[0072] Continue to see Figure 2 , the electronic device inputs the root canal instance segmentation map into a reconstruction algorithm (such as Marching Cubes algorithm), and the reconstruction algorithm first determines whether any voxel point in the root canal instance segmentation map is on the root canal, and it is necessary to first divide the three-dimensional space where the root canal instance segmentation map is located into any number of cubes according to a preset resolution; then, the electronic device draws the root canal surface of the root canal from the root canal instance segmentation map based on the positions of each vertex on the cube in the three-dimensional space and the distribution range of the root canal in the root canal instance segmentation map to determine whether the vertex of each cube is inside the root canal. The specific method is that if it is determined that some vertices of a cube are inside the root canal and some vertices are outside the object, then the surface of the root canal must pass through the cube, and if the two endpoints of an edge of the cube are respectively inside and outside the root canal, then the edge intersects with the surface of the root canal, and these intersections are connected to draw a surface in each cube as the root canal surface; finally, the electronic device performs curve fitting on the root canal surface, and finally reconstructs the root canal three-dimensional model of the target root canal.

[0073] In this way, the three-dimensional spatial morphology of the root canal instance segmentation map is combined to accurately reconstruct the root canal three-dimensional model of the target root canal.

[0074] In some embodiments of the present disclosure, the specific implementation method of S120 includes: based on the encoder in the feature extraction model, dividing the three-dimensional scanned image into multiple image blocks, and performing multi-head self-attention processing and multi-layer perception processing on the multiple image blocks to obtain feature vectors obtained by multiple processing; based on the decoder in the key point extraction model, performing deconvolution processing on the feature vectors obtained by multiple processing to obtain a target feature map of the tooth to be repaired.

[0075] Continue to see Figure 2The electronic device can call a pre-trained deep learning model (Swin Transformer and UNETR, Swin-UNETR) as a feature extraction model. The encoder of the feature extraction model includes a patch partitioning module (Patch Partitioning) and a Swin Transformer Blocks module. Specifically, the three-dimensional scanned image (specifically, it can be a pre-processed three-dimensional scanned image) is divided into multiple image blocks through Patch Partitioning. Each image block is used as a Swin Transformer Blocks module, and the Swin Transformer Blocks module is combined with a sliding window mechanism to perform multi-head self-attention processing and multi-layer perception processing on each image block to obtain a feature vector obtained by multiple processing. Since the encoder and the decoder adopt a jump connection method, the feature vector obtained by multiple processing is input into the corresponding layers of the decoder for deconvolution processing, so as to restore the low-resolution feature map to high resolution, so as to restore more detail information and obtain the target feature map of the tooth to be repaired.

[0076] In this way, the encoder and decoder in the feature extraction model are used to divide the three-dimensional scanned image into image blocks, and then multi-head self-attention processing, multi-layer perception processing and deconvolution processing are performed to obtain the target feature map of the tooth to be repaired, ensuring the accuracy of feature map extraction.

[0077] In some embodiments of the present disclosure, the specific implementation method of S130 includes: using a preset pooling kernel to perform maximum pooling processing on the target feature map to generate a maximum pooling feature map corresponding to the target feature map; comparing the confidences corresponding to each feature point in the maximum pooling feature map and the confidences corresponding to each feature point in the target feature map; based on the confidence comparison result, obtaining feature points consistent with the number of root canals from the target feature map as root canal key points of the target root canals.

[0078] It can be understood that the target feature map includes feature points that may belong to the key points of the root canal orifice and their corresponding confidence levels, feature points that may belong to the key points of the root canal apex and their corresponding confidence levels. If key points are selected directly from the feature points included in the target feature map according to the confidence levels, it is possible that feature points with very high confidence levels are adjacent feature points on a root canal, and not all of them belong to key points of different root canals.

[0079] In order to avoid this problem, the electronic device uses a preset pooling kernel with a specific step size to perform maximum pooling processing on the target feature map, so that the confidences outside the preset pooling kernel of the feature map before and after processing are not equal, thereby generating a maximum pooling feature map, and using edge zero padding to ensure that the size of the maximum pooling feature map is consistent with the size of the target feature map. Then, the confidences corresponding to each feature point in the maximum pooling feature map and the confidences corresponding to each feature point in the target feature map are compared, and feature points with the same confidence are retained and feature points with different confidences are eliminated. The retained feature points with the same confidence are used as root canal key points of the target root canal.

[0080] The specific step size may be set based on experience, for example, to 1. The preset pooling kernel may be preset based on experience, for example, to 3*3*3.

[0081] Optionally, the method for determining the maximum pooling feature map can be determined in the following way:

[0082]

[0083] Among them, P(x,y,z) is the maximum pooling feature map, F(i,j,k) is the target feature map, and N(x,y,z) is the 3×3×3 area near the position (x,y,z).

[0084] Optionally, the method for determining the root canal key points of the target root canal can be implemented by the following method:

[0085]

[0086] Among them, F(x, y, z) is the target feature map, P(x, y, z) is the maximum pooling feature map, and F'(x, y, z) is the feature map that only retains the root canal key points of the target root canal.

[0087] In this way, by performing maximum pooling processing on the target feature map and comparing the confidence of each feature point in the feature map before and after processing, the root canal key points of the target root canal can be accurately determined, avoiding the problem of incorrect key point selection based directly on confidence.

[0088] In some embodiments of the present disclosure, the specific implementation method of S140 includes: according to the coordinate data of the root canal key point, adding the root canal key point to the target voxel point of the root canal instance segmentation map; calculating the distance between the current target voxel point corresponding to the current root canal key point and the root canal key point of each root canal in the root canal instance segmentation map in order of confidence from large to small; obtaining the first current root canal category corresponding to the root canal key point of the root canal with the smallest distance from the root canal instance segmentation map; if the first current root canal category is the root canal orifice category, then the root canal key point of the target root canal is the root canal orifice key point; if the first current root canal category is the root canal apex category, then the root canal key point of the target root canal is the root canal apex key point.

[0089] Continue to see Figure 2 After determining the root canal key points of the target root canal, the root canal category assignment module needs to be used to assign the correct root canal category to the root canal key points, which are specifically divided into root canal orifice key points and root canal apex key points. It can be understood that the root canal instance segmentation map output through the instance segmentation process has the same channel shape as the target feature map output through the feature extraction process. Then, the root canal key points can be added to the target voxel points of the root canal instance segmentation map according to the coordinate data of the root canal key points, and then the root canal instance segmentation map with the added root canal key points can be analyzed to classify the root canal key points.

[0090] It is understandable that if a root canal key point is added on the outside of the root canal, but the root canal key point is very close to the root canal, only one voxel away, then it is considered that the root canal key point needs to be retained. However, the actual situation often discards this key point, and this operation is obviously unreasonable.

[0091] In order to solve the above problem, the electronic device adds the root canal key points to the target voxel points of the root canal instance segmentation map according to the coordinate data of the root canal key points, and then prioritizes the root canal key points with high confidence as the current root canal key points. For the current root canal key points, the KNN nearest neighbor algorithm is used to calculate the distance between the current target voxel point corresponding to the current root canal key point and the root canal key point of each root canal in the root canal instance segmentation map, and the first current root canal category corresponding to the root canal key point of the root canal with the smallest distance is selected, and then it is determined whether the first current root canal category is the root canal orifice category or the root canal apex category. If the first current root canal category is the root canal orifice category, the root canal key point of the target root canal is the root canal orifice key point, and if the first current root canal category is the root canal apex category, the root canal key point of the target root canal is the root canal apex key point.

[0092] Optionally, the method for determining the root canal category of the root canal key point may be determined in the following manner:

[0093]

[0094] Among them, c i is the root canal type, (x i ,y,z,) are the coordinate data of the key points of the root canal, Is the root canal category c j Root canal area, root canal instance segmentation map, dist(*) is based on the Euclidean calculation method.

[0095] It is understandable that there is often a prediction deviation between the instance segmentation process and the feature extraction process. After determining the root canal category of the first key point, if the root canal category of the second key point is the same as that of the first key point, the second key point will be discarded and only one key point will be retained. However, in actual situations, there may be two key points belonging to the same root canal category. For example, the first key point is the root canal orifice key point of the first root canal, and the second key point is the root canal orifice key point of the second root canal. Obviously, after determining the root canal category of the first key point, there is an error in discarding the second key point that has the same root canal category as the first key point.

[0096] In order to solve the above problem, after obtaining the first current root canal category corresponding to the root canal key point of the root canal with the smallest distance from the root canal instance segmentation map, the above method also includes: if the first current root canal category is the same as the previous root canal category determined based on the previous root canal key point, then obtaining the second current root canal category corresponding to the root canal key point of the root canal with a non-minimum distance from the root canal instance segmentation map until the second current root canal category is different from the previous root canal category; if the second current root canal category is the root canal orifice category, then the root canal key point of the target root canal is the root canal orifice key point; if the second current root canal category is the root canal apex category, then the root canal key point of the target root canal is the root canal apex key point.

[0097] Specifically, after obtaining the first current root canal category corresponding to the root canal key point of the root canal with the smallest distance (i.e., the current root canal key point), if the electronic device determines that the first current root canal category is the same as the previous root canal category determined based on the previous root canal key point, then continue to search for the root canal key point that is second closest to the current root canal key point, and determine the second current root canal category of the current root canal key point based on the root canal category of the second closest root canal key point. If the second current root canal category determined this time is still the same as the previous root canal category determined based on the previous root canal key point, then continue to search for the root canal key point that is third closest to the current root canal key point, and so on, until the second current root canal category is different from the previous root canal category, stop searching, and finally determine whether the second current root canal category is the root canal orifice category or the root canal apex category. If the second current root canal category is the root canal orifice category, then the root canal key point of the target root canal is the root canal orifice key point. If the second current root canal category is the root canal apex category, then the root canal key point of the target root canal is the root canal apex key point.

[0098] Optionally, the method for determining the root canal category of the root canal key point based on the traversal search method can be determined in the following manner:

[0099]

[0100] Among them, c' i It is a root canal type.

[0101] In this way, the combination of ranking the confidence levels and classifying the root canal key points based on distance can compensate to a certain extent for the impact of the prediction deviation between the instance segmentation process and the feature extraction process, and improve the accuracy of determining the root canal category of the root canal key points.

[0102] In some embodiments of the present disclosure, the specific implementation method of S150 includes: performing centerline extraction on the root canal three-dimensional model of the target root canal to obtain the root canal centerline of the target root canal; adding the root canal orifice key point and the root canal apex key point of the target root canal to the root canal centerline of the target root canal, wherein the root canal centerline of the target root canal includes the added root canal orifice key point and the root canal apex key point, as well as other key points except the root canal orifice key point and the root canal apex key point; performing length calculation on the target root canal based on the coordinate data of the root canal orifice key point, the coordinate data of the root canal apex key point and the coordinate data of the other key points to obtain the root canal length of the target root canal.

[0103] Among them, based on the coordinate data of the root canal orifice key point, the coordinate data of the root canal apex key point and the coordinate data of other key points, the length of the target root canal is calculated to obtain the root canal length of the target root canal, including: dividing the root canal orifice key point, the root canal apex key point and other key points of the root canal centerline into adjacent key points; based on the coordinate data corresponding to the adjacent key points, the distance between the adjacent key points is calculated; the distances of all adjacent key points on the root canal centerline are added to obtain the root canal length of the target root canal.

[0104] Continue to see Figure 2 The electronic device uses a root canal length calculation module to extract the centerline of the root canal three-dimensional model of each target root canal to obtain the root canal centerline of the target root canal, and then adds the root canal orifice key point and the root canal apex key point of the target root canal to the root canal centerline of the target root canal, so that the root canal centerline of the target root canal includes other key points in addition to the root canal orifice key point and the root canal apex key point, and then, based on the coordinate data corresponding to the two adjacent key points, the Euclidean distance calculation is performed to obtain the distance between the two adjacent key points, and then all the calculated distances are added in sequence to obtain the root canal length of the target root canal.

[0105] Optionally, the distance between two adjacent key points can be determined as follows:

[0106]

[0107] Among them, ρ is the distance between two adjacent key points, (x1, y1, z1) is the coordinate data of one of the two adjacent key points, and (x2, y2, z2) is the coordinate data of the other of the two adjacent key points.

[0108] In this way, firstly, the root canal centerline of the root canal three-dimensional model of the target root canal is determined based on the centerline method, and then the root canal orifice key point and the root canal apex key point of the target root canal are added to the root canal centerline of the target root canal, and based on the distance between adjacent key points, the root canal length of the target root canal is accurately calculated.

[0109] The present disclosure also provides a root canal length determination device for implementing the above-mentioned root canal length determination method. Figure 3 In the embodiment of the present disclosure, the root canal length determination device may be an electronic device, wherein the electronic device may be a control device of a medical robot.

[0110] Figure 3 A schematic structural diagram of a root canal length determination device provided in an embodiment of the present disclosure is shown.

[0111] like Figure 3 As shown, the root canal length determination device 300 may include:

[0112] A root canal instance segmentation module 310 is used to perform root canal instance segmentation on the three-dimensional scanned image of the tooth to be repaired by using a pre-trained root canal instance segmentation model to obtain a root canal instance segmentation map of the tooth to be repaired;

[0113] A root canal three-dimensional model generating module 320, for generating a root canal three-dimensional model of a target root canal in a tooth to be repaired based on the root canal instance segmentation map;

[0114] A feature map generation module 330 is used to extract feature points from the three-dimensional scanned image using a pre-trained feature extraction model to obtain a target feature map of the tooth to be repaired;

[0115] A key point coordinate data acquisition module 340 is used to acquire the root canal key points of the target root canal from the feature points included in the target feature map according to the number of root canals included in the root canal instance segmentation map;

[0116] A root canal category determination module 350, configured to obtain a root canal orifice key point and a root canal apex key point of a target root canal from the root canal key points of the target root canal based on the coordinate data of the root canal key points of the target root canal and the root canal instance segmentation map;

[0117] The root canal length determination module 360 ​​is used to calculate the length of the target root canal based on the root canal three-dimensional model of the target root canal, the coordinate data of the key points of the root canal orifice of the target root canal, and the coordinate data of the key points of the root canal apex of the target root canal, so as to obtain the root canal length of the target root canal.

[0118] A root canal length determination device according to an embodiment of the present disclosure comprises: performing root canal instance segmentation on a three-dimensional scanned image of a tooth to be restored by using a pre-trained root canal instance segmentation model to obtain a root canal instance segmentation map of the tooth to be restored, and generating a root canal three-dimensional model of a target root canal in the tooth to be restored based on the root canal instance segmentation map; performing feature point extraction on the three-dimensional scanned image by using a pre-trained feature extraction model to obtain a target feature map of the tooth to be restored; obtaining root canal key points of the target root canal from the feature points included in the target feature map according to the number of root canals included in the root canal instance segmentation map; obtaining a root canal orifice key point and a root canal apex key point of the target root canal from the root canal key points of the target root canal based on the coordinate data of the root canal key points of the target root canal and the root canal instance segmentation map; performing length calculation on the target root canal based on the root canal three-dimensional model of the target root canal, the coordinate data of the root canal orifice key point of the target root canal and the coordinate data of the root canal apex key point of the target root canal, and obtaining the root canal length of the target root canal. Therefore, by combining the root canal 3D reconstruction method, the root canal orifice and apex orifice coordinate detection method, and the root canal length measurement method, it is possible to improve the accuracy of key point positioning while realizing the 3D shape reconstruction of the root canal, thereby meeting the actual root canal length measurement needs. At the same time, the root canal 3D reconstruction process and the key point detection process are independent of each other, ensuring the accuracy of key point positioning, thereby improving the accuracy of root canal length measurement.

[0119] In some embodiments of the present disclosure, the root canal instance segmentation module 310 includes:

[0120] A first feature extraction unit is used to extract features from the three-dimensional scanned image based on a first feature extraction network of the root canal instance segmentation model to obtain a root canal instance feature map with the same size as the three-dimensional scanned image;

[0121] The first feature extraction unit is used to perform feature extraction processing on the three-dimensional scanning image and the root canal instance feature map based on the second feature extraction network of the root canal instance segmentation model to obtain the root canal instance segmentation map of the tooth to be repaired.

[0122] In some embodiments of the present disclosure, the first feature extraction unit is specifically used to:

[0123] Using the encoder in the first feature extraction network, perform multiple convolution processes and pooling processes on the three-dimensional scanned image to obtain a first down-sampled feature obtained by each process;

[0124] The first down-sampled features obtained in each processing are up-sampled by using the decoder in the first feature extraction network to obtain the root canal instance feature map.

[0125] In some embodiments of the present disclosure, the second feature extraction unit is specifically used to:

[0126] Using the encoder in the second feature extraction network, perform multiple convolution and pooling processes on the three-dimensional scanned image and the root canal instance feature map to obtain second down-sampled features obtained by each process;

[0127] The second down-sampled features obtained by each processing are up-sampled by using the decoder in the second feature extraction network to obtain the root canal instance segmentation map.

[0128] In some embodiments of the present disclosure, the root canal three-dimensional model generation module 320 is specifically used to:

[0129] Dividing the three-dimensional space where the root canal instance segmentation map is located into cubes according to a preset resolution;

[0130] Based on the positions of the vertices on the cube in the three-dimensional space and the distribution range of the root canals in the root canal instance segmentation map, drawing the root canal surface of the root canal from the root canal instance segmentation map;

[0131] Curve fitting is performed on the root canal surface of the root canal to generate a three-dimensional root canal model of the target root canal.

[0132] In some embodiments of the present disclosure, the feature map generation module 330 is specifically used to:

[0133] Based on the encoder in the feature extraction model, the three-dimensional scanned image is divided into a plurality of image blocks, and the plurality of image blocks are subjected to multi-head self-attention processing and multi-layer perception processing to obtain feature vectors obtained by multiple processing;

[0134] Based on the decoder in the key point extraction model, deconvolution processing is performed on the feature vectors obtained by the multiple processing to obtain a target feature map of the tooth to be repaired.

[0135] In some embodiments of the present disclosure, the key point coordinate data acquisition module 340 is specifically used to:

[0136] Using a preset pooling kernel, performing maximum pooling processing on the target feature map to generate a maximum pooling feature map corresponding to the target feature map;

[0137] Compare the confidence corresponding to each feature point in the maximum pooling feature map and the confidence corresponding to each feature point in the target feature map;

[0138] Based on the confidence comparison result, feature points consistent with the number of root canals are acquired from the target feature map as root canal key points of the target root canals.

[0139] In some embodiments of the present disclosure, the root canal category determination module 350 is specifically configured to:

[0140] According to the coordinate data of the root canal key point, the root canal key point is added to the target voxel point of the root canal instance segmentation map;

[0141] In descending order of confidence, for the current root canal key point, calculating the distance between the current target voxel point corresponding to the current root canal key point and the root canal key point of each root canal in the root canal instance segmentation map;

[0142] Acquire a first current root canal category corresponding to a root canal key point of a root canal with a minimum distance from the root canal instance segmentation map;

[0143] If the first current root canal category is a root canal orifice category, the root canal key point of the target root canal is a root canal orifice key point;

[0144] If the first current root canal category is the root canal apex category, the root canal key point of the target root canal is the root canal apex key point.

[0145] In some embodiments of the present disclosure, the device further includes:

[0146] an acquisition module, configured to acquire, if the first current root canal category is the same as a previous root canal category determined based on a previous root canal key point, a second current root canal category corresponding to a root canal key point of a root canal with a non-minimum distance from the root canal instance segmentation graph, until the second current root canal category is different from the previous root canal category;

[0147] A first determination module, configured to determine, if the second current root canal category is a root canal orifice category, that the root canal key point of the target root canal is a root canal orifice key point;

[0148] The second determination module is used for determining that, if the second current root canal category is the root canal apex category, the root canal key point of the target root canal is the root canal apex key point.

[0149] In some embodiments of the present disclosure, the root canal length determination module 360 ​​includes:

[0150] A root canal centerline extraction unit, used to extract the centerline of the root canal three-dimensional model of the target root canal to obtain the root canal centerline of the target root canal;

[0151] A key point adding unit, used for adding a root canal orifice key point and a root canal apex key point of the target root canal to a root canal centerline of the target root canal, wherein the root canal centerline of the target root canal includes the added root canal orifice key point and the root canal apex key point, and includes other key points except the root canal orifice key point and the root canal apex key point;

[0152] The root canal length calculation unit is used to calculate the length of the target root canal based on the coordinate data of the key point of the root canal orifice, the coordinate data of the key point of the root canal apex and the coordinate data of the other key points to obtain the root canal length of the target root canal.

[0153] In some embodiments of the present disclosure, the root canal length calculation unit is specifically used to:

[0154] Divide the root canal orifice key point, the root canal apex key point and the other key points of the root canal centerline into adjacent key points;

[0155] Based on the coordinate data corresponding to the adjacent key points, the distance between the adjacent key points is calculated;

[0156] The distances of all adjacent key points on the root canal centerline are added together to obtain the root canal length of the target root canal.

[0157] It should be noted that Figure 3 The root canal length determination device 300 shown can be performed Figure 1-2 The various steps in the method embodiment shown in the figure are implemented Figure 1-2 The various processes and effects in the method embodiment shown are not described in detail here.

[0158] Figure 4 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown.

[0159] like Figure 4 As shown, the electronic device may include a processor 401 and a memory 402 storing computer program instructions.

[0160] Specifically, the processor 401 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0161] The memory 402 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 402 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 402 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 402 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 402 is a non-volatile solid-state memory. In a particular embodiment, the memory 402 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.

[0162] The processor 401 reads and executes the computer program instructions stored in the memory 402 to perform the steps of the root canal length determination method provided in the embodiment of the present disclosure.

[0163] In one example, the electronic device may further include a transceiver 403 and a bus 404. Figure 4 As shown, the processor 401, the memory 402 and the transceiver 403 are connected via a bus 404 and communicate with each other.

[0164] The bus 404 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a Memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 404 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.

[0165] The following is an embodiment of a computer-readable storage medium provided in an embodiment of the present disclosure. The computer-readable storage medium and the root canal length determination method of the above-mentioned embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the computer-readable storage medium, reference can be made to the embodiment of the root canal length determination method described above.

[0166] This embodiment provides a storage medium containing computer executable instructions. When the computer executable instructions are executed by a computer processor, they are used to perform a method for determining a root canal length. The method includes:

[0167] Using a pre-trained root canal instance segmentation model, performing root canal instance segmentation on a three-dimensional scanned image of the tooth to be repaired, obtaining a root canal instance segmentation map of the tooth to be repaired, and generating a root canal three-dimensional model of a target root canal in the tooth to be repaired based on the root canal instance segmentation map;

[0168] Using a pre-trained feature extraction model, extracting feature points from the three-dimensional scanned image to obtain a target feature map of the tooth to be repaired;

[0169] According to the number of root canals included in the root canal instance segmentation map, obtaining root canal key points of the target root canal from the feature points included in the target feature map;

[0170] Based on the coordinate data of the root canal key points of the target root canal and the root canal instance segmentation map, obtaining the root canal orifice key points and the root canal apex key points of the target root canal from the root canal key points of the target root canal;

[0171] Based on the root canal three-dimensional model of the target root canal, the coordinate data of the key points of the root canal orifice of the target root canal and the coordinate data of the key points of the root canal apex of the target root canal, the length of the target root canal is calculated to obtain the root canal length of the target root canal.

[0172] Of course, the computer executable instructions of a storage medium containing computer executable instructions provided in an embodiment of the present disclosure are not limited to the above method operations, and can also execute related operations in the root canal length determination method provided in any embodiment of the present disclosure.

[0173] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present disclosure can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present disclosure can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer cloud platform (which can be a personal computer, a server, or a network cloud platform, etc.) to execute the root canal length determination method provided by each embodiment of the present disclosure.

[0174] Note that the above are only preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art will understand that the present disclosure is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present disclosure. Therefore, although the present disclosure is described in more detail through the above embodiments, the present disclosure is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present disclosure, and the scope of the present disclosure is determined by the scope of the appended claims.

Claims

1. A method for determining root canal length, characterized in that: include: Using a pre-trained root canal instance segmentation model, performing root canal instance segmentation on a three-dimensional scanned image of the tooth to be repaired, obtaining a root canal instance segmentation map of the tooth to be repaired, and generating a root canal three-dimensional model of a target root canal in the tooth to be repaired based on the root canal instance segmentation map; Using a pre-trained feature extraction model, extracting feature points from the three-dimensional scanned image to obtain a target feature map of the tooth to be repaired; According to the number of root canals included in the root canal instance segmentation map, obtaining root canal key points of the target root canal from the feature points included in the target feature map; Based on the coordinate data of the root canal key points of the target root canal and the root canal instance segmentation map, obtaining the root canal orifice key points and the root canal apex key points of the target root canal from the root canal key points of the target root canal; Based on the root canal three-dimensional model of the target root canal, the coordinate data of the key points of the root canal orifice of the target root canal and the coordinate data of the key points of the root canal apex of the target root canal, the length of the target root canal is calculated to obtain the root canal length of the target root canal.

2. The method according to claim 1, characterized in that The method uses a pre-trained root canal instance segmentation model to perform root canal instance segmentation on the three-dimensional scanned image of the tooth to be repaired, and obtains a root canal instance segmentation map of the tooth to be repaired, including: Based on a first feature extraction network of the root canal instance segmentation model, feature extraction is performed on the three-dimensional scanned image to obtain a root canal instance feature map with the same size as the three-dimensional scanned image; Based on the second feature extraction network of the root canal instance segmentation model, feature extraction processing is performed on the three-dimensional scanning image and the root canal instance feature map to obtain the root canal instance segmentation map of the tooth to be repaired.

3. The method according to claim 2, characterized in that The first feature extraction network based on the root canal instance segmentation model performs feature extraction on the three-dimensional scanned image to obtain a root canal instance feature map with the same size as the three-dimensional scanned image, including: Using the encoder in the first feature extraction network, perform multiple convolution processes and pooling processes on the three-dimensional scanned image to obtain a first down-sampled feature obtained by each process; The first down-sampled features obtained in each processing are up-sampled by using the decoder in the first feature extraction network to obtain the root canal instance feature map.

4. The method according to claim 2, characterized in that: The second feature extraction network based on the root canal instance segmentation model performs feature extraction processing on the three-dimensional scanned image and the root canal instance feature map to obtain the root canal instance segmentation map of the tooth to be repaired, including: Using the encoder in the second feature extraction network, perform multiple convolution and pooling processes on the three-dimensional scanned image and the root canal instance feature map to obtain second down-sampled features obtained by each process; The second down-sampled features obtained by each processing are up-sampled by using the decoder in the second feature extraction network to obtain the root canal instance segmentation map.

5. The method according to claim 1, characterized in that The step of generating a root canal three-dimensional model of a target root canal in a tooth to be repaired based on the root canal instance segmentation map comprises: Dividing the three-dimensional space where the root canal instance segmentation map is located into cubes according to a preset resolution; Based on the positions of the vertices on the cube in the three-dimensional space and the distribution range of the root canals in the root canal instance segmentation map, drawing the root canal surface of the root canal from the root canal instance segmentation map; Curve fitting is performed on the root canal surface of the root canal to generate a three-dimensional root canal model of the target root canal.

6. The method according to claim 1, characterized in that The method of extracting feature points from the three-dimensional scanned image using a pre-trained feature extraction model to obtain a target feature map of the tooth to be repaired includes: Based on the encoder in the feature extraction model, the three-dimensional scanned image is divided into a plurality of image blocks, and the plurality of image blocks are subjected to multi-head self-attention processing and multi-layer perception processing to obtain feature vectors obtained by multiple processing; Based on the decoder in the key point extraction model, deconvolution processing is performed on the feature vectors obtained by the multiple processing to obtain a target feature map of the tooth to be repaired.

7. The method according to claim 1, characterized in that The step of acquiring the root canal key points of the target root canal from the feature points included in the target feature map according to the number of root canals included in the root canal instance segmentation map comprises: Using a preset pooling kernel, performing maximum pooling processing on the target feature map to generate a maximum pooling feature map corresponding to the target feature map; Compare the confidence corresponding to each feature point in the maximum pooling feature map and the confidence corresponding to each feature point in the target feature map; Based on the confidence comparison result, feature points consistent with the number of root canals are acquired from the target feature map as root canal key points of the target root canals.

8. The method according to claim 1, characterized in that: The step of acquiring the root canal orifice key point and the root canal apex key point of the target root canal from the root canal key points of the target root canal based on the coordinate data of the root canal key points of the target root canal and the root canal instance segmentation map comprises: According to the coordinate data of the root canal key point, the root canal key point is added to the target voxel point of the root canal instance segmentation map; In descending order of confidence, for the current root canal key point, calculating the distance between the current target voxel point corresponding to the current root canal key point and the root canal key point of each root canal in the root canal instance segmentation map; Acquire a first current root canal category corresponding to a root canal key point of a root canal with a minimum distance from the root canal instance segmentation map; If the first current root canal category is a root canal orifice category, the root canal key point of the target root canal is a root canal orifice key point; If the first current root canal category is the root canal apex category, the root canal key point of the target root canal is the root canal apex key point.

9. The method according to claim 8, characterized in that After obtaining the first current root canal category corresponding to the root canal key point of the root canal with the smallest distance from the root canal instance segmentation map, the method further includes: If the first current root canal category is the same as the previous root canal category determined based on the previous root canal key point, obtaining a second current root canal category corresponding to the root canal key point of the root canal with a non-minimum distance from the root canal instance segmentation graph until the second current root canal category is different from the previous root canal category; If the second current root canal category is a root canal orifice category, the root canal key point of the target root canal is a root canal orifice key point; If the second current root canal category is the root canal apex category, the root canal key point of the target root canal is the root canal apex key point.

10. The method according to claim 1, characterized in that The method of calculating the length of the target root canal based on the root canal three-dimensional model of the target root canal, the coordinate data of the key point of the root canal orifice of the target root canal, and the coordinate data of the key point of the root canal apex of the target root canal to obtain the root canal length of the target root canal includes: Extracting the centerline of the root canal three-dimensional model of the target root canal to obtain the root canal centerline of the target root canal; Adding a root canal orifice key point and a root canal apex key point of the target root canal to a root canal centerline of the target root canal, wherein the root canal centerline of the target root canal includes the added root canal orifice key point and the root canal apex key point, and includes other key points except the root canal orifice key point and the root canal apex key point; Based on the coordinate data of the key point of the root canal orifice, the coordinate data of the key point of the root canal apex and the coordinate data of the other key points, the length of the target root canal is calculated to obtain the root canal length of the target root canal.

11. The method according to claim 10, characterized in that The step of calculating the length of the target root canal based on the coordinate data of the key point of the root canal orifice, the coordinate data of the key point of the root canal apex, and the coordinate data of the other key points to obtain the root canal length of the target root canal includes: Divide the root canal orifice key point, the root canal apex key point and the other key points of the root canal centerline into adjacent key points; Based on the coordinate data corresponding to the adjacent key points, the distance between the adjacent key points is calculated; The distances of all adjacent key points on the root canal centerline are added together to obtain the root canal length of the target root canal.

12. A root canal length determination device, characterized in that: include: A root canal instance segmentation module is used to perform root canal instance segmentation on the three-dimensional scanned image of the tooth to be repaired using a pre-trained root canal instance segmentation model to obtain a root canal instance segmentation map of the tooth to be repaired; A root canal three-dimensional model generation module, used to generate a root canal three-dimensional model of a target root canal in a tooth to be repaired based on the root canal instance segmentation map; A feature map generation module, used to extract feature points from the three-dimensional scanned image using a pre-trained feature extraction model to obtain a target feature map of the tooth to be repaired; A key point coordinate data acquisition module, used to acquire the root canal key points of the target root canal from the feature points included in the target feature map according to the number of root canals included in the root canal instance segmentation map; A root canal category determination module, configured to obtain a root canal orifice key point and a root canal apex key point of a target root canal from the root canal key points of the target root canal based on the coordinate data of the root canal key points of the target root canal and the root canal instance segmentation map; A root canal length determination module is used to calculate the length of the target root canal based on the root canal three-dimensional model of the target root canal, the coordinate data of the key points of the root canal orifice of the target root canal, and the coordinate data of the key points of the root canal apex of the target root canal, so as to obtain the root canal length of the target root canal.

13. An electronic device, characterized in that: include: processor; A memory for storing executable instructions; The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the method described in any one of claims 1 to 11.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the method according to any one of claims 1 to 11.