Control methods, equipment, and storage media for sperm motility trajectory analysis
By generating a motion trajectory dataset with associated trajectory credibility and dual-path reconstruction results, combined with a robust endpoint estimation strategy, the problem of poor sperm motility trajectory analysis was solved, the accuracy and robustness of kinematic parameters were improved, and the reliability of sperm motility assessment was ensured.
Patent Information
- Application Number
- CN202611435262.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-16
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2046-09-16
AI Technical Summary
In existing technologies, sperm motility trajectory analysis methods are difficult to adaptively calibrate under different imaging qualities, resulting in inaccurate calculation of kinematic parameters, which affects the accuracy of sperm motility assessment and the reliability of livestock breeding diagnosis.
By using sperm microscopic scanning videos and pixel physical calibration parameters, a motion trajectory dataset with associated trajectory credibility is generated. Combining trajectory anomaly features and noise sensitivity, a dual-path reconstruction result is constructed. A robust endpoint estimation strategy is used to calculate sperm kinematic parameters, which are then weighted and summarized to obtain the kinematic analysis results.
It improves the noise resistance and path reconstruction fidelity of sperm motility trajectory analysis, enhances the robustness of kinematic parameter calculation and the reliability of sample-level analysis results, and realizes accurate quantitative analysis under complex imaging conditions.
Smart Images

Figure CN122948924B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of biomedical detection technology, and in particular to a control method, device and storage medium for sperm motility trajectory analysis. Background Technology
[0002] In the context of sperm motility testing and kinematic parameter analysis, the ability to adaptively calibrate trajectories under different imaging qualities, stably calculate kinematic parameters, and trace the quality of test results directly affects the accuracy of sperm motility assessment results, the reliability of instrument test results, and the reliability of livestock breeding diagnosis.
[0003] In related technologies, sperm motility videos are collected using a microscope, and after target tracking to generate motion trajectories, kinematic parameters are calculated using fixed parameters to determine the motility level for sperm analysis. This method applies fixed processing rules and calculation standards to all motion trajectories, which is difficult to adapt to complex actual sample testing scenarios, resulting in poor sperm motility trajectory analysis results.
[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main objective of this application is to provide a control method, device, and storage medium for sperm motility trajectory analysis, aiming to solve the technical problem of poor sperm motility trajectory analysis results.
[0006] To achieve the above objectives, this application proposes a control method for sperm motility trajectory analysis, the method comprising: Based on the microscopic scanning video of sperm and the pixel physical calibration parameters, a motion trajectory dataset with associated trajectory credibility is obtained by processing sperm motion tracking detection. The target trajectory is determined by the ratio of the high-frequency jitter energy of each trajectory in the trajectory dataset to the overall motion energy, combined with trajectory anomaly features. The threshold for judging trajectory anomaly features is determined by the distribution pattern of motion trajectories of historical sperm samples. The dual-path reconstruction result of the target trajectory is obtained by matching the smoothing constraint strength according to the noise sensitivity corresponding to the target trajectory; Based on the dual-path reconstruction results, sperm kinematic parameters are calculated according to a robust endpoint estimation strategy, and the sperm kinematic parameters are weighted and summarized in combination with the trajectory confidence to obtain kinematic analysis results.
[0007] In one embodiment, based on the microscopic scanning video and pixel physical calibration parameters, the video quality is screened according to time frames, invalid segments are removed, and a compliant video frame sequence is obtained; Sperm motion tracking processing is performed on the compliant video frame sequence to identify the target position of the sperm head frame by frame and associate the inter-frame correspondence to obtain the motion trajectory sequence; Based on the motion trajectory sequence, the imaging evaluation value, the interference degree of nearby targets and the motion acceleration residual are fused point by point to calculate the point-level confidence value of the trajectory point. The point-level confidence scores corresponding to the trajectory points are associated and bound with the corresponding points in the motion trajectory sequence to obtain a motion trajectory dataset associated with the trajectory confidence scores.
[0008] In one embodiment, each trajectory in the motion trajectory dataset is smoothed using a short window according to a robust smoothing rule to obtain an initial smoothed trajectory; Based on the initial smooth trajectory, a weighted calculation is performed by combining the point-level confidence values of each trajectory point to obtain the high-frequency jitter energy and overall motion energy of each trajectory. The ratio of the high-frequency jitter energy to the overall motion energy is calculated to obtain the trajectory noise energy ratio. The noise sensitivity of each trajectory is calculated by weighting and fusing the trajectory breakage degree, target crossing risk, and inter-frame time fluctuation degree with the trajectory noise energy ratio. Based on the noise sensitivity threshold and trajectory validity judgment rules, all trajectories of the initial smoothed trajectory are screened, and low-quality trajectories that do not meet the analysis conditions are removed to obtain the target trajectory.
[0009] In one embodiment, the original trajectory points of each trajectory are matched with the points of the initial smoothed trajectory according to the timestamp, and the squared positional deviation between the original coordinates and the smoothed coordinates is calculated point by point to generate a point-by-point deviation sequence. The point-by-point deviation sequence is multiplied point by point with the point-level confidence value corresponding to the trajectory point to obtain the product result; The high-frequency jitter energy of the trajectory is obtained by summing the product results of all the trajectory points. Using the starting position of the initial smooth trajectory as a reference, the square value of the displacement of each trajectory point relative to the starting point is calculated point by point. Based on the squared displacement value, and combined with the point-level confidence weighted summation of the corresponding trajectory points, the overall motion energy of the trajectory is obtained.
[0010] In one embodiment, based on the noise sensitivity corresponding to the target trajectory, two differentiated smoothing constraint strengths are obtained by mapping function matching, wherein the smoothing constraint strength includes a first smoothing constraint strength and a second smoothing constraint strength; Based on the first and second smoothing constraint strengths, a path smoothing optimization objective function is constructed by combining the point-level confidence values of each trajectory point and the robust loss function. The curved path and the average path are obtained by minimizing the objective function. The curve path and the average path corresponding to the target trajectory are aligned and bound point by point according to the timestamp to generate the dual-path reconstruction result of the target trajectory.
[0011] In one embodiment, the point coordinates of the target trajectory are used as the fitting benchmark, and the point-level confidence values corresponding to each trajectory point are matched as weight coefficients. The robust loss function is then used to construct path fitting data items. The local curvature of the path is characterized by a second-order difference operator. The first smoothing constraint strength and the second smoothing constraint strength are substituted into the regularization coefficients to construct two different smoothing levels of path smoothing regularization terms. The path fitting data terms are linearly superimposed with the two types of path smoothing regularization terms to construct path smoothing optimization objective functions corresponding to the curve path and the average path, respectively, and the minimum value of the path smoothing optimization objective function is taken as the solution criterion for the optimal path. The two path smoothing optimization objective functions are minimized to generate the curved path that preserves the true swing characteristics of the sperm head and the average path that filters out high-frequency positioning jitter noise.
[0012] In one embodiment, based on the dual-path reconstruction results, the effective motion duration of the trajectory is calculated by combining the inter-frame effective connection flag, and the robust endpoint positions at both ends of the trajectory are solved according to the robust endpoint estimation strategy to obtain the total curve length, the average total path length, and the robust linear displacement. Divide the total curve length, the average path length, and the robust linear displacement by the effective motion time to obtain the curve velocity, the average path velocity, and the linear velocity, respectively. Based on the curve velocity, the average path velocity, and the straight velocity, and processed according to the velocity ratio normalization rule, derived kinematic parameters including linearity, straightness, and oscillation are obtained. Using the local tangent direction of the average path as a reference, calculate the point-by-point lateral offset of the curved path; Based on the point-by-point lateral offset, combined with the point-level confidence value of each trajectory point, the head lateral swing amplitude is obtained by weighted quantile statistics, and the whipping cross frequency is obtained by counting the number of effective crossings through the hysteresis cross determination rule. The derived kinematic parameters, the head lateral swing amplitude, and the whiplash cross frequency are weighted and aggregated with the corresponding trajectory confidence, and the proportion of abnormal trajectories is determined to obtain the kinematic analysis results.
[0013] In one embodiment, based on the kinematic analysis results, the average trajectory confidence, the number of valid trajectories, and the proportion of abnormal trajectories are determined, and a comprehensive quality score is generated by combining the corresponding weights in a weighted fusion calculation. The comprehensive quality score is compared with the formal output threshold and the warning output threshold respectively to determine the sample quality level corresponding to the kinematic analysis result and match the corresponding output handling strategy. Based on the output processing strategy, corresponding operation content is output in a tiered manner; The operational parameters and quality indicators of the entire analysis process were collected, and standardized traceable records were obtained and persistently stored.
[0014] In addition, to achieve the above objectives, this application also proposes a sperm motility trajectory analysis device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the control method for sperm motility trajectory analysis as described above.
[0015] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the control method for sperm motility trajectory analysis as described above.
[0016] This application provides a control method for sperm motility trajectory analysis, including: performing sperm motility tracking and detection processing based on sperm microscopic scanning video and pixel physical calibration parameters to generate a motion trajectory dataset with associated trajectory credibility; determining target trajectories by combining the ratio of high-frequency jitter energy of each trajectory to the overall motion energy in the trajectory dataset with trajectory anomaly features; adaptively matching differentiated smoothing constraint strength according to the noise sensitivity of the target trajectory to construct a dual-path reconstruction result of the target trajectory; and calculating sperm kinematic parameters based on the dual-path reconstruction result according to a robust endpoint estimation strategy and weighting the kinematic parameters in combination with trajectory credibility. The complete technical path for obtaining kinematic analysis results solves the technical problems of traditional sperm motility analysis methods, such as the susceptibility of trajectories to imaging noise, target intersection and inter-frame fluctuation interference leading to insufficient accuracy in effective trajectory screening, the inability of single path smoothing to simultaneously retain the true swing characteristics of the sperm head and filter out high-frequency positioning jitter, and the low accuracy and reliability of kinematic parameter calculation affected by endpoint anomalies and local noise. It improves the noise resistance screening capability and path reconstruction fidelity of sperm trajectories under complex imaging conditions, enhances the robustness of kinematic parameter calculation and the credibility of sample-level analysis results, and realizes accurate quantitative analysis of sperm motility morphology and motility under samples of different quality.
[0017] In summary, this application solves the technical problem of poor sperm motility trajectory analysis by using trajectory anomaly screening, adaptive dual-path reconstruction, and robust weighted kinematics calculation, thereby improving trajectory fidelity and the accuracy and robustness of parameter calculation. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating the first embodiment of the control method for sperm motility trajectory analysis according to this application; Figure 2 This is a flowchart illustrating the adaptive calculation of sperm trajectory kinematic parameters in this application; Figure 3 This is a flowchart illustrating the fourth embodiment of the control method for sperm motility trajectory analysis in this application; Figure 4 This is a flowchart illustrating the sixth embodiment of the control method for sperm motility trajectory analysis in this application; Figure 5 This is a flowchart illustrating the eighth embodiment of the control method for sperm motility trajectory analysis in this application; Figure 6 This is a schematic diagram of the sperm motility trajectory analysis device of this application.
[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0023] In related technologies, sperm motility videos are collected using a microscope, and after target tracking to generate motion trajectories, kinematic parameters are calculated using fixed parameters to determine the motility level for sperm analysis. This method applies fixed processing rules and calculation standards to all motion trajectories, which is difficult to adapt to complex actual sample testing scenarios, resulting in poor sperm motility trajectory analysis results.
[0024] This application provides a solution: First, based on the microscopic scanning video of sperm and pixel physical calibration parameters, a motion trajectory dataset with associated trajectory credibility is obtained according to sperm motility tracking and detection processing. Then, the target trajectory is determined by combining the ratio of high-frequency jitter energy of each trajectory in the trajectory dataset to the overall motion energy and trajectory anomaly features. The judgment threshold of the trajectory anomaly features is determined by the distribution pattern of motion trajectories of historical sperm samples. Next, the smoothing constraint strength is matched according to the noise sensitivity corresponding to the target trajectory to construct the dual-path reconstruction result of the target trajectory. Finally, based on the dual-path reconstruction result, sperm kinematic parameters are calculated according to a robust endpoint estimation strategy, and the sperm kinematic parameters are weighted and summarized in combination with the trajectory credibility to obtain the kinematic analysis result.
[0025] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions, such as a sperm motility trajectory analysis device. The following description uses a sperm motility trajectory analysis device as an example to illustrate this embodiment and the subsequent embodiments.
[0026] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0027] This application provides a control method for sperm motility trajectory analysis, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the control method for sperm motility trajectory analysis in this application.
[0028] In this embodiment, the control method for sperm motility trajectory analysis includes steps S10 to S40: Step S10: Based on the microscopic scanning video of sperm and pixel physical calibration parameters, and following the sperm motion tracking detection process, a motion trajectory dataset with associated trajectory credibility is obtained.
[0029] Sperm microscopic scanning video is a dynamic image sequence containing the movement states of multiple individual sperm, obtained through continuous temporal acquisition of semen samples using a microscopic imaging system. It encompasses video data from various acquisition modes, including bright-field imaging, phase-contrast imaging, and dark-field imaging. For example, a sperm movement video acquired at 30 frames per second (1 second) under a 10x objective lens using phase-contrast acquisition. Pixel physical calibration parameters are benchmark conversion parameters used to convert image pixel coordinates into actual physical spatial scales. These include three types of calibration values: the actual length corresponding to a single pixel, the magnification of the imaging system, and the field-of-view center offset. These are the core foundation for quantifying motion parameters. For example, each pixel corresponds to 0.25 micrometers, the objective lens magnification is 20x, and the lateral offset of the field-of-view center is 3 pixels. Sperm motion tracking and detection processing is a full-process image processing operation used to identify sperm head targets from the microscopic video sequence, associate the same sperm identity between frames, and generate continuous motion trajectories. It includes three core steps: sperm head target detection, inter-frame target identity matching, and broken trajectory splicing and repair. The motion trajectory dataset associated with trajectory confidence is a structured collection of trajectories, with each trajectory accompanied by a point-by-point confidence identifier. It contains three core fields: sperm head pixel coordinates, corresponding collection timestamps, and point-by-point confidence values. It serves as the input basis for subsequent trajectory quality screening and path reconstruction.
[0030] In this embodiment, the sperm motility tracking and detection process described above can be triggered in four ways. First, automatic sample loading triggering: after the semen sample is loaded onto the microscopic detection platform and completes automatic focusing and field of view positioning, the system automatically starts the video acquisition and tracking detection process for automated batch detection of routine samples. Second, manual user triggering: the user initiates a trajectory analysis request through the detection system's interactive interface or inputs detection execution instructions through a script command line. Upon receiving the request, the system starts the video acquisition and tracking detection process for targeted analysis of customized samples. Third, batch warehousing queue triggering: after a batch of semen samples is transferred to the detection station and completes barcode registration and station positioning, the system sequentially starts the video acquisition and tracking detection process for each sample according to the sample queue order, for streamlined detection of large batches of samples. Fourth, automatic re-examination triggering: when the system determines that the sample quality score of the previous test result does not meet the output requirements, it automatically restarts the video acquisition and tracking detection process for the spare field of view of the same sample for sample re-examination and verification.
[0031] Once the sperm motility tracking and detection process is initiated, it begins to collect microscopic scan videos of sperm and corresponding pixel physical calibration parameters, and performs tracking and detection processing to generate a motion trajectory dataset.
[0032] For example, the sperm motility tracking and detection processing can be implemented in two ways. The first is a full-frame deep learning detection and globally optimal association tracking method. After the tracking and detection process is officially started, the complete microscopic scanning video and pixel physical calibration parameters are read first. For each frame of the image, a pre-trained sperm head detection model is used to perform full-frame target detection, outputting the pixel coordinates and detection confidence of all sperm heads. Then, a globally optimal matching algorithm is used to perform identity association matching on all targets in adjacent frames, and neighborhood search is used to repair trajectory breaks that occur during the matching process. Finally, the point-level confidence of each trajectory point is calculated by combining imaging contrast, detection confidence, and neighborhood target interference, generating a motion trajectory dataset with associated trajectory confidence. This method has high detection accuracy and strong association accuracy, and is less prone to target mismatch and trajectory breaks, providing high-quality trajectory foundation data for subsequent analysis.
[0033] The second method involves phase difference enhancement for local detection and incremental neighborhood association tracking. During frame-by-frame video acquisition and transmission, the current frame image is first enhanced with phase difference to highlight the edge contour of the sperm head. Then, local target detection is performed within a preset neighborhood of each trajectory point from the previous frame to obtain the coordinates of the sperm head at the corresponding position in the current frame. Incremental association of target identity is completed frame by frame, and the confidence level of the current point is calculated simultaneously based on the local detection response intensity and neighborhood matching deviation. After all video acquisition is completed, a motion trajectory dataset with associated trajectory confidence is obtained. This method is executed synchronously with the video acquisition process, without requiring additional post-processing time. It has low computational load, high running speed, and can make full use of the acquisition intervals to complete the tracking processing.
[0034] Once the original trajectory points and their corresponding confidence levels are obtained, a motion trajectory dataset with associated trajectory confidence levels can be generated based on the following methods.
[0035] In one alternative approach, the original coordinates, timestamps, and point-level confidence scores of all trajectories are first stored in a structured manner according to trajectory numbers, directly generating a motion trajectory dataset. This method is logically simple, has an intuitive storage structure, and is easy to read and call in subsequent steps.
[0036] In another alternative approach, all trajectories are first screened for length and number of points to remove excessively short trajectories with too few points. Then, the coordinates, timestamps, and confidence scores of the remaining trajectories are sorted chronologically and structurally packaged to generate a motion trajectory dataset. This method can eliminate obviously invalid short trajectories in advance, reducing the computational load in subsequent steps and improving overall processing efficiency.
[0037] In an exemplary scheme for determining a motion trajectory dataset, the acquired sperm microscopic scan video and corresponding pixel physical calibration parameters are first loaded, and the detection threshold and matching neighborhood parameters for trajectory tracking are initialized. Then, frame-by-frame sperm head detection is performed. For each frame, background subtraction, contrast enhancement, and morphological opening / closing operations are sequentially performed to extract all target regions that match the size and grayscale characteristics of the sperm head. The center pixel coordinates and detection response values of each target are output. Next, inter-frame target association is performed. Using all trajectory endpoints of the previous frame as centers, matching targets in the current frame are searched within a preset neighborhood. A one-to-one match is performed using the nearest neighbor criterion. Unmatched targets in the current frame are marked as new trajectory starting points, and unmatched trajectory endpoints from the previous frame are marked as trajectory breakpoints, with a three-frame waiting-for-match window retained. Finally, broken trajectory splicing is performed. The similarity of the beginning and end of all broken trajectory segments is matched. The direction of motion, velocity deviation, and positional distance are combined to determine whether they belong to the same sperm's broken trajectory. Trajectory segments that meet the splicing conditions are connected and repaired. Next, point-by-point confidence is calculated. The detection response value, local background contrast, number of neighboring targets, and matching deviation value of each trajectory point are combined to calculate the point-level confidence for each location using a weighted average. Finally, the trajectory numbers, point-by-point pixel coordinates, acquisition timestamps, point-level confidence, and pixel physical calibration parameters are structured and stored to generate the final motion trajectory dataset with associated trajectory confidence, which is used for subsequent target trajectory filtering.
[0038] Step S20: The target trajectory is determined by the ratio of the high-frequency jitter energy of each trajectory in the trajectory dataset to the overall motion energy, combined with the trajectory abnormality features. The threshold for determining the trajectory abnormality features is determined by the distribution pattern of the motion trajectory of historical sperm samples.
[0039] High-frequency jitter energy is a quantitative indicator characterizing the energy fluctuations in the trajectory caused by imaging noise, positioning errors, and minor interferences. It is calculated by weighting the positional deviations between the original trajectory and the smoothed trajectory; a higher value indicates a more severe degree of noise interference. For example, the energy value corresponding to pixel-level jitter caused by inter-frame positioning errors. Overall motion energy is a quantitative indicator characterizing the energy contained in the overall forward movement of sperm. It is calculated by weighting the cumulative displacement of the smoothed trajectory relative to the starting point; a higher value indicates stronger overall sperm motility. For example, the displacement energy value corresponding to the straight-line forward movement of sperm. Trajectory anomaly features include the degree of trajectory breakage, target intersection risk, and inter-frame temporal fluctuation. For example, the number of breakpoints in the middle of the trajectory, the duration of overlap between two trajectories, and the amplitude of the inter-frame time difference fluctuation. The target trajectory is a set of valid trajectories that, after quality screening, meet the accuracy requirements of subsequent kinematic analysis and is the core input object for dual-path reconstruction and kinematic parameter calculation.
[0040] In this embodiment, the target trajectory screening process can be initiated in three ways. First, it can be initiated automatically after the dataset is generated. Once the motion trajectory dataset is generated, the system automatically starts the target trajectory screening process for routine automated detection. Second, it can be initiated manually by the user. The user adjusts the screening threshold according to the actual sample situation and then manually starts the screening process for customized screening of special samples. Third, it can be initiated for supplementary re-examination. When the number of valid trajectories obtained from the initial screening is insufficient, the threshold is automatically relaxed and the screening process is restarted to ensure that the number of valid trajectories meets the analysis requirements.
[0041] Once the target trajectory screening process is initiated, the energy ratio of each trajectory is calculated and trajectory anomaly features are extracted.
[0042] For example, there are two ways to implement energy ratio calculation and anomaly feature extraction. The first is a globally unified smoothing benchmark calculation method. After the screening process is officially started, smoothed trajectories are generated for all trajectories using a unified short-window smoothing parameter. Then, based on the unified smoothed trajectories, the high-frequency jitter energy and overall motion energy of each trajectory are calculated to obtain the energy ratio. At the same time, the three types of anomaly feature values of each trajectory are extracted uniformly. This method has a unified calculation benchmark, strong comparability of calculation results for different trajectories, and high consistency of screening criteria.
[0043] The second method is a trajectory-by-trajectory adaptive smoothing baseline calculation approach. This method adaptively adjusts the smoothing window length based on the length and point density of each trajectory, generating a smoothed trajectory of corresponding length. Then, based on this smoothed trajectory, the high-frequency jitter energy and overall motion energy of the corresponding trajectory are calculated to obtain the energy ratio. Simultaneously, the granularity of anomaly feature extraction is adaptively adjusted in conjunction with the trajectory's sampling density. This method can adapt to trajectories of different lengths and sampling rates, and the calculation results are more closely aligned with the actual situation of each trajectory, resulting in higher screening accuracy.
[0044] Once the energy ratio and anomaly characteristics of each trajectory are obtained, the target trajectory can be selected and determined based on the following methods.
[0045] In one alternative approach, a preset energy ratio threshold and sub-thresholds for three types of anomalies are established. The energy ratio and each anomaly value of each trajectory are then compared item by item with their respective thresholds. Trajectories exceeding any threshold are eliminated, and those meeting all threshold requirements are retained as the target trajectories. This method relies on fixed thresholds to achieve cascading filtering, offering intuitive logic, low computational complexity, and fast execution speed.
[0046] In another alternative approach, weighting coefficients corresponding to the energy ratio and the three types of anomaly features are preset. The energy ratio and each anomaly feature value of each trajectory are then normalized and weighted and fused to calculate a comprehensive quality score for each trajectory. Trajectories are then sorted from highest to lowest based on their comprehensive quality scores, and a preset number of trajectories are selected as target trajectories. This method does not require setting a hard threshold, allows for flexible adjustment of the screening rigor, and ensures that the number of valid trajectories meets the analysis requirements.
[0047] In an exemplary scheme for determining a target trajectory, a motion trajectory dataset associated with trajectory confidence is first loaded, and the smoothing window size and various filtering parameters are initialized. Then, trajectory smoothing preprocessing is performed, generating an initial smoothed trajectory for each trajectory using a short-window robust smoothing method, and calculating the positional deviation between the original coordinates and the smoothed coordinates point by point. Next, energy ratio calculation is performed, multiplying the point-by-point positional deviation by the corresponding point's point-level confidence and summing the results to obtain the high-frequency jitter energy of each trajectory. The square of the displacement of each point on the smoothed trajectory relative to the starting point is multiplied by the corresponding point's point-level confidence and summed to obtain the overall motion energy of each trajectory. The high-frequency jitter energy is divided by the overall motion energy to obtain the trajectory's noise energy ratio. Subsequently, anomaly feature extraction is performed, counting the number of breakpoints for each trajectory to obtain the trajectory breakage feature value, calculating the mean minimum distance between each trajectory and other trajectories to obtain the target intersection risk value, and calculating the standard deviation of the inter-frame time difference for each trajectory to obtain the inter-frame time fluctuation feature value. These three types of features together constitute the trajectory anomaly features. Next, a comprehensive quality score is calculated. Corresponding weight coefficients are assigned to the noise energy ratio, trajectory breakage characteristics, target crossover risk, and inter-frame temporal fluctuation characteristics. After normalizing each indicator, a weighted sum is obtained to obtain the comprehensive quality score for each trajectory. Finally, trajectory filtering is performed. Trajectories with comprehensive quality scores below a preset threshold are first removed. The remaining trajectories are then sorted from highest to lowest comprehensive quality score. When the number of valid trajectories reaches a preset minimum requirement, all qualified trajectories are identified as target trajectories. If the number of valid trajectories is insufficient, the threshold is appropriately relaxed until the minimum requirement is met. The final set of target trajectories is then output for subsequent dual-path reconstruction.
[0048] Step S30: Match the smoothing constraint strength according to the noise sensitivity of the target trajectory to construct the dual-path reconstruction result of the target trajectory.
[0049] Noise sensitivity is a comprehensive quantitative indicator characterizing the degree of noise interference on a trajectory. It is calculated by combining the trajectory's noise energy ratio with its anomaly characteristics. A higher value indicates a greater impact from noise and a stronger need for smoothing. For example, trajectories with high noise levels and numerous breaks have higher noise sensitivity. Smoothing constraint strength is a regularization coefficient used to control the smoothness of the path. It limits the curvature of the path by constraining the second-order difference amplitude; a higher value results in a smoother path, while a lower value indicates a path closer to the original trajectory points. Dual-path reconstruction is a combination of two paths reconstructed from the same original target trajectory using two different smoothing constraint strengths. One path preserves the true oscillation characteristics of the sperm head, while the other represents the average forward trend of the sperm. The two paths are aligned point-by-point according to timestamps, forming the basis for subsequent calculations of multi-dimensional kinematic parameters.
[0050] In this embodiment, the dual-path reconstruction process can be initiated in two ways. First, it can be initiated automatically after the target trajectory is determined. Once the target trajectory is filtered, the system automatically initiates the dual-path reconstruction process for routine automated analysis. Second, it can be initiated manually after parameter adjustment. The user adjusts the smoothing constraint level according to the analysis requirements and then manually initiates the reconstruction process for targeted morphological analysis.
[0051] Once the dual-path reconstruction process is initiated, the corresponding smoothing constraint strength is matched for each target trajectory.
[0052] For example, there are two ways to implement smooth constraint strength matching. The first is a fixed-level mapping matching method, which presets multiple noise sensitivity intervals. Each interval corresponds to a fixed set of smooth constraint strengths for curved paths and average paths, wherein the constraint strength of the curved path is always lower than that of the average path. The corresponding constraint strength level is directly mapped and matched according to the noise sensitivity interval to which each target trajectory belongs. This method is simple in logic, has a very small computational load, and a fast response speed.
[0053] The second method is a continuous function adaptive generation approach. This constructs a continuous mapping function from noise sensitivity to smoothing constraint strength. Based on the noise sensitivity of each target trajectory, the corresponding curve path constraint strength and average path constraint strength are calculated in real time. The constraint strength changes continuously with a positive correlation to the noise sensitivity, ensuring that the smoothness of each trajectory is accurately adapted to its own noise level. This method enables customized smoothing for each trajectory, achieving higher adaptation accuracy and preserving realistic motion characteristics to the greatest extent possible while filtering out noise.
[0054] Once the two differentiated smooth constraint strengths are obtained, the dual-path reconstruction results can be constructed based on the following method.
[0055] In one alternative approach, two different smoothing constraint strengths are used to construct corresponding smoothing optimization objectives. By minimizing these objectives, two independent paths are obtained, which are then aligned by timestamps and combined to form a dual-path reconstruction result. This method ensures that the two paths are solved independently without interference, and the computation process is stable and controllable.
[0056] In another alternative approach, a higher constraint strength is first used to obtain the average path. Then, using the average path as a reference and combining it with a lower constraint strength, a curved path is obtained. The two paths form a hierarchical relationship and are combined to form a dual-path reconstruction result. This method uses the average path as a reference to constrain the overall trend of the curved path, which can avoid large abnormal deviations in the curved path and result in stronger reconstruction stability.
[0057] In an exemplary scheme for determining the dual-path reconstruction result, the target trajectory set and the noise sensitivity of each trajectory are first loaded, and the robust loss function parameters and optimization solver are initialized. Then, smoothing constraint strength matching is performed. Based on the noise sensitivity of each trajectory, a first smoothing constraint strength for preserving the true oscillation and a second smoothing constraint strength for filtering noise are calculated using a continuous mapping function, where the first smoothing constraint strength is less than the second smoothing constraint strength. Next, optimization objective construction is performed. Using the point-by-point coordinates of the original trajectory as the fitting benchmark, the point-level confidence of the corresponding point is matched as a weight coefficient. The fitting deviation loss of each point is calculated using the robust loss function to construct the path fitting data term. A second-order difference operator is used to characterize the local curvature of the path. The first and second smoothing constraint strengths are substituted as regularization coefficients to construct two levels of path smoothing regularization terms. The path fitting data term is linearly superimposed with the two smoothing regularization terms to construct two path smoothing optimization objective functions corresponding to the curved path and the average path, respectively. Subsequently, a minimization process is performed. Iterative optimization algorithms are applied to minimize the two objective functions. After convergence, a curved path preserving the true oscillation characteristics of the sperm head and an average path filtering out high-frequency positioning jitter noise are generated. Finally, path alignment and binding are performed. The curved path and average path corresponding to the same target trajectory are aligned point-by-point according to the acquisition timestamp, and the trajectory number and corresponding confidence information are bound to generate a dual-path reconstruction result for that target trajectory. The reconstruction results of all trajectories are then summarized to obtain a complete set of dual-path reconstruction results, which are used for subsequent kinematic parameter calculations.
[0058] Step S40: Based on the dual-path reconstruction results, sperm kinematic parameters are calculated according to the robust endpoint estimation strategy, and the sperm kinematic parameters are weighted and summarized in combination with the trajectory confidence to obtain the kinematic analysis results.
[0059] Robust endpoint estimation strategy is a parameter estimation method used to accurately calculate the positions of the beginning and end endpoints of a trajectory and suppress endpoint noise and outlier interference. By eliminating outliers near the endpoints and using quantile statistics to estimate robust endpoint positions, it ensures the accuracy of motion duration and displacement calculations. Sperm kinematic parameters are a set of various indicators that quantify sperm motility and morphology, including basic velocity parameters such as curvilinear velocity, average path velocity, and linear velocity, as well as derived morphological parameters such as linearity, straightness, oscillation, head lateral swing amplitude, and whiplash crossover frequency, used to comprehensively assess sperm motility quality. Trajectory confidence is a comprehensive quantitative value characterizing the reliability of the entire trajectory, calculated by fusing the mean confidence level at each point, noise sensitivity, and trajectory anomaly degree. It is used for weighting parameters during parameter aggregation, ensuring that high-quality trajectories contribute a greater proportion to the results. Kinematic analysis results are a comprehensive output of sperm motility quality in a single-sample dimension, including the weighted summation value of various kinematic parameters, sample quality score, and explanation of the causes of abnormalities; it is the final output product of the analysis.
[0060] In this embodiment, the above-mentioned kinematic parameter calculation and summarization process can be initiated in three ways. First, it can be automatically initiated after dual-path reconstruction is completed. Once the dual-path reconstruction of all trajectories is finished, the system automatically initiates the parameter calculation and summarization process for routine automated detection. Second, it can be manually initiated after parameter selection. The user selects the type of kinematic parameters to be output and then manually initiates the calculation process for customized parameter output. Third, it can be initiated by merging multiple fields of view. Once multiple fields of view for the same sample have been reconstructed, all trajectory data are merged to uniformly initiate the parameter calculation and summarization process, thereby improving the representativeness of the sample results.
[0061] Once the parameter calculation and aggregation process is started, the kinematic parameters of a single trajectory are calculated based on the dual-path reconstruction results.
[0062] For example, there are two ways to calculate the kinematic parameters of a single trajectory. The first is a robust endpoint reference calculation method. This method first uses a robust endpoint estimation strategy to determine the first and last robust endpoints of the trajectory and the effective motion duration. Then, displacement, length, and velocity parameters are calculated based on the robust endpoints, and the derived morphological parameters are derived. This method has accurate endpoint positioning, is less affected by endpoint noise, and has high parameter calculation accuracy.
[0063] The second method is a point-by-point statistical baseline calculation method. This method does not perform special processing on endpoints, but directly calculates parameters such as average speed and average lateral sway amplitude based on point-by-point data along the entire path. Quantile statistics are used to suppress the influence of outliers. This method has a simple calculation process and low requirements for trajectory integrity.
[0064] Once the kinematic parameters of a single trajectory are obtained, the kinematic analysis results can be obtained by weighted summation in the following manner.
[0065] In one alternative approach, the overall reliability of each trajectory is first calculated as a weight. Then, a weighted average of all kinematic parameters across all trajectories is calculated to obtain a sample-level summary value for each parameter. This summary value is then combined with the sample quality score to generate the kinematic analysis results. This method is logically clear, and the parameters can be traced back to individual trajectories, facilitating subsequent verification and anomaly analysis.
[0066] In another alternative approach, point-by-point data from all trajectories are first weighted and fused according to point-level confidence levels to directly obtain sample-level motion characteristics. Then, sample-level kinematic parameters are calculated, and kinematic analysis results are generated by combining sample quality scores. This method eliminates the need for individual trajectory parameter calculations, resulting in high computational efficiency.
[0067] In an exemplary scheme for determining kinematic analysis results, the dual-path reconstruction results and corresponding point-level confidence scores of all target trajectories are first loaded, and robust estimation parameters and weighting coefficients are initialized. Then, robust endpoint estimation is performed. For the average path of each trajectory, points at the beginning and end with a predetermined proportion are removed. The positions of the robust endpoints at the beginning and end are calculated using quantile statistics. The effective motion duration of the trajectory is calculated in conjunction with the inter-frame effective connection flag. Simultaneously, the total curve length, the average path length, and the robust linear displacement are calculated. Next, basic velocity parameter calculation is performed. The total curve length, the average path length, and the robust linear displacement are divided by the effective motion duration to obtain the curve velocity, the average path velocity, and the linear velocity, respectively. Then, derived parameter calculation is performed. According to the velocity ratio normalization rule, the ratio of linear velocity to average path velocity is used to calculate linearity, the ratio of linear velocity to curve velocity is used to calculate straightness, and the ratio of average path velocity to curve velocity is used to calculate oscillation. Using the local tangent direction of the average path as a reference, the point-by-point lateral offset of the curved path is calculated. The head lateral swing amplitude is obtained using weighted quantile statistics combined with point-level confidence scores. The whiplash crossover frequency is obtained by statistically analyzing the number of valid crossovers using hysteresis crossover criteria. Next, a comprehensive trajectory confidence calculation is performed, integrating the mean point-by-point confidence score, noise sensitivity, and trajectory anomaly degree to calculate the comprehensive confidence score for each trajectory. Subsequently, a sample-level weighted aggregation is performed, using the product of the trajectory's comprehensive confidence score and the effective motion duration as weights to sum the kinematic parameters of all trajectories, obtaining the sample-level aggregated values for each parameter. Simultaneously, the number of valid trajectories and the proportion of abnormal trajectories are statistically analyzed to calculate the sample-level comprehensive quality score. Finally, the results are encapsulated, structurally packaging the aggregated kinematic parameter values, sample quality score, and anomaly explanations to generate the final kinematic analysis results for output and storage.
[0068] Further, please refer to Figure 2 , Figure 2This is a flowchart of the adaptive calculation process for sperm trajectory kinematic parameters in this application. First, the scanned video, real timestamp, and pixel-to-micrometer calibration values are input. After video quality control and trajectory preprocessing to remove dropped frames, out-of-focus segments, and excessively drifting segments, the original sperm head trajectory Z_k=(z_k,i,t_i,c_k,i) is obtained. The detection confidence, sharpness, proximity interference, and acceleration residual are fused to calculate the point-level confidence q(k,i). High-frequency jitter, trajectory breakage, crossover risk, and time interval fluctuations are evaluated to calculate the trajectory noise sensitivity eta(k). This completes the sperm motion tracking and detection processing based on the sperm microscopic scan video and pixel physical calibration parameters, resulting in a motion trajectory dataset with associated trajectory confidence. Subsequently, it is determined whether the trajectory meets the analysis conditions. If the analysis conditions are not met, the trajectory is removed or a retake is prompted. If the analysis conditions are met, the target trajectory is determined by the ratio of the high-frequency jitter energy of each trajectory in the trajectory dataset to the overall motion energy, combined with the trajectory anomaly characteristics. The smoothing intensity is adaptively determined based on the trajectory noise sensitivity eta(k), and the curve path P_c and the average path P_a are generated respectively. The dual-path reconstruction result of the target trajectory is obtained by matching the smoothing constraint intensity according to the noise sensitivity corresponding to the target trajectory. Based on this, the following parameters are calculated: Curvilinear Velocity (VCL), Straight Line Velocity (VSL), Average Path Velocity (VAP), Linearity (LIN), Straightness (STR), and Wobble (WOB). Robust endpoint estimation is used to reduce the impact of endpoint noise. Then, weighted quantile shift and hysteresis cross-validation are used to calculate the Amplitude of Lateral Head Displacement (ALH) and Beat Cross Frequency (BCF). The sperm kinematic parameters are calculated according to the robust endpoint estimation strategy. Finally, the single trajectory confidence R(k) is calculated. Multiple trajectories and multiple fields of view are weighted and summarized according to confidence. The sperm kinematic parameters are then weighted and summarized based on the trajectory confidence, and the kinematic parameters, confidence intervals, abnormal trajectory ratios, and repeat detections are output to obtain the kinematic analysis results.
[0069] Second Embodiment This embodiment provides an exemplary scheme for sperm motility trajectory tracking and confidence generation. In this example, invalid segments are first removed by frame-level quality screening of microscopic scanning videos to obtain a compliant video frame sequence. Then, sperm head detection and inter-frame correlation are performed on the compliant frame sequence to obtain a motion trajectory sequence. Subsequently, multi-dimensional features are fused point by point to calculate point-level confidence and bind it to trajectory points to generate a motion trajectory dataset with associated trajectory confidence. Step S10 includes steps A11 to A14: Step A11: Based on the microscopic scanning video and pixel physical calibration parameters, screen the video quality according to time frames, remove invalid segments, and obtain a compliant video frame sequence.
[0070] Step A12: Perform sperm motion tracking processing on the compliant video frame sequence, identify the target position of the sperm head frame by frame and associate the inter-frame correspondence to obtain the motion trajectory sequence.
[0071] Step A13: Based on the motion trajectory sequence, fuse the imaging evaluation value, the interference degree of nearby targets, and the motion acceleration residual point by point to calculate the point-level confidence value of the trajectory point.
[0072] Step A14: Associate the point-level confidence value corresponding to the trajectory point with the corresponding point in the motion trajectory sequence to obtain a motion trajectory dataset associated with the trajectory confidence.
[0073] Invalid segments are video clips with imaging quality defects that cannot support effective trajectory tracking. These include segments with excessively long frame drops, out-of-focus or blurry clips, and clips with excessive field-of-view drift. These are the segments to be removed during video quality screening. Examples include clips with more than three consecutive missing frames, out-of-focus clips where the sperm head outline is indistinguishable, and drift clips where the overall field-of-view shift exceeds the diameter of the sperm head. Compliant video frame sequences are the set of continuous video frames whose imaging quality meets tracking requirements after invalid segments have been removed through quality screening. Arranged in chronological order of acquisition timestamps, these sequences serve as qualified input for sperm motility tracking processing. Sperm motility tracking processing is a full-process image processing operation used to identify sperm head targets from microscopic video sequences, associate the same sperm identity across frames, and generate continuous motion trajectories. It includes two core steps: sperm head target detection and inter-frame target identity matching. The inter-frame correspondence is the identity matching association of the same sperm head target in adjacent video frames, serving as the core association basis for connecting discrete single-frame detection results into a continuous trajectory. The motion trajectory sequence is a set of coordinate points of the same sperm head that are strung together in chronological order. It contains three core fields: trajectory number, pixel coordinates, and corresponding collection timestamp for each trajectory. It is the input basis for point-level confidence calculation.
[0074] The imaging evaluation value is a quantitative indicator characterizing the clarity of the sperm head target area in a single frame image. It is calculated by weighting the target area contrast, edge sharpness, and grayscale uniformity; a higher value indicates better imaging quality. The neighboring target interference degree is a quantitative indicator characterizing the degree of interference from other sperm targets around the current trajectory point in its detection and identification. It is calculated by weighting the number of surrounding targets, minimum distance, and overlap area ratio; a higher value indicates more severe interference. The motion acceleration residual is a quantitative indicator characterizing the degree of deviation between the motion state of the current trajectory point and the motion trend of its neighbors. It is calculated by the difference between the instantaneous acceleration of the current point and the smooth acceleration of the neighborhood; a higher value indicates a higher probability that the point is an abnormal location. The point-level confidence value is a quantitative value characterizing the reliability of the location of a single trajectory point. It is calculated by fusing multiple dimensions of features, including imaging quality, neighborhood interference, and motion rationality. The value ranges from 0 to 1; a higher value indicates a more reliable location result for that point.
[0075] In this example, when performing video quality screening based on microscopic scanning video and pixel physical calibration parameters to obtain a compliant video frame sequence, the screening can be performed by traversing the entire frame one by one. The imaging parameters and frame timestamps of the video are read frame by frame, and the integrity, imaging clarity and field of view offset of each frame are checked. Frame segments that do not meet the requirements are eliminated, and a compliant video frame sequence is accumulated. Alternatively, a streaming skip-step sampling screening method can be used, in which key frames are extracted according to a fixed step size for quality verification. All frames of qualified segments are retained, and frame-by-frame fine screening is performed on suspected unqualified segments to accumulate a compliant video frame sequence, thereby completing the video quality screening process.
[0076] After acquiring the compliant video frame sequence, the sperm motility tracking processing flow is initiated. The target position of the sperm head is identified frame by frame in the compliant video frame sequence, and the inter-frame correspondence is associated through inter-frame target matching to generate a motion trajectory sequence. Next, based on the motion trajectory sequence, imaging evaluation values, neighboring target interference, and motion acceleration residuals are extracted point by point, and a point-level confidence value is calculated for each trajectory point through weighted fusion. Finally, the point-level confidence values are associated and bound to the corresponding points in the motion trajectory sequence to generate a motion trajectory dataset with associated trajectory confidence. This point-by-point confidence calculation through multi-dimensional feature fusion improves the reliability and distinguishability of trajectory points, providing an accurate confidence basis for subsequent adaptive smoothing and weighted parameter calculation.
[0077] For example, there are two ways to obtain a motion trajectory dataset with associated trajectory confidence. The first is a frame-by-frame global detection and optimal matching tracking method. After video quality screening, a pre-trained sperm head detection model is used to perform full-frame target detection on each frame of the compliant video frame sequence, outputting the center pixel coordinates and detection response values of all sperm heads. Then, a global optimal matching algorithm is used to perform identity association matching on all detected targets in adjacent frames, establishing inter-frame correspondences and generating a motion trajectory sequence. Subsequently, for each trajectory point, the imaging evaluation value of the corresponding detection area is extracted, the interference degree of neighboring targets is calculated, and the motion acceleration residual is calculated based on the previous and next neighboring points. After normalizing the three features, they are weighted and summed according to preset weights to obtain the point-level confidence value of the trajectory point. Finally, the confidence values of all points are bound to the corresponding trajectory points to generate a motion trajectory dataset with associated trajectory confidence. This method uses full-frame global detection and global optimal matching tracking logic, which provides comprehensive target recognition, accurate inter-frame matching, and is less prone to target omissions and identity mismatches, generating high-precision trajectory and confidence data.
[0078] The second method employs phase-enhanced local detection and incremental neighborhood tracking. During frame-by-frame video processing, phase difference enhancement is first applied to the current frame to highlight the edge contour of the sperm head. Then, local target detection is performed within a preset neighborhood of the endpoints of each trajectory from the previous frame, obtaining the sperm head coordinates at the corresponding position in the current frame. Incremental association of target identities is completed frame by frame, establishing inter-frame correspondences and generating a motion trajectory sequence. Simultaneously, based on the imaging response intensity of the current detection area, neighborhood matching deviation, and surrounding target distribution, the imaging evaluation value, neighboring target interference degree, and motion acceleration residual are calculated point by point, fusing them to obtain the point-level confidence value for the current point. After all frames are processed, the motion trajectory dataset with associated trajectory confidence is obtained. This method uses local incremental detection and neighborhood tracking processing logic, executed synchronously with the video frame processing flow, without requiring additional post-processing time. It has low computational load, high running speed, and can fully utilize the frame processing intervals to complete tracking and confidence calculation.
[0079] Furthermore, in the routine testing scenario of computer-aided sperm motility analysis of clinical semen samples, the sperm microscopic scanning video and the calibration coefficient μ (unit: micrometer / pixel) from pixel to physical length are first input. The video quality is screened frame by frame according to the time frame to remove invalid segments with missing frames, out-of-focus, or excessive drift, so as to obtain a compliant video frame sequence with imaging quality that meets the tracking requirements. Then, sperm motility tracking processing is performed on the compliant video frame sequence. The pixel coordinates z_k,i=(x_k,i,y_k,i) of each sperm head are identified frame by frame and the inter-frame correspondence is established to generate a motion trajectory sequence containing the original trajectory sequence Z_k={(z_k,i,t_i,c_k,i)|i=1,2,…,n_k} of the k-th trajectory, where t_i is the actual acquisition timestamp of the corresponding frame, c_k,i is the detection tracking confidence, and n_k is the number of valid points contained in the trajectory. Based on the point-by-point fusion imaging evaluation value of the motion trajectory sequence, the interference degree of nearby targets, and the motion acceleration residual, the point-level confidence q_k,i of the i-th trajectory point of the k-th trajectory is calculated by exponential function weighted fusion. During the calculation, the output result is truncated to limit it to a preset upper and lower limit range. Finally, the point-level confidence q_k,i corresponding to each trajectory point is associated and bound with the corresponding point in the motion trajectory sequence to obtain a motion trajectory dataset with associated trajectory confidence, providing an input basis for subsequent path reconstruction and parameter calculation. In the subsequent analysis process, features such as high-frequency jitter and trajectory breakage will be evaluated based on this dataset to calculate the trajectory noise sensitivity η_k and screen and determine the target trajectory. Based on η_k, the smoothing constraint strength is adaptively matched, and the curve path P_c,k and the average path P_a,k of the k-th trajectory are generated by solving for the value that minimizes the objective function to construct the dual-path reconstruction result. When calculating the horizontal normal vector of the average path, the tangent vector of the average path needs to be rotated by 90 degrees and normalized.Based on the dual-path reconstruction results, three basic velocity parameters—curvilinear velocity (VCL), straight-line velocity (VSL), and average path velocity (VAP)—were calculated. Three derived parameters—linearity (LIN), straightness (STR), and wobble (WOB)—were derived through velocity ratios. Simultaneously, weighted quantile statistics and hysteresis cross-validation were used to calculate the amplitude of lateral head displacement (ALH) and beat cross frequency (BCF). Finally, the trajectory confidence R_k for each trajectory was calculated, and the number of valid trajectories N_eff and the proportion of abnormal trajectories P_abn were statistically analyzed. Weighted summaries of multi-trajectory and multi-field data were performed according to confidence level to output complete sample-level sperm kinematic analysis results.
[0080] Third Embodiment This embodiment provides an exemplary scheme for trajectory quality screening and noise sensitivity calculation. In this example, short-window robust smoothing is first performed on each trajectory in the motion trajectory dataset to obtain an initial smooth trajectory. Then, the high-frequency jitter energy and the overall motion energy are calculated by combining point-level confidence weighting and the ratio is obtained. Subsequently, trajectory noise sensitivity is calculated by fusing trajectory anomaly features. Target trajectories are then selected based on thresholds and judgment rules. Step S20 includes steps B11 to B15: Step B11: Perform short-window smoothing on each trajectory in the motion trajectory dataset according to the robust smoothing rule to obtain the initial smoothed trajectory.
[0081] Step B12: Based on the initial smooth trajectory, a weighted calculation is performed by combining the point-level confidence values of each trajectory point to obtain the high-frequency jitter energy and overall motion energy of each trajectory.
[0082] Step B13: Calculate the ratio of the high-frequency jitter energy to the overall motion energy to obtain the trajectory noise energy ratio.
[0083] Step B14: The trajectory breakage degree, target crossing risk, and inter-frame time fluctuation degree of each trajectory are weighted and fused with the trajectory noise energy ratio to calculate the noise sensitivity of the trajectory.
[0084] Step B15: Based on the noise sensitivity threshold and trajectory validity judgment rules, filter all trajectories of the initial smooth trajectory, remove low-quality trajectories that do not meet the analysis conditions, and obtain the target trajectory.
[0085] Robust smoothing rules are smoothing criteria used to suppress random positioning noise in a trajectory while preserving the true motion trend. A robust loss function replaces the least squares loss, reducing the bias caused by outliers and serving as the basis for short-window smoothing. Short-window smoothing is a signal processing operation that uses a fixed-length sliding window to locally smooth the trajectory. The window length is much smaller than the total trajectory length, used to filter out high-frequency positioning jitter while preserving local motion characteristics; it is the processing method for generating the initial smoothed trajectory. The initial smoothed trajectory is the transition trajectory obtained after applying robust short-window smoothing to the original trajectory. It preserves the overall motion trend and low-to-mid-frequency oscillation characteristics of the sperm, filtering out most of the high-frequency positioning noise, and serves as the benchmark trajectory for energy calculation and noise assessment. The trajectory noise-energy ratio is the ratio of high-frequency jitter energy to overall motion energy, used to normalize and characterize the relative proportion of noise components in the trajectory. A higher ratio indicates a greater proportion of noise in the motion and poorer trajectory quality.
[0086] The degree of trajectory breakage is a quantitative indicator characterizing the continuity defects of the trajectory. It is calculated by statistically analyzing the number of trajectory breakpoints and the ratio of the breakpoint interval duration to the total trajectory duration. A higher value indicates poorer trajectory continuity. Target crossover risk is a quantitative indicator characterizing the risk of trajectory interference from other nearby sperm targets and identity mismatch. It is calculated by calculating the average minimum distance between the trajectory and other trajectories and the percentage of overlap duration. A higher value indicates more severe target crossover interference. Inter-frame temporal fluctuation is a quantitative indicator characterizing the uniformity of trajectory sampling time. It is obtained by calculating the ratio of the standard deviation of the inter-frame time difference to the average inter-frame time. A higher value indicates greater sampling time fluctuation and a less stable time base. Noise sensitivity is a comprehensive quantitative indicator characterizing the overall degree of noise interference and quality defects of the trajectory. It is obtained by weighted fusion of the noise energy ratio and three types of trajectory anomaly features. A higher value indicates poorer trajectory quality and a stronger need for smoothing processing. The noise sensitivity threshold is a critical value used to determine whether a trajectory meets the analysis conditions and is a core parameter of the trajectory validity judgment rule. The trajectory validity determination rule is a classification rule based on noise sensitivity threshold to determine trajectory quality, used to distinguish between valid target trajectories and low-quality trajectories. Low-quality trajectories are those whose noise sensitivity exceeds the threshold, have serious quality defects, and cannot support subsequent accurate kinematic analysis; they are the objects to be eliminated in the screening process.
[0087] In this example, when performing short-window smoothing on each trajectory in the motion trajectory dataset according to the robust smoothing rule to obtain the initial smoothed trajectory, it can be done by sliding the smoothing point by point with a fixed window. The sliding window of a preset length slides along the trajectory time sequence point by point, and the robust smoothing operation is performed on the trajectory points within the window to obtain each smoothed point in turn. The smoothed points are then concatenated to generate the initial smoothed trajectory. Alternatively, it can be done by using an adaptive window length smoothing method. The length of the smoothing window is adaptively adjusted according to the point density and local fluctuation of the trajectory. The window is shortened in the volatile section to preserve details and lengthened in the smooth section to enhance the denoising effect. After performing the smoothing operation segment by segment, the smoothed points are concatenated to generate the initial smoothed trajectory, thus completing the trajectory smoothing preprocessing.
[0088] After generating the initial smoothed trajectory, the energy calculation process is initiated. Based on the initial smoothed trajectory and the point-level confidence values of each trajectory point, a weighted calculation is performed to obtain the high-frequency jitter energy and overall motion energy of each trajectory. The ratio of these two values is then calculated to obtain the trajectory noise energy ratio. Next, three types of abnormal features are extracted for each trajectory: trajectory breakage degree, target intersection risk, and inter-frame temporal fluctuation degree. These features are then weighted and fused with the trajectory noise energy ratio to calculate the noise sensitivity of each trajectory. Finally, according to preset noise sensitivity thresholds and trajectory validity judgment rules, a quality screening is performed on all initial smoothed trajectories, eliminating low-quality trajectories that do not meet the analysis conditions, resulting in target trajectories for subsequent path reconstruction. This multi-dimensional feature fusion-based noise sensitivity quantification and hierarchical screening improves the accuracy of trajectory quality screening and avoids interference from low-quality trajectories in subsequent kinematic parameter calculations.
[0089] For example, there are two methods for calculating the target trajectory. The first is a trajectory-by-trajectory serial threshold cascade screening method. First, the initial smooth trajectory and corresponding point-level confidence of each trajectory are read sequentially according to the trajectory number. The ratio of high-frequency jitter energy, overall motion energy and trajectory noise energy is calculated for each trajectory. Then, three types of abnormal feature values, namely trajectory breakage degree, target crossover risk and inter-frame time fluctuation degree, are calculated sequentially. The noise energy ratio and the three types of abnormal feature values are compared with the corresponding preset sub-thresholds item by item. If any item exceeds the threshold, it is judged as a low-quality trajectory and removed. If all items meet the threshold requirements, it is judged as a valid target trajectory and retained. After all trajectories have been compared and judged item by item, all retained valid trajectories are summarized to obtain the target trajectory set. This method adopts the logic of trajectory-by-trajectory serial calculation and sub-threshold cascade judgment. The calculation process is independent and controllable, the judgment rules are clear and explicit, and it can accurately remove low-quality trajectories with serious defects in a single dimension.
[0090] The second method is a multi-feature fusion scoring parallel screening approach. First, it batch-reads the initial smoothed trajectory data and corresponding point-level confidence scores of all trajectories. Then, it calculates in parallel the high-frequency jitter energy, overall motion energy, trajectory noise energy ratio, and three types of abnormal feature values for all trajectories. After normalizing each indicator, it weights and fuses them according to preset weight coefficients to calculate the comprehensive noise sensitivity score for each trajectory. Next, it compares the comprehensive noise sensitivity scores of all trajectories with a preset comprehensive threshold in batches. Trajectories with scores higher than the threshold are judged as low-quality trajectories and removed, while those with scores lower than or equal to the threshold are judged as valid target trajectories and retained. Finally, it summarizes these to obtain the target trajectory set. This method employs the logic of multi-indicator parallel calculation and comprehensive scoring judgment, resulting in high computational efficiency. The screening strictness of each dimension can be flexibly adjusted through weights, comprehensively balancing the quality performance of each dimension of the trajectory.
[0091] For example, in the scenario of trajectory quality pre-screening for routine semen analysis in a reproductive center, firstly, a short-window robust smoothing process is performed on each sperm trajectory in the motion trajectory dataset according to robust smoothing rules. A lightweight median filter is used to generate a temporary trajectory z_tilde_k,i for the k-th trajectory, resulting in an initial smoothed trajectory. Based on the initial smoothed trajectory, a point-by-point weighted operation is performed using the point-level confidence q_k,i of the i-th trajectory point of the k-th trajectory to calculate the high-frequency jitter energy (E_high,k) and the overall motion energy (E_low,k). The high-frequency jitter energy is calculated as E_high,k = Σ_i q_k,i × ||z_k,i - z_tilde_k,i||², and the overall motion energy is calculated as E_low,k = Σ_i q_k,i × ||z_tilde_k,i - z_tilde_k,1||² + ε, where ε is a minimum value to prevent the denominator from being zero. The high-frequency jitter energy is compared with the overall motion energy to obtain the trajectory noise energy ratio. Then, three anomaly features—track breakage rate (G_k), track cross risk (X_k), and inter-frame time interval variation coefficient (T_k)—are multiplied by their corresponding weighting coefficients β_1, β_2, and β_3, respectively, and weighted and fused with the trajectory noise energy ratio. The trajectory noise sensitivity (η_k) for each trajectory is calculated using η_k = E_high,k / E_low,k + β_1×G_k + β_2×X_k + β_3×T_k. A higher η_k indicates that the corresponding trajectory is more susceptible to positioning noise and tracking anomalies, and the subsequent smoothing intensity should be increased accordingly. Finally, based on a preset noise sensitivity threshold and trajectory validity judgment rules, a quality screening is performed on all initial smoothed trajectories, eliminating low-quality trajectories that do not meet the analysis conditions, resulting in a target trajectory set for subsequent path reconstruction.
[0092] Fourth embodiment This embodiment provides an exemplary scheme for trajectory energy weighted quantization calculation. In this example, the original trajectory points are first matched with the initial smoothed trajectory points according to their timestamps, and the squared position deviation is calculated point by point. Then, the high-frequency jitter energy is obtained by weighting the points with point-level confidence. Simultaneously, the squared displacement value is calculated point by point based on the smoothed trajectory starting point, and the overall motion energy is obtained by weighting and accumulating the values with point-level confidence. This accurately quantifies the intensity of the high-frequency noise component of the trajectory and the overall motion energy level. Please refer to... Figure 3 , Figure 3 This is a flowchart illustrating the fourth embodiment of the control method for sperm motility trajectory analysis in this application. Step B12 includes steps C11 to C15: Step C11: Match the original trajectory points of each trajectory with the points of the initial smoothed trajectory according to the timestamp, calculate the squared positional deviation between the original coordinates and the smoothed coordinates point by point, and generate a point-by-point deviation sequence.
[0093] Step C12: Multiply the point-by-point deviation sequence with the point-level confidence value corresponding to the trajectory point point by point to obtain the product result.
[0094] Step C13: Accumulate the product results of all the trajectory points to obtain the high-frequency jitter energy of the trajectory.
[0095] Step C14: Using the starting position of the initial smooth trajectory as a reference, calculate the square value of the displacement of each trajectory point relative to the starting point of the initial smooth trajectory point by point.
[0096] Step C15: Based on the squared displacement value, and combined with the point-level confidence weighted summation of the corresponding trajectory points, the overall motion energy of the trajectory is obtained.
[0097] The original trajectory points are the unsmoothed sperm head coordinates obtained directly from tracking and detection, containing horizontal and vertical coordinates in the pixel plane. They are the fundamental data characterizing the original sperm localization results. For example, the sperm head pixel coordinates of the k-th trajectory in the i-th frame are z_k,i = (x_k,i,y_k,i). The squared position deviation is the square of the Euclidean distance between the original and smoothed coordinates at the same moment. It is used to quantify the high-frequency jitter amplitude of a single point, avoiding square root operations and improving computational efficiency. The point-by-point deviation sequence is a sequence of squared position deviations of all points arranged in chronological order, serving as an intermediate sequence for calculating high-frequency jitter energy. The squared displacement is the square of the Euclidean distance between each point on the smoothed trajectory and the starting point, used to quantify the cumulative motion amplitude of a single point relative to the starting point.
[0098] In this example, when matching the original trajectory points of each trajectory with the points of the initial smoothed trajectory according to the timestamp to generate a point-by-point deviation sequence, it can be done by using a point-by-point temporal hard alignment matching method. Using the timestamp as a unique identifier, the points of the original trajectory and the smoothed trajectory are matched according to the same timestamp. For points that are completely matched, the squared position deviation value is directly calculated. Points with missing matches are marked as invalid points and removed. The point-by-point deviation sequence is generated cumulatively. Alternatively, a neighborhood interpolation soft alignment matching method can be used. For points with small time offsets, the smoothed coordinate value at the corresponding time is calculated using linear interpolation. Then, the squared position deviation value is calculated with the original coordinates. The point-by-point deviation sequence is generated cumulatively, thus completing the temporal alignment and deviation calculation of the points.
[0099] After generating the point-by-point deviation sequence, the high-frequency jitter energy calculation process is initiated. The point-by-point deviation sequence is multiplied point-by-point by the point-level confidence value of the corresponding trajectory point to obtain the weighted deviation value for each point. The weighted deviation values of all points are then accumulated to obtain the high-frequency jitter energy of the trajectory. Simultaneously, the overall motion energy calculation process is initiated. Using the starting position of the initial smoothed trajectory as a reference, the squared displacement value of each smoothed point relative to the starting point is calculated point-by-point. This value is then weighted point-by-point by the corresponding point-level confidence value and accumulated to obtain the overall motion energy of the trajectory. This point-level confidence weighting mechanism improves the reliability of the energy calculation results and reduces the interference of low-confidence outlier points on the energy quantification results.
[0100] For example, there are two methods for calculating the high-frequency jitter energy and the overall motion energy. The first method is a single-track point-by-point serial weighted accumulation method. Each track is processed sequentially according to its track number. For a single track, starting from the starting point, it traverses point by point along the time sequence, calculating the squared value of the position deviation and the squared value of the displacement of the current point. These values are then multiplied by the corresponding point-level confidence value and accumulated into the corresponding energy variable. After traversing all points, the high-frequency jitter energy and the overall motion energy of the track are output. This method uses a point-by-point serial traversal and real-time accumulation calculation logic. The calculation process is independent and controllable, and intermediate results are traceable, facilitating the location and investigation of abnormal points.
[0101] The second method is a multi-track block-based parallel weighted accumulation approach. All trajectories are divided into multiple calculation blocks based on length and number of points. Each block contains multiple complete trajectories or multiple consecutive point segments of a single trajectory. Parallel calculations are initiated simultaneously for all blocks. Within each block, point-by-point deviation, displacement calculations, and confidence weighting are performed to obtain the block-level accumulation result. After all blocks have completed their calculations, the block-level results are summarized and concatenated according to trajectory affiliation to obtain the high-frequency jitter energy and overall motion energy of each trajectory. This method employs block partitioning and multi-block parallel calculation logic, which can fully utilize parallel computing power to improve computational efficiency and shorten the energy calculation time for a large number of trajectories.
[0102] For example, in the scenario of quantifying the reliability of trajectory points in computer-aided sperm motility analysis of semen samples, a point-level confidence (q_k,i) is calculated for the i-th detection point of the k-th trajectory to describe the reliability of this point as an input for subsequent kinematic calculations. The point-level confidence score is determined by five features: detection confidence (c_k,i), focus score (F_i) based on sharpness evaluation, local contrast score (C_i), neighboring target interference score (N_k,i), and acceleration residual score (A_k,i). The calculation formula is q_k,i = truncated(c_k,i × F_i × C_i × N_k,i × A_k,i, q_min, 1), where q_min is the preset minimum confidence score, and the truncation operation means that the product result is limited to the numerical range of q_min to 1. The neighboring target interference score is calculated according to the exponential function [-d_k,i² / (2σ_d²)], where d_k,i represents the distance between the current trajectory point and the nearest other sperm head candidate point, and σ_d is the preset distance influence coefficient. The smaller d_k,i is, the higher the risk of trajectory intersection or overlap, and the lower the corresponding neighboring target interference score N_k,i.
[0103] Fifth Embodiment This embodiment provides an exemplary scheme for adaptive dual-path trajectory reconstruction. In this example, two differentiated smoothing constraint strengths are first obtained by matching the noise sensitivity corresponding to the target trajectory through a mapping function. Then, a path smoothing optimization objective function is constructed by combining point-level confidence and a robust loss function, and the minimization solution is performed. The two paths are aligned and bound according to timestamps to generate the dual-path reconstruction result of the target trajectory. Step S30 includes steps D11~D13: Step D11: Based on the noise sensitivity corresponding to the target trajectory, two differentiated smoothing constraint strengths are obtained through mapping function matching, wherein the smoothing constraint strengths include a first smoothing constraint strength and a second smoothing constraint strength.
[0104] Step D12: Based on the first smoothing constraint strength and the second smoothing constraint strength, construct the path smoothing optimization objective function by combining the point-level confidence values of each trajectory point and the robust loss function, and minimize it to obtain the curved path and the average path.
[0105] Step D13: Align and bind the curve path and the average path corresponding to the target trajectory point by point according to the timestamp to generate the dual-path reconstruction result of the target trajectory.
[0106] Mapping functions are transformation functions that establish the correspondence between noise sensitivity and smoothing constraint strength. They are divided into two categories: piecewise step mapping functions and continuous monotonic mapping functions. These functions are used to adaptively adjust the smoothing degree based on trajectory quality, achieving a positive match between noise level and smoothing strength. The first smoothing constraint strength is the lower smoothing coefficient among the two differential constraint strengths, used to generate a curved path that preserves the true oscillation characteristics of the sperm head, with a weaker constraint on path curvature. The second smoothing constraint strength is the higher smoothing coefficient among the two differential constraint strengths, used to generate an average path representing the average forward trend of sperm, with a stronger constraint on path curvature. Robust loss functions are robust loss functions used to replace least squares loss. They have a more gradual increase in penalties for large deviation points, reducing the bias caused by abnormal localization points on path fitting and improving the anti-interference ability of path reconstruction. Examples include the Huber loss function and the Tukey bisquared loss function.
[0107] The path smoothing optimization objective function is an optimization objective formed by the linear superposition of path fitting data terms and smoothing regularization terms. Minimizing this function value is the criterion for finding the optimal path, and it is the core mathematical model for path reconstruction. The curved path, reconstructed using low constraint strength, preserves the true lateral oscillation characteristics of the sperm head and serves as the benchmark for calculating morphological parameters such as head lateral oscillation amplitude and whiplash crossover frequency. The average path, reconstructed using high constraint strength, filters out high-frequency positioning jitter and small-amplitude oscillations, representing the overall average forward trend of the sperm and serving as the benchmark for calculating fundamental parameters such as average velocity and linear displacement.
[0108] In this example, when matching two differentiated smoothing constraint strengths based on the noise sensitivity of the target trajectory using a mapping function, a fixed-level segmented mapping approach can be used. Multiple noise sensitivity intervals are preset, each interval corresponding to a fixed first and second smoothing constraint strength. The corresponding constraint strength level is directly mapped and matched based on the interval to which the noise sensitivity of the target trajectory belongs. Alternatively, a continuous function adaptive mapping approach can be used, constructing a continuously monotonically increasing function from noise sensitivity to smoothing constraint strength. The corresponding first and second smoothing constraint strengths are calculated in real-time based on the noise sensitivity of each target trajectory, ensuring that the smoothness of each trajectory accurately matches its own noise level, thus achieving adaptive matching of the smoothing constraint strength.
[0109] After matching the smoothing constraint strengths, the path optimization solution process is initiated. Based on the first and second smoothing constraint strengths, and combined with the point-level confidence values and robust loss functions of each trajectory point, corresponding path smoothing optimization objective functions are constructed. These are then minimized using an iterative optimization algorithm, yielding the curved path and the average path. The curved path and average path corresponding to the same target trajectory are then aligned point-by-point according to timestamps and bound with trajectory numbers, confidence levels, and other associated information to generate a dual-path reconstruction result for the target trajectory. This noise-adaptive differentiated dual-path reconstruction filters out localization noise while preserving the true morphological characteristics of sperm movement to the greatest extent possible, improving the accuracy and scene adaptability of path reconstruction.
[0110] For example, there are two ways to obtain the dual-path reconstruction result. The first is a dual-objective independent serial solution method. Each target trajectory is processed sequentially according to its trajectory number. For each trajectory, two smoothing constraint strengths are first matched to obtain two independent optimization objective functions for the corresponding curve path and average path, respectively. The two objective functions are then minimized sequentially to obtain two paths, which are then aligned and bound by timestamps to generate the dual-path reconstruction result for that trajectory. After all trajectories have been processed sequentially, the dual-path reconstruction results for all target trajectories are summarized. This method uses a single-trajectory serial processing and dual-objective independent solution computational logic. The computation process is independent and controllable, and the parameters can be flexibly adjusted, facilitating the debugging of the reconstruction effect of a single trajectory and the troubleshooting of anomalies.
[0111] The second method is a dual-path hierarchical parallel solution. All target trajectories are divided into multiple computational groups based on noise sensitivity. Each computational group contains multiple target trajectories of the same sensitivity level, and parallel computation is initiated simultaneously for all computational groups. Within each computational group, the average path of all trajectories is first obtained using the second smoothing constraint strength. Then, using the average path as a benchmark and combining it with the first smoothing constraint strength, the corresponding curve path is obtained, forming a hierarchical association between the two paths. Finally, the dual-path reconstruction results are generated by aligning and binding according to timestamps. This method employs a hierarchical grouping and multi-group parallel computation logic, which can fully utilize parallel computing power to improve reconstruction efficiency. Simultaneously, using the average path as a benchmark to constrain the overall trend of the curve path can avoid large abnormal deviations in the curve path, resulting in stronger reconstruction stability.
[0112] For example, in the adaptive path smoothing reconstruction scenario of a fully automated sperm quality analyzer, the system calculates and determines the curvilinear path smoothing strength (λ_c,k) and the average path smoothing strength (λ_a,k) based on the track noise sensitivity (η_k) of each trajectory. The curvilinear path is used for calculating curvilinear velocity (VCL), which requires preserving the true swaying characteristics of the sperm head; therefore, its smoothing strength is set to be lower. The average path is used for calculating parameters such as average path velocity (VAP), amplitude of lateral head displacement (ALH), and beat cross frequency (BCF); which requires filtering out high-frequency positioning noise to characterize the overall movement trend; therefore, its smoothing strength is set to be higher. Both are calculated using the following formulas: λ_c,k = λ_c,min + (λ_c,max - λ_c,min) × η_k / (η_k + τ_c), λ_a,k = λ_a,min + (λ_a,max - λ_a,min) × η_k / (η_k + τ_a), satisfying the constraint relationship λ_a,k ≥ λ_c,k, where τ_c and τ_a are preset sensitivity adjustment constants. Through the above adaptive smoothing intensity determination mechanism, clear and stable low-noise trajectories in the same microscopic video can retain more realistic motion details, while trajectories with higher noise levels automatically increase the smoothing constraint intensity, achieving a positive adaptive match between smoothing degree and trajectory quality.
[0113] Sixth Embodiment This embodiment provides an exemplary scheme for constructing and solving the objective of path smoothing optimization. In this example, the coordinates of the target trajectory points are first used as the fitting benchmark. A path fitting data term is constructed by combining point-level confidence weights and a robust loss function. Then, a second-order difference operator is used to characterize the path curvature, and two smoothing regularization terms are constructed by combining differentiated smoothing constraint strengths. These are then superimposed to generate the optimization objective functions corresponding to the two paths, and a minimization solution is performed to obtain a dual-reconstruction path that retains the true oscillation characteristics and filters out high-frequency noise, respectively. Please refer to... Figure 4 , Figure 4 This is a flowchart illustrating the sixth embodiment of the control method for sperm motility trajectory analysis in this application. Step D12 includes steps E11 to E14: Step E11: Using the point coordinates of the target trajectory as the fitting benchmark, match the point-level confidence values corresponding to each trajectory point as weight coefficients, and construct path fitting data items in combination with the robust loss function.
[0114] Step E12: Characterize the local curvature of the path using a second-order difference operator, and substitute the first smoothing constraint strength and the second smoothing constraint strength as regularization coefficients to construct path smoothing regularization terms with two different smoothing levels.
[0115] Step E13: The path fitting data terms are linearly superimposed with the two types of path smoothing regularization terms to construct path smoothing optimization objective functions corresponding to the curve path and the average path, respectively, and the minimum value of the path smoothing optimization objective function is taken as the solution criterion for the optimal path.
[0116] Step E14: Minimize the objective functions of the two path smoothing optimizations respectively to generate the curved path that preserves the true swing characteristics of the sperm head and the average path that filters out high-frequency positioning jitter noise.
[0117] The point coordinates of the target trajectory are the pixel planar coordinates of each sampled point on the valid trajectory after quality screening, arranged in order of collection timestamp, and serve as the original baseline data for path fitting. For example, the coordinates of the i-th sampled point of the k-th target trajectory are z_k,i=(x_k,i,y_k,i). The weighting coefficient is the contribution ratio assigned to each fitting point, and its value is the point-level confidence value of the corresponding point. This gives higher weight to the influence of high-confidence points on the fitting result, while naturally suppressing the influence of low-confidence outlier points. The path fitting data term is the loss term characterizing the degree of fit between the reconstructed path and the original trajectory points. It is obtained by weighting and summing the fitting deviations of each point after mapping with a robust loss function, and is a core component of the optimization objective function. The second-order difference operator is a discrete difference operator used to quantify the local curvature of the path. It calculates the second-order difference value through the coordinate difference of three adjacent points. The larger the value, the greater the local curvature of the path, and it is the core mathematical operator for constructing the smoothing regularization term. The path smoothing regularization term is a regularization term used to constrain the curvature of the path and suppress high-frequency jitter. It is obtained by multiplying the sum of squares of the second-order differences of the entire path by the smoothing constraint strength, and is used to balance the fitting accuracy and smoothness of the path.
[0118] In this example, when constructing path fitting data items using the point coordinates of the target trajectory as the fitting reference, a robust point-by-point deviation mapping method can be used. The Euclidean deviation between the reconstructed path points and the original trajectory points is calculated point by point, substituted into the robust loss function to obtain the single-point loss value, and then multiplied by the point-level confidence of the corresponding point as a weighting coefficient. The weighted loss values of all points are then summed to obtain the path fitting data items. Alternatively, a segmented mean weighted calculation method can be used, dividing the entire trajectory into multiple continuous segments according to the point density. The segmented average confidence is uniformly used as the weight for the points in each segment. The fitting loss is calculated segment by segment and then summed to obtain the path fitting data items. This completes the flexible construction of path fitting data items.
[0119] After constructing the path fitting data, the smoothing regularization term construction process is initiated. The local curvature at each location on the path is calculated using a second-order difference operator, and the first and second smoothing constraint strengths are substituted as regularization coefficients to construct two different levels of path smoothing regularization terms. The path fitting data is then linearly superimposed with the two path smoothing regularization terms to construct path smoothing optimization objective functions corresponding to the curved path and the average path, respectively. The criterion for finding the optimal path is to minimize the objective function value. Finally, minimization operations are performed on the two optimization objective functions to generate the corresponding curved path and average path. This combination of a confidence-weighted robust fitting mechanism and a differentiated smoothing regularization mechanism balances the fitting accuracy and noise resistance of path reconstruction, achieving differentiated and accurate reconstruction of dual paths.
[0120] For example, there are two methods for obtaining the curve path and the average path. The first is a point-by-point gradient descent serial solution method. For a single optimization objective function, the original trajectory points are used as the initial solution. The coordinates of the path points are iteratively adjusted point by point along the time sequence. The objective function value is calculated once for each adjusted point. The objective function value is continuously reduced by gradient descent until the iteration converges to obtain the optimal path. After solving for the curve path, the average path is solved using the same logic. This method uses point-by-point iteration and serial solution logic. The iteration process is controllable, the convergence accuracy can be flexibly adjusted, and it is convenient for debugging the reconstruction effect of a single trajectory and troubleshooting anomalies.
[0121] The second approach is a global parallel solution using sparse matrices. This method transforms the path smoothing optimization objective function into a sparse linear equation system. A sparse regularized matrix is constructed using second-order difference operators, and a diagonal weight matrix is built using point-level confidence scores. This results in a global linear equation system, which is then solved in parallel using a sparse matrix solver. This provides the optimal solution for all points along the entire path in one operation, generating both the curved path and the average path. This method employs matrix-based global solution and multi-objective parallel computation, resulting in high computational efficiency, good convergence stability, and the ability to solve two paths simultaneously, significantly improving the reconstruction speed of large batches of trajectories.
[0122] For example, in the trajectory reconstruction scenario of sperm motility feature quantification analysis, the system constructs a curved path (P_c,k, Curvilinear Path) for calculating the curved velocity (VCL, Curvilinear Velocity) and an average path (P_a,k, Average Path) for calculating parameters such as the average path velocity (VAP, Average Path Velocity), head lateral swing amplitude, and whiplash crossover frequency for each target sperm trajectory. The curved path P_c,k is obtained through robust optimization: P_c,k = the path P [Σ_i q_k,i × ρ(||p_i - z_k,i||²) + λ_c,k × Σ_i ||Δ²(p_i)||² ] that minimizes the objective function. The average path P_a,k is obtained through corresponding robust optimization: P_a,k = the path P [Σ_i q_k,i × ρ(||p_i - z_k,i||²) + λ_a,k ×Σ_i ||Δ²(p_i)||² ]. Where ρ( The robust loss function (Δp_i) can be either the Hubel robust loss function or the graphical dual-weight robust loss function, used to reduce the bias of outlier points on path fitting. Δ²p_i represents the second-order difference, used to constrain the local curvature of the path. Since the average path smoothing strength (λ_a,k) is greater than or equal to the curvilinear path smoothing strength (λ_c,k), the reconstructed P_a,k has higher smoothness than P_c,k. They each handle the calculation of kinematic parameters in different dimensions, thus avoiding noise amplification or oversmoothing defects caused by calculating all parameters simultaneously using the same path.
[0123] Seventh Embodiment This embodiment provides an exemplary scheme for calculating and weighting multi-dimensional sperm kinematic parameters. In this example, the effective motion duration is first calculated based on the dual-path reconstruction results and inter-frame effective connection flags. A robust endpoint estimation strategy is used to solve for robust endpoint positions, obtaining various lengths and displacements. Then, three types of basic velocities are calculated and derived kinematic parameters are derived. Next, the lateral offset is calculated based on the dual-path calculation, and the head lateral swing amplitude and whiplash crossover frequency are statistically obtained. Finally, weighted summarization is performed based on trajectory confidence, and the proportion of abnormal trajectories is determined to obtain sample-level kinematic analysis results. Step S40 includes steps F11~F16: Step F11: Based on the dual-path reconstruction results, calculate the effective motion duration of the trajectory by combining the inter-frame effective connection flag, and solve the robust endpoint positions at both ends of the trajectory according to the robust endpoint estimation strategy to obtain the total curve length, average total path length, and robust linear displacement.
[0124] Step F12: Divide the total curve length, the average path length, and the robust linear displacement by the effective motion time to obtain the curve velocity, the average path velocity, and the linear velocity.
[0125] Step F13: Based on the curve velocity, the average path velocity, and the linear velocity, process them according to the velocity ratio normalization rule to obtain derived kinematic parameters including linearity, straightness, and oscillation.
[0126] Step F14: Using the local tangent direction of the average path as a reference, calculate the point-by-point lateral offset of the curved path.
[0127] Step F15: Based on the point-by-point lateral offset, combined with the point-level confidence values of each trajectory point, the head lateral swing amplitude is obtained by weighted quantile statistics, and the whiplash cross frequency is obtained by counting the number of effective crossings through the hysteresis cross determination rule.
[0128] Step F16: The derived kinematic parameters, the head lateral swing amplitude, and the whiplash cross frequency are weighted and aggregated with the corresponding trajectory confidence, and the proportion of abnormal trajectories is determined to obtain the kinematic analysis results.
[0129] The inter-frame valid connection flag is an identifier representing the validity of trajectory connections between adjacent frames. It is determined by the confidence level and continuity of inter-frame target matching and is used to eliminate broken segments and invalid connections in the trajectory. It is the core basis for calculating the effective motion duration. For example, adjacent frames with a matching confidence level higher than a threshold and motion deviation within a reasonable range are marked as valid connections. The effective motion duration is the cumulative time length of all valid connections in the trajectory, excluding invalid durations corresponding to broken intervals and missing frames. It serves as the time reference for calculating velocity-related parameters. The robust endpoint positions are the coordinates of the first and last reliable endpoints of the trajectory obtained through robust estimation. They are not affected by local noise and outliers at the endpoints and serve as the reference positions for calculating linear displacement. The total curve length is the cumulative sum of the path lengths between all adjacent points on the curve path, representing the total distance traveled by the sperm head in actual motion. The average total path length is the cumulative sum of the path lengths between all adjacent points on the average path, representing the total distance traveled by the average sperm trajectory. The robust linear displacement is the Euclidean distance between the first and last robust endpoints, representing the net displacement of the sperm as a whole.
[0130] Curvilinear velocity is the average velocity calculated along the actual curved trajectory, equal to the total length of the curve divided by the effective movement time, reflecting the actual speed of sperm head movement. Average path velocity is the average velocity calculated along the average movement path, equal to the total length of the average path divided by the effective movement time, reflecting the overall average speed of sperm movement. Linear velocity is the average velocity corresponding to the linear displacement from the starting point to the ending point, equal to the robust linear displacement divided by the effective movement time, reflecting the net speed of sperm movement. The velocity ratio normalization rule is a calculation rule for derived morphological parameters obtained by normalizing the pairwise ratios of different velocity parameters, used to convert velocity quantities into dimensionless indicators characterizing movement morphology. Linearity is the ratio of linear velocity to curvilinear velocity, characterizing the overall straightness of the sperm movement trajectory; the closer the value is to 1, the closer the movement is to a straight line. Straightness is the ratio of linear velocity to average path velocity, characterizing the straightness of the average sperm movement path. Oscillability is the ratio of average path velocity to curvilinear velocity, characterizing the degree of influence of sperm head oscillation on the movement path.
[0131] The point-by-point lateral offset is the vertical distance of each point on the curved path relative to the corresponding point on the average path. It is calculated based on the local tangent direction of the average path and is the fundamental data for quantifying the amplitude of sperm head lateral swing. Weighted quantile statistics is a method of performing quantile statistics on the data sequence by combining point-level confidence weights. Points with higher confidence have higher statistical weights, which can effectively improve the reliability of quantile statistics results. The amplitude of sperm head lateral swing is the lateral swing amplitude of the sperm head relative to the average path. It is obtained through weighted quantile statistics of point-by-point lateral offset and reflects the magnitude of sperm head swing. The hysteresis crossover determination rule is the rule for determining whether the curved path has effectively crossed the average path. A hysteresis threshold is set to avoid false counting caused by minor jitters. Only when the lateral offset crosses zero and the amplitude exceeds the hysteresis threshold is it counted as a valid crossover. The whiplash crossover frequency is the frequency of effective crossovers of the curved path relative to the average path, equal to the number of effective crossovers divided by the effective movement duration, reflecting the speed of sperm head swing. The abnormal trajectory ratio is the ratio of the number of abnormal trajectories to the total number of valid trajectories. It is used to characterize the proportion of low-quality trajectories in the sample and is one of the core indicators for evaluating sample quality.
[0132] In this example, when calculating the effective motion duration and robust endpoint positions based on the dual-path reconstruction results, a quantile estimation method with a fixed ratio at the beginning and end of the trajectory can be used. Points at a predetermined ratio at both ends of the trajectory are removed, and the robust endpoint positions are calculated using quantile statistics on the coordinates of the remaining endpoint neighborhoods. Simultaneously, the effective inter-frame connection markers are statistically analyzed frame by frame to determine the effective cumulative duration, thus obtaining the effective motion duration. The total curve length, average path length, and robust linear displacement are then calculated cumulatively. Alternatively, an iterative robust fitting method can be used to fit a local motion trend line within the endpoint neighborhood at the beginning and end of the trajectory. The endpoints of the trend line are used as robust endpoint positions, and the effectiveness of inter-frame connections is verified segment by segment, accumulating the effective duration to obtain the effective motion duration and various length displacements. This completes the robust estimation and duration calculation of the endpoints.
[0133] After obtaining the effective motion duration and various length displacements, the calculation process for basic velocities and derived parameters is initiated. The total curve length, average path length, and robust linear displacement are divided by the effective motion duration to obtain the curve velocity, average path velocity, and linear velocity, respectively. Then, based on the three basic velocities, the velocity ratio is normalized to calculate three types of derived kinematic parameters: linearity, straightness, and oscillation. Simultaneously, the calculation process for lateral swing and crossover parameters is initiated. Using the local tangent direction of the average path as a reference, the lateral offset of the curve path relative to the average path is calculated point-by-point. Based on the point-by-point lateral offset and the point-level confidence values of each trajectory point, the head lateral swing amplitude is obtained through weighted quantile statistics. The effective number of crossings is counted using hysteresis crossover determination rules to calculate the whiplash crossover frequency. Finally, all kinematic parameters are weighted and summed with the corresponding trajectory confidence, and the proportion of abnormal trajectories is statistically analyzed to obtain sample-level kinematic analysis results. Through robust endpoint suppression, dual-path division of labor calculation, and confidence-weighted summarization, the accuracy and reliability of kinematic parameter calculations are comprehensively improved.
[0134] For example, there are two methods for calculating the kinematic analysis results. The first is a single-track serial calculation and step-by-step aggregation method. Each target trajectory is processed sequentially according to its trajectory number. For each trajectory, the effective motion duration and robust endpoint position are calculated first to obtain the total curve length, average path length, and robust linear displacement. Then, the basic velocity parameters, derived morphological parameters, head lateral swing amplitude, and whiplash cross frequency are calculated sequentially. After all parameters for a single trajectory are calculated, the parameters are accumulated into the sample-level summary variable based on the trajectory's reliability, while abnormal trajectories are marked. After all trajectories have been processed sequentially, the weighted summary value of each parameter and the proportion of abnormal trajectories are calculated to generate the final kinematic analysis result. This method uses a single-track serial calculation and step-by-step aggregation logic. The calculation process is independent and controllable, and intermediate results are traceable, facilitating the investigation of parameter anomalies and customized analysis for single trajectories.
[0135] The second approach is a multi-dimensional, block-based parallel computation and batch aggregation method. This method breaks down the parameter calculation tasks for all trajectories into three independent dimensions: basic velocity calculation, derived parameter calculation, and lateral swing crossover calculation. Corresponding computing resources are allocated to each dimension, and parallel computation is initiated synchronously. In the basic velocity dimension, the three types of basic velocities for all trajectories are calculated in batches; in the derived parameter dimension, the three types of derived parameters for all trajectories are calculated in batches; and in the lateral swing crossover dimension, the head lateral swing amplitude and whiplash crossover frequency for all trajectories are calculated in batches. After all dimensions are calculated, the trajectory confidence weights for each trajectory are uniformly matched, and batch weighted aggregation is performed on each parameter. Simultaneously, the proportion of abnormal trajectories is statistically analyzed to generate the final kinematic analysis results. This method employs dimensional decomposition and multi-block parallel computation logic, which can fully utilize parallel computing power to improve computational efficiency and shorten the parameter calculation time for large batches of samples.
[0136] Furthermore, the kinematic parameter calculation formula, assuming the effective time length is T. k =t n t1, let g be the flag indicating a valid connection between adjacent trajectory points. i When the time interval between two adjacent frames is too large, severe occlusion occurs, or trajectory stitching is unreliable, g i =0, otherwise g i =1. To avoid inflated speeds due to frame drops, the actual effective time is calculated using the following formula: T k e = Σ i=2 n g i · (t i t i-1 ); The curve path length, average path length, and robust linear displacement are as follows: LCL k = μ · Σ i=2 n g i · ||p k , i c p k , i-1 c ||; LAP k = μ · Σ i=2 n g i · ||p k , i a p k , i-1 a ||; D k = μ · ||ê k , n ê k ,1||; Among them, ê k ,1 and ê k , n Instead of directly taking the original start and end points, it is obtained by weighted robust centering of the average path's start and end points (m points). e_start,k = the value e that minimizes the objective function [Σ_i=1..m q_k,i × ρ(||e p_a,k,i||)];e_end,k=The value e that minimizes the objective function [Σ_i=n-m+1..n q_k,i × ρ(||e p_a,k,i||)]; The curve velocity, average path velocity, and straight velocity are calculated as follows: VCL k = LCL k / T k e ; VAP k = LAP k / T k e ; VSL k = D k / (t n t1); Linearity, straightness, and oscillation are calculated as follows: LIN k = 100% · VSL k / VCL k ; STR k = 100% · VSL k / VAP k ; WOB k = 100% · VAP k / VCL k ; To calculate ALH, we first use the average path tangent vector u k , i and normal vector n k , i a The signed offset of the curved path relative to the average path is obtained: u_k,i=normalized(p_a,k,i+1) p_a,k,i-1), n_a,k,i = rotate 90 degrees (u_k,i); s k , i = μ · (p k , i c p k , i a ) · n k , i a ; The amplitude of head lateral sway (ALH) is calculated using a weighted quantile of the absolute value of the signed offset to reduce the risk of an inflated maximum value caused by a single outlier. ALH k = 2 · Q 0. 95 ({|s k , i |}, weight q k , i ); Whiplash crossover frequency (BCF) uses hysteresis crossover counting. If s k , i Crossing from the positive side region greater than h to less than h If the negative side region of h is crossed, or if a cross is completed in the opposite direction, it is counted as a valid cross, resulting in: C k h BCF k = C k h / T k e ; The above formulas allow different noise reduction methods to be applied to different kinematic parameters: curve velocity (VCL) retains curve motion, average path velocity (VAP) and head lateral swing amplitude (ALH) are based on a smoother average path, and whiplash cross frequency (BCF) avoids false crosses caused by repeated jitter near the zero point through hysteresis threshold.
[0137] To avoid low-quality trajectories contaminating the overall results, this invention calculates the trajectory reliability R for each trajectory, based on parameter reliability and multi-view summarization. k This confidence level considers not only the average point-level confidence level, but also noise sensitivity, trajectory breakage rate, effective duration, and endpoint stability. R_k = average(q_k,i) × exponential function ( γ × η_k) × (1 G_k) × minimum value (1, T_e,k / T_0) × E_k; Where γ is the noise penalty coefficient, T0 is the minimum effective analysis time, and E k Score the endpoint stability. E k It can be calculated from the dispersion of the local trajectory points at the beginning and end: E_k = Exponential function { δ × [variance({p_a,k,i | i≤m}) + variance({p_a,k,i | i≥n)] m+1})]}; For a certain kinematic parameter θ, such as curvilinear velocity (VCL), average path velocity (VAP), amplitude of lateral head displacement (ALH) or beat cross frequency (BCF), the aggregated result of multiple trajectories is: θ= [Σ k R k · T k e · θ k / [Σ k R k · T k e ; To make the output of the product interpretable, the number of valid trajectories and the abnormal trajectory ratio are calculated simultaneously: N_eff = (Σ k R k )² / Σ k R k ²; P_abn = #{k | R k <R_min or η k >η_max} / K; Where R_min is the lower limit of trajectory reliability, η_max is the upper limit of noise sensitivity, and K is the total number of trajectories involved in the statistics.
[0138] When N_eff is lower than the preset threshold, the average reliability is lower than the threshold, or P_abn exceeds the threshold, the system does not directly output the formal result, but prompts to refocus, redilute, rescan or remove the corresponding field of view.
[0139] Wherein, T k : The original total duration of the k-th trajectory, which is the difference between the timestamp of the last frame and the timestamp of the first frame of the trajectory. T k e : The actual effective motion duration of the k-th trajectory, which is obtained by accumulating the durations of adjacent frames marked as effective connections. LCL k : The total curvilinear path length of the k-th trajectory, which is the physical length converted from the accumulated value of the distance between adjacent points on the curvilinear path in the effective connection segment via the pixel calibration coefficient. p k , i c : The pixel coordinate of the i-th point on the k-th curvilinear path, which is the output result of path reconstruction under low smoothness constraint. LAP k : The total average path length of the k-th trajectory, which is the physical length converted from the accumulated value of the distance between adjacent points on the average path in the effective connection segment via the pixel calibration coefficient. p k , i a: The pixel coordinates of the i-th point on the k-th average path, representing the output of path reconstruction under high smoothness constraints. D k : The robust linear displacement of the k-th trajectory, which is the physical linear distance between the first and last robust endpoints. k ,1: The coordinates of the first robust endpoint of the k-th trajectory, obtained by weighted robust estimation of the average path's first neighboring points, unaffected by endpoint noise. k , n : The coordinates of the robust endpoint of the k-th trajectory, obtained by weighted robust estimation of the average path endpoint neighborhood points, unaffected by endpoint noise. m: The number of head and tail neighborhood points used for robust endpoint estimation, determining the neighborhood range of the endpoint estimation. e_start,k: The optimal solution for the robust endpoint of the k-th trajectory, obtained by minimizing the robust loss objective function of the head and tail neighborhood points. ρ( ): Robust loss function, applying a squared penalty for small deviations and a sublinear penalty for large deviations, to reduce the bias of outliers on the estimation results. p_a,k,i: Coordinates of the i-th point on the k-th average path, representing the baseline path data for calculating the endpoint and lateral offset. e_end,k: The optimal solution for the robust endpoint at the end of the k-th trajectory, obtained by minimizing the robust loss objective function of the endpoint's neighborhood points. VCL k VAP: Curve velocity of the k-th trajectory, representing the average speed at which the sperm head moves along the actual curved path. k : Average path velocity of the k-th trajectory, representing the average speed at which the sperm travels along the average path of motion. VSL k : The linear velocity of the k-th trajectory, representing the average rate of net displacement of the sperm from the starting point to the ending point. LIN k STR: The linearity of the k-th trajectory, a dimensionless index characterizing the overall linearity of sperm motility trajectories. k The linearity of the k-th trajectory is a dimensionless index characterizing the straightness of the average sperm motility path. (WOB) k The oscillation of the k-th trajectory is a dimensionless index characterizing the degree to which sperm head oscillation affects the movement path. k , i : The average path tangent vector corresponding to the i-th point of the k-th trajectory, calculated by normalizing the difference between neighboring points, representing the local forward direction of the average path. n_a,k,i: The average path normal vector corresponding to the i-th point of the k-th trajectory, obtained by rotating the tangent vector by 90 degrees, representing the local vertical direction of the average path. s k , i : The signed lateral offset of the i-th point on the k-th trajectory, which is the physical lateral offset distance of the curved path relative to the average path, with positive and negative signs to distinguish the offset direction.
[0140] Q0. 95 ( , ): Weighted 95th percentile statistical function. Takes the dataset and corresponding weights as input, and outputs the 95th percentile values of the dataset. h: The amplitude threshold for hysteresis crossover detection, used to avoid false crossover counts caused by minor fluctuations near zero. C k h The effective number of intersections of the k-th trajectory, calculated using the hysteresis intersection rule to count the number of times the curve path crosses the average path. (BCF) k : Whiplash crossover frequency of the k-th trajectory, representing the frequency index of sperm head oscillation speed. R_k: Trajectory reliability of the k-th trajectory, a quantitative score of the overall trajectory reliability calculated by integrating multi-dimensional quality features. η_k: Trajectory noise sensitivity of the k-th trajectory, representing the degree to which the trajectory is affected by imaging noise and tracking anomalies. G_k: Trajectory breakage rate of the k-th trajectory, representing the severity of trajectory continuity defects. T_e,k: Effective motion duration of the k-th trajectory, related to T... k e Both have the same meaning and are used for trajectory reliability calculation. δ: Endpoint dispersion penalty coefficient, used to control the attenuation strength of endpoint dispersion on endpoint stability scores. θ: Weighted summation value of a kinematic parameter within a single sample, representing the sample-level result after weighting multiple trajectories according to reliability. k : The calculated value of the kinematic parameter for the k-th trajectory. N_eff: Number of valid trajectories, the number of equivalent valid trajectories calculated based on trajectory confidence, representing the sufficiency of the sample size in the statistical results. P_abn: Proportion of abnormal trajectories, the ratio of the number of abnormal trajectories to the total number of trajectories participating in the statistics, representing the overall quality level of the sample.
[0141] Eighth embodiment This embodiment provides an exemplary scheme for sample quality grading output and analysis traceability storage. In this example, three core quality indicators—average trajectory reliability, number of valid trajectories, and proportion of abnormal trajectories—are first extracted based on kinematic analysis results. These are then weighted and fused to generate a comprehensive quality score. Next, a dual-threshold comparison is used to determine the sample quality level and match corresponding output handling strategies. This leads to grading output and differentiated operation prompts, and the entire process's operating parameters and quality indicators are collected to generate standardized traceable records, which are then persistently stored. Please refer to... Figure 5 , Figure 5 This is a flowchart illustrating the eighth embodiment of the control method for sperm motility trajectory analysis in this application. Following step S40, steps G11-G14 are also included: Step G11: Based on the kinematic analysis results, determine the average trajectory reliability, the number of valid trajectories, and the proportion of abnormal trajectories, and generate a comprehensive quality score by combining the corresponding weights in a weighted fusion calculation.
[0142] Step G12: Compare the comprehensive quality score with the formal output threshold and the warning output threshold respectively to determine the sample quality level corresponding to the kinematic analysis result and match the corresponding output handling strategy.
[0143] Step G13: Based on the output processing strategy, output the corresponding operation content in a tiered manner.
[0144] Step G14: Collect the operating parameters and quality indicators of the entire analysis process, obtain standardized and traceable records, and store them persistently.
[0145] The average trajectory reliability is the arithmetic mean of the reliability of all valid trajectories within the sample. It characterizes the reliability of the overall trajectory localization and reconstruction of the sample and is a core quality indicator for measuring the reliability of sample test results. The number of valid trajectories is the statistical number of valid sperm trajectories in the sample that meet the analytical quality requirements. It characterizes the sufficiency of the statistical sample size; a larger number indicates stronger representativeness and statistical significance of the statistical results. The comprehensive quality score is a comprehensive quantitative score characterizing the overall test quality of the sample. It is calculated by weighted fusion after normalization of the three quality indicators. A higher score indicates better sample test quality and higher result reliability, and is the core basis for quality level determination. The formal output threshold is the critical score value used to determine that the sample quality is qualified and a formal test report can be output; it is the qualified threshold for quality level determination. The warning output threshold is the critical score value used to determine that the sample quality is critical and a warning message needs to be output; it is the boundary threshold between qualified and unqualified quality levels.
[0146] Sample quality levels are categorized based on a comprehensive quality score, including three levels: officially qualified, warning-critical, and unqualified, each corresponding to different output handling strategies. Output handling strategies are pre-defined rules for output content and handling methods for samples of different quality levels, guiding the tiered output content and operational prompts to ensure that output results match sample quality. Operating parameters encompass all configuration and algorithm parameters involved in the entire analysis process, including imaging frame rate, pixel physical calibration parameters, algorithm version, smoothing constraint parameters, and various weighting coefficients; these are the core configuration data for the traceability analysis process. Quality indicators are all quality evaluation indicators generated throughout the analysis process, including point-level confidence statistics, trajectory noise sensitivity, trajectory credibility, number of valid trajectories, proportion of abnormal trajectories, and comprehensive quality score; these are the core evaluation data for the traceability result quality. Standardized traceable records are a set of parameters and indicators for the entire process, stored in a structured format according to a unified format, with a unique sample identifier and analysis timestamp, used for subsequent result verification, algorithm validation, and after-sales troubleshooting. Persistent storage involves writing traceable records to non-volatile storage media, ensuring that records are readable, searchable, and traceable for a long time.
[0147] In this example, when determining the average trajectory reliability, the number of valid trajectories, and the proportion of abnormal trajectories based on the kinematic analysis results and generating a comprehensive quality score, a fixed-weight linear weighting method can be used. Fixed weight coefficients for the three quality indicators are pre-set, and the corresponding indicator values are extracted from the kinematic analysis results and normalized to the range of 0 to 1. The comprehensive quality score is then obtained by linearly weighting and summing the values according to the weights. Alternatively, a dynamic weighting adaptive weighting method can be used. The weight coefficients of the three indicators are adaptively adjusted according to the sample type and detection scenario. For clinical diagnosis scenarios, the weights of the proportion of abnormal trajectories and the average trajectory reliability are increased; for batch screening scenarios, the weights of the number of valid trajectories are increased. The adaptive weighted calculation yields a comprehensive quality score adapted to the current scenario, thereby completing the scenario-based quantitative assessment of the sample's comprehensive quality.
[0148] After calculating the comprehensive quality score, the quality level determination process is initiated. The comprehensive quality score is compared with the official output threshold and the warning output threshold to determine the sample quality level corresponding to the kinematic analysis result and match the corresponding output handling strategy. Subsequently, tiered output is executed according to the output handling strategy: a complete official test report is output when the quality is qualified; a test report with a low reliability warning is output when the quality is critical; and a suggestion for retesting is output when the quality is unqualified. Finally, the operating parameters and quality indicators of the entire analysis process are collected, standardized traceable records are generated, and persistent storage is performed. This tiered output mechanism with dual thresholds and three-level determination balances the accuracy and clinical operability of the test results, while the full-process traceability record supports subsequent result verification and algorithm iteration optimization.
[0149] For example, the implementation of tiered output and traceable recording includes two methods. The first is a three-level threshold serial judgment and structured output method. First, the comprehensive quality score is compared with the official output threshold. If the score is greater than or equal to the official output threshold, it is judged as officially qualified, matching the official report output strategy. If it is lower than the official output threshold, it is further compared with the warning output threshold. If the score is greater than or equal to the warning output threshold, it is judged as warning critical level, matching the warning prompt output strategy. If it is lower than the warning output threshold, it is judged as unqualified, matching the retest suggestion output strategy. After the judgment is completed, the corresponding content is output according to the corresponding strategy. The officially qualified level outputs an official test report including all kinematic parameter values, confidence intervals, and sample quality evaluation. The warning critical level outputs a test report while indicating that the result has low reliability and suggesting review in conjunction with clinical conditions. The unqualified level does not output official parameter results, but outputs operational suggestions such as refocusing, re-dilution of the sample, or re-scanning and collecting. After output, the data is aggregated in a unified structured format, including imaging frame rate, pixel calibration coefficients, algorithm version, smoothing constraint parameters, weight coefficients, point-level confidence statistics, trajectory noise sensitivity statistics, trajectory reliability, number of valid trajectories, proportion of abnormal trajectories, and comprehensive quality score. This generates a standardized, traceable record with a unique sample identifier, which is then written to a local database for persistent storage. This method employs a threshold-based serial comparison and corresponding hierarchical output logic. The judgment logic is clear and intuitive, and the output content has a well-defined hierarchy, making it easy for clinical operators to understand and implement.
[0150] The second approach employs a multi-dimensional risk mapping parallel judgment and source-tracing output method. First, it extracts three indicators in parallel: average trajectory credibility, number of valid trajectories, and proportion of abnormal trajectories. Each indicator is compared to its respective risk threshold to obtain an independent risk level. Then, based on a pre-set multi-dimensional risk mapping matrix, it comprehensively judges the overall quality level of the sample and the corresponding output handling strategy, while simultaneously marking the core risk indicators that lead to quality degradation. After judgment, it outputs content according to the corresponding strategy. In addition to the corresponding level report and prompts, the output includes source-tracing explanations of the core risk indicators, clearly indicating whether the quality problem is caused by insufficient trajectory credibility, insufficient number of valid trajectories, or an excessively high proportion of abnormal trajectories, and providing targeted improvement suggestions. After output, it collects the entire process's operating parameters and quality indicators according to a hierarchical index format, establishing three types of retrieval indexes: sample identifier, quality level, and risk type. This generates source-tracing records, which are written to a distributed storage system for persistent storage. This method, employing a multi-dimensional risk parallel assessment and source-tracing output logic, can accurately locate the source of sample quality problems, provides more targeted prompts, and supports multi-dimensional retrieval of traceability records, facilitating subsequent batch quality analysis and algorithm iteration optimization.
[0151] Exemplarily, in the product implementation and application scenario of a fully automatic sperm quality analysis instrument, to meet the clinical use requirements for the implementation of the instrument product, the present invention provides three types of graded output content after completing all kinematic parameter calculations: the first type is kinematic parameter values, the second type is parameter confidence levels and abnormality causes, and the third type is operation suggestions. Wherein, the sample-level quality score (S_sample, Sample-level Quality Score) is calculated by the following formula: S_sample = w_1 × mean(R_k) + w_2 × min(1,N_eff / N_req) + w_3 × (1 P_abn), where N_req (Required Minimum Number of Effective Tracks) is a preset required minimum number of effective tracks, w_1, w_2, w_3 are preset weights for the sample-level quality score, S_ok (Formal Output Threshold) is a formal output threshold, and S_warn (Warning Output Threshold) is a warning output threshold. The system executes a three-level judgment output logic: if S_sample≥S_ok, a formal report containing complete kinematic parameters is output. If S_warn≤S_sample<S_ok, a test report is output and a prompt that the result confidence level is relatively low is given. If S_sample<S_warn, a prompt for re-shooting or re-preparing the sample is given; to facilitate after-sales troubleshooting and iterative review of research and development algorithms, the system simultaneously saves a standardized Traceability Record, the content of which is {μ, frame rate, algorithm version, λ_c,k, λ_a,k, η_k, R_k, N_eff, P_abn}, so as to realize traceable management of the entire analysis process.
[0152] Further, a boar sperm kinematic analysis system based on trajectory noise adaptive smoothing is provided. Aiming at the imaging characteristics and motion features of boar sperm microscopic scanning videos, the system adopts a full-process architecture of trajectory quality assessment, adaptive dual-path reconstruction and confidence weighted aggregation, so as to realize accurate and robust quantitative analysis of boar sperm kinematic parameters. The system includes a video input module, a trajectory acquisition module, a point-level confidence module, a trajectory noise sensitivity module, an adaptive dual-path reconstruction module, a kinematic parameter calculation module, a confidence aggregation module and a result output module, all modules are connected in sequence and data is communicated with each other, to jointly complete the full-process analysis of the boar sperm motion trajectory.
[0153] The video input module is used to receive microscopic scanning video of pig sperm samples, the real frame timestamps of each frame, the magnification information of the microscopic imaging system, and pixel-micron calibration coefficients. It completes the format verification and timing alignment of the input data, providing a unified input benchmark for subsequent trajectory detection and parameter quantization. The pixel-micron calibration coefficients are used to realize the conversion of image pixel coordinates to the actual physical scale, ensuring the accuracy of the physical dimensions of the kinematic parameters.
[0154] The trajectory acquisition module receives microscopic video data output from the video input module. Through a target detection algorithm that matches the morphological features of pig sperm heads and a globally optimal inter-frame trajectory association algorithm, it identifies the center pixel coordinates of the pig sperm head frame by frame and establishes the identity correspondence of the same sperm between frames, generating the original trajectory of the sperm head containing trajectory number, point-by-point coordinates, acquisition timestamp, and detection confidence. It also supports importing externally pre-generated original trajectory data to adapt to different detection front-end access scenarios.
[0155] The point-level confidence module receives the original trajectory and corresponding frame image data output by the trajectory acquisition module. It combines the image clarity, local contrast, and detection confidence of a single frame with five types of features: the degree of interference from nearby targets around the trajectory point, and the motion acceleration residual. Through multi-feature weighted fusion and truncation operations, it calculates the point-level confidence q_k,i of the i-th trajectory point of the k-th trajectory, quantifies the positioning reliability of each trajectory point, and provides point-by-point weighting basis for subsequent energy calculation, path reconstruction, and parameter summarization.
[0156] The trajectory noise sensitivity module receives the point-level confidence score and the original trajectory data from the point-level confidence score module. It obtains a temporary trajectory through a short-window robust smoothing process. It then calculates the high-frequency jitter energy and overall motion energy of the trajectory by weighting the point-level confidence score and takes the ratio. It further integrates three types of abnormal features: trajectory breakage rate, trajectory crossover risk, and inter-frame time interval variation coefficient. The trajectory noise sensitivity η_k of each trajectory is calculated by weighting the data according to preset weights. At the same time, it sets preset analysis condition thresholds and judges whether each trajectory meets the quality requirements for subsequent analysis. Low-quality trajectories that do not meet the conditions are eliminated, and effective target trajectories for subsequent reconstruction are selected.
[0157] The adaptive dual-path reconstruction module receives the filtered target trajectory and its corresponding trajectory noise sensitivity η_k. Based on the noise sensitivity, it adaptively matches differentiated smoothing constraint strengths through a continuous mapping function, constructs and minimizes path smoothing optimization objective functions, generating a low-constraint-strength curved path P_c,k and a high-constraint-strength average path P_a,k. The curved path preserves the true lateral swaying characteristics of the pig sperm head and is used for calculating parameters such as curve velocity. The average path filters out high-frequency positioning noise, represents the overall forward trend, and is used for calculating parameters such as average path velocity and head lateral sway amplitude. This dual-path division of labor avoids noise amplification or over-smoothing problems caused by a single path simultaneously calculating all parameters.
[0158] The kinematic parameter calculation module receives the dual-path reconstruction results and point-level confidence data. It uses a robust endpoint estimation strategy to calculate the robust endpoint positions of the beginning and end of the trajectory, and calculates the effective motion duration by combining the effective connection flag between frames. It then calculates three basic velocity parameters: curve velocity (VCL), linear velocity (VSL), and average path velocity (VAP). Through velocity ratio normalization, it derives three derived morphological parameters: linearity (LIN), straightness (STR), and wobble (WOB). Using the local normal vector of the average path as a reference, it calculates the point-by-point lateral offset of the curve path, obtains the head lateral swing amplitude (ALH) through weighted quantile statistics, and obtains the whiplash crossover frequency (BCF) by statistically analyzing the effective crossing count through hysteresis crossover determination rules. This completes the single-trajectory quantization calculation of all boar sperm kinematic parameters.
[0159] The confidence aggregation module receives kinematic parameters of a single trajectory and corresponding trajectory data. It then calculates the trajectory confidence R_k for each trajectory by combining average point-level confidence, noise sensitivity, trajectory breakage rate, effective duration, and endpoint stability. Using the product of trajectory confidence and effective motion duration as the weight, the kinematic parameters of multiple trajectories and multiple scanning fields within the same sample are weighted and aggregated separately to obtain sample-level kinematic parameter results. Simultaneously, it statistically analyzes the number of valid trajectories and the proportion of abnormal trajectories, providing data support for sample quality evaluation.
[0160] The results output module receives sample-level kinematic parameters, confidence indices, and quality statistics, and outputs three types of content: the first type is the specific values and confidence intervals of each kinematic parameter; the second type is the overall confidence assessment of the parameters and the analysis of the causes of abnormal trajectories; and the third type is operational suggestions for sample quality. At the same time, it collects data such as pixel-micron calibration coefficients, imaging frame rate, algorithm version, smoothing constraint strength of each trajectory, trajectory noise sensitivity, trajectory confidence, number of effective trajectories, and proportion of abnormal trajectories throughout the entire process, generates standardized and traceable calculation records, and persists them for storage to support subsequent after-sales review and R&D iteration.
[0161] This application provides a sperm motility trajectory analysis device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the control method for sperm motility trajectory analysis in the first embodiment described above.
[0162] The following is for reference. Figure 6 The diagram illustrates a structural schematic of a sperm motility trajectory analysis device suitable for implementing embodiments of this application. The sperm motility trajectory analysis device in the embodiments of this application may include, but is not limited to, mobile terminals such as fully automated sperm analyzers and microscopic sperm motility analysis systems, as well as fixed terminals such as sperm motility analyzers and sperm motility trajectory analyzers. Figure 6 The sperm motility trajectory analysis device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0163] like Figure 6 As shown, the sperm motility trajectory analysis device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the sperm motility trajectory analysis device. The processing unit 1001, the ROM 1002, and the RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the sperm motility analysis device to communicate wirelessly or wiredly with other devices to exchange data. Although a sperm motility analysis device with various systems is shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.
[0164] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0165] The sperm motility trajectory analysis device provided in this application, employing the control method for sperm motility trajectory analysis in the above embodiments, can solve the technical problem of poor sperm motility trajectory analysis results. Compared with the prior art, the beneficial effects of the sperm motility trajectory analysis device provided in this application are the same as the beneficial effects of the control method for sperm motility trajectory analysis provided in the above embodiments, and other technical features in this sperm motility trajectory analysis device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.
[0166] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0167] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0168] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the control method for sperm motility trajectory analysis in the above embodiments.
[0169] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, radio frequency (RF), etc., or any suitable combination thereof.
[0170] The aforementioned computer-readable storage medium may be included in the sperm motility analysis device; or it may exist independently and not assembled into the sperm motility analysis device.
[0171] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the sperm motility trajectory analysis device, the device performs the following actions: Based on the microscopic scanning video and pixel physical calibration parameters of the sperm, it performs sperm motility tracking and detection processing to obtain a motion trajectory dataset with associated trajectory credibility; By combining the ratio of high-frequency jitter energy of each trajectory in the trajectory dataset to the overall motion energy, and considering trajectory anomaly features, it determines the target trajectory, wherein the threshold for determining the trajectory anomaly features is determined by the distribution pattern of motion trajectories in historical sperm samples; Based on the noise sensitivity of the target trajectory, it matches the smoothing constraint strength to construct a dual-path reconstruction result for the target trajectory; Based on the dual-path reconstruction result, it calculates sperm kinematic parameters according to a robust endpoint estimation strategy, and combines the trajectory credibility to perform a weighted summation of the sperm kinematic parameters to obtain the kinematic analysis result.
[0172] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0173] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation that may be implemented in systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0174] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0175] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the control method for sperm motility trajectory analysis described above, which can solve the technical problem of poor sperm motility trajectory analysis results. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the control method for sperm motility trajectory analysis provided in the above embodiments, and will not be repeated here.
[0176] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A control method for analyzing sperm motility trajectory, characterized in that, The method includes: Based on the microscopic scanning video of sperm and the pixel physical calibration parameters, a motion trajectory dataset with associated trajectory credibility is obtained by processing sperm motion tracking detection. The target trajectory is determined by the ratio of the high-frequency jitter energy of each trajectory in the trajectory dataset to the overall motion energy, combined with trajectory anomaly features. The threshold for judging trajectory anomaly features is determined by the distribution pattern of motion trajectories of historical sperm samples. Based on the noise sensitivity corresponding to the target trajectory, a smoothing constraint strength is matched to construct a dual-path reconstruction result for the target trajectory. This includes: matching two differentiated smoothing constraint strengths using a mapping function based on the noise sensitivity corresponding to the target trajectory, wherein the smoothing constraint strengths include a first smoothing constraint strength and a second smoothing constraint strength; using the point coordinates of the target trajectory as a fitting benchmark, matching the point-level confidence values corresponding to each trajectory point as weight coefficients, and constructing path fitting data terms using a robust loss function; characterizing the local curvature of the path using a second-order difference operator, and substituting the first smoothing constraint strength and the second smoothing constraint strength as regularization coefficients to construct... Two different smoothing levels of path smoothing regularization terms are obtained; the path fitting data terms are linearly superimposed with the two path smoothing regularization terms respectively to construct path smoothing optimization objective functions corresponding to the curved path and the average path respectively, and the minimum value of the path smoothing optimization objective function is used as the solution criterion for the optimal path; the two path smoothing optimization objective functions are minimized respectively to generate the curved path that retains the real swing characteristics of the sperm head and the average path that filters out high-frequency positioning jitter noise; the curved path and the average path corresponding to the target trajectory are aligned and bound point by point according to the timestamp to generate the dual-path reconstruction result of the target trajectory; Based on the dual-path reconstruction results, sperm kinematic parameters are calculated according to a robust endpoint estimation strategy, and the sperm kinematic parameters are weighted and summarized in combination with the trajectory confidence to obtain kinematic analysis results.
2. The control method for sperm motility trajectory analysis as described in claim 1, characterized in that, The steps for obtaining a motion trajectory dataset with associated trajectory credibility based on sperm microscopic scanning video and pixel physical calibration parameters, according to sperm motion tracking and detection processing, include: Based on the microscopic scanning video and pixel physical calibration parameters, the video quality is screened according to time frames, invalid segments are removed, and a compliant video frame sequence is obtained. Sperm motion tracking processing is performed on the compliant video frame sequence to identify the target position of the sperm head frame by frame and associate the inter-frame correspondence to obtain the motion trajectory sequence; Based on the motion trajectory sequence, the imaging evaluation value, the interference degree of nearby targets and the motion acceleration residual are fused point by point to calculate the point-level confidence value of the trajectory point. The point-level confidence scores corresponding to the trajectory points are associated and bound with the corresponding points in the motion trajectory sequence to obtain a motion trajectory dataset associated with the trajectory confidence scores.
3. The control method for sperm motility trajectory analysis as described in claim 1, characterized in that, The step of determining the target trajectory by combining the ratio of high-frequency jitter energy of each trajectory in the trajectory dataset to the overall motion energy, and considering trajectory anomaly features, includes: The motion trajectory dataset is smoothed using a short window according to robust smoothing rules to obtain an initial smoothed trajectory. Based on the initial smooth trajectory, a weighted calculation is performed by combining the point-level confidence values of each trajectory point to obtain the high-frequency jitter energy and overall motion energy of each trajectory. The ratio of the high-frequency jitter energy to the overall motion energy is calculated to obtain the trajectory noise energy ratio. The noise sensitivity of each trajectory is calculated by weighting and fusing the trajectory breakage degree, target crossing risk, and inter-frame time fluctuation degree with the trajectory noise energy ratio. Based on the noise sensitivity threshold and trajectory validity judgment rules, all trajectories of the initial smoothed trajectory are screened, and low-quality trajectories that do not meet the analysis conditions are removed to obtain the target trajectory.
4. The control method for sperm motility trajectory analysis as described in claim 3, characterized in that, The step of obtaining the high-frequency jitter energy and overall motion energy of each trajectory by performing a weighted calculation based on the initial smooth trajectory and the point-level confidence values of each trajectory point includes: Match the original trajectory points of each trajectory with the points of the initial smoothed trajectory according to the timestamp, calculate the squared positional deviation between the original coordinates and the smoothed coordinates point by point, and generate a point-by-point deviation sequence. The point-by-point deviation sequence is multiplied point by point with the point-level confidence value corresponding to the trajectory point to obtain the product result; The high-frequency jitter energy of the trajectory is obtained by summing the product results of all the trajectory points. Using the starting position of the initial smoothed trajectory as a reference, the square value of the displacement of each trajectory point relative to the starting point is calculated point by point. Based on the squared displacement value, and combined with the point-level confidence weighted summation of the corresponding trajectory points, the overall motion energy of the trajectory is obtained.
5. The control method for sperm motility trajectory analysis as described in claim 1, characterized in that, The steps of calculating sperm kinematic parameters based on the dual-path reconstruction results using a robust endpoint estimation strategy, and then weighting and summarizing the sperm kinematic parameters in conjunction with the trajectory confidence to obtain the kinematic analysis results include: Based on the dual-path reconstruction results, the effective motion duration of the trajectory is calculated by combining the inter-frame effective connection flag, and the robust endpoint positions at both ends of the trajectory are solved according to the robust endpoint estimation strategy to obtain the total curve length, average total path length and robust linear displacement. Divide the total curve length, the average path length, and the robust linear displacement by the effective motion time to obtain the curve velocity, the average path velocity, and the linear velocity, respectively. Based on the curve velocity, the average path velocity, and the straight velocity, and processed according to the velocity ratio normalization rule, derived kinematic parameters including linearity, straightness, and oscillation are obtained. Using the local tangent direction of the average path as a reference, calculate the point-by-point lateral offset of the curved path; Based on the point-by-point lateral offset, combined with the point-level confidence value of each trajectory point, the head lateral swing amplitude is obtained by weighted quantile statistics, and the whipping cross frequency is obtained by counting the number of effective crossings through the hysteresis cross determination rule. The derived kinematic parameters, the head lateral swing amplitude, and the whiplash cross frequency are weighted and aggregated with the corresponding trajectory confidence, and the proportion of abnormal trajectories is determined to obtain the kinematic analysis results.
6. The control method for sperm motility trajectory analysis as described in claim 1, characterized in that, After the steps of calculating sperm kinematic parameters based on the dual-path reconstruction results using a robust endpoint estimation strategy, and weighting and summarizing the sperm kinematic parameters in conjunction with the trajectory confidence to obtain the kinematic analysis results, the control method for sperm motility trajectory analysis further includes: Based on the kinematic analysis results, the average trajectory reliability, the number of valid trajectories, and the proportion of abnormal trajectories are determined. Combined with the corresponding weighted fusion calculations, a comprehensive quality score is generated. The comprehensive quality score is compared with the formal output threshold and the warning output threshold respectively to determine the sample quality level corresponding to the kinematic analysis result and match the corresponding output handling strategy. According to the output processing strategy, the corresponding operation content is output in a hierarchical manner; The operational parameters and quality indicators of the entire analysis process were collected, and standardized traceable records were obtained and persistently stored.
7. A sperm motility trajectory analysis device, characterized in that, The sperm motility trajectory analysis device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the control method for sperm motility trajectory analysis as described in any one of claims 1 to 6.
8. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the control method for sperm motility trajectory analysis as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Systems and methods for Anti-aliasing
US20240153176A1
Multi-Model Flight Path Prediction System for Unmanned Aerial Systems
US20260237303A1
