Sperm quality evaluation and screening judgment method and system based on parameter set fusion and trajectory reliability

By using an improved RT-DETR detection model and Kalman filtering technology, the problems of small target detection and cross-frame correlation under microscopic conditions were solved, achieving robust multi-dimensional information fusion and improved evaluation stability.

CN121998929APending Publication Date: 2026-05-08EAST CHINA JIAOTONG UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
EAST CHINA JIAOTONG UNIVERSITY
Filing Date
2026-01-20
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing technologies lack robust detection of small targets under complex microscopic conditions and reliable cross-frame correlation. The coupling between multidimensional information and reliable trajectory measurement is insufficient, and the time window weighting and dual threshold determination are imperfect, resulting in insufficient evaluation stability and consistency.

Method used

An improved detection model based on RT-DETR is used for small target detection. Feature fusion is performed by convolution simulating self-attention units and multi-scale linear attention mechanism. Kalman filtering is combined to perform cross-frame trajectory association, calculate trajectory reliability, and perform weighted average scoring within the time window.

Benefits of technology

Robust detection and reliable cross-frame correlation of small targets under complex microscopic conditions are achieved, multi-dimensional information quantization coupling is improved, time window weighting and dual threshold determination are perfected, and the stability and consistency of the evaluation are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121998929A_ABST
    Figure CN121998929A_ABST
Patent Text Reader

Abstract

The invention discloses a sperm quality evaluation and screening judgment method and system based on parameter set fusion and trajectory reliability, and belongs to the technical field of medical image processing and computer vision crossing. In order to solve the problems of unstable detection result, frequent cross-frame identity switching, single index dimension and the like in a microscopic video complex scene, the system comprises a track reliability evaluation module, a parameter set fusion scoring module and the like, space and time calibration is performed on a microscopic video, an improved RT-DETR model containing ESC convolution, MSLA attention, SNI semantic injection and GSConvE fusion is constructed, and a real-time detection result is obtained. High-precision detection of a small target is realized; combining Kalman prediction, statistical gating and Hungary matching to generate a trajectory, and calculating trajectory reliability; kinematics and geometric parameters are extracted according to physical coordinates and normalized and fused to obtain a comprehensive quality score, and screening judgment is completed under time window weighting and reliability gating; according to the method, missing detection and identity switching are reduced in a complex scene, detection robustness and track continuity are improved, and result judgment is more stable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the interdisciplinary field of medical image processing and computer vision, and in particular to a method and system for sperm quality evaluation and screening based on parameter set fusion and trajectory reliability. Background Technology

[0002] Objective assessment of sperm quality is crucial for the successful diagnosis of male infertility and the application of assisted reproductive technologies. Traditional manual interpretation is heavily influenced by subjective experience, resulting in poor repeatability and limited consistency. While existing computer-assisted semen analysis (CASA) can automate the process, complex microscopic conditions still present challenges such as high density and occlusion leading to unstable detection and tracking, as well as identity switching, thus affecting the reliability of statistical results. Current evaluations largely rely on static averaging of a few velocity-related indicators, making it difficult to effectively integrate with morphological, textural, and pose information, resulting in a limited assessment dimension. Insufficient consideration is given to trajectory reliability and weighting and dual-threshold determination at the time window level, making the results susceptible to transient noise and requiring improved stability.

[0003] Chinese patent CN120374622A discloses a sperm quality assessment method and system based on multimodal fusion. It uses multi-source indicators such as spatiotemporal alignment, trajectory linearity, heatmaps, abnormal time windows, and deformity rate for grade assessment, applicable to the comprehensive interpretation of conventional microscopic videos. Although it expands the indicator dimensions, the feasibility and robustness of the cross-frame association process are insufficient. Under conditions of high density, occlusion, or short-term mismatch, identity switching and temporal fluctuations are prone to occur. The lack of quantitative coupling between trajectory quality and scoring makes it highly sensitive to short tracks, mismatches, and transient noise. The weighting of the time window scale and the dual-threshold decision-making are insufficient, limiting the stability of the judgment output.

[0004] Chinese patent CN112036384B proposes a method, device, and equipment for sperm head morphology recognition. It employs a one-stage detector, such as YOLOv3, to locate the head region and combines it with traditional image processing for morphological discrimination, making it suitable for static morphological evaluation. However, this method focuses on single-frame recognition and lacks end-to-end detection and cross-frame correlation of microscopic video, resulting in insufficient robustness in handling small-target, multi-scale scenes. The evaluation dimensions of this scheme are mainly concentrated on the geometric shape of the head, lacking joint modeling of kinematic quantities related to motility, making it difficult to reflect functional differences. The two-stage process from bounding box to mask is sensitive to illumination, contrast, and background in microscopic imaging, and thresholding and morphological operations are prone to introducing missegmentation and index bias.

[0005] In summary, existing technologies lack robust detection of small targets and reliable cross-frame correlation under complex microscopic conditions. The quantitative coupling of multidimensional information and trajectory reliability is insufficient, and the time window weighting and dual-threshold determination are also imperfect. This results in assessments that are sensitive to instantaneous noise and identity switching, and exhibit insufficient stability and consistency. Therefore, it is necessary to propose an evaluation method and system that considers detection, correlation, and multi-source fusion. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings of the prior art and to address the problems of unstable detection and tracking under microscopic imaging conditions, inconsistent units and scales, and single evaluation methods. This invention proposes a sperm quality evaluation and screening method and system based on parameter set fusion and trajectory reliability.

[0007] The objective of this invention is achieved through the following technical solution: a method and system for sperm quality evaluation and screening based on parameter set fusion and trajectory reliability, comprising the following steps: S1. Acquire microscopic imaging video data, complete the physical calibration of spatial and temporal scales, and establish a time index based on the starting frame. S2. Construct an improved detection model based on RT-DETR, set up convolutional simulation self-attention units in the backbone network stage, adopt a multi-scale linear attention mechanism in the feature interaction stage, perform semantic injection in the hybrid encoding stage, and use hybrid convolutional units for feature fusion. S3. Load the trained detection model, detect each frame of image, and output the sperm target set, its position parameters, and confidence level; S4. Perform cross-frame association on the detection results of multiple consecutive frames according to the time index, generate motion trajectory, assign a unique trajectory identifier, and calculate and maintain trajectory reliability based on trajectory matching stability and detection confidence. S5. Based on the trajectory information and physical calibration parameters, convert the pixel coordinates of the trajectory points and the frame time into physical units, calculate the kinematic parameters accordingly, and extract the target area with the position of the sperm target in the corresponding frame as the center, and extract the geometric shape parameters of the target area. S6. Summarize the kinematic parameters and geometric parameters according to the unique trajectory identifier and time index to form a parameter set, normalize the parameter set, and generate a comprehensive quality score through feature fusion algorithm; S7. When the reliability of the trajectory is not lower than a preset threshold, calculate the time-weighted average of the comprehensive quality score within a preset time window. When the weighted average is not lower than the preset score threshold, output the corresponding sperm screening result.

[0008] Preferably, the physical calibration parameters in step S1 include spatial scale and temporal scale. The spatial scale is used to establish a quantitative mapping relationship between the image pixel domain and the physical spatial domain, respectively. and This represents the actual physical length corresponding to a unit pixel length in the horizontal and vertical directions; the time scale is the inter-frame time interval. Based on the video start frame time Establish a time index based on the baseline, for the first A frame is assigned a unique time value. .

[0009] Preferably, the improved model in step S2 includes the following structural features: the convolutional simulated self-attention unit is set in the backbone network stage; large kernel depth separable convolutions and dynamic convolutions are set in parallel within the residual framework; relative position bias is introduced in the local window multi-head attention; and features consistent with the original level are output after pointwise convolution aggregation; the multi-scale linear attention mechanism is set in the feature interaction stage; cross-scale information interaction and scale alignment are achieved in the encoding layer through multi-scale key mapping and value mapping combined with kernelized linear attention to obtain semantically consistent feature encoding; the hybrid encoding stage performs semantic injection to supplement high-level semantic information to low-level detailed features; and hybrid convolutional units are used in the downsampling process to complete feature fusion, mixing and alignment, and output P3, P4, and P5 multi-scale features to the decoder.

[0010] Preferably, step S3 includes two steps: pre-training and frame-by-frame detection. The microscopic imaging video data obtained in step S1 is sliced ​​frame by frame to construct a training dataset, and supervised training is conducted to obtain the detection model parameters. After training, the optimal weights are loaded, and the video sequence is detected frame by frame. The frame image is input into the detection model to obtain the frame detection set. The position parameters The confidence level represents the center coordinates of the bounding box and its width and height. Assign a confidence score to the target sperm category; and set the set With the time index of this frame After establishing a one-to-one correspondence, store the data. Preferably, the cross-frame association and trajectory generation step of the continuous multi-frame detection results in step S4 includes: initializing the detection result of the first frame as a temporary trajectory and assigning a unique identifier; starting from the next frame, generating a trajectory in the active state at frame-by-frame time intervals. Perform Kalman prediction and map it to the observation domain to obtain:

[0011] ; in, For predictive observation, For the observation matrix, The prior state vector, To innovate covariance, The prior covariance matrix, To measure the noise covariance; by Calculate Mahalanobis distance: ; in, The Mahalanobis distance, For the current frame, detection observations are performed; Implement statistical gating, when The time is used as a candidate pairing; a comprehensive cost function is constructed based on geometric overlap and center offset for the candidate pairing, and the Hungarian algorithm is used for one-to-one optimal allocation; the matched trajectory is updated and trajectory points are added, the unmatched trajectory is detected and initialized as a new trajectory, and the unmatched trajectory is accumulated and lost after a preset termination time. The temporary trajectory will terminate when the preset confirmation time is reached after continuous matching. It then transitions to a confirmed status and is permanently assigned a unique identifier (ID). The calculation and maintenance steps for trajectory reliability include calculating trajectory reliability after each update. This reliability is determined by a weighted average of matching stability, detection stability, and prediction consistency; when The trajectory expansion is paused when it remains below the threshold for a preset duration. The calculation is terminated at that time, and trajectories with a reliability not lower than the threshold continue to participate in subsequent physical conversion and quality scoring calculations. in, For the cardinality threshold, This is the minimum reliability threshold.

[0012] Preferably, the kinematic parameters described in step S5 are used to quantify velocity, sway, and rhythm, and include at least one of the velocity parameters, namely linear velocity and average path velocity; the sway parameters, namely the lateral head displacement amplitude; and the rhythm parameters, namely the cross frequency and the direction retention. Within each time window, linear velocity or average path velocity is adaptively selected based on the trajectory linearity index and the direction retention, and the cross frequency or direction retention is adaptively selected in combination with the sampling rate and window duration conditions. The target area is based on the first The bounding boxes detected in the frame are expanded outward according to a preset ratio to generate the target region. This is used to cover the sperm head and part of the midsection region, and establishes a correspondence with the frame's time index and trajectory markers; for After rotational and scale normalization, the results are used for subsequent geometric feature calculations. Gray-level normalization, illumination correction, background suppression, and denoising are also performed to eliminate the influence of differences in microscopic imaging conditions on the results. The geometric parameters are based on the The calculation of the head mask obtained from image segmentation includes at least the area. Aspect Ratio Main direction angle Solidity ,in The area of ​​the convex hull of the mask. The dimensions were obtained by performing second-order moment analysis on the mask and then normalizing the internal scale of the dimensional parameters according to the head length.

[0013] Preferably, the parameter set described in step S6 uses a trajectory identifier ID and a time window. The feature vector within this window is formed using the index key. The feature vector includes kinematic parameters such as linear velocity or average path velocity, lateral head displacement amplitude, crossover frequency or orientation retention, and geometric parameters such as area. Aspect Ratio Main direction angle Solidity It is also associated with the time index and trajectory identifier ID for subsequent fusion and scoring calculation; For dimensional parameters, internal scale normalization is performed based on head length, and other components are normalized to a uniform scale. For indicators that are too small or too large, a bandpass function score is used to reduce the impact of extreme values ​​on the overall score. The normalized kinematic and geometric components are then merged into the kinematic sub-score. With geometric sub-score The base score for that time window is obtained by linearly weighting the scores according to preset non-negative weights.

[0014] ; The comprehensive quality score incorporates trajectory reliability. The baseline score is modulated to obtain the overall quality score for that time window:

[0015] ; in, Based on the score, As weight, For trajectory reliability, The modulation index, This is used as input for subsequent time-weighted and threshold determination; Preferably, the method for calculating the time-weighted average in step S7 is as follows: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] preset time window Inside, divide the window into Record adjacent time slices First, calculate the window reliability weighted average:

[0016] ; when At that time, calculate the overall quality weighted average of the window:

[0017] ;

[0018] when If the selection is successful, output the result; otherwise, output the result of failure. Simultaneously, output the trajectory marker and time window of the corresponding sperm target. The evaluation results; in, For time slice index, The duration of a time slice, For the reliability of the time slice trajectory, As the reliability threshold, A comprehensive quality score for the time slice; As time weight, The weighted average of the overall quality of the window, This is the overall quality threshold.

[0019] Preferably, a system for sperm quality evaluation and screening based on parameter set fusion and trajectory reliability includes: a data access and calibration module for accessing acquired microscopic imaging videos and frame time information, completing physical calibration of spatial and temporal scales, and establishing a time index; a model management and inference module for constructing, training, loading, and running a detection model, outputting target location information and confidence level, and associating it with the time index; a cross-frame association management module for generating motion trajectories across frames and assigning unique identifiers, calculating and maintaining trajectory reliability; a target region processing module for generating target regions based on detection bounding boxes and performing rotation normalization and imaging condition correction for subsequent feature extraction; a parameter calculation and summarization module for performing physical unit conversion, extracting motion and geometric parameters, summarizing them into a parameter set, and performing normalization processing; a scoring module for performing feature fusion on the parameter set to generate a comprehensive quality score; a time-weighted evaluation and screening module for performing time-weighted evaluation within a preset time window and outputting screening results according to reliability and scoring thresholds; and a result output module for recording and displaying screening results and providing an external data interface.

[0020] The beneficial effects of this invention are as follows: The robust detection of small targets under complex microscopic conditions and reliable cross-frame correlation are significantly improved. The quantitative coupling of multidimensional information and trajectory reliability is sufficient. The time window weighting and dual threshold judgment are perfected, making the evaluation sensitive to instantaneous noise and identity switching, with strong stability and consistency. Attached Figure Description

[0021] Figure 1 This is a schematic diagram of the process of the present invention; Figure 2 This is a schematic diagram of the network architecture of the improved RT-DETR detection model proposed in this invention; Figure 3 This is a schematic diagram of the system structure of the present invention. Detailed Implementation

[0022] The present invention will be further described below with reference to the accompanying drawings. The scope of protection of the present invention is not limited to the following description: like Figures 1 to 2 As shown, a sperm quality evaluation and screening method based on parameter set fusion and trajectory reliability includes the following steps: S1: To achieve accurate mapping from the image pixel domain to real physical space, physical calibration of the spatial and temporal scales is performed, and a time index is established. The steps are as follows: Under the same optical magnification and imaging parameters as the microscopic video to be analyzed, images of a standard micrometer scale are acquired. The known physical lengths on the micrometer scale in the horizontal and vertical directions are denoted as follows: The corresponding pixel spans in the image are respectively and Based on this, the spatial scale is obtained: ; in, Horizontal / vertical spatial scale, For physical reference length, The span is in pixels.

[0023] Let the pixel coordinates be The reference origin is The mapping from pixel to physical coordinates is as follows: ; The time scale is determined by the video's frame rate. It is determined that the time interval between adjacent frames is: ; For the Frame image, starting frame time Establish a time index for the baseline: ; Will The relevant imaging parameters are recorded together and used as a unified physical and temporal reference for subsequent calculations of displacement, velocity, frequency and comprehensive quality score.

[0024] S2: To achieve efficient sperm target detection in scenarios with small targets, low contrast, and dense occlusion, a collaboratively optimized RT-DETR detection model was constructed. The overall process is as follows: Backbone extracts hierarchical features An improved ESC (convolution-simulated self-attention efficient unit) is embedded within the residual framework. This unit employs a three-branch parallel structure and uses... Pointwise convolutional aggregation is added to the input residual; large kernel depth allows for the separation of convolutional branches, expanding the receptive field to capture wide-area context and enhance anisotropic edges; dynamic convolutional branches adaptively generate convolutional kernels / channel weights based on the input to adapt to shape and pose changes; local window multi-head attention branches... A relative positional bias is introduced within the window to enhance the perception of geometric relationships and fine structures. The above parallel design approximates the core capability of self-attention with convolution as the main method, improving the discrimination of dense targets, and maintaining gradient stability and controllable computational cost through residual connections.

[0025] AIFI is used for cross-layer interaction and alignment of multi-scale features. This embodiment employs MSLA (Multi-Scale Linear Attention) to... Construct a multi-scale key / value mapping so that a query at any scale can aggregate information from other scales; and use kernelized linear attention. Approximate standard attention, implementation: ; in, To query / key / value, Kernel mapping. This reduces the attention complexity from... Reduced to MSLA, while preserving key context, mitigates the problem of small target responses being overwhelmed by large-scale salient regions, outputting semantically aligned responses. .

[0026] To bridge the gap between high-level semantics and low-level detailed features, hybrid encoding first uses... Generate semantic vectors For mid-to-lower level features Applying SNI (Semantic Injection) and its gating can be represented as: ; in, For element-wise multiplication, This is a gated function.

[0027] While preserving edge and texture details, high-level semantic priors are supplemented. Subsequently, in the downsampling path, GSConvE (group convolution and channel shuffling unit for downsampling fusion) is used instead of traditional operators. By utilizing group convolution and channel shuffling, feature mixing and spatial alignment are completed simultaneously during downsampling, minimizing information loss caused by resolution reduction, and ultimately resulting in high-quality... For use by the decoder.

[0028] S3: Construct a training dataset frame-by-frame from the microscopic imaging videos obtained in step S1, and annotate the sperm targets with rectangular bounding boxes. The bounding box parameters are as follows: To enhance temporal consistency learning, a consistent identifier is assigned to the same target in adjacent frames. Generalization ability is improved through data augmentation methods such as rotation, scaling, random cropping, and brightness / contrast perturbations. Subsequently, the improved detection model based on RT-DETR described in step S2 is loaded for supervised training. The set matching paradigm is used to complete the one-to-one allocation of prediction and labeling. The weighted sum of classification loss and bounding box regression loss is used as the objective function. On the validation set, the optimal weights are selected based on the detection performance and derived for inference.

[0029] During the inference phase, the image of frame t is... Input the improved detection model with the optimal weights, and obtain the detection set for this frame: ; in, For the first Frame image, For the detection set, For bounding box, As the confidence level, this set is used as input for step S4 for cross-frame correlation and trajectory generation. A minimum confidence threshold is set if necessary to filter low-confidence results; and... Associated with the time index t established in step S1 to form Records are provided to subsequent processing stages in a standardized data structure.

[0030] S4: Frame-by-frame detection results have been obtained in step S3. Based on the established time index, the following steps are performed for cross-frame rate correlation and trajectory generation: Trajectory initialization and state modeling: When the input is the first frame image or there are unpaired new detections, a temporary trajectory is initialized for each detected target and a temporary label is assigned. A linear constant-speed state is used. , in, For state vectors, With the center coordinates, The width of the frame. The height of the frame. For horizontal / vertical velocity, This is the observation vector.

[0031] The observation matrix is: ;

[0032] By frame interval Construct the state transition matrix: , in For process noise, To measure noise, Let be the initial covariance.

[0033] Kalman prediction and statistical gating, for the set of trajectories that were active in the previous time step. Execute prediction: ,

[0034] ; The predicted observations and innovation covariance were obtained: ,

[0035] ; For each candidate detection For each activity trajectory, calculate the Mahalanobis distance:

[0036] when Candidates are included in the statistical gating system.

[0037] For candidate pairs Construct the comprehensive cost function: , in, For the prediction box, For geometric overlap, The normalized scale is the center distance.

[0038] For matched trajectories, use observations Perform a Kalman update and append trajectory points. Simultaneously, the loss count is reset. For unmatched detections, a temporary trajectory is initialized; for unmatched trajectories, the time interval of the current frame is used. Cumulative loss, cumulative duration exceeding the threshold The process terminates when the temporary trajectory reaches a threshold during continuous matching time. The process then proceeds to confirm the trajectory and assign a unique identifier (ID). Trajectories that fail to meet the criteria and are terminated are not included in the final results set.

[0039] in, This is the frame time index corresponding to the detection result. For bounding box, Confidence level for sperm type This is the index of the target detected in this frame.

[0040] Calculate trajectory reliability after each trajectory update This reliability is determined by a weighted average of matching stability, detection stability, and prediction consistency. When, pause and do not extend the trajectory, if The time spent below the threshold for more than the preset duration The process terminates at that point. Trajectories with a reliability not lower than the threshold continue to participate in subsequent physical conversions and quality scoring.

[0041] S5: Based on the spatial and temporal calibration in S1 and the trajectory data in S4, this step first converts pixels and frame time into physical quantities; calculates kinematic parameters within a sliding time window; and extracts geometric shape parameters on the frame-level ROI.

[0042] Trajectory Each trajectory point According to the spatial scale of S1 relative to the reference origin Convert to physical coordinates and dimensions: ; in, In pixels For physical quantities, For time intervals.

[0043] The time index uses timestamp accumulation: ; Based on this, the physical trajectory is obtained. .in, The start time, The time interval between adjacent frames.

[0044] Take the length as Sliding time window The window contains There are sampling points, with a sampling interval of . .

[0045] Linear speed (VSL): ; Average Path Rate (VAP): for Smoothing to obtain the average path ,but: ; Lateral head displacement amplitude (ALH): Local coordinates are established using the normal of the average path, and the phase offset is calculated as... ,but: ; in, denoted as the sample standard deviation, and coefficient 2 as a conventional representation of the amplitude.

[0046] Cross Frequency (BCF): for Regarding the valid number of zero crossings of the zero line: ; Orientation retention (OP): ; ;

[0047] in, For adjacent sampling displacements, It is a unit velocity vector; To prevent zero length, For dot product, Number of sampling points in the window.

[0048] Calculate the linearity index within each time window. .when and Use VSL if the sampling rate is within acceptable limits; otherwise, use VAP. Window duration Number of zero crossings If the frequency estimation condition is met, BCF is selected; otherwise, OP is selected. This yields the in-window kinematic parameter set. .

[0049] For the first In-frame trajectory detection box proportional Expand and trim the boundaries to generate the target region. and with Create an index. For Perform rotation normalization, rotating the head along its main direction to make the major axis horizontal; normalize and scale the size to a fixed size; perform intensity and background processing, including grayscale normalization, illumination correction, background suppression, and noise reduction to improve segmentation stability.

[0050] exist The head mask is obtained using Sauvola's local adaptive thresholding. Furthermore, morphological opening and closing operations and hole filling are employed. Combining the physical size constraints of S1 to preserve reasonable connected components, when adhered targets appear, a Euclidean distance transformation is calculated within the connected component, and the internal maxima are used as markers. A marked watershed is then executed to achieve lightweight unadhesion. Calculate area Aspect Ratio Main direction angle Solidity Geometric shape parameters, etc. Dimensional parameters can be normalized to internal dimensions by head length HL to eliminate the influence of magnification differences.

[0051] With primary key Record frame-level geometric parameters; using primary key Record all kinematic parameters within the window and establish references with the calibration information of S1 and the trajectory information of S4 for subsequent use in S6–S7.

[0052] S6: Identified by trajectory With time window Using this as an index, the kinematic and geometric parameters calculated by S5 are summarized into a parameter set, and normalization and feature fusion are performed to generate a comprehensive quality score for evaluating the overall quality of the sperm.

[0053] by The primary key stores the feature vectors within the time window.

[0054] A one-to-one correspondence is established between the time index and the trajectory identifier. The selected speed class and rhythm class within the window are determined and recorded according to the S5 judgment rule.

[0055] Normalization processing, based on head length Based on the standard, the area is calculated as follows: Normalization is then performed, followed by mapping of the components. For quantities that exhibit a clear trend of "the larger the better" or "the smaller the better," such as... A threshold-saturation linear mapping is used: ; For quantities that are too small or too large, such as... Solidity Using expected value Bandpass score centered on: ; Angle measurement First align the main direction, then press the tolerance angle. The linear decay is: ; in, The lower and upper bound of the normalized interval, The center and scale of the bandpass score, To convert the angle to , For tolerance angle, Used to truncate the normalized values. Used to truncate a value to... .

[0056] Feature fusion and base scoring combine the normalized kinematic and geometric components into two sub-scores. The kinematic sub-scores are denoted as follows: ; .

[0057] The basic score for the time window is obtained by linearly combining the results with preset weights. ; in, For the internal weighting of kinematics, Weights are assigned to the geometric interior. External weights for the two sub-scores.

[0058] Reliability modulation and comprehensive scoring, introducing window-level trajectory reliability An exponential modulator is applied to the baseline score to form the overall quality score for this window: .

[0059] when At lower levels, This mechanism appropriately penalizes unreliable trajectories, ensuring the reliability of the results. Among other things, Control the intensity of suppression for low-reliability trajectories.

[0060] The results are saved using the primary key. Associated storage of original features Normalized components The mapping parameters and weights are configured, and a reference relationship is established with the S1 calibration data and the S4 trajectory table, so that the time weighting and threshold determination of S7 can be directly called.

[0061] S7: Based on the time-slice-level comprehensive quality score and trajectory reliability obtained in S6, time-weighted aggregation is performed on the comprehensive quality within a preset time window; the weighted average is calculated only when the window reliability meets the standard, and the selection output is filtered accordingly. To avoid duplicate inclusion of adjacent window endpoints, a half-open interval is used for the implementation. With respect to the time window in the claims Equivalent, both are based on The same window is uniquely defined.

[0062] Window division and input quantity, for trajectory The Preset time window Window length Divide it into Adjacent time slices Record the duration of the time slice: .

[0063] Given a slice-level trajectory reliability for each time slice Film-level overall quality score .

[0064] in, The window number; Use half-open intervals to avoid double counting of endpoints. The number of time slices within the window. For chip-level reliability, The film is rated as a whole in terms of overall quality.

[0065] Reliability gating first calculates the time-weighted reliability average of the window: ; If and only if If the quality is not satisfied, the window will proceed to the next window; if not, the window will be deemed invalid and will not be selected.

[0066] For the target window, weights are assigned based on the duration. Aggregate quality score, take Calculate the time-weighted average quality: ; Threshold determination and selection output, setting a comprehensive quality threshold. .when Once the corresponding sperm target is selected within the window, output its trajectory identifier. With time window The result. If Select and continue sliding the window to evaluate subsequent time periods.

[0067] Data recording and boundary handling, using the primary key for each window. storage With the judgment marker. When there are missing frames or abnormal fragments within the window, it can be adaptively scaled according to the missing proportion. Or remove abnormal fragments to ensure Then aggregation is performed.

[0068] By employing a two-level constraint mechanism of reliability gating followed by quality aggregation, quality assessment is performed only for continuous and reliable trajectory time periods. The time-weighted averaging enhances the ability to suppress short-term fluctuations, resulting in more stable output results.

[0069] like Figure 2As shown, this embodiment improves the RT-DETR network model structure, which includes a backbone network, a hybrid encoder, and a Transformer decoder with an auxiliary prediction head. To improve the detection rate and stability of small, dense, and weakly contrasting targets: an ESC unit is introduced into the backbone to enhance global modeling; MSLA is used in AIFI to perform cross-scale interaction and alignment of top-level features; and SNI semantic injection and GSConvE downsampling fusion are integrated into the hybrid encoder to form high-quality P3 / P4 / P5 multi-scale features for the detection head to decode. The auxiliary prediction head is used for deep supervision and small target stability enhancement.

[0070] Input: Input image / feature tensor, the starting point of the backbone network.

[0071] Conv (Convolution): Convolutional layer, which uses convolutional kernels to extract local texture and edge features.

[0072] Concat (Concatenate): Feature concatenation, which merges features from multiple channel dimensions to integrate information.

[0073] CSPBlock (Cross Stage Partial Block): A residual structure for cross-stage splitting, which maintains expressive power while reducing computational cost.

[0074] CSPESCBlock: ESC units are embedded in the CSP structure to balance a large receptive field with lightweight computation to enhance small targets and weak textures.

[0075] Backbone: The backbone network, responsible for extracting multi-scale basic features (C3 / C4 / C5) from the input step by step.

[0076] AIFI (Aggregation-Interaction Feature Integration): A cross-layer aggregation and interaction module that connects the information flow of multi-scale features.

[0077] MSLA (Multi-Scale Linear Attention): Multi-scale linear attention uses kernel approximation to reduce attention complexity while preserving cross-scale context.

[0078] SNI (Semantic Injection): Semantic injection uses top-level semantic vectors to gate / bias lower-level details to supplement higher-level semantics.

[0079] GSConvE (Group-Shuffle Convolution for downsampling, Enhanced): A downsampling unit with group convolution and channel shuffling, simultaneously performing downsampling and channel blending / spatial alignment.

[0080] RepC3 (Re-parameterized C3): A reparameterizable C3 module that allows for multiple branches during training and merging during inference, improving both representation and inference efficiency.

[0081] Transformer Decoder: Set-based one-to-one matching, outputs bounding boxes and categories.

[0082] The backbone network extracts features step-by-step through multiple convolutional layers and CSPBlock modules. In the high-level stages, CSPESCBlock (convolution-simulated self-attention) is introduced to expand the effective receptive field, enhance the representation of small object edges and weak textures, and control the computational cost. This forms a pyramid feature set {C3, C4, C5}, corresponding to strides P3 / 8, P4 / 16, and P5 / 32, respectively.

[0083] AIFI MSLA only applies to the top-level features: P5 (i.e. C5) is projected to 256 channels by a 1×1 convolution and then input into MSLA encoding to obtain the top-level semantic Y5 (256); then Y5 is further mapped by a 1×1 lateral mapping to obtain Y5_lateral (256), which is used for subsequent bottom-up fusion.

[0084] The hybrid coding network adopts a top-down semantic annotation and bottom-up fusion structure. In the top-down path, SNI is first applied to Y5 and concatenated with the 1×1 projection (256) of P4, and then Y4 (256) is obtained through RepC3. Then Y4 is 1×1 lateralized to obtain Y4_lateral (256). Next, SNI is applied to Y4 again and concatenated with the 1×1 projection (256) of P3, and then X3 (256) is obtained through RepC3, and P3=X3 is defined. In the bottom-up path, X3 is channel-mixed and spatially aligned during downsampling using GSConvE, concatenated with Y4_lateral, and then F4 (256) is obtained through RepC3, and P4=F4 is defined. Then F4 is downsampled using GSConvE, concatenated with Y5_lateral, and then F5 (256) is obtained through RepC3, and P5=F5 is defined. The final output is the enhanced features of the three scales {P3,P4,P5}={X3,F4,F5}.

[0085] The Transformer decoder takes {P3,P4,P5} as input and uses the RT-DETR set-based one-to-one matching paradigm to predict bounding box positions and categories, outputting the detection set and corresponding confidence scores for each frame.

[0086] like Figure 3 As shown in the figure, the sperm quality evaluation and screening system based on parameter set fusion and trajectory reliability provided in this embodiment mainly includes the following modules: The data access and calibration module receives microscopic video and temporal information; it also calculates spatial scale. relative to the reference origin Establish a time index As a unified physical and time standard.

[0087] The model management and inference module constructs and trains an improved RT-DETR, loads optimal weights to detect targets in each frame, and outputs a detection set with target location and confidence level. And it is bound to the time index.

[0088] The cross-frame association management module associates the detection results of consecutive frames based on the time index, generates motion trajectories and assigns unique trajectory identifiers (IDs), and calculates and maintains trajectory reliability.

[0089] The target region processing module generates the target region based on the bounding box. It performs rotation normalization, scale normalization, grayscale normalization, illumination correction, background suppression, and noise reduction.

[0090] The parameter calculation and summarization module converts pixels and time into physical units and extracts them by window. , , Isokinetic quantities are extracted from the ROI. Equal geometric quantities.

[0091] The scoring module normalizes the parameter set and fuses features to generate a comprehensive quality score for the trajectory within the time window.

[0092] The time-weighted evaluation and screening module first performs reliability gating within a preset time window. And rate the time slice. Perform time weighting, when Output the selection result at that time.

[0093] The results output module is used to record and display the screening and judgment results, and to provide data interfaces to external parties.

[0094] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for sperm quality evaluation and screening based on parameter set fusion and trajectory reliability, characterized in that: Includes the following steps: S1. Acquire microscopic imaging video data, complete the physical calibration of spatial and temporal scales, and establish a time index based on the starting frame. S2. Construct an improved detection model based on RT-DETR, set up convolutional simulation self-attention units in the backbone network stage, adopt a multi-scale linear attention mechanism in the feature interaction stage, perform semantic injection in the hybrid encoding stage, and use hybrid convolutional units for feature fusion. S3. Load the trained detection model, detect each frame of image, and output the sperm target set, its position parameters, and confidence level; S4. Perform cross-frame association on the detection results of multiple consecutive frames according to the time index, generate motion trajectory, assign a unique trajectory identifier, and calculate and maintain trajectory reliability based on trajectory matching stability and detection confidence. S5. Based on the trajectory information and physical calibration parameters, convert the pixel coordinates of the trajectory points and the frame time into physical units, calculate the kinematic parameters accordingly, and extract the target area with the position of the sperm target in the corresponding frame as the center, and extract the geometric shape parameters of the target area. S6. Summarize the kinematic parameters and geometric parameters according to the unique trajectory identifier and time index to form a parameter set, normalize the parameter set, and generate a comprehensive quality score through feature fusion algorithm; S7. When the reliability of the trajectory is not lower than a preset threshold, calculate the time-weighted average of the comprehensive quality score within a preset time window. When the weighted average is not lower than the preset score threshold, output the corresponding sperm screening result.

2. The sperm quality evaluation and screening method based on parameter set fusion and trajectory reliability according to claim 1, characterized in that: The physical calibration parameters in step S1 include spatial scale and temporal scale. The spatial scale is used to establish a quantitative mapping relationship between the image pixel domain and the physical spatial domain, respectively. and This represents the actual physical length corresponding to a unit pixel length in the horizontal and vertical directions; the time scale is the inter-frame time interval. Based on the video start frame time Establish a time index based on the baseline, for the first A frame is assigned a unique time value. .

3. The sperm quality evaluation and screening method based on parameter set fusion and trajectory reliability according to claim 1, characterized in that: The improved model in step S2 includes the following structural points: the convolutional simulated self-attention unit is set in the backbone network stage; large kernel depth separable convolution and dynamic convolution are set in parallel within the residual framework; and relative position bias is introduced in the local window multi-head attention; after pointwise convolution aggregation, the output features are consistent with the original level; the multi-scale linear attention mechanism is set in the feature interaction stage; in the encoding layer, cross-scale information interaction and scale alignment are achieved through multi-scale key mapping and value mapping combined with kernelized linear attention to obtain semantically consistent feature encoding. The hybrid encoding stage performs semantic injection to supplement low-level detailed features with high-level semantic information, and uses hybrid convolutional units to complete feature fusion, mixing and alignment during downsampling, outputting P3, P4 and P5 multi-scale features to the decoder.

4. The sperm quality evaluation and screening method based on parameter set fusion and trajectory reliability according to claim 1, characterized in that: Step S3 includes two steps: pre-training and frame-by-frame detection. The microscopic imaging video data obtained in step S1 is sliced ​​frame by frame to construct a training dataset, and supervised training is carried out to obtain the detection model parameters. After training, the optimal weights are loaded, and the video sequence is detected frame by frame. The first frame of the video sequence is then selected. The frame image is input into the detection model to obtain the frame detection set. The position parameters The confidence level represents the center coordinates of the bounding box and its width and height. Assign a confidence score to the target sperm category; and set the set With the time index of this frame After establishing a one-to-one correspondence, the data is stored.

5. The sperm quality evaluation and screening method based on parameter set fusion and trajectory reliability according to claim 1, characterized in that: Step S4, the cross-frame association and trajectory generation step of continuous multi-frame detection results, includes: initializing the detection result of the first frame as a temporary trajectory and assigning a unique identifier; starting from the next frame, generating a trajectory in the active state at frame-by-frame time intervals. Perform Kalman prediction and map it to the observation domain to obtain: ; in, For predictive observation, For the observation matrix, The prior state vector, To innovate covariance, The prior covariance matrix, To measure noise covariance; by Calculate Mahalanobis distance: ; in, The Mahalanobis distance, For the current frame, detection observations are performed; Implement statistical gating, when The time is used as a candidate pairing; a comprehensive cost function is constructed based on geometric overlap and center offset for the candidate pairing, and the Hungarian algorithm is used for one-to-one optimal allocation; the matched trajectory is updated and trajectory points are added, the unmatched trajectory is detected and initialized as a new trajectory, and the unmatched trajectory is accumulated and lost after a preset termination time. The temporary trajectory will terminate when the preset confirmation time is reached after continuous matching. It then transitions to a confirmed status and is permanently assigned a unique identifier (ID). The calculation and maintenance steps for trajectory reliability include calculating trajectory reliability after each update. This reliability is determined by a weighted average of matching stability, detection stability, and prediction consistency; when The trajectory expansion is paused when it remains below the threshold for a preset duration. The calculation is terminated at that time, and trajectories with a reliability not lower than the threshold continue to participate in subsequent physical conversion and quality scoring calculations. in, For the cardinality threshold, This is the minimum reliability threshold.

6. The sperm quality evaluation and screening method based on parameter set fusion and trajectory reliability according to claim 1, characterized in that: The kinematic parameters described in step S5 are used to quantify velocity, sway, and rhythm, and include at least one of the velocity parameters, namely linear velocity and average path velocity; the sway parameters, namely lateral head displacement amplitude; and the rhythm parameters, namely, one of cross frequency and orientation retention. Within each time window, linear velocity or average path velocity is adaptively selected based on trajectory linearity index and orientation retention, and cross frequency or orientation retention is adaptively selected based on sampling rate and window duration conditions. The target area is based on the first The bounding boxes detected in the frame are expanded outward according to a preset ratio to generate the target region. This is used to cover the sperm head and part of the midsection region, and establishes a correspondence with the frame's time index and trajectory markers; for After rotational and scale normalization, the results are used for subsequent geometric feature calculations. Gray-level normalization, illumination correction, background suppression, and denoising are also performed to eliminate the influence of differences in microscopic imaging conditions on the results. The geometric parameters are based on the The calculation of the head mask obtained from image segmentation includes at least the area. Aspect Ratio Main direction angle Solidity ,in The area of ​​the convex hull of the mask. The dimensions were obtained by performing second-order moment analysis on the mask and then normalizing the internal scale of the dimensional parameters according to the head length.

7. The sperm quality evaluation and screening method based on parameter set fusion and trajectory reliability according to claim 1, characterized in that: The parameter set described in step S6 uses trajectory identifier ID and time window. The feature vector within this window is formed using the index key. The feature vector includes kinematic parameters such as linear velocity or average path velocity, lateral head displacement amplitude, crossover frequency or orientation retention, and geometric parameters such as area. Aspect Ratio Main direction angle Solidity It is also associated with the time index and trajectory identifier ID for subsequent fusion and scoring calculation; For dimensional parameters, internal scale normalization is performed based on head length, and other components are normalized to a uniform scale. For indicators that are too small or too large, a bandpass function score is used to reduce the impact of extreme values ​​on the overall score. The normalized kinematic and geometric components are then merged into the kinematic sub-score. With geometric sub-score The base score for that time window is obtained by linearly weighting the scores according to preset non-negative weights. ; The comprehensive quality score incorporates trajectory reliability. The baseline score is modulated to obtain the overall quality score for that time window: ; in, Based on the score, As weight, For trajectory reliability, The modulation index, This is used as input for subsequent time-weighted and threshold determination.

8. The sperm quality evaluation and screening method based on parameter set fusion and trajectory reliability according to claim 1, characterized in that: The method for calculating the time-weighted average in step S7 is as follows: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] preset time window Inside, divide the window into Record adjacent time slices First, calculate the window reliability weighted average: ; when At that time, calculate the overall quality weighted average of the window: ; when If the selection is successful, output the result; otherwise, output the result of failure. Simultaneously, output the trajectory marker and time window of the corresponding sperm target. The evaluation results; in, For time slice index, The duration of a time slice, For the reliability of the time slice trajectory, As the reliability threshold, A comprehensive quality score for the time slice; As time weight, The weighted average of the overall quality of the window. This is the overall quality threshold.

9. The system for sperm quality evaluation and screening based on parameter set fusion and trajectory reliability as described in claim 1, the system comprising: The data access and calibration module is used to access the acquired microscopic imaging video and frame time information, complete the physical calibration of spatial and temporal scales, and establish a time index. The model management and inference module is used to build, train, load and run detection models, output target location information and confidence scores and associate them with time indices; The cross-frame association management module is used to generate motion trajectories across frames, assign unique identifiers, and calculate and maintain trajectory reliability. The target region processing module is used to generate target regions based on the detected bounding boxes and perform rotation normalization and imaging condition correction for subsequent feature extraction; the parameter calculation and summarization module is used to perform physical unit conversion, extract motion and geometric parameters and summarize them into a parameter set, and perform normalization processing. The scoring module is used to perform feature fusion on the parameter set and generate a comprehensive quality score; the time-weighted evaluation and screening module is used to perform time-weighted evaluation within a preset time window and output the screening judgment results according to reliability and scoring threshold. The results output module is used to record and display the screening and judgment results, and provides an external data interface.

Citation Information

Patent Citations

  • Methods, devices and equipment for sperm head morphology identification

    CN112036384B

  • Sperm quality evaluation method and system based on multi-modal fusion

    CN120374622A