Earthworm steady-state body size parameter quantification method

By combining deep learning and image processing techniques with graph theory algorithms, we have achieved efficient and reliable quantification of earthworm steady-state body size parameters, solving the problems of measurement instability and poor repeatability in traditional methods, and improving the accuracy and efficiency of earthworm physiological state assessment.

CN121564756BActive Publication Date: 2026-07-31HUAZHONG AGRI UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAZHONG AGRI UNIV
Filing Date
2025-11-11
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Traditional methods are difficult to accurately measure stable and reliable body size parameters of live earthworms, especially in complex backgrounds and under dynamic conditions, resulting in unstable and poor repeatability of measurement results, which cannot reflect the true physiological state of earthworms.

Method used

Deep learning target detection models (such as EfficientViT and the improved YOLOv11n) are used for image recognition and localization. High-quality masks are generated by combining image processing technology. Morphological parameters of earthworms are extracted through morphological purification and skeletonization. Body length is calculated by graph theory algorithm. Moving window statistics are introduced for anomaly detection and filtering to achieve quantification of steady-state body size parameters.

Benefits of technology

It significantly improves the measurement efficiency and reliability of earthworm body size parameters by 30 times, providing an efficient and objective tool for quantifying earthworm physiological status, supporting large-scale farming and genetic breeding research.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121564756B_ABST
    Figure CN121564756B_ABST
Patent Text Reader

Abstract

This application relates to the field of image analysis, specifically disclosing a method for quantifying the steady-state body size parameters of earthworms, and proposing a dynamic body size parameter quantification system based on the fusion of computer vision and deep learning. First, a time-series image sequence of earthworms in motion is acquired through a high-frame-rate continuous image acquisition system; second, a deep neural network is used to achieve intelligent recognition and tracking of morphological features; finally, by combining time-series analysis and moving window statistical modeling, biologically significant steady-state body size parameters are extracted from the dynamic data. This technical approach not only overcomes the limitations of traditional measurements but also establishes a morphological evaluation system that can reliably reflect the physiological state of earthworms, providing technical support and a new data dimension for modern intelligent earthworm farming and genetic breeding research.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image analysis, and in particular to a method for quantifying the steady-state body size parameters of earthworms. Background Technology

[0002] In large-scale earthworm farming and genetic breeding research, efficient and accurate assessment of individual growth status has always been a crucial aspect. Traditional methods primarily rely on body weight as the core indicator, which, while simple to operate, fails to comprehensively reflect the earthworm's health status and reproductive potential. Body length and average diameter, as more representative morphological parameters, should be important components of the assessment system because they more directly reflect the earthworm's physiological state. However, because live earthworms are typical non-rigid organisms, their bodies are constantly in a state of non-steady-state movement, such as stretching, contraction, and peristalsis, making it difficult for traditional single-point instantaneous measurement methods to obtain stable and reliable body size data. The measurement results are highly random and have poor repeatability, failing to accurately characterize their true biological size, severely limiting the application of these parameters in practical production and research.

[0003] Currently, several technologies have attempted to address the aforementioned problems. For example, existing technologies (such as CN202411136233) propose a rapid, accurate, and non-destructive measurement method and system for earthworm body size index and color. This scheme reconstructs the contour through edge detection, corner point extraction, and mathematical fitting, and estimates the length and diameter using a grid layer. However, this method still has significant limitations: First, the contour extraction process is highly dependent on image quality, exhibiting poor robustness under complex backgrounds, uneven lighting, or low contrast conditions; second, the body size calculation lacks a clear algorithm definition and reproducible details, leading to ambiguity in the results; third, and most importantly, this scheme only processes single-frame images, failing to consider the dynamic characteristics of earthworms and thus unable to extract representative steady-state parameters from time-series data, making it difficult to overcome the randomness and instability issues in live measurement.

[0004] Therefore, there is an urgent need for a high-precision method for quantifying body size parameters that can adapt to the non-rigid and dynamic characteristics of live earthworms. This method should be able to achieve accurate analysis of single-frame images and extract stable and reliable steady-state body size parameters through time-series data processing and quality control mechanisms, providing effective technical support for intelligent earthworm farming and genetic breeding research. Summary of the Invention

[0005] To achieve accurate analysis of single-frame images and extract stable and reliable earthworm steady-state body size parameters through time-series data processing and quality control mechanisms, this application provides a method for quantifying earthworm steady-state body size parameters.

[0006] The method for quantifying the steady-state body size parameters of earthworms provided in this application adopts the following technical solution: A method for quantifying the steady-state body size parameters of earthworms includes the following steps: Image acquisition and preprocessing: A time-series image sequence of live earthworms in their natural movement state is acquired using image acquisition equipment; Object detection: Earthworms in the time-series image sequence are identified and located using a deep learning object detection model, and regions of interest are extracted; Binarization and skeletonization: Image processing is performed on the region of interest to generate a high-quality binary mask; morphological purification processing is performed on the binary mask, including opening operations to remove noise and closing operations to fill holes; then the earthworm skeleton is extracted; Diameter measurement: Earthworm diameter was calculated using distance transformation based on a binary mask after morphological purification. Length measurement: The earthworm skeleton is converted into a graph structure, and the earthworm body length is calculated based on the maximum endpoint geodesic distance method; Intelligent diagnosis: Intelligent diagnosis of earthworm morphology, and adaptive selection of length estimation strategy based on morphological type; Quality control: Anomaly detection and filtering of time-series measurements are performed based on the moving window statistical method to extract steady-state volume scale parameters.

[0007] Furthermore, in the target detection step, the deep learning target detection model used is an improved YOLOv11n model based on the EfficientViT backbone network, SPPF module, and bidirectional path aggregation network structure.

[0008] Furthermore, in the binarization and skeletonization steps, the step of performing image processing on the region of interest to generate a high-quality binarization mask includes: Use CLAHE for local contrast enhancement; Use Gaussian blur to suppress noise; Binarization is performed using the Otsu adaptive thresholding method; Perform morphological post-processing and contour filtering.

[0009] Furthermore, in the diameter measurement step, the diameter calculation is based on the statistical average of the local radius values ​​obtained by distance transformation.

[0010] Furthermore, in the length measurement step, the graph structure is constructed with the endpoints and intersections of the skeleton pixels as nodes, the pixel paths as edges, the weights are calculated according to Euclidean distance, and the longest path is solved using the maximum endpoint geodesic distance method as the body length.

[0011] Furthermore, in the intelligent diagnostic step, the morphological types include normal, bifurcation, overlap, complexity, and fragmentation, wherein the overlapped morphology is estimated using a perimeter compensation algorithm.

[0012] Furthermore, the quality control step also includes generating a confidence score for each frame measurement result, and removing or downweighting abnormal frames based on the score results.

[0013] This application also provides a system for measuring the steady-state body size parameters of earthworms, used in a method for quantifying the steady-state body size parameters of earthworms, including: The image acquisition module is used to acquire time-series image sequences of live earthworms in their natural movement state; The target detection and segmentation module is used to identify and locate earthworms in image sequences and generate high-quality binarized masks. The morphological parameter calculation module is used to extract the skeleton, calculate the local diameter, construct the graph structure, and calculate the body length based on graph theory algorithms. The intelligent diagnosis and quality control module is used to classify earthworm morphology, adaptively select estimation strategies, and perform anomaly detection and filtering based on moving window statistics. The output module is used to output and display the steady-state body size parameters and confidence assessment results of earthworms.

[0014] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement a method for quantifying the steady-state body size parameters of earthworms.

[0015] This application also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a method for quantifying the steady-state body size parameters of earthworms.

[0016] In summary, this application includes the following beneficial technical effects: This application proposes an automated quantification system for earthworm steady-state body length parameters that integrates time-series analysis, intelligent diagnosis, and adaptive computation. The method achieves high-precision target detection based on an improved YOLOv11n model, combines image processing and skeleton extraction techniques to acquire morphological data for each frame, and introduces graph theory algorithms for precise body length calculation. Furthermore, a hybrid measurement strategy of "diagnosis first, estimation later" is designed to dynamically identify earthworm morphological categories and select corresponding compensation algorithms. Finally, through moving window statistics and anomaly detection mechanisms, stable and reliable steady-state body length and diameter parameters of earthworms are extracted from dynamic time-series data.

[0017] This application effectively addresses the key problems of traditional methods in measuring live, non-rigid earthworms, such as high randomness, low efficiency, and inability to reflect true physiological states. Compared to manual processing, measurement efficiency is increased by approximately 30 times, while significantly improving data reliability and repeatability. This technology provides an efficient and objective quantitative tool for large-scale earthworm farming, genetic breeding, and physiological research, and has promising application prospects and widespread value. Attached Figure Description

[0018] Figure 1 This is a flowchart of a method for quantifying the steady-state body size parameters of earthworms according to an embodiment of this application; Figure 2 This is a schematic diagram illustrating the skeleton extraction and the determination of the two endpoints of the earthworm in an embodiment of this application; Figure 3 This is a schematic diagram of the refined skeleton and earthworm endpoints in an embodiment of this application. Detailed Implementation

[0019] The following is in conjunction with the appendix Figure 1-3 This application will be described in further detail.

[0020] This application discloses a method for quantifying the steady-state body size parameters of earthworms. (Refer to...) Figure 1 The method for quantifying the steady-state body size parameters of earthworms includes the following steps: Step 1, Image Acquisition and Preprocessing: A time-series image sequence of live earthworms in their natural movement state is acquired using an image acquisition device. Specifically: Live earthworms in the farm were sampled using a weight gradient standard to ensure that the samples were broadly representative in terms of size and developmental stage. Raw image sequences of each earthworm sample under natural activity were obtained through one-minute video recording and high-frequency frame extraction. To ensure data quality, all images were manually reviewed to remove blurry images caused by motion or out-of-focus issues, ultimately selecting high-quality images.

[0021] Step 2, Object Detection: Earthworms in a time-series image sequence are identified and located using a deep learning object detection model, and regions of interest are extracted. The deep learning object detection model used is an improved YOLOv11n model based on the EfficientViT backbone network, SPPF module, and bidirectional path aggregation network structure. Specifically: In terms of core backbone network design, this method abandons the traditional pure convolutional structure and instead introduces the advanced EfficientViT visual Transformer as the core feature extraction module. This improvement utilizes the self-attention mechanism of the Transformer architecture, enabling the model to capture long-range dependencies in the image from a global perspective, greatly enhancing its ability to represent features in complex backgrounds.

[0022] Building upon this, to enhance the model's adaptability to targets at different scales, a Spatial Pyramid Pooling (SPPF) module was integrated. Through parallelized multi-scale pooling operations, the receptive field was effectively increased, ensuring the model's scale stability.

[0023] In the feature fusion stage, an efficient bidirectional path aggregation network (PANet) was designed and constructed as the neck of the model. The network includes a top-down path that transmits strong semantic information from deep layers to shallow feature maps through upsampling and concatenation operations to enhance the recognition of small objects. Simultaneously, a bottom-up path transmits precise localization information from the shallow feature maps back to the deeper layers through downsampling. This bidirectional information flow design ensures that the final feature maps used for prediction at all scales fully integrate rich semantic and spatial information.

[0024] In the detection head, a multi-scale parallel prediction strategy is adopted, which enables the model to make accurate predictions simultaneously on three feature maps of different resolutions, thereby achieving comprehensive and efficient identification of earthworm targets of different sizes.

[0025] Step 3, binarization and skeletonization, includes the following steps: Step 3.1: Perform image processing on the region of interest to generate a high-quality binarized mask, specifically including: Step 3.1.1: Use CLAHE to enhance the local contrast of the grayscale image. Compared with global adjustment, it can more effectively deal with the common problem of uneven lighting in the sample. Step 3.1.2: Suppress image noise through Gaussian blur to create conditions for accurate segmentation; Step 3.1.3: Binarization is performed using the Otsu adaptive thresholding method. This algorithm can intelligently calculate the optimal segmentation threshold based on the image's own grayscale histogram, thereby achieving robust background and foreground separation without manual intervention. Step 3.1.4: Perform morphological post-processing to eliminate possible imperfections after binarization. Specifically, this includes: filling any small holes that may exist inside the target through closing operations, smoothing the contour and removing isolated noise points through opening operations; then, performing contour analysis on the mask, filtering out all irrelevant artifacts based on a preset area threshold, and selecting the contour with the largest area as the final output to ensure the integrity and uniformity of the obtained binary mask.

[0026] Step 3.2: Perform morphological cleansing on the binarized mask, specifically including: Step 3.2.1: Use a natural sorting technique based on regular expressions to ensure that time series images can be processed in the correct logical order; Step 3.2.2: Morphological operations are performed on each image for deep cleaning. First, opening operations are used to effectively remove isolated salt-and-pepper noise pixels from the image background. Then, closing operations are used to fill any tiny holes or breaks that may exist inside the earthworm's body mask, ensuring the integrity and connectivity of the target area. Elliptical structuring elements were specifically chosen for both operations because, compared to rectangular kernels, elliptical kernels better conform to and maintain the smooth, natural biological contours of the earthworm, avoiding the introduction of unnatural sharp edges during processing and thus ensuring the accuracy of the morphological analysis.

[0027] Step 3.3: Extract the earthworm skeleton. Specifically, the skeletonization algorithm from the scikit-image library is used to refine the binary image into lines of single-pixel width through the principle of "median transformation," such as... Figure 2 As shown.

[0028] Step 4, Diameter Measurement: Based on the binarized mask after morphological purification, the earthworm diameter is calculated using distance transformation. Specifically: Using the skeleton line as the sampling path, the distance from each pixel along the skeleton line to the nearest edge pixel of the worm is calculated. This distance is the local radius, and twice the local radius is the local diameter. By statistically analyzing these distance values, an average diameter representing the current frame is estimated.

[0029] The calculated average diameter is used to generate a dynamic threshold to guide subsequent dynamic pruning algorithms, thereby more intelligently removing noise-generated "spicules" from the skeleton.

[0030] Step 5, Length Measurement: Convert the earthworm skeleton into a graph structure and calculate the earthworm body length based on the maximum endpoint geodesic method. Specifically: Using the NetworkX library, such as Figure 3 As shown, a graph structure is constructed using the endpoints and intersections of skeleton pixels as nodes and pixel paths as edges; weights are calculated based on Euclidean distance (orthogonal adjacency is 1, diagonal adjacency is 0). The shortest weighted path between all endpoint pairs is calculated using Dijkstra's shortest path algorithm, and the longest path is selected as the final effective body length of the earthworm.

[0031] Step 6, Intelligent Diagnosis: Intelligent diagnosis of earthworm morphology is performed, and a length estimation strategy is adaptively selected based on the morphological type. Specifically: First, a comprehensive analysis of the topological and geometric features of the skeleton graph is performed to accurately and automatically classify the instantaneous morphology of earthworms into preset types such as normal, branching, overlapping, complex, or fragmented. Based on this diagnostic result, the system dynamically schedules the optimal length estimation strategy: for normal, branching, or complex morphologies, the long path method in step 5 is directly adopted; while for morphologies diagnosed as overlapping, a special "perimeter compensation algorithm" (i.e., the sum of the length of the non-overlapping part and half of the loop perimeter) is activated to achieve a scientific estimation of self-occlusion.

[0032] Step 7, Quality Control: Anomaly detection and filtering of time-series measurements are performed using a moving window statistical method to extract steady-state volumetric parameters. Specifically: The system maintains a dynamic historical window of measurements and calculates the mean and standard deviation within the window in real time. If the length of the current frame deviates from the mean by more than a preset statistical threshold, the frame is automatically marked as a potential outlier. Finally, the system integrates morphological classification, the effectiveness of the estimation method, and the outlier detection results to generate a quantitative confidence score of 0-100 for each frame's measurement, and applies corresponding score penalties to images of outlier frames. This process not only outputs detailed diagnostic data and time-series visualization charts, but its final result is a steady-state body size parameter that represents the typical physiological state of earthworms, obtained by statistically averaging the filtered normal data.

[0033] To quantitatively verify the advantages of the above method in terms of measurement efficiency and functional integrity, this embodiment designed a set of comparative experiments. Nine healthy, active earthworm samples were randomly selected, and a one-minute video of each sample was recorded. The video was then framed into a test sequence containing 240 images. As a benchmark, manual measurement was performed using the industry-standard ImageJ software; this process was extremely time-consuming, requiring an average of 90 minutes to calculate the steady-state length of a single earthworm from 240 images. More importantly, due to the extremely high complexity of manually and accurately measuring the diameter at multiple points on images of curved morphology and performing time-series averaging, manual measurement methods are difficult to obtain reliable steady-state diameter parameters in practice. In contrast, the method described in this embodiment completes the calculation of the steady-state length and diameter of the same earthworm in an average of only 3 minutes, achieving functional superiority while improving processing efficiency by approximately 30 times, demonstrating the advanced nature and practical value of this method.

[0034] This embodiment also provides a system for measuring the steady-state body size parameters of earthworms, used in a method for quantifying the steady-state body size parameters of earthworms, including: The image acquisition module is used to acquire time-series image sequences of live earthworms in their natural movement state; The target detection and segmentation module is used to identify and locate earthworms in image sequences and generate high-quality binarized masks. The morphological parameter calculation module is used to extract the skeleton, calculate the local diameter, construct the graph structure, and calculate the body length based on graph theory algorithms. The intelligent diagnosis and quality control module is used to classify earthworm morphology, adaptively select estimation strategies, and perform anomaly detection and filtering based on moving window statistics. The output module is used to output and display the steady-state body size parameters and confidence assessment results of earthworms.

[0035] This embodiment also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements a method for quantifying the steady-state body size parameters of earthworms.

[0036] This embodiment also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a method for quantifying the steady-state body size parameters of an earthworm.

[0037] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.

Claims

1. A method for quantifying body size parameters of earthworm steady states, characterized by: Includes the following steps: Image acquisition and preprocessing: A time-series image sequence of live earthworms in their natural movement state is acquired using image acquisition equipment; Object detection: Earthworms in the time-series image sequence are identified and located using a deep learning object detection model, and regions of interest are extracted; Binarization and skeletonization: Image processing is performed on the region of interest to generate a high-quality binarization mask; The binarized mask was subjected to morphological purification, including opening operations to remove noise and closing operations to fill holes; then the earthworm skeleton was extracted. Diameter measurement: Earthworm diameter was calculated using distance transformation based on a binary mask after morphological purification. Length measurement: The earthworm skeleton is converted into a graph structure, and the earthworm body length is calculated based on the maximum endpoint geodesic distance method; Intelligent diagnosis: Intelligent diagnosis of earthworm morphology, and adaptive selection of length estimation strategy based on morphological type; Quality control: Anomaly detection and filtering of time-series measurements are performed based on the moving window statistical method to extract steady-state volume scale parameters.

2. The method for quantifying the steady-state body size parameters of earthworms according to claim 1, characterized in that: In the target detection step, the deep learning target detection model used is an improved YOLOv11n model based on the EfficientViT backbone network, SPPF module, and bidirectional path aggregation network structure.

3. The method for quantifying the steady-state body size parameters of earthworms according to claim 1, characterized in that: The binarization and skeletonization steps include the following steps: image processing of the region of interest to generate a high-quality binarization mask. Use CLAHE for local contrast enhancement; Use Gaussian blur to suppress noise; Binarization is performed using the Otsu adaptive thresholding method; Perform morphological post-processing and contour filtering.

4. The method for quantifying the steady-state body size parameters of earthworms according to claim 1, characterized in that: In the diameter measurement step, the diameter calculation is based on the statistical average of the local radius values ​​obtained by distance transformation.

5. The method for quantifying the steady-state body size parameters of earthworms according to claim 1, characterized in that: In the length measurement step, the graph structure is constructed with the endpoints and intersections of the skeleton pixels as nodes, the pixel paths as edges, the weights are calculated according to Euclidean distance, and the longest path is solved using the maximum endpoint geodesic distance method as the body length.

6. The method for quantifying the steady-state body size parameters of earthworms according to claim 1, characterized in that: In the intelligent diagnostic step, the morphological types include normal, bifurcation, overlap, complexity, and fragmentation. For overlapping morphologies, a perimeter compensation algorithm is used to estimate the length.

7. The method for quantifying the steady-state body size parameters of earthworms according to claim 1, characterized in that: The quality control steps also include generating a confidence score for each frame of measurement results, and removing or downweighting abnormal frames based on the score results.

8. A system for measuring the steady-state body size parameters of earthworms, used to implement the method for quantifying the steady-state body size parameters of earthworms as described in any one of claims 1-7, characterized in that: include: The image acquisition module is used to acquire time-series image sequences of live earthworms in their natural movement state; The target detection and segmentation module is used to identify and locate earthworms in image sequences and generate high-quality binarized masks. The morphological parameter calculation module is used to extract the skeleton, calculate the local diameter, construct the graph structure, and calculate the body length based on graph theory algorithms. The intelligent diagnosis and quality control module is used to classify earthworm morphology, adaptively select estimation strategies, and perform anomaly detection and filtering based on moving window statistics. The output module is used to output and display the steady-state body size parameters and confidence assessment results of earthworms.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements a method for quantifying the steady-state body size parameters of earthworms as described in any one of claims 1-7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a method for quantifying the steady-state body size parameters of earthworms as described in any one of claims 1-7.