Universal single-stage sperm morphology image segmentation method and system

By employing a single-stage segmentation network based on multi-view structure-appearance decoupling and topology-aware continuity learning, the challenge of segmenting stained and unstained sperm images was solved, achieving efficient and accurate sperm morphology segmentation in different domains, thus improving clinical applicability and segmentation results.

CN122265329APending Publication Date: 2026-06-23JIANGXI UNIVERSITY OF FINANCE AND ECONOMICS
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGXI UNIVERSITY OF FINANCE AND ECONOMICS
Filing Date
2026-05-26
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve effective sperm morphology segmentation simultaneously in stained and unstained sperm images, especially in high-density overlapping scenarios where the continuity and integrity of sperm tail structures are difficult to maintain. Furthermore, existing methods cannot be widely applied in clinical practice.

Method used

A single-stage segmentation network is adopted, consisting of a multi-view structure-appearance decoupling module and a topology-aware continuity learning module. The multi-view structure-appearance decoupling module explicitly models and separates the data distribution differences between stained and unstained domains, and the topology optimization of the sperm tail is maintained through the topology-aware continuity learning strategy.

Benefits of technology

It achieves efficient and accurate sperm morphology segmentation in both stained and unstained images, expanding its clinical applicability, significantly improving the continuity and integrity of sperm tail structures in high-density overlapping scenarios, and reducing the deployment complexity of automated analysis systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122265329A_ABST
    Figure CN122265329A_ABST
Patent Text Reader

Abstract

The application provides a general single-stage sperm morphology image segmentation method and system, which comprises the following steps: obtaining a stained or unstained sperm microscopic image; inputting the sperm microscopic image into a single-stage segmentation network model, outputting a domain robust shared feature map through multi-view transformation and adaptive fusion; after multi-scale feature extraction and aggregation, a prediction head is used to output a semantic segmentation and / or instance-aware component segmentation result in parallel; tail skeleton features are extracted and topological optimization is performed based on a continuity constraint loss to maintain tail connectivity. The application enhances the cross-domain generalization capability by structure-appearance decoupling, and uses topological-aware learning to constrain the tail continuity, thereby solving the problems of weak generalization between stained and unstained images and tail segmentation fracture in high-density overlapping scenes in the prior art, and improving the clinical applicability and segmentation integrity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical image processing technology, and in particular to a general single-stage sperm morphology image segmentation method and system. Background Technology

[0002] Sperm morphology analysis is a core indicator for assessing male fertility. Traditionally, andrologists manually examine semen samples under a microscope to distinguish between normal and abnormal sperm. This method is time-consuming, highly subjective, and lacks standardized evaluation criteria. Therefore, developing an automated sperm morphology analysis system has significant clinical value. Accurate segmentation of sperm microscopic images is a key technical challenge in automated sperm analysis. Issues such as overlapping sperm, low image contrast, and the delicate tail structure of sperm in stained / unstained images further complicate the segmentation task.

[0003] From a clinical perspective, automated sperm segmentation is primarily suited to two different clinical scenarios. Specifically, stained sperm analysis renders sperm inactive for fertilization but provides a gold-standard morphological assessment. This method can accurately resolve subcellular structures such as the sperm head, acrosome, and tail, supporting refined pathological diagnosis of male infertility. In contrast, unstained live sperm analysis preserves sperm motility, thus serving clinical applications such as intracytoplasmic sperm injection (ICSI). However, these images have low contrast, making effective segmentation of fine structures difficult. Therefore, constructing a universal segmentation network capable of simultaneously processing stained and unstained images has significant clinical application value.

[0004] From a technical perspective, existing sperm segmentation methods have primarily evolved from traditional image processing to deep learning. Early traditional methods (such as thresholding, edge detection, and clustering algorithms) had low data dependence but could not adapt to complex imaging environments and sperm morphological variations. In recent years, deep learning methods have made significant progress in sperm segmentation, mainly covering semantic segmentation, instance segmentation, and instance-aware component segmentation. Network architectures have also evolved from multi-stage, complex structures to efficient single-stage frameworks. For example, the recently proposed CLPM-Net can jointly achieve sperm localization, component segmentation, and head-to-tail matching in a single network, improving inference speed and solving the head-to-tail matching problem in high-density stained samples. However, this method has poor adaptability to low-contrast unstained images, thus limiting its clinical application.

[0005] To improve domain generalization ability, existing technologies describe a meta-learning algorithm to learn sperm head morphology segmentation invariant features applicable to both stained and unstained domains. However, as... Figure 3As shown, extending it directly to the morphological segmentation of the entire sperm will bring more challenges: (1) The sperm head segmentation structure is compact and the cross-domain features are stable, making the task relatively simple. However, the segmentation of the entire sperm requires maintaining the structural continuity of the slender tail and dealing with the complex sperm head-tail correlation problem in high-density regions. (2) There are significant domain differences between stained and unstained images, and it is difficult for a single model to achieve effective generalization in both domains at the same time. Summary of the Invention

[0006] In view of the above, the main objective of this invention is to propose a universal single-stage sperm morphology image segmentation method and system to solve the aforementioned technical problems.

[0007] This invention proposes a general single-stage sperm morphology image segmentation method, which includes the following steps: Obtain sperm microscopic images to be processed, including stained sperm images or unstained sperm images; The sperm microscopic images to be processed are input into a pre-built and trained single-stage segmentation network model; the single-stage segmentation network model includes a multi-view structure-appearance decoupling module, a feature extraction backbone network, a feature fusion neck network, a prediction head component, and a topology-aware continuity learning module; The multi-view structure-appearance decoupling module performs various complementary view transformations on the sperm microscopic image to be processed, generates multi-view features, and fuses the multi-view features through an adaptive feature fusion mechanism to output a decoupled domain robust shared feature map. A feature extraction backbone network and a feature fusion neck network are used to perform multi-scale feature extraction and aggregation on the shared feature map to generate a multi-scale fused feature map. The prediction head component is used to output semantic segmentation results and / or instance-aware component segmentation results in parallel based on multi-scale fused feature maps. The instance-aware component segmentation results include at least pixel-level localization of sperm head and tail and instance association information. The topology-aware continuity learning module is used to extract morphological skeleton features of the sperm tail region from semantic segmentation results and / or instance-aware component segmentation results. Based on the continuity constraint loss between the skeleton features and the real labeled skeleton, the topology of the sperm tail structure is optimized to maintain tail connectivity. Output the final sperm morphology segmentation image.

[0008] This invention also proposes a universal single-stage sperm morphology image segmentation system, wherein the system applies the universal single-stage sperm morphology image segmentation method described above, and the system includes: The image acquisition module is used to acquire stained or unstained sperm microscopic images to be processed, including stained sperm images or unstained sperm images; The model storage module stores pre-trained single-stage segmentation network models, which include: The multi-view structure-appearance decoupling unit is used to perform multiple complementary view transformations on the sperm microscopic image to be processed, generate multi-view features, and fuse the multi-view features through an adaptive feature fusion mechanism to output a decoupled domain robust shared feature map. The feature encoding and aggregation unit is used to perform multi-scale feature extraction and aggregation on the decoupled domain robust shared feature map to generate a multi-scale fused feature map. The multi-task prediction unit is used to use the prediction head component to output semantic segmentation results and / or instance-aware component segmentation results in parallel based on multi-scale fused feature maps. The instance-aware component segmentation results include at least pixel-level localization of sperm head and tail and instance association information. The topology-aware continuity processing unit is used to extract morphological skeleton features of the sperm tail region from the semantic segmentation results and / or instance-aware component segmentation results, and to perform topology optimization on the sperm tail structure based on the continuity constraint loss between the skeleton features and the real labeled skeleton to maintain tail connectivity. The execution module is used to call the single-stage segmentation network model in the model storage module to process the input image and output the final sperm morphology segmentation result.

[0009] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. It solves the problem of generalization across data domains, making it more widely applicable in clinical settings; Existing solutions, such as CLPM-Net, perform well on stained samples but cannot adapt to low-contrast unstained live images; while meta-learning methods designed for the head are difficult to extend to the complex structural segmentation of the entire sperm. There are also issues such as the inability of a single model to be effective simultaneously in both stained (morphological gold standard) and unstained (ICSI activity preservation) key clinical scenarios.

[0010] This invention employs a proposed Multi-View Structure-Appearance Decoupling (MVSA) mechanism to explicitly model and separate the data distribution differences between stained and unstained regions. This achieves dual-domain versatility with a single model. Doctors no longer need to switch between different algorithm models for different slide preparation methods; it enables gold-standard component analysis on stained samples and precise segmentation under low contrast on unstained samples, significantly reducing the deployment complexity and clinical application threshold of automated analysis systems.

[0011] 2. Significantly improves the continuity and integrity of sperm tail structure in high-density overlapping scenarios; This study addresses the issue of sperm tails exhibiting elongated, curved, and low-contrast microtubular structures. In high-density overlapping regions, existing segmentation networks are prone to tail topological breaks (false negatives) or erroneous bridging, leading to distorted measurements of morphological parameters (such as incorrect calculations of tail length and curvature), directly impacting the accuracy of pathological assessment.

[0012] This invention introduces a unique Topology-Aware Continuity Learning (TAC) strategy to explicitly supervise the priors of tail connectivity and smoothness. Unlike traditional Dice Loss, which only focuses on region overlap, the TAC strategy aims to maximize skeleton recall and specifically penalizes topological breaks. Experiments demonstrate that in high-density sperm overlap scenarios, this method can actively bridge discontinuities and maintain the integrity and topological consistency of the tail morphology, providing a reliable data foundation for subsequent accurate diagnosis of abnormal tails (such as curled tails and broken tails).

[0013] 3. A highly efficient, single-stage, multi-task unified framework has been implemented; Early methods often employed multi-stage pipelines (such as detection, segmentation, and matching), resulting in slow inference speeds and accumulated errors.

[0014] This invention proposes a single-stage segmentation network model that can perform sperm localization, head / tail component segmentation, and instance matching in parallel within a single forward propagation. This architecture is compatible with both instance-aware component segmentation and pure semantic segmentation annotation modes. Even on large-scale datasets lacking fine-grained component annotations, the model can still utilize optional branches for semantic-level learning, improving the flexibility of model training and data utilization.

[0015] 4. Enhanced the ability to perceive subtle edges and low-contrast structures; The existing technology addresses the problems of extremely low contrast in images of unstained live sperm and difficulty in distinguishing the tail end from background noise.

[0016] The local contrast enhancement view (V2) and line structure morphology view (V6) in the Multi-View Structure-Appearance Decoupling (MVSA) module of this invention are specifically designed to amplify and encode morphological features of weak pixel-level boundaries. Combined with the decoupling of illumination conditions by the Retinex view (V4), the model can effectively remove imaging noise, stably perceive fine-grained tail features that are easily submerged in conventional CNNs, and reduce the false negative rate of segmentation for low-contrast images.

[0017] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by means of embodiments of the invention. Attached Figure Description

[0018] Figure 1The flowchart is a general single-stage sperm morphology image segmentation method proposed in this invention; Figure 2 Microscopic images of sperm; Figure 3 This is a schematic diagram of the general single-stage sperm morphology image segmentation system proposed in this invention. Figure 4 This is a visual comparison chart of the segmentation results of this invention. Detailed Implementation

[0019] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0020] These and other aspects of the embodiments of the present invention will become clear from the following description and accompanying drawings. In these descriptions and drawings, some specific embodiments of the present invention are specifically disclosed to illustrate some ways of implementing the principles of the embodiments of the present invention; however, it should be understood that the scope of the embodiments of the present invention is not limited thereto.

[0021] Please see Figure 1 This embodiment provides a general single-stage sperm morphology image segmentation method, which is based on a constructed single-stage segmentation network model. This method aims to solve the problems in existing technologies that cannot simultaneously achieve fine structure segmentation of stained sperm and preservation analysis of unstained sperm activity, as well as the poor topological continuity of sperm tails in high-density overlapping scenarios.

[0022] The method includes the following steps: Step 1: Obtain sperm microscopic images to be processed. Sperm microscopic images include stained sperm images or unstained sperm images. Sperm microscopic images include stained gold standard morphological evaluation images (such as...) Figure 2 (a) and Figure 2 (as shown in (c)), and live sperm images (e.g., unstained sperm images used for clinical applications such as intracytoplasmic sperm injection (ICSI)). Figure 2 (b) and Figure 2 As shown in (d) in the figure). The stained image and the unstained image have significant domain differences in contrast, color distribution and background noise.

[0023] Step 2: Input the sperm microscopic image into the pre-built and trained single-stage segmentation network model; The single-stage segmentation network model mainly includes the following core components: Multi-View Structure-Appearance Decoupling (MVSA) module: used for preprocessing the input image and extracting domain generalization features.

[0024] Feature extraction backbone network: In this embodiment, the CSPDarknet53 network is preferred.

[0025] Feature fusion neck network: In this embodiment, a cascaded structure consisting of a feature pyramid network (FPN) and a path aggregation network (PAN) is preferably adopted.

[0026] Prediction Head Component: Contains multiple parallel branches for outputting classification, bounding boxes, part segmentation, and embedding vectors.

[0027] Topology-Aware Continuous Learning (TAC) module: used to apply post-processing constraints to the tail structure during the training and inference phases.

[0028] Step 3: Use the multi-view structure-appearance decoupling module to perform multiple complementary view transformations on the input sperm microscopic image to generate multi-view features, and fuse the multi-view features through an adaptive feature fusion mechanism to output the decoupled domain robust shared feature map. To address the issue of significant differences in appearance between stained and unstained domains despite their identical structural nature, this invention introduces a multi-view structure-appearance decoupling mechanism to explicitly separate domain-related appearance information from domain-invariant structural information.

[0029] Specifically, six complementary view transformations are first performed on the input image to generate multi-view features. Combined with the "Multi-view Structure-Appearance Learning" branch, this step includes: Global contrast normalization transformation (V1): used to capture macroscopic appearance attributes and normalize the intensity distribution.

[0030] Local Contrast Enhancement Transform (V2): Used to enhance the pixel-level boundary between sperm components and the background, magnifying fine-grained structural details.

[0031] Original Input Image View (V3): Preserves the original image information to prevent information loss during the transformation process.

[0032] Retinex Image Enhancement Transformation (V4): Used for explicit separation of staining conditions and underlying biological morphology.

[0033] Color Enhancement Transform (V5): Used to capture macroscopic appearance attributes related to color features.

[0034] Linear structure morphological transformation (V6): Models the tail topology through pooling approximation morphological operations, enhancing the structural representation of connectivity and smoothness.

[0035] After obtaining the above six views, an adaptive feature fusion mechanism is executed: First, the feature maps after transformation of each view are independently convolutionally encoded to obtain the encoded multi-view features. The corresponding process has the following relationship: ; in, This represents the encoded multi-view features. This represents the i-th input view. This represents a 3×3 convolutional layer. Indicates the view index (0~5); Secondly, the encoded multi-view features are concatenated along the channel dimension to obtain the concatenated features. The corresponding process has the following relationship: ; in, Indicates splicing characteristics, This indicates a concatenation operation along the channel dimension. These represent the feature maps of each view after 3×3 convolutional encoding; Next, a spatial attention weight map corresponding to each view is generated through a 7×7 convolutional layer and a sigmoid activation function. The corresponding process has the following relationship: ; in, Represents the spatial attention weight map. This represents the Sigmoid activation function. This represents a 7×7 convolutional layer; Finally, based on the spatial attention weights, the encoded features of each view are summed element-wise, and then channel integration is completed through convolution to obtain the decoupled domain robust shared feature map. The corresponding process has the following relationship: ; ; in, This indicates element-wise multiplication. This represents the spatial attention weights of each branch. Indicates fusion characteristics, This represents the robust shared feature map of the decoupled domains. This represents a 1×1 convolutional layer.

[0036] Step 4: Use the feature extraction backbone network and the feature fusion neck network to perform multi-scale feature extraction and aggregation on the shared feature map to generate a multi-scale fused feature map; The decoupled domain robust shared feature maps are fed into the CSPDarknet53 backbone network for downsampling encoding to extract deep semantic information and obtain multi-layer feature maps. The corresponding process has the following relationship: ; in, This indicates the CSPDarknet53 backbone network. These represent feature maps at different multiples (e.g., 8×, 16×, 32×).

[0037] Subsequently, multi-scale feature aggregation is performed from top to bottom and bottom to top through a feature fusion neck network. This neck network is composed of a feature pyramid network (FPN) and a path aggregation network (PAN) connected in series to generate a multi-scale fused feature map. The corresponding process has the following relationship: ; in, These represent fused feature maps at different magnifications, i.e., multi-scale fused feature maps; Representation of feature pyramid network, Represents a path aggregation network; This multi-scale fusion feature map combines high-level semantic perception capabilities with low-level spatial detail localization capabilities.

[0038] Step 5: Utilize the prediction head component to output semantic segmentation results and / or instance-aware component segmentation results in parallel based on multi-scale fusion feature maps. The instance-aware component segmentation results shall at least include pixel-level localization of the sperm head and tail and instance association information. This method supports two parallel clinical analysis modes: Mode 1: Instance-aware component segmentation. In this mode, the prediction head component outputs four types of information in parallel based on multi-scale fused feature maps: Classification header output: , This represents the binary probability of sperm head / tail. Indicates the category header, Represents a multi-scale fused feature map; Bounding box header output: , Indicates the bounding box regression parameters. Indicates the bounding box header; Component splitter output: , Represents the pixel-level component segmentation coefficient (head, tail, etc.). Indicates the component splitter head; Instance embedding header output: , This represents the instance embedding vector for each pixel. Indicates the instance embedding header.

[0039] Subsequently, the non-maximum suppression (NMS) algorithm was used to refine the predicted bounding boxes. and their corresponding classification confidence levels The top k best detection results are selected through a screening process. ; in, This represents the nonmaximum suppression algorithm. They represent the first j The bounding box parameters, component segmentation coefficients, instance embedding vectors, and classification probabilities of each predicted box; These represent the numbers retained after NMS filtering. j The bounding box parameters, component segmentation coefficients, and instance embedding vectors corresponding to the optimal prediction boxes; Indicates the total number of items to be filtered; This enables instance-level head-to-tail association and component parsing in high-density overlapping scenarios.

[0040] Mode 2: Pure Semantic Segmentation. When the input data contains only pure semantic segmentation labels (e.g., only labeling the foreground sperm region without distinguishing between head and tail components), the instance-related branch weights in the head component prediction are bypassed or frozen. The model only utilizes multi-branch features to output high-level semantic segmentation information, outputting pixel-level binary (or class) probability maps. ; in, Represents a pixel-level binary (or class) probability map. This represents the global semantic segmentation prediction head, used to map multi-scale fused feature maps to the final segmentation probability map; This ensures compatibility with regular datasets that do not include component annotations.

[0041] Step 6: Use the topology-aware continuity learning module to extract the morphological skeleton features of the sperm tail region in the segmentation results, and perform topology optimization on the sperm tail structure based on the continuity constraint loss between the skeleton features and the real labeled skeleton to maintain tail connectivity. To address the issue that sperm tails are prone to breakage due to their thinness and curvature in the segmentation results generated in step 5, this method introduces a topology-aware continuity learning strategy for explicit constraints.

[0042] First, the sperm tail region is separated from the prediction results. To obtain the structural constraint target, the classic Zhang-Suen parallel thinning algorithm is used to iteratively peel off the boundary pixels of the tail region in the real labeled mask, extracting a hard skeleton with a single pixel width that preserves the original topology. To make this discrete skeleton usable for a differentiable loss function, the hard skeleton is transformed into a soft morphological skeleton through Gaussian kernel convolution, with a value range of [0,1].

[0043] For the prediction probability map, its continuous probability values ​​can be used directly as the prediction soft skeleton without explicit skeletonization.

[0044] A continuity loss function based on maximizing skeleton recall is constructed. Given the extreme sensitivity of sperm tails to false negatives (fragmentation), the continuity loss function is defined as follows: ; in, This represents the value of the actual annotated soft morphological skeleton at pixel j. This represents the value of the predicted probability map at pixel j. It is a constant. This represents the continuous loss function.

[0045] This loss function actively bridges tail topological breaks in the prediction results by penalizing the deviation between the predicted skeleton and the real skeleton, thereby maintaining tail connectivity.

[0046] Step 7: Output the final sperm morphology segmentation image.

[0047] Example 2 This embodiment provides a detailed explanation of the training process of the single-stage segmentation network model described above.

[0048] The overall training objective loss function of the network is composed of a weighted sum of the basic segmentation loss and the continuity constraint loss, and the corresponding relationship is as follows: ; in, Indicates the basic segmentation loss. This represents the overall training objective loss function. This represents the loss due to continuity constraints. This represents the preset balance hyperparameters used to adjust the strength of topological constraints; For instance-aware component segmentation tasks, the basic segmentation loss is further refined into a weighted sum of the losses of each branch, with the corresponding relationship as follows: ; in, This represents the binary cross-entropy (BCE) loss used for head and tail classification; This indicates that the complete intersection over union (CIoU) loss and the distributed focus loss are used for bounding box localization. This indicates pixel-level component segmentation combining BCE and Dice loss; This indicates that contrastive learning is used for embedding learning, which enables the clustering of features from the same sperm and the separation of features from different instances. These represent the weights corresponding to different loss functions; This indicates that Dice and BCE losses are used to achieve instance-level segmentation on the global region. For semantic segmentation tasks without component parsing labels, Degenerate into This is used to supervise foreground pixel classification and region overlap. (It should be noted that...) , , , The calculation is performed between the outputs of the four prediction heads and their corresponding labels. The calculation is performed directly between the final prediction result and the actual annotation. Example 3 Please refer to Figure 3 This embodiment provides a general single-stage sperm morphology image segmentation system, wherein the system applies the general single-stage sperm morphology image segmentation method described above, and the system includes: The image acquisition module is used to acquire stained or unstained sperm microscopic images to be processed, including stained sperm images or unstained sperm images; The model storage module stores pre-trained single-stage segmentation network models, which include: The multi-view structure-appearance decoupling unit is used to perform multiple complementary view transformations on the sperm microscopic image to be processed, generate multi-view features, and fuse the multi-view features through an adaptive feature fusion mechanism to output a decoupled domain robust shared feature map. The feature encoding and aggregation unit is used to perform multi-scale feature extraction and aggregation on the decoupled domain robust shared feature map to generate a multi-scale fused feature map. The multi-task prediction unit is used to use the prediction head component to output semantic segmentation results and / or instance-aware component segmentation results in parallel based on multi-scale fused feature maps. The instance-aware component segmentation results include at least pixel-level localization of sperm head and tail and instance association information. The topology-aware continuity processing unit is used to extract morphological skeleton features of the sperm tail region from the semantic segmentation results and / or instance-aware component segmentation results, and to perform topology optimization on the sperm tail structure based on the continuity constraint loss between the skeleton features and the real labeled skeleton to maintain tail connectivity. The execution module is used to call the single-stage segmentation network model in the model storage module to process the input image and output the final sperm morphology segmentation result.

[0049] To verify the feasibility of this invention and its superiority over the prior art, the following experimental verification was conducted; All experiments were performed using PyTorch on an NVIDIA GeForce RTX 4090. The models were optimized using stochastic gradient descent (SGD) with an initial learning rate of 0.01. To ensure fair comparison, all comparison methods were trained to convergence at their default settings, i.e., until the loss or validation accuracy no longer showed significant changes. The same data augmentation strategy was consistently applied to all methods. Furthermore, two publicly available datasets were used: Spermparsing and SegSperm. Spermparsing provides stained images at a resolution of 1280×1024, containing 512 training samples and 128 test samples, and provides instance-level part annotations (vacuole, acrosome, nucleus, midpiece, tail), which can be used for instance-aware part segmentation. SegSperm contains unstained images at a resolution of 512×512, divided into 432 training samples and 119 test samples. This dataset has low image contrast and only provides foreground annotations, therefore it is only suitable for semantic segmentation.

[0050] Quantitative vs. Qualitative Comparison; This invention was evaluated against competing methods on the stained Spermparsing and unstained SegSperm datasets, focusing on its domain adaptability and tail connectivity preservation capabilities. Based on instance-level component annotations, on the stained Spermparsing dataset, we compared its component segmentation and semantic segmentation performance with a dedicated sperm component segmentation method (CLPM-Net) and a general instance segmentation method. Component segmentation was performed using the component-based average precision (IoU threshold of 0.5, denoted as ). ), weighted average component accuracy ( ) and the correct segmentation rate of components at an IoU threshold of 0.5 ( The quantitative evaluation was performed; the overall semantic segmentation was evaluated using the mean Intersection over Union (mIoU), pixel-level Intersection over Union, centerline Dice coefficient (clDice), and Dice coefficient. As shown in Table 1, the present invention achieves excellent performance in both component segmentation and semantic segmentation tasks, consistently outperforming all baseline methods, including CLPM-Net. Notably, the tail matching accuracy PCP50 of the present invention reaches 0.835, an improvement of 0.816 compared to CLPM-Net, verifying the effectiveness of the proposed topology-aware continuity learning strategy in reducing tail breaks and erroneous connections. clDice is a metric specifically used to evaluate structural connectivity, which further demonstrates that the present invention best maintains the continuity of the sperm tail. Figure 4 Visual comparison of segmentation results. The first two columns show the component segmentation results on stained data (red for vacuoles, green for acrosomes, blue for nuclei, yellow for midsections, and magenta for tails); the last two columns show the semantic segmentation results on unstained data (red for boundaries, green for sperm). Figure 4 The visualization comparison results in columns 1 and 2 further confirm the above advantages, with the red arrows indicating a significant improvement in the segmentation effect of the tail folded area.

[0051] Table 1. Quantitative comparison of instance-aware part segmentation and semantic segmentation on the colored Spermparsing dataset. Best results are highlighted in bold.

[0052]

[0053] In the table, “–” indicates that the method has no corresponding metric on the stained dataset, and “↑” indicates that the larger the metric value, the better the segmentation performance.

[0054] For the semantic segmentation task on the unstained SegSperm dataset, the performance of this invention was compared with existing sperm semantic segmentation methods (IUHS, SFCNet) and mainstream general semantic segmentation methods in sperm morphology annotation. As shown in Table 2, this invention achieved the best results, with IoU, clDice and Dice reaching 0.632, 0.829 and 0.769 respectively, which are significantly better than SA-UNet (IoU: 0.600, clDice: 0.793, Dice: 0.744). Figure 4The visualization results in columns three and four demonstrate that the present invention performs satisfactorily in preserving tail connectivity (indicated by white arrows). More importantly, unlike competing methods that can only handle either stained or unstained regions, the present invention can perform part segmentation on stained images and achieve superior performance on unstained live samples. This versatility, granted by the multi-view structure-appearance decoupling mechanism, makes the present invention more advantageous in clinical analysis.

[0055] Table 2. Quantitative results of semantic segmentation on the uncolored SegSperm dataset.

[0056]

[0057] Ablation Experiments: To further verify the contributions of each component module in this invention, a systematic ablation experiment was also conducted in this embodiment. All variant models were trained and evaluated under the same settings, and the quantitative results are summarized in Table 3. First, by removing all the proposed strategies from this invention, component segmentation was performed on the Spermparsing dataset and semantic segmentation was performed on the SegSperm dataset, respectively, to build a baseline model. Subsequently, the following two core innovations were gradually introduced: (1) a multi-view structure-appearance decoupling mechanism, which adaptively decouples structure and appearance features through multiple complementary views to promote general segmentation; (2) a topology-aware continuity learning strategy, which is used to constrain topological continuity and maintain tail connectivity. Numerical results show that each component can bring stable performance improvements on both stained and unstained datasets. Overall, the complete invention verifies the effectiveness of its core innovations and shows that the synergy between these modules can significantly enhance the overall capability of the general segmentation framework.

[0058] Table 3. Ablation experiments on the Spermparsing and SegSperm datasets.

[0059]

[0060] In summary, this invention proposes a general single-stage sperm morphology image segmentation method and system. By introducing a multi-view structure-appearance decoupling mechanism and a topology-aware continuity learning strategy, this invention effectively alleviates the domain sensitivity and fine-grained structural fragmentation problems of existing methods. Extensive experimental results demonstrate the superiority of this invention: achieving an IoU of 0.727 on unstained data, and on stained data, the component segmentation index... = 0.690、 =0.835, also achieving a leading result. These results demonstrate that the present invention can achieve accurate segmentation that preserves microstructure in instance-aware component segmentation and semantic segmentation tasks, remaining robust even in high-density samples. In summary, the present invention provides an end-to-end solution that can simultaneously support automated morphological analysis of both dead and live sperm, significantly enhancing the practical application value of sperm morphology analysis in clinical practice.

[0061] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A general single-stage sperm morphology image segmentation method, characterized in that, The method includes the following steps: Obtain sperm microscopic images to be processed, including stained sperm images or unstained sperm images; The sperm microscopic images to be processed are input into a pre-built and trained single-stage segmentation network model; the single-stage segmentation network model includes a multi-view structure-appearance decoupling module, a feature extraction backbone network, a feature fusion neck network, a prediction head component, and a topology-aware continuity learning module; The multi-view structure-appearance decoupling module performs various complementary view transformations on the sperm microscopic image to be processed, generates multi-view features, and fuses the multi-view features through an adaptive feature fusion mechanism to output a decoupled domain robust shared feature map. A feature extraction backbone network and a feature fusion neck network are used to perform multi-scale feature extraction and aggregation on the shared feature map to generate a multi-scale fused feature map. The prediction head component is used to output semantic segmentation results and / or instance-aware part segmentation results in parallel based on multi-scale fused feature maps. The topology-aware continuity learning module is used to extract morphological skeleton features of the sperm tail region from semantic segmentation results and / or instance-aware component segmentation results. Based on the continuity constraint loss between the skeleton features and the real labeled skeleton, the topology of the sperm tail structure is optimized to maintain tail connectivity. Output the final sperm morphology segmentation image.

2. The general single-stage sperm morphology image segmentation method according to claim 1, characterized in that, The multi-view structure-appearance decoupling module is used to perform various complementary view transformations, including: The input image is subjected to global contrast normalization transformation, local contrast enhancement transformation, color enhancement transformation, Retinex image enhancement transformation, and line structure morphology transformation, and the original input image is treated as an independent view, generating a total of six view representations.

3. The general single-stage sperm morphology image segmentation method according to claim 2, characterized in that, Multi-view features are fused using an adaptive feature fusion mechanism to output a decoupled domain robust shared feature map, as detailed in the following steps: The feature maps after transformation of each view are independently convolutionally encoded to obtain the encoded multi-view features. The corresponding process has the following relationship: ; in, This represents the encoded multi-view features. This represents the i-th input view. This represents a 3×3 convolutional layer. Indicates the view index; The encoded multi-view features are concatenated along the channel dimension to obtain the concatenated features. The corresponding process has the following relationship: ; in, Indicates splicing characteristics, This indicates a concatenation operation along the channel dimension. These represent the feature maps of each view after 3×3 convolutional encoding; The spatial attention weight map corresponding to each view is generated through convolution operations and activation functions. The corresponding process has the following relationship: ; in, Represents the spatial attention weight map. This represents the Sigmoid activation function. This represents a 7×7 convolutional layer; Based on spatial attention weights, the encoded features of each view are summed element-wise, and then channel integration is performed through convolution to obtain a decoupled domain robust shared feature map. The corresponding process has the following relationship: ; ; in, This indicates element-wise multiplication. This represents the spatial attention weights of each branch. Indicates fusion features, This represents the robust shared feature map of the decoupled domains. This represents a 1×1 convolutional layer.

4. The general single-stage sperm morphology image segmentation method according to claim 2, characterized in that, The single-stage segmentation network model supports processing data with component parsing annotations and data with only pure semantic segmentation annotations simultaneously. When the input data contains only pure semantic segmentation labels, the instance-related branch weights in the prediction head component are bypassed or frozen, and only multi-scale high-level semantic segmentation information is output.

5. The general single-stage sperm morphology image segmentation method according to claim 2, characterized in that, Morphological skeleton features of the sperm tail region are extracted using a topology-aware continuity learning module. Based on the continuity constraint loss between the skeleton features and the ground truth labeled skeleton, topology optimization of the sperm tail structure is performed. The specific steps include the following: Based on the sperm tail prediction probability map in the semantic segmentation results and / or instance-aware component segmentation results, soft morphological skeleton features are extracted. The morphological skeleton of the sperm tail in the real labeled mask is calculated as the constraint target; Based on the constrained objective, a continuity loss function is constructed that maximizes skeleton recall to penalize topological breaks and discontinuities in the predicted skeleton. The continuity loss function is defined as follows: ; in, This represents the value of the actual labeled skeleton at pixel j. This represents the value of the predicted probability map at pixel j. It is a constant. This represents the continuous loss function.

6. The general single-stage sperm morphology image segmentation method according to claim 5, characterized in that, The overall training objective loss function of a single-stage segmentation network model is composed of a weighted sum of the basic segmentation loss and the continuity constraint loss, and the corresponding relationship is as follows: ; in, Indicates the basic segmentation loss. This represents the overall training objective loss function. This represents the loss due to continuity constraints. This represents the preset balance hyperparameters used to adjust the strength of topological constraints.

7. The general single-stage sperm morphology image segmentation method according to claim 6, characterized in that, For instance-aware part segmentation tasks, the basic segmentation loss is a weighted sum of classification loss, bounding box regression loss, pixel-level part segmentation loss, instance embedding matching loss, and global instance segmentation loss, with the following corresponding formula: ; in, This represents the binary cross-entropy loss used for head and tail classification; This indicates that the complete intersection-union loss and the distributed focus loss are used for bounding box localization; This indicates pixel-level component segmentation combining BCE and Dice loss; This indicates that contrastive learning is used for embedding learning, which enables the clustering of features from the same sperm and the separation of features from different instances. These represent the weights corresponding to different loss functions; This indicates that instance-level segmentation is achieved on the global region using Dice and BCE losses.

8. The general single-stage sperm morphology image segmentation method according to claim 7, characterized in that, For pure semantic segmentation tasks, the basic segmentation loss degenerates into a global semantic segmentation loss that only includes foreground pixel classification and region overlap constraints.

9. The general single-stage sperm morphology image segmentation method according to claim 8, characterized in that, The feature extraction backbone network is the CSPDarknet53 network, and the feature fusion neck network is composed of a cascaded feature pyramid network and a path aggregation network.

10. A universal single-stage sperm morphology image segmentation system, characterized in that, The system employs the general single-stage sperm morphology image segmentation method as described in any one of claims 1 to 9, and the system comprises: The image acquisition module is used to acquire stained or unstained sperm microscopic images to be processed, including stained sperm images or unstained sperm images; The model storage module stores pre-trained single-stage segmentation network models, which include: The multi-view structure-appearance decoupling unit is used to perform multiple complementary view transformations on the sperm microscopic image to be processed, generate multi-view features, and fuse the multi-view features through an adaptive feature fusion mechanism to output a decoupled domain robust shared feature map. The feature encoding and aggregation unit is used to perform multi-scale feature extraction and aggregation on the decoupled domain robust shared feature map to generate a multi-scale fused feature map. The multi-task prediction unit is used to utilize the prediction head component to output semantic segmentation results and / or instance-aware part segmentation results in parallel based on multi-scale fused feature maps. The topology-aware continuity processing unit is used to extract morphological skeleton features of the sperm tail region from the semantic segmentation results and / or instance-aware component segmentation results, and to perform topology optimization on the sperm tail structure based on the continuity constraint loss between the skeleton features and the real labeled skeleton to maintain tail connectivity. The execution module is used to call the single-stage segmentation network model in the model storage module to process the input image and output the final sperm morphology segmentation result.