Research Methods for Surface Reconstruction Based on Deep Learning Segmentation Mask
By combining the Ghost-HRNet deep learning model with Focal Loss and Dice Loss loss functions, the inefficiency and insufficient accuracy of prostate MRI image segmentation and modeling are solved, achieving efficient and accurate 3D model reconstruction while reducing parameters and computational costs.
Patent Information
- Application Number
- CN202311527119.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-15
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-11-15
AI Technical Summary
Existing medical image segmentation and modeling methods suffer from problems such as time consumption, inefficiency, insufficient segmentation accuracy, high computational complexity, and rough model surfaces. In particular, there is a lack of efficient and automated segmentation and modeling methods in the three-dimensional reconstruction of prostate MRI images.
A deep learning segmentation model based on Ghost-HRNet is adopted, combined with Focal Loss and Dice Loss loss functions. Through data augmentation and morphological operations, hole filling and edge detection are performed, and a 3D model is generated by Bézier curve fitting.
It improves the accuracy and efficiency of prostate segmentation, reduces holes and jagged edges, provides a high-quality 3D model construction method, achieves a segmentation accuracy of over 93.42%, and reduces the number of model parameters and computational load.
Smart Images

Figure CN117456103B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of medical image processing technology, and in particular to a research method for surface reconstruction based on deep learning segmentation masks. Background Technology
[0002] In clinical medicine, MRI images of the prostate are an important diagnostic tool for detecting and diagnosing prostate diseases, especially prostate cancer. However, MRI images are typically presented as two-dimensional slices, which doctors need to use to construct a three-dimensional solid model of the prostate to gain a more comprehensive understanding of its structure and abnormalities. Usually, a sequence of slices is extracted in one direction (where the image is visually clearer), the slices are segmented layer by layer, and then a solid model is constructed based on the segmented images.
[0003] Existing medical modeling methods suffer from several major problems. First, manual annotation during target region segmentation requires specialized domain knowledge, which is time-consuming and inefficient. Furthermore, due to individual differences and the subjectivity of annotation by different experts, accurate and rapid segmentation remains a significant challenge. Second, medical datasets differ from natural images, involving ethical and moral considerations, and demanding high image quality. Therefore, the number of medical images is relatively small, and how to improve the segmentation accuracy of deep learning using small sample data requires in-depth research. Third, existing modeling software typically employs thresholding, region growing, and random field-based methods, which can lead to insufficient segmentation accuracy, difficulty in segmenting complex structures, and high computational complexity. Fourth, surface rendering and volume rendering in these methods often result in rough model surfaces and high computational complexity. Therefore, it is essential to propose a highly accurate medical 3D model construction method with minimal or fully automated human interaction. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a surface reconstruction research method based on deep learning segmentation masks, including: Step 1: Obtain prostate MRI images as a dataset, which is divided into a training set and a test set; Step 2, Preprocess the data and labels: Slice the dataset, remove negative samples that do not contain the prostate region, and save the images in PNG format for easy training of the subsequent segmentation model; Step 3: Augment the training set data to obtain the augmented dataset; Step 4: Build a deep learning segmentation model based on Ghost-HRNet: Use HRNet as the backbone of the segmentation network, replace the BottleNeck module in the backbone with an OSA module to capture more shallow feature information; replace the BasicBlock module in the backbone with a GhostV2 module to reduce the number of network parameters and computational cost; in the network output stage, combine multi-scale output with U-Net to improve semantic feature representation (avoid spatial or semantic knowledge loss caused by resolution changes) and improve segmentation accuracy; the loss function is Focal Loss + Dice Loss. Step 5: Perform morphological operations such as hole filling, smoothing, and disconnection on the segmented image to make the segmentation mask match the true shape of the target region; Step 6: Perform Canny edge detection to find the outer contour line of the target and extract the contour points sequentially. Step 7: Sparsely sample the contour points of each layer, and then fit the sampled points through Bézier curve interpolation to obtain a more complete and smooth spline curve. Step 8: Import the processed contour lines into 3D space according to the interlayer relationship, adjust the initial point positions of each layer contour line of the instance so that they are distributed in the same section as much as possible, and at the same time, fit the initial points from the top layer of the slice to the bottom layer using cubic spline interpolation to form guide lines; use the "sweep" command in the modeling method to build solid models between adjacent layer contour lines. Step 9: Save and export the model as an STL file for subsequent solid printing; Preferably, step 3 includes: data augmentation methods such as scaling, flipping, and color gamut transformation; the expanded dataset and labels require edge pixel padding to make the image size meet the predetermined requirements, where the image size is required to be [512, 512]. Preferably, step 4 includes: In the backbone, the BottleNeck module is replaced with the OSA module. The OSA module is an improvement on the DenseNet network. While DenseNet aggregates features from all preceding layers at each layer, the intermediate layers have relatively little impact on the model, resulting in some redundancy. The OSA module, however, aggregates all preceding layers only at the last stage, significantly reducing the number of parameters without losing effective feature information. Furthermore, the OSA module improves image feature representation by introducing object context and local context information. Object context focuses on information about the object or target, while local context focuses on the environment surrounding the target. This fine-grained information aggregation helps the network better understand image content, thereby improving its performance.
[0005] The BasicBlock module in the backbone replaces the GhostNetV2 module: The GhostNetV2 module focuses on lightweight design and introduces Ghost convolutional layers, which are computationally inexpensive convolutional operations. By reducing the number of main convolutional layers, the overall computational cost is reduced while maintaining the model's performance.
[0006] Output: HRNet combined with UNet: HRNet processes images in parallel at multiple scales, preserving high-resolution information. Combined with UNet's encoder-decoder structure, multi-scale information can be effectively fused, enabling the network to focus on both details and global context simultaneously, thereby improving the performance of segmentation tasks.
[0007] Focal Loss + Dice Loss: Focal Loss is used to handle uneven class distribution. By adjusting the weights of the loss function, it focuses more on samples that are difficult to classify, thereby reducing the impact of easily classified samples on training. Dice Loss is usually used to measure the similarity between the predicted segment and the true segment, tending to penalize false positives and false negatives in the segmentation results. Combining the two can simultaneously address class imbalance and segmentation accuracy issues, and is expected to achieve better segmentation model performance.
[0008] Preferably, step 7 includes: sparse sampling of edge contour points with a sampling step size of 12, then saving the resampled point set to a list set, importing the point set into three-dimensional space according to the sample layer spacing, and connecting the point sets of each sample layer to form a closed contour. A Bézier curve fitting method is then used to obtain the sequence contour. Preferably, step 8 includes: the sequence of contour points represents discrete points on the outer surface of the structure. A polygonal mesh model is generated based on the point cloud data using a 3D reconstruction algorithm, containing many small polygonal patches. These patches are fitted to the point cloud data to accurately represent the outer surface of the structure. After creating the 3D mesh model, a model smoothing operation is performed to reduce irregularities and noise in the model.
[0009] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention provides a method for automatic segmentation and modeling of the prostate, which significantly improves both segmentation efficiency and accuracy. At the same time, we provide a method for constructing a three-dimensional model based on a segmentation mask, which reduces the defects such as holes and jagged edges that exist in the modeling process of commonly used methods.
[0010] 2. By segmenting the test set data, the following evaluation metrics were obtained: DSC 93.42%, MIOU 87.66%, MPA 96.22%, Precision 92.65%, Params 29.349M, and FLOPs 83.355G. Analysis of the experimental results shows that the model achieves lightweight design while slightly improving segmentation accuracy, providing a reference for subsequent diagnosis and treatment of prostate cancer. Attached Figure Description
[0011] Figure 1 Flowchart for segmentation modeling of prostate magnetic resonance images; Figure 2 This is a diagram of the Ghost-HRNet network structure proposed in this invention; Figure 3 For OSA modules; Figure 4 For GhostV2 modules; Figure 5 The test set includes ablation experiment results for different modules; Figure 6 A rendering of the swept edge contour model. Detailed Implementation
[0012] The present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the described embodiments are for illustrative purposes only and are not intended to limit the scope of the invention.
[0013] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. 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 based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0014] It should be noted that the following description covers various aspects of embodiments within the scope of the appended claims. It will be apparent that the aspects described in this invention can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this invention, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. Flowcharts are used in this specification to illustrate the operations performed by the methods according to embodiments of this specification. It should be understood that preceding or subsequent operations are not necessarily performed precisely in sequence. Instead, the steps can be processed in reverse order or simultaneously. Furthermore, other operations can be added to these processes, or one or more steps can be removed from these processes.
[0015] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. The drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0016] This invention provides a surface reconstruction research method based on deep learning segmentation masks. This method can be extended to the construction of other organ or bone models in medical scenarios. The method first requires importing a dataset, slicing each instance, and then removing negative samples that do not contain the prostate region. Since the training sample size is small and affects the model training effect, offline data augmentation is used to expand the sample size. Next, the dataset is input into a Ghost-HRNet network to obtain the optimal weight file. The test set data is segmented to obtain sequential mask images. An edge detection algorithm is used to obtain the edge contours of the segmentation results. Considering that some contours have jagged edges, a resampling interpolation fitting method is used to smooth the contours. Finally, adjacent contour point sets are sequentially connected to generate triangular patches to complete the surface model construction. The model can be saved in STL format for convenient subsequent model printing and display.
[0017] This invention provides a surface reconstruction research method based on deep learning segmentation mask, such as... Figure 1 As shown, the method mainly includes the following steps: Step 1, Import the dataset: The dataset is in Raw and Mhd format, which is inconvenient for subsequent segmentation model training.
[0018] Step 2, preprocess the dataset and labels: slice the 3D images and save the sliced images as PNG format; remove negative sample interference and retain only the dataset containing the prostate target.
[0019] Step 3, Expanding the Dataset: After removing negative samples, the training set contains 778 images. Due to the small amount of data, overfitting of the model is likely. Therefore, data augmentation techniques are used to expand the samples. Augmentation methods include scaling, distortion, flipping, and color gamut transformation, each with a probability of 0.5. After augmentation, the training set contains approximately 1300 images. Considering computational efficiency and hardware performance limitations, the image size needs to be uniformly adjusted to 512×512 before training the model.
[0020] Step 4: Train the model based on the Ghost-HRNet network. The network structure is as follows: Figure 2 As shown, specifically: the training set is fed into the network with a batch size of 2, image features are extracted, and then the model learning results are compared with the real results to obtain Focal Loss + Dice loss. The network weights are adjusted with the goal of minimizing the loss function until the model converges or reaches the training number. Training is then stopped to obtain the weight file with the minimum loss function, which is called the optimal weight model.
[0021] HRNet is a single-stage keypoint detection network that achieves both strong semantic information and accurate location information by parallelizing multiple resolution branches and continuously interacting with each branch. HRNet consists of four stages, each containing a multi-scale feature extraction module and a transition module. The multi-scale feature extraction module contains multiple branches, each composed of either a BottleNeck or BasicBlock module. Concatenating multiple feature extraction modules allows for better extraction of deeper information. The transition module generates new low-resolution branches to extract deeper semantic information. In summary, HRNet provides high-quality segmentation results to a certain extent through high-resolution feature representation.
[0022] HRNet's Stage 1 consists of four BottleNeck modules connected in series, located near the image input, primarily extracting low-level features such as color and texture. The OSA module inherits the advantages of DensNet, achieving feature reuse while better capturing and transmitting information through a densely connected structure. Furthermore, the OSA module introduces ResNet's residual connections and SE attention mechanism, improving model performance and accuracy. Replacing the BottleNeck module with the OSA module reduces image information loss with a slight increase in parameters, which is beneficial for the overall network performance and stability. The OSA module structure is as follows: Figure 3 As shown.
[0023] While HRNet excels in many areas, including high-resolution image processing and multi-scale information capture, it also has some drawbacks, primarily involving increased computational cost and parameter count. HRNet's high-resolution feature maps and multi-branch structure increase the network's computational complexity. Furthermore, due to its unique network architecture, HRNet may require more training data and time to achieve good performance. GhostNetV2 is an improved version of GhostNet, a lightweight neural network architecture that uses a separable convolution operation to divide the convolution process into ordinary convolution and linear mapping, aiming to provide excellent performance while maintaining low model size and computational complexity. Experiments show that replacing the BasicBlock module with GhostNetv2 is feasible, reducing model computational costs while significantly preserving the original model's performance. The GhostNetV2 module structure is as follows: Figure 4 As shown.
[0024] HRNet's output structure is relatively simple and cannot fully utilize multi-scale features. Semantic differences exist between feature maps of different scales, and directly upsampling low-resolution feature maps and concatenating them with high-resolution feature maps in convolution affects model performance. U-Net, on the other hand, is an autoencoder structure that upsamples feature maps, gradually expanding them to the same size as the input image, while fusing feature information from multiple scales to generate refined segmentation results. By using HRNet as the feature extractor and U-Net as the segmentation head, both high-resolution images and multi-scale information are processed simultaneously, thereby improving the network's segmentation performance.
[0025] The loss function plays a crucial role in deep learning, defining the model's objective, performance metric, and adaptability. Correctly selecting and adjusting the loss function is essential for training high-performance deep learning models. Focal Loss effectively handles class imbalance by reducing the weights of easily distinguishable negative examples, preventing the network from being overwhelmed by a large number of negative cases. The calculation formula is as follows: in This is an adjustment factor with a value of [0,5], and is set to 2 here; This is used to mitigate the loss contribution of easily separable samples, thereby increasing the proportion of difficult-to-separate samples.
[0026] Dice Loss is a region-related loss function used to evaluate the similarity between two samples. Its value ranges from 0 to 1, with a larger value indicating greater similarity. in, Pixel labels of a real segmented image. This indicates the pixel category that the model predicts for segmenting the image.
[0027] Focal Loss addresses class imbalance, while Dice Loss focuses on segmentation quality. Combining them allows us to consider both accuracy and segmentation quality simultaneously, increasing the model's adaptability to different tasks and datasets. The formula is as follows: here, and These represent the weighting factors for the two types of losses, and the results were determined experimentally for this task. and All values are 1.
[0028] To verify the function of different modules, ablation experiments were conducted on different parts of the network structure using test data. The experimental comparison results are shown below. Figure 5 .
[0029] Step 5, Morphological Operations: The segmented image may contain jagged edges, internal holes, oversegmentation, and discontinuities, all of which can negatively impact subsequent modeling. To address these issues, dilation operations can be used to fill edge holes and connect discontinuous regions, erosion can remove noise, and filling algorithms can handle spatial discontinuities. In summary, morphological processing can make the masked area more complete and smooth, improving the quality of the segmentation results, which is essential for enhancing the subsequent contour modeling.
[0030] Step 6: Surface rendering and volume rendering are commonly used modeling methods in medical imaging. Surface rendering constructs a surface mesh of the 3D model by drawing its outline. Volume rendering, on the other hand, directly renders every pixel of the 3D data, thus constructing a 3D model containing internal spatial information. Surface rendering is generally faster than volume rendering, as it only processes the surface geometry without considering the density and material information within the volume, making it more suitable for visualizing the geometric appearance of objects. However, surface rendering methods have limitations for images with large interlayer spacing, such as significant differences in interlayer information, loss of important details, or inability to effectively connect surfaces between adjacent layers. To address this, we propose a modeling method based on target edge contours. This method forms a surface model by connecting and fitting segmented edge contours of the image. Although this method ignores some local features of the data, the overall structure of the fitted model closely resembles the real model, providing a valuable reference for subsequent medical diagnosis and educational training.
[0031] Canny edge detection: The Canny operator is used to extract the edge contours of the target region. Since jagged edges exist at the edges in the segmented image, hindering contour modeling, a sparse resampling fitting algorithm is used to reconstruct the target contours, achieving curve smoothing. The edge detection algorithm obtains the edge contours of each image, allowing objects belonging to the same instance to be grouped into a folder for easier subsequent modeling.
[0032] Step 7, Spline Fitting: To achieve smooth contour lines, the edges of the segmented image need to be resampled and interpolated for fitting. First, sparse sampling is performed on a single closed contour line of the target region, with a sampling step size of 12, and the sampled point set is stored in a list file. Next, Bézier curve interpolation is performed on the processed point set to obtain new edge contours. The number of point sets after interpolation in each layer of the same instance should be equal. Then, Z-axis coordinate values are added to the point set data to form a three-dimensional spatial contour dataset. The Z-coordinate values are obtained from the original image data and represent the interlayer spacing information.
[0033] Step 8, Contour Set Surface Reconstruction: Import the contour point set into the 3D coordinate space. Considering that the contour modeling method is sensitive to the initial point position, the point set order needs to be adjusted before modeling to ensure that the initial points of each contour layer are distributed on the same cross section as much as possible. The modeling method selected in this invention is "sweep". In addition to the coordinates of each contour layer, 1-3 guide lines need to be added to define the shape trajectory. The position of the guide lines is determined by sequentially connecting the initial points of each layer through cubic spline interpolation fitting. Apply the sweep command to sequentially connect the contour lines of adjacent layers, and then add guide lines to automatically complete the solid model construction. At this time, the constructed model will have problems such as surface wrinkles and model distortion, and it is necessary to perform secondary smoothing. The model is smoothed and repaired by an automatic fitting algorithm to obtain the optimal model effect of the prostate. The modeling effect is as follows. Figure 6 As shown.
[0034] The specific method for adjusting the point set order is as follows: map all contour lines onto the same parallel plane, find the innermost contour line and calculate the center point, make a cross section perpendicular to the parallel plane according to the coordinates of the center point, the cross section has only two intersection points with any contour line, select one of the intersection points as the starting point of the sequence contour lines, and adjust the point set of each layer of contour lines according to the starting point order to form a new contour line set.
[0035] Step 9, Model Saving and Printing: After completing the model construction, select the file format and save path to output the result file. The corresponding solid model can then be obtained according to requirements and materials. During the printing process, attention should also be paid to the printing parameter settings to obtain output results that meet quality and design requirements.
[0036] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for surface reconstruction based on deep learning segmentation mask, characterized in that, Includes the following steps: Step 1: Obtain prostate MRI image data, examine each layer to observe the image characteristics, and divide the dataset into training and test sets; Step 2: Convert the Raw and Mhd format datasets, slice each instance separately, and save the sliced images as 2D images in PNG format. At the same time, remove data and labels that do not contain the prostate. Step 3: Since the original training dataset only contains 50 instances, and each instance has 17 to 54 slices, the small amount of data will affect the segmentation effect of the network model. Therefore, it is necessary to expand the dataset by scaling, inverting, and color gamut transformation to improve the automatic segmentation ability and generalization of the model. Step 4: Build an improved high-resolution HRNet network: Replace the BasicBlock module in the original network with the GhostNetV2 module to greatly reduce the number of model parameters; replace the BottleNeck module with the OSA module to improve the shallow feature information extraction process; at the network output, fully integrate multi-scale information extracted from the image through the U-Net structure; considering the data imbalance between foreground and background in the dataset, Dice loss + Focal loss are introduced to greatly reduce the impact of data distribution on model training; then input the training dataset into the segmentation network for training and save the optimal model. Step 5: Input the test set images into the trained segmentation model to obtain the corresponding sequence segmentation mask. Due to the difference in data, the segmented mask may have holes, jagged edges, and connection interruptions. Therefore, it is necessary to fill the holes, smooth the mask, and interrupt the connection to make the segmentation mask match the real shape of the target region. Step 6: Process the morphologically processed mask image and use the Canny edge detection algorithm to obtain the edge contour line of each instance; Step 7: The key to contour modeling lies in the quality of the contour. Considering that the segmentation mask has jagged edges that affect the modeling effect, the closed contour is smoothed by resampling the edge feature points and then applying the Bezier curve interpolation fitting method. Step 8: Reconstruct the surface model of the sequence contour lines using the "Sweep" command; Step 9: Save the constructed model as an STL file, and you can also print the model out.
2. The method according to claim 1, characterized in that, Step 1 specifically includes: by observing the structure of the prostate magnetic resonance image, the entire gland is "peach-shaped", and the shape of each layer of the gland is irregular but presents a single closed outline. In order to construct a prostate surface model more accurately and quickly, a solid model can be constructed based on the outline of the target area.
3. The method according to claim 2, characterized in that, Step 2 specifically includes: the acquired prostate raw data is in Mhd and Raw format, which is inconvenient for model training, and the contour modeling method used does not have high requirements for interlayer spacing; therefore, the raw dataset can be sliced, and the sliced images are saved in PNG format; the two-dimensional images after slicing contain a large amount of negative sample data, which is not conducive to network training, and data that does not contain the prostate region needs to be removed; the processed training sample slices have 778 images.
4. The method according to claim 3, characterized in that, Step 3 specifically includes: the number of training samples mentioned above is insufficient for deep learning, so it is necessary to augment the data and labels by using scaling, flipping, and color gamut transformation methods to augment the training samples.
5. The method according to claim 4, characterized in that, Step 4 specifically includes: Step 4.1: There are four sizes of cross-sectional slice images: 256×256, 320×320, 384×384, and 512×512. In order to facilitate the training of the segmentation network model, the size of each slice needs to be adjusted to 512×512. Step 4.2, Build the HRNet network: HRNet connects high- and low-resolution sub-networks in parallel. It maintains high-resolution feature maps throughout the process for spatially accurate probability map estimation. HRNet's feature fusion method adopts a multi-scale information fusion approach, rather than directly converging high- and low-level features. This fusion method can better improve the high-resolution feature representation of the network and further enhance the network's feature extraction capability. Step 4.3, OSA module replaces BottleNeck module: The extraction effect of high-level feature information largely depends on shallow feature representation. In order to fully extract shallow information, the BottleNeck module in the front end of the network is replaced with OSA module. This module realizes the reuse of features in the channel dimension by aggregating the features of all previous layers to the last layer. At the same time, since each layer has fewer unique feature channels, there are fewer parameters and higher computational efficiency. Step 4.4, GhostNetV2 module replaces BasicBlock module: HRNet, as a multi-scale, multi-branch network structure, extracts more comprehensive multi-scale features while maintaining a high-resolution network. However, as the network structure deepens, the required number of parameters and computational cost will increase exponentially. This is because it has a large number of stacked BasicBlock modules, which increases computational complexity. GhostNetV2 is a further development of GhostNet, achieving the goal of model lightweighting by reducing the number of parameters and computational complexity. Step 4.5, HRNet combined with UNet output: HRNet's lowest resolution branch has the strongest semantic features. Directly upsampling by 8 times or only outputting high-resolution feature layers cannot make full use of multi-scale information. UNet alleviates the above problems to some extent by gradually upsampling and fusing adjacent layers. This network structure is conducive to the information propagation from the strongest semantic features to the highest resolution features. Step 4.6, Loss Function: Considering the serious data imbalance problem in the prostate data, in order to improve the segmentation effect and speed up the network training process, Dice Loss + Focal Loss is used as the model training supervision loss, and their weights are equal and all are 1. The model optimization process is realized through this iterative supervised training method. Step 4.7, Training the Deep Learning Segmentation Model: Based on the above steps, the network is designed and trained using the PyTorch platform. Due to limitations in computer performance, the Epoch is set to 100, the BatchSize to 2, and the initial learning rate to 0.0001. The Adam optimizer is used. Considering that a learning rate that is too low will result in slow learning speed, while a learning rate that is too high will make convergence difficult, the learning rate is dynamically adjusted to obtain better model training results. After training, the test set images are input into the trained model for segmentation to obtain the corresponding output results. To evaluate the segmentation performance of the model, Dsc, MIOU, MPA, Precision, Params, and FLOPs are used as evaluation metrics to measure the model's segmentation performance.
6. The method according to claim 5, characterized in that, Step 5 specifically includes: In the segmentation results of the test set, some images may have internal holes and broken edges, which are not conducive to subsequent contour modeling. Therefore, morphological processing of the segmentation results is required to obtain a single closed contour.
7. The method according to claim 6, characterized in that, Step 6 specifically includes: using the Canny edge detection operator to obtain the image edge contours of the processed mask image.
8. The method according to claim 7, characterized in that, Step 7 specifically includes: Since the obtained edge contour has a "jagged" appearance, which will have a certain impact on the surface modeling quality, in order to obtain a smooth contour line, it is necessary to perform a "smoothing" operation on the contour line, as follows: Step 7.1: Obtain the set of edge contour points for each contour layer and store them in a list: in Indexes for each layer's contour lines, with a range of... , This represents the total number of layers after removing negative samples; This represents the number of edge feature points in each layer. Since the number of edge points varies in each layer, It is dynamic and changing; Step 7.2: Sparsely sample the edge feature points, determine the optimal sampling interval through experimentation, and then resample the edge points of each layer to obtain equidistant sparse sampling points. The calculation formula is as follows: in This indicates the sampling interval. Experiments have shown that when... The best results; This represents the number of edge points in each layer after resampling. Step 7.3: To obtain a smooth contour line, the resampled feature points need to be fitted. Here, Bézier curve interpolation is chosen as the curve fitting algorithm. This algorithm has high accuracy and stability and continuous curvature, making it suitable for constructing complex curves. The calculation formula is as follows: in , , For spline control points, It is a node vector.
9. The method according to claim 8, characterized in that, Step 8 specifically includes: Step 8.1: Import the contour point set into 3D space. The Z-axis coordinate is obtained based on the original data spatial resolution information. The layer spacing of a single instance is equal. Since the "sweep" command is sensitive to the initial point position, the order of the data point set needs to be adjusted. The adjustment method is as follows: map all contour lines onto the same parallel plane, find the center point of the innermost contour line, and make a cross section perpendicular to the parallel plane based on the coordinates of the center point. The cross section has exactly two intersection points with any contour line. Select one intersection point as the starting point of the sequence contour lines. Adjust the point set of each layer contour line according to the starting point order to form a new contour line set. At the same time, connect the initial points of each layer sequentially through cubic spline interpolation fitting as a surface modeling guide line. Step 8.2 Call the "Sweep" command to connect the contour lines of adjacent layers in sequence, select the modeling guide line, and complete the construction of the 3D model.
10. The method according to claim 9, characterized in that, Step 9 specifically includes: exporting the constructed three-dimensional prostate model as an STL file, and using a 3D printing tool to adjust and print the model.
Citation Information
Patent Citations
A tooth CT image segmentation method based on deep learning
CN109816661A
Medical image interlayer interpolation and three-dimensional reconstruction method
CN116188452A
