Double-stage fish feeding behavior discrimination method and system

Through a two-stage method, the improved YOLOv8n multi-scale target detection and lightweight recognition model are used to solve the data redundancy and model complexity problems in fish feeding status identification, achieving efficient and accurate fish feeding status discrimination, which is suitable for industry application.

CN118587767APending Publication Date: 2024-09-03DALIAN NATIONALITIES UNIVERSITY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410731322.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Existing deep learning recognition models have problems with large amounts of data and redundant information in identifying fish feeding states. The image background and water surface reflection noise affect the accuracy of the algorithm. The model structure design is complex, the number of parameters is large, and it is difficult to implement in the industry.

Method used

A two-stage fish feeding behavior discrimination method is designed. The original video is converted into fish distribution data by using the improved YOLOv8n multi-scale target detection model in the target detection stage, and a lightweight recognition model is used to extract the fish distribution in the recognition stage. Features, simplify the model structure, reduce the number of parameters, and improve the inference speed.

Benefits of technology

Redundant information is effectively removed, the algorithm accuracy and reasoning speed are improved, and the feeding status of fish is accurately determined, making it suitable for industrial deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587767A
    Figure CN118587767A
Patent Text Reader

Abstract

The invention discloses a two-stage fish ingestion behavior discrimination method and system, and relates to the technical field of smart fishery, and the method comprises the steps: firstly building a multi-scale target detection model capable of being re-parameterized based on a fish high-angle shot video, taking a culture pond as a whole, taking a single fish as a key point in the whole, and obtaining the precise position information of the single fish; an original fish ingestion video is converted into fish school distribution data composed of single fish positions, and the problems that a large amount of data needs to be processed for original video data, redundant information is much, and image background and water surface reflection noise affect algorithm accuracy are solved. Meanwhile, the training and reasoning process of the target detection model is decoupled, complex network training is used, the detection precision is guaranteed, reasoning is conducted through a simplified model, and the reasoning speed is increased; and then, based on the obtained fish school spatial distribution data, designing a lightweight identification model, extracting fish school distribution characteristics in different feeding states, and realizing accurate judgment of the fish feeding states.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart fishery technology, and in particular to a two-stage fish feeding behavior identification method and system. Background Art

[0002] With the continuous development of new generation information technologies such as artificial intelligence, big data, and the Internet of Things, intelligent and precision farming has become the mainstream direction of scientific and technological innovation in my country's fish farming industry. Among the many fish farming models, circulating water factory farming has the advantages of high production efficiency, small footprint, advanced production technology, and controllable farming process, and has become the dominant direction of the development of many types of fish farming. In the process of factory farming, feeding is a key factor in determining fish growth and farming costs. Scientific, precise, and intelligent feeding is an important prerequisite for ensuring fish health and reducing costs. Accurate identification of fish feeding status is the main basis for realizing intelligent feeding. Today's feeding process mainly relies on manual experience to judge the feeding status of fish, and then determines the number of feedings and the amount of single feeding. There are disadvantages such as large errors, low efficiency, high cost, and serious dependence on manual experience. At the same time, with the continuous increase in labor costs, the professional population engaged in fish farming is becoming increasingly scarce and aging. Therefore, studying a new method with high precision, high efficiency, low cost, and automatic and accurate identification of fish feeding status without manual participation is an urgent need for the development of precision and intelligent fisheries.

[0003] Computer vision technology uses a camera imaging system to collect videos and images of the target area, detects targets in the video or image through computer vision algorithms, and obtains key information about the target. It is a non-invasive, continuous online perception technology that has been used in many aquaculture fields. The rapid development of deep learning technology in recent years has brought computer vision technology to a new level. Compared with traditional visual methods, computer vision methods based on deep learning can realize automatic extraction of video or image features without human intervention, and have the advantages of high accuracy and high efficiency.

[0004] At present, the fish behavior analysis method based on computer vision mainly detects fish single targets first, then tracks single targets, and finally analyzes the behavior according to the trajectory distribution of fish single targets.

[0005] Many existing technologies use deep learning techniques for fish target detection and tracking:

[0006] In the field of fish target detection, for example, a method for detecting redfin pufferfish that takes the receptive field into consideration is proposed by integrating MobileNetv1 and YOLOv3. This method improves the detection accuracy while reducing the model calculation scale and improving the operation speed. Another example is a target detection model that integrates two R-CNN networks, which has higher accuracy and faster operation speed than the classic R-CNN model. Another example is a target detection model based on RIRD-YOLOv3, which can achieve high-precision real-time detection of fish targets.

[0007] In the field of fish target tracking, for example, a new optical flow tracking model is proposed using video data to achieve fish body tracking and pressure behavior recognition. Another example is an underwater turbid image enhancement method that first improves image clarity, then designs a target detection and tracking method based on the fusion of Retinex network and YOLO to achieve single fish target tracking. The above method decomposes the fish behavior analysis target, first detects the single fish target, then tracks the target, obtains the fish school movement trajectory, and finally analyzes the trajectory distribution to obtain the behavior result. Some scholars also classify fish behavior analysis as a video recognition task, classify videos of different fish behaviors, and achieve behavior discrimination. For example, a deep convolutional neural network (CNN) is used to analyze the collected image data to determine whether feeding is needed. Another example is the identification of four types of fish feeding desires ("none", "weak", "medium" and "strong") based on the LeNet5 deep learning architecture. For example, a dual attention mechanism model is established based on the EfficientNet-B2 network to extract local and global spatial features of the target fish image, making up for the deficiency of the traditional CNN model that can only extract local features of the image, and effectively improving the recognition accuracy of the model. The above methods all analyze the feeding state of fish based on each frame of the video, focusing only on the spatial dimension features of the image data, and ignoring the temporal features between each frame of the image. Therefore, some existing technologies directly analyze the fish feeding video, such as extracting the spatial features of each frame of the video data and the temporal features represented by the optical flow map between each frame of the image based on the C3D model, and identifying the feeding state of the fish. For example, a dual-stream network model is established to process underwater video data, using the 2DCNN model to extract the spatial features of each frame of the video, and using the 3DCNN model to extract the temporal features of the optical flow map of each frame of the video. Finally, the spatiotemporal dimension information is integrated, and the salmon feeding state is identified based on the LSTM model, and the two states of "eating" and "not eating" of salmon are successfully identified.

[0008] In the future, the industrialization of the deep learning-based fish feeding behavior identification method will require the model to not only provide highly reliable results and strong generalization capabilities, but also have a simple structure, small amount of computation, and be easy to deploy on edge devices and operate efficiently.

[0009] According to the above industrialization goals, there are still several key problems that need to be solved in the existing deep learning recognition models: 1) Directly using the original video for feeding status recognition requires a large amount of data to be processed, with a lot of redundant information, and the image background and water surface reflection noise will seriously affect the accuracy of the algorithm; 2) Establishing a separate model for feeding status recognition may seem simple, but in order to effectively extract the spatiotemporal features of the video and achieve accurate recognition, the model scale has to be increased, resulting in complex model structure design, a large number of parameters, low execution efficiency, and difficulty in industrial implementation. Summary of the invention

[0010] In view of this, the present invention provides a two-stage fish feeding behavior discrimination method and system. First, a target detection network is designed to obtain the spatial distribution data of fish schools, remove the original video data volume and redundant interference information, and then a lightweight recognition network is designed to solve the problem of only establishing a model for feeding state recognition, resulting in complex model structure design, large number of parameters, and difficulty in industrial implementation.

[0011] To this end, the present invention provides the following technical solutions:

[0012] On the one hand, the present invention discloses a two-stage fish feeding behavior discrimination method, the method comprising a target detection stage and a target recognition stage; the target detection stage converts the original fish feeding video into fish school distribution data composed of the positions of individual fish, comprising the following steps:

[0013] Get bird's-eye view videos of fish;

[0014] Based on the overhead video of the fish, the breeding pond is taken as a whole, and the individual fish is regarded as the key point in the whole, and a re-parameterized multi-scale target detection model based on the improved YOLOv8n is established and trained; the improvement includes: the feature extraction module in YOLOv8n adopts a multi-scale feature extraction module with re-parameters, and the multi-scale feature extraction module with re-parameters includes: a first convolution, data blocking, a first parameterized convolution, a splicing operation, and a second convolution are connected in sequence, the second parameterized convolution is located between the first parameterized convolution and the splicing operation, the third parameterized convolution is located between the second parameterized convolution and the splicing operation, and the output end of the first convolution is connected to the input end of the splicing operation;

[0015] Based on the trained multi-scale target detection model, accurate single fish position information is obtained, and the fish feeding video is converted into fish school distribution data composed of single fish positions;

[0016] The target recognition stage extracts the distribution characteristics of fish schools under different feeding states based on the obtained fish school spatial distribution data to achieve accurate identification of the fish feeding state, including the following steps:

[0017] Based on the obtained fish school spatial distribution data, a lightweight recognition model is designed; the lightweight recognition model includes: a convolution, four residual layers and a classification layer; each residual layer includes two residual blocks, and the structure of each residual block includes: multiple convolutions and a skip connection;

[0018] Based on the lightweight recognition model, the distribution characteristics of fish schools under different feeding states are extracted to achieve accurate discrimination of the feeding state of fish.

[0019] Furthermore, the structures of the first parameterized convolution, the second parameterized convolution and the third parameterized convolution are the same, including: two parts, training and reasoning. The training part consists of four branches added together and then a SiLU activation function operation is performed. The first branch is a 5×5 convolution and batch normalization; the second branch is a 3×3 convolution and batch normalization; the third branch is a 1×1 convolution and batch normalization; the reasoning part is a 5×5 convolution followed by a SiLU activation function operation.

[0020] Furthermore, the multi-scale object detection model established by training includes:

[0021] The training and reasoning processes of the multi-scale target detection model are decoupled. During the training process, the network structure of the training part is used to extract multi-scale features; during the reasoning process, the network structure of the training part is re-parameterized into a convolution module of a single size.

[0022] Furthermore, the network structure of the training part is re-parameterized into a convolutional module of a single size, including:

[0023] Remove the batch normalization in each of the four branches of the training part. The simplified first branch is 5×5 convolution, the simplified second branch is 3×3 convolution, the simplified third branch is 1×1 convolution, and the simplified fourth branch is skip connection.

[0024] The convolution parameters of each simplified branch are modified to 5×5, and the skip connection of the fourth branch is also modified to 5×5 convolution, so that the four branches have the same convolution parameters;

[0025] The four branches are merged into a 5×5 convolution.

[0026] Furthermore, the improvement also includes: the neck of the YOLOv8n model includes: feature pyramid FPN and path aggregation network PAN structure, wherein in the structure of PAN, from top to bottom, there are convolution, splicing operation and multi-scale feature extraction module with reset parameters.

[0027] Furthermore, the improvement also includes: converting the original data structure [B, C, H, W] into [B, 1, N, 2], where B is batch_size, C is the number of image channels, H and W are the length and width of the image, N is the number of individual fish in the school of fish, and 2 is the (x, y) coordinates of each center point of the detection result.

[0028] In another aspect, the present invention further discloses a two-stage fish feeding behavior discrimination system, the system comprising a target detection module and a target recognition module; the target detection module converts the original fish feeding video into fish school distribution data composed of the positions of individual fish, including:

[0029] The video acquisition submodule is used to acquire fish bird's-eye view videos;

[0030] The first model building submodule is used to establish and train a re-parameterizable multi-scale target detection model based on the improved YOLOv8n based on the overhead video of the fish, taking the breeding pond as a whole and considering the individual fish as the key point in the whole; the improvement includes: the feature extraction module in YOLOv8n adopts a re-parameterizable multi-scale feature extraction module, the re-parameterizable multi-scale feature extraction module includes: a first convolution, data blocking, a first parameterized convolution, a splicing operation, and a second convolution are connected in sequence, the second parameterized convolution is located between the first parameterized convolution and the splicing operation, the third parameterized convolution is located between the second parameterized convolution and the splicing operation, and the output end of the first convolution is connected to the input end of the splicing operation;

[0031] The target detection submodule obtains accurate single fish position information based on the trained multi-scale target detection model, and converts the fish feeding video into fish school distribution data composed of single fish positions;

[0032] The target recognition module extracts the distribution characteristics of fish schools under different feeding states based on the obtained fish school spatial distribution data to achieve accurate identification of the fish feeding state, including:

[0033] The second model building submodule is used to design a lightweight recognition model based on the obtained fish school spatial distribution data; the lightweight recognition model includes: a convolution, four residual layers and a classification layer; each residual layer includes two residual blocks, and the structure of each residual block includes: multiple convolutions and a skip connection;

[0034] The discriminant submodule is used to extract the distribution characteristics of fish schools under different feeding states based on the lightweight recognition model, so as to achieve accurate discrimination of the feeding state of fish.

[0035] Furthermore, the structures of the first parameterized convolution, the second parameterized convolution and the third parameterized convolution are the same, including: two parts, training and reasoning. The training part consists of four branches added together and then a SiLU activation function operation is performed. The first branch is a 5×5 convolution and batch normalization; the second branch is a 3×3 convolution and batch normalization; the third branch is a 1×1 convolution and batch normalization; the reasoning part is a 5×5 convolution followed by a SiLU activation function operation.

[0036] Furthermore, when training the established multi-scale object detection model, the first model building submodule includes:

[0037] Decoupling the training and reasoning processes of the multi-scale object detection model, wherein during the training process, the network structure of the training part is used to extract multi-scale features; during the reasoning process, the network structure of the training part is re-parameterized into a convolutional module of a single size;

[0038] The network structure of the training part is re-parameterized into a convolutional module of a single size, including:

[0039] Remove the batch normalization in each of the four branches of the training part. The simplified first branch is 5×5 convolution, the simplified second branch is 3×3 convolution, the simplified third branch is 1×1 convolution, and the simplified fourth branch is skip connection.

[0040] The convolution parameters of each simplified branch are modified to 5×5, and the skip connection of the fourth branch is also modified to 5×5 convolution, so that the four branches have the same convolution parameters;

[0041] The four branches are merged into a 5×5 convolution.

[0042] Furthermore, when establishing a multi-scale target detection model, the first model building submodule also improves YOLOv8n: the neck of the YOLOv8n model includes: a feature pyramid FPN and a path aggregation network PAN structure, wherein, in the structure of PAN, from top to bottom, there are convolution, splicing operations and a multi-scale feature extraction module with reset parameters.

[0043] Advantages and positive effects of the present invention: In the present invention, firstly, based on the fish overhead video, the breeding pond is taken as a whole, and the individual fish is regarded as the key point in the whole, a re-parameterizable multi-scale target detection model is established to obtain accurate individual fish position information, and the original fish feeding video is converted into fish school distribution data composed of individual fish positions, so as to solve the problem that the original video data needs to process a large amount of data, there is a lot of redundant information, and the image background and water surface reflection noise affect the accuracy of the algorithm. At the same time, the target detection model training and reasoning process are decoupled, complex network training is used to ensure the detection accuracy, and simplified model reasoning is used to improve the reasoning speed; then, based on the obtained fish school spatial distribution data, a lightweight recognition model is designed to extract the distribution characteristics of fish schools under different feeding states, so as to achieve accurate discrimination of fish feeding states. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0045] Figure 1 It is an overall framework diagram of the fish feeding behavior discrimination model in an embodiment of the present invention;

[0046] Figure 2 Schematic diagram of the network structure of a multi-scale feature extraction module with resettable parameters in an embodiment of the present invention;

[0047] Figure 3 is a schematic diagram of a re-parameterization process in an embodiment of the present invention;

[0048] Figure 4 is a schematic diagram of a re-parameterization sub-process in an embodiment of the present invention;

[0049] Figure 5 Schematic diagram of the network structure of the lightweight recognition model in an embodiment of the present invention. DETAILED DESCRIPTION

[0050] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0051] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0052] The essence of fish feeding state recognition is to analyze the different temporal and spatial distribution patterns of fish schools during the feeding process. Based on this idea, the present invention provides a two-stage fish feeding behavior discrimination method.

[0053] like Figure 1 As shown, a two-stage fish feeding behavior discrimination method in an embodiment of the present invention includes two stages: target detection and target recognition.

[0054] (i) Target detection stage: Convert the original fish feeding video into fish school distribution data consisting of the positions of individual fish.

[0055] S11, obtaining a bird's-eye view video of fish;

[0056] Among them, the overhead video of fish includes the breeding pond and multiple fish in the breeding pond, and the fish may be of different species.

[0057] S12. Based on the fish bird's-eye view video, a re-parameterizable multi-scale target detection model is established;

[0058] Taking the breeding pond as a whole and individual fish as the key point in the whole, a re-parameterizable multi-scale target detection model is established.

[0059] The process of establishing a reparameterizable multi-scale object detection model specifically includes: first, based on the YOLOv8n model architecture (YOLOv8n is a version in the YOLOv8 object detection model series, designed to provide fast and accurate object detection capabilities. YOLOv8n is a small and fast model in the YOLOv8 series, suitable for applications that require fast processing and high accuracy.), a reparameterizable multi-scale feature extraction module is designed to replace the 3×3 convolution module in the original model.

[0060] Specifically, the improved target detection model architecture includes: backbone, neck and head.

[0061] Backbone is the main network of the model, which consists of five convolutional layers. The first layer is a convolution Conv, the second, third and fourth layers are a convolution Conv and a multi-scale feature extraction module RepC2f with reset parameters, and the fifth layer is a convolution Conv, a multi-scale feature extraction module RepC2f with reset parameters and a spatial pyramid pooling fast module SPPF. By increasing the number of convolutional layers, feature maps with different receptive fields of P1-P5 are extracted, and the receptive fields gradually increase.

[0062] Neck presents a feature pyramid FPN and a path aggregation network PAN structure. The FPN layer conveys strong semantic features from top to bottom, while PAN conveys strong positioning features from bottom to top. They work together in pairs to aggregate features of different detection layers from different backbone layers. Among them, in the structure of FPN, from bottom to top, there are the first upsampling module Upsample, the first concatenation operation Concat, the first RepC2f, the second Upsample, the second Concat, and the second RepC2f. Among them, the first Upsample is connected to the SPPF in the Backbone, the first Concat is connected to the RepC2f of the fourth layer in the Backbone, and the second Concat is connected to the RepC2f of the third layer in the Backbone. In the structure of PAN, from top to bottom, there are convolution Conv, the third Concat, and RepC2f; the third Concat is connected to the first RepC2f. In the present invention, the model detector design is simplified by analyzing the characteristics of the fish feeding data set, such as Figure 1 As shown in FIG. 1 , the dotted red module represents the part existing in the original YOLOv8n model but simplified in the present invention. Through this design, the model parameters and the amount of calculation can be further reduced without reducing the detection accuracy.

[0063] The Head includes a first detector Detect and a second Detect, the first Detect is connected to the second RepC2f, and the second Detect is connected to the third RepC2f.

[0064] in:

[0065] RepC2f includes: a first Conv, a data block Chunk, a first RepConv, a Concat, and a second Conv connected in sequence, the second RepConv is located between the first RepConv and Concat, the third RepConv is located between the second RepConv and Concat, and the output end of the first Conv is connected to the input end of Concat.

[0066] Conv includes: two-dimensional convolution Conv2d, batch normalization BN, and Swish activation function SiLU.

[0067] RepConv includes two parts: training and inference. The training part consists of four branches added together and then a SiLU operation is performed. The four branches are: 5×5Conv2d and BN, 3×3Conv2d and BN, 1×1Conv2d and BN, BN; the inference part is 5×5Conv2d followed by a SiLU operation.

[0068] Detect consists of two branches, one branch is Conv, Conv, Conv2d connected in sequence, and the loss function is the bounding box loss Bbox Loss; the other branch is Conv, Conv, Conv2d connected in sequence, and the loss function is the classification loss ClsLoss.

[0069] S13, training and establishing a multi-scale target detection model;

[0070] Decouple the target detection model training and reasoning process, use complex network training to ensure detection accuracy, and use simplified model reasoning to improve reasoning speed.

[0071] like Figure 2 As shown in the figure, the reparameterized multi-scale feature extraction module RepC2f can decouple the model training and inference processes. During training, a multi-scale feature extraction module (5×5Conv2d, 3×3Conv2d, 1×1Conv2d) is used to ensure the quality of feature extraction; during inference, it is reparameterized into a single 5×5 convolution module (5×5Conv2d) to reduce model parameters and calculations and improve inference speed. The reparameterization process is shown in the figure. Figure 3-4 As shown in the figure, first, the BN in each of the four branches in the training part (5×5Conv2d and BN, 3×3Conv2d and BN, 1×1Conv2d and BN, BN) is removed and simplified to 5×5Conv2d, 3×3Conv2d, 1×1Conv2d and skip connection; next, the convolution parameters of each branch are modified to 5×5, and the skip connection of the fourth branch is also modified to 5×5Conv2d, so that the four branches are modified to convolutions with the same parameters; finally, the four branches are merged into one 5×5Conv2d.

[0072] S14, obtaining accurate single fish position information based on a multi-scale target detection model, and converting the original fish feeding video into fish school distribution data composed of single fish positions;

[0073] The improved YOLOv8n model can realize fast and accurate detection of individual fish in a school of fish, that is, convert the original data structure [B, C, H, W] into [B, 1, N, 2], where B is batch_size, C is the number of image channels, H and W are the length and width of the image, N is the number of individual fish in the school of fish, and 2 is the (x, y) coordinates of each center point of the detection result. This solves the problem that the original video data needs to process a large amount of data, has a lot of redundant information, and the image background and water surface reflection noise affect the accuracy of the algorithm.

[0074] (ii) Target recognition stage: Based on the obtained spatial distribution data of fish schools, the distribution characteristics of fish schools under different feeding states are extracted to achieve accurate judgment of the feeding state of fish.

[0075] S21. Design a lightweight identification model based on the obtained fish school spatial distribution data;

[0076] According to the simplified data volume, a lightweight recognition model is designed, such as Figure 5 As shown, the result of Detect is input into the lightweight recognition model Classification for classification. Classification includes: a 3×1Conv, four residual layers and a classification layer Cls; each residual layer includes two residual blocks, and the structure of each residual block includes: 3×1Conv, 1×3Conv and a skip connection (directly from the input to the output of the residual block).

[0077] S22. Extract the distribution characteristics of fish schools under different feeding states based on the lightweight recognition model to achieve accurate judgment of the feeding state of fish.

[0078] In the above embodiment, firstly, based on the fish bird's-eye video, the breeding pond is taken as a whole, and the individual fish is regarded as the key point in the whole, a re-parameterizable multi-scale target detection model is established to obtain accurate individual fish position information, and the original fish feeding video is converted into fish school distribution data composed of individual fish positions, so as to solve the problem that the original video data needs to process a large amount of data, has a lot of redundant information, and the image background and water surface reflection noise affect the accuracy of the algorithm. At the same time, the training and reasoning process of the target detection model are decoupled, and complex network training is used to ensure the detection accuracy, and simplified model reasoning is used to improve the reasoning speed; then, based on the obtained fish school spatial distribution data, a lightweight recognition model is designed to extract the distribution characteristics of fish schools under different feeding states, so as to achieve accurate discrimination of the fish feeding state.

[0079] Corresponding to the two-stage fish feeding behavior discrimination method in the above embodiment, the embodiment of the present invention further provides a two-stage fish feeding behavior discrimination system, which includes a target detection module and a target recognition module; the target detection module converts the original fish feeding video into fish school distribution data composed of the positions of individual fish, including:

[0080] The video acquisition submodule is used to acquire fish bird's-eye view videos;

[0081] The first model building submodule is used to establish and train a re-parameterizable multi-scale target detection model based on the improved YOLOv8n based on the overhead video of the fish, taking the breeding pond as a whole and considering the individual fish as the key point in the whole; the improvement includes: the feature extraction module in YOLOv8n adopts a re-parameterizable multi-scale feature extraction module, the re-parameterizable multi-scale feature extraction module includes: a first convolution, data blocking, a first parameterized convolution, a splicing operation, and a second convolution are connected in sequence, the second parameterized convolution is located between the first parameterized convolution and the splicing operation, the third parameterized convolution is located between the second parameterized convolution and the splicing operation, and the output end of the first convolution is connected to the input end of the splicing operation;

[0082] The target detection submodule obtains accurate single fish position information based on the trained multi-scale target detection model, and converts the fish feeding video into fish school distribution data composed of single fish positions;

[0083] The target recognition module extracts the distribution characteristics of fish schools under different feeding states based on the obtained fish school spatial distribution data to achieve accurate identification of the fish feeding state, including:

[0084] The second model building submodule is used to design a lightweight recognition model based on the obtained fish school spatial distribution data; the lightweight recognition model includes: a convolution, four residual layers and a classification layer; each residual layer includes two residual blocks, and the structure of each residual block includes: multiple convolutions and a skip connection;

[0085] The discriminant submodule is used to extract the distribution characteristics of fish schools under different feeding states based on the lightweight recognition model, so as to achieve accurate discrimination of the feeding state of fish.

[0086] As for the two-stage fish feeding behavior discrimination system of the embodiment of the present invention, since it corresponds to the two-stage fish feeding behavior discrimination method in the above embodiment, the description is relatively simple. For relevant similarities, please refer to the description of the two-stage fish feeding behavior discrimination method in the above embodiment, which will not be described in detail here.

[0087] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A two-stage fish feeding behavior discrimination method, characterized in that: The method comprises a target detection stage and a target recognition stage; the target detection stage converts the original fish feeding video into fish school distribution data composed of the positions of individual fish, and comprises the following steps: Get bird's-eye view videos of fish; Based on the overhead video of the fish, the breeding pond is taken as a whole, and the individual fish is regarded as the key point in the whole, and a re-parameterized multi-scale target detection model based on the improved YOLOv8n is established and trained; the improvement includes: the feature extraction module in YOLOv8n adopts a multi-scale feature extraction module with re-parameters, and the multi-scale feature extraction module with re-parameters includes: a first convolution, data blocking, a first parameterized convolution, a splicing operation, and a second convolution are connected in sequence, the second parameterized convolution is located between the first parameterized convolution and the splicing operation, the third parameterized convolution is located between the second parameterized convolution and the splicing operation, and the output end of the first convolution is connected to the input end of the splicing operation; Based on the trained multi-scale target detection model, accurate single fish position information is obtained, and the fish feeding video is converted into fish school distribution data composed of single fish positions; The target recognition stage extracts the distribution characteristics of fish schools under different feeding states based on the obtained fish school spatial distribution data to achieve accurate identification of the fish feeding state, including the following steps: Based on the obtained fish school spatial distribution data, a lightweight recognition model is designed; the lightweight recognition model includes: a convolution, four residual layers and a classification layer; each residual layer includes two residual blocks, and the structure of each residual block includes: multiple convolutions and a skip connection; Based on the lightweight recognition model, the distribution characteristics of fish schools under different feeding states are extracted to achieve accurate discrimination of the feeding state of fish.

2. A two-stage fish feeding behavior discrimination method according to claim 1, characterized in that: The structures of the first parameterized convolution, the second parameterized convolution and the third parameterized convolution are the same, including: training and reasoning. The training part consists of four branches added together and then the SiLU activation function operation is performed. The first branch is 5×5 convolution and batch normalization; the second branch is 3×3 convolution and batch normalization; the third branch is 1×1 convolution and batch normalization; the reasoning part is 5×5 convolution followed by the SiLU activation function operation.

3. A two-stage fish feeding behavior discrimination method according to claim 2, characterized in that: The multi-scale object detection model established by training includes: The training and reasoning processes of the multi-scale target detection model are decoupled. During the training process, the network structure of the training part is used to extract multi-scale features; during the reasoning process, the network structure of the training part is re-parameterized into a convolution module of a single size.

4. A two-stage fish feeding behavior discrimination method according to claim 3, characterized in that: Re-parameterizing the network structure of the training portion into a convolutional module of a single size, including: Remove the batch normalization in each of the four branches of the training part. The simplified first branch is 5×5 convolution, the simplified second branch is 3×3 convolution, the simplified third branch is 1×1 convolution, and the simplified fourth branch is skip connection. The convolution parameters of each simplified branch are modified to 5×5, and the skip connection of the fourth branch is also modified to 5×5 convolution, so that the four branches have the same convolution parameters; The four branches are merged into a 5×5 convolution.

5. A two-stage fish feeding behavior discrimination method according to any one of claims 1 to 4, characterized in that: The improvements also include: the neck of the YOLOv8n model includes: feature pyramid FPN and path aggregation network PAN structure, wherein in the structure of PAN, from top to bottom, there are convolution, splicing operation and multi-scale feature extraction module with reset parameters.

6. A two-stage fish feeding behavior discrimination method according to any one of claims 1 to 4, characterized in that: The improvement also includes: converting the original data structure [B, C, H, W] to [B, 1, N, 2], where B is batch_size, C is the number of image channels, H and W are the length and width of the image, N is the number of individual fish in the school of fish, and 2 is the (x, y) coordinates of each center point of the detection result.

7. A two-stage fish feeding behavior discrimination system, characterized in that: The system includes a target detection module and a target recognition module; The target detection module converts the original fish feeding video into fish school distribution data consisting of the positions of individual fish, including: The video acquisition submodule is used to acquire fish bird's-eye view videos; The first model building submodule is used to establish and train a re-parameterizable multi-scale target detection model based on the improved YOLOv8n based on the overhead video of the fish, taking the breeding pond as a whole and considering the individual fish as the key point in the whole; the improvement includes: the feature extraction module in YOLOv8n adopts a re-parameterizable multi-scale feature extraction module, the re-parameterizable multi-scale feature extraction module includes: a first convolution, data blocking, a first parameterized convolution, a splicing operation, and a second convolution are connected in sequence, the second parameterized convolution is located between the first parameterized convolution and the splicing operation, the third parameterized convolution is located between the second parameterized convolution and the splicing operation, and the output end of the first convolution is connected to the input end of the splicing operation; The target detection submodule obtains accurate single fish position information based on the trained multi-scale target detection model, and converts the fish feeding video into fish school distribution data composed of single fish positions; The target recognition module extracts the distribution characteristics of fish schools under different feeding states based on the obtained fish school spatial distribution data to achieve accurate identification of the fish feeding state, including: The second model building submodule is used to design a lightweight recognition model based on the obtained fish school spatial distribution data; the lightweight recognition model includes: a convolution, four residual layers and a classification layer; each residual layer includes two residual blocks, and the structure of each residual block includes: multiple convolutions and a skip connection; The discriminant submodule is used to extract the distribution characteristics of fish schools under different feeding states based on the lightweight recognition model, so as to achieve accurate discrimination of the feeding state of fish.

8. A two-stage fish feeding behavior discrimination system according to claim 7, characterized in that: The structures of the first parameterized convolution, the second parameterized convolution and the third parameterized convolution are the same, including: training and reasoning. The training part consists of four branches added together and then the SiLU activation function operation is performed. The first branch is 5×5 convolution and batch normalization; the second branch is 3×3 convolution and batch normalization; the third branch is 1×1 convolution and batch normalization; the reasoning part is 5×5 convolution followed by the SiLU activation function operation.

9. A two-stage fish feeding behavior discrimination system according to claim 8, characterized in that: The first model building submodule includes: Decoupling the training and reasoning processes of the multi-scale object detection model, wherein during the training process, the network structure of the training part is used to extract multi-scale features; during the reasoning process, the network structure of the training part is re-parameterized into a convolutional module of a single size; The network structure of the training part is re-parameterized into a convolution module of a single size, including: Remove the batch normalization in each of the four branches of the training part. The simplified first branch is 5×5 convolution, the simplified second branch is 3×3 convolution, the simplified third branch is 1×1 convolution, and the simplified fourth branch is skip connection. The convolution parameters of each simplified branch are modified to 5×5, and the skip connection of the fourth branch is also modified to 5×5 convolution, so that the four branches have the same convolution parameters; The four branches are merged into a 5×5 convolution.

10. A two-stage fish feeding behavior discrimination system according to claim 8, characterized in that: When establishing a multi-scale target detection model, the first model building submodule also improves YOLOv8n: the neck of the YOLOv8n model includes: a feature pyramid FPN and a path aggregation network PAN structure, wherein the PAN structure includes convolution, splicing operations, and a multi-scale feature extraction module with reset parameters from top to bottom.

Citation Information

Cited By

  • High-precision fish feeding state identification method based on improved P2T

    CN119672510A