Behavior monitoring method for farmed fish based on laser-paired tube array

Through laser-paired tube arrays and machine learning models, the problems of insufficient lighting and turbid water quality in fish behavior monitoring in aquaculture have been solved, achieving high-precision, low-cost fish behavior analysis.

CN118734009BActive Publication Date: 2025-09-26SOUTH CHINA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410682445.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2025-09-26
Estimated Expiration
2044-05-29

AI Technical Summary

Technical Problem

Existing machine vision-based video image analysis technology is affected by insufficient light and turbid water in aquaculture environments, resulting in low performance and difficulty in effectively monitoring fish behavior.

Method used

A laser tube array is used to monitor fish behavior. The number, movement and aggregation characteristics of fish schools are extracted through linear discriminant analysis and kernel density estimation. The LightGBM gradient boosting decision tree model is combined for prediction to construct a fish behavior analysis model.

Benefits of technology

High-precision, low-cost fish behavior monitoring is achieved in complex underwater environments, overcoming the limitations of turbid water and insufficient light, and improving the prediction accuracy of fish counts, movement volume and aggregation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118734009B_ABST
    Figure CN118734009B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for monitoring the behavior of farmed fish based on a laser paired tube array, and the steps are as follows: using a laser paired tube array to collect fish activity signals; in terms of fish counting, using linear discriminant analysis to reduce the dimension of the data, and combining kernel density estimation to extract the number characteristics of the fish; in terms of motion index, extracting features from three levels: statistics, time series, and information entropy; in terms of aggregation and aggregation center index, using a density map and iso-density lines generated by two-dimensional kernel density estimation to extract spatial distribution features. Based on the extracted features, the core indicators of various fish behaviors are predicted to conduct a qualitative analysis of the fish behavior. The present invention monitors the behavior of fish in an aquaculture environment based on the signals collected by the laser paired tube array. With its advantages such as underwater penetration, low cost, high precision, and strong anti-interference, it has certain application potential and advantages in the field of fish behavior monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of aquaculture monitoring, and in particular to a method for monitoring the behavior of farmed fish based on a laser tube array. Background Art

[0002] Fish behavior is a crucial indicator of their health and changes in their habitat. Promptly identifying and alerting to abnormal fish behavior can aid in early disease diagnosis, optimize husbandry and management strategies, improve survival and reproductive success rates, and safeguard fish welfare. Previously, monitoring fish health relied on post-harvest dissection and analysis. Advances in technology have made it possible to surgically implant sensors in fish for remote, real-time monitoring.

[0003] With the development of computer vision technology, image-based analysis is becoming increasingly mainstream. However, existing mainstream fish monitoring methods, such as traditional cameras, are limited by the absorption and scattering of light by water in underwater environments, resulting in poor image quality and difficulty in application in complex aquaculture environments. While infrared imaging can overcome low-light issues to a certain extent, it also faces similar limitations when used underwater. Regarding acoustic imaging, although sound waves have low energy attenuation underwater and have a high penetration depth, high-performance acoustic equipment is expensive and has a high operating threshold, making it difficult to popularize and promote.

[0004] In contrast, laser-paired tube technology demonstrates unique advantages in the field of fish monitoring. The laser beam's concentrated energy provides excellent underwater propagation performance, coupled with its extremely high response speed, making it particularly suitable for real-time monitoring scenarios. Furthermore, lasers offer excellent interference immunity and precision, enabling them to capture subtle target features in complex underwater environments. Furthermore, a sparse array of laser-paired tubes maintains monitoring efficiency while reducing costs, facilitating widespread application in the aquaculture industry. Summary of the Invention

[0005] This invention aims to address the low performance of existing machine vision-based video image analysis technologies in complex aquaculture environments, such as those characterized by insufficient lighting and turbid water. By proposing a method for monitoring farmed fish behavior using a laser-paired array, this method demonstrates unique potential for identifying fish behavior in aquaculture, due to its long-range, low-cost, high-precision, and robust interference resistance. It has considerable application prospects and potential for widespread adoption.

[0006] The purpose of the present invention can be achieved by taking the following technical solutions:

[0007] A method for monitoring the behavior of farmed fish based on a laser tube array, characterized by comprising the following steps:

[0008] S1. Place the transmitting array and receiving array of the laser pair tube on both sides of the aquaculture tank to continuously collect signals of fish activities;

[0009] S2. Using linear discriminant analysis to reduce the dimensionality of the multi-channel laser beam array signals collected in S1 into one signal, and using kernel density estimation to extract fish population-related features from the reduced-dimensional signals;

[0010] S3, using the fish population-related features obtained in S2, train an elastic network regression model to predict the fish population;

[0011] S4, extracting fish movement-related features from three dimensions: statistical features, time series features, and information entropy features for the multi-channel laser tube array signals collected in S1;

[0012] S5, based on the fish movement related features obtained by the laser tube array in S4, train the LightGBM gradient boosting decision tree to predict the fish movement;

[0013] S6. Using the multi-channel laser beam array signals collected in S1, two-dimensional kernel density estimation is used to depict the fish-dense area, and the density map and isopycnal lines are combined to extract the relevant features of the fish aggregation degree.

[0014] S7, based on the fish aggregation related features obtained by S6 based on the laser tube array, train the LightGBM gradient boosting decision tree to predict the fish aggregation degree;

[0015] S8, using two-dimensional kernel density estimation to calculate the fish school aggregation center index for the multi-channel laser pairing signals collected by the laser pairing array in S1; and verifying the calculated fish school aggregation center index and correcting it through linear transformation;

[0016] S9. Construct an analysis model of fish behavior based on the fish population predicted in S3, the fish movement volume predicted in S5, the fish aggregation degree predicted in S7, and the corrected fish aggregation center index in S8.

[0017] Furthermore, the step S1 includes the following steps:

[0018] S101. The laser pair tube consists of a laser emitting tube and a laser receiving tube, placed opposite each other on either side of the aquaculture tank. The laser emitting tube emits a highly concentrated laser beam, while the laser receiving tube detects the laser light emitted by the laser emitting tube and converts the optical signal into an electrical signal. Multiple laser pair tubes are arranged in a matrix with a length of x and a width of y, forming an x×y laser pair tube array. The spacing between adjacent laser pair tubes in the array is just larger than the size of the largest individual in the school of fish, so that a fish can only block the light path of one laser pair tube at a time.

[0019] S102. The laser tubes continuously collect on-off signals. When a school of fish passes by a laser tube, the laser light path is blocked and the signal value is 1, indicating that the laser tube is triggered. When no fish passes by, the signal value is 0. The collected signal can be expressed as a three-dimensional binary array L(t,x,y) of t×x×y, where the dimension t corresponds to the time axis within a time window of length T frames, and x and y correspond to the row coordinate and column coordinate of the array on the plane, respectively.

[0020] Furthermore, step S2 includes the following steps:

[0021] S201. Collect data from the laser tube array and use the actual number of fish as the category label. Here, it is assumed that the total number of categories is C. The process of linear discriminant analysis is as follows:

[0022] First, calculate the scatter matrix S within each category w For each category (i.e., different number of fish schools) i, its scatter matrix can be calculated by the following formula:

[0023]

[0024] Among them, X i is the set of samples belonging to category i, μ i is the sample mean of category i; C is the total number of categories;

[0025] Next, calculate the inter-class scatter matrix S b . It can be calculated by the following formula:

[0026]

[0027] Among them, N i is the number of samples of category i, μ is the mean of all samples, μ i is the sample mean of category i;

[0028] Solve the generalized eigenvalue problem of linear discriminant analysis, that is, solve the matrix S w -1 S b The eigenvalues ​​and corresponding eigenvectors of are shown in the following formula:

[0029] det(S w -1 S b -λI)=0

[0030] The det(·) function calculates the matrix determinant, where I is the identity matrix. By solving the eigenvalue equation, the eigenvalues ​​λ1,λ2,…,λ d ,

[0031] (Sw -1 S b -λ i I)w i =0

[0032] For each eigenvalue λ i , solving the equations gives the corresponding eigenvector w i ;

[0033] Select the most important eigenvector according to the size of the eigenvalue as the projection matrix W;

[0034] Project the sample into the subspace formed by the selected eigenvectors, that is, perform a linear transformation:

[0035] Y=XW

[0036] Where X is the original data matrix, i.e., the x×y laser pair tube signal L(t,x,y), Y is the projected data matrix, i.e., the reduced dimension laser pair tube signal L'(t), and W is the projection matrix.

[0037] S202. Perform statistical analysis on the signal L'(t) after the linear discriminant analysis in S201 using kernel density estimation, and the formula is as follows:

[0038]

[0039] in, is the estimated value of the kernel density estimation curve at position x, T is the length of the observed signal L'(t), and K(·) is the Gaussian kernel function;

[0040] S203, calculating the mean of the signal L'(t) as the first characteristic of the number of fish: calculating the mean of the signal L'(t) is to sum L'(t) and divide it by the length T of L'(t);

[0041] S204, the kernel density estimation curve calculated in S202 The second to tenth features of the number of fish are extracted, which are:

[0042] Peak count: Use the differential operation to calculate the first-order difference of the signal Δf[n] = f[n] - f[n-1]. Then traverse the differential signal Δf[n] and find the point n that satisfies the conditions Δf[n] > 0 and Δf[n+1] < 0. These points are the peak points. Finally, count the number of peak points found, which is the peak number N. p ;

[0043] Main peak position: the position of the largest peak point in the kernel density estimation curve;

[0044] Main peak height: the height of the largest peak in the kernel density estimation curve, that is, the maximum value of the peak point;

[0045] Peak spacing: The distance between the leftmost peak (left peak) and the rightmost peak (right peak) of the kernel density estimation curve. The relative coordinates between the peaks are used to measure the position of the peaks.

[0046] Tail peak height: the average of the peak heights of the left tail peak and the right tail peak.

[0047] Curve support width: the interval where the probability density function is non-zero, that is, the horizontal coordinate span from the leftmost to the rightmost side of the kernel density estimation curve;

[0048] Tail width: The width of the tail region in the kernel density estimation curve, where the tail is the tail on both sides of the curve, that is, the area with an amplitude less than two standard deviations of the mean, is called the tail region; the mean is the mean calculated by S203;

[0049] Tail shape: Use a quadratic polynomial to fit the curve of the tail region, and then evaluate the tail shape based on the parameters of the quadratic polynomial. Assume that the kernel density estimation curve approximately follows the quadratic decay form in the tail:

[0050] f(x)∝ax 2 +bx+c

[0051] The parameter that needs attention is a, which is the coefficient of the quadratic term. By fitting the tail curve of the kernel density estimation curve, the parameter a can be estimated to describe the tail shape.

[0052] Median point: The median point is obtained by the cumulative density function of the kernel density estimation. The abscissa where the cumulative density function is equal to 0.5 is the median point; the cumulative density function is the kernel density estimation curve The integral function of

[0053] S205 , combining the first to tenth features of the number of fish in S203 and S204 to form a fish number feature vector X.

[0054] Furthermore, the process of step S3 is as follows: the fish population feature extracted from the laser array signal is used to train an elastic network regression model using the actual fish population as a label; wherein the laser array signal is a multi-channel laser array signal collected by the laser array; the model expression is as follows:

[0055] Assume there is a dataset consisting of features and labels where X i is the characteristic vector composed of ten fish population features in S203, q iis the target variable, i.e., the number of fish, and n is the number of samples in the dataset. The model expression of elastic net regression is as follows:

[0056]

[0057] in, is the target variable for prediction, X is i The loss function of elastic net regression consists of two parts, one is the mean square error (MSE), and the other is the penalty term of L1 norm and L2 norm:

[0058]

[0059] Among them, α is the regularization parameter that controls the strength of the penalty term; ρ is the weight parameter of the L1 norm, which is used to adjust the degree of feature selection; q and are the true value and predicted value of the target variable, respectively. By minimizing the loss function through gradient descent, we can obtain the optimal characteristic coefficient β and intercept term b, implement elastic network regression, and predict the number of fish as Q;

[0060] Furthermore, step S4 includes the following steps:

[0061] S401. Extract statistical features from the laser tube array signal, including mean and variance.

[0062] Mean: Calculation of the overall triggering times of the tube. The formula is:

[0063]

[0064] Wherein T is the time window length set in S102.

[0065] Variance: The variance of each pair of tubes is calculated independently, and finally the variance of each pair of tubes is aggregated and averaged to obtain the global variance of the entire data. The calculation formula is:

[0066]

[0067] S402: extracting time series features from the laser tube array signal, including differential and autocorrelation decay rates.

[0068] Difference: Calculate the difference between the adjacent time points and find the absolute value, then sum the difference data:

[0069]

[0070] Autocorrelation decay rate: First calculate the autocorrelation function of the tube data, and then use the exponential decay model to fit its decay rate.

[0071] The expression for autocorrelation is:

[0072]

[0073] The expression of the exponential decay model is:

[0074] f(x)∝e -λx

[0075] Where λ is the decay rate parameter, which represents the decay rate of the curve. By fitting the curve of the above autocorrelation expression through the above exponential decay model, the parameter λ obtained is the autocorrelation decay rate;

[0076] S403: extract information entropy features from the laser tube array signal, including sample entropy, differential entropy, and conditional entropy.

[0077] Sample entropy: First, calculate the sum of the spatial dimensions x and y at each time point t to obtain S t :

[0078]

[0079] Each S t Considered as a sample, the probability distribution of all samples is calculated as follows:

[0080]

[0081] Finally, the sample entropy H is calculated using the following formula: s :

[0082]

[0083] Differential entropy: The calculation first takes the difference between each adjacent time point, as shown below:

[0084]

[0085] Each D obtained t As a sample, the probability distribution p(Dt) and differential entropy H can be obtained d .

[0086] Conditional entropy: Assume that the data frame of the current pipe is A, and B represents the data frame of the next pipe. p(A, B) represents the probability that the current pipe data is A and the next pipe data is B. In this case, the conditional entropy H(B|A) can be expressed as follows:

[0087]

[0088] Furthermore, the process of step S5 is to train the LightGBM gradient boosting decision tree model based on the fish movement features extracted from the laser tube array signal and the actual fish movement as a label. The implementation process is as follows:

[0089] S501, the model will initialize a decision tree with only one leaf node as the initial model;

[0090] S502: Calculate the gradient of the loss function for each sample using the training data. For regression problems, the gradient is the difference between the predicted value and the actual value.

[0091] S503. Based on the calculated gradient, a new decision tree is constructed. The tree is constructed in a depth-first manner. In the process of building the decision tree, LightGBM adopts a leaf node-based splitting strategy, that is, it selects an optimal splitting point from the current leaf node to generate child nodes, and also uses a histogram algorithm to approximately find the optimal splitting point.

[0092] S504: When the maximum depth of the tree is reached or the splitting can no longer reduce the loss function, the splitting is stopped and the leaf node is set as the terminal node.

[0093] S505: Update the predicted value of each leaf node to gradually approach the true residual. The learning rate is used to control the update amplitude to prevent overfitting.

[0094] S506: Repeat the above steps until a stopping condition is met, such as reaching a predetermined number of trees or the loss function converges to a threshold.

[0095] S507, integrate multiple decision trees into the final model. When predicting, the prediction results of each tree are weighted and summed to obtain the final predicted value of the fish movement amount A gr .

[0096] Furthermore, step S6 includes the following steps:

[0097] S601, the horizontal and vertical coordinates of the laser beam signal collected within a period of time with a value of 1 (i.e., a school of fish passes through the laser beam path area) are regarded as an observation data point (x i ,y i ), represents the coordinate value of the i-th data point, and the number of data points is recorded as N. A two-dimensional kernel density estimation is used to evaluate the overall density distribution of these data points. The two-dimensional Gaussian kernel function has the following form:

[0098]

[0099] σ x and σ yare the standard deviations along the x-axis and y-axis respectively. For a point (x, y) in two-dimensional space, its density estimate can be expressed as the weighted sum of all kernel functions at that point:

[0100]

[0101] S602. Based on the calculation results of the two-dimensional kernel density estimation in S601, the following aggregation features are extracted:

[0102] Density peak: The density value of the highest point in the density map:

[0103] D peak =max(D(x,y))

[0104] Density median: The middle value obtained by arranging all density values ​​in the density map by size:

[0105] D median =Median(D(x,y))

[0106] Density energy: the sum of the squares of all density values ​​in the density map:

[0107]

[0108] Density range: The difference between the maximum and minimum values ​​in the density plot:

[0109] D range =max(D(x,y))-min(D(x,y))

[0110] Density interquartile range: The difference between the upper quartile and the lower quartile after the density values ​​in the density map are arranged by size:

[0111] D interquartile =Q3-Q1

[0112] Among them, Q3 and Q1 are the upper quartile and the lower quartile respectively;

[0113] Density variance: The variance of all density values ​​in the density map:

[0114]

[0115] Density kurtosis: The kurtosis of the density plot is calculated using the fourth-order central moment:

[0116]

[0117] Density gradient: The gradient of the density map in space, that is, the rate of change of density:

[0118]

[0119] Main density area: the area of ​​the region in the density map that is greater than a certain density threshold; the density threshold can be set to one-fifth of the density peak;

[0120] Length of isopycnal lines: the mean length of each isopycnal line;

[0121] Deviation measurement of main isopycnal line: The main isopycnal line is the line with the highest height among all isopycnal lines, and the area it contains is the main density area.

[0122] The mean distance from each point on the main isopycnic curve to the center:

[0123]

[0124] Among them, (x i ',y i ') represents the point on the main density curve, n is the number of points on the main density curve, represents the central coordinate of the principal density curve;

[0125] Moran's index: Moran's index is an indicator used in spatial statistics to measure spatial autocorrelation, which can be calculated using the following formula:

[0126]

[0127] The Moran index can be calculated using the above formula, by summing the original acquired signal L(t,x,y) in the time dimension t to obtain L'(x,y). Where L'(x,y) i and L'(x,y) j is the observation value at location i and j, N is the total number of observations, is the mean of all observations. ij Is an element in the spatial weight matrix, representing the spatial relationship between locations i and j, and is taken as the distance between i and j. total is the sum of all elements of the weight matrix.

[0128] Furthermore, the process of step S7 is to train the LightGBM gradient boosting decision tree model with the fish aggregation features extracted from the laser tube array signal and the actual fish aggregation as a label to predict the fish aggregation G.

[0129] Furthermore, step S8 includes the following steps:

[0130] S801. Based on the kernel density estimation density map of the laser tube array data obtained in S601, the coordinates of the peak point are calculated as the estimated value of the aggregation center:

[0131]

[0132] That is D in S602 peak corresponding position;

[0133] S802: Compare and verify the estimated value calculated by the laser tube array with the true value. Through linear transformation, the scales of the two are kept consistent, and the calculated aggregation center is corrected. Finally, the aggregation center of the fish school can be recorded as C. The true value is an accurate value obtained through reliable means.

[0134] Furthermore, step S9 includes the following steps:

[0135] S901, the fish school movement amount A predicted in S5 gr The average individual movement amount A can be calculated by the number of fish Q predicted in S3 in :

[0136] A in =A gr / Q

[0137] S902, combining the fish aggregation degree G predicted in S7 and the average individual movement amount A in Different thresholds are set for the fish school aggregation degree G, and they are divided into three qualitative levels: high level, medium level and low level; to indicate the differences in their activity level or aggregation density, and to conduct qualitative analysis of fish school behavior.

[0138] The present invention has the following advantages and effects compared to the prior art:

[0139] (1) The present invention is based on the behavior monitoring of farmed fish by laser-paired tube arrays. With its excellent underwater penetration ability, low operation and maintenance cost, high-quality recognition and excellent anti-interference performance, it can effectively overcome the shortcomings of existing machine vision-based video image analysis technology in actual aquaculture environments caused by turbid water quality, insufficient light and other reasons.

[0140] (2) The proposed method for extracting core fish behavior indicators based on laser arrays innovatively extracts effective features from data collected by laser arrays, paving the way for regression prediction of various indicators. Regarding fish population characteristics, linear discriminant analysis is used to reduce data dimensionality, and kernel density estimation is used to extract fish population characteristics. Regarding motion indicators, laser array data is analyzed from three perspectives: statistical, temporal, and information entropy. Regarding aggregation and aggregation center indicators, density maps and isodensity lines generated using two-dimensional kernel density estimation are used to explore key spatial distribution characteristics.

[0141] (3) The present invention innovatively realizes the regression prediction of various fish behavior indicators such as fish counting, movement volume, aggregation and aggregation center by extracting features from laser tube array data. In fish counting, the elastic network regression model is used, combined with the penalty terms of L1 norm and L2 norm, and the complexity and feature selection ability of the model are controlled by adjusting the weight parameters of these two penalty terms. In the prediction of fish movement volume and aggregation index, the LightGBM gradient boosting decision tree regression model is used, which adopts the histogram-based decision tree learning method. Compared with the traditional gradient boosting tree algorithm, LightGBM has improved performance and efficiency, and has the advantages of automatically processing missing values, supporting categorical features, and high parallelism. BRIEF DESCRIPTION OF THE DRAWINGS

[0142] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0143] Figure 1 This is a general working flow chart of a method for monitoring fish culture behavior based on a laser tube array disclosed in Example 1 of the present invention;

[0144] Figure 2 Schematic diagram of the arrangement of the laser tube array and the camera in Example 1 of the present invention;

[0145] Figure 3 1 is a result diagram of the linear discriminant analysis in Example 1 of the present invention;

[0146] Figure 4 is the density curve of the kernel density estimation in Example 1 of the present invention;

[0147] Figure 5 This is a scatter plot of fish activity prediction in Example 1 of the present invention;

[0148] Figure 6 is the density map of the two-dimensional kernel density estimation in Example 1 of the present invention;

[0149] Figure 7 This is a scatter plot of fish aggregation prediction in Example 1 of the present invention;

[0150] Figure 8 is the original fish gathering center prediction scatter plot in Example 1 of the present invention;

[0151] Figure 9 This is the calibrated fish school gathering center prediction scatter plot in Example 1 of the present invention. DETAILED DESCRIPTION

[0152] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0153] Example 1

[0154] This embodiment discloses a method for monitoring the behavior of farmed fish based on a laser tube array. Figure 1 The specific steps are as follows:

[0155] S1. Use a laser array to collect signals of fish activity. To label and verify the laser array data, a camera is used to collect fish activity videos. The specific implementation steps are as follows:

[0156] S101. Arrange the transmitting and receiving arrays of the laser pair in a 4×4 matrix on both sides of the aquaculture tank. Continuously collect signals of fish activity at a sampling rate of 10 Hz. Samples are taken every 6000 frames (denoted as T) of the collected signal. The collected signal can be represented as a 6000×4×4 three-dimensional binary array L(t,x,y), where dimension t is 6000 long, corresponding to the time axis of the acquisition; dimensions x and y are both 4 long, corresponding to the row and column coordinates of the array on the plane, respectively. When L(t,x,y) equals 0, it indicates that the laser pair at that location is in the on-state, meaning that the straight optical path between the pair is unobstructed by any object. When L(t,x,y) equals 1, it means that the laser pair is interrupted, which usually means that a school of fish has blocked the laser beam emitted by the pair, causing a break in the optical path. Assume that n samples are collected and the data set is denoted as [L1,L2,...,L n ], where L n Represents the laser tube array data within a time window of length T;

[0157] S102, placing the camera on the other side of the aquaculture tank, and synchronously collecting data with the laser tube array, the arrangement of the laser tube array and the camera is as follows Figure 2 As shown. The collected video signal is segmented with the same time window size T (i.e., the length is 10 minutes), and recorded as [V1, V2, ..., V n ], where V n is a video signal of length T. V n will be the corresponding L n Label and verify data.

[0158] S2. For the laser pair array signals collected in S1, each pair of tubes is considered as a feature. The dimensionality of the 16 laser pair tubes is reduced to one dimension using linear discriminant analysis. Kernel density estimation is then used to extract features related to the number of fish. The specific implementation process is as follows:

[0159] S201. The implementation process of linear discriminant analysis first involves calculating the intra-category scatter matrix and the inter-category scatter matrix. Then, by performing eigenvalue decomposition on these two scatter matrices, their eigenvectors are obtained. Next, the eigenvectors are selected to form a projection matrix so that the data points of different categories can be better separated in the projection space after projection. Finally, the original data is linearly transformed through the selected projection matrix and the data is projected into a low-dimensional space to achieve data dimensionality reduction. The reduced-dimensional data set is represented as [L'1, L'2, ..., L' n ], where L' n It is a one-dimensional array of length T after each sample is reduced in dimension. The result after linear discriminant analysis is as follows Figure 3 As shown;

[0160] S202, the data L' after dimensionality reduction n The Gaussian kernel function is selected for kernel density estimation. A small area (kernel) around each observation is used as a weight function. The density function is estimated by summing and normalizing all kernel functions. The estimated density map is as follows: Figure 4 As shown;

[0161] S203. Extract ten features from the estimated density map, including the number of peaks, main peak position, main peak height, tail peak spacing, tail peak height, curve support height, tail thickness, tail shape, median point, and mean, and record them as [X1, X2, ..., X n ], where X n is a feature vector of length 10, corresponding to the ten features extracted from each sample;

[0162] S3, for the fish population related features obtained in S2, the actual number of fish counted manually is used as the label: {(X1,y1),(X2,y2),...,(X n ,y n )}, where (X n ,y n ) represents a sample consisting of feature vectors extracted from the laser array data and the actual fish count labels. This dataset was used to train an elastic net regression model to predict fish counts. The results showed a mean squared error of 5.14 and a coefficient of determination of 0.961 for fish counting. Discrete predictions were generated by retaining the integer portion of the regression results. The predictions were compared with the actual fish count labels to generate a confusion matrix. Precision, recall, and F1 scores were then calculated for different fish counts:

[0163] Table 1 Precision, recall and F1 score of fish counting

[0164] Number of fish Accuracy Recall F1 score 1 100% 100% 100% 2 100% 100% 100% 3 100% 99.10% 99.50% 4 96.60% 97.40% 97% 5 95.50% 90.70% 93% 6 88.10% 88.10% 88.10% 7 75.80% 79.70% 77.70% 8 69.30% 74.50% 71.80% 9 71.20% 75.40% 73.20% 10 91.40% 72% 80.60%

[0165] The results show that for the prediction of a relatively small number of fish, the model shows a high degree of accuracy, almost reaching the state of error-free prediction. As the size of the fish school increases, the performance of the model shows a gradual decline, but the overall error is small and within the acceptable error range. The number of fish schools predicted by elastic network regression is denoted as

[0166] S4, the laser tube array signal [L1, L2, ..., L n ], from the statistical features, we extracted the mean and variance, from the time series features, we extracted the difference and autocorrelation decay rate, and from the information entropy features, we extracted the sample entropy, differential entropy, and conditional entropy. The extracted features are denoted as [X'1,X'2,...,X' n ], where X' n is a feature vector of length 7, representing the motion-related features calculated from each sample in the laser pair tube data;

[0167] S5. Based on the fish movement related features obtained by the laser tube array in S4, the LightGBM gradient boosting decision tree is trained to predict the fish movement. The specific implementation process and results are as follows:

[0168] S501, synchronously collect the video [V1, V2, ..., V n ], after pre-processing such as video denoising and grayscale, the Gaussian mixture model is used to extract the foreground. n The sum of the foreground area of ​​each frame can be used to obtain the standard fish movement index [A1, A2, ..., A n In order to unify the data range, the movement index [A1, A2, ..., A n ] Use min-max normalization to scale to the range of [1,100];

[0169] S502, the fish school motion characteristics [X'1, X'2, ..., X' n ], with the standard motion amount [A1, A2, ..., A n ] as annotations, we can get the data set: {(X'1,A1),(X'2,A2),...,(X' n ,A n )}, where X'' nis the motion feature extracted from the laser tube array data, Z' n The motion index is obtained by video processing. The LightGBM gradient boosting decision tree regression model is trained on this dataset, and the mean square error and determination coefficient of the prediction are calculated. The performance is compared with other regression models:

[0170] Table 2. Comparison of regression model performance

[0171] Regression Model Mean square error Coefficient of determination LightGBM 5.77 0.965 Gradient Boosted Decision Tree (GBDT) 9.66 0.989 Decision Tree 42.6 0.955 Random Forest Regression 51.3 0.957 k-nearest neighbor regression 69.8 0.927 Elastic Net Regression 74.8 0.922 Support Vector Machine 88.3 0.908

[0172] The results show that the mean square error of the LightGBM model is 5.77 and the determination coefficient is 0.965, showing a significant performance advantage. The prediction scatter plot is as follows: Figure 5 As shown. The predicted fish movement amount is

[0173] S6. For the laser array signals collected in S1, two-dimensional kernel density estimation is used to depict the fish-dense area. The density map and isodensity lines are combined to extract the relevant features of the aggregation degree. The specific implementation process is as follows:

[0174] S601, with each data point as the center, place a two-dimensional Gaussian kernel function around it, and then estimate the density by superimposing the kernel functions. The estimated density map is as follows Figure 6 As shown:

[0175] S602. Extract the twelve features of the estimated density map and isopycnals: density peak, density median, density energy, density range, density interquartile range, density variance, density kurtosis, density gradient, main density region area, isopycnal length, main isopycnal deviation measurement and Moran index, denoted as [X1, X2, ..., X]. n ], where X” n is a feature vector of length 12, representing the aggregation-related features calculated from each sample in the laser-paired tube data;

[0176] S7, based on the fish aggregation related features obtained by the laser tube array in S6, train the LightGBM gradient boosting decision tree to predict the amount of fish movement. The specific implementation process and results are as follows:

[0177] S701, synchronously collect the video [V1, V2, ..., V n ], after pre-processing such as video denoising and grayscale conversion, background subtraction and connected block extraction are used to detect the centroid of the fish school target, and then the centroid of the individual fish school is segmented using Delaunay triangulation. n The sum of the side lengths of all triangles in each frame segmentation result can be used to obtain the standard fish aggregation index [G1, G2, ..., Gn In order to unify the data range, the aggregation index [G1, G2, ..., G n ] Use min-max normalization to scale to the range of [1,100];

[0178] S702, the fish aggregation features obtained from the laser tube array in S6 are annotated with the standard aggregation degree of video processing, and the data set is: {(X”1,G1),(X”2,G2),...,(X” n ,G n )}, where X” n is the concentration feature extracted from the laser tube array data, G n is the aggregation index obtained by video processing. The LightGBM gradient boosting decision tree regression model was trained on this dataset, and the calculated mean square error was 5.14 and the determination coefficient was 0.961. The prediction scatter plot is shown below. Figure 7 As shown in the figure, each evaluation index shows that the prediction effect is good;

[0179] S8. Calculate the clustering center index using two-dimensional kernel density estimation for the laser tube array signal collected in S1. Verify the calculated clustering center index and correct it through linear transformation. The implementation process and results are as follows:

[0180] S801. Use two-dimensional kernel density estimation to obtain a spatial distribution density map for the laser tube data. Calculate the horizontal and vertical coordinates of the maximum peak point in the density map as the center of aggregation, which is recorded as in The horizontal and vertical coordinates of the cluster center of each sample are defined in the range [0,100];

[0181] S802, synchronously collect the video [V1, V2, ..., V n ], after pre-processing such as video denoising and grayscale conversion, background subtraction and connected block extraction are used to detect the centroid of the fish school target, and then the centroid of the individual fish school is segmented using Delaunay triangulation. n The average centroid of all triangles in each frame can be obtained to obtain the standard fish gathering center coordinates [C1, C2, ..., C n ], where C n is the horizontal and vertical coordinate value of the gathering center, and the value range is defined as [0,100];

[0182] S803, calculate the center of the laser tube data The actual value of the cluster center [C1,C2,...,C n] for comparative verification, the mean square error is 97.5, the determination coefficient is 0.802, and the prediction scatter plot is as follows Figure 8 As shown. The cluster center of the prediction After linear transformation and correction of its slope and intercept, the mean square error dropped from 97.5 to 17.1, a decrease of 82.5%. At the same time, the coefficient of determination increased from 0.802 to 0.966, an increase of 20.4%. The corrected prediction scatter plot is shown in the figure below. Figure 9 As shown. The corrected clustering center is recorded as

[0183] S9: The amount of fish movement predicted in S5 The number of fish schools that can be predicted from S3 To calculate the average individual exercise volume

[0184]

[0185] Combined with the fish aggregation degree predicted in S7 and the fish gathering center calculated in S8 The average individual exercise volume Aggregation and gathering centers Different thresholds are set to divide them into three qualitative levels. and fish aggregation It is divided into high level, medium level and low level to indicate the difference in activity or gathering density. It is divided into three layers: upper layer, middle layer and lower layer, which represent the vertical distribution position of fish in the aquaculture tank. Fish aggregation and gathering centers According to the classification of fish behavior indicators in the table below, it can be determined whether there are corresponding typical behaviors.

[0186] Table 3 Classification of typical fish school behaviors

[0187] Average individual exercise volume Fish aggregation Fish gathering center panic behavior high level Low level Middle level Hypoxic behavior Low level high level upper layer maladaptive behavior Low level high level Lower level Food snatching behavior high level high level upper layer

[0188] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be considered as equivalent replacement methods and are included in the scope of protection of the present invention.

Claims

1. A method for monitoring fish behavior based on a laser tube array, characterized in that: The following steps are involved: S1. Place the transmitting array and receiving array of the laser pair tube on both sides of the aquaculture tank to continuously collect signals of fish activities; S2. Using linear discriminant analysis to reduce the dimensionality of the multi-channel laser beam array signals collected in S1 into one signal, and using kernel density estimation to extract fish population-related features from the reduced-dimensionality signals. Step S2 includes the following steps: S201. Collect data from the laser pair array, use the actual number of fish as the category label, and project the x×y laser pair signals L(t,x,y) into a single laser pair signal L'(t) through linear discriminant analysis to achieve signal dimensionality reduction. The dimension t corresponds to the time axis within a time window of length T frames. S202, perform statistical analysis on the signal L'(t) after the linear discriminant analysis in S201 using kernel density estimation to obtain a kernel density estimation curve S203, calculating the mean of the signal L'(t) as the first feature of the number of fish; wherein calculating the mean of the signal L'(t) is to sum the L'(t) and divide it by the length T of L'(t); S204, the kernel density estimation curve calculated in S202 Extract the second to tenth features of the number of fish from it; S205, combining the first to tenth features of the number of fish in S203 and S204 to form a fish number feature vector X; S3, using the fish population-related features obtained in S2, train an elastic network regression model to predict the fish population; S4, extracting fish movement-related features from three dimensions: statistical features, time series features, and information entropy features for the multi-channel laser tube array signals collected in S1; S5, based on the fish movement related features obtained by the laser tube array in S4, train the LightGBM gradient boosting decision tree to predict the fish movement; S6. Using the multi-channel laser beam array signals collected in S1, two-dimensional kernel density estimation is used to depict the fish-dense area, and the density map and isopycnal lines are combined to extract the relevant features of the fish aggregation degree. S7, based on the fish aggregation related features obtained by S6 based on the laser tube array, train the LightGBM gradient boosting decision tree to predict the fish aggregation degree; S8, using two-dimensional kernel density estimation to calculate the fish school aggregation center index for the multi-channel laser pairing signals collected by the laser pairing array in S1; and verifying the calculated fish school aggregation center index and correcting it through linear transformation; S9. Construct an analysis model of fish behavior based on the fish population predicted in S3, the fish movement volume predicted in S5, the fish aggregation degree predicted in S7, and the corrected fish aggregation center index in S8.

2. The method for monitoring fish behavior based on a laser tube array according to claim 1, characterized in that: The process of step S1 is as follows: S101. The laser pair tubes consist of a laser emitting tube and a laser receiving tube, placed opposite each other on either side of the aquaculture tank. The laser emitting tube emits a highly concentrated laser beam, while the laser receiving tube detects the laser light emitted by the laser emitting tube and converts the optical signal into an electrical signal. Multiple laser pair tubes are arranged in a matrix with a length of x and a width of y, forming an x×y laser pair tube array. The spacing between adjacent laser pair tubes in the array is just larger than the size of the largest individual in the school of fish, so that a single fish can only block the light path of one laser pair tube at a time. S102. The laser tubes continuously collect on-off signals. When a school of fish passes by a laser tube, the laser light path is blocked and the signal value is 1, indicating that the laser tube is triggered. When no fish passes by, the signal value is 0. The collected signal can be expressed as a three-dimensional binary array L(t,x,y) of t×x×y, where the dimension t corresponds to the time axis within a time window of length T frames, and x and y correspond to the row coordinate and column coordinate of the array on the plane, respectively.

3. The method for monitoring fish behavior based on a laser-paired tube array according to claim 2, characterized in that: In step S204, the second to tenth features are respectively: Peak number: Use the differential operation to calculate the first-order difference of the signal Δf[n] = f[n] - f[n-1]; then traverse the differential signal Δf[n] and find the point n that meets the conditions Δf[n] > 0 and Δf[n+1] < 0. These points are the peak points; finally, count the number of peak points found, which is the peak number N p ; Main peak position: the position of the largest peak point in the kernel density estimation curve; Main peak height: the height of the largest peak in the kernel density estimation curve, that is, the maximum value of the peak point; Peak spacing: the distance between the leftmost peak and the rightmost peak of the kernel density estimation curve, where the relative coordinates between the peaks are used to measure the positions of the peaks; Tail peak height: the mean of the peak height of the left tail peak and the peak height of the right tail peak; Curve support width: the horizontal axis span from the leftmost to the rightmost side of the kernel density estimation curve; Tail width: the width of the tail region in the kernel density estimation curve, where the tail is the tail on both sides of the curve, that is, the region with an amplitude less than two standard deviations of the mean, is called the tail region; wherein the mean is the mean calculated in S203; Tail shape: A quadratic polynomial is used to fit the curve of the tail region, and then the tail shape is evaluated based on the parameters of the quadratic polynomial; the kernel density estimation curve approximately follows the quadratic decay form in the tail: f(x)∝ax 2 +bx+c The parameter a is the coefficient of the quadratic term. By fitting the tail curve of the kernel density estimation curve, the parameter a can be estimated to describe the tail shape. Median point: The median point is obtained by the cumulative density function of the kernel density estimation. The abscissa where the cumulative density function is equal to 0.5 is the median point; the cumulative density function is the kernel density estimation curve The integral function of .

4. The method for monitoring fish behavior based on a laser-paired tube array according to claim 3, characterized in that: The step S3 includes the following steps: for the fish population feature vector X extracted in S2, using the actual fish population as a label, training an elastic network regression model, and predicting the fish population as Q.

5. The method for monitoring fish behavior based on a laser-paired tube array according to claim 4, characterized in that: The process of step S5 is as follows: for the fish school movement amount related features extracted from the laser tube array signal, the actual fish school movement amount is used as a label to train the LightGBM gradient boosting decision tree model to achieve regression prediction of the fish school movement amount, and the predicted fish school movement amount is A gr ; Among them, the laser tube array signal is the multi-channel tube signal collected by the laser tube array.

6. The method for monitoring fish behavior based on a laser-paired tube array according to claim 5, characterized in that: The process of step S7 is as follows: for the fish aggregation-related features extracted from the laser tube array signal, the actual fish aggregation is used as a label to train the LightGBM gradient boosting decision tree model to predict the fish aggregation G.

7. The method for monitoring fish behavior based on a laser-paired tube array according to claim 6, characterized in that: The step S9 comprises the following steps: S901, the fish school movement amount A predicted in S5 gr The average individual movement amount A can be calculated by the number of fish Q predicted in S3 in : A in =A gr / Q S902, combining the fish aggregation degree G predicted in S7 and the average individual movement amount A in Different thresholds are set for the fish school aggregation degree G, and they are divided into three qualitative levels: high level, medium level and low level; to indicate the differences in their activity level or aggregation density, and to conduct qualitative analysis of fish school behavior.

Citation Information

Patent Citations

  • Fish type identification method and device and storage medium

    CN113468247A

  • Fish school gathering behavior and fish school hunger behavior real-time analysis method based on density distribution

    CN117409368A