A medical image neural tissue segmentation method and system based on boundary enhancement

CN122948910APending Publication Date: 2026-10-20CHINA UNIV OF PETROLEUM (EAST CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611442847.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-17
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0003]经皮内镜腰椎间盘摘除术(Percutaneous Endoscopic Lumbar Discectomy,PELD)是治疗腰椎间盘突出症的微创脊柱手术,通过约8mm的内镜工作通道完成操作,可减少软组织损伤并加速术后恢复,然而狭窄视野导致手术器械、硬脊膜囊与神经组织紧密相邻甚至部分重叠,漏检神经组织可引发神经牵拉性麻痹或硬脊膜撕裂等严重后果,需要6至12个月恢复甚至造成永久性功能障碍,因此实现神经组织实时准确分割具有重要临床安全价值

Benefits of technology

本发明提升了PELD内镜图像中神经组织的分割精度与临床可用性:通过ASPPLite模块生成的全局语义锚点注入解码器各阶段,有效缓解了深层语义特征在连续上采样中的稀释问题,增强了稀疏神经组织的前景感知一致性;方差引导门控模块自适应抑制镜面反射等高频光学伪影,解决了内镜成像中强烈光学干扰下的分割鲁棒性问题;BERD模块利用参数冻结的Sobel算子提取正交梯度,在边界梯度提取路径中不引入额外可学习参数,并结合置信度空间门控、可学习标量加权及残差调制强化解剖边界响应,显著改善了下采样导致的边界弥散与轮廓模糊问题;联合损失函数协同优化,直接降低神经组织漏检风险,使分割结果与PELD手术安全避让的临床原则高度对齐;整体方法在保持实时推理速度的同时,实现了高精度神经组织分割,为术中实时视觉预警与安全操作提供了可靠的技术支撑。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention discloses a method and system for segmenting neural tissue in medical images based on boundary enhancement, belonging to the field of medical image segmentation technology. Addressing the problems of sparse foreground neural tissue in spinal endoscopic images leading to missed detection of small targets, high-frequency optical artifact interference, and diffused downsampling boundaries, this invention employs an encoder to extract multi-scale features, uses the ASPPLite module to generate global semantic anchors for injection into the decoder to enhance foreground consistency, uses a variance-guided gating module to suppress artifacts, uses the frozen Sobel operator of the BRD module to strengthen boundary responses, and employs joint loss for supervised training; thus achieving high-precision real-time segmentation of neural tissue and effectively reducing the risk of intraoperative accidental damage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical image segmentation technology, and in particular to a method and system for segmenting neural tissue in medical images based on boundary enhancement. Background Technology

[0002] The statements in this section are merely to provide background information related to the present invention and do not necessarily constitute prior art.

[0003] Percutaneous endoscopic lumbar discectomy (PELD) is a minimally invasive spinal surgery for treating lumbar disc herniation. The procedure is performed through an endoscopic working channel of approximately 8 mm, which can reduce soft tissue damage and accelerate postoperative recovery. However, the narrow field of vision leads to surgical instruments, the dura mater sac, and nerve tissue being closely adjacent or even partially overlapping. Missing nerve tissue can cause serious consequences such as traction paralysis or dural tear, requiring 6 to 12 months to recover or even causing permanent functional impairment. Therefore, achieving real-time and accurate segmentation of nerve tissue has important clinical safety value.

[0004] Existing medical image segmentation methods face two major challenges in PELD scenarios: macro-micro scale imbalance leading to background dominance of small target gradient signals and resulting in missed detections, and high-frequency optical artifacts and oversmoothing downsampling causing boundary blurring. Traditional convolutional neural networks (CNNs) rely on local receptive fields, making it difficult to propagate long-range semantics; the quadratic complexity of the Vision Transformer (ViT) hinders real-time deployment; the causal scanning of the State Space Model (SSM) destroys the two-dimensional structure; existing loss functions fail to optimize for the discontinuous multi-bundle topology of nerve roots; and there is a lack of active suppression mechanisms for endoscopic optical artifacts. As a result, the real-time segmentation accuracy of neural tissue in PELD surgery is insufficient, making it difficult for surgeons to accurately identify nerve boundaries, thereby increasing the risk of intraoperative accidental damage and endangering surgical safety. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a method and system for segmenting neural tissue in medical images based on boundary enhancement. Through multi-scale context modeling, variance-gated filtering, and boundary enhancement decoding, it achieves accurate real-time segmentation of neural tissue in endoscopic images, reducing the risk of accidental damage during surgery.

[0006] To achieve the above objectives, the present invention is implemented through the following technical solution: In a first aspect, the present invention provides a method for segmenting neural tissue in medical images based on boundary enhancement, comprising: Acquire spinal endoscopic images and preprocess them to obtain training samples; The training samples are processed by an encoder to extract multi-scale encoded features, which include deepest layer features and skip connection features. The deepest layer features are used to generate global semantic anchors through the ASPPLite module, and the global semantic anchors are injected into each stage of the decoder; the skip connection features are used to suppress high-frequency optical artifacts through the variance-guided gating module, and the suppressed skip connection features are concatenated with the decoder upsampled features to obtain concatenated features; the concatenated features are used to enhance the dissected boundary response through the BRD module to obtain boundary enhancement features; Based on the aforementioned boundary enhancement features, a neural tissue segmentation mask is obtained through joint loss-supervised training.

[0007] Furthermore, the ASPLite module extracts multi-scale context through four parallel branches, concatenates the outputs of the four parallel branches, projects them through a 1×1 convolution, and connects them with the deepest feature residual to generate global semantic anchors.

[0008] Furthermore, the four parallel branches include: The code includes a 1×1 convolution branch, a 3×3 dilated convolution branch with an expansion rate of 6, a 3×3 dilated convolution branch with an expansion rate of 12, and a global branch that is successively upsampled by global average pooling and bilinear interpolation.

[0009] Furthermore, the variance-guided gating module fuses the jump connection features with the spatially aligned global semantic anchors to generate a guiding field; The channel-wise spatial variance of the guiding field is calculated and mapped to a nonlinear gated mask via a multilayer perceptron. The gated mask is then used to perform channel-level soft suppression on the skip connection features to filter out high-frequency optical artifacts.

[0010] Furthermore, the process of generating the boundary enhancement feature includes: The BERD module uses the parameter-frozen horizontal and vertical Sobel operators as orthogonal partial differential operators; Perform channel-independent depthwise convolution on the input features to compute the horizontal and vertical gradient tensors, and then compute the boundary magnitude field from the two orthogonal gradient tensors.

[0011] Furthermore, the boundary amplitude field is screened by confidence space, weighted by a learnable scalar, and residually modulated with the original decoding features to achieve boundary response enhancement.

[0012] Furthermore, the joint loss includes a weighted combination of boundary-weighted Dice loss, connected component Dice loss, asymmetric focus Tversky loss, and false positive penalty loss; In this context, the false negative penalty weight of the asymmetric focus Tversky loss is greater than the false positive penalty weight.

[0013] In a second aspect, the present invention provides a medical image neural tissue segmentation system based on boundary enhancement, comprising: Data acquisition module: used to acquire spinal endoscopic images and perform preprocessing to obtain training samples; Encoder module: used to extract multi-scale encoded features from the training samples through an encoder, wherein the multi-scale encoded features include the deepest layer features and skip connection features; Global semantic anchoring module: used to generate global semantic anchors from the deepest features through the ASPLite module, and inject the global semantic anchors into each stage of the decoder; The artifact suppression and fusion module is used to suppress high-frequency optical artifacts by using the variance-guided gating module to suppress the skip connection features, and then concatenate the suppressed skip connection features with the decoder upsampled features to obtain the concatenated features. Boundary enhancement module: used to enhance the spliced ​​features by using the BRD module to dissect the boundary response, thus obtaining boundary enhancement features; Segmentation output module: used to obtain a neural tissue segmentation mask based on the boundary enhancement features and through joint loss-supervised training.

[0014] In a third aspect, the present invention also provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method as described in the first aspect.

[0015] In a fourth aspect, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method as described in the first aspect.

[0016] Compared with the prior art, the beneficial effects of the present invention are: This invention improves the segmentation accuracy and clinical usability of neural tissue in PELD endoscopic images: Global semantic anchors generated by the ASPPLite module are injected into each stage of the decoder, effectively alleviating the dilution problem of deep semantic features during continuous upsampling and enhancing the foreground perception consistency of sparse neural tissue; the variance-guided gating module adaptively suppresses high-frequency optical artifacts such as specular reflection, solving the segmentation robustness problem under strong optical interference in endoscopic imaging; the BRD module uses the parameter-frozen Sobel operator to extract orthogonal gradients, without introducing additional learnable parameters in the boundary gradient extraction path, and combines confidence space gating, learnable scalar weighting, and residual modulation to enhance the anatomical boundary response, significantly improving the boundary diffusion and contour blurring problems caused by downsampling; joint loss function co-optimization directly reduces the risk of missed neural tissue detection, making the segmentation results highly aligned with the clinical principles of safe avoidance in PELD surgery; the overall method achieves high-precision neural tissue segmentation while maintaining real-time inference speed, providing reliable technical support for real-time visual warning and safe operation during surgery. Attached Figure Description

[0017] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0018] Figure 1 This is a flowchart of the method according to Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the overall network architecture of CAFASeg-Net of the present invention; Figure 3 This is a qualitative comparison of the segmentation results of CAFASeg-Net of the present invention and nine representative segmentation methods on the PELD-Seg independent test set. Among them, (a) is the segmentation result of U-Net, (b) is the segmentation result of U-Net++, (c) is the segmentation result of Attention U-Net, (d) is the segmentation result of TransUNet, (e) is the segmentation result of VM-UNet, (f) is the segmentation result of nnU-Net, (g) is the segmentation result of SegFormer, (h) is the segmentation result of Mobile U-ViT, (i) is the segmentation result of Polyp-PVT, and (j) is the segmentation result of CAFASeg-Net of the present invention. Detailed Implementation

[0019] The following detailed description is exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0020] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0021] The collection and processing of relevant data in this embodiment strictly comply with relevant laws, regulations and ethical review requirements. Where applicable, informed consent, separate consent or legally applicable exemption from informed consent is obtained from the personal information subject. The spinal endoscopy image data involved in this embodiment has been reviewed and approved by the ethics committee of the cooperating hospital, and all image frame data has been de-identified before analysis.

[0022] Example 1 To address the shortcomings of existing methods in PELD surgery, which suffer from small target omissions due to sparse foreground, strong optical artifacts in the endoscope, and diffused downsampling boundaries, making accurate real-time segmentation difficult, this invention uses the ASPLite module's multi-scale dilated convolution to extract global semantic anchors to enhance the perception of sparse neural tissue. The variance-guided gating module suppresses high-frequency artifacts such as specular reflection based on channel-wise variance, and the BRD module uses the frozen Sobel operator to enhance boundary response. Furthermore, a boundary-weighted joint loss is constructed to optimize region overlap and topological integrity, thereby achieving accurate real-time segmentation of neural tissue in endoscopic images and effectively reducing the risk of intraoperative nerve damage.

[0023] In a typical embodiment of the present invention, such as Figure 1 As shown, a method for segmenting neural tissue in medical images based on boundary enhancement is disclosed, and the specific steps include: S1: Acquire spinal endoscopic images and preprocess them to obtain training samples; S2: Extract multi-scale encoded features from the training samples using an encoder. The multi-scale encoded features include the deepest layer features and skip connection features. S3: Generate global semantic anchors from the deepest features using the ASPPLite module, and inject the global semantic anchors into each stage of the decoder; suppress high-frequency optical artifacts from the skip connection features using the variance-guided gating module, and concatenate the suppressed skip connection features with the decoder upsampled features to obtain concatenated features; enhance the dissected boundary response using the BRD module to obtain boundary enhancement features; S4: Based on the boundary enhancement features, a neural tissue segmentation mask is obtained through joint loss-supervised training.

[0024] The following detailed description of the above-mentioned boundary enhancement-based medical image neural tissue segmentation method, with reference to specific implementation methods, provides a detailed explanation.

[0025] In step S1, acquiring and preprocessing spinal endoscope images to obtain training samples refers to acquiring the original spinal endoscope red-green-blue (RGB) color model image and the corresponding binary label mask of neural tissue in its spatial location, performing size standardization on the original spinal endoscope RGB image and the label mask, and simultaneously performing data augmentation operations such as random flipping and / or random cropping on the image and the label mask during the model training phase to generate image-label sample pairs for model training.

[0026] Specifically, in S1, the Percutaneous Endoscopic Lumbar Discectomy Segmentation dataset (PELD-Seg) was used. This dataset was collected retrospectively from endoscopic surgical videos of 20 patients undergoing percutaneous endoscopic lumbar discectomy in collaboration with a university-affiliated hospital. Multiple endoscopic devices were used to increase equipment diversity. Senior spinal surgeons selected 2261 representative images from the 20 patient cases, which were precisely labeled at the pixel level. The selected frames covered common intraoperative scenarios in PELD surgery, including different viewing angles, lighting changes, irrigation fluid interference, bleeding obstruction, instrument interference, and diverse neural tissue appearances. The dataset involved in this invention was reviewed and approved by the ethics committee of the university-affiliated hospital, and all video frame data were de-identified before analysis.

[0027] The preprocessing steps specifically include: assuming the spatial dimensions of the original spinal endoscopy RGB image are... The corresponding binary annotation masks for neural tissue have the same spatial dimensions. Bilinear interpolation is used to uniformly adjust the original spinal endoscopy RGB images to 512×512 pixels; simultaneously, nearest neighbor interpolation is used to synchronously adjust the corresponding binary annotation masks to 512×512 pixels, in order to unify the spatial scale and tensor dimension of the input network and maintain the spatial correspondence between the image and the annotation mask.

[0028] For random flipping, horizontal and vertical flipping random numbers following a uniform distribution in the [0,1] region are generated and compared with preset horizontal and vertical flipping probabilities, respectively. When the corresponding random number is less than the preset flipping probability, horizontal and / or vertical flipping is performed simultaneously on the training image and its labeled mask. As an example, the horizontal and vertical flipping probabilities can be set to 0.5 respectively; when the horizontal flipping random number is 0.32 and the vertical flipping random number is 0.78, horizontal flipping is performed simultaneously on the image and its labeled mask, but vertical flipping is not performed. The image and the labeled mask use completely consistent flipping parameters in the same augmentation to avoid spatial misalignment.

[0029] For random cropping, a cropping ratio s is randomly determined from a 512×512 pixel training image. This cropping ratio is, for example, randomly selected within the range of 0.8 to 1.0. The side length of the square cropping region is determined by rounding down (512×s). Subsequently, the coordinates of the top-left corner of the cropping region are randomly determined within the horizontal coordinate range [0, 512-L] and the vertical coordinate range [0, 512-L]. Image regions and mask regions are extracted from the training image and corresponding labeled mask, respectively, using the same cropping position and size. The cropped training image is restored to 512×512 pixels using bilinear interpolation, and the cropped labeled mask is restored to 512×512 pixels using nearest neighbor interpolation. As an example, when s=0.875, L=448; when randomly obtained... Simultaneously extract the 448×448 region with the horizontal coordinate range [32, 480) and the vertical coordinate range [48, 496) from the image and the labeled mask. That is, the horizontal coordinate range includes 32 but not 480, and the vertical coordinate range includes 48 but not 496. Then restore them to 512×512 pixels respectively.

[0030] Considering that neural tissue is typically a small target in spinal endoscopy images, when neural tissue is present in the original annotation mask, a foreground preservation constraint can be set for the random cropping result. For example, it can be required that the cropped annotation mask retains at least one foreground pixel, or that the proportion of the cropped foreground pixels to the original annotation mask's foreground pixels is not less than a preset threshold, such as 50%. If the current cropping result does not meet the foreground preservation constraint, the cropping position is randomly generated again, repeated a maximum of a preset number of times, such as 10 times, to reduce the probability of completely losing the neural tissue target during random cropping. If the foreground preservation constraint is still not met after reaching the preset number of times, the current cropping augmentation is abandoned, and the image-annotation sample pairs standardized to the original size are used directly to ensure the effectiveness of the training samples.

[0031] Random flipping and random pruning are applied only to the training set; the validation set and independent test set only undergo deterministic size normalization, without random data augmentation, to ensure the repeatability of the model evaluation process.

[0032] The dataset was divided into training, validation, and independent test sets in an 8:1:1 ratio based on patient level. Patient isolation strategies ensured that consecutive frames from the same surgical video sequence or the same patient did not appear simultaneously in different subsets, thus ensuring the clinical reliability of the reported metrics.

[0033] After acquiring training samples and before inputting them into the encoder, a Context-Aware Foreground-Anchored Segmentation Network (CAFASeg-Net) is constructed and initialized. The CAFASeg-Net employs an encoder-decoder structure, comprising: a 34-layer ResNet34 encoder for extracting multi-level encoded features at different spatial resolutions through progressive downsampling; a lightweight Atrous Spatial Pyramid Pooling Lite (ASPPLite) module located at the deepest bottleneck of the network for capturing multi-scale context and generating global semantic anchors through parallel dilated convolution branches and global pooling branches; a variance-guided gated decoder for fusing encoder skip connection features with spatially aligned global semantic anchors to form a guiding field, generating channel-level nonlinear gated masks based on the spatial variance of each channel of the guiding field, and performing channel-level soft suppression on skip connection features using the gated masks; and a boundary enhancement refinement decoder for calculating orthogonal gradient responses using parameter-frozen horizontal and vertical Sobel operators, forming boundary magnitude fields based on the orthogonal gradient responses, and enhancing the dissected boundary responses through confidence spatial gating and residual modulation. The network includes a Decoder (BERD) and a joint loss function for jointly supervised training of the segmentation network. After the network is built, the ResNet34 encoder is initialized with ImageNet pre-trained weights and trained with a differential learning rate of 0.1 times relative to other learnable parameters of the network to reduce the rapid destruction of pre-trained low-level edge response features during training. Then, the training samples are input into the encoder for feature extraction.

[0034] Specifically, the encoder-decoder segmentation network CAFASeg-Net is constructed and initialized, with the following steps: In this step, a context-aware foreground-anchored segmentation network (CAFASeg-Net) for endoscopic neural tissue segmentation is constructed. This network follows the encoder-decoder design paradigm, and its overall architecture is as follows: Figure 2 As shown. Given a set of endoscopic images ,in Indicates an RGB input image. This represents a binary mask representing the corresponding neural tissue; the network's goal is to learn the mapping relationship. ,in The probability map is for prediction. CAFASeg-Net consists of the following four core components: (1) ResNet34 encoder: used to extract multi-level coding features at different spatial resolutions; (2) ASPPLite lightweight multi-scale context bottleneck module: captures multi-scale global context and generates global semantic anchors G; (3) Variance-guided gated decoder: used to perform channel-level soft suppression of skip connection features affected by high-frequency optical artifacts such as specular reflection through anchor injection, channel-wise spatial variance calculation and nonlinear gating mechanism; (4) Boundary Enhancement Fine Decoder BRD, used to explicitly enhance the dissected boundary response using parameter-frozen orthogonal Sobel gradient operator, boundary magnitude field, confidence space gating and residual modulation, and joint loss function. In the main experiment, the segmentation network uses ImageNet pre-trained ResNet34 as the encoder backbone network and applies a 0.1 times differential learning rate scaling to the encoder. For example, when the initial learning rate of other learnable parameters of the network is At that time, the initial learning rate of the ResNet34 encoder was set to This preserves the low-level edge response priors in the pre-trained backbone.

[0035] In S2, extracting multi-scale encoded features from training samples through the encoder means inputting the training samples into the encoder network and obtaining feature maps of different resolutions through step-by-step downsampling. The deepest feature map contains high-level semantic information, while the skip connection features of each intermediate layer contain shallow spatial detail information.

[0036] In step S3, the deepest features extracted by the encoder are input into the ASPLite module. Contextual information from different receptive fields is captured in parallel through multi-scale dilated convolution and global pooling branches. After concatenation and projection, global semantic anchors are generated. These anchors serve as foreground spatial priors and are injected into each upsampling stage of the decoder to compensate for the information dilution of deep semantic features during continuous upsampling. Simultaneously, the skip connection features of the encoder are fused with the spatially aligned global semantic anchors. The channel-wise spatial variance of the fused features is calculated to quantify the high-frequency fluctuation intensity of each channel. The variance vector is mapped to a nonlinear gated mask via a multilayer perceptron. Channel-level soft suppression is applied to the skip connection features to filter out high-frequency optical artifacts such as specular reflection. The suppressed skip connection features are then concatenated with the decoder upsampling features to obtain a concatenated feature that integrates multi-scale semantic and boundary detail information.

[0037] The ASPPLite module extracts multi-scale context through four parallel branches. The outputs of these four branches are concatenated and projected via a 1×1 convolution, then connected to the deepest layer feature residual to generate the global semantic anchor. This global semantic anchor is then injected into each stage of the decoder. The four parallel branches include: a 1×1 convolution branch, a 3×3 dilated convolution branch with a dilation rate of 6, a 3×3 dilated convolution branch with a dilation rate of 12, and a global branch that is sequentially upsampled by global average pooling and bilinear interpolation. The encoder uses ResNet34, and each stage of the decoder receives the global semantic anchor and fuses it with the upsampled features of the corresponding layer.

[0038] Specifically, to address the issue of deep semantic feature dilution caused by continuous bilinear upsampling, the ASPLite module is placed at the deepest bottleneck of the network. Given the input feature map... ASPPLite captures multi-scale context through four orthogonal branches:

[0039]

[0040]

[0041] The meanings of each symbol are as follows: It is the ReLU activation function; This indicates a batch normalization operation; for Convolution is used for channel-dimensional feature transformation. expansion rate of Dilated convolution has a smaller receptive field, capturing local-to-mesoscale context. expansion rate of Dilated convolution has a larger receptive field, capturing medium- to global-scale context. For global average pooling, the spatial dimension is compressed to ; For bilinear interpolation upsampling, Output restored to Space dimensions; , , , These are the output feature maps of the four parallel branches, corresponding to context representations at different scales.

[0042] Global semantic anchor Synthesized via residual projection: in: This indicates a channel-level concatenation operation; This indicates a random deactivation operation, used for regularization to prevent overfitting; It represents a global semantic anchor point, which is injected into subsequent decoding stages as a global semantic reference. When instrument occlusion causes local distortion of tissue appearance, it provides the decoder with spatial prior information with foreground perception capability.

[0043] In this embodiment, the Dropout rate of the ASPLite module is preferably set to 0.3, with a value ranging from 0.1 to 0.5, to randomly deactivate some neurons during training to prevent overfitting.

[0044] The skip connection features output by the encoder are fused with the spatially aligned global semantic anchors to generate a guiding field. The spatial variance of the guiding field is calculated for each channel, and the magnitude of the variance is used to quantify the degree of interference from high-frequency optical artifacts such as specular reflection in each channel. The variance vector is mapped to a nonlinear gated mask in the [0,1] interval by a multilayer perceptron. This mask is used to perform channel-level soft suppression on the skip connection features. That is, the channel-by-channel spatial variance vector is input into the multilayer perceptron to adaptively generate a channel-level nonlinear gated mask, and soft suppression is performed on the skip connection features based on the gated mask, thereby weakening the abnormal feature responses related to high-frequency optical artifacts such as specular reflection. The suppressed skip connection features are concatenated with the upsampled features of the decoder to obtain a concatenated feature that fuses semantically pure features and spatial detail information.

[0045] Specifically, to address the problem of strong specular reflection caused by endoscopic coaxial illumination during percutaneous endoscopic lumbar discectomy (PELD), a variance-guided gating mechanism was designed to maintain a continuous visual safety boundary during the surgical procedure.

[0046] First, construct the guiding field. Encoder features Anchor points aligned with space Fusion: in: This represents the encoder skip connection feature map, which contains shallow local texture information; Indicates a global semantic anchor; This represents a 1×1 convolution, used for channel alignment. This indicates bilinear interpolation, used for spatial dimension alignment. This represents the fused guiding field, which integrates local coding information and global semantic anchoring information. If Then both 1×1 convolutions will output Channel, after interpolation Space dimensions are ,thereby .

[0047] Specular reflection causes statistical fluctuations, as shown by channel-by-channel spatial variance. Quantification: in: and They represent the guiding fields respectively. The space's height and width; Indicates the channel index; Indicates the guiding field The passage in spatial location Eigenvalues ​​at; Indicates the guiding field The spatial mean of the channel, i.e. ; This represents the spatial variance of the c-th channel. A larger variance indicates that the channel contains stronger high-frequency fluctuations (such as specular reflection artifacts). This statistic is not directly equivalent to optical artifacts, but is mapped to gating weights by a multilayer perceptron and combined with global semantic anchoring information.

[0048] Nonlinear gated masks are generated using a bottleneck multilayer perceptron. : in: This represents the channel-by-channel variance vector, calculated from the variance of each channel above. Stacked together, with a dimension of C; and These represent two learnable weight matrices of a multilayer perceptron (MLP), forming a two-layer fully connected structure; This indicates a batch normalization operation; Represents the ReLU activation function; express The activation function compresses the output to... interval; This represents a channel-level soft-gated mask, with a value range of... The closer the value is to 0, the more likely the channel is to contain high-frequency optical artifacts and suppress them.

[0049] Gated Mask Channel-level soft suppression is applied to shallow features, and the pruned features are compared with the upsampled decoded features. The splicing process produces the final splicing features. : in: This indicates element-wise multiplication (Hadamard product). This indicates an upsampling operation, which decodes the features. Spatial resolution magnified by 2 times; This indicates a channel-level concatenation operation; (·) represents a 3×3 convolution, used for feature integration after fusion; This indicates that the fused output feature map maintains semantic purity and leaves stable anatomical gradient information for subsequent BRD module processing.

[0050] After inputting the spliced ​​features into the BARD module, the module uses the parameter-frozen horizontal and vertical Sobel operators as orthogonal partial differential operators to perform channel-independent depth-direction convolutions on the input features, calculating the horizontal and vertical gradient tensors respectively, and synthesizing the boundary magnitude field to respond to the boundary strength at each position in the spliced ​​features. At the same time, the input features are projected through 1×1 convolution and activated by Sigmoid to generate a confidence space gating to distinguish between real anatomical boundaries and low-texture background noise. The boundary magnitude field is filtered by the confidence gating and weighted with a learnable scalar, and residual modulation is performed with the input features. The features are refined by 3×3 convolution and batch normalization. Without introducing additional learnable boundary extraction parameters, the feature response of the anatomical structure edge is enhanced to obtain the boundary enhancement feature.

[0051] First, the Boundary Enhancement Refinement Decoder (BERD) uses the parameter-frozen horizontal and vertical Sobel operators as orthogonal partial differential operators.

[0052] Specifically, to address the issue of continuous bilinear upsampling attenuating high-frequency spatial gradients and causing excessively diffuse predicted contours, the BRD module freezes the orthogonal partial differential operator matrix of the two parameters. Embedded decoding path, initialized to Operator: in, For horizontal gradient detection kernel, The Sobel operator, a discrete differential operator used for edge detection in image processing, highlights high-frequency changing regions by calculating the gradient approximation of the image brightness function. This operator comprises two 3×3 convolutional kernels: one horizontal (detecting vertical edges) and one vertical (detecting horizontal edges), which are positively complementary and collectively cover boundary information in all directions. In this invention, the Sobel operator is initialized as a depth-oriented convolutional kernel with frozen parameters in the BRD module, used to independently calculate the gradient magnitude response of each channel of the input features to enhance anatomical structure boundary features.

[0053] Secondly, channel-independent depthwise convolutions are performed on the input features to compute the horizontal and vertical gradient tensors.

[0054] Specifically, for the input feature field Perform channel-independent grouped convolutions and compute the partial derivative tensors: in: This represents a two-dimensional depth-direction convolution, which is executed independently along the spatial dimension, ensuring that the edge extraction of each physical channel does not interfere with each other. This represents the gradient tensor in the horizontal direction, with the same dimension as X; This represents the gradient tensor in the vertical direction, with the same dimension as X.

[0055] Then, the boundary magnitude field is calculated from the two orthogonal gradient tensors.

[0056] Specifically, high-frequency boundary amplitude field Defined as the gradient magnitude response calculated from two orthogonal partial derivatives: in: and Represents the element-wise squared values ​​of the horizontal and vertical gradient tensors; Represents a positive constant used to improve numerical stability; This indicates a batch normalization operation; This represents the normalized boundary amplitude field, characterizing the boundary response intensity at each location in the feature map.

[0057] It should be noted that: It is a very small positive constant (usually taken as...) or Its function is to prevent the value within the square root from being zero or too small when calculating the gradient magnitude, which would lead to numerical instability. It ensures that the formula can still output a smooth and differentiable boundary response value in areas where the image is completely flat (i.e., both the horizontal and vertical gradients are zero), thereby avoiding division by zero errors or gradient explosion in subsequent batch normalization and other operations. It is only used as a numerical stability protection term and does not participate in the actual boundary strength discrimination. Therefore, there is no need to adjust its value during optimization inference.

[0058] Finally, the boundary amplitude field is screened by confidence space, weighted by a learnable scalar, and residually modulated with the original decoded features to achieve boundary response enhancement.

[0059] Specifically, considering that the pure background area in the endoscopic field of view contains a large number of slight optical disturbances, direct injection... BRD can easily amplify background noise, so it introduces confidence space gating. Distinguishing between realistic anatomical boundaries and low-texture backgrounds, confidence spatial gating Specifically: in: express Convolution projects the input feature X into a single-channel spatial confidence map; express Activation function; Indicates the confidence space gating, with a value range of High-confidence regions (close to 1) correspond to locations where the model believes true anatomical boundaries exist, while low-confidence regions (close to 0) correspond to background noise regions. For example, one could... The region is interpreted as a high-confidence region. The region defined as the low-confidence region, and the region in between as the transition region; the above values ​​are only used to illustrate the semantics of the gate value, and in actual calculations... As continuous weights, they directly participate in element-wise multiplication without undergoing binarization thresholding.

[0060] The output nonlinear residual modulation is expressed as: in: It represents a learnable scalar that is optimized end-to-end by the network and adaptively adjusts the intensity of boundary excitation. Represents the boundary amplitude field; Indicates confidence level spatial gating; This indicates element-wise multiplication; This represents a cascaded operation consisting of 3×3 convolution, batch normalization, and ReLU activation. This represents the refined output features after boundary enhancement, maintaining the continuous sensitivity of the preceding network layers to high-frequency anatomical gradients without introducing additional learnable boundary extraction parameters.

[0061] It should be noted that the learnable scalars in the BERD module Used to adjust the boundary excitation intensity, its initial value can be selected in the range of 0.01 to 0.1, for example, set to 0.1. This scalar is adaptively updated end-to-end by backpropagation during training, and no fixed upper or lower bound is set for its final value. Confidence space gating For continuous soft gating, no independent binarization activation threshold is set.

[0062] In step S4, a neural tissue prediction probability map is generated based on the boundary enhancement features. The prediction probability map and the real segmentation label are input into a joint loss function. The segmentation network parameters are optimized through backpropagation to obtain a trained segmentation network. The spinal endoscopy image to be segmented is input into the trained segmentation network to obtain a neural tissue segmentation mask.

[0063] Specifically, the boundary enhancement features are mapped to a prediction probability map with the same spatial resolution as the input image through a segmentation head (1×1 convolution). Each pixel value in this probability map represents the predicted probability that the location belongs to neural tissue. During the training phase, the prediction probability map is input to the ground truth mask and a joint loss function is applied. This joint loss is a weighted combination of boundary-weighted Dice loss, connected component Dice loss, asymmetric focal Tversky loss, and false positive penalty loss. The boundary-weighted Dice loss applies additional weights to the boundary regions of the ground truth mask, explicitly supervising the model's learning of anatomical boundaries, thus ensuring "boundary awareness" throughout the training process. The network parameters are iteratively optimized through backpropagation. Once the loss converges, the prediction probability map is thresholded (usually to 0.5) and transformed into a binary segmentation mask, outputting the final neural tissue segmentation result.

[0064] In this embodiment, considering the characteristics of nerve tissue in the spinal endoscopy field of view, which has a very small area and often presents as a sparse filamentous branch topology, a joint loss optimization framework including four complementary error measures is proposed to align the optimization goal with the clinical principle of safety avoidance. Boundary-weighted Dice loss strengthens the model's supervision of anatomical edges and hard-to-classify pixels by applying additional weights to the real mask boundary region and integrating online hard example mining. Connected component Dice loss extracts physically isolated neural fiber bundles as independent entities and calculates the Dice loss of each entity separately within a local window, forcing the optimizer to assign independent gradient flows to fragmented neural branches and preventing the prediction error of isolated components from being masked by the global background denominator. Asymmetric focus Tversky loss sets the false negative penalty weight to be greater than the false positive penalty weight, encodes the clinical risk that missing neural tissue in PELD surgery is more dangerous than overestimation, and combines it with the focus modulation index to enhance the response to hard-to-classify samples. False positive penalty loss extracts pure background regions by performing max pooling dilation on the real mask and taking the complement, and applies a mean square error penalty to the prediction probability falling into this region, suppressing high-confidence false positive predictions in low-texture backgrounds and preventing the model from generating false activations in textureless regions. The four losses are combined in a weighted manner to form a global joint loss function, which is synergistically optimized from four dimensions: region overlap, topological integrity, recall priority, and false positive suppression, promoting the alignment of segmentation results with the principle of safe avoidance surgery.

[0065] 1) Boundary-weighted Dice loss and online hard example mining (BW-Dice), as detailed below: Constructing a spatial weight field:

[0066] in: This refers to the ground truth mask. This represents the boundary weight coefficient, which controls the loss amplification factor in the boundary region. A mask representing the boundary region after morphological expansion; The spatial weight field is represented, with boundary pixels having higher weights than internal pixels. By applying morphological dilation to the ground truth mask Y, the loss contribution of the boundary region is explicitly increased. Simultaneously, Online Hard Example Mining (OHEM) is integrated into the Binary Cross-Entropy (BCE) loss calculation, and in each iteration, only the top 10% of pixels with the highest loss values ​​are used for gradient backpropagation, effectively filtering out the dilution effect of a large number of easily classifiable background pixels on the gradient signal of small targets.

[0067] 2) Connected component Dice loss (CC-Dice), as detailed below: By introducing a connected component analysis mechanism, a set of physically isolated anatomical entities can be extracted. For each entity Generates independent rectangular windows with fixed space buffers. Within this local receptive field, the CC-Dice loss is defined: the local window is expanded by b pixels outward from the outer rectangle of the corresponding connected component and then cropped to the image boundary; for a 512×512 pixel input, b can be 8 to 32 pixels, for example b=16, and this example value should be consistent with the actual implementation.

[0068] in: Indicates the total number of connected components; Indicates the first A physically isolated anatomical entity (connected component); Indicates surrounding The generated rectangular local window; Represents the prediction probability field In local window The sub-region extracted from within; This indicates that the real mask is in a local window. The sub-region extracted from within; To represent a smoothing constant and prevent the denominator from being zero, we can take [value missing]. to ,For example ; This represents the Dice loss for connected components, which forces the optimizer to assign independent gradient flows to fragmented neural fiber bundles, preventing the prediction errors of isolated neural components from being masked by the global background denominator.

[0069] 3) Asymmetric focal Tversky loss, as detailed below: Penalty weight ( For false positives, Quantitative coding of false negatives encodes the asymmetric clinical risk in PELD surgery: false positives (overestimation) only lead to conservative instrument withdrawal, while false negatives (underestimation) eliminate the visual safety boundary. The Tversky index is compared with the focus index. Combined, this enhances the model's response to difficult-to-classify samples: in: Indicates the number of true positive pixels (those predicted as foreground and actually being foreground); Indicates the number of false positive pixels (predicted as foreground but actually as background); Indicates the number of false negative pixels (pixels that were predicted as background but actually became foreground). The weight representing the false positive penalty is preferably... ; The preferred value represents the false negative penalty weight. ; This reflects a stronger penalty for missed detections; Represents the focus modulation index, preferably This causes the loss value to be non-linearly amplified for difficult-to-classify samples; Represents the smoothing constant; This represents the asymmetric focus Tversky loss.

[0070] 4) False positive penalty items, as detailed below: To suppress high-confidence positive predictions in low-texture background regions, a pure background mask is explicitly extracted. A mean squared error penalty is applied to predictions that fall into the background region.

[0071] in: This represents a probability prediction graph. ; This represents a pure background mask, through... Max pooling dilates the real mask Y and then takes the complement. Indicates Max pooling is performed on the real mask with kernel, stride 1, and fill 5 to maintain the output size. And ensure that pixels near the foreground boundary are not misidentified as pure background; This indicates element-wise multiplication; This represents calculating the average value over H×W spatial locations; The false positive penalty loss is represented by a mean square operator that performs nonlinear error amplification on high-confidence background false alarms, combined with extreme weighting coefficients. Preferred To achieve strong suppression.

[0072] 5) The global objective function is as follows: The overall training objective is expressed as a weighted combination of the above loss components:

[0073] in: This represents the boundary-weighted Dice loss (including OHEM). This represents the asymmetric focus Tversky loss; This represents the Dice loss of the connected components; This indicates the penalty for false positives; This represents the deep supervision auxiliary loss, applied during the intermediate decoding stage; The relative contribution weights of each loss term are determined by performing stepwise coordinate descent optimization on the validation set and remain unchanged for evaluation on the test set. In the main experiment, The values ​​were set to 1.5, 0.3, and 5.0, respectively; the candidate ranges examined on the validation set through stepwise coordinate descent were 0.5 to 2.5, 0.1 to 0.9, and 1.0 to 10.0, respectively. The selected weights remained unchanged during the evaluation on the test set. Those skilled in the art will understand that the above weight values ​​can be further fine-tuned on the validation set using grid search or coordinate descent to adapt to the segmentation accuracy requirements of different clinical scenarios.

[0074] Furthermore, this invention pre-sets hyperparameters and trains the segmentation network, the specific process of which is as follows: The AdamW optimizer is used, with a global initial learning rate of... The batch size is preferably set to 16 (range 8-32), and the weight decay coefficient is [value missing]. The learning rate scheduling strictly follows the cosine annealing algorithm, with linear warm-up used for the first 20 epochs (ranging from 10 to 30 epochs), and the lower bound of the learning rate is truncated. A 0.1x differential learning rate scaling was applied to the ResNet34 encoder to preserve low-level edge response priors from the ImageNet pre-trained backbone. The model was trained for 100 epochs on a single NVIDIA RTX 4090 (24GB VRAM) using the PyTorch 2.1 framework. AdamW's , and optimizer numerical stability constant Unless otherwise specified, values ​​of 0.9, 0.999, and [other values] can be used respectively. Cosine annealing continues until the 100th epoch after the warm-up phase, maintaining a minimum learning rate of [value missing]. .

[0075] Finally, the optimal segmentation network is output for real-time segmentation of neural tissue in spinal endoscopy images.

[0076] Specifically, the model is evaluated based on the validation set after each epoch, and the checkpoint with the highest mDSC on the validation set is determined as the optimal segmentation network. If other main metrics or parallel criteria are actually used, the actual training records should prevail. The trained CAFASeg-Net (ResNet34 backbone) can achieve a real-time inference speed of 108.8 frames per second on an NVIDIA RTX 4090, meeting the real-time requirements of edge devices in the operating room. It can be used to provide surgeons with frame-synchronized visual cues of neural tissue boundaries and support intraoperative context awareness.

[0077] Furthermore, on an independent test set, CAFASeg-Net using the ResNet34 encoder achieved the best results across multiple evaluation metrics: an average Dice similarity coefficient (mDSC) of 87.72%, an average intersection-over-union ratio (mIoU) of 80.00%, a 95% Hausdorff distance (HD95) of 24.93 pixels, a precision of 92.91%, a sensitivity (i.e., recall) of 87.74%, and an inference speed of 108.8 frames per second. Compared to nine representative segmentation methods (including U-Net, U-Net++, Attention U-Net, nnU-Net, TransUNet, VM-UNet, SegFormer, Mobile U-ViT, and Polyp-PVT), CAFASeg-Net achieved the best overall performance in key overlap and boundary accuracy metrics.

[0078] like Figure 3 As shown, Figure 3 The qualitative comparison results of CAFASeg-Net and nine representative segmentation methods on the PELD-Seg independent test set are presented in the form of a split image. The green outline represents the true labeled boundary of neural tissue determined by a senior spinal surgeon, and the red outline represents the predicted boundary of neural tissue output by the corresponding segmentation model. Figure 3 (a) to Figure 3 In the diagram, (j) corresponds to U-Net, U-Net++, Attention U-Net, TransUNet, VM-UNet, nnU-Net, SegFormer, Mobile U-ViT, Polyp-PVT, and the CAFASeg-Net of this invention, respectively. By comparing the positional relationship between the red predicted contour and the green ground truth labeled contour, the performance of different methods in terms of foreground integrity, boundary continuity, local missed segmentation, missegmentation, and boundary localization deviation can be intuitively evaluated.

[0079] Specifically, Figure 3 As shown in (a), U-Net can identify major neural tissue regions, but it still has local omissions and boundary discontinuities in some small-scale, isolated or contour-transitional areas. In complex scenes, the predicted contours are prone to deviate from the actual labeled contours.

[0080] Figure 3 As shown in (b), U-Net++ enhances multi-layer feature fusion through nested skip connections. Compared with the basic U-Net, it can improve some boundary continuity, but it may still produce local missing segments or boundary offsets in areas with changes in illumination, low contrast regions, and small, separated neural tissue regions.

[0081] Figure 3 As shown in (c), Attention U-Net uses the attention mechanism to enhance the response of the target region. However, as can be seen from the representative results, under conditions of instrument interference, strong local reflection and complex background, some small areas may still be missed, and there are discrete false positive responses or inconsistent local boundaries in some locations.

[0082] Figure 3 As shown in (d), TransUNet can obtain a large range of contextual information by utilizing global modeling capabilities. However, for fine-grained edges, narrow structures, and irregular turning areas of neural tissue, the predicted contour may still expand into the background area or shrink into the real area.

[0083] Figure 3 As shown in (e), VM-UNet exhibits significant boundary expansion and missegmentation phenomena in some representative images. In particular, in scenes with bright reflections, complex textures, or small foreground regions, non-neural tissue regions may be incorrectly activated, leading to a large deviation between the predicted region and the true annotation.

[0084] Figure 3 As shown in (f), the nnU-Net exhibits relatively stable regional overlap. However, in cases of isolated small targets, abrupt changes in local edges, or partial occlusion of the foreground by instruments, there may still be omissions of small connected components or local boundary positioning deviations.

[0085] Figure 3 As shown in (g), SegFormer can model multi-scale features well and achieve reasonable overall segmentation results in most representative images. However, it still has a certain degree of undersegmentation, oversegmentation or contour shift in areas with strong local reflection, low contrast boundaries and small discontinuous neural tissue regions.

[0086] Figure 3 As shown in (h), Mobile U-ViT balances global semantic modeling and lightweight design, but in some images, the predicted boundary expands outward from the real region and there are local discrete false positive regions, indicating that its ability to suppress complex endoscopic optical artifacts and fine-grained boundary changes is still limited.

[0087] Figure 3 As shown in (i), Polyp-PVT can achieve good overlap in the overall foreground region, but there is still room for improvement in preserving local edge details and maintaining the integrity of isolated connected components for irregular, discrete and small-scale neural tissue structures.

[0088] Figure 3As shown in (j), the CAFASeg-Net of the present invention exhibits more continuous and complete foreground prediction in four representative test images, with its red predicted contours being closer to the green true labeled contours as a whole. Especially in scenarios where the foreground of neural tissue is sparse, the lighting changes significantly, and there is specular reflection or instrument interference, it can reduce local missed segmentation, missegmentation and boundary offset phenomena, while maintaining good small-scale tissue detection ability and anatomical boundary continuity.

[0089] The qualitative and quantitative evaluation results corroborate each other: the ASPLite module generates global semantic anchors through multi-scale context modeling and injects them into each level of the decoding stage, improving the foreground semantic consistency of sparse neural tissue; the variance-guided gating module generates a nonlinear gating mask based on the channel-wise spatial variance of the guiding field, performing channel-level soft suppression on skip connection features affected by specular reflection and brightness abrupt changes; the BERD module extracts orthogonal gradient responses through parameter-frozen horizontal and vertical Sobel operators, and combines boundary amplitude fields, confidence space gating, and residual modulation to enhance stable anatomical boundaries; the joint loss function further synergistically constrains region overlap, isolated connected components, false negatives, and background false positives, thereby jointly improving... Figure 3 The foreground integrity and boundary positioning effect are shown.

[0090] Plug-in validation experiments on six lightweight encoders (MobileNetV2, MobileNetV3-Small, MobileNetV3-Large, ShuffleNetV2×1.0, EdgeNeXt-XX-Small, and MobileViT-XS) show that the proposed module can consistently improve segmentation metrics across encoder architectures of different capacities, with an average HD95 reduction of approximately 19 pixels. All enhanced model parameters are below 11M, verifying the broad applicability and plug-and-play nature of the proposed method.

[0091] Cross-domain generalization experiments on two public colon polyp segmentation datasets, Kvasir-SEG and CVC-ClinicDB, further demonstrate that variance-guided feature selection and explicit boundary enhancement mechanisms are not only applicable to spinal endoscopy scenarios, but also have effective suppression capabilities for mirror reflection and boundary blurring problems in a wider range of endoscopic tasks.

[0092] Example 2 In a typical embodiment of the present invention, a medical image neural tissue segmentation system based on boundary enhancement is provided, comprising: Data acquisition module: used to acquire spinal endoscopic images and perform preprocessing to obtain training samples; Encoder module: used to extract multi-scale encoded features from the training samples through an encoder, wherein the multi-scale encoded features include the deepest layer features and skip connection features; Global semantic anchoring module: used to generate global semantic anchors from the deepest features through the ASPLite module, and inject the global semantic anchors into each stage of the decoder; The artifact suppression and fusion module is used to suppress high-frequency optical artifacts by using the variance-guided gating module to suppress the skip connection features, and then concatenate the suppressed skip connection features with the decoder upsampled features to obtain the concatenated features. Boundary enhancement module: used to enhance the spliced ​​features by using the BRD module to dissect the boundary response, thus obtaining boundary enhancement features; Segmentation output module: used to obtain a neural tissue segmentation mask based on the boundary enhancement features and through joint loss-supervised training.

[0093] Example 3 The purpose of this embodiment is to provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the method of Embodiment 1.

[0094] Example 4 The purpose of this embodiment is to provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method of Embodiment 1.

[0095] The steps and methods involved in Embodiments 3 and 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.

[0096] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.

[0097] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

[0098] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. A method for segmenting neural tissue in medical images based on boundary enhancement, characterized in that, include: Acquire spinal endoscopic images and preprocess them to obtain training samples; The training samples are processed by an encoder to extract multi-scale encoded features, which include deepest layer features and skip connection features. The deepest layer features are used to generate global semantic anchors through the ASPPLite module, and the global semantic anchors are injected into each stage of the decoder; the skip connection features are used to suppress high-frequency optical artifacts through the variance-guided gating module, and the suppressed skip connection features are concatenated with the decoder upsampled features to obtain concatenated features; the concatenated features are used to enhance the dissected boundary response through the BRD module to obtain boundary enhancement features; Based on the aforementioned boundary enhancement features, a neural tissue segmentation mask is obtained through joint loss-supervised training.

2. The medical image neural tissue segmentation method based on boundary enhancement as described in claim 1, characterized in that, The ASPLite module extracts multi-scale context through four parallel branches, concatenates the outputs of the four parallel branches, projects them through a 1×1 convolution, and connects them with the deepest feature residual to generate global semantic anchors.

3. The medical image neural tissue segmentation method based on boundary enhancement as described in claim 2, characterized in that, The four parallel branches include: The code includes a 1×1 convolution branch, a 3×3 dilated convolution branch with an expansion rate of 6, a 3×3 dilated convolution branch with an expansion rate of 12, and a global branch that is successively upsampled by global average pooling and bilinear interpolation.

4. The method for segmenting neural tissue in medical images based on boundary enhancement as described in claim 1, characterized in that, The variance-guided gating module fuses the jump connection features with the spatially aligned global semantic anchors to generate a guiding field; The channel-wise spatial variance of the guiding field is calculated and mapped to a nonlinear gated mask via a multilayer perceptron. The gated mask is then used to perform channel-level soft suppression on the skip connection features to filter out high-frequency optical artifacts.

5. The method for segmenting neural tissue in medical images based on boundary enhancement as described in claim 1, characterized in that, The process of generating the boundary enhancement features includes: The BERD module uses the parameter-frozen horizontal and vertical Sobel operators as orthogonal partial differential operators; Perform channel-independent depthwise convolution on the input features to compute the horizontal and vertical gradient tensors, and calculate the boundary magnitude field from the two orthogonal gradient tensors.

6. The method for segmenting neural tissue in medical images based on boundary enhancement as described in claim 5, characterized in that, After the boundary amplitude field is screened by confidence space, it is weighted with a learnable scalar and residually modulated with the original decoding features to achieve boundary response enhancement.

7. The method for segmenting neural tissue in medical images based on boundary enhancement as described in claim 1, characterized in that, The joint loss includes a weighted combination of boundary-weighted Dice loss, connected component Dice loss, asymmetric focus Tversky loss, and false positive penalty loss; In this context, the false negative penalty weight of the asymmetric focus Tversky loss is greater than the false positive penalty weight.

8. A medical image neural tissue segmentation system based on boundary enhancement, characterized in that, include: Data acquisition module: used to acquire spinal endoscopic images and perform preprocessing to obtain training samples; Encoder module: used to extract multi-scale encoded features from the training samples through an encoder, wherein the multi-scale encoded features include the deepest layer features and skip connection features; Global semantic anchoring module: used to generate global semantic anchors from the deepest features through the ASPLite module, and inject the global semantic anchors into each stage of the decoder; The artifact suppression and fusion module is used to suppress high-frequency optical artifacts by using the variance-guided gating module to suppress the skip connection features, and then concatenate the suppressed skip connection features with the decoder upsampled features to obtain the concatenated features. Boundary enhancement module: used to enhance the spliced ​​features by using the BRD module to dissect the boundary response, thus obtaining boundary enhancement features; Segmentation output module: used to obtain a neural tissue segmentation mask based on the boundary enhancement features and through joint loss-supervised training.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1-7.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1-7.