Cervical plexus neuropathy automatic detection method and detection system
Through deep learning technology, combined with the cervical plexus nerve estimation module, the two-way feature propagation module and the spatial perception sparse Transformer, the problem of insufficient application in the detection of cervical plexus neuropathy is solved, and the accurate and automatic detection of cervical plexus neuropathy is achieved, and the detection efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202510109905.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-01-23
AI Technical Summary
The prior art is insufficiently used in the detection of cervical plexus neuropathy, which leads to the lesion being easily missed, which has a serious impact on the patient's quality of life.
The automatic detection method of cervical plexus neuropathy based on deep learning, including obtaining neck MRI images and preprocessing, using the cervical plexus nerve estimation module to initially locate the cervical plexus nerve, correcting the position information deviation through the bidirectional feature propagation module and spatial perception sparse Transformer, generating refined features and performing cervical plexus nerve region segmentation and abnormal prediction.
It realizes accurate and automatic detection of cervical plexus neuropathy, improves the accuracy and efficiency of detection, and has strong robustness and good generalization capabilities.
Smart Images

Figure CN119942225A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an automatic detection method and a detection system for cervical plexus neuropathy, and belongs to the technical field of medical image processing. Background Art
[0002] Neck and shoulder pain is a very common disease in clinical practice, which is usually attributed to a variety of causes such as cervical spondylosis, cervical fasciitis, neck and shoulder muscle strain, and frozen shoulder. However, there is also a less concerned peripheral sensory neuropathy, namely cervical plexus compression syndrome. For this lesion, clinical testing usually requires the use of imaging techniques such as magnetic resonance imaging (MRI) to clarify the location and extent of the lesion. Although this lesion may cause intractable neck and shoulder pain, it is easy to be missed in clinical practice, which has a serious impact on the patient's quality of life.
[0003] In recent years, deep learning technology has rapidly emerged in the medical field with its powerful data processing and pattern recognition capabilities, becoming an important force in promoting the advancement of medical technology. In particular, in the key field of medical lesion detection, deep learning has shown unprecedented potential and broad application prospects. Through the training and optimization of massive medical data, deep learning algorithms can accurately capture and analyze subtle changes in medical images, providing doctors with more accurate and efficient diagnostic support.
[0004] The application of deep learning is particularly prominent in image analysis and automatic diagnosis. It can not only significantly improve the accuracy of lesion detection, but also greatly shorten the diagnosis time and reduce the workload of doctors. At present, this technology has achieved remarkable initial application results in the detection of various nerve-related lesions. For example, in the identification of lesions in complex nerve structures such as the brachial plexus and choroid plexus, deep learning algorithms, with their excellent feature extraction capabilities, have successfully helped doctors discover many early lesions that are difficult to detect with traditional methods, winning valuable treatment time for patients.
[0005] However, although deep learning has made significant progress in the field of nerve-related lesion detection, its application in the specific field of cervical plexus lesion detection is still blank. As one of the important nerve structures of the human body, the lesions of the cervical plexus have a serious impact on the daily life and health of patients. However, due to the complexity and diversity of cervical plexus lesions and the relative scarcity of existing medical data, the research and application of deep learning algorithms in the detection of cervical plexus lesions face many challenges. Therefore, in the future, it is urgent to strengthen scientific research investment in related fields and collect more high-quality cervical plexus lesion data to promote breakthroughs and applications of deep learning technology in the detection of cervical plexus lesions. Summary of the invention
[0006] In order to improve the accuracy and efficiency of cervical plexus neuropathy detection, the present invention provides an automatic detection method and detection system for cervical plexus neuropathy, and the technical scheme is as follows:
[0007] The first object of the present invention is to provide a method for automatically detecting cervical plexus neuropathy, comprising:
[0008] Step 1: Acquire cervical MRI images and perform preprocessing;
[0009] Step 2: Use the cervical plexus estimation module to process the cervical MRI image, preliminarily locate the cervical plexus, and obtain a rough map containing its location information;
[0010] Step 3: Use the bidirectional feature propagation module to correct the deviation in the process of extracting cervical plexus nerve position information and improve the ability to aggregate information from MRI sequences;
[0011] The bidirectional feature propagation module uses a feature-aware alignment module to generate aggregated features based on the cervical plexus feature encoder and propagates them to the front and back layer sequence streams;
[0012] Step 4: Achieve high performance based on spatially aware sparse Transformer while exploiting distal information in MRI sequences;
[0013] The spatially aware sparse Transformer uses a spatially aware attention layer to capture the features of the distal information of the MRI layer sequence based on the aggregated features and generate refined features;
[0014] Step 5: Using the cervical plexus feature decoder, the segmentation result of the cervical plexus region is predicted based on the refined features;
[0015] Step 6: Use the classification diagnosis module to perform abnormality prediction based on refined features to achieve binary classification of abnormal or normal cervical plexus nerves.
[0016] Optionally, step 2 includes:
[0017] Step 21: Average pooling is performed on each layer of the 2D image of the 3D neck MRI image to obtain a downsampled 3D neck MRI layer sequence.
[0018] Step 22: According to Estimating forward sequence flow using Opencv package in python and backward sequence flow
[0019] Step 23: Based on the forward sequence flow and backward sequence flow The cervical plexus estimation module generates a non-normalized rough map for each layer sequence
[0020]
[0021] A t =1-B t
[0022] Among them, O 1→0 =0,O T→T+1 = 0, i and t represent the channel and step length of laminar flow respectively, A t It is B t The refined image obtained after normalization operation can realize the preliminary positioning of the cervical plexus nerve position information.
[0023] Optionally, step 3 includes:
[0024] Step 31: input each layer of the 2D image of the 3D cervical MRI image into a cervical plexus nerve feature encoder to obtain features of different scales, and the bidirectional feature propagation module corresponds to different propagation branches based on the different levels of features extracted by the encoder;
[0025] Step 32: Assuming that the current layer sequence is the tth layer, during the forward propagation process, for the jth propagation branch, the aggregated features of the current layer sequence are Obtained by:
[0026]
[0027] Among them, FAM stands for Feature-aware Alignment Module, represents the aggregated features of the t-th layer sequence of the j-1th branch, and Represent the features generated by the previous layer and the first two layers of sequences, O t→t-1 Represents the sequence flow from the previous layer to the current layer, O t→t-2 represents the sequence flow from the first two layers to the current layer, W represents the reverse registration operation, Α t-1 and Alpha t-2 Represent the fine graphs of the previous layer and the first two layers of sequence respectively;
[0028] The above process proceeds forward in sequence according to the layer sequence until t = T;
[0029] The backward propagation process is similar to the forward propagation process, but in the opposite direction.
[0030] Optionally, the processing of the spatially aware sparse Transformer includes:
[0031] Step 41: Given the aggregated features finally obtained in step 3 A soft partitioning operation is used to partition each aggregated feature into overlapping blocks of size p×p with a partitioning step size of s.
[0032] Step 42: Concatenate the segmented features to generate block embedding
[0033] Step 43: Downsample the coarse image B by average pooling, with a window size of p×p and a step size of s, to obtain
[0034] Step 44: The generated block embedding z is transformed through three separate linear layers to obtain and Where M and N represent the number of blocks divided in the height and width domain values, respectively, and C z Indicates the number of channels;
[0035] Step 45: Divide into m×n non-overlapping windows to generate partition features Where m×n and h×w are the number and size of windows respectively;
[0036] Step 46: Pool the global vector g using the block embedding z combined with depthwise convolution k and g v Generated by:
[0037] g k = l k (DC(z))
[0038] g v = l v (DC(z))
[0039] Among them, l k and l v represents a linear layer, DC stands for depthwise convolution;
[0040] Next, g k Repeat until G k , g v Repeat until G v , respectively
[0041]
[0042] Step 47: Perform a sparse operation on the distal sequence to ensure that the spatial perception attention is focused only on the cervical plexus region. First, perform a maximum pooling operation on Downsampling to generate a rough window image Next, the far-end sparse mask of the window is obtained as follows:
[0043]
[0044] Among them U t,i,j represents the coarse image at window (i, j) of the t-th layer sequence, θ is the threshold for considering the relevant window as the window where the coarse image is located, Q t Each element in Q t,i,j is a binary variable used to determine whether the window is the window where the rough image is located. For E q 、E k and E v The remote sparse mask, if The clipping function Clip sets S to l; then, the distal sparse embedding feature I is generated using the following method q ,I k and I v :
[0045]
[0046] where Concat represents splicing operation; if S i,j = 0, indicating that the window position indexed by i, j in the layer sequence does not contain the coarse image, then this window position is excluded; and Where m s and n s Respectively represent the number of selected windows within the m and n domain values;
[0047] Step 48: In the layer sequence domain, select the window where the rough image is located as the query space to ensure that the spatial perception attention is only focused on the cervical plexus area; given the distal sparse embedding feature I q , space is sparsely embedded in y q Generate as follows:
[0048]
[0049] y q =Concat(H q )
[0050] in Top(K q ,·) means that K-th is found in the vector q Operation of large elements; for I q For each window located at i,j in the layer sequence domain, we selectively select the K windows that contain the highest proportion of coarse images. q windows;
[0051] Step 49: In contrast to the query space, the key / value space selects the distal sparse embedding feature I k ,Iv The fine area containing the cervical plexus; given I k and I v , spatial sparse embedding feature y k and v Generates the following:
[0052]
[0053] y k =Concat(H k )
[0054]
[0055] y v =Concat(H v )
[0056] in
[0057] Step 410: Spatially sparse query embedding y q Reshaped into Similarly, the spatially sparse key / value embedding y k and v Reshaped into and For m s n s For each window in , the self-attention is calculated as follows:
[0058]
[0059] Introducing multi-head self-attention in spatially aware sparse Transformer to obtain output embedding
[0060] z s =MSA(Y q ,Y k ,Y v ).
[0061] Optionally, the cervical plexus feature encoder includes four sublayers, each sublayer includes a feedforward neural network, and residual connection and layer normalization are applied after each sublayer; the feedforward neural network includes a convolution block Conv1×1, an activation function GELU and a deformable convolution block DConv connected in sequence.
[0062] Optionally, the activation function GELU is defined as follows:
[0063]
[0064] where Φ(x) is the cumulative distribution function of the standard normal distribution and erf(·) is the error function.
[0065] Optionally, the deformable convolution block DConv is defined as follows:
[0066]
[0067] Where F(x,y) represents the input feature map, F(x,y) represents the deformation feature map, K represents the total number of sampling points, k represents the enumerated sampling points, and w k represents the learnable weight of the kth sampling point, (x+Δx k ,y+Δy k ) represents the offset coordinates of the sampling point.
[0068] A second object of the present invention is to provide an automatic detection system for cervical plexus neuropathy, the system being applied to the automatic detection method for cervical plexus neuropathy as described above, the system comprising:
[0069] An image acquisition module is configured to acquire a neck MRI image;
[0070] a cervical plexus nerve estimation module, configured to process the cervical MRI image, preliminarily locate the cervical plexus nerves, and obtain a rough map containing the position information thereof;
[0071] The bidirectional feature propagation module is configured to use the feature-aware alignment module to generate aggregated features based on the cervical plexus feature encoder and propagate them to the previous and next layer sequence streams;
[0072] The spatially-aware sparse Transformer is configured to use a spatially-aware attention layer to generate refined features based on the aggregated features that capture the features of the distal information of the MRI layer sequence;
[0073] a cervical plexus feature decoder, configured to predict a segmentation result of a cervical plexus region based on the refined features;
[0074] The classification diagnosis module is configured to make abnormality prediction based on refined features to achieve binary classification of abnormal or normal cervical plexus nerves.
[0075] A third object of the present invention is to provide an electronic device, characterized in that it includes a memory and a processor;
[0076] The memory is used to store computer programs;
[0077] The processor is used to implement the automatic detection method of cervical plexus neuropathy as described in any one of the above items when executing the computer program.
[0078] The fourth object of the present invention is to provide a computer-readable storage medium, characterized in that a computer program is stored on the storage medium, and when the computer program is executed by a processor, the automatic detection method for cervical plexus neuropathy as described in any one of the above items is implemented.
[0079] The beneficial effects of the present invention are:
[0080] Based on the input of cervical MRI images, the present invention can accurately segment the cervical plexus nerve area and realize automatic detection of cervical plexus nerve lesions; the present invention uses the cervical plexus nerve estimation module and the bidirectional feature propagation module to realize the precise positioning of the cervical plexus nerve; the present invention uses the spatially aware sparse Transformer to realize the precise extraction of cervical plexus nerve features. After sufficient verification and expansion of application scenarios, the automatic detection method of cervical plexus nerve lesions provided by the present invention has shown strong robustness and good generalization ability. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0082] Figure 1 A schematic diagram of the basic flow of a method for automatic detection of cervical plexus lesions based on a spatially aware sparse Transformer provided in accordance with an embodiment of the present invention.
[0083] Figure 2 A schematic diagram of the overall structure of a method for automatic detection of cervical plexus lesions based on a spatially aware sparse Transformer provided in accordance with an embodiment of the present invention.
[0084] Figure 3 A schematic diagram of the structure of a bidirectional feature propagation module provided for one embodiment of the present invention.
[0085] Figure 4 A schematic diagram of the structure of a feature-aware alignment module provided for one embodiment of the present invention.
[0086] Figure 5 A schematic diagram of the structure of a spatially aware sparse Transformer provided for one embodiment of the present invention. DETAILED DESCRIPTION
[0087] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0088] Embodiment 1:
[0089] This embodiment provides a method for automatically detecting cervical plexus neuropathy, characterized in that the method comprises:
[0090] Step 1: Acquire cervical MRI images and perform preprocessing;
[0091] Step 2: Use the cervical plexus estimation module to process the cervical MRI image, preliminarily locate the cervical plexus, and obtain a rough map containing its location information;
[0092] Step 3: Use the bidirectional feature propagation module to correct the deviation in the process of extracting cervical plexus nerve position information and improve the ability to aggregate information from MRI sequences;
[0093] The bidirectional feature propagation module uses the feature-aware alignment module to generate aggregated features based on the cervical plexus feature encoder and propagate them to the previous and next layer sequence streams;
[0094] Step 4: Achieve high performance based on spatially aware sparse Transformer while exploiting distal information in MRI sequences;
[0095] The spatially aware sparse Transformer uses a spatially aware attention layer to capture the features of the distal information of the MRI layer sequence based on the aggregated features and generate refined features;
[0096] Step 5: Using the cervical plexus feature decoder, the segmentation result of the cervical plexus region is predicted based on the refined features;
[0097] Step 6: Use the classification diagnosis module to perform abnormality prediction based on refined features to achieve binary classification of abnormal or normal cervical plexus nerves.
[0098] Embodiment 2:
[0099] This embodiment provides a method for automatically detecting cervical plexus neuropathy. Figure 1-Figure 5 , and also introduced in detail the training process of neural networks in different modules. The specific implementation process is as follows:
[0100] Step 1: Obtain MRI images of the neck.
[0101] Step 11: All patients underwent cervical plexus screening MRI. A 3.0T MR device (Siemens MAGNETOM Skyra) was used in the study to obtain 3D STIR SPACE coronal images in DICOM format. The detailed parameters are as follows:
[0102] TR=3000ms, TE=272ms, TI=230ms, matrix=211x384, slice thickness=1.3mm, slice spacing 0, voxel size=0.5x0.5x1.3mm, echo interval=4.07ms, parallel acquisition acceleration factor=2, phase encoding direction is head-foot direction, number of scanning layers is 56, scanning range is from the posterior edge of the vertebral body to the front of the vertebral body, including the entire cervicobrachial plexus and shoulder joint on both sides.
[0103] Step 12: Based on each layer of 2D images of 3D cervical MRI, construct training sample sets and test sample sets, load the images of the training sample sets into ITK-SNAP software, and annotate the cervical plexus nerve area as the label for subsequent segmentation network training. The values of all pixels in the region of interest (RoI) are set to 1, and the values of all pixels outside the region of interest are set to 0 to obtain a binary bright field mask image.
[0104] Step 13: Perform spatial interpolation, windowing enhancement and histogram equalization preprocessing on the cervical MRI image.
[0105] Step 2: Process the cervical MRI image using the cervical plexus estimation module to preliminarily locate the position information of the cervical plexus, which specifically includes the following steps:
[0106] Step 21: Average pooling is performed on each layer of the 2D image of the 3D neck MRI to obtain a downsampled 3D neck MRI layer sequence.
[0107] Step 22: According to Using the Opencv package in Python, estimate the forward sequence flow and backward sequence flow
[0108] Step 23: Cervical plexus estimation module based on and Generate a non-normalized rough map for each layer sequence
[0109]
[0110] A t =1-B t
[0111] Among them, O 1→0 =0,O T→T+1 = 0, i and t represent the channel and step length of laminar flow respectively, A t It is B t The refined image obtained after normalization operation can realize the preliminary positioning of the cervical plexus nerve position information.
[0112] Step 3: Use the bidirectional feature propagation module to correct the deviation in the process of extracting cervical plexus nerve position information and improve the ability to aggregate information from MRI sequences, including the following:
[0113] Step 31: Input each layer of 2D image of the 3D cervical MRI into the cervical plexus feature encoder to obtain features of four different scales;
[0114] The cervical plexus feature encoder contains four sublayers, each of which contains a feedforward neural network (FFN), and residual connections and layer normalization are applied after each sublayer. The FFN includes a convolution block Conv1×1, an activation function GELU (Gaussian Error Linear Unit), and a deformable convolution block DCnv3×3 connected in sequence.
[0115] The activation function GELU is defined as follows:
[0116]
[0117] where Φ(x) is the cumulative distribution function of the standard normal distribution and erf(·) is the error function.
[0118] The deformable convolution block DConv is defined as follows:
[0119]
[0120] Where F(x,y) represents the input feature map, F(x,y) represents the deformation feature map, K represents the total number of sampling points, k enumerates the sampling points, and w k represents the learnable weight of the kth sampling point, (x+Δx k ,y+Δy k ) represents the offset coordinates of the sampling point.
[0121] Step 32: The bidirectional feature propagation module uses the feature-aware alignment module (FAM) to generate aggregated features F and propagate them to the previous and next layer sequences. FAM selectively integrates the information of the fine map guided by the coarse map, aiming to align the features in the adjacent layer sequences to accurately locate the cervical plexus in the current layer sequence, avoiding the propagation interference of features in unrelated regions of adjacent layer sequences in the bidirectional feature propagation.
[0122] like Figure 3As shown in Figure 1, the bidirectional feature propagation module corresponds to different propagation branches based on the different levels of features extracted by the encoder, ensuring the effective transmission and fusion of the cervical plexus nerve position information between different levels. Assuming that the current layer sequence is the tth layer, in the forward propagation process, for the jth propagation branch, the aggregated feature of the current layer sequence It can be obtained by:
[0123]
[0124] in, represents the aggregated features of the t-th layer sequence of the j-1th branch, and Represent the features generated by the previous layer and the first two layers of sequences, O t→t-1 Represents the sequence flow from the previous layer to the current layer, O t→t-2 represents the sequence flow from the first two layers to the current layer, W represents the reverse registration operation, Α t-1 and Alpha t-2 Represent the fine graphs of the previous layer and the first two layers of sequence respectively. The above process is carried forward in sequence according to the layer sequence until t = T. The backward propagation process is similar to the forward propagation process, but in the opposite direction. Through forward and backward propagation, the model can obtain information from different sequence flow directions, reduce the information loss or inaccuracy that may be caused by unidirectional propagation, and improve the accuracy and completeness of feature propagation.
[0125] The structure of the FAM module is as follows Figure 4 As shown, first, and O t→t-1 and O t→t-2 , registration features and and Alpha t-1 and Alpha t-2 Then, use the ordinary convolution layer and the deformable convolution layer to concatenate the features and Perform multi-level processing and extraction to generate the final aligned current layer sequence aggregate features Among them, the fine map is used as the basic mask of the deformable convolution layer and is introduced into the deformable convolution layer as an additional condition to generate the offset and mask, ensuring that only the precise positioning information of the cervical plexus is effectively propagated and utilized during the convolution process, thereby improving the accuracy of feature alignment.
[0126] Step 4: Achieve high performance based on spatially aware sparse Transformer while exploiting distal information in MRI sequences.
[0127] The spatially aware sparse Transformer module filters out the features of irrelevant regions in the layer sequence based on the coarse image B, and uses the spatially aware attention layer to capture the features of the distal information of the MRI layer sequence based on F to generate refined features.
[0128] Step 41: Spatially Aware Sparse Transformer Figure 5 As shown, given the final aggregated features obtained in step 3 A soft partitioning operation is used to partition each aggregated feature into overlapping blocks of size p×p with a partitioning step of s.
[0129] Step 42: Concatenate the segmented features to generate block embedding
[0130] Step 43: Downsample the coarse image B by average pooling, with a window size of p×p and a step size of s, to obtain
[0131] Step 44: The generated block embedding z is transformed through three separate linear layers to obtain and Where M and N represent the number of blocks divided in the height and width domain values, respectively, and C z Represents the abbreviation p 2 C, represents the number of channels.
[0132] Step 45: Divided into m×n non-overlapping windows to generate partition features where m×n and h×w are the number and size of windows respectively.
[0133] Step 46: Pool the global vector g using the block embedding z and depth-wise convolution (DC) k and g v Generated by:
[0134] g k = l k (DC(z))
[0135] g v = l v (DC(z))
[0136] Among them, l k and l v represents a linear layer,
[0137] Next, g k Repeat until G k , gv Repeat until G v , respectively
[0138] Step 47: Perform a sparse operation on the distal sequence to ensure that the spatial perception attention is focused only on the cervical plexus region. First, perform a maximum pooling operation on Downsampling to generate a rough window image Next, the far-end sparse mask of the window is obtained as follows:
[0139]
[0140] Among them, U t,i,j represents the coarse image at window (i, j) of the t-th layer sequence, θ is the threshold for considering the relevant window as the window where the coarse image is located, Q t Each element Q in t,i,j is a binary variable used to determine whether the window is the window where the rough image is located. For E q 、E k and E v The far-end sparse mask of The clipping function Clip sets S to l; then, the distal sparse embedding feature I is generated using the following method q ,I k and I v :
[0141]
[0142] Concat represents a concatenation operation; if S i,j = 0, indicating that the window position indexed by i, j in the layer sequence does not contain the coarse image, then this window position is excluded; and Where m s and n s Represents the number of selected windows within the m and n domain values respectively.
[0143] Step 48: In the layer sequence domain, select the window where the rough image is located as the query space to ensure that the spatial perception attention is only focused on the cervical plexus area; given the distal sparse embedding feature I q , spatially sparse embedding y q Generates the following:
[0144]
[0145] y q =Concat(H q )
[0146] in Top(K q ,·) means finding the Kth q Operations on large elements; for I q For each window located at i,j in the layer sequence domain, we selectively select the K windows that contain the highest proportion of coarse images. q windows; specifically, in the query space, the top 50% of features are selected and flattened for each query window.
[0147] Step 49: In contrast to the query space, the key / value space selects the distal sparse embedding feature I k ,I v The fine area containing the cervical plexus; given I k and I v , spatial sparse embedding feature y k and v Generates the following:
[0148]
[0149] y k =Concat(H k )
[0150]
[0151] y v =Concat(H v )
[0152] in Specifically, in the key / value space, the top 50% of features are selected and a flattening operation is performed on each key / value window.
[0153] Step 410: Spatially sparse query embedding y q Reshaped into Similarly, the spatially sparse key / value embedding y k and v Reshaped into and For m s n s For each window in , the self-attention is calculated as follows:
[0154]
[0155] Introducing Multi head Self-Attention (MSA) in the spatially aware sparse Transformer to obtain the output embedding
[0156] z s =MSA(Yq ,Y k ,Y v )
[0157] Step 411: Since the textures between adjacent layer sequences are highly similar, in each spatially-aware sparse Transformer, the layer sequences are selected alternately with a step size of 2; in the spatially-aware sparse Transformer module composed of multiple spatially-aware sparse Transformers, the odd-numbered spatially-aware sparse Transformers select the odd-numbered layer sequences, and the even-numbered spatially-aware sparse Transformers select the even-numbered layer sequences, thereby utilizing the information between layer sequences while reducing redundant calculations and reducing the size of the key / value space by 50%.
[0158] After applying the sparse strategy to eliminate unnecessary and redundant windows, the self-attention layer is used to extract fused features for the remaining windows; in particular, for the unselected windows (those with a low proportion of coarse images), a comprehensive attention calculation is performed on the features within the entire window, and then the features are restored to their original size through interpolation; subsequently, these features are aggregated through a soft combination operation as the input of the next spatially aware sparse Transformer module; the output of the final spatially aware sparse Transformer is represented as
[0159] Step 5: In the input cervical plexus feature decoder, the feature decoder adopts a U-net-like structure, combined with the multi-scale features of the feature encoder, forms a feature map through channel fusion and upsampling, and finally restores it to a mask map. The upsampling rate in the four sub-layers is 2, and there is a residual connection after each sub-layer.
[0160] Step 6: The input classification diagnosis module includes a normalization layer, a global pooling layer, and a fully connected layer, which are used to realize the binary classification of abnormal or normal cervical plexus nerves.
[0161] Step 7: Use the training sample set to train the automatic detection model for cervical plexus neuropathy. The specific formula of the training loss function L is as follows:
[0162]
[0163] Among them, S(·) refers to the Softmax function; N represents the number of samples, that is, the number of pixels in each image; C represents the number of categories, is the predicted pixel of category k, for An example of are the mask pixels of category k, all of which are C×1 one-hot encoding vectors, that is, the value of the corresponding position of the label is 1, and the others are 0; w k represents the loss weight of category k; adjustment parameter α = [α 1 ,α 1 ,...,α k ], where α k represents the most critical noise weight of the kth class; s k represents the total number of pixels of category k in all images in the training set, represents the total number of pixels in all images from the training set; N(0,σ 2 ) has a mean of 0 and a variance of σ 2 Gaussian noise.
[0164] Step 8: Input the unlabeled cervical MRI images in the test sample set into the trained cervical plexus lesion detection model, and output the segmentation mask of the cervical plexus area predicted by the model and the lesion prediction result.
[0165] Embodiment three:
[0166] This embodiment provides an automatic detection system for cervical plexus neuropathy, which is applied to the automatic detection method for cervical plexus neuropathy in the first or second embodiment, including:
[0167] The image acquisition module is configured to acquire cervical MRI images to achieve the labeling of the cervical plexus nerve area.
[0168] The cervical plexus nerve estimation module is configured to process the cervical MRI image, preliminarily locate the cervical plexus nerves, and obtain a rough map containing the position information thereof.
[0169] The bidirectional feature propagation module is configured to use the feature-aware alignment module to generate aggregated features based on the cervical plexus feature encoder and propagate them to the previous and next layer sequence flow.
[0170] The spatially-aware sparse Transformer is configured to use spatially-aware attention layers to generate refined features based on the aggregated features that capture the features of distal information in the MRI layer sequence.
[0171] The cervical plexus feature decoder is configured to predict a segmentation result of the cervical plexus region based on the refined features.
[0172] The classification diagnosis module is configured to make abnormality prediction based on refined features to achieve binary classification of abnormal or normal cervical plexus nerves.
[0173] Embodiment 4:
[0174] In order to verify and illustrate the technical effect of the method of the present invention, this example compares the manual and traditional clinical model evaluation methods with the method of the present invention to verify the real effect of the method.
[0175] The traditional clinical model evaluation method screens out clinical predictive factors by performing univariate and multivariate logistic regression analysis on the patient's clinical data, and constructs single logistic regression and nested logistic regression prediction models based on these factors.
[0176] The manual assessment method detected potential cervical plexopathy by instructing 5 radiologists with more than 10 years of radiology experience to independently review the cervical MRI images (the entire range of slices for each patient); the window level and width could be freely adjusted, but the radiologists were blinded to any other clinical and radiological information; if at least 1 slice was considered to have cervical plexopathy, the case was diagnosed with cervical plexopathy.
[0177] The comparison results of the method of the present invention with the manual and traditional clinical model evaluation methods are shown in Table 1 below:
[0178] Table 1: Comparison results between the present invention and the traditional solution
[0179]
[0180] It can be seen from the above comparison data that the method of the present invention is higher in accuracy and efficiency than the manual and traditional clinical model evaluation methods. The traditional clinical model evaluation method is only applicable to specific images and cannot be promoted on a large scale. The manual evaluation method and the method of the present invention have a wide range of applications, but the manual evaluation method is inferior to the method of the present invention in other data. The comparison results show that the method of the present invention can quickly, efficiently, accurately and automatically detect potential cervical plexus neuropathy.
[0181] Some steps in the embodiments of the present invention may be implemented using software, and the corresponding software program may be stored in a readable storage medium, such as a CD or a hard disk.
[0182] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for automatically detecting cervical plexus lesions, characterized in that: The method comprises: Step 1: Acquire cervical MRI images and perform preprocessing; Step 2: Use the cervical plexus estimation module to process the cervical MRI image, preliminarily locate the cervical plexus, and obtain a rough map containing its location information; Step 3: Use the bidirectional feature propagation module to correct the deviation in the process of extracting cervical plexus nerve position information and improve the ability to aggregate information from MRI sequences; The bidirectional feature propagation module uses a feature-aware alignment module to generate aggregated features based on the cervical plexus feature encoder and propagates them to the front and back layer sequence streams; Step 4: Achieve high performance based on spatially aware sparse Transformer while exploiting distal information in MRI sequences; The spatially aware sparse Transformer uses a spatially aware attention layer to capture the features of the distal information of the MRI layer sequence based on the aggregated features and generate refined features; Step 5: Using the cervical plexus feature decoder, the segmentation result of the cervical plexus region is predicted based on the refined features; Step 6: Use the classification diagnosis module to perform abnormality prediction based on refined features to achieve binary classification of abnormal or normal cervical plexus nerves.
2. The automatic detection method for cervical plexus neuropathy according to claim 1, characterized in that: The step 2 comprises: Step 21: Average pooling is performed on each layer of the 2D image of the 3D neck MRI image to obtain a downsampled 3D neck MRI layer sequence. Step 22: According to Estimating forward sequence flow using Opencv package in python and backward sequence flow Step 23: Based on the forward sequence flow and backward sequence flow The cervical plexus estimation module generates a non-normalized rough map for each layer sequence A t =1-B t Among them, O 1→0 =0,O T→T+1 = 0, i and t represent the channel and step length of laminar flow respectively, A t It is B t The refined image obtained after normalization operation can realize the preliminary positioning of the cervical plexus nerve position information.
3. The automatic detection method for cervical plexus lesions according to claim 2, characterized in that: The step 3 comprises: Step 31: input each layer of the 2D image of the 3D cervical MRI image into a cervical plexus nerve feature encoder to obtain features of different scales, and the bidirectional feature propagation module corresponds to different propagation branches based on the different levels of features extracted by the encoder; Step 32: Assuming that the current layer sequence is the tth layer, during the forward propagation process, for the jth propagation branch, the aggregated features of the current layer sequence are Obtained by: Among them, FAM stands for Feature-aware Alignment Module, represents the aggregated features of the t-th layer sequence of the j-1th branch, and Represent the features generated by the previous layer and the first two layers of sequences, O t→t-1 Represents the sequence flow from the previous layer to the current layer, O t→t-2 represents the sequence flow from the first two layers to the current layer, W represents the reverse registration operation, Α t-1 and Alpha t-2 Represent the fine graphs of the previous layer and the first two layers of sequence respectively; The above process proceeds forward in sequence according to the layer sequence until t = T; The backward propagation process is similar to the forward propagation process, but in the opposite direction.
4. The automatic detection method for cervical plexus lesions according to claim 3, characterized in that: The processing of the spatially aware sparse Transformer includes: Step 41: Given the aggregated features finally obtained in step 3 A soft partitioning operation is used to partition each aggregated feature into overlapping blocks of size p×p with a partitioning step size of s. Step 42: Concatenate the segmented features to generate block embedding Step 43: Downsample the coarse image B by average pooling, with a window size of p×p and a step size of s, to obtain Step 44: The generated block embedding z is transformed through three separate linear layers to obtain and Where M and N represent the number of blocks divided in the height and width domain values, respectively, and C z Indicates the number of channels; Step 45: Divide into m×n non-overlapping windows to generate partition features Where m×n and h×w are the number and size of windows respectively; Step 46: Pool the global vector g using the block embedding z combined with depthwise convolution k and g v Generated by: Mr. k =l k (DC(z)) Mr. v =l v (DC(z)) Among them, l k and l v represents a linear layer, DC stands for depthwise convolution; Next, g k Repeat until G k , g v Repeat until G v , respectively Step 47: Perform a sparse operation on the distal sequence to ensure that the spatial perception attention is focused only on the cervical plexus region. First, perform a maximum pooling operation on Downsampling to generate a rough window image Next, the far-end sparse mask of the window is obtained as follows: Among them U t,i,j represents the coarse image at window (i, j) of the t-th layer sequence, θ is the threshold for considering the relevant window as the window where the coarse image is located, Q t Each element Q in t,i,j is a binary variable used to determine whether the window is the window where the rough image is located. For E q 、E k and E v The far-end sparse mask of The clipping function Clip sets S to l; then, the distal sparse embedding feature I is generated using the following method q ,I k and I v : Concat represents a concatenation operation; if S i,j = 0, indicating that the window position indexed by i, j in the layer sequence does not contain the coarse image, then this window position is excluded; and Where m s and n s Respectively represent the number of selected windows within the m and n domain values; Step 48: In the layer sequence domain, select the window where the rough image is located as the query space to ensure that the spatial perception attention is only focused on the cervical plexus area; given the distal sparse embedding feature I q , spatially sparse embedding y q Generates the following: y q =Concat(H q ) in Top(K q ,·) means finding the Kth q Operations on large elements; for I q For each window located at i,j in the layer sequence domain, we selectively select the K windows that contain the highest proportion of coarse images. q windows; Step 49: In contrast to the query space, the key / value space selects the distal sparse embedding feature I k ,I v The fine area containing the cervical plexus; given I k and I v , spatial sparse embedding feature y k and v Generates the following: y k =Concat(H k ) yv=Concat(H v ) in Step 410: Spatially sparse query embedding y q Reshaped into Similarly, the spatially sparse key / value embedding y k and v Reshaped into and For m s n s For each window in , the self-attention is calculated as follows: Introducing multi-head self-attention in spatially aware sparse Transformer to obtain output embedding z s =MSA(Y q ,Y k ,Y v )。 5. The automatic detection method for cervical plexus lesions according to claim 1, characterized in that: The cervical plexus feature encoder comprises four sublayers, each of which comprises a feedforward neural network, and residual connection and layer normalization are applied after each sublayer; the feedforward neural network comprises a convolution block Conv1×1, an activation function GELU and a deformable convolution block DConv connected in sequence.
6. The automatic detection method for cervical plexus lesions according to claim 5, characterized in that: The activation function GELU is defined as follows: where Φ(x) is the cumulative distribution function of the standard normal distribution and erf(·) is the error function.
7. The automatic detection method for cervical plexus lesions according to claim 5, characterized in that: The deformable convolution block DConv is defined as follows: Where F(x,y) represents the input feature map, F(x,y) represents the deformation feature map, K represents the total number of sampling points, k represents the enumerated sampling points, and w k represents the learnable weight of the kth sampling point, (x+Δx k ,y+Δy k ) represents the offset coordinates of the sampling point.
8. An automatic detection system for cervical plexus neuropathy, characterized in that: The system is applied to the automatic detection method for cervical plexus neuropathy according to any one of claims 1 to 7, and the system comprises: An image acquisition module is configured to acquire a neck MRI image; a cervical plexus nerve estimation module, configured to process the cervical MRI image, preliminarily locate the cervical plexus nerves, and obtain a rough map containing the position information thereof; The bidirectional feature propagation module is configured to use the feature-aware alignment module to generate aggregated features based on the cervical plexus feature encoder and propagate them to the previous and next layer sequence streams; The spatially-aware sparse Transformer is configured to use a spatially-aware attention layer to generate refined features based on the aggregated features that capture the features of the distal information of the MRI layer sequence; a cervical plexus feature decoder, configured to predict a segmentation result of a cervical plexus region based on the refined features; The classification diagnosis module is configured to make abnormality prediction based on refined features to achieve binary classification of abnormal or normal cervical plexus nerves.
9. An electronic device, characterized in that: including memory and processor; The memory is used to store computer programs; The processor is used to implement the automatic detection method for cervical plexus neuropathy as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the automatic detection method for cervical plexus neuropathy according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Image segmentation method for medical image data
CN118279327A
Cervical cancer pathological image cancerous tissue segmentation method and system based on Transform
CN119251250A