Marine ranching fishery resource calculation method and system
By performing in-depth segmentation and feature extraction on marine ranches, and combining the YOLOv5 algorithm and plankton prediction model, the problem of inaccurate fish counts caused by poor sonar image quality was solved, achieving higher accuracy in fish counts.
Patent Information
- Application Number
- CN202510157088.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-02-13
AI Technical Summary
In existing technologies, due to limitations in acoustic imaging mechanisms and noise pollution, sonar images are of poor quality, resulting in low accuracy in fish identification and consequently affecting the accuracy of fish population statistics in marine ranches.
The marine ranch was divided into ocean layers at different depths. Real-time underwater sonar images and environmental data were collected. A trained fish school image recognition model was used to extract local and global features. The YOLOv5 algorithm was used to identify fish schools. At the same time, a plankton prediction model was used to predict the number of fish based on the aquatic environment data. Finally, a comprehensive analysis was conducted.
It improves the accuracy of fish population statistics in marine ranches. By combining image recognition and environmental data prediction, a more accurate fish population can be obtained through comprehensive analysis.
Smart Images

Figure CN119649202B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fishery resource calculation, and in particular to a method and system for calculating fishery resources in marine ranches. Background Technology
[0002] Due to overfishing and extensive aquaculture, some marine ecosystems have been damaged, and fishery resources have declined. Furthermore, with increasing demand for aquatic products and growing concern for the sustainable development of marine fisheries, it is necessary to scientifically assess and manage the fishery resources of marine ranches to ensure the stable and sustainable growth of aquatic resources while protecting marine ecosystems. This necessitates accurately measuring the fish populations in marine ranches.
[0003] Current technologies typically rely solely on image recognition algorithms to identify fish swarms in underwater sonar images and then count the number of fish in marine ranches. However, due to limitations in acoustic imaging mechanisms and noise pollution, sonar images generally suffer from low contrast and blurred edges, resulting in poor-quality images. Consequently, existing technologies suffer from low accuracy in fish swarm image recognition, leading to low accuracy in the final fish count. Summary of the Invention
[0004] This invention provides a method and system for calculating fishery resources in marine ranches, which can solve the problem that the accuracy of the final fish count is low due to the low accuracy of fish school image recognition in existing technologies.
[0005] To address the aforementioned technical problems, one embodiment of the present invention provides a method for calculating fishery resources in marine ranches, comprising:
[0006] The marine ranch to be surveyed is divided into several ocean layers with different depth ranges, and real-time underwater sonar images and real-time water environment data are collected for each ocean layer; wherein, the real-time water environment data includes light intensity, water temperature, water salinity and water nutrient concentration.
[0007] Real-time underwater sonar images of each ocean layer are input into a trained fish school image recognition model, so that the trained fish school image recognition model can perform fish identification and statistics of each ocean layer based on the real-time underwater sonar images of each ocean layer, and obtain the number of fish schools identified in each ocean layer; wherein, the fish school image recognition model includes a local feature extraction module, a global feature extraction module, a feature fusion module, and a YOLOv5 recognition module;
[0008] Real-time water environment data of each ocean layer is input into a trained fish population prediction model. The trained fish population prediction model first predicts the number of plankton in each ocean layer based on the real-time water environment data of each ocean layer, and then predicts the number of fish based on the predicted number of plankton, so as to obtain the predicted number of fish in each ocean layer. The fish population prediction model includes a plankton prediction module and a fish population prediction module.
[0009] Based on the number of fish schools identified and the predicted number of fish schools in each ocean layer, the total number of fish schools in each ocean layer is calculated, and based on the total number of fish schools in each ocean layer, the total number of fish schools to be counted in the marine ranch is calculated.
[0010] Furthermore, the trained fish school image recognition model performs fish identification and statistics on each ocean layer based on real-time underwater sonar images of each ocean layer, obtaining the number of fish schools identified in each ocean layer, including:
[0011] The local feature extraction module extracts local features from real-time underwater sonar images of each ocean layer using convolutional layers, pooling layers, and activation function layers, resulting in local feature maps for each ocean layer.
[0012] Global feature maps of each ocean layer are obtained by extracting global features from the local feature maps of each ocean layer through the multi-head autonomous intention layer and feedforward neural network layer of the Transformer encoder in the global feature extraction module.
[0013] The feature fusion module fuses the local and global feature maps of each ocean layer to obtain the fused feature map of each ocean layer.
[0014] Fish identification and quantity statistics are performed on the fused feature maps of each ocean layer using the backbone network layer, neck network layer, and detection head layer of the YOLOv5 recognition module, resulting in the number of fish schools identified in each ocean layer.
[0015] Furthermore, the trained fish population prediction model first predicts the number of plankton in each ocean layer based on real-time water environment data, and then predicts the fish population based on the predicted number of plankton, including:
[0016] The plankton prediction module uses an input layer, a first hidden layer, and an output layer to predict the number of plankton in each ocean layer based on real-time water environment data. The first half of the first hidden layer consists of several LSTM units, and the second half consists of several GRU units. The output layer includes a fully connected layer.
[0017] Based on the predicted number of plankton in each ocean layer and real-time aquatic environment data, the fish population prediction module is used to predict the fish population in each ocean layer through its input layer, adaptive weight layer, second hidden layer, and output layer.
[0018] Furthermore, the plankton prediction module, through its input layer, first hidden layer, and output layer, predicts the number of plankton in each ocean layer based on real-time water environment data, thereby obtaining the predicted number of plankton in each ocean layer, including:
[0019] The real-time water environment data of each ocean layer is preprocessed through the input layer of the plankton prediction module to obtain the processed real-time water environment data of each ocean layer; wherein, the data preprocessing includes data cleaning and normalization.
[0020] Based on the real-time water environment data processed by each ocean layer, the final hidden state of the LSTM unit in the first hidden layer of the plankton prediction module is calculated and output through the input gate, forget gate, output gate, candidate cell state calculation, cell state update and hidden state output of the LSTM unit in the first hidden layer.
[0021] The hidden state of the LSTM unit is set as the initial hidden state of the GRU unit. Based on the real-time water environment data processed by each ocean layer and the initial hidden state of the GRU unit, the final hidden state of the GRU unit is calculated and output through the update gate, reset gate, candidate hidden state and hidden state update of the GRU unit in the first hidden layer of the plankton prediction module.
[0022] Based on the final hidden state of the GRU unit, the number of plankton is predicted by the fully connected units of the output layer in the plankton prediction module, and the predicted number of plankton in each ocean layer is obtained.
[0023] Furthermore, the formula for calculating the overall fish population in each ocean layer is as follows:
[0024] ;
[0025] in, Let i be the total number of fish in the i-th ocean layer; The number of fish swarms identified in the i-th ocean layer; Predict the number of fish in the i-th ocean layer; and These are preset weighting factors for the number of fish identified and the number of fish predicted, respectively.
[0026] The formula for calculating the total number of fish in the marine ranch to be counted is as follows:
[0027] ;
[0028] in, The total number of fish in the marine ranch to be counted; Let i be the total number of fish in the i-th ocean layer; i = 1, 2, 3, ..., m, where m is a positive integer, i is the ocean layer number, and m is the total number of ocean layers.
[0029] Based on the above method embodiments, the present invention provides corresponding system embodiments;
[0030] One embodiment of the present invention provides a fishery resource calculation system for marine ranches, including: a data acquisition module, a fish school number identification module, a fish school number prediction module, and a total fish school number calculation module;
[0031] The data acquisition module is used to divide the marine ranch to be analyzed into several ocean layers with different depth ranges, and to collect real-time underwater sonar images and real-time water environment data for each ocean layer; wherein, the real-time water environment data includes light intensity, water temperature, water salinity and water nutrient concentration.
[0032] The fish school count identification module is used to input real-time underwater sonar images of each ocean layer into a trained fish school image recognition model, so that the trained fish school image recognition model can identify and count fish in each ocean layer based on the real-time underwater sonar images of each ocean layer, and obtain the fish school count of each ocean layer; wherein, the fish school image recognition model includes a local feature extraction module, a global feature extraction module, a feature fusion module, and a YOLOv5 recognition module;
[0033] The fish population prediction module is used to input real-time water environment data of each ocean layer into the trained fish population prediction model, so that the trained fish population prediction model first predicts the number of plankton in each ocean layer based on the real-time water environment data of each ocean layer, and then predicts the number of fish based on the predicted number of plankton, thus obtaining the predicted number of fish in each ocean layer; wherein, the fish population prediction model includes a plankton prediction module and a fish population prediction module.
[0034] The total fish population calculation module is used to calculate the total fish population of each ocean layer based on the identified and predicted fish populations of each ocean layer, and to calculate the total fish population of the marine ranch to be counted based on the total fish population of each ocean layer.
[0035] Furthermore, the fish school image recognition model includes: a local feature extraction module, a global feature extraction module, a feature fusion module, and a YOLOv5 recognition module;
[0036] The local feature extraction module extracts local features from real-time underwater sonar images of each ocean layer through the convolutional layer, pooling layer, and activation function layer of the local feature extraction module, and obtains local feature maps of each ocean layer.
[0037] The global feature extraction module extracts global features from the local feature maps of each ocean layer by using the multi-head autonomous intention layer and feedforward neural network layer of the Transformer encoder in the global feature extraction module, and obtains the global feature map of each ocean layer.
[0038] The feature fusion module fuses the local and global feature maps of each ocean layer to obtain a fused feature map of each ocean layer.
[0039] The YOLOv5 recognition module uses the backbone network layer, neck network layer, and detection head layer of the YOLOv5 recognition module to perform fish identification and quantity statistics on the fused feature maps of each ocean layer, and obtains the number of fish schools identified in each ocean layer.
[0040] Furthermore, the fish population prediction model includes: a plankton prediction module and a fish population prediction module;
[0041] The plankton prediction module is used to predict the number of plankton in each ocean layer based on real-time water environment data of each ocean layer through the input layer, the first hidden layer and the output layer of the plankton prediction module; wherein, the first half of the first hidden layer is composed of several LSTM units and the second half of the first hidden layer is composed of several GRU units; the output layer includes a fully connected layer.
[0042] The fish population prediction module is used to predict the fish population in each ocean layer based on the predicted number of plankton in each ocean layer and real-time water environment data. The prediction is achieved through the input layer, adaptive weight layer, second hidden layer, and output layer of the fish population prediction module.
[0043] Furthermore, the plankton prediction module includes an input layer, a first hidden layer, and an output layer; the first hidden layer includes an LSTM unit and a GRU unit.
[0044] The input layer of the plankton prediction module is used to preprocess real-time water environment data of each ocean layer to obtain processed real-time water environment data of each ocean layer; wherein, the data preprocessing includes data cleaning and normalization.
[0045] The LSTM unit in the first hidden layer of the plankton prediction module is used to calculate and output the final hidden state of the LSTM unit based on the real-time water environment data processed by each ocean layer through the input gate, forget gate, output gate, candidate cell state calculation, cell state update and hidden state output of the LSTM unit in the first hidden layer of the plankton prediction module.
[0046] The GRU unit in the first hidden layer of the plankton prediction module is used to set the hidden state of the LSTM unit as the initial hidden state of the GRU unit. Based on the real-time water environment data processed by each ocean layer and the initial hidden state of the GRU unit, the final hidden state of the GRU unit is calculated and output through the update gate, reset gate, candidate hidden state and hidden state update of the GRU unit in the first hidden layer of the plankton prediction module.
[0047] The output layer of the plankton prediction module is used to predict the number of plankton in each ocean layer by using the fully connected units of the output layer of the plankton prediction module based on the final hidden state of the GRU unit.
[0048] Furthermore, the formula for calculating the overall fish population in each ocean layer is as follows:
[0049] ;
[0050] in, Let i be the total number of fish in the i-th ocean layer; The number of fish swarms identified in the i-th ocean layer; Predict the number of fish in the i-th ocean layer; and These are preset weighting factors for the number of fish identified and the number of fish predicted, respectively.
[0051] The formula for calculating the total number of fish in the marine ranch to be counted is as follows:
[0052] ;
[0053] in, The total number of fish in the marine ranch to be counted; Let i be the total number of fish in the i-th ocean layer; i = 1, 2, 3, ..., m, where m is a positive integer, i is the ocean layer number, and m is the total number of ocean layers.
[0054] Compared with existing technologies, the embodiments of the present invention have the following beneficial effects: First, the technical solution of the present invention divides the marine ranch into regional depths, obtaining several ocean layers at different depths; second, it uses a constructed fish school image recognition model to extract local and global features from the underwater sonar images of each ocean layer, obtaining local and global feature maps of the underwater sonar images of each ocean layer. The extracted feature maps are then fused, and a YOLOv5-based image recognition algorithm is used to identify and count fish schools in the fused feature maps, obtaining the number of fish schools identified in each ocean layer; then, by constructing a fish school quantity prediction model that includes a plankton prediction module and a fish school quantity prediction module, the fish school quantity is first predicted for each ocean layer based on the water environment data of each ocean layer, and then… Fish populations are predicted based on the predicted amount of plankton, resulting in predicted fish populations for each ocean layer. Finally, a comprehensive analysis and calculation is performed based on the identified and predicted fish populations for each ocean layer to obtain the final fish population for the marine ranch. This invention not only utilizes image recognition technology to identify and count fish populations from sonar images, but also predicts the amount of plankton in the water using aquatic environmental data, thereby predicting the fish population. It leverages the correlation between plankton populations and fish populations. Finally, the fish populations obtained from image recognition and those predicted based on plankton populations are comprehensively analyzed and calculated to obtain the final fish population. This improves the accuracy of fish population statistics in marine ranches and solves the problem of low accuracy in the final fish population count due to low accuracy in fish population image recognition in existing technologies. Attached Figure Description
[0055] Figure 1 : A flowchart illustrating the steps of a method for calculating fishery resources in a marine ranch, as provided in an embodiment of the present invention;
[0056] Figure 2 : A system structure diagram of a fishery resource calculation system for a marine ranch provided in an embodiment of the present invention;
[0057] Figure 3 : A model structure diagram of the fish school image recognition model provided in an embodiment of the present invention;
[0058] Figure 4 : A model structure diagram of the fish population prediction model provided in the embodiments of the present invention; Detailed Implementation
[0059] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0060] In the description of this invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.
[0061] Example 1:
[0062] Reference Figure 1 The following is a flowchart of a method for calculating fishery resources in a marine ranch, provided by an embodiment of the present invention. The method includes at least the following steps S1 to S4:
[0063] Step S1: Divide the marine ranch to be surveyed into several ocean layers with different depth ranges, and collect real-time underwater sonar images and real-time water environment data for each ocean layer; wherein, the real-time water environment data includes light intensity, water temperature, water salinity and water nutrient concentration.
[0064] In this embodiment, based on the water depth of the marine ranch, several ocean layers with different depth ranges are set up. High-resolution multibeam sonar equipment and water environment monitoring buoys equipped with various sensors are deployed at the center and edge areas of each ocean layer to collect real-time underwater sonar images and real-time water environment data for each ocean layer. The real-time water environment data includes light intensity, water temperature, water salinity, and water nutrient concentration. The sensors include light intensity sensors, water temperature sensors, salinity sensors, and nutrient concentration sensors.
[0065] In this embodiment, after acquiring real-time underwater sonar images and real-time water environment data for each ocean layer, the method further includes: image preprocessing of the real-time underwater sonar images for each ocean layer; wherein the image preprocessing includes, but is not limited to, image denoising, image enhancement, and image set correction.
[0066] Step S2: Input the real-time underwater sonar images of each ocean layer into the trained fish school image recognition model, so that the trained fish school image recognition model can perform fish identification and statistics of each ocean layer based on the real-time underwater sonar images of each ocean layer, and obtain the number of fish schools identified in each ocean layer; wherein, the fish school image recognition model includes a local feature extraction module, a global feature extraction module, a feature fusion module and a YOLOv5 recognition module;
[0067] In this embodiment, refer to Figure 3 This is a model structure diagram of the fish school image recognition model provided in this embodiment of the invention. The trained fish school image recognition model performs fish identification and statistics on each ocean layer based on real-time underwater sonar images of each ocean layer to obtain the number of fish schools identified in each ocean layer, including:
[0068] The local feature extraction module extracts local features from real-time underwater sonar images of each ocean layer using convolutional layers, pooling layers, and activation function layers, resulting in local feature maps for each ocean layer.
[0069] For example, the local feature extraction module can employ a CNN algorithm. The calculation steps of the convolutional layer, pooling layer, and activation function layer in the CNN algorithm are as follows:
[0070] First, set the underwater sonar image to... Size is (Width W, Height H, and Number of Channels C). After the first convolutional layer, the kernel size is set to... Step size set to Fill is set to Feature maps output by convolutional layers The size is (in (Number of channels in the output of the convolutional layer), local feature map The calculation formula is: ;in, For activation functions;
[0071] Next, it goes through a pooling layer, with the pooling kernel size set to... Step size set to Pooling layer outputs feature map The size is Pooling layer outputs feature map The calculation formula is: ;
[0072] After several convolutional layers, pooling layers, and activation function layers, the local feature map output by the CNN is finally obtained. Its size is .
[0073] Global feature maps of each ocean layer are obtained by extracting global features from the local feature maps of each ocean layer through the multi-head autonomous intention layer and feedforward neural network layer of the Transformer encoder in the global feature extraction module.
[0074] For example, the calculation steps of the multi-head autonomous intention layer and feedforward neural network layer of the Transformer encoder in the global feature extraction module are as follows:
[0075] First, the local feature map Perform a dimensional transformation to stretch it into a two-dimensional sequence. , shape is (in , ), and add position encoding ,get .
[0076] Then The input is fed into the Transformer encoder. For a multi-head self-attention layer, let the number of heads be... Query matrix Key matrix Value matrix The following results were obtained through linear transformations: , and (in , and (As a preset weight matrix), the formula for calculating the attention score is: (in Multi-head attention output (in , (The preset output weight matrix).
[0077] The feature map output from the multi-head autonomous will layer is input into a feedforward neural network layer and processed through fully connected layers and nonlinear transformations to finally obtain the global feature map output by the Transformer.
[0078] The feature fusion module fuses the local and global feature maps of each ocean layer to obtain a fused feature map of each ocean layer.
[0079] Fish identification and quantity statistics are performed on the fused feature maps of each ocean layer using the backbone network layer, neck network layer, and detection head layer of the YOLOv5 recognition module, resulting in the number of fish schools identified in each ocean layer.
[0080] In this embodiment, firstly, the backbone network layer of the YOLOv5 recognition module extracts features from the fused feature maps of each ocean layer to obtain feature maps of the fused feature maps of each ocean layer; then, the neck network layer of the YOLOv5 recognition module fuses and adjusts the feature maps of the fused feature maps of each ocean layer to generate multi-scale feature maps of the fused feature maps of each ocean layer; finally, the detection head layer of the YOLOv5 recognition module performs fish identification and quantity counting on the multi-scale feature maps of the fused feature maps of each ocean layer to obtain the number of fish schools identified in each ocean layer.
[0081] In this embodiment, the model training steps of the fish school image recognition model are as follows:
[0082] Obtain historical underwater sonar images of ribbonfish schools at various ocean layers in the marine ranch, labeled with actual numbers;
[0083] Historical underwater sonar images of marine ranches with actual fish populations in various ocean layers are preprocessed; wherein, the image preprocessing includes, but is not limited to, image denoising, image enhancement, and image ensemble correction.
[0084] For each ocean layer, the local feature map of each ocean layer is obtained by extracting local features from the historical underwater sonar image with the actual number of fish after image preprocessing through the convolutional layer, pooling layer and activation function layer of the local feature extraction module in the fish school image recognition model to be trained.
[0085] The global feature maps of each ocean layer are obtained by extracting global features from the local feature maps of each ocean layer through the multi-head autonomous intention layer and feedforward neural network layer of the Transformer encoder in the global feature extraction module of the fish school image recognition model to be trained.
[0086] The feature fusion module in the fish school image recognition model to be trained fuses the local and global feature maps of each ocean layer to obtain the fused feature map of each ocean layer.
[0087] Fish identification and quantity statistics are performed on the fused feature maps of each ocean layer by using the backbone network layer, neck network layer and detection head layer of the YOLOv5 recognition module in the fish school image recognition model to be trained, so as to obtain the number of fish schools identified in each ocean layer.
[0088] Based on the number of fish schools identified and the actual number of fish schools in each ocean layer, a loss value is calculated using a loss function. The model parameters of the fish school image recognition model to be trained are then optimized based on the loss value until the loss value converges, resulting in a trained fish school image recognition model. The loss function includes, but is not limited to, the mean squared error loss function, the mean absolute error loss function, and the binary cross-entropy loss function. The optimization process includes, but is not limited to, the stochastic gradient descent optimization algorithm and the Adam optimizer.
[0089] Step S3: Input the real-time water environment data of each ocean layer into the trained fish population prediction model, so that the trained fish population prediction model first predicts the number of plankton in each ocean layer based on the real-time water environment data of each ocean layer, and then predicts the number of fish based on the predicted number of plankton, so as to obtain the predicted number of fish in each ocean layer; wherein, the fish population prediction model includes a plankton prediction module and a fish population prediction module;
[0090] In this embodiment, refer to Figure 4 This is a model structure diagram of the fish population prediction model provided in this embodiment of the invention. The trained fish population prediction model first predicts the number of plankton in each ocean layer based on real-time water environment data, and then predicts the fish population based on the predicted number of plankton, including:
[0091] The plankton prediction module uses an input layer, a first hidden layer, and an output layer to predict the number of plankton in each ocean layer based on real-time water environment data. The first half of the first hidden layer consists of several LSTM units, and the second half consists of several GRU units. The output layer includes a fully connected layer.
[0092] In this embodiment, the step of predicting the number of plankton in each ocean layer based on real-time water environment data from the input layer, the first hidden layer, and the output layer of the plankton prediction module, to obtain the predicted number of plankton in each ocean layer, includes:
[0093] The real-time water environment data of each ocean layer is preprocessed through the input layer of the plankton prediction module to obtain the processed real-time water environment data of each ocean layer; wherein, the data preprocessing includes data cleaning and normalization.
[0094] Based on the real-time water environment data processed by each ocean layer, the final hidden state of the LSTM unit in the first hidden layer of the plankton prediction module is calculated and output through the input gate, forget gate, output gate, candidate cell state calculation, cell state update and hidden state output of the LSTM unit in the first hidden layer.
[0095] For example, the calculation formulas for the input gate, forget gate, output gate, candidate cell state calculation, cell state update, and hidden state output of the LSTM unit are as follows:
[0096] The formula for calculating the input gate is: ;in, The value of the input gate; It is a sigmoid activation function; , and These are the first weight matrix, the second weight matrix, and the bias term of the input gate;
[0097] The formula for calculating the forgetting gate is: ;in, The value of the forget gate; It is a sigmoid activation function; , and These are the first weight matrix, the second weight matrix, and the bias term of the forget gate;
[0098] The formula for calculating the output gate is: ;in, Output the value of the gate; It is a sigmoid activation function; , and These are the first weight matrix, the second weight matrix, and the bias term of the output gate;
[0099] The formula for calculating candidate cell states is as follows: ;in, The value calculated for the candidate cell state; tanh is the hyperbolic tangent activation function; , and These are the first weight matrix, the second weight matrix, and the bias term used to calculate the candidate cell state.
[0100] The formula for calculating cell state updates is: ;in, The value updated for cell state; This represents the cell state at the previous moment; Represents element-wise multiplication; The value of the forget gate; The value of the input gate; Values calculated for candidate cell states;
[0101] The formula for calculating the output in the hidden state is: ;in, The value output in the hidden state; The output gate value is tanh; tanh is the hyperbolic tangent activation function. The value updated for cell state; Represents element-wise multiplication;
[0102] The hidden state of the LSTM unit is set as the initial hidden state of the GRU unit. Based on the real-time water environment data processed by each ocean layer and the initial hidden state of the GRU unit, the final hidden state of the GRU unit is calculated and output through the update gate, reset gate, candidate hidden state and hidden state update of the GRU unit in the first hidden layer of the plankton prediction module.
[0103] For example, the calculation formulas for the update gate, reset gate, candidate hidden state, and hidden state update of the GRU unit are as follows:
[0104] The formula for updating the door is: ;in, This indicates the value of the update gate at time step t; It is the sigmoid activation function; It is the preset weight matrix of the update gate; This indicates that the hidden state from the previous moment will be restored. Input data of the GRU unit To splice; This is the preset bias for updating the door;
[0105] The formula for resetting the door is: ;in, The value of the reset gate for time step t; It is the sigmoid activation function; It is the preset weight matrix for resetting the door; This indicates that the hidden state from the previous moment will be restored. Input data of the GRU unit To splice; This resets the door's default bias.
[0106] The formula for calculating the candidate hidden state is: ;in, Let be the candidate hidden state at time step t; tanh is the hyperbolic tangent activation function; The value of the reset gate for time step t; and The preset weight matrix and bias terms for the candidate hidden states; This is element-wise multiplication; This is the hidden state from the previous moment; For the input data of the GRU unit;
[0107] The formula for calculating hidden state updates is: ;in, Update the output of the final hidden state to reflect the hidden state; This indicates the value of the updated gate at time step t; This is the hidden state from the previous moment; Let be the candidate hidden state at time step t; This is element-wise multiplication;
[0108] Based on the final hidden state of the GRU unit, the number of plankton is predicted by the fully connected units of the output layer in the plankton prediction module, and the predicted number of plankton in each ocean layer is obtained.
[0109] Based on the predicted number of plankton in each ocean layer and real-time aquatic environment data, the fish population prediction module is used to predict the fish population in each ocean layer through its input layer, adaptive weight layer, second hidden layer, and output layer.
[0110] In this embodiment, the adaptive weighting layer is used to assign weights to the predicted number of plankton in each ocean layer and the real-time aquatic environment data; the second hidden layer consists of several neurons and is used to predict the number of fish in each ocean layer based on the predicted number of plankton in each ocean layer and the real-time aquatic environment data after weighting.
[0111] In this embodiment, the model training steps for the fish population prediction model are as follows:
[0112] Obtain historical aquatic environmental data on the actual number of ribbonfish schools in each ocean layer of the marine ranch;
[0113] The plankton prediction module of the fish population prediction model to be trained predicts the number of plankton in each ocean layer based on historical water environment data with actual fish population labels. The first half of the first hidden layer consists of several LSTM units, and the second half of the first hidden layer consists of several GRU units. The output layer includes a fully connected layer.
[0114] Based on the predicted number of plankton in each ocean layer and historical water environment data, the fish population prediction is performed through the input layer, adaptive weight layer, second hidden layer and output layer of the fish population prediction module in the fish population prediction model to be trained, and the predicted number of fish in each ocean layer is obtained.
[0115] Based on the predicted and actual fish populations at each ocean layer, a loss function is used to calculate the loss value. The model parameters of the fish population prediction model to be trained are then optimized based on the loss value until the loss value converges, resulting in a trained fish population prediction model. The loss function includes, but is not limited to, mean squared error loss function, mean absolute error loss function, and binary cross-entropy loss function. The optimization process includes, but is not limited to, stochastic gradient descent optimization algorithm and Adam optimizer.
[0116] Step S4: Calculate the total number of fish in each ocean layer based on the number of fish identified and the predicted number of fish in each ocean layer, and calculate the total number of fish in the marine ranch to be counted based on the total number of fish in each ocean layer.
[0117] In this embodiment, the formula for calculating the overall number of fish in each ocean layer is as follows:
[0118] ;
[0119] in, Let i be the total number of fish in the i-th ocean layer; The number of fish swarms identified in the i-th ocean layer; Predict the number of fish in the i-th ocean layer; and These are preset weighting factors for the number of fish identified and the number of fish predicted, respectively.
[0120] The formula for calculating the total number of fish in the marine ranch to be counted is as follows:
[0121] ;
[0122] in, The total number of fish in the marine ranch to be counted; Let i be the total number of fish in the i-th ocean layer; i = 1, 2, 3, ..., m, where m is a positive integer, i is the ocean layer number, and m is the total number of ocean layers.
[0123] Example 2:
[0124] Reference Figure 2 The above is a system structure diagram of a fishery resource calculation system for a marine ranch provided in an embodiment of the present invention. The system includes at least a data acquisition module, a fish population identification module, a fish population prediction module, and a total fish population calculation module.
[0125] The data acquisition module is used to divide the marine ranch to be analyzed into several ocean layers with different depth ranges, and to collect real-time underwater sonar images and real-time water environment data for each ocean layer; wherein, the real-time water environment data includes light intensity, water temperature, water salinity and water nutrient concentration.
[0126] The fish school count identification module is used to input real-time underwater sonar images of each ocean layer into a trained fish school image recognition model, so that the trained fish school image recognition model can identify and count fish in each ocean layer based on the real-time underwater sonar images of each ocean layer, and obtain the fish school count of each ocean layer; wherein, the fish school image recognition model includes a local feature extraction module, a global feature extraction module, a feature fusion module, and a YOLOv5 recognition module;
[0127] The fish population prediction module is used to input real-time water environment data of each ocean layer into the trained fish population prediction model, so that the trained fish population prediction model first predicts the number of plankton in each ocean layer based on the real-time water environment data of each ocean layer, and then predicts the number of fish based on the predicted number of plankton, thus obtaining the predicted number of fish in each ocean layer; wherein, the fish population prediction model includes a plankton prediction module and a fish population prediction module.
[0128] The total fish population calculation module is used to calculate the total fish population of each ocean layer based on the identified and predicted fish populations of each ocean layer, and to calculate the total fish population of the marine ranch to be counted based on the total fish population of each ocean layer.
[0129] In this embodiment, the fish school image recognition model includes: a local feature extraction module, a global feature extraction module, a feature fusion module, and a YOLOv5 recognition module;
[0130] The local feature extraction module extracts local features from real-time underwater sonar images of each ocean layer through the convolutional layer, pooling layer, and activation function layer of the local feature extraction module, and obtains local feature maps of each ocean layer.
[0131] The global feature extraction module extracts global features from the local feature maps of each ocean layer by using the multi-head autonomous intention layer and feedforward neural network layer of the Transformer encoder in the global feature extraction module, and obtains the global feature map of each ocean layer.
[0132] The feature fusion module fuses the local and global feature maps of each ocean layer to obtain a fused feature map of each ocean layer.
[0133] The YOLOv5 recognition module uses the backbone network layer, neck network layer, and detection head layer of the YOLOv5 recognition module to perform fish identification and quantity statistics on the fused feature maps of each ocean layer, and obtains the number of fish schools identified in each ocean layer.
[0134] In this embodiment, the fish population prediction model includes: a plankton prediction module and a fish population prediction module;
[0135] The plankton prediction module is used to predict the number of plankton in each ocean layer based on real-time water environment data of each ocean layer through the input layer, the first hidden layer and the output layer of the plankton prediction module; wherein, the first half of the first hidden layer is composed of several LSTM units and the second half of the first hidden layer is composed of several GRU units; the output layer includes a fully connected layer.
[0136] The fish population prediction module is used to predict the fish population in each ocean layer based on the predicted number of plankton in each ocean layer and real-time water environment data. The prediction is achieved through the input layer, adaptive weight layer, second hidden layer, and output layer of the fish population prediction module.
[0137] In this embodiment, the plankton prediction module includes an input layer, a first hidden layer, and an output layer; the first hidden layer includes an LSTM unit and a GRU unit.
[0138] The input layer of the plankton prediction module is used to preprocess real-time water environment data of each ocean layer to obtain processed real-time water environment data of each ocean layer; wherein, the data preprocessing includes data cleaning and normalization.
[0139] The LSTM unit in the first hidden layer of the plankton prediction module is used to calculate and output the final hidden state of the LSTM unit based on the real-time water environment data processed by each ocean layer through the input gate, forget gate, output gate, candidate cell state calculation, cell state update and hidden state output of the LSTM unit in the first hidden layer of the plankton prediction module.
[0140] The GRU unit in the first hidden layer of the plankton prediction module is used to set the hidden state of the LSTM unit as the initial hidden state of the GRU unit. Based on the real-time water environment data processed by each ocean layer and the initial hidden state of the GRU unit, the final hidden state of the GRU unit is calculated and output through the update gate, reset gate, candidate hidden state and hidden state update of the GRU unit in the first hidden layer of the plankton prediction module.
[0141] The output layer of the plankton prediction module is used to predict the number of plankton in each ocean layer by using the fully connected units of the output layer of the plankton prediction module based on the final hidden state of the GRU unit.
[0142] In this embodiment, the formula for calculating the overall number of fish in each ocean layer is as follows:
[0143] ;
[0144] in, Let i be the total number of fish in the i-th ocean layer; The number of fish swarms identified in the i-th ocean layer; Predict the number of fish in the i-th ocean layer; and These are preset weighting factors for the number of fish identified and the number of fish predicted, respectively.
[0145] The formula for calculating the total number of fish in the marine ranch to be counted is as follows:
[0146] ;
[0147] in, The total number of fish in the marine ranch to be counted; Let i be the total number of fish in the i-th ocean layer; i = 1, 2, 3, ..., m, where m is a positive integer, i is the ocean layer number, and m is the total number of ocean layers.
[0148] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for calculating fishery resources in a marine ranch, characterized in that, include: The marine ranch to be surveyed is divided into several ocean layers with different depth ranges, and real-time underwater sonar images and real-time water environment data are collected for each ocean layer; wherein, the real-time water environment data includes light intensity, water temperature, water salinity and water nutrient concentration. Real-time underwater sonar images of each ocean layer are input into a trained fish school image recognition model, so that the trained fish school image recognition model can perform fish identification and statistics of each ocean layer based on the real-time underwater sonar images of each ocean layer, and obtain the number of fish schools identified in each ocean layer; wherein, the fish school image recognition model includes a local feature extraction module, a global feature extraction module, a feature fusion module, and a YOLOv5 recognition module; Real-time water environment data of each ocean layer is input into a trained fish population prediction model. The trained fish population prediction model first predicts the number of plankton in each ocean layer based on the real-time water environment data of each ocean layer, and then predicts the number of fish based on the predicted number of plankton, so as to obtain the predicted number of fish in each ocean layer. The fish population prediction model includes a plankton prediction module and a fish population prediction module. Based on the number of fish schools identified and the predicted number of fish schools in each ocean layer, the total number of fish schools in each ocean layer is calculated, and based on the total number of fish schools in each ocean layer, the total number of fish schools in the marine ranch to be counted is calculated. The trained fish population prediction model first predicts the amount of plankton in each ocean layer based on real-time water environment data, and then predicts the fish population based on the predicted amount of plankton, including: The plankton prediction module uses an input layer, a first hidden layer, and an output layer to predict the number of plankton in each ocean layer based on real-time water environment data. The first half of the first hidden layer consists of several LSTM units, and the second half consists of several GRU units. The output layer includes a fully connected layer. Based on the predicted number of plankton in each ocean layer and real-time aquatic environment data, the fish population prediction module is used to predict the fish population in each ocean layer through its input layer, adaptive weight layer, second hidden layer, and output layer.
2. The method for calculating fishery resources in a marine ranch according to claim 1, characterized in that, The trained fish school image recognition model performs fish identification and statistics for each ocean layer based on real-time underwater sonar images of each ocean layer, obtaining the number of fish schools identified in each ocean layer, including: The local feature extraction module extracts local features from real-time underwater sonar images of each ocean layer using convolutional layers, pooling layers, and activation function layers, resulting in local feature maps for each ocean layer. Global feature maps of each ocean layer are obtained by extracting global features from the local feature maps of each ocean layer through the multi-head autonomous intention layer and feedforward neural network layer of the Transformer encoder in the global feature extraction module. The feature fusion module fuses the local and global feature maps of each ocean layer to obtain a fused feature map of each ocean layer. Fish identification and quantity statistics are performed on the fused feature maps of each ocean layer using the backbone network layer, neck network layer, and detection head layer of the YOLOv5 recognition module, resulting in the number of fish schools identified in each ocean layer.
3. The method for calculating fishery resources in a marine ranch according to claim 1, characterized in that, The method of predicting the number of plankton in each ocean layer by using the input layer, first hidden layer, and output layer of the plankton prediction module based on real-time water environment data of each ocean layer, and obtaining the predicted number of plankton in each ocean layer, includes: The real-time water environment data of each ocean layer is preprocessed through the input layer of the plankton prediction module to obtain the processed real-time water environment data of each ocean layer; wherein, the data preprocessing includes data cleaning and normalization. Based on the real-time water environment data processed by each ocean layer, the final hidden state of the LSTM unit in the first hidden layer of the plankton prediction module is calculated and output through the input gate, forget gate, output gate, candidate cell state calculation, cell state update and hidden state output of the LSTM unit in the first hidden layer. The hidden state of the LSTM unit is set as the initial hidden state of the GRU unit. Based on the real-time water environment data processed by each ocean layer and the initial hidden state of the GRU unit, the final hidden state of the GRU unit is calculated and output through the update gate, reset gate, candidate hidden state and hidden state update of the GRU unit in the first hidden layer of the plankton prediction module. Based on the final hidden state of the GRU unit, the number of plankton is predicted by the fully connected units of the output layer in the plankton prediction module, and the predicted number of plankton in each ocean layer is obtained.
4. The method for calculating fishery resources in a marine ranch according to claim 3, characterized in that, The formula for calculating the overall fish population in each ocean layer is as follows: ; in, Let i be the total number of fish in the i-th ocean layer; The number of fish swarms identified in the i-th ocean layer; Predict the number of fish in the i-th ocean layer; and These are preset weighting factors for the number of fish identified and the number of fish predicted, respectively. The formula for calculating the total number of fish in the marine ranch to be counted is as follows: ; in, The total number of fish in the marine ranch to be counted; Let i be the total number of fish in the i-th ocean layer; i = 1, 2, 3, ..., m, where m is a positive integer, i is the ocean layer number, and m is the total number of ocean layers.
5. A fishery resource calculation system for marine ranching, characterized in that, include: The module includes a data acquisition module, a fish population identification module, a fish population prediction module, and a total fish population calculation module. The data acquisition module is used to divide the marine ranch to be analyzed into several ocean layers with different depth ranges, and to collect real-time underwater sonar images and real-time water environment data for each ocean layer; wherein, the real-time water environment data includes light intensity, water temperature, water salinity and water nutrient concentration. The fish school count identification module is used to input real-time underwater sonar images of each ocean layer into a trained fish school image recognition model, so that the trained fish school image recognition model can identify and count fish in each ocean layer based on the real-time underwater sonar images of each ocean layer, and obtain the fish school count of each ocean layer; wherein, the fish school image recognition model includes a local feature extraction module, a global feature extraction module, a feature fusion module, and a YOLOv5 recognition module; The fish population prediction module is used to input real-time water environment data of each ocean layer into the trained fish population prediction model, so that the trained fish population prediction model first predicts the number of plankton in each ocean layer based on the real-time water environment data of each ocean layer, and then predicts the number of fish based on the predicted number of plankton, thus obtaining the predicted number of fish in each ocean layer; wherein, the fish population prediction model includes a plankton prediction module and a fish population prediction module. The total fish population calculation module is used to calculate the total fish population of each ocean layer based on the identified and predicted fish populations of each ocean layer, and to calculate the total fish population of the marine ranch to be counted based on the total fish population of each ocean layer. The fish population prediction model includes: a plankton prediction module and a fish population prediction module; The plankton prediction module is used to predict the number of plankton in each ocean layer based on real-time water environment data of each ocean layer through the input layer, the first hidden layer and the output layer of the plankton prediction module; wherein, the first half of the first hidden layer is composed of several LSTM units and the second half of the first hidden layer is composed of several GRU units; the output layer includes a fully connected layer. The fish population prediction module is used to predict the fish population in each ocean layer based on the predicted number of plankton in each ocean layer and real-time water environment data. The prediction is achieved through the input layer, adaptive weight layer, second hidden layer, and output layer of the fish population prediction module.
6. The fishery resource calculation system for a marine ranch according to claim 5, characterized in that, The fish school image recognition model includes: a local feature extraction module, a global feature extraction module, a feature fusion module, and a YOLOv5 recognition module; The local feature extraction module extracts local features from real-time underwater sonar images of each ocean layer through the convolutional layer, pooling layer, and activation function layer of the local feature extraction module, and obtains local feature maps of each ocean layer. The global feature extraction module extracts global features from the local feature maps of each ocean layer by using the multi-head autonomous intention layer and feedforward neural network layer of the Transformer encoder in the global feature extraction module, and obtains the global feature map of each ocean layer. The feature fusion module fuses the local and global feature maps of each ocean layer to obtain a fused feature map of each ocean layer. The YOLOv5 recognition module uses the backbone network layer, neck network layer, and detection head layer of the YOLOv5 recognition module to perform fish identification and quantity statistics on the fused feature maps of each ocean layer, and obtains the number of fish schools identified in each ocean layer.
7. A fishery resource calculation system for a marine ranch according to claim 5, characterized in that, The planktonic prediction module includes an input layer, a first hidden layer, and an output layer; the first hidden layer includes an LSTM unit and a GRU unit. The input layer of the plankton prediction module is used to preprocess real-time water environment data of each ocean layer to obtain processed real-time water environment data of each ocean layer; wherein, the data preprocessing includes data cleaning and normalization. The LSTM unit in the first hidden layer of the plankton prediction module is used to calculate and output the final hidden state of the LSTM unit based on the real-time water environment data processed by each ocean layer through the input gate, forget gate, output gate, candidate cell state calculation, cell state update and hidden state output of the LSTM unit in the first hidden layer of the plankton prediction module. The GRU unit in the first hidden layer of the plankton prediction module is used to set the hidden state of the LSTM unit as the initial hidden state of the GRU unit. Based on the real-time water environment data processed by each ocean layer and the initial hidden state of the GRU unit, the final hidden state of the GRU unit is calculated and output through the update gate, reset gate, candidate hidden state and hidden state update of the GRU unit in the first hidden layer of the plankton prediction module. The output layer of the plankton prediction module is used to predict the number of plankton in each ocean layer by using the fully connected units of the output layer of the plankton prediction module based on the final hidden state of the GRU unit.
8. A fishery resource calculation system for a marine ranch according to claim 7, characterized in that, The formula for calculating the overall fish population in each ocean layer is as follows: ; in, Let i be the total number of fish in the i-th ocean layer; The number of fish swarms identified in the i-th ocean layer; Predict the number of fish in the i-th ocean layer; and These are preset weighting factors for the number of fish identified and the number of fish predicted, respectively. The formula for calculating the total number of fish in the marine ranch to be counted is as follows: ; in, The total number of fish in the marine ranch to be counted; Let i be the total number of fish in the i-th ocean layer; i = 1, 2, 3, ..., m, where m is a positive integer, i is the ocean layer number, and m is the total number of ocean layers.
Citation Information
Patent Citations
Marine fish target type identification and distribution prediction method and system
CN116562467A
Deep sea cage culture fish school quantity estimation method based on image sonar
CN117830814A