A high-precision fish feeding status recognition method based on improved P2T
By combining the improved P2T model with the Mamba module and Mixer structure, the problems of insufficient accuracy and poor model generalization ability in fish feeding status recognition are solved, achieving high-precision recognition of fish feeding behavior and supporting automated feeding in intelligent aquaculture.
Patent Information
- Application Number
- CN202411751233.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-12-02
AI Technical Summary
Existing technologies suffer from insufficient accuracy in recognizing fish feeding states, are unable to adapt to complex aquaculture environments, and have poor model generalization capabilities, making them unsuitable for application in real-world aquaculture scenarios.
An improved P2T model, combined with the Mamba module and Mixer structure, is adopted to solve the problems of image information imbalance and similarity through multi-scale feature extraction and global feature fusion, thereby constructing a high-precision fish feeding behavior recognition model.
It improves the accuracy of fish feeding status recognition, enables effective application in complex aquaculture environments, provides automated and precise feeding strategies, and promotes the development of intelligent aquaculture.
Smart Images

Figure CN119672510B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of high-precision fish feeding status recognition, and specifically to a high-precision fish feeding status recognition method based on improved P2T. Background Technology
[0002] With the rapid development of aquaculture, fish feeding control has become a crucial aspect of precision aquaculture. Traditional methods of feeding fish at fixed times and in fixed quantities, whether manually or mechanically, neglect the dynamic changes in fish feeding behavior and intensity with the aquaculture environment, leading to underfeeding or overfeeding. Existing research indicates that fish feeding status plays a vital guiding role in feeding and feed development for aquaculture production processes. Therefore, monitoring fish feeding status is necessary to provide an important theoretical basis for automated, precise feeding.
[0003] Traditional monitoring uses a contact method of manually diving underwater for observation. However, this method is constrained by factors such as high observation cost, high safety risk and easy damage to fish, and has been gradually replaced by non-contact monitoring methods represented by computer vision. In recent years, researchers have gradually carried out research on monitoring the feeding status of fish based on computer vision. Due to the excellent performance of convolutional neural networks (CNN), it has been widely used in many computer vision tasks. Therefore, researchers have begun to introduce CNN into this field. Saminiano et al. [7] used CNN to identify and judge the feeding behavior status of fish. The study showed that it has high recognition accuracy for both feeding and non-feeding states of tilapia. In order to further improve the recognition accuracy, [8] combined 3D-CNN and Recurrent Neural Network (RNN) to capture spatial and temporal series information through time and space flow, respectively, and identified two feeding states of fish.
[0004] While an increasing number of researchers are using computer vision technology to identify and analyze fish feeding behavior, most studies remain at the laboratory stage and cannot be applied to the complex, large-scale aquaculture environments. In actual identification processes, the non-closed nature of fish schools, incomplete outlines, uneven and constantly changing spatial distribution, and high similarity between images at different feeding stages severely impact the accuracy of fish feeding behavior recognition. Furthermore, the extreme imbalance in the number of images at different feeding stages causes the model to favor the type of image with the largest amount of data during training. Therefore, the proposed model, due to its poor accuracy, cannot be transferred to practical aquaculture applications. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a high-precision fish feeding state recognition method based on improved P2T. By introducing the Mamba module, it avoids the problem of loss of global key information that may be caused by multi-level image information. By introducing the P2T basic module, it avoids the problem of lack of fine-grained information in global information. By constructing a Mixer structure, it integrates global and multi-scale information of the image.
[0006] To achieve the above objectives, this invention provides a high-precision fish feeding state recognition method based on improved P2T, comprising:
[0007] S1. Acquire real-time fish farming images and perform preprocessing to obtain real-time fish farming preprocessed images;
[0008] S2. Using the real-time fish farming preprocessed images, establish a fish feeding behavior recognition and classification model based on the improved P2T;
[0009] S3. Obtain high-precision fish feeding status recognition results based on the fish feeding behavior recognition and classification model.
[0010] Preferably, the preprocessing of the acquired real-time fish farming images to obtain real-time fish farming preprocessed images includes:
[0011] Real-time fish farming images are captured using industrial cameras;
[0012] An expanded dataset of real-time fish farming images is obtained by sequentially performing translation transformations and random rotations on the real-time fish farming images.
[0013] Based on the augmented dataset of the real-time fish farming images, saturation changes and random noise additions are performed sequentially to obtain the lighting adjustment dataset of the real-time fish farming images;
[0014] Based on the lighting adjustment dataset of the real-time fish farming images, image occlusion processing is performed using Cutout to obtain the pre-processed real-time fish farming images.
[0015] Furthermore, the establishment of a fish feeding behavior recognition and classification model based on improved P2T using the real-time fish farming preprocessed images includes:
[0016] S2-1. Obtain the embedding features of the real-time fish farming preprocessed image using the real-time fish farming preprocessed image;
[0017] S2-2. Using the embedding features of the real-time fish farming preprocessed image, obtain the fusion features of the real-time fish farming preprocessed image based on the improved P2T;
[0018] S2-3. Establish a fish feeding behavior recognition and classification model using the fusion features of the real-time fish farming preprocessed images.
[0019] Furthermore, the fusion features of the real-time fish farming preprocessed images obtained based on improved P2T using the embedding features of the preprocessed images include:
[0020] Based on the embedding features of the real-time fish farming preprocessed image, local feature extraction processing is performed using P2T multi-scale features to obtain the local features of the real-time fish farming preprocessed image;
[0021] Based on the embedding features of the real-time fish farming preprocessed image, global feature extraction is performed using the Mamba module to obtain the global features of the real-time fish farming preprocessed image;
[0022] The fused features of the real-time fish farming preprocessed image are obtained by fusing the local and global features of the image based on the Mixer structure.
[0023] Furthermore, based on the embedding features of the real-time fish farming preprocessed image, local feature extraction processing based on P2T multi-scale features is performed to obtain the local features of the real-time fish farming preprocessed image, including:
[0024] The two-dimensional embedding features of the real-time fish farming preprocessed image are obtained by reshaping the image using the embedding features.
[0025] Using the two-dimensional embedding features, a pyramid feature map of the real-time fish farming preprocessed image is established based on P2T multi-scale features according to the multi-ratio average pooling layer;
[0026] The pyramid feature map is obtained by performing positional encoding processing using the pyramid feature map based on feature depth separable convolution;
[0027] After flattening and concatenating the pyramid feature encoding map sequentially, the local features of the real-time fish farming preprocessed image are obtained by reshaping based on MHSA calculation.
[0028] The depth of the feature depth separable convolution is 3x3.
[0029] Furthermore, the model for recognizing and classifying fish feeding behavior using the fusion features of the preprocessed real-time fish farming images includes:
[0030] The fusion features of the real-time fish farming preprocessed images are used to obtain the fusion feature classification results of the real-time fish farming preprocessed images according to the classification path;
[0031] A fish feeding behavior recognition and classification model was established using the fusion feature classification results of the real-time fish farming preprocessed images.
[0032] Furthermore, the classification result of the real-time fish farming preprocessed image obtained by utilizing the fusion features of the preprocessed image according to the classification path includes:
[0033] The calculation formula for the updated global features, obtained by adjusting the number of channels of the global features corresponding to the fusion features of the real-time fish farming preprocessed images based on the standard convolution kernel and the number of channels of the local features corresponding to the fusion features of the real-time fish farming preprocessed images, is as follows:
[0034] f g1 =F conv (f g W)
[0035] Wherein, the F conv For convolution operation, W is the learned weight, and f is the learning weight. g1 For updating features of global features, f g The fusion features of preprocessed images for real-time fish farming correspond to global features;
[0036] The matrix cross product result of the global features is obtained by performing matrix cross product processing on the corresponding local features based on the gating mechanism and the fusion features of the real-time fish farming preprocessed image using the updated features of the global features. The calculation formula is as follows:
[0037] f g_final =Gate(f g1 )×f l
[0038] Wherein, Gate is a gating mechanism, f g_final f is the matrix cross product of global features. l For the fusion features corresponding to local features of preprocessed images for real-time fish farming, f g1 Update features for global features;
[0039] The matrix cross product of the local features obtained by performing matrix cross product processing on the fusion features corresponding to the local features of the preprocessed real-time fish farming images based on the gating mechanism and the updated features of the global features is as follows;
[0040] f l_final =Gate(f l )×f g1
[0041] Wherein, Gate is a gating mechanism, and f l_final f is the matrix cross product of local features g1 For updating features of global features, f l The fusion features correspond to local features of preprocessed images for real-time fish farming;
[0042] The formula for calculating the fusion features of the real-time fish farming preprocessed image is as follows: The fusion features are obtained by concatenating the matrix cross product results of the global features and the matrix cross product results of the local features.
[0043] f out =F concat (f g_final f l_final )
[0044] Wherein, the f out The f is a fusion feature for preprocessed images of real-time fish farming. l_final f is the matrix cross product of local features. g_final F is the matrix cross product of global features. concat For splicing processing;
[0045] The fusion features of the real-time fish farming preprocessed images are used to obtain the fusion feature classification results of the real-time fish farming preprocessed images according to the classification path.
[0046] Furthermore, the establishment of a fish feeding behavior recognition and classification model using the fusion feature classification results of the real-time fish farming preprocessed images includes:
[0047] The real-time fish farming images are divided according to a preset ratio to obtain a training set, a validation set, and a test set of real-time fish farming images.
[0048] A basic fish feeding behavior recognition and classification model is established based on the fusion feature classification results of the real-time fish farming images using the training set and validation set of the real-time fish farming images.
[0049] The basic fish feeding behavior recognition and classification model was validated using the test set of the real-time fish farming images to obtain the fish feeding behavior recognition and classification model;
[0050] The preset ratio is 6:2:2.
[0051] Compared with the closest existing technology, the present invention has the following advantages:
[0052] The feeding status of fish plays a crucial guiding role in the feeding and feed development processes of aquaculture production. Monitoring the feeding status of fish can provide an important theoretical basis for automated and precise feeding. However, previous models have been unable to be transferred to practical aquaculture applications due to their poor accuracy. This patent proposes a high-precision fish feeding status recognition model based on P2T-Mamba-Mixer. By using a pyramid pooling module and a multi-scale Mixer structure, the problem of high similarity between images at different feeding stages is solved, enabling the identification of different feeding behavior states. By applying saturation variations and random noise to the training images, and using a cutout method for random masking, the influence of workshop lighting or obstacles on fish images is simulated. This will help train the proposed high-precision fish feeding status recognition model based on augmented datasets and effectively alleviate the problem of poor model generalization ability. This method provides an automated and high-precision feeding strategy for intelligent aquaculture, promoting the healthy and sustainable development of intelligent and intensive aquaculture. Attached Figure Description
[0053] Figure 1 This is a flowchart of a high-precision fish feeding state recognition method based on improved P2T provided by the present invention;
[0054] Figure 2 This is a schematic diagram of the technical route of a high-precision fish feeding state recognition method based on improved P2T provided by the present invention;
[0055] Figure 3 This is a schematic diagram of an image acquisition system for a high-precision fish feeding state recognition method based on an improved P2T method provided by the present invention. Detailed Implementation
[0056] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0057] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, 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.
[0058] Example 1:
[0059] This invention provides a high-precision method for fish feeding status recognition based on improved P2T, such as... Figure 1 As shown, it includes:
[0060] S1. Acquire real-time fish farming images and perform preprocessing to obtain real-time fish farming preprocessed images;
[0061] S2. Using the real-time fish farming preprocessed images, establish a fish feeding behavior recognition and classification model based on the improved P2T;
[0062] S3. Obtain high-precision fish feeding status recognition results based on the fish feeding behavior recognition and classification model.
[0063] S1 specifically includes:
[0064] S1-1. Acquiring real-time fish farming images based on industrial cameras;
[0065] S1-2. Using the real-time fish farming images, perform translation transformation and random rotation processing sequentially to obtain an expanded dataset of real-time fish farming images;
[0066] S1-3. Based on the expanded dataset of the real-time fish farming images, saturation change and random noise addition processing are performed sequentially to obtain the lighting adjustment dataset of the real-time fish farming images;
[0067] S1-4. Based on the light adjustment dataset of the real-time fish farming image, perform image occlusion processing based on Cutout to obtain the real-time fish farming preprocessed image.
[0068] S2 specifically includes:
[0069] S2-1. Obtain the embedding features of the real-time fish farming preprocessed image using the real-time fish farming preprocessed image;
[0070] S2-2. Using the embedding features of the real-time fish farming preprocessed image, obtain the fusion features of the real-time fish farming preprocessed image based on the improved P2T;
[0071] S2-3. Establish a fish feeding behavior recognition and classification model using the fusion features of the real-time fish farming preprocessed images.
[0072] S2-2 specifically includes:
[0073] S2-2-1. Based on the embedding features of the real-time fish farming preprocessed image, local feature extraction processing is performed on the P2T multi-scale features to obtain the local features of the real-time fish farming preprocessed image;
[0074] S2-2-2: Based on the embedding features of the real-time fish farming preprocessed image, global feature extraction processing is performed using the Mamba module to obtain the global features of the real-time fish farming preprocessed image;
[0075] S2-2-3. Using the local and global features of the real-time fish farming preprocessed image, the fusion features of the real-time fish farming preprocessed image are obtained by fusing them based on the Mixer structure.
[0076] S2-2-1 specifically includes:
[0077] S2-2-1-1. The two-dimensional embedding features of the real-time fish farming preprocessed image are obtained by reshaping the image using the embedding features of the real-time fish farming preprocessed image.
[0078] S2-2-1-2. Using the two-dimensional embedding features, a pyramid feature map of the real-time fish farming preprocessed image is established based on the P2T multi-scale features of the multi-ratio average pooling layer.
[0079] S2-2-1-3. Using the pyramid feature map, positional encoding is performed based on feature depth separable convolution to obtain the pyramid feature encoding map;
[0080] S2-2-1-4. After flattening and concatenating the pyramid feature coding map in sequence, the local features of the real-time fish farming preprocessed image are obtained by reshaping based on MHSA calculation.
[0081] The depth of the feature depth separable convolution is 3x3.
[0082] S2-3 specifically includes:
[0083] S2-3-1. Using the fusion features of the real-time fish farming preprocessed image, obtain the fusion feature classification result of the real-time fish farming preprocessed image according to the classification path;
[0084] S2-3-2. Establish a fish feeding behavior recognition and classification model using the fusion feature classification results of the real-time fish farming preprocessed images.
[0085] S2-3-1 specifically includes:
[0086] S2-3-1-1. The calculation formula for the updated global features obtained by adjusting the number of channels of the global features corresponding to the fusion features of the real-time fish farming preprocessed image based on the standard convolution kernel and the number of channels of the local features corresponding to the fusion features of the real-time fish farming preprocessed image is as follows:
[0087] f g1 =F conv (f g W)
[0088] Wherein, the F conv For convolution operation, W is the learned weight, and f is the learning weight. g1 For updating features of global features, fg The fusion features of preprocessed images for real-time fish farming correspond to global features;
[0089] S2-3-1-2. The matrix cross product result of the global feature is obtained by performing matrix cross product processing on the corresponding local features based on the gating mechanism and the fusion features of the real-time fish farming preprocessed image using the updated features of the global feature. The formula is as follows:
[0090] f g_final =Gate(f g1 )×f l
[0091] Wherein, Gate is a gating mechanism, f g_final f is the matrix cross product of global features. l For the fusion features corresponding to local features of preprocessed images for real-time fish farming, f g1 Update features for global features;
[0092] S2-3-1-3, The calculation formula for the matrix cross product of the local features obtained by performing matrix cross product processing on the fusion features corresponding to the local features of the real-time fish farming preprocessed image based on the gating mechanism and the updated features of the global features is as follows;
[0093] f l_final =Gate(f l )×f g1
[0094] Wherein, Gate is a gating mechanism, and f l_final f is the matrix cross product of local features. g1 For updating features of global features, f l The fusion features correspond to local features of preprocessed images for real-time fish farming;
[0095] S2-3-1-4. The calculation formula for obtaining the fusion feature classification result of the real-time fish farming preprocessed image by concatenating the matrix cross product result of the global features and the matrix cross product result of the local features is as follows:
[0096] f out =F concat (f g_final f l_final )
[0097] Wherein, the f out The f is a fusion feature for preprocessed images of real-time fish farming. l_final f is the matrix cross product of local features. g_final F is the matrix cross product of global features. concat For splicing processing;
[0098] The fusion features of the real-time fish farming preprocessed images are used to obtain the fusion feature classification results of the real-time fish farming preprocessed images according to the classification path.
[0099] S2-3-2 specifically includes:
[0100] S2-3-2-1. The real-time fish farming images are divided according to a preset ratio to obtain the training set, validation set and test set of the real-time fish farming images respectively;
[0101] S2-3-2-2. Using the training set and validation set of the real-time fish farming images, a basic fish feeding behavior recognition and classification model is established based on the fusion feature classification results of the real-time fish farming preprocessed images;
[0102] S2-3-2-3. The basic fish feeding behavior recognition and classification model is verified using the test set of the real-time fish farming images to obtain the fish feeding behavior recognition and classification model.
[0103] The preset ratio is 6:2:2.
[0104] In this embodiment, a high-precision fish feeding state recognition method based on improved P2T is described, such as... Figure 2 As shown, the specific technical approach is implemented as follows:
[0105] (1) Build an image acquisition system to obtain real aquaculture images in the workshop, construct a fish feeding behavior recognition dataset, and divide it into training set, validation set and test set in a 6:2:2 ratio;
[0106] (2) Image preprocessing: Image augmentation was used to obtain a total of 196,992 images;
[0107] (3) Input images in batches and obtain embedded features through the image patch embedding layer;
[0108] (4) The above-mentioned embedded features are used to extract local features of the image through the P2T multi-scale feature extraction backbone network, and global features of the image are extracted in parallel through the Mamba module.
[0109] (5) The feature fusion module fuses global features with multi-scale local features;
[0110] (6) The fused features are processed through the classification path to output the classification result;
[0111] (7) Model training is performed based on self-collected datasets;
[0112] Save the trained model and test it on the test dataset to verify its effectiveness.
[0113] In this embodiment, a high-precision fish feeding state recognition method based on improved P2T is described, such as... Figure 3 As shown, the process of constructing the dataset includes:
[0114] The system consists of a single rearing pond with a central cylinder 0.5 meters in diameter. Hikvision industrial cameras and a computer are used for image acquisition and processing, while multi-parameter sensors, including those for dissolved oxygen and temperature, collect water quality data. The computer is located in a control room next to the pond and is connected to the camera via twisted-pair cables to minimize abnormal fish behavior caused by data retrieval and storage operations. The acquired video clips are processed using Python code to extract frames and scale them to 64x64 pixels, then divided into training and testing sets.
[0115] In this embodiment, a high-precision fish feeding state recognition method based on improved P2T is provided, wherein the image preprocessing process includes:
[0116] Given that the dataset consists of real images from aquaculture farms, the data is susceptible to the effects of angle and lighting. To avoid the impact of varying shooting angles and lighting saturation on feeding scene analysis, and to generate a large-scale dataset suitable for Transformer processing, this paper expands the dataset using two angle transformation methods: translation and random rotation. For lighting, saturation variation and random noise addition are employed. Furthermore, to simulate the impact of farm lighting or obstacles on fish images, a portion of the image is occluded using a cutout method, allowing the model to locate the more important parts of the image.
[0117] In this embodiment, a high-precision fish feeding state recognition method based on improved P2T is proposed, wherein the process of multi-scale local feature and global feature extraction includes:
[0118] Images themselves are rich in feature information, including local and global features. Global features reflect the overall properties of an image, such as color distribution and shape contours. They are typically invariant to scale and rotation, capturing the overall structure and content of the image. Local features focus on the characteristics of specific key points or regions in the image, such as corners, edges, or textures. These features help identify specific objects and details in the image and are highly sensitive to local information. To fully exploit the rich feature information inherent in images, we designed a multi-scale local feature extraction module and a global feature extraction module, respectively.
[0119] In the multi-scale local feature module, we introduce the pyramid pooling Transformer (P2T) basic module. First, the embedded features are reshaped into a two-dimensional form. Multiple average pooling layers with different ratios are applied to the reshaped features to obtain pyramid feature maps P1, P2, ..., P... nThe number of pooling layers, n, can be set as needed; different pooling ratios help capture multi-scale contextual information. A 3x3 depthwise separable convolution (DW convolution) is used to encode the pyramid feature map, resulting in the encoded feature map P1. enc P2 enc , ..., P n enc The encoded pyramid feature maps are flattened and concatenated to obtain a new feature sequence P, which is then input into the multi-head self-attention (MHSA) module.
[0120] In the global feature extraction module, considering that Transformer is inefficient when processing long sequences because its computational complexity is proportional to the square of the sequence length, we introduce the recently popular Mamba module to extract global features.
[0121] In this embodiment, a high-precision fish feeding state recognition method based on improved P2T is provided, wherein the process of fusing global and local features includes:
[0122] Multi-scale image information may lead to the loss of key global information, and global image information also needs to be refined by features at different scales. Therefore, we built a Mixer global and local feature fusion module before the input segmentation path to enhance the complementary information between features. The process of this module is as follows:
[0123] First, the global features of the Mamba module are processed through a convolutional layer with a kernel size of 1x1 and a stride of 1. g Number of channels c g Adjusted to the local feature map f at the corresponding scale l Same number of channels c l This step is represented as:
[0124] f g1 =F conv (f g W)
[0125] Among them, F conv This represents the convolution operation, where W is the learnable weight. Then, f... g1 After extracting key information using a gate mechanism, a matrix cross product is performed with multi-scale local features. This operation is represented as:
[0126] f g_final =Gate(f g1 )×f l
[0127] Similarly, the scale features of the P2T module are processed through a gate mechanism (Gate) to extract key information, and then a matrix cross product is performed with the global features. This operation is represented as:
[0128] f l_final =Gate(f l )×f g1
[0129] Ultimately, f g_final with f l_final Perform the splicing operation:
[0130] f out =F concat (f g_final f l_final )
[0131] At this point, the global and local features have completed the convolution, selection, fusion, and splicing steps.
[0132] In this embodiment, a high-precision fish feeding state recognition method based on improved P2T is provided, wherein the model training process includes:
[0133] During training, the label cross-entropy loss function, Adam optimizer, cosine learning rate decayer, L2 regularization, and dropout were used, with dropout set to 0.1 and an initial learning rate of 1e. -5 The batch size was 256, the epochs were 150, and the original image size was reduced to 224×224. We trained the feeding behavior recognition algorithm using the PyTorch framework on three 3090Ti GPUs.
[0134] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0135] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.
[0136] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0137] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A high-precision method for identifying fish feeding status based on improved P2T, characterized in that, include: S1. Acquire real-time fish farming images and perform preprocessing to obtain real-time fish farming preprocessed images; S2. Utilizing the pre-processed real-time fish farming images, a fish feeding behavior recognition and classification model is established based on improved P2T; including: S2-1. Obtain the embedding features of the real-time fish farming preprocessed image using the real-time fish farming preprocessed image; S2-2. Utilizing the embedding features of the real-time fish farming preprocessed images, fusion features of the real-time fish farming preprocessed images are obtained based on improved P2T; including: Based on the embedding features of the preprocessed real-time fish farming image, local feature extraction is performed using P2T multi-scale features to obtain the local features of the preprocessed real-time fish farming image; including: The two-dimensional embedding features of the real-time fish farming preprocessed image are obtained by reshaping the image using the embedding features. Using the two-dimensional embedding features, a pyramid feature map of the real-time fish farming preprocessed image is established based on P2T multi-scale features according to the multi-ratio average pooling layer; The pyramid feature map is obtained by performing positional encoding processing using the pyramid feature map based on feature depth separable convolution; After flattening and concatenating the pyramid feature encoding map sequentially, the local features of the real-time fish farming preprocessed image are obtained by reshaping based on MHSA calculation. Based on the embedding features of the real-time fish farming preprocessed image, global feature extraction is performed using the Mamba module to obtain the global features of the real-time fish farming preprocessed image; The fusion features of the real-time fish farming preprocessed image are obtained by fusing the local and global features of the image based on the Mixer structure. S2-3. Establish a fish feeding behavior recognition and classification model using the fusion features of the real-time fish farming preprocessed images; including: The fusion features of the real-time fish farming preprocessed images are used to obtain the fusion feature classification results of the real-time fish farming preprocessed images according to the classification path; A fish feeding behavior recognition and classification model was established using the fusion feature classification results of the real-time fish farming preprocessed images; S3. Obtain high-precision fish feeding status recognition results based on the fish feeding behavior recognition and classification model.
2. The high-precision fish feeding state recognition method based on improved P2T as described in claim 1, characterized in that, The process of acquiring real-time fish farming images and preprocessing them to obtain real-time fish farming preprocessed images includes: Real-time fish farming images are captured using industrial cameras; An expanded dataset of real-time fish farming images is obtained by sequentially performing translation transformations and random rotations on the real-time fish farming images. Based on the augmented dataset of the real-time fish farming images, saturation changes and random noise additions are performed sequentially to obtain the lighting adjustment dataset of the real-time fish farming images; Based on the lighting adjustment dataset of the real-time fish farming images, image occlusion processing is performed using Cutout to obtain the pre-processed real-time fish farming images.
3. The high-precision fish feeding state recognition method based on improved P2T as described in claim 1, characterized in that, The feature depth can be used to separate the convolution depth of 3x3.
4. The high-precision fish feeding state recognition method based on improved P2T as described in claim 3, characterized in that, The classification results of the real-time fish farming preprocessed images obtained by utilizing the fusion features of the preprocessed images according to the classification path include: Based on the number of channels corresponding to the local features of the fusion features in the real-time fish farming preprocessed image, and using a standard convolution kernel, the calculation formula for the updated global features is as follows: , Wherein, the F conv For convolution operation, W is the learned weight, and f is the learning weight. g1 For updating features of global features, f g The fusion features of preprocessed images for real-time fish farming correspond to global features; The matrix cross product result of the global features is obtained by performing matrix cross product processing on the corresponding local features based on the gating mechanism and the fusion features of the real-time fish farming preprocessed image using the updated features of the global features. The calculation formula is as follows: , Wherein, Gate is a gating mechanism, f g_final f is the matrix cross product of global features. l For the fusion features corresponding to local features of preprocessed images for real-time fish farming, f g1 Update features for global features; The matrix cross product of the local features obtained by performing matrix cross product processing on the fusion features corresponding to the local features of the preprocessed real-time fish farming images based on the gating mechanism and the updated features of the global features is as follows; , Wherein, Gate is a gating mechanism, and f l_final f is the matrix cross product of local features. g1 For updating features of global features, f l The fusion features correspond to local features of preprocessed images for real-time fish farming; The formula for calculating the fusion features of the real-time fish farming preprocessed image is as follows: The fusion features are obtained by concatenating the matrix cross product results of the global features and the matrix cross product results of the local features. , Wherein, the f out The f is a fusion feature for preprocessed images of real-time fish farming. l_final f is the matrix cross product of local features. g_final F is the matrix cross product of global features. concat For splicing processing; The fusion features of the real-time fish farming preprocessed images are used to obtain the fusion feature classification results of the real-time fish farming preprocessed images according to the classification path.
5. The high-precision fish feeding state recognition method based on improved P2T as described in claim 1, characterized in that, The model for recognizing and classifying fish feeding behavior using the fusion feature classification results of the real-time fish farming preprocessed images includes: The real-time fish farming preprocessed images are divided according to a preset ratio to obtain the training set, validation set and test set of the real-time fish farming preprocessed images; A basic fish feeding behavior recognition and classification model is established based on the fusion feature classification results of the real-time fish farming preprocessed images using the training set and validation set of the real-time fish farming preprocessed images. The basic fish feeding behavior recognition and classification model was validated using a test set of the real-time fish farming preprocessed images to obtain the fish feeding behavior recognition and classification model. The preset ratio is 6:2:2.
Citation Information
Patent Citations
Underwater fish body posture dynamic identification method and device
CN114821778A
Deep learning fish school feeding state identification method and device
CN115497034A