Automatic detection method for feeding behavior of fish shoal under complex background and feeding control system
By using the improved PM-YOLO model and employing a parallel multi-branch structure and minimum point distance calculation method, the problem of small target detection of fish feeding behavior in complex backgrounds was solved, realizing real-time accurate detection of fish feeding behavior and intelligent feeding control.
Patent Information
- Application Number
- CN202510661666.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-11-14
AI Technical Summary
Existing YOLOv8n target detection technology struggles to accurately locate small individual targets in fish feeding behavior against complex backgrounds, making real-time detection impossible.
An improved PM-YOLO model is adopted, which combines a parallel multi-branch structure and an attention mechanism. Through multi-scale feature extraction and minimum point distance calculation, the accuracy of small target detection is improved.
It enables real-time and accurate detection of fish feeding behavior in complex environments, and intelligent control of the feeding device, thereby improving the efficiency and accuracy of fish feeding behavior analysis.
Smart Images

Figure CN120953646A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent control technology, and in particular relates to an automatic detection method and feeding control system for fish feeding behavior under complex backgrounds. Background Technology
[0002] YOLOv8n consists of a backbone network, a neck network, and a detection head. Through structural improvements, the introduction of attention mechanisms, and data augmentation, it achieves significant enhancements in feature extraction and fusion, as well as context-aware mechanisms. This not only meets the application scenarios' demand for efficient and lightweight models, but also demonstrates a marked improvement in performance for small object detection. Currently, YOLOv8n object detection technology shows broad application potential in scenarios such as fish feeding behavior analysis, autonomous driving, and product defect detection.
[0003] Automatic detection technology based on the YOLOv8n framework is suitable for target detection in simple backgrounds with obvious individual features. In fishpond aquaculture environments, feeding fish are small and densely packed. Existing YOLOv8n technology struggles to accurately locate small feeding fish against complex backgrounds and extract their individual features, thus making real-time detection of fish feeding behavior impossible. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention proposes an automatic detection and feeding control scheme for fish feeding behavior under complex backgrounds.
[0005] The first aspect of this invention proposes an automatic detection method for fish feeding behavior under complex backgrounds, the method comprising:
[0006] Step S1: Collect images of fish feeding in real time, analyze the images of fish feeding behavior in real time using an automatic analysis algorithm, and determine the number of fish feeding at the current time point as the analysis result;
[0007] Step S2: Continuously obtain the analysis results at different time points, determine the changing trend of the feeding fish population based on the feeding fish population data at different time points, and adjust the feeding device based on the changing trend.
[0008] According to the method of the first aspect of the present invention, in step S1: fish feeding images with complex backgrounds are acquired and preprocessed; the fish feeding images are labeled using LabelImg to generate a label file; and a dataset of fish feeding behavior images with complex backgrounds, FFDatas, is constructed, with the size of a single image data being 1280*1280.
[0009] According to the method of the first aspect of the present invention, in step S1: the automatic analysis algorithm for fish feeding behavior is configured on the PM-YOLO model. The PM-YOLO model is pre-trained, and in both the training and testing phases, the images in the image dataset FFDatas are first normalized, horizontally flipped, scaled proportionally, and enhanced with mosaic, and then the processed images are input into the PM-YOLO model.
[0010] According to the method of the first aspect of the present invention, in step S1:
[0011] After the processed image is input into the PM-YOLO model, it passes through two convolutional layers. The parameters of the convolutional modules in the two convolutional layers are the same, thus obtaining 320*320 image data.
[0012] Image data after two convolutional layers is input into the c2f_PPA module of the PM-YOLO model. Using a parallel multi-branch structure and attention mechanism with dynamic feature weights, feature information of small feeding target fish of different scales (greater than 96*96, 48*48, and 32*32) is extracted. The feature information is used to identify individual feeding fish targets with complex backgrounds.
[0013] The feature data is input into the Neck network, cascaded and spliced for feature fusion and enhancement, and then transmitted to the Head network.
[0014] The Head network employs a multi-branch loss calculation method, which integrates center point distance, width and height deviation, and minimum point distance.
[0015]
[0016]
[0017] Where MPDIOU represents the loss, w represents the width, h represents the height, and A and B represent two arbitrary convex shapes. Indicate the coordinates of the top left and bottom right corners of (A). Indicate the coordinates of the top left and bottom right corners of B; and This is an intermediate value used in distance calculations.
[0018] According to the method of the first aspect of the present invention, in step S2: when the decreasing trend of the number of fish feeding in a predetermined time period is greater than the increasing trend, the feeding device is turned off.
[0019] A second aspect of this invention proposes an automatic detection and feeding control system for fish feeding behavior under complex backgrounds. The system includes: an automatic fish feeding behavior analysis module, a Web control platform, and a pond feeding module. The automatic fish feeding behavior analysis module includes an AI processor and an image acquisition module. The pond feeding module includes a command transmission and reception module and a feeding device.
[0020] The image acquisition module in the automatic analysis module acquires images of fish feeding in real time and sends these images to the AI processor in the automatic analysis module.
[0021] The automatic analysis module uses the fish feeding behavior automatic analysis algorithm in the AI processor to analyze fish feeding images in real time, determine the number of feeding fish at the current time point as the analysis result, and send the analysis result to the Web control platform.
[0022] The Web control platform determines the changing trend of the number of feeding fish based on the data of the number of feeding fish at different time points received continuously, and sends feeding control commands to the command transceiver module in the pond feeding module based on the changing trend.
[0023] The instruction transceiver module in the pond feeding module controls the feeding device in the pond feeding module according to the feeding control instructions.
[0024] According to the system of the second aspect of the present invention, for the automatic analysis module:
[0025] The image acquisition module in the automatic analysis module is configured to acquire images of fish feeding against complex backgrounds;
[0026] The AI processor in the automatic analysis module is configured to: preprocess images of fish feeding; annotate images of fish feeding using LabelImg to generate annotation files; and construct a dataset of images of fish feeding behavior under complex backgrounds, FFDatas, with each image data having a size of 1280*1280.
[0027] According to the system of the second aspect of the present invention, the AI processor in the automatic analysis module includes a PM-YOLO model, the automatic analysis algorithm for fish feeding behavior is configured on the PM-YOLO model, and the PM-YOLO model is pre-trained; whether in the training phase or the testing phase, the images in the image dataset FFDatas are first normalized, horizontally flipped, scaled proportionally, and enhanced with mosaic, and then the processed images are input into the PM-YOLO model.
[0028] According to the system of the second aspect of the present invention, the AI processor in the automatic analysis module is configured as follows:
[0029] After the processed image is input into the PM-YOLO model, it passes through two convolutional layers. The parameters of the convolutional modules in the two convolutional layers are the same, resulting in 320*320 image data.
[0030] Image data passing through two convolutional layers is input into the c2f_PPA module of the PM-YOLO model. Using a parallel multi-branch structure and attention mechanism dynamic feature weights, feature information of feeding small target fish of different scales (greater than 96*96, 48*48, and 32*32) is extracted. The feature information is used to identify individual feeding fish targets with complex backgrounds.
[0031] The feature data is input into the Neck network, cascaded and spliced for feature fusion and enhancement, and then transmitted to the Head network.
[0032] The Head network employs a multi-branch loss calculation method, which integrates center point distance, width and height deviation, and minimum point distance.
[0033]
[0034] Where MPDIOU represents the loss, w represents the width, h represents the height, and A and B represent two arbitrary convex shapes. Indicate the coordinates of the top left and bottom right corners of (A). Indicate the coordinates of the top left and bottom right corners of B; and This is an intermediate value used in distance calculations.
[0035] According to the system of the second aspect of the present invention, the Web control platform is configured to send a feeding control command for shutting down the feeding device to the command transceiver module in the pond feeding module when the decreasing trend of the number of feeding fish within a predetermined time period is greater than the increasing trend.
[0036] A third aspect of this invention discloses an electronic device. The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the automatic detection method for fish feeding behavior under complex backgrounds, as described in the first aspect of this disclosure.
[0037] A fourth aspect of this invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the automatic detection method for fish feeding behavior under complex backgrounds, as described in the first aspect of this disclosure.
[0038] In summary, the technical solution of this invention proposes a target detection algorithm based on an improved YOLOv8n. By adding a pyramid structure to YOLOv8n's C2f module to fuse multi-scale features and a parallel perception mechanism, it solves the problem of inaccurate localization of small targets in complex backgrounds. It replaces the CIoU calculation module in YOLOv8n with the minimum point distance calculation method, improving the accuracy of IoU calculation for dense small targets and solving the problem of automatic detection of dense small targets. Furthermore, by automatically analyzing fish feeding behavior, it intelligently controls the working status of fish feeders, replacing manual monitoring and control of the feeders, and accelerating the implementation of precision feeding technology in pond aquaculture environments. Attached Figure Description
[0039] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0040] Figure 1 This is a schematic diagram of an automatic detection and feeding control system for fish feeding behavior according to an embodiment of the present invention. Detailed Implementation
[0041] 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, 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.
[0042] The first aspect of this invention proposes an automatic detection method for fish feeding behavior under complex backgrounds, the method comprising:
[0043] Step S1: Collect images of fish feeding in real time, analyze the images of fish feeding behavior in real time using an automatic analysis algorithm, and determine the number of fish feeding at the current time point as the analysis result;
[0044] Step S2: Continuously obtain the analysis results at different time points, determine the changing trend of the feeding fish population based on the feeding fish population data at different time points, and adjust the feeding device based on the changing trend.
[0045] According to the method of the first aspect of the present invention, in step S1: fish feeding images with complex backgrounds are acquired and preprocessed; the fish feeding images are labeled using LabelImg to generate a label file; and a dataset of fish feeding behavior images with complex backgrounds, FFDatas, is constructed, with the size of a single image data being 1280*1280.
[0046] According to the method of the first aspect of the present invention, in step S1: the automatic analysis algorithm for fish feeding behavior is configured on the PM-YOLO model. The PM-YOLO model is pre-trained, and in both the training and testing phases, the images in the image dataset FFDatas are first normalized, horizontally flipped, scaled proportionally, and enhanced with mosaic, and then the processed images are input into the PM-YOLO model.
[0047] According to the method of the first aspect of the present invention, in step S1:
[0048] After the processed image is input into the PM-YOLO model, it passes through two convolutional layers. The parameters of the convolutional modules in the two convolutional layers are the same, thus obtaining 320*320 image data.
[0049] Image data after two convolutional layers is input into the c2f_PPA module of the PM-YOLO model. Using a parallel multi-branch structure and attention mechanism with dynamic feature weights, feature information of small feeding target fish of different scales (greater than 96*96, 48*48, and 32*32) is extracted. The feature information is used to identify individual feeding fish targets with complex backgrounds.
[0050] The feature data is input into the Neck network, cascaded and spliced for feature fusion and enhancement, and then transmitted to the Head network.
[0051] The Head network employs a multi-branch loss calculation method, which integrates center point distance, width and height deviation, and minimum point distance.
[0052]
[0053] Where MPDIOU represents the loss, w represents the width, h represents the height, and A and B represent two arbitrary convex shapes. Indicate the coordinates of the top left and bottom right corners of (A). Indicate the coordinates of the top left and bottom right corners of B; and This is an intermediate value used in distance calculations.
[0054] According to the method of the first aspect of the present invention, in step S2: when the decreasing trend of the number of fish feeding in a predetermined time period is greater than the increasing trend, the feeding device is turned off.
[0055] First Embodiment
[0056] Collect images of fish feeding against a complex background, and then preprocess the image data.
[0057] The preprocessed image data is labeled using LabelImg to generate a label file, and a dataset of fish feeding behavior images under complex backgrounds, FFDatas, is constructed, with each data point having a uniform size of 1280*1280.
[0058] Normalization, horizontal flipping, scaling, and mosaic effects are applied to the input images of the PM-YOLO model to enhance data diversity.
[0059] After the data processed by S103 is input into Layer1:ConvModule(k=3,s=2,p=1) and Layer2:ConvModule(k=3,s=2,p=1), 320*320 image data is obtained.
[0060] The feeding fish are small targets, and the fishpond surface contains interference factors such as weeds and floating objects. After two convolutions, the data is input into the c2f_PPA module. Utilizing a parallel multi-branch structure and dynamic feature weights with an attention mechanism, it extracts feature information of small feeding fish targets of different scales, such as 96*96, 48*48, and 32*32, and can identify feeding fish targets with complex backgrounds. Compared with c2f, the improved module can improve the feeding fish detection performance and effectively suppress background noise.
[0061] The feature data extracted after three convolutions and c2f_ppa operations are input into the Neck, concatenated, and then fused and enhanced before being transmitted to the Head network model. The loss calculation method for the multi-branch Head part is improved by combining center point distance, aspect ratio deviation, and minimum point distance. This solves the problem that the different aspect ratios of the predicted and ground truth boxes affect the Head part's ability to make correct decisions, thus improving boundary regression.
[0062]
[0063] Where A and B are two arbitrary convex shapes, (xA1, yA1) and (xA2, yA2) represent the coordinates of the upper left and lower right corners of (A), and (xB1, yB1) and (xB2, yB2) represent the coordinates of the upper left and lower right corners of B. and The calculation formula is as follows:
[0064]
[0065] Input a photo of a feeding fish school into the newly proposed detection model, output the number of feeding fish and the detection time point to the intelligent feeding system, and give an instruction to shut down the feeding machine based on the decreasing trend of the number.
[0066] The second aspect of this invention proposes an automatic detection and feeding control system for fish feeding behavior under complex backgrounds, such as... Figure 1 As shown, the system includes: an automatic fish feeding behavior analysis module S20, a Web control platform S21, and a pond feeding module S22; the automatic fish feeding behavior analysis module S20 includes an AI processor S201 and an image acquisition module S202; the pond feeding module S22 includes a command transceiver module S221 and a feeding device S222; wherein:
[0067] The image acquisition module in the automatic analysis module acquires images of fish feeding in real time and sends these images to the AI processor in the automatic analysis module.
[0068] The automatic analysis module uses the fish feeding behavior automatic analysis algorithm in the AI processor to analyze fish feeding images in real time, determine the number of feeding fish at the current time point as the analysis result, and send the analysis result to the Web control platform.
[0069] The Web control platform determines the changing trend of the number of feeding fish based on the data of the number of feeding fish at different time points received continuously, and sends feeding control commands to the command transceiver module in the pond feeding module based on the changing trend.
[0070] The instruction transceiver module in the pond feeding module controls the feeding device in the pond feeding module according to the feeding control instructions.
[0071] According to the system of the second aspect of the present invention, for the automatic analysis module:
[0072] The image acquisition module in the automatic analysis module is configured to acquire images of fish feeding against complex backgrounds;
[0073] The AI processor in the automatic analysis module is configured to: preprocess images of fish feeding; annotate images of fish feeding using LabelImg to generate annotation files; and construct a dataset of images of fish feeding behavior under complex backgrounds, FFDatas, with each image data having a size of 1280*1280.
[0074] According to the system of the second aspect of the present invention, the AI processor in the automatic analysis module includes a PM-YOLO model, the automatic analysis algorithm for fish feeding behavior is configured on the PM-YOLO model, and the PM-YOLO model is pre-trained; whether in the training phase or the testing phase, the images in the image dataset FFDatas are first normalized, horizontally flipped, scaled proportionally, and enhanced with mosaic, and then the processed images are input into the PM-YOLO model.
[0075] According to the system of the second aspect of the present invention, the AI processor in the automatic analysis module is configured as follows:
[0076] After the processed image is input into the PM-YOLO model, it passes through two convolutional layers. The parameters of the convolutional modules in the two convolutional layers are the same, resulting in 320*320 image data.
[0077] Image data passing through two convolutional layers is input into the c2f_PPA module of the PM-YOLO model. Using a parallel multi-branch structure and attention mechanism dynamic feature weights, feature information of feeding small target fish of different scales (greater than 96*96, 48*48, and 32*32) is extracted. The feature information is used to identify individual feeding fish targets with complex backgrounds.
[0078] The feature data is input into the Neck network, cascaded and spliced for feature fusion and enhancement, and then transmitted to the Head network.
[0079] The Head network employs a multi-branch loss calculation method, which integrates center point distance, width and height deviation, and minimum point distance.
[0080]
[0081] Where MPDIOU represents the loss, w represents the width, h represents the height, and A and B represent two arbitrary convex shapes. Indicate the coordinates of the top left and bottom right corners of (A). Indicate the coordinates of the top left and bottom right corners of B; and This is an intermediate value used in distance calculations.
[0082] According to the system of the second aspect of the present invention, the Web control platform is configured to send a feeding control command for shutting down the feeding device to the command transceiver module in the pond feeding module when the decreasing trend of the number of feeding fish within a predetermined time period is greater than the increasing trend.
[0083] Second Embodiment
[0084] like Figure 1As shown, the intelligent feeding control system includes an automatic fish feeding behavior analysis module S20, a web control platform S21, and a pond feeding module S22. S202 collects real-time images of fish feeding. Module S201, with its embedded AI processor, carries a newly proposed automatic fish feeding behavior analysis method. It analyzes the fish feeding photos collected by S202 in real time, obtains the number of feeding fish at the current time, and sends a command to S21 to shut down the feeder when the number of feeding fish shows a greater decreasing trend than increasing trend within 3 minutes. S21 then shuts down device S222.
[0085] A third aspect of this invention discloses an electronic device. The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the automatic detection method for fish feeding behavior under complex backgrounds, as described in the first aspect of this disclosure.
[0086] A fourth aspect of this invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the automatic detection method for fish feeding behavior under complex backgrounds, as described in the first aspect of this disclosure.
[0087] In summary, the technical solution of this invention proposes a target detection algorithm based on an improved YOLOv8n. By adding a pyramid structure to YOLOv8n's C2f module to fuse multi-scale features and a parallel perception mechanism, it solves the problem of inaccurate localization of small targets in complex backgrounds. It replaces the CIoU calculation module in YOLOv8n with the minimum point distance calculation method, improving the accuracy of IoU calculation for dense small targets and solving the problem of automatic detection of dense small targets. Furthermore, by automatically analyzing fish feeding behavior, it intelligently controls the working status of fish feeders, replacing manual monitoring and control of the feeders, and accelerating the implementation of precision feeding technology in pond aquaculture environments.
[0088] This invention uses a parallel multi-branch structure to extract small target individuals of different scales, thus solving the problem of detecting individual feeding fish of different sizes and achieving real-time and accurate detection of small targets in feeding fish schools.
[0089] This invention dynamically allocates feature weights through an attention mechanism and calculates the weight coefficient of each feature position in real time, enabling the model to quickly focus on the target position from a complex background. Therefore, it solves the problem of small target individuals of feeding fish in complex water backgrounds in fishpond aquaculture environments, realizes the detection of feeding fish behavior in actual production environments, and provides technical support for the implementation of precision feeding technology in aquaculture.
[0090] This invention introduces a minimum point distance calculation method, based on the calculation of the center point, to calculate the minimum distance between the vertices of the labeled box and the predicted box. Small targets are small in size and have few pixels, making them difficult to detect accurately. By improving the calculation method of IOU during the detection process, this invention solves the problem that the subtle differences between the labeled box and the predicted box are not easy to measure, and avoids the phenomenon of uneven gradient fluctuations during model training caused by large IOU fluctuations.
[0091] Please note that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. The above embodiments only illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be pointed out that for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. An automatic detection method for fish feeding behavior under complex backgrounds, characterized in that, The method includes: Step S1: Collect images of fish feeding in real time, analyze the images of fish feeding behavior in real time using an automatic analysis algorithm, and determine the number of fish feeding at the current time point as the analysis result; Step S2: Continuously obtain the analysis results at different time points, determine the changing trend of the feeding fish population based on the feeding fish population data at different time points, and adjust the feeding device based on the changing trend.
2. The method for automatically detecting fish feeding behavior under complex backgrounds according to claim 1, characterized in that, In step S1: images of fish feeding with complex backgrounds are acquired and preprocessed; the images are labeled using LabelImg to generate a label file; and a dataset of images of fish feeding behavior with complex backgrounds, FFDatas, is constructed, with each image having a size of 1280*1280.
3. The method for automatically detecting fish feeding behavior under complex backgrounds according to claim 2, characterized in that, In step S1: The automatic analysis algorithm for fish feeding behavior is configured on the PM-YOLO model. The PM-YOLO model is pre-trained, and in both the training and testing phases, the images in the image dataset FFDatas are first normalized, horizontally flipped, scaled proportionally, and enhanced with mosaic. Then, the processed images are input into the PM-YOLO model.
4. The method for automatically detecting fish feeding behavior under complex backgrounds according to claim 3, characterized in that, In step S1: After the processed image is input into the PM-YOLO model, it passes through two convolutional layers. The parameters of the convolutional modules in the two convolutional layers are the same, thus obtaining 320*320 image data. Image data after two convolutional layers is input into the c2f_PPA module of the PM-YOLO model. Using a parallel multi-branch structure and attention mechanism with dynamic feature weights, feature information of small feeding target fish of different scales (greater than 96*96, 48*48, and 32*32) is extracted. The feature information is used to identify individual feeding fish targets with complex backgrounds. The feature data is input into the Neck network, cascaded and spliced for feature fusion and enhancement, and then transmitted to the Head network. The Head network employs a multi-branch loss calculation method, which integrates center point distance, width and height deviation, and minimum point distance. Where MPDIOU represents the loss, w represents the width, h represents the height, and A and B represent two arbitrary convex shapes. Indicate the coordinates of the top left and bottom right corners of (A). Indicate the coordinates of the top left and bottom right corners of B; and This is an intermediate value used in distance calculations.
5. The method for automatically detecting fish feeding behavior under complex backgrounds according to claim 4, characterized in that, In step S2: When the decreasing trend of the number of fish feeding in a predetermined time is greater than the increasing trend, the feeding device is turned off.
6. An automatic detection and feeding control system for fish feeding behavior under complex backgrounds, characterized in that, The system includes: an automatic fish feeding behavior analysis module, a web control platform, and a pond feeding module; the automatic fish feeding behavior analysis module includes an AI processor and an image acquisition module; the pond feeding module includes a command transmission and reception module and a feeding device; wherein: The image acquisition module in the automatic analysis module acquires images of fish feeding in real time and sends these images to the AI processor in the automatic analysis module. The automatic analysis module uses the fish feeding behavior automatic analysis algorithm in the AI processor to analyze fish feeding images in real time, determine the number of feeding fish at the current time point as the analysis result, and send the analysis result to the Web control platform. The Web control platform determines the changing trend of the number of feeding fish based on the data of the number of feeding fish at different time points received continuously, and sends feeding control commands to the command transceiver module in the pond feeding module based on the changing trend. The instruction transceiver module in the pond feeding module controls the feeding device in the pond feeding module according to the feeding control instructions.
7. The automatic detection and feeding control system for fish feeding behavior under complex backgrounds according to claim 6, characterized in that, Regarding the automatic analysis module: The image acquisition module in the automatic analysis module is configured to acquire images of fish feeding against complex backgrounds; The AI processor in the automatic analysis module is configured to: preprocess images of fish feeding; annotate images of fish feeding using LabelImg to generate annotation files; and construct a dataset of images of fish feeding behavior under complex backgrounds, FFDatas, with each image data having a size of 1280*1280.
8. The automatic detection and feeding control system for fish feeding behavior under complex backgrounds according to claim 7, characterized in that, The AI processor in the automatic analysis module includes the PM-YOLO model. The automatic analysis algorithm for fish feeding behavior is configured on the PM-YOLO model, which is pre-trained. In both the training and testing phases, the images in the image dataset FFDatas are first normalized, horizontally flipped, scaled proportionally, and enhanced with mosaic. The processed images are then input into the PM-YOLO model.
9. The automatic detection and feeding control system for fish feeding behavior under complex backgrounds according to claim 8, characterized in that, The AI processor in the automatic analysis module is configured as follows: After the processed image is input into the PM-YOLO model, it passes through two convolutional layers. The parameters of the convolutional modules in the two convolutional layers are the same, resulting in 320*320 image data. Image data passing through two convolutional layers is input into the c2f_PPA module of the PM-YOLO model. Using a parallel multi-branch structure and attention mechanism dynamic feature weights, feature information of feeding small target fish of different scales (greater than 96*96, 48*48, and 32*32) is extracted. The feature information is used to identify individual feeding fish targets with complex backgrounds. The feature data is input into the Neck network, cascaded and spliced for feature fusion and enhancement, and then transmitted to the Head network. The Head network employs a multi-branch loss calculation method, which integrates center point distance, width and height deviation, and minimum point distance. Where MPDIOU represents the loss, w represents the width, h represents the height, and A and B represent two arbitrary convex shapes. Indicate the coordinates of the top left and bottom right corners of (A). Indicate the coordinates of the top left and bottom right corners of B; and This is an intermediate value used in distance calculations.
10. The automatic detection and feeding control system for fish feeding behavior under complex backgrounds according to claim 9, characterized in that, The web control platform is configured to send a feeding control command to the instruction transceiver module in the pond feeding module to shut down the feeding device when the decreasing trend of the number of feeding fish exceeds the increasing trend within a predetermined time.
Citation Information
Patent Citations
Automatic fish feed feeding system based on deep learning
CN116868937A
Improved YOLOv8-based land-based round pool dead fish detection method
CN119027977A