A surface mesh reconstruction method for medical images
By constructing a medical image reconstruction model including CNN and GNN, extracting and enhancing 3D voxel image features, and deforming the template grid, the problem of insufficient feature representation and insufficient utilization of global attributes in the existing technology is solved, and the medical technology is significantly improved. Accuracy and boundary delineation effect of image surface mesh reconstruction.
Patent Information
- Application Number
- CN202410939983.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-07-15
AI Technical Summary
Existing medical image surface mesh reconstruction methods have deficiencies in feature extraction and global attribute utilization, resulting in limited feature representation of surface mesh generation and difficulty in accurately reconstructing the boundaries of complex multi-tissue intertwined structures.
Construct a medical image reconstruction model including the CNN feature extraction part, feature enhancement and mapping part, and GNN deformation part. Extract 3D voxel image features through CNN, use the feature interaction module and Transformer for feature enhancement, and use the GNN deformation part to modify the template grid. Deformation is performed to generate a prediction mesh.
It effectively improves the accuracy of surface mesh reconstruction of medical images, reduces feature loss, and can better capture the global properties of complex tissue structures and improve the boundary delineation effect.
Smart Images

Figure CN118470253B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision technology, and in particular to a surface mesh reconstruction method for medical images. Background Art
[0002] By reconstructing and visualizing two-dimensional medical images in three dimensions, the complex three-dimensional organ structure can be intuitively displayed, which will inevitably help doctors to conduct comprehensive and accurate analysis, thereby improving the level of medical diagnosis.
[0003] However, directly reconstructing surface meshes from medical images is highly challenging. Methods proposed in previous studies tend to use simple encoder-based feature extraction blocks, resulting in limited feature representation for subsequent deformation blocks. Obviously, the generation of surface meshes requires sufficient features to be extracted from the original image, otherwise, a large number of valuable features will be lost in the mapping process from voxel features to mesh features. At the same time, compared with the relative simplicity of regular 3D voxel images, feature extraction from irregular network data remains a complex problem. In addition, previous graph convolutions mainly capture only local mesh features without fully utilizing global properties for reconstruction. Reconstructed tissue voxels usually include not only a single type of tissue, but also multiple tissues that are intricately intertwined, making it challenging to depict the boundaries within the reconstructed tissue. Summary of the invention
[0004] Based on this, it is necessary to provide a surface mesh reconstruction method for medical images, the method comprising:
[0005] S1: construct a medical image reconstruction model, which includes a CNN feature extraction part, a feature enhancement and mapping part, and a GNN deformation part;
[0006] S2: passing the acquired 3D voxel medical image through the CNN feature extraction part to extract the feature map of the target tissue;
[0007] S3: enhancing the feature map of the target tissue by the feature enhancement and mapping part;
[0008] S4: Based on the enhanced feature map, the template grid is deformed through the GNN deformation part to obtain a predicted grid.
[0009] Beneficial effects: This method constructs a medical image reconstruction model, extracts the features of 3D voxel medical images to deform the template mesh, and finally obtains the predicted mesh, which effectively improves the accuracy of medical image surface mesh reconstruction. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the embodiments of the present application 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, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0011] Figure 1 This is a flowchart of a surface mesh reconstruction method for medical images according to an embodiment of the present application.
[0012] Figure 2 A schematic diagram of a feature interaction module according to an embodiment of the present application.
[0013] Figure 3 Schematic diagram of an element dot product deformation module according to an embodiment of the present application. DETAILED DESCRIPTION
[0014] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present application, so the present application is not limited by the specific embodiments disclosed below.
[0015] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0016] like Figure 1 As shown, this embodiment provides a surface mesh reconstruction method for medical images, the method comprising:
[0017] S1: Construct a medical image reconstruction model, which includes a CNN feature extraction part, a feature enhancement and mapping part, and a GNN deformation part.
[0018] S2: The acquired 3D voxel medical image is passed through the CNN feature extraction part to extract the feature map of the target tissue.
[0019] Specifically, the CNN feature extraction part includes an encoding end and a decoding end; the encoding end encodes the input 3D voxel medical image multiple times to obtain a group of low-level feature maps whose sizes are reduced in geometric progression; the size of the smallest low-level feature map is 1 / 16 of the size of the 3D voxel medical image; the decoding end decodes the smallest low-level feature map multiple times to obtain a group of high-level feature maps whose sizes are enlarged in geometric progression, and the size of the largest high-level feature map is consistent with the size of the 3D voxel medical image.
[0020] In this embodiment, the backbone of the CNN feature extraction part is a residual 3D-UNet network with an encoder-decoder structure as the backbone.
[0021] S3: enhancing the feature map of the target tissue through the feature enhancement and mapping part.
[0022] Specifically, the feature enhancement and mapping part includes a feature interaction module, which divides the feature maps into four groups, each group including two low-level feature maps ( , ) and the two high-level feature maps ( , );
[0023] Figure 2 is a schematic diagram of a feature interaction module, such as Figure 2 As shown in the figure, the interaction between features at different scales is achieved through the feature interaction module, and the advantages of long-range dependencies in Transformer are utilized.
[0024] In each group, the low-level feature map and the high-level feature map are reshaped into a sequence of flat 2D blocks of the same size, calculated as:
[0025] , ∈{0,1,2,3};
[0026] in, Indicates i A sequence of flat 2D blocks of feature maps;
[0027] The query (Q) in the Transformer is responsible for querying the specific part of interest in the entire information set. To ensure effective interaction between different functional layers, four flat 2D block sequences ( , , , ) are concatenated, and the concatenation result is passed through a multi-layer perceptron to obtain a query value, and the query value is assigned to each feature map in the group, which helps the model to fully grasp the overall requirements within the query component. The calculation formula is:
[0028] ;
[0029] in, represents the query value; MLP(·) represents multi-layer perceptron; concat(·) represents concatenation;
[0030] Pass each of the four flat 2D block sequences through a separate multilayer perceptron to obtain the key and value of each feature map within the group; the calculation formula is:
[0031] ; ;
[0032] in, Indicates i The key value of the feature map; Indicates i The value of the feature map;
[0033] In each feature map in the group, the corresponding query value, key value and value are subjected to the multi-head attention mechanism and up-sampling to obtain the enhanced feature map. The calculation formula is:
[0034] ;
[0035] in, Indicates i enhanced feature maps; UP(·) represents upsampling; MSA(·) represents the multi-head self-attention function; AG(·) represents the attention gate.
[0036] Furthermore, the feature enhancement and mapping part also includes feature mapping, and in each group, the feature mapping maps the enhanced feature map to mesh vertex features through a trilinear interpolation network sample function; the mesh vertex features are used to deform the template mesh.
[0037] Through step S3, the extracted feature map can be enhanced to reduce the loss of useful features.
[0038] S4: Based on the enhanced feature map, the template grid is deformed through the GNN deformation part to obtain a predicted grid.
[0039] Specifically, the GNN deformation part includes multiple element dot product deformation modules, and the internal process of each element dot product deformation module is as follows: Figure 3 As shown, the template mesh includes vertices, edges and faces;
[0040] The GNN deformation process includes:
[0041] Step 1: extract the features of the vertices to obtain the template mesh vertex features;
[0042] Step 2: In the element dot product deformation module, the mesh vertex feature is connected with the template mesh vertex feature; based on the edge weight, the connection result is embedded through the graph convolutional neural network layer to obtain the embedded feature; the calculation formula is:
[0043] ;
[0044] ;
[0045] in, Indicates the connection result; Represents mesh vertex features; Represents the template mesh vertex features; Represents embedded features; represents the graph convolutional neural network layer; E represents the weight of the edge;
[0046] The calculation formula of the graph convolutional neural network layer is:
[0047] ;
[0048] in, Represents the first embedded by the GCN layer i vertices; represents the first weight; represents the second weight; Indicates the number of vertices; From the source vertex j To target vertex i The weight of the edge; Indicates i vertices; Indicates j vertices;
[0049] The embedded features are divided into local embedded features and global embedding features ;
[0050] Step 3: Pass the local embedded features from adjacent vertices and the weights of their corresponding edges through the graph convolutional neural network layer to obtain local features; the calculation formula is:
[0051] ;
[0052] in, Represents local features;
[0053] Passing the global embedding feature through an element-wise dot product self-attention layer to obtain a global feature;
[0054] Although the standard self-attention mechanism can capture long-range dependencies, its quadratic computational complexity makes it difficult to use for analyzing surface meshes with hundreds of thousands of vertices. In order to obtain global features and establish long-term dependencies while maintaining adaptability to surface meshes with hundreds of thousands of vertices, an element-wise dot product self-attention layer is designed; in point cloud segmentation tasks, multi-layer perceptrons have been shown to be effective in extracting global features, so multi-layer perceptrons are also used in the element-wise dot product self-attention layer to capture the relationship between points.
[0055] The process of obtaining global features includes:
[0056] The global embedding features are subjected to a combination operation in the element-wise dot product self-attention layer to obtain a query matrix, a key matrix, and a value matrix, respectively; the combination operation includes a multilayer perceptron, a ReLU activation, and a batch normalization; the calculation formula is:
[0057] ; ; ;
[0058] in, represents the query matrix; represents the bond matrix; represents the value matrix; Indicates a combined operation;
[0059] The query matrix and the key matrix are multiplied element by element, and then passed through the Softmax function to obtain the attention weight; the calculation formula is:
[0060] ;
[0061] Among them, A represents the attention weight; Represents the Softmax function; Represents element-wise multiplication;
[0062] The value matrix is multiplied element by element by the attention weight, and then combined to obtain the global feature. The calculation formula is:
[0063] ;
[0064] in, Represents global features.
[0065] Step 4: Concatenate the local feature with the global feature and add it element by element with the embedded feature to obtain the fused feature. The calculation formula is:
[0066] ;
[0067] in, Indicates fusion features; Represents embedded features; Represents local features; Represents global features;
[0068] Step 5: Pass the fusion feature through the feedforward network to obtain the element dot product deformation feature; the calculation formula is:
[0069] ;
[0070] in, Represents the element dot product deformation feature; Indicates fusion features; represents a feed-forward network;
[0071] Step 6: deforming the surface based on the element dot product deformation feature to obtain a deformed surface;
[0072] Step 7: Extract the vertex features of the deformed surface, and repeat steps 1-6 until the mesh vertex features of the four groups of feature maps are traversed in sequence to obtain the predicted mesh.
[0073] This embodiment also provides a training process for a medical image reconstruction model, including: using a network contour loss function, a curvature weighted chamfer loss function, a normal loss function, an edge length loss function, and a Laplace loss function to form a total loss function, and back-propagating the medical image reconstruction model based on the total loss function.
[0074] The calculation formula of the total loss function is:
[0075] ;
[0076] in, Represents the loss function; represents the curvature weighted chamfer loss function; represents the normal loss function; represents the edge length loss function; represents the Laplace loss function; represents the network contour loss function; Represents a hyperparameter.
[0077] Furthermore, the network contour loss is calculated based on the predicted grid and the true value, and the calculation formula of the network contour loss function is:
[0078] ;
[0079] ;
[0080] ;
[0081] in, represents the network contour loss function; represents the cross entropy loss; A grid outline representing the prediction grid; A grid outline representing the true value; Indicates dice loss; represents the mesh contour extraction method; represents the prediction grid; Represents the true value.
[0082] The vicinity of the reconstructed tissue voxel often includes not only one tissue, but also multiple tissues entangled with each other, so it is difficult to distinguish the contour boundary of the reconstructed tissue; especially in brain MR, the cerebral cortex structure is complex and the boundary contour is relatively complex, so the grid contour loss is introduced. The grid contour loss function enables the medical image reconstruction model to better capture the boundary information.
[0083] The calculation formula of the normal loss function is:
[0084] ;
[0085] in, represents the normal loss function; is the inner product of two vectors; p Represents the first p vertices; P Represents the number of vertices in the predicted mesh; k N(p) , N(p) Represents a vertex p The adjacent points of k Represents a vertex p No. k Adjacent points.
[0086] The calculation formula of the edge length loss function is:
[0087] ;
[0088] in, represents the edge length loss function.
[0089] The calculation formula of the Laplace loss function is:
[0090] ;
[0091] in, represents the Laplace loss function.
[0092] Furthermore, the process of obtaining the mesh outline is:
[0093] The coordinates of the vertices in the predicted mesh are mapped to the coordinate space of the voxel field, and the vertex coordinates are projected into the surrounding 8 voxels. The weighted sum of the projection points is calculated, and the weights on the corresponding voxels determined by trilinear interpolation are accumulated; subsequently, in order to prevent excessive feature superposition and ensure that the voxel features maintain an appropriate proportion, the voxel features are weighted normalized to obtain the mesh outline.
[0094] The curvature weighted chamfer loss is calculated based on the vertices in the predicted mesh and the vertices in the true value. The calculation formula of the curvature weighted chamfer loss function is:
[0095] ;
[0096] in, represents the curvature weighted chamfer loss function; p Represents the first p vertices; P Represents the number of vertices in the predicted mesh; q Represents the true value of q vertices; Q Represents the number of vertices in the real value; Represents a vertex p The curvature at Represents a vertex q The curvature of the .
[0097] The reconstruction of densely folded regions is improved by a curvature-weighted chamfer loss function, guiding the model to reconstruct the surface mesh.
[0098] This embodiment also provides a reconstruction effect comparison table;
[0099] Table 1 is a comparison table of reconstruction effects, which reflects the reconstruction effects through the average symmetric surface distance and Haus distance;
[0100] ;
[0101] In Table 1, ASSD stands for Average Symmetric Surface Distance; HD stands for Haus Distance. Other methods are described in the table:
[0102] nnFormer: A 3D Transformer for volumetric medical image segmentation that not only exploits the combination of staggered convolutions and self-attention operations, but also introduces local and global volume-based self-attention mechanisms to learn volumetric representations.
[0103] Swin UNETR: Swin Transformer for Semantic Segmentation of Brain Tumors in MRI Images,The task of 3D brain tumor semantic segmentation is reformulated as a sequence-to-sequence prediction problem, where the multimodal input data is projected into a one-dimensional embedding sequence and used as the input of a hierarchical Swin Transformer encoder. The Swin Transformer encoder extracts features at five different resolutions by utilizing a shifted window to compute self-attention, and is connected to a fully convolutional neural network-based decoder at each resolution via skip connections.
[0104] nnU-Net: An Automatic Configuration Method for Biomedical Image Segmentation Based on Deep Learning, nnU-Net can automatically configure itself, including preprocessing, network architecture, training, and post-processing for any new task. In the process, key design choices are modeled as a set of fixed parameters, interdependent rules, and empirical decisions.
[0105] DeepCSR: A 3D deep learning method for cortical surface reconstruction that uses a neural network model with hypercolumn features to predict implicit surface representations of points in brain template space. It then obtains the cortical surface at the desired level of detail by evaluating the surface representation at specific coordinates, applying a topology correction algorithm and an isosurface extraction method. Due to the sequential nature of this approach and the effectiveness of its hypercolumn feature scheme, DeepCSR is able to efficiently reconstruct the cortical surface at high resolution, capturing fine details in cortical folding.
[0106] Vox2Cortex: A method for fast and explicit reconstruction of cortical surfaces from 3D MRI scans using geometric deep neural networks. Vox2cortex is a deep learning-based algorithm that can directly produce a 3D mesh of topologically correct cortical boundaries. Vox2cortex uses convolutional and graph convolutional neural networks to deform the initial template into the dense folded geometry of the cortex represented by MRI scans, while ensuring accuracy and reducing time and resource costs.
[0107] It can be seen from Table 1 that, by comparing the average symmetric surface distance and Haus distance of each method, the surface mesh reconstruction effect of the surface mesh reconstruction method provided in this embodiment is better than other methods, and the accuracy of surface mesh reconstruction of medical images is effectively improved.
[0108] The method provided in this embodiment constructs a medical image reconstruction model, extracts the features of the 3D voxel medical image to deform the template mesh, and finally obtains a predicted mesh. It learns fine-grained features from a given image and considers global features in the spatial domain to promote image-to-mesh reconstruction, thereby effectively improving the accuracy of medical image surface mesh reconstruction.
[0109] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0110] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the patent application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent application shall be subject to the attached claims.
Claims
1. A surface mesh reconstruction method for medical images, characterized in that: include: S1: construct a medical image reconstruction model, which includes a CNN feature extraction part, a feature enhancement and mapping part, and a GNN deformation part; S2: passing the acquired 3D voxel medical image through the CNN feature extraction part to extract the feature map of the target tissue; The CNN feature extraction part includes an encoding end and a decoding end; the encoding end encodes the input 3D voxel medical image multiple times to obtain a set of low-level feature maps whose sizes are reduced in geometric progression; the size of the smallest low-level feature map is 1 / 16 of the size of the 3D voxel medical image; the decoding end decodes the smallest low-level feature map multiple times to obtain a set of high-level feature maps whose sizes are enlarged in geometric progression, and the size of the largest high-level feature map is consistent with the size of the 3D voxel medical image; S3: enhancing the feature map of the target tissue by the feature enhancement and mapping part; The feature enhancement and mapping part includes a feature interaction module, which divides the feature maps into four groups, each group including two low-level feature maps and two high-level feature maps; In each group, the low-level feature map and the high-level feature map are reshaped into a flat 2D block sequence of the same size, and four flat 2D block sequences are spliced, and the splicing result is passed through a multi-layer perceptron to obtain a query value, and the query value is assigned to each feature map in the group; Pass each of the four flattened 2D block sequences through a separate multilayer perceptron to obtain the key and value of each feature map within the group; In each feature map in the group, the corresponding query value, key value and value are subjected to a multi-head attention mechanism and up-sampling to obtain the enhanced feature map; S4: Based on the enhanced feature map, the template grid is deformed through the GNN deformation part to obtain a predicted grid.
2. The surface mesh reconstruction method for medical images according to claim 1, characterized in that: The feature enhancement and mapping part also includes a feature map, in each group, the feature map maps the enhanced feature map to the mesh vertex features through a trilinear interpolation network sample function; The mesh vertex features are used to deform the template mesh.
3. The surface mesh reconstruction method for medical images according to claim 2, characterized in that: The GNN deformation part includes a plurality of element dot product deformation modules, and the template mesh includes vertices, edges and faces; The GNN deformation process includes: Step 1: extract the features of the vertices to obtain the template mesh vertex features; Step 2: In the element dot product deformation module, the mesh vertex feature is connected with the template mesh vertex feature; based on the weight of the edge, the connection result is embedded through the graph convolutional neural network layer to obtain an embedded feature; the embedded feature is divided into a local embedded feature and a global embedded feature; Step 3: Pass the local embedded features from adjacent vertices and the weights of their corresponding edges through a graph convolutional neural network layer to obtain local features; Passing the global embedding feature through an element-wise dot product self-attention layer to obtain a global feature; Step 4: concatenate the local feature with the global feature, and add them element by element with the embedded feature to obtain a fused feature; Step 5: Pass the fused features through a feedforward network to obtain element-wise dot product deformation features; Step 6: deforming the surface based on the element dot product deformation feature to obtain a deformed surface; Step 7: Extract the vertex features of the deformed surface, and repeat steps 1-6 until the mesh vertex features of the four groups of feature maps are traversed in sequence to obtain the predicted mesh.
4. The surface mesh reconstruction method for medical images according to claim 3, characterized in that: The training process of the medical image reconstruction model includes: using a network contour loss function, a curvature weighted chamfer loss function, a normal loss function, an edge length loss function and a Laplace loss function to form a total loss function, and performing back propagation on the medical image reconstruction model based on the total loss function; The calculation formula of the normal loss function is: ; in, represents the normal loss function; is the inner product of two vectors; p Represents the first p vertices; P Represents the number of vertices in the predicted mesh; q Represents the true value of q vertices; k N(p) , N(p) Represents a vertex p The adjacent points of k Represents a vertex p No. k Adjacent points; The calculation formula of the edge length loss function is: ; in, represents the edge length loss function; The calculation formula of the Laplace loss function is: ; in, represents the Laplace loss function.
5. The surface mesh reconstruction method for medical images according to claim 4, characterized in that: The network contour loss is calculated based on the predicted grid and the true value, and the calculation formula of the network contour loss function is: ; ; ; in, represents the network contour loss function; represents the cross entropy loss; A grid outline representing the prediction grid; A grid outline representing the true value; Indicates dice loss; represents the mesh contour extraction method; represents the prediction grid; Represents the true value.
6. The surface mesh reconstruction method for medical images according to claim 4, characterized in that: The curvature weighted chamfer loss is calculated based on the vertices in the predicted mesh and the vertices in the true value. The calculation formula of the curvature weighted chamfer loss function is: ; in, represents the curvature weighted chamfer loss function; p Represents the first p vertices; P Represents the number of vertices in the predicted mesh; q Represents the true value of q vertices; Q Represents the number of vertices in the real value; Represents a vertex p The curvature at Represents a vertex q The curvature of the .
7. The surface mesh reconstruction method for medical images according to claim 4, characterized in that: The calculation formula of the total loss function is: ; in, Represents the loss function; represents the curvature weighted chamfer loss function; represents the normal loss function; represents the edge length loss function; represents the Laplace loss function; represents the network contour loss function; represents a hyperparameter.
8. The surface mesh reconstruction method for medical images according to claim 3, characterized in that: The step of passing the global embedding feature through an element-wise dot product self-attention layer to obtain a global feature comprises: The global embedding features are subjected to a combination operation in an element-wise dot product self-attention layer to obtain a query matrix, a key matrix, and a value matrix, respectively; the combination operation includes a multilayer perceptron, a ReLU activation, and a batch normalization; Multiply the query matrix and the key matrix element by element, and then pass the Softmax function to obtain the attention weight; The value matrix is multiplied element by element by the attention weight, and then combined to obtain the global feature.
