A method for counting fish schools in cages based on bio-environment information fusion and machine learning

By constructing a cage fish population counting model based on the bio-ring information fusion and machine learning method, the problem of inaccurate fish population counting in the existing technology is solved, and efficient and accurate fish population counting is achieved in complex environments.

CN118708897BActive Publication Date: 2025-04-15QINGDAO AGRI UNIV +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410716845.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-04
Publication Date
2025-04-15
Estimated Expiration
2044-06-04

AI Technical Summary

Technical Problem

The prior art has shortcomings in the precise estimation of the cage fish population. The traditional manual counting method is time-consuming and labor-intensive and causes damage to the fish body, while optical monitoring and acoustic monitoring are difficult to achieve accurate counting in complex environments.

Method used

The cage fish population counting method based on bio-ring information fusion and machine learning is adopted. By acquiring and preprocessing the bio-ring data set, the correspondence between the bio-ring comprehensive factor and the number of fish is constructed, and the cage fish population counting model is optimized by using the particle swarm algorithm to realize the fish population counting.

Benefits of technology

It realizes accurate counting of the number of fish in the cage without being restricted by the environmental conditions of the water, improving counting efficiency, reducing damage to fish bodies, and providing accurate fish population counting at different growth stages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708897B_ABST
    Figure CN118708897B_ABST
Patent Text Reader

Abstract

The present invention discloses a cage fish counting method based on bio-environment information fusion and machine learning, including: obtaining the original bio-environment data set and preprocessing; obtaining the bio-environment comprehensive factor based on the processed data set; constructing the corresponding relationship between the bio-environment comprehensive factor and the number of fish; constructing a cage fish counting model based on the corresponding relationship; and counting the fish in the cage to be counted according to the cage fish counting model. The present invention establishes a nonlinear mapping relationship between food intake and the number of fish, and takes advantage of the fact that neural networks can achieve nonlinear mapping relationships of any complexity, and incorporates factors such as biology and environment that affect food intake into model construction, and finally derives the number of fish through food intake; at the same time, models are established for fish at different growth stages during cage culture, so that accurate counting of fish throughout the cage culture cycle can be achieved. The present invention accurately evaluates the number of cage fish through biological, environmental and other high-dimensional and complex data to reduce deviations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of fish counting, and in particular relates to a cage fish counting method based on biological and environmental information fusion and machine learning. Background Art

[0002] In recent years, with the rapid development of fish farming, cage farming has become one of the important forms of marine aquaculture. However, the overall intelligence level of cage farming is low, and the relevant technology is not yet mature and perfect. One of the manifestations is that the number of fish in the farming cages cannot be accurately estimated. Given that accurate estimation of the number of caged fish is crucial for managing fishery resources, formulating aquaculture strategies, and protecting the marine ecological environment, it is of great significance to carry out research on accurate counting of caged fish, which is also an inevitable trend for refined aquaculture management.

[0003] How to achieve accurate counting of fish schools is the basis for achieving accurate management of aquaculture and maximizing benefits. Previously, in cage aquaculture, operators used traditional manual counting methods such as sampling and marking-replenishing methods. This method not only consumes a lot of manpower and is too labor-intensive, but also causes certain damage to the fish. In recent years, with the development of artificial intelligence technology, cage fish counting has gradually shifted from manual counting to precise counting systems, which can not only improve the efficiency of fish counting, save time and financial costs, but also ensure the normal activities of individual fish and avoid stress damage to the fish. However, to date, most of the research on fish counting has focused on optical monitoring, acoustic monitoring, combination of sound and light, and biological remote sensing. For example, Li et al. used underwater cameras and Faster R-CNN networks to count fish, and Chen Changping et al. used hydroacoustic equipment and supporting software to count fish. However, the disadvantages of this method are that when optical monitoring is applied to turbid waters, the light wave detection range is small and cannot meet the requirements of full cage detection. When the fish body itself is not clearly distinguished from the background or there is occlusion between the fish bodies, it is difficult to count the fish school and cannot be extended to complex scenes in the wild. The equipment used for acoustic monitoring and biological remote sensing is expensive and easily interfered by other moving objects in the water (such as seaweed, non-fish organisms, etc.), and cannot be well applied in cages in natural environments. Therefore, the present invention provides a cage fish school counting method based on biological environment multivariate information fusion and machine learning that is not limited by water environment conditions. Summary of the invention

[0004] In order to solve the above technical problems, the present invention proposes a method for counting fish schools in cages based on ecological and environmental information fusion and machine learning to solve the problems existing in the above-mentioned prior art.

[0005] To achieve the above object, the present invention provides a method for counting fish schools in cages based on ecological and environmental information fusion and machine learning, comprising:

[0006] Obtain the original bio-environmental data set and perform preprocessing;

[0007] Obtain the comprehensive bio-environment factor based on the pre-processed original bio-environment information;

[0008] Constructing a corresponding relationship between the ecological and environmental comprehensive factor and the number of fish; constructing a cage fish counting model based on the corresponding relationship, and optimizing the cage fish counting model using a particle swarm algorithm;

[0009] The fish in the cages to be counted are counted according to the optimized cage fish counting model.

[0010] Optionally, the original ecological data set includes biological data and environmental data; the biological data includes but is not limited to fish food intake, body weight, and number of individuals; the environmental data includes but is not limited to temperature, dissolved oxygen, salinity, pH, flow rate, and chlorophyll.

[0011] Optionally, the process of preprocessing the original bio-environmental data set includes: performing missing value analysis on the bio-environmental data set, interpolating the missing values ​​through a linear regression method, and normalizing the interpolated bio-environmental data set to obtain a normalized data set.

[0012] Optionally, the process of obtaining the bio-environmental comprehensive factor includes: performing a correlation test on the normalized data set, performing a principal component analysis on the normalized data set when the correlation requirements are met, selecting the bio-environmental comprehensive factor that meets the cumulative contribution rate requirements according to the cumulative contribution rate rule, and analyzing and assigning values ​​to the bio-environmental comprehensive factor.

[0013] Optionally, the process of analyzing and assigning values ​​to the ecological and environmental comprehensive factors includes:

[0014] Construct the following equation:

[0015]

[0016] Y=PX

[0017] In the formula, X represents the bio-environmental data set; represents the average value of each dimension feature in the X data set; ∑ represents the covariance matrix; X T represents the transposed matrix of the biological data set; n represents the number of samples, F m represents the score of the bio-environment factor; γ i represents the eigenvalue of the bio-environmental comprehensive factor; P represents the eigenvector matrix of the bio-environmental comprehensive factor coefficient; δ k represents the coefficient eigenvector of the bio-environmental comprehensive factor; k represents the number of bio-environmental comprehensive factors; X represents the bio-environmental data set; Y represents the eigenvector matrix of the bio-environmental comprehensive factor;

[0018] By solving the equation, the results of the bio-environmental comprehensive factor assignment are obtained.

[0019] Optionally, the process of building a model for counting fish in cages includes:

[0020] The cage fish school counting model includes a juvenile cage fish school counting model and a grow-out cage fish school counting model;

[0021] Based on the ecological and environmental comprehensive factor data set, the corresponding relationships between the ecological and environmental comprehensive factors and the number of fish in the two growth stages of juvenile and grow-out were established respectively. According to the corresponding relationships, the cage fish counting models for the juvenile stage and the grow-out stage were constructed respectively.

[0022] Optionally, the cage fish counting model is as follows:

[0023] x=[x1,x2,…,x n ] T

[0024]

[0025]

[0026] Where x represents the transpose of the eigenvector matrix Y of the bio-environmental comprehensive factor; x1, x2, …, x n represents each eigenvector in the eigenvector matrix of the bio-environmental comprehensive factor; h i (x) represents the output of the i-th hidden unit; c i Represents the center vector, that is, the center c of the radial basis function i ; σ i Represents the parameter controlling the corresponding range of the control unit, that is, the width of the radial basis function σ i ; f(x) represents the output of the model, i.e., the fish counting result; w i represents the weight connecting the hidden layer and the output layer; b represents the radial basis function bias term.

[0027] Optionally, the model is optimized using the particle swarm optimization algorithm (PSO), including:

[0028] Step 1: Initialize the position and velocity of the particle swarm. For the parameter vector to be optimized, such as weight w i , the center c of the radial basis function i and width σ i , and the bias term b, can be initialized to random values, representing the initial values ​​of the parameters. The speed can be initialized to a small random value.

[0029] w i (0) = rand(wmin ,w max )

[0030] c i (0) = rand(c min ,c max )

[0031] σ i (0) = rand(σ min ,σ max )

[0032] b(0)=rand(b min ,b max )

[0033] Step 2: Evaluate the position (parameter vector) of each particle and calculate its corresponding fitness value.

[0034] fitness i =evaluate(w i ,c i ,σ i ,b)

[0035] Step 3: For each particle, update the individual optimal solution pbest according to the fitness value of its current position i At the same time, according to the fitness values ​​of all particles, the global optimal solution gbest is updated.

[0036] if fitness i <fitness(pbest i )then pbest i =(w i ,c i ,σ i ,b)

[0037] if fitness i <fitness(gbest)then gbest=(w i ,c i ,σ i ,b)

[0038] Step 4: According to the PSO speed update formula, the particle speed is updated using the individual and global optimal solutions. Then, according to the updated speed, the particle position is updated using the position update formula.

[0039] v i (t+1)=ωv i (t)+c1r1(pbest i -x i (t))+c2r2(gbest-xi (t))

[0040] x i (t+1)=x i (t)+v i (t+1)

[0041] Where ω is the inertia weight, c1 and c2 are acceleration coefficients, and r1 and r2 are random numbers between 0 and 1.

[0042] Repeat steps 2 to 4 until the stopping condition is met (the stopping condition for this model is that the maximum number of iterations is 15 times).

[0043] Step 5: When the PSO algorithm stops iterating, the parameter vector gbest corresponding to the global optimal solution is output as the optimization result, that is, the optimized weight w i , the center c of the radial basis function i and width σ i , and the bias term b.

[0044] In this process, evaluate(w i ,c i ,σ i ,b) function is used to evaluate the performance of the parameter vector, and fitness(pbest i ) and fitness(gbest) represent the fitness values ​​of the individual optimal solution and the global optimal solution respectively.

[0045] Optionally, the cage fish counting model is validated and evaluated by using mean absolute error, root mean square error, mean absolute percentage error and correlation coefficient.

[0046] Compared with the prior art, the present invention has the following advantages and technical effects:

[0047] The present invention provides a cage fish counting method based on bio-environment information fusion and machine learning, which obtains the original bio-environment data set and performs preprocessing; obtains the bio-environment comprehensive factor based on the preprocessed original bio-environment information; constructs the corresponding relationship between the bio-environment comprehensive factor and the number of fish; constructs a cage fish counting model based on the corresponding relationship; and counts the fish in the cage to be counted according to the cage fish counting model. The present invention uses the nonlinear mapping relationship established by the food intake and the number of fish, and uses the machine algorithm of the neural network to take into account the factors affecting food intake such as biological data and environmental data to build a model, and finally derives the number of fish through the food intake; at the same time, models are established for fish in different growth stages during cage culture. If only a cage fish counting model for a certain growth stage is established, it is impossible to achieve accurate counting of fish in the whole cycle of cage culture. The present invention utilizes the advantages of neural networks having strong generalization ability and being able to realize nonlinear mapping relationships of any complexity, and has the advantages of mature technology, simple equipment, and easy operation; the collection of required data is carried out without affecting the normal activities of fish, and will not have a negative impact on fish growth. In addition, the present invention uses high-dimensional and complex data such as farmed fish biology and aquatic environment to accurately assess the number of fish in a school, and will not cause deviations in fish counting due to interference from water turbidity in the aquaculture waters, fish size, and other moving objects. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0049] Figure 1 is a flow chart of a method according to an embodiment of the present invention;

[0050] Figure 2 It is a schematic diagram of the test results of the juvenile fish cage fish counting model according to an embodiment of the present invention;

[0051] Figure 3 It is a schematic diagram of the test results of the grow-out period cage fish counting model according to an embodiment of the present invention. DETAILED DESCRIPTION

[0052] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0053] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0054] Embodiment 1

[0055] In cage farming, the amount of food intake of fish is closely related to the type of farmed fish, growth and development stage, farming management method and environment, and the number of fish in the fish school directly determines the amount of food intake of the fish school to a certain extent. Neural networks have good ability to approximate arbitrary nonlinear mappings and process the inherent regularity of the system that is difficult to express analytically. They can establish a mapping relationship between the complex internal connections between the amount of fish intake, complex ecological factors and the number of fish, thereby achieving accurate counting of fish schools in cages.

[0056] like Figure 1-3 As shown, this embodiment provides a method for counting fish schools in cages based on biological and environmental information fusion and machine learning, including:

[0057] Taking the cage culture of large yellow croaker at a base in Ningbo, Zhejiang as an example, the specific implementation process of the technical scheme of the method of the present invention is explained. The implementation period of the scheme is from September 14, 2023 to December 13, 2023. The water depth of the cage setting area is 6-12m; the transparency is 0.2-2.0m, the water temperature is 7.5-30.8℃, and the minimum is 6.2℃; the salinity is 15-23.8; the average rising tide velocity is 40cm / s, the falling tide velocity is 65cm / s, the maximum flow velocity is 110cm / s, and the average tidal range is 3.42m. The specifications of the experimental cages are 9m*4.5m and 9m*9m, and 4700 30-60g juveniles and 2000 300-600g adult fish are placed in the cages respectively. The juveniles are fed twice a day, and the adult fish are fed once a day. The types of feed are based on the digestive physiology and nutritional needs of the large yellow croaker. High-quality raw materials, scientific formulas, and advanced processes are used to produce exclusive floating compound feeds with balanced nutrition, strong palatability, good stability in water, and low loss (what is fed is what is eaten, ensuring the reliability of the data); at the same time, the particle size is selected according to the caliber of the breeding object. Generally, the particle size of the compound feed particles is about 60% of the fish's mouth. During the feeding process, relevant biological data and environmental data are collected and recorded. In addition, large yellow croakers in cages are randomly sampled regularly to record their weight and other biological data. During the three-month breeding cycle, more than 200 pieces of biological and environmental information of large yellow croakers cultured in cages were collected.

[0058] The specific steps include the following:

[0059] Step 1: Obtain biological data such as fish food intake, weight, and number of individuals through field experiments, and use water quality sensors and other equipment to obtain environmental data such as temperature, dissolved oxygen, salinity, pH, flow rate, and chlorophyll. Field experiments refer to the operator feeding the farmed fish according to the amount of food intake required by the farmed fish in the current environment, and finally establishing a one-to-one correspondence between the feeding amount and the biological and environmental conditions of the feeding, forming a complete biological and environmental data set for this feeding.

[0060] The cage-cultured large yellow croakers were fed with food on a regular basis every day and the relevant data were recorded. The cage-cultured large yellow croakers were randomly sampled and their biological data such as weight were measured regularly. The FB_300_ZKYHYS buoy, LH-D6901 water quality sensor, LS300-A handheld portable flow meter, DL333205 multi-light source illuminance meter and other equipment and related software were used to collect environmental data such as temperature, conductivity, dissolved oxygen, pH, chlorophyll, tide, flow rate, light intensity, etc. of the aquaculture waters, and finally a complete ecological environment information data set was formed, as shown in Table 1.

[0061] Table 1

[0062]

[0063] The buoys and water quality sensors are arranged on the opposite side of the feeding area of ​​the aquaculture cages, with the basic principle of not affecting the normal feeding of fish. The relevant instruments and equipment are equipped with solar panels and batteries, and can still provide relevant data normally even in bad weather conditions, ensuring the continuity of ecological data.

[0064] This embodiment collects the biological data of large yellow croaker in the juvenile stage and the grow-out stage respectively.

[0065] Specifically, the juvenile yellow croaker is fed with food at 4:30-5:30 and 17:00-18:00 every day, and the grow-out yellow croaker is fed with food only at 17:00-18:00. Specifically, during the feeding process, each feeding is divided into two stages. The first stage is stopped when only a few fish eat, and the second stage is carried out after an interval of 15 to 20 minutes, when there is a little residual bait on the water surface, about 10 to 20g, and no more food is eaten within 3 to 5 minutes.

[0066] In this embodiment, the frequency of random sampling of cage cultured fish is once a week, 30 large yellow croakers are randomly sampled each time in the juvenile stage, and 15 large yellow croakers are randomly sampled each time in the growing stage. Specifically, the knocking operation method is adopted during sampling, which can minimize the damage to the fish and is highly efficient. The fish salvaged are then put into seawater dissolved with anesthetics in batches, and uninterrupted oxygenation is carried out during the period to ensure that the fish are in the anesthesia period from the beginning to the end of the weighing work, and cannot enter the deep anesthesia period. When the weighing work is completed, all fish should be put into the cage immediately.

[0067] Step 2: perform data interpolation and normalization on the collected ecological environment data.

[0068] SPSS software was used to analyze the missing values ​​of the bio-environmental data set, and the linear regression method was used to interpolate the missing values ​​after the analysis. The interpolated bio-environmental data set was normalized using Matlab software, and the normalized parameters of the input and output parameters were saved in inputps.mat and outputps.mat respectively. The specific calculation formula for data interpolation is as follows:

[0069] y=w1x1+w2x2+…+w p x p +b (1)

[0070]

[0071] In formula (1), y represents the missing data value; p represents the independent variable number of the data set where the missing value is located; x represents the known data value in the data set where the missing value is located; w represents the model coefficient; and b represents the bias of the model.

[0072] In formula (2) and (3), represents the optimal model parameter vector; represents the model parameter vector; y represents the missing data value; X represents the design matrix; X T Represents the transposed matrix of the design matrix X.

[0073]

[0074] In formula (4), X i Represents the normalized eigenvalue x i ;x i represents the original eigenvalue; x min Represents feature x i The minimum value in the sample; x max Represents feature x i The maximum value in the sample.

[0075] Step 3: Based on the normalized bio-environmental data set generated in step 2, perform comprehensive factor analysis and assign values.

[0076] Before factor scoring the normalized bio-environmental data, the Kaiser-Meyer-Olkin test is required for the bio-environmental data set. When the KMO value is greater than 0.6, the bio-environmental information can be factor-scored. First, PCA analysis is required for the bio-environmental data set, and the number of bio-environmental comprehensive factors is determined based on the cumulative contribution rate rule. Finally, the bio-environmental comprehensive factors are assigned one by one according to the PCA analysis results (including the bio-environmental information factor score, the bio-environmental comprehensive factor eigenvalue, etc.).

[0077] Specifically, SPSS software is used to perform correlation analysis between independent variables to determine whether there is data redundancy between the data. If there is data redundancy, the data needs to be processed for dimensionality reduction to reduce the correlation between the data and enhance the prediction ability of the model. In this embodiment, the correlation strength between the independent variables of the bio-environmental data is determined by the Kaiser-Meyer-Olkin standard, and the specific formula is as follows:

[0078]

[0079] In formula (5), KMO represents the level of correlation between the bio-environmental factors; represents the square of the correlation between variable i and variable j; It represents the square of the common correlation between variable i and variable j and other variables 1, 2…k.

[0080] By solving the equation, the KMO value between the independent variables of the bio-environmental data is 0.751, which is greater than 0.6, indicating that there is a strong correlation between the independent variables of the data and dimensionality reduction is required.

[0081] Then, based on the KMO value obtained by solving, PCA analysis was performed on the bio-environmental data set. First, based on the cumulative contribution rate rule, components with a cumulative contribution rate of more than 85% were selected as the bio-environmental comprehensive factor. The specific formula is as follows:

[0082]

[0083] In formula (6), Z represents the cumulative contribution rate; k represents the number of indicators, that is, the number of comprehensive factors of the ecological environment required; n represents the number of samples, that is, the total number of comprehensive factors of the ecological environment; γ i The eigenvalue corresponding to the comprehensive factor is represented by the factor analysis operation using SPSS software, and the system automatically generates the eigenvalue.

[0084] By solving the equation, the cumulative contribution rate of the first five components is 84.143%, and the cumulative contribution rate of the first six components is 90.082%. Therefore, the final number of bio-environmental comprehensive factors is determined to be 5.

[0085] Then the bio-environmental factors are analyzed and the bio-environmental comprehensive factors are assigned. The specific formula is as follows:

[0086]

[0087] In formula (7) and (8), X represents the bio-environmental data set; represents the average value of each dimension feature in the X data set; ∑ represents the covariance matrix; X T represents the transposed matrix of the biological data set; n represents the number of samples, and formula (7) represents the decentralization process.

[0088]

[0089] Y=PX (11)

[0090] In formula (9), (10), and (11), F m represents the score of the bio-environment factor; γ i represents the eigenvalue of the bio-environmental comprehensive factor; P represents the eigenvector matrix of the bio-environmental comprehensive factor coefficient; δ k represents the coefficient eigenvector of the bio-environmental comprehensive factor; k represents the number of bio-environmental comprehensive factors; X represents the bio-environmental data set; Y represents the eigenvector matrix of the bio-environmental comprehensive factor.

[0091] By solving equation (11), the final value of the bio-environmental comprehensive factor is:

[0092] Eco-environmental comprehensive factor 1 = water temperature*(-0.339)+body weight*(0.351)+age*(0.351)+density*(-0.123)+weather*(0.160)+wave height*(-0.097)+tidal growth*(0.058)+tidal*(-0.224)+conductivity*(0.283)+pH*(0.346)+dissolved oxygen*(0.285)+salinity*(0.115)+flow velocity*(-0.006)+light*(-0.067)+chlorophyll*(0.230)+food intake*(-0.255)+body length*(0.344);

[0093] Eco-environmental comprehensive factor 2 = water temperature*(0.163)+body weight*(-0.010)+age*(-0.023)+density*(0.209)+weather*(0.287)+wave height*(0.409)+tidal growth*(0.426)+tide*(0.258)+conductivity*(-0.307)+pH*(0.115)+dissolved oxygen*(0.275)+salinity*(-0.030)+flow velocity*(0.302)+light*(0.263)+chlorophyll*(0.276)+food intake*(-0.062)+body length*(0.090);

[0094] Eco-environmental comprehensive factor 3 = water temperature*(0.020)+body weight*(0.007)+age*(0.066)+density*(0.323)+weather*(0.258)+wave height*(0.217)+tidal growth*(-0.436)+tide*(0.171)+conductivity*(-0.092)+pH*(0.013)+dissolved oxygen*(0.025)+salinity*(0.451)+flow velocity*(-0.563)+light*(0.079)+chlorophyll*(0.129)+food intake*(0.056)+body length*(0.039);

[0095] Eco-environmental comprehensive factor 4 = water temperature*(-0.073)+body weight*(0.040)+age*(0.023)+density*(-0.193)+weather*(0.268)+wave height*(0.096)+tidal growth*(0.212)+tide*(0.310)+conductivity*(0.087)+pH*(-0.019)+dissolved oxygen*(-0.139)+salinity*(0.414)+flow velocity*(0.209)+light*(-0.584)+chlorophyll*(-0.164)+food intake*(0.347)+body length*(0.044);

[0096] Ecological and environmental comprehensive factor 5 = water temperature*(-0.113)+body weight*(0.029)+age in days*(0.029)+density*(0.225)+weather*(-0.091)+wave height*(0.246)+tidal growth*(0.078)+tide*(-0.178)+conductivity*(0.231)+pH*(-0.039)+dissolved oxygen*(-0.244)+salinity*(0.465)+flow velocity*(0.297)+light*(0.325)+chlorophyll*(-0.432)+food intake*(-0.326)+body length*(-0.097).

[0097] Step 4: Due to the different growth stages of fish, their feeding habits will be significantly different, mainly in terms of bait particle size (see Table 2), nutritional components (see Table 3), and feeding frequency (see Table 2). In addition, fish can only be raised in cages when they grow to the juvenile stage. Therefore, based on the bio-environmental comprehensive factor data set calculated in step 3, combined with the additional growth stage judgment conditions, the corresponding relationship between the bio-environmental comprehensive factor and the number of fish in the two growth stages of JS and AS is established, respectively, to achieve the purpose of eliminating the error caused by the difference in feeding habits of fish at different growth stages to the fish counting system.

[0098] Table 2

[0099]

[0100] Table 3

[0101]

[0102] Step 5, based on the above steps, use Python to build a cage fish counting model, and use the particle swarm algorithm to optimize the model, and use the optimized model to output the fish counting results. The cage fish counting model includes a juvenile cage fish counting model and a grow-out cage fish counting model; the model is as follows:

[0103] x=[x1,x2,…,x n ]T (12)

[0104]

[0105] In formulas (12), (13), and (14), x represents the transpose of the eigenvector matrix Y of the bio-environmental comprehensive factor; x1, x2, …, x n represents each eigenvector in the eigenvector matrix of the bio-environmental comprehensive factor; h i (x) represents the output of the i-th hidden unit; c i Represents the center vector, that is, the center c of the radial basis function i ; σ i Represents the parameter controlling the corresponding range of the control unit, that is, the width of the radial basis function σ i ; f(x) represents the output of the model, i.e., the fish counting result; w i represents the weight connecting the hidden layer and the output layer; b represents the radial basis function bias term.

[0106] The model is optimized using the particle swarm optimization algorithm (PSO), including:

[0107] Step 1), initialize the position and velocity of the particle swarm. For the parameter vector to be optimized, such as weight w i , the center c of the radial basis function i and width σ i , and the bias term b, can be initialized to random values, representing the initial values ​​of the parameters. The speed can be initialized to a small random value.

[0108] w i (0) = rand(w min ,w max ) (15)

[0109] c i (0) = rand(c min ,c max ) (16)

[0110] σ i (0) = rand(σ min ,σ max ) (17)

[0111] b(0)=rand(b min ,b max ) (18)

[0112] Step 2), evaluate the position (parameter vector) of each particle and calculate its corresponding fitness value.

[0113] fitness i =evaluate(w i ,c i ,σ i ,b)(19)

[0114] Step 3), for each particle, update the individual optimal solution pbest according to the fitness value of its current position i At the same time, according to the fitness values ​​of all particles, the global optimal solution gbest is updated.

[0115] if fitness i <fitness(pbest i )then pbest i =(w i ,c i ,σ i ,b) (20)

[0116] if fitness i <fitness(gbest)then gbest=(w i ,c i ,σ i ,b) (21)

[0117] Step 4), according to the PSO speed update formula, use the individual and global optimal solutions to update the particle's speed. Then, according to the updated speed, use the position update formula to update the particle's position.

[0118] v i (t+1)=ωv i (t)+c1r1(pbest i -x i (t))+c2r2(gbest-x i (t)) (22)

[0119] x i (t+1)=x i (t)+v i (t+1) (23)

[0120] Where ω is the inertia weight, c1 and c2 are acceleration coefficients, and r1 and r2 are random numbers between 0 and 1.

[0121] Repeat steps 2 to 4 until the stopping condition is met. In this embodiment, the stopping condition of this model is that the maximum number of iterations is 15 times.

[0122] Step 5), when the PSO algorithm stops iterating, the parameter vector gbest corresponding to the global optimal solution is output as the optimization result, that is, the optimized weight wi , the center c of the radial basis function i and width σ i , and the bias term b.

[0123] In this process, evaluate(w i ,c i ,σ i ,b) function is used to evaluate the performance of the parameter vector, and fitness(pbest i ) and fitness(gbest) represent the fitness values ​​of the individual optimal solution and the global optimal solution respectively.

[0124] The juvenile cage fish counting model and the grow-out cage fish counting model are trained using the juvenile dataset and the grow-out dataset respectively. The number of iterations is determined by self-setting, and the number of iterations is generally set to 15 times to ensure that each training reaches the optimal value.

[0125] Step 6: Verify and evaluate the constructed cage fish counting model. Table 4 shows the prediction accuracy of the cage fish counting model in the JS and AS growth stages of this embodiment, including the mean absolute error (MAE), root mean square error (RMSE), mean absolute percentage error (MAPE) and correlation coefficient (R). 2 , the specific formula is as follows:

[0126]

[0127] Where Y i Indicates the actual number of fish tails, y i represents the predicted number of fish tails, and T represents the total number of samples.

[0128] It can be seen from Table 4 that in the JS growth stage, MAE can be as low as 3.69, R 2 can reach 91%; MAE in the AS growth stage can be as low as 9.53, R 2 It can reach 86%, which reflects that the ecological environment information-cage fish counting method of the present invention has achieved a higher prediction accuracy.

[0129] Step 7: accurately count the number of fish according to the cage fish counting model established in step 5, and output the fish counting result. Substitute the ecological environment comprehensive factor eigenvector matrix Y into the calculation formula of the cage fish counting model for calculation, and output the cage fish counting result.

[0130] The system will select the corresponding model based on the set judgment conditions. For example, if the weight is between 20-150g, the system will automatically call the juvenile stage model; if the weight is >150g, the system will automatically call the grow-out stage model.

[0131] Table 4

[0132]

[0133] Embodiment 2

[0134] This embodiment provides a cage fish counting system based on ecological environment information, and the system has good prediction performance and the effect is shown in Figure 2 , Figure 3 As shown, it includes a readable storage medium, on which a computer program is stored. When the computer program is executed, a method for counting fish schools in cages based on biological ring information as described above is implemented.

[0135] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for counting fish in cages based on ecological and environmental information fusion and machine learning, characterized in that: The following steps are involved: Obtain the original bio-environmental data set and perform preprocessing; Obtain the comprehensive bio-environment factor based on the pre-processed original bio-environment information; Construct the corresponding relationship between ecological and environmental comprehensive factors and fish population; Building a cage fish school counting model based on the corresponding relationship, and optimizing the cage fish school counting model using a particle swarm algorithm; Count the fish in the cages to be counted according to the optimized cage fish counting model; The original bio-environmental data set includes biological data and environmental data; the biological data includes fish food intake, weight, and individual number; the environmental data includes temperature, dissolved oxygen, salinity, pH, flow rate, and chlorophyll; The process of preprocessing the original bio-environmental data set includes: performing missing value analysis on the original bio-environmental data set, interpolating the missing values ​​by a linear regression method, and normalizing the interpolated bio-environmental data set to obtain a normalized data set; The process of obtaining the bio-environmental comprehensive factor includes: performing a correlation test on the normalized data set, performing principal component analysis on the normalized data set when the correlation requirement is met, selecting the bio-environmental comprehensive factor that meets the cumulative contribution rate requirement according to the cumulative contribution rate rule, and analyzing and assigning values ​​to the bio-environmental comprehensive factor; The process of analyzing and assigning values ​​to the bio-environmental comprehensive factors includes: Construct the following equation: Y=PX In the formula, X represents the bio-environmental data set; represents the average value of each dimension feature in the X data set; ∑ represents the covariance matrix; X T represents the transposed matrix of the biological data set; n represents the number of samples, F m represents the score of the bio-environment factor; γ i represents the eigenvalue of the bio-environmental comprehensive factor; P represents the eigenvector matrix of the bio-environmental comprehensive factor coefficient; δ k represents the coefficient eigenvector of the bio-environmental comprehensive factor; k represents the number of bio-environmental comprehensive factors; X represents the bio-environmental data set; Y represents the eigenvector matrix of the bio-environmental comprehensive factor; By solving the equation, the result of the bio-environmental comprehensive factor assignment is obtained; The cage fish counting model is as follows: x=[x1,x2,…,x n ] T Where x represents the transpose of the eigenvector matrix Y of the bio-environmental comprehensive factor; x1, x2, …, x n represents each eigenvector in the eigenvector matrix of the bio-environmental comprehensive factor; h i (x) represents the output of the i-th hidden unit; c i represents the center vector; σ i represents the parameter of the corresponding range of the control unit; f(x) represents the output of the model, that is, the fish counting result; w i represents the weight connecting the hidden layer and the output layer; b represents the bias term.

2. The cage fish counting method based on ecological and environmental information fusion and machine learning according to claim 1 is characterized in that: The process of building a model for counting fish in cages involves: The cage fish school counting model includes a juvenile cage fish school counting model and a grow-out cage fish school counting model; Based on the ecological and environmental comprehensive factor data set, the corresponding relationships between the ecological and environmental comprehensive factors and the number of fish in the two growth stages of juvenile and grow-out were established respectively. According to the corresponding relationships, the cage fish counting models for the juvenile stage and the grow-out stage were constructed respectively.

3. The method for counting fish schools in cages based on ecological and environmental information fusion and machine learning according to claim 1 is characterized in that: The cage fish counting model was verified and evaluated by mean absolute error, root mean square error, mean absolute percentage error and correlation coefficient.

Citation Information

Patent Citations

  • Fish counting method based on improved SORT algorithm

    CN114627047A