A dynamic fish monomer shape parameter processing method and system

By combining computer vision and deep learning technologies, the system automatically segments the foreground of fish and extracts key morphological parameters, solving the efficiency and accuracy problems of fish morphological data processing in existing technologies, and achieving efficient and accurate support for fish behavioral research.

CN120126171BActive Publication Date: 2026-05-08SICHUAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SICHUAN UNIV
Filing Date
2025-01-09
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing technologies for obtaining individual morphological parameters of fish are time-consuming and labor-intensive, susceptible to human factors, and suffer from inaccurate and unstandardized data. It is difficult to find a balance between identification accuracy, computing power requirements, and overall workload.

Method used

Using computer vision and deep learning technologies, combined with the OTSU algorithm and DeepLabv3+ model, the fish foreground is automatically segmented, and key fish parameters, including centroid coordinates, head and tail coordinates, and kinematic parameters, are extracted through morphological algorithms to achieve automated and standardized data processing.

Benefits of technology

It improves data processing efficiency, reduces errors, ensures stability and consistency under different experimental conditions, is suitable for large-scale fish behavioral experiments, and provides an efficient and accurate data processing solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120126171B_ABST
    Figure CN120126171B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of hydraulic engineering and environmental ecological protection, and provides a dynamic fish monomer morphological parameter processing method and system, which automatically extracts and processes key morphological data in fish behavior experiment by combining computer vision, deep learning and morphological parameter calculation technology, and the specific steps include the following: (1) binary processing of experimental video or image; (2) extraction of morphological parameters; (3) calculation of kinematic parameters; (4) batch processing and standardized output of data. The application provides a more efficient and accurate data processing scheme for fish behavior research and supports fish morphological analysis in different experimental environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of water conservancy engineering and environmental ecological protection technology, specifically to a method and system for processing dynamic individual morphological parameters of fish. Background Technology

[0002] With the deepening of aquatic ecological environment protection and fish behavior research, quantifying fish morphological parameters has become crucial in fisheries management, ecological protection, and monitoring. The movement patterns and behaviors of individual fish can directly reflect the health status of aquatic ecosystems and the physiological state of the fish themselves. Therefore, accurately obtaining individual fish morphological parameters, such as centroid coordinates, head-tail coordinates, swimming speed, tail wagging frequency, tail wagging amplitude, and tail wagging angle, plays a vital role in in-depth research on fish behavior.

[0003] Currently, the primary method for obtaining morphological data of individual fish specimens is manual, requiring researchers to analyze video or images frame by frame. This method is not only time-consuming and labor-intensive but also susceptible to human error, leading to inaccurate or inconsistent data. This is especially true when processing large datasets, where manual operation is inefficient and prone to error. Furthermore, variations in procedures among researchers result in a lack of data standardization, hindering subsequent analysis and comparison. Therefore, developing an automated and standardized processing method is crucial for improving data processing efficiency and reducing errors, and is of great significance for fish morphological research.

[0004] In recent years, researchers have begun to apply computer vision and deep learning technologies to automatically segment individual fish foregrounds and extract key fish parameters using morphological algorithms. However, existing methods struggle to find a suitable balance between recognition accuracy, computational power requirements, and overall workload. Therefore, improving versatility and efficiency has become a key challenge in fish morphology research. Summary of the Invention

[0005] The present invention provides a method and system for processing dynamic individual morphological parameters of fish, which can process experimental data quickly and efficiently, and provide support for the morphological analysis of fish under different experimental environments.

[0006] According to a method for processing dynamic individual morphological parameters of fish according to the present invention, by combining computer vision, deep learning and morphological parameter calculation techniques, key morphological data in fish behavioral experiments are automatically extracted and processed. Specific steps include:

[0007] (1) Binarization of experimental videos or images: Appropriate image processing methods are adopted according to different background complexities:

[0008] With a clean background, the initial threshold is determined using the RGB three-channel information of the image and the OTSU algorithm; the threshold is then visually optimized to segment the foreground region of the fish.

[0009] Under normal background conditions, a transfer learning method based on a pre-trained DeepLabv3+ model is introduced to process sample data that meets the conditions, filter out images with poor performance and re-identify them;

[0010] Under conditions of complex backgrounds and reduced repetition, increase the amount of pre-training data, perform manual annotation when necessary, and optimize the model.

[0011] (2) Extraction of morphological parameters: Based on the binarized image, the key morphological parameters of the fish are automatically extracted using morphological transformation technology, including the centroid coordinates, the coordinates of the head and tail, and the midline of the body.

[0012] (3) Calculation of kinematic parameters: Further calculate the kinematic parameters of fish based on morphological parameters, including swimming speed, tail wag frequency, tail wag amplitude and tail wag angle;

[0013] (4) Batch processing and standardized output of data: Automated processing of large-scale video or image data, and exporting the processing results in a standardized data format and displaying them visually.

[0014] Preferably, in step (1), under the condition of a clean background, the RGB three-channel information of the video frame or image can be fully utilized, combined with the OTSU algorithm to determine the initial color threshold. The specific operation is as follows:

[0015] (1.11) First, the image is analyzed using the OTSU algorithm to determine the initial threshold of the color filtering model. The OTSU algorithm can adaptively select the threshold to distinguish between the foreground and the background.

[0016] (1.12) After obtaining the initial threshold, perform a visualization operation to view the filtering effect;

[0017] (1.13) Based on the visualization results, the user can adjust the threshold appropriately; the adjusted threshold will be used to filter the model to ensure that the fish morphology region is accurately segmented in the case of a simple background.

[0018] As a preferred option, in step (1), under general background conditions, the methods in steps (1.11)-(1.13) are combined with the introduction of a deep learning model for further optimization. The specific process is as follows:

[0019] (1.21) Use a color filtering model to perform preliminary processing on samples that meet the conditions, and randomly select a portion of image data as the training set;

[0020] (1.22) Using a pre-trained DeepLabv3+ model, transfer learning is performed on the selected samples to generate a new model adapted to the current dataset;

[0021] (1.23) The new model is used to process the data, and the discrimination conditions are set to filter out the image samples with poor performance;

[0022] (1.24) For these poorly performing images, the DeepLabv3+ model is used again for recognition.

[0023] As a preferred option, in step (1), under the conditions of complex background and reduced repetition, it is necessary to further enhance the applicability of the model. The specific operation steps are as follows:

[0024] (1.31) While following steps (1.21)-(1.23), increase the amount of pre-training data;

[0025] (1.32) If necessary, optimize the labels of the DeepLabv3+ model by combining manually labeled data;

[0026] (1.33) Use the optimized model for target recognition.

[0027] As a preferred option, step (2) specifically includes:

[0028] (1) Centroid coordinate extraction: The centroid position of the fish is calculated by using the image moment algorithm and converted from pixel coordinates to actual physical coordinates, providing a basis for swimming speed calculation;

[0029] (2) Head and tail coordinate extraction: Automatically identify the position of the fish's head and tail, and extract the coordinates of the fish's head and tail to lay the foundation for subsequent analysis of tail wagging behavior;

[0030] (3) Midline extraction: Through morphological operations, the skeletal line of the fish is extracted to represent the central direction of the fish body, which is used to calculate the tail swing amplitude and angle of the fish body.

[0031] Preferred morphological manipulations include erosion, swelling, and skeleton extraction.

[0032] As a preferred option, step (3) specifically includes:

[0033] (1) Swimming speed: The swimming speed of fish on land is calculated based on the change of the centroid coordinate over time;

[0034] (2) Tail wagging behavior analysis: By analyzing the movement trajectory of the fish tail relative to the midline of the fish body, the tail wagging frequency, tail wagging amplitude and tail wagging angle are calculated.

[0035] Preferably, the tail swing frequency is calculated by Fourier transform, the tail swing amplitude is calculated by the maximum offset of the fish tail relative to the center line, and the tail swing angle is calculated by the range of the angle between the fish tail and the center line.

[0036] As a preferred option, in step (4), video or image files in the target folder are automatically retrieved, processed sequentially, and the processing results are exported in a standardized data format;

[0037] The processing results support visualization and can generate visual charts of fish movement trajectories and morphological changes.

[0038] This invention provides a dynamic fish individual morphological parameter processing system, which employs the aforementioned dynamic fish individual morphological parameter processing method and includes:

[0039] The video or image acquisition module is used to acquire video or image data in fish behavior experiments;

[0040] The binarization module is used to perform fish foreground segmentation and binarization processing;

[0041] The morphological transformation module is used to extract the centroid coordinates, head and tail coordinates, and midline of the fish body;

[0042] The kinematics calculation module is used to calculate the swimming speed, tail wagging frequency, tail wagging amplitude, and tail wagging angle of fish.

[0043] The batch data processing module is used to process experimental data in batches, standardize output, and visualize the data.

[0044] The beneficial effects of this invention are as follows:

[0045] 1) This invention proposes an automated method for processing fish morphological parameters based on computer vision and deep learning. This method can automatically extract key parameters such as the fish's centroid, head and tail coordinates, swimming speed, tail wagging frequency, tail wagging amplitude, and tail wagging angle. Using this method, fish data from experimental images or videos can be processed quickly and accurately, avoiding errors caused by traditional manual analysis, and demonstrating high efficiency in large-scale experimental data processing.

[0046] 2) The uniqueness of this invention is also reflected in its method for calculating morphological parameters. By creatively combining computer vision-related technologies with Euclidean geometry-related research techniques, it is possible to accurately identify the centroid and skeletal lines of individual fish by combining specific image pixel moments and skeleton extraction algorithms. Using morphological operations such as erosion and dilation, the midline is calculated, and then a mathematical model is creatively established through discrete pixels to further calculate the tail-wagging frequency, amplitude, and angle. This calculation method ensures stability and high accuracy under different experimental conditions.

[0047] 3) Furthermore, this invention combines the deep learning model DeepLabv3+ with a color thresholding model for segmenting the foreground region of individual fish. The high accuracy of the deep learning model in complex backgrounds significantly improves the quality of data extraction, thereby providing high-quality input for morphological parameter calculation.

[0048] 4) Compared to traditional manual analysis, this invention integrates two experimental data processing methods, which not only improves processing efficiency and reduces bias caused by human intervention, but also enables consistent results under different experimental conditions, making it particularly suitable for large-scale fish behavioral experiments. Furthermore, it overcomes the shortcomings of single methods, such as limited versatility and the inability to find a balance between identification accuracy, computational power requirements, and overall workload. By combining deep learning with unique morphological computation methods, this invention provides a more efficient and accurate data processing solution for fish behavioral research, offering strong technical support for ecological protection and related research. Attached Figure Description

[0049] Figure 1 This is a flowchart of a method for processing dynamic individual morphological parameters of fish in Example 1;

[0050] Figure 2 This is a schematic diagram of the convolutional neural network deep learning model in Example 2;

[0051] Figure 3 This is a comparison chart of the effects in Example 2;

[0052] Figure 4 This is a schematic diagram illustrating the definition of fish morphological parameters in Example 2;

[0053] Figure 5 This is a schematic diagram of the results of fish morphological parameter (coordinate) recognition in Example 2. Detailed Implementation

[0054] To further understand the content of this invention, a detailed description of the invention will be provided in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments are merely illustrative and not limiting of the invention.

[0055] Example 1

[0056] like Figure 1 As shown, this embodiment provides a method for processing dynamic individual morphological parameters of fish. By combining computer vision, deep learning, and morphological parameter calculation techniques, it automatically extracts and processes key morphological data in fish behavioral experiments. The specific steps include:

[0057] (1) Binarization of experimental videos or images: Appropriate image processing methods are adopted according to different background complexities:

[0058] With a clean background, the initial threshold is determined using the RGB three-channel information of the image and the OTSU algorithm; the threshold is then visually optimized to segment the foreground region of the fish.

[0059] Under normal background conditions, a transfer learning method based on a pre-trained DeepLabv3+ model is introduced to process sample data that meets the conditions, filter out images with poor performance and re-identify them;

[0060] Under conditions of complex backgrounds and reduced repetition, increase the amount of pre-training data, perform manual annotation when necessary, and optimize the model.

[0061] Binarization was performed using a deep learning model and a color thresholding model. The deep learning model was DeepLabv3+ or another semantic segmentation model with similar functionality. The color thresholding model was based on the OTSU algorithm and combined with RGB three-channel binarization filtering of the image or video to ensure accurate segmentation of the fish foreground. Through transfer learning, the deep learning model was able to adapt to different experimental conditions, including complex backgrounds, lighting variations, and different fish species, thus improving the accuracy of foreground segmentation.

[0062] (2) Extraction of morphological parameters: Based on the binarized image, the key morphological parameters of the fish are automatically extracted using morphological transformation technology, including the centroid coordinates, the coordinates of the head and tail, and the midline of the body.

[0063] (3) Calculation of kinematic parameters: Further calculate the kinematic parameters of fish based on morphological parameters, including swimming speed, tail wag frequency, tail wag amplitude and tail wag angle;

[0064] (4) Batch processing and standardized output of data: Automated processing of large-scale video or image data, and exporting the processing results in a standardized data format and displaying them visually.

[0065] In step (1), under the condition of a clean background, the RGB three-channel information of the video frame or image can be fully utilized, combined with the OTSU algorithm to determine the initial color threshold. The specific operation is as follows:

[0066] (1.11) First, the image is analyzed using the OTSU algorithm to determine the initial threshold of the color filtering model. The OTSU algorithm can adaptively select the threshold to distinguish between the foreground and the background.

[0067] (1.12) After obtaining the initial threshold, perform a visualization operation to view the filtering effect;

[0068] (1.13) Based on the visualization results, the user can adjust the threshold appropriately to make the filtering conditions more refined and meet the actual application requirements; the adjusted threshold will be used in the filtering model to ensure that the fish morphology region is accurately segmented in the case of a simple background.

[0069] In step (1), under general background conditions, the methods in steps (1.11)-(1.13) are combined with a deep learning model for further optimization. The specific process is as follows:

[0070] (1.21) Use a color filtering model to perform preliminary processing on samples that meet the conditions, and randomly select a portion of image data as the training set;

[0071] (1.22) Using a pre-trained DeepLabv3+ model, transfer learning is performed on the selected samples to generate a new model that adapts to the current dataset; transfer learning can effectively utilize the feature extraction capabilities of the pre-trained model and quickly adapt to new tasks.

[0072] (1.23) The new model is used to process the data, and the discrimination conditions are set to filter out the image samples with poor performance;

[0073] (1.24) For these poorly performing images, the DeepLabv3+ model is re-applied for recognition to obtain more accurate segmentation results.

[0074] In step (1), under the conditions of complex background and reduced repetition, it is necessary to further enhance the applicability of the model. The specific operation steps are as follows:

[0075] (1.31) While following steps (1.21)-(1.23), increase the amount of pre-training data to ensure that the model has good recognition ability under more diverse conditions;

[0076] (1.32) When necessary, combine a certain amount of manually labeled data to optimize the labels of the DeepLabv3+ model; manual labeling can provide more accurate training data and improve the model’s segmentation performance in complex backgrounds.

[0077] (1.33) Using the optimized model for target recognition can effectively improve the applicability and recognition accuracy of the model, and can achieve stable segmentation results even in complex backgrounds.

[0078] The above three processing schemes can effectively segment and recognize image and video data with different background complexities, thereby improving the applicability and accuracy of the fish morphological parameter data processing system.

[0079] In step (2), based on the binarized image, the system further utilizes morphological transformations to extract key morphological parameters of the fish, specifically:

[0080] (1) Centroid coordinate extraction: The centroid position (geometric center) of the fish is calculated by using the image moment algorithm and converted from pixel coordinates to actual physical coordinates, providing a basis for swimming speed calculation;

[0081] (2) Head and tail coordinate extraction: Automatically identify the position of the fish's head and tail, and extract the coordinates of the fish's head and tail to lay the foundation for subsequent analysis of tail wagging behavior;

[0082] (3) Midline extraction: Through morphological operations, the skeletal line of the fish is extracted to represent the central direction of the fish body, which is used to calculate the tail swing amplitude and angle of the fish body; morphological operations include erosion, swelling and skeletal extraction.

[0083] In step (3), specifically:

[0084] (1) Swimming speed: The swimming speed of fish on land is calculated based on the change of the centroid coordinate over time;

[0085] (2) Tail wagging behavior analysis: By analyzing the movement trajectory of the fish tail relative to the midline of the fish body, the tail wagging frequency, tail wagging amplitude, and tail wagging angle are calculated. The tail wagging frequency is calculated by Fourier transform, the tail wagging amplitude is calculated by the maximum offset of the fish tail relative to the midline, and the tail wagging angle is calculated by the range of changes in the angle between the fish tail and the midline.

[0086] In step (4), video or image files in the target folder are automatically retrieved, processed sequentially, and the processing results are exported in a standardized data format (such as CSV, Excel). The processing results support visualization and can generate visual charts of fish movement trajectories and morphological changes, making it convenient for users to intuitively analyze experimental results.

[0087] This invention provides a dynamic fish individual morphological parameter processing system, which employs the aforementioned dynamic fish individual morphological parameter processing method and includes:

[0088] The video or image acquisition module is used to acquire video or image data in fish behavior experiments;

[0089] The binarization module is used to perform fish foreground segmentation and binarization processing; the deep learning module is developed based on Python and integrates open source libraries such as OpenCV and PyTorch for image processing and computation.

[0090] The morphological transformation module is used to extract the centroid coordinates, head and tail coordinates, and midline of the fish body;

[0091] The kinematics calculation module is used to calculate the swimming speed, tail wagging frequency, tail wagging amplitude, and tail wagging angle of fish. The kinematics calculation module can monitor and process the changes in kinematic parameters of fish at different time points during the experiment in real time, and realize the dynamic analysis of fish behavior.

[0092] The batch data processing module is used to process experimental data in batches, standardize output, and visualize the data.

[0093] The system supports broad adaptability to different experimental environments and fish species, and can automatically adjust the foreground segmentation model and morphological transformation parameters to adapt to different experimental conditions.

[0094] This embodiment also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, causes the processor to implement the steps of the above-described method for processing dynamic fish individual morphological parameters.

[0095] Example 2

[0096] Automatic processing of experimental videos

[0097] This embodiment addresses common experimental videos or images used in fish behavioral experiments, and automatically processes fish morphological parameters through the following steps:

[0098] 1. Experimental Data Acquisition

[0099] Equipment and Format: High-speed cameras and other experimental equipment were used to collect videos of fish movement. The experimental data were stored in MP4 format with a video frame rate of 30 frames per second.

[0100] Data import: Users import experimental videos into the system, which decomposes the video frame by frame into images and processes each frame in a binarized manner.

[0101] 2. Deep learning model segmentation

[0102] Model Application: The system uses a trained DeepLabv3+ deep learning model to segment the fish foreground in each frame of the image and generate a binarized image.

[0103] like Figure 2 The diagram illustrates a convolutional neural network (CNN) deep learning model. The input passes through multiple convolutional layers, downsampling layers, and feature extraction layers to progressively extract features. Later, these features are integrated through fusion layers and skip connections to ultimately generate the output.

[0104] Training basis: This deep learning model is trained on a large amount of fish experimental data and can accurately identify the foreground region of fish in complex backgrounds (such as underwater obstacles, uneven lighting, etc.).

[0105] Segmentation results: After segmentation, the binarized image completely distinguishes the fish region from the background, ensuring the accuracy of subsequent data processing.

[0106] like Figure 3 As shown, data processing was performed using 80% simple background, 15% ordinary background, and 5% complex background (per frame) to simulate actual recognition work. The effects of these three schemes were compared with those of the traditional scheme. Eight parameters were statistically analyzed and normalized to obtain a comparison of the combined effects of the four schemes, in order to quantitatively compare the advantages of the four schemes.

[0107] 3. Morphological transformation and parameter extraction

[0108] Morphological operations: Morphological transformation operations are performed on the segmented binary image, mainly including steps such as erosion and dilation, to remove noise and smooth the outline of fish.

[0109] Parameter calculation:

[0110] Centroid coordinate extraction: The system uses an image moment algorithm to calculate the pixel position of the fish's centroid and converts it into actual physical coordinates. The centroid is a key parameter describing the fish's position and movement.

[0111] Head and tail coordinate extraction: By analyzing the extreme points of the fish's outline, the system automatically identifies the positions of the fish's head and tail and extracts their coordinates for subsequent tail-wagging behavior analysis.

[0112] Midline extraction: Further, the midline of the fish body is extracted using skeleton extraction technology to describe the morphological characteristics of the fish, such as the amplitude and angle of tail wagging.

[0113] like Figure 4 The diagram shown illustrates the definition of some morphological parameters in fish. Figure 5 The diagram shows the results of fish morphological parameter (coordinate) identification. Four operating conditions (circumferential flow around a cylinder, flow around a D-cylinder, flow around a square cylinder, and flow around a triangular cylinder) were selected and divided into 9 regions, denoted as NL, NC, NR, CL, CC, CR, FL, FC, and FR. The coordinate frequencies in each region were counted and summarized, and the results are consistent with the actual situation.

[0114] Calculation of fish kinematic parameters

[0115] After extracting the fish's center of mass, head and tail coordinates, and midline, this embodiment further calculates the fish's kinematic parameters to accurately analyze the fish's movement behavior.

[0116] 1. Swimming speed calculation

[0117] Velocity Formula: The system calculates the swimming speed of the fish based on the change of the center of mass coordinates along the time axis. It is assumed that the fish's center of mass changes over time. The position of time is In time The position of time is swimming speed Calculated using the following formula:

[0118]

[0119] Time frame setting: The system supports setting different time frame rates, and calculates the average swimming speed of fish by accumulating the inter-frame displacement.

[0120] 2. Analysis of Tail Wagging Behavior

[0121] Frequency Analysis: The system analyzes the oscillation frequency of the fish tail relative to the midline using Fourier transform. , which represents the number of times the fish tail swings per unit of time.

[0122] Tail swing amplitude calculation: Tail swing amplitude The system calculates the tail's position relative to the midline of the fish's body by measuring the maximum offset of the tail. Each frame, the system calculates the distance between the tail's position and the midline, and records the maximum value as the tail's amplitude.

[0123] Tail swing angle change: Tail swing angle θ represents the range of angle change between the fish tail and the midline of the fish body. The system calculates the maximum deflection angle of the fish tail during the entire movement process by detecting the angle change during the tail swing process.

[0124] Batch processing and standardized output

[0125] To meet the needs of large-scale experimental data processing, this embodiment implements batch processing functionality for video or image data.

[0126] 1. Batch Data Import

[0127] Batch file import: Users can import multiple experimental video or image files into the system in batches. The system automatically scans all video files in the target folder and processes each video file frame by frame.

[0128] Long-duration video processing: For long-duration experimental videos, the system will break the video into a sequence of frames according to the time interval set by the user, in order to avoid processing bottlenecks caused by excessive data volume.

[0129] 2. Standardized data output

[0130] Output format: The processed results, including the fish's center of mass, head and tail coordinates, swimming speed, tail wagging frequency, tail wagging amplitude, and tail wagging angle, are output in a standardized data format, such as a CSV or Excel file.

[0131] Visualization: The system also supports the visualization of processing results, and can generate fish movement trajectory diagrams, tail wagging behavior diagrams, etc., so that users can intuitively analyze experimental results.

[0132] System hardware and software support

[0133] To ensure efficient data processing, the system in this embodiment supports GPU acceleration, which can significantly shorten processing time, especially when processing deep learning model inference.

[0134] 1. Hardware support

[0135] GPU-accelerated configuration: The system can be configured to run on computers with GPU acceleration capabilities, making it particularly suitable for large-scale data processing scenarios, such as processing long-duration, high-frame-rate experimental videos.

[0136] Processor and memory: It is recommended to use a high-performance multi-core processor and sufficient memory to support inference of deep learning models and parallel processing of large-scale data.

[0137] 2. Software Support

[0138] Development environment: The system is developed based on Python and integrates multiple open-source libraries, such as OpenCV, PyTorch, and NumPy, to realize a complete processing flow from image processing and deep learning inference to data analysis.

[0139] Modular design: The system adopts a modular design, allowing users to customize the parameter settings of each module according to experimental needs. For example, setting the threshold of the segmentation model and adjusting the parameters of morphological transformation can adapt to different experimental environments and fish species.

[0140] Application scenarios

[0141] The method and system of this embodiment can be widely applied in fields such as fish behavior, ecological protection, fisheries management, and fish monitoring in water conservancy projects.

[0142] 1. Fish behavioral studies

[0143] Kinematic parameter analysis: By accurately extracting the kinematic parameters of fish, this embodiment can help researchers better analyze the movement patterns of fish in different environments, such as swimming speed and tail wagging behavior, thereby studying the ecological behavior of fish.

[0144] 2. Ecological protection and water conservancy projects

[0145] Monitoring and assessment: The application of this embodiment in rivers or reservoirs can be used to monitor the behavioral characteristics of fish, assess the impact of water conservancy projects (such as fishways, hydraulic structures, etc.) on fish habitats, and thus guide the management of ecological flow.

[0146] This embodiment provides an efficient and automated method for processing individual morphological parameters of fish, which can automatically extract and calculate key parameters of fish under various complex experimental conditions, providing strong technical support for fish behavioral research and ecological protection.

[0147] The present invention and its embodiments have been described above illustratively. This description is not restrictive, and the figures shown are only one embodiment of the present invention; the actual structure is not limited thereto. Therefore, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the present invention, such designs should fall within the protection scope of the present invention.

Claims

1. A method for processing dynamic individual morphological parameters of fish, characterized in that: By combining computer vision, deep learning, and morphological parameter calculation techniques, key morphological data in fish behavioral experiments are automatically extracted and processed. Specific steps include: (1) Binarization of experimental videos or images: Appropriate image processing methods are adopted according to different background complexities: With a clean background, the initial threshold is determined using the RGB three-channel information of the image and the OTSU algorithm; the threshold is then visually optimized to segment the foreground region of the fish. Under normal background conditions, a transfer learning method based on a pre-trained DeepLabv3+ model is introduced to process sample data that meets the conditions, filter out images with poor performance and re-identify them; Under conditions of complex backgrounds and reduced repetition, increase the amount of pre-training data, perform manual annotation, and optimize the model; (2) Extraction of morphological parameters: Based on the binarized image, the key morphological parameters of the fish are automatically extracted using morphological transformation technology, including the centroid coordinates, the coordinates of the head and tail, and the midline of the body. (3) Calculation of kinematic parameters: Further calculate the kinematic parameters of fish based on morphological parameters, including swimming speed, tail wag frequency, tail wag amplitude and tail wag angle; (4) Batch processing and standardized output of data: Automated processing of large-scale video or image data, and exporting the processing results in a standardized data format and displaying them visually; In step (1), under the condition of a clean background, the RGB three-channel information of the video frame or image can be fully utilized, combined with the OTSU algorithm to determine the initial color threshold. The specific operation is as follows: (1.11) First, the image is analyzed using the OTSU algorithm to determine the initial threshold of the color filtering model. The OTSU algorithm can adaptively select the threshold to distinguish between the foreground and the background. (1.12) After obtaining the initial threshold, perform a visualization operation to view the filtering effect; (1.13) Based on the visualization results, the user adjusts the threshold appropriately; the adjusted threshold will be used to filter the model to ensure that the fish morphology region is accurately segmented in the case of a simple background. In step (1), under general background conditions, the methods in steps (1.11)-(1.13) are combined with a deep learning model for further optimization. The specific process is as follows: (1.21) Use a color filtering model to perform preliminary processing on samples that meet the conditions, and randomly select a portion of image data as the training set; (1.22) Using a pre-trained DeepLabv3+ model, transfer learning is performed on the selected samples to generate a new model adapted to the current dataset; (1.23) The new model is used to process the data, and the discrimination conditions are set to filter out the image samples with poor performance; (1.24) For these poorly performing images, the DeepLabv3+ model is used again for recognition; In step (1), under the conditions of complex background and reduced repetition, it is necessary to further enhance the applicability of the model. The specific operation steps are as follows: (1.31) While following steps (1.21)-(1.23), increase the amount of pre-training data; (1.32) Optimize the labels of the DeepLabv3+ model by combining manually labeled data; (1.33) Use the optimized model for target recognition.

2. The method for processing dynamic individual morphological parameters of fish according to claim 1, characterized in that: In step (2), specifically: (1) Centroid coordinate extraction: The centroid position of the fish is calculated by using the image moment algorithm and converted from pixel coordinates to actual physical coordinates, providing a basis for swimming speed calculation; (2) Head and tail coordinate extraction: Automatically identify the position of the fish's head and tail, and extract the coordinates of the fish's head and tail to lay the foundation for subsequent analysis of tail wagging behavior; (3) Midline extraction: Through morphological operations, the skeletal line of the fish is extracted to represent the central direction of the fish body, which is used to calculate the tail swing amplitude and angle of the fish body.

3. The method for processing dynamic individual morphological parameters of fish according to claim 2, characterized in that: Morphological manipulations include erosion, swelling, and skeleton extraction.

4. The method for processing dynamic individual morphological parameters of fish according to claim 3, characterized in that: In step (3), specifically: (1) Swimming speed: The swimming speed of fish on land is calculated based on the change of the centroid coordinate over time; (2) Tail wagging behavior analysis: By analyzing the movement trajectory of the fish tail relative to the midline of the fish body, the tail wagging frequency, tail wagging amplitude and tail wagging angle are calculated.

5. The method for processing dynamic individual morphological parameters of fish according to claim 4, characterized in that: The tail-wagging frequency is calculated using Fourier transform, the tail-wagging amplitude is calculated using the maximum offset of the tail relative to the center line, and the tail-wagging angle is calculated using the range of changes in the angle between the tail and the center line.

6. The method for processing dynamic individual morphological parameters of fish according to claim 5, characterized in that: In step (4), video or image files in the target folder are automatically retrieved, processed sequentially, and the processing results are exported in a standardized data format; The processing results support visualization and can generate visual charts of fish movement trajectories and morphological changes.

7. A dynamic fish individual morphological parameter processing system, characterized in that: It employs a dynamic fish individual morphological parameter processing method as described in any one of claims 1-6, and includes: The video or image acquisition module is used to acquire video or image data in fish behavior experiments; The binarization module is used to perform fish foreground segmentation and binarization processing; The morphological transformation module is used to extract the centroid coordinates, head and tail coordinates, and midline of the fish body; The kinematics calculation module is used to calculate the swimming speed, tail wagging frequency, tail wagging amplitude, and tail wagging angle of fish. The batch data processing module is used to process experimental data in batches, standardize output, and visualize the data.

Citation Information

Patent Citations

  • Zebra fish morphological scoring method based on DeepLabV3Plus

    CN113361353A

  • Automatic data set generation method based on image processing

    CN118279699A