Search

CN-120126171-B - Dynamic fish monomer morphological parameter processing method and system

CN120126171BCN 120126171 BCN120126171 BCN 120126171BCN-120126171-B

Abstract

The invention relates to the technical field of hydraulic engineering and environmental ecological protection, and provides a method and a system for processing dynamic fish monomer morphological parameters, wherein key morphological data in fish behavioral experiments are automatically extracted and processed by combining computer vision, deep learning and morphological parameter calculation technologies; the method comprises the steps of (1) extracting morphological parameters, (3) calculating the kinematic parameters, and (4) carrying out batch processing and standardized output on data. Provides a more efficient and accurate data processing scheme for fish behavioural research and provides support for fish morphological analysis under different experimental environments.

Inventors

  • LI DONGQIU
  • QI YANBING
  • WANG RUIDA
  • YAO WEIWEI
  • Xi Yuqian
  • LIU SHIKANG
  • Xin Yuqin
  • Zheng Qianyin
  • CAO CHENYANG
  • WANG QIANQIAN
  • Yang Yacun

Assignees

  • 四川大学

Dates

Publication Date
20260508
Application Date
20250109

Claims (7)

  1. 1. A processing method of dynamic fish monomer morphological parameters is characterized by automatically extracting and processing key morphological data in fish behavioral experiments by combining computer vision, deep learning and morphological parameter calculation technologies, and comprises the following specific steps: (1) Binarization processing of experimental video or image, namely adopting a corresponding image processing method according to the conditions of different background complexity: under the condition of clean background, the RGB three-channel information of the image is utilized, and an initial threshold value is determined by combining an OTSU algorithm; Under the general background condition, introducing a pre-training DeepLabv & lt3+ & gt model-based transfer learning method, processing sample data meeting the conditions, screening images with poor effects, and re-identifying; Under the conditions of complex background and reduced repeatability, increasing the quantity of pre-training data, manually marking, and optimizing a model; (2) Extracting morphological parameters, namely automatically extracting key morphological parameters of fish, including barycenter coordinates, fish head and fish tail coordinates and fish body center line, by using morphological transformation technology based on the binarized image; (3) Calculating kinematic parameters of fish based on the morphological parameters, including swimming speed, tail-swing frequency, tail-swing amplitude and tail-swing angle; (4) The batch processing and standardized output of data, namely, automatically processing large-scale video or image data, exporting a processing result in a standardized data format and visually displaying; in the step (1), under the condition of clean background, the RGB three-channel information of the video frame or image can be fully utilized, and the initial color threshold value is determined by combining an OTSU algorithm, and the specific operation is as follows: (1.11) first analyzing the image by OTSU algorithm to determine an initial threshold for the color filter model, the OTSU algorithm being able to adaptively select the threshold to distinguish between foreground and background; (1.12) after the initial threshold is obtained, performing a visualization operation to view the filtering effect; (1.13) according to the visual result, the user properly adjusts the threshold value, wherein the adjusted threshold value is used for filtering the model, so that the fish morphological region can be accurately segmented under the condition of simple background; In the step (1), under the general background condition, the methods of the steps (1.11) - (1.13) are combined, and meanwhile, a deep learning model is introduced for further optimization, and the specific flow is as follows: (1.21) performing preliminary processing on the samples meeting the conditions by using a color filtering model, and randomly extracting part of image data to be used as a training set; (1.22) using a pre-trained DeepLabv3+ model, performing transfer learning in combination with the selected samples to generate a new model adapted to the current dataset; (1.23) processing the data by using the new model, and setting discrimination conditions to screen out image samples with poor effects; (1.24) for these poorly performing images, reusing the DeepLabv3+ model for recognition; in the step (1), under the conditions of complex background and reduced repeatability, the applicability of the model needs to be further enhanced, and the specific operation steps are as follows: (1.31) increasing the amount of pre-training data while following steps (1.21) - (1.23); (1.32) optimizing the label of the DeepLabv3+ model by combining manual labeling data; (1.33) performing object recognition by using the optimized model.
  2. 2. The method for processing the morphological parameters of the dynamic fish monomers according to claim 1, wherein in the step (2), the method is specifically as follows: (1) The centroid coordinate extraction, namely calculating the centroid position of fish through an image moment algorithm, and converting the centroid position of fish from pixel coordinates to actual physical coordinates, so as to provide a basis for swimming speed calculation; (2) Head and tail coordinates extraction, namely automatically identifying the head and tail positions of fish, extracting the coordinates of the head and the tail of the fish, and laying a foundation for the analysis of the follow-up tail swing behaviors; (3) And extracting a central line, namely extracting skeleton lines of the fish through morphological operation, representing the central trend of the fish body, and calculating the tail swing amplitude and angle of the fish body.
  3. 3. The method of claim 2, wherein the morphological operations include corrosion, swelling and skeleton extraction.
  4. 4. The method for processing the morphological parameters of the dynamic fish monomers according to claim 3, wherein in the step (3), the method is specifically as follows: (1) Swimming speed, namely calculating the swimming speed of the fish to the ground based on the change of the barycenter coordinates along with time; (2) And (3) analyzing the tail-swing behavior, namely calculating the tail-swing frequency, the tail-swing amplitude and the tail-swing angle by analyzing the motion trail of the fish tail relative to the centerline of the fish body.
  5. 5. The method of claim 4, wherein the tail-flick frequency is calculated by Fourier transform, the tail-flick amplitude is calculated by maximum offset of the tail relative to the centerline, and the tail-flick angle is calculated by the range of variation of the angle between the tail and the centerline.
  6. 6. The method of claim 5, wherein in step (4), video or image files in the target folder are automatically retrieved, sequentially processed, and the processed result is exported into a standardized data format; the processing result supports visual display, and a visual chart of fish motion trail and morphological change can be generated.
  7. 7. A dynamic fish monomer morphological parameter processing system is characterized in that the dynamic fish monomer morphological parameter processing system adopts the dynamic fish monomer morphological parameter processing method according to any one of claims 1-6, and comprises the following steps: the video or image acquisition module is used for acquiring video or image data in the fish behavior experiment; the binarization module is used for executing fish prospect segmentation and binarization processing; The morphological transformation module is used for extracting barycenter coordinates, head-tail coordinates and a fish body center line of the fish; The kinematic calculation module is used for calculating the swimming speed, tail-swing frequency, tail-swing amplitude and tail-swing angle of the fish; And the data batch processing module is used for realizing batch processing, standardized output and visual display of experimental data.

Description

Dynamic fish monomer morphological parameter processing method and system Technical Field The invention relates to the technical field of hydraulic engineering and environmental ecological protection, in particular to a method and a system for processing dynamic fish monomer morphological parameters. Background With the deep research of aquatic ecological environment protection and fish behaviours, quantifying fish morphological parameters becomes critical in fishery management, ecological protection and monitoring. The motion mode and the behavior of the fish monomer can directly reflect the health condition of a water ecological system and the physiological state of the fish, so that morphological parameters of the fish monomer, such as barycenter coordinates, head-tail coordinates, swimming speed, tail-tail frequency, tail-tail amplitude, tail-tail angle and the like, are accurately obtained, and have a vital effect on deep research of fish behaviours. At present, the way of obtaining morphological data of fish monomers is mainly manual operation, and experimenters need to analyze videos or images frame by frame. This approach is not only time consuming and laborious, but is also subject to human factors, resulting in inaccuracy or inconsistency of the data, especially when processing large amounts of sample data, with inefficiency of manual operation, and error. In addition, the operation of different experimenters has difference, and data lacks standardization, which is unfavorable for subsequent analysis and comparison. Therefore, an automatic and standardized processing method is developed, the data processing efficiency can be improved, the error is reduced, and the method has important significance for fish morphology research. In recent years, researchers have begun to apply computer vision and deep learning techniques to automatically segment the individual prospects of fish and extract the critical parameters of fish through morphological algorithms. However, the existing method is difficult to find a proper balance point among the identification accuracy, the calculation force requirement and the total workload, so that how to improve the universality and the efficiency becomes a key challenge of fish morphology research. Disclosure of Invention The invention provides a dynamic fish monomer morphological parameter processing method and a system, which can process experimental data rapidly and efficiently and provide support for fish morphological analysis in different experimental environments. According to the method for processing the dynamic fish monomer morphological parameters, disclosed by the invention, key morphological data in fish behavioral experiments are automatically extracted and processed by combining computer vision, deep learning and morphological parameter calculation technologies, and the specific steps comprise: (1) Binarization processing of experimental video or image, namely adopting a corresponding image processing method according to the conditions of different background complexity: under the condition of clean background, the RGB three-channel information of the image is utilized, and an initial threshold value is determined by combining an OTSU algorithm; Under the general background condition, introducing a pre-training DeepLabv & lt3+ & gt model-based transfer learning method, processing sample data meeting the conditions, screening images with poor effects, and re-identifying; under the conditions of complex background and reduced repeatability, increasing the quantity of pre-training data, manually marking if necessary, and optimizing a model; (2) Extracting morphological parameters, namely automatically extracting key morphological parameters of fish, including barycenter coordinates, fish head and fish tail coordinates and fish body center line, by using morphological transformation technology based on the binarized image; (3) Calculating kinematic parameters of fish based on the morphological parameters, including swimming speed, tail-swing frequency, tail-swing amplitude and tail-swing angle; (4) And the batch processing and standardized output of the data are realized by the automatic processing of large-scale video or image data, and the processing result is exported and visually displayed in a standardized data format. Preferably, in the step (1), under the condition of clean background, the RGB three-channel information of the video frame or image can be fully utilized, and the initial color threshold is determined by combining the OTSU algorithm, which specifically comprises the following steps: (1.11) first analyzing the image by OTSU algorithm to determine an initial threshold for the color filter model, the OTSU algorithm being able to adaptively select the threshold to distinguish between foreground and background; (1.12) after the initial threshold is obtained, performing a visualization operation to view the filtering effect; And (1.13) properly a