A self-adaptive feeding method for redfin puffer based on dual-mode machine vision

By using a dual-modal machine vision-based adaptive feeding method, combined with optical flow and instance segmentation detection, precise matching of feeding amounts in redfin pufferfish farming was achieved. This solved the waste and pollution problems caused by timed and quantitative feeding, and improved the accuracy of feeding status recognition and environmental adaptability.

CN123166133APending Publication Date: 2026-11-27TANGSHAN NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611143485.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing redfin pufferfish farming, the timed and quantitative feeding model is prone to overfeeding or underfeeding, resulting in feed waste and water pollution. Furthermore, single visual modality detection is prone to distortion and makes it difficult to accurately match the real-time feeding status of the fish.

Method used

An adaptive feeding method based on bimodal machine vision is adopted, which combines optical flow and instance segmentation to detect feeding status. Through autonomous attraction, dual trial calibration and multi-round iterative adjustment of feeding amount, the feeding amount is accurately matched with the feeding status of fish.

Benefits of technology

It improves the accuracy and environmental robustness of feeding status recognition, eliminates the effects of feeding initiation delay, dynamically adjusts feeding amount, reduces feed waste and residual feed in water, and improves feed utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123166133A_ABST
    Figure CN123166133A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of based on bimodal machine vision's redfin pufferfish adaptive feeding method, comprising the following steps: step S1: determine the basic information of redfin pufferfish and feeding parameter;Step S2: the current fish school is calculated the degree of aggregation of self-attractive feeding process to current fish school and whether self-attractive feeding process is completed is judged by it;If self-attractive feeding process is completed, enter next step;Otherwise, continue self-attractive feeding process;Step S3: the current fish school is determined the first exploratory feeding index and second exploratory feeding index of exploratory feeding process to current fish school;Step S4: with the first exploratory feeding index and second exploratory feeding index as initial benchmark, the adaptive feeding process of multiple rounds is carried out to current fish school;After each round feeding, the next round feeding amount is dynamically adjusted based on the feeding index of fish school until the preset termination condition is satisfied.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent feeding technology in aquaculture, specifically relating to an adaptive feeding method for redfin pufferfish based on bimodal machine vision. Background Technology

[0002] Redfin pufferfish is an important economic species in factory-scale aquaculture, and the quality of feeding management directly determines the aquaculture benefits and the aquatic environment. Currently, most aquaculture production adopts a timed and quantitative manual or semi-automatic feeding mode. The amount of feed is highly dependent on the experience of the aquaculture personnel, which easily leads to overfeeding or underfeeding. This not only wastes feed and increases aquaculture costs, but also aggravates water pollution due to uneaten feed, increasing the burden on water purification.

[0003] Existing intelligent feeding solutions based on machine vision mostly use a single visual modality to assess feeding status. Underwater reflection and fluctuations in water turbidity can easily lead to distorted detection results. At the same time, they generally ignore the delayed characteristics of fish feeding initiation, set the initial feeding amount in a coarse manner, and lack a precise adaptive adjustment mechanism in stages. This makes it difficult to accurately match the real-time feeding status of fish, resulting in limited improvement in feeding accuracy and feed utilization. Summary of the Invention

[0004] To address the aforementioned problems, the present invention aims to provide an adaptive feeding method for redfin pufferfish based on dual-modal machine vision. This method detects the feeding status through dual-modal detection of optical flow and instance segmentation, and dynamically adjusts the feeding amount through attraction and aggregation, dual-trial calibration, and multi-round iterative feeding, thereby achieving precise matching between the feeding amount and the real-time feeding status of the fish population.

[0005] This invention discloses an adaptive feeding method for redfin pufferfish based on bimodal machine vision, comprising the following steps:

[0006] Step S1: Determine the basic information and feeding parameters of the redfin pufferfish; the feeding parameters include the aggregation threshold and the first baseline duration;

[0007] Step S2: Perform the autonomous attraction and feeding process on the current fish group, and calculate the aggregation degree of the current fish group in real time; determine whether the autonomous attraction and feeding process is completed based on the aggregation degree of the current fish group; if the aggregation degree of the current fish group is greater than or equal to the preset aggregation degree threshold and is continuously and stably maintained for the first baseline time, then the autonomous attraction and feeding process is determined to be completed and proceed to the next step; otherwise, continue the autonomous attraction and feeding process.

[0008] Step S3: Conduct a trial feeding process for the current fish group and collect feeding videos of the current fish group during the trial feeding process to determine the first trial feeding index and the second trial feeding index of the current fish group;

[0009] Step S4: Using the first and second trial feeding indices of the current fish population as initial benchmarks, conduct multiple rounds of adaptive feeding for the current fish population; after each round of feeding, dynamically adjust the feeding amount for the next round based on the feeding index of the fish population until the preset termination condition is met.

[0010] Furthermore, step S2 includes the following steps:

[0011] Step S21: The self-feeding device feeds the feeding area in batches according to the single feeding amount, and collects the feeding scene of the current fish group to carry out the autonomous attraction and feeding process for the current fish group.

[0012] Step S22: Input the feeding scene into the first YOLOv8 instance segmentation model to identify the red-finned pufferfish in the feeding scene and obtain the single-frame clustering degree; take the arithmetic mean of the single-frame clustering degree of all frames within the sliding time window as the current fish school clustering degree;

[0013] Step S23: If the current fish population density is greater than or equal to the population density threshold and remains stable within the first baseline time, the autonomous attraction and feeding process of the current fish population is completed, and proceed to step S3; otherwise, continue with batch feeding and population density monitoring.

[0014] Furthermore, step S3 includes the following steps:

[0015] Step S31: Based on the initial feeding amount, conduct the first trial feeding on the current fish population and collect the first feeding video; obtain the first trial feeding index of the current fish population based on the first feeding video;

[0016] Step S32: Based on the initial feeding amount, conduct a second trial feeding on the current fish population and collect a second feeding video; obtain the second trial feeding index of the current fish population based on the second feeding video.

[0017] Furthermore, the adaptive feeding process refers to: initializing the adaptive feeding parameters based on the first and second trial feeding indices, then executing the first round of formal feeding, and subsequently entering the iterative cycle adjustment of the remaining rounds.

[0018] Furthermore, the steps for the first round of formal feeding are as follows:

[0019] Step A1: Determine the feeding amount for the first round based on the first trial feeding index, the second trial feeding index, and the trial feeding amount, and initialize the feeding parameters; the feeding parameters include the historical maximum feeding index and the number of consecutive decreasing rounds;

[0020] Step A2: The feeding device performs the first round of feeding based on the feeding amount of the first round, and collects the first formal feeding video after the feeding is completed;

[0021] Step A3: Obtain the first formal feeding index based on the first formal feeding video, record it as the feeding index for the current round, and update the feeding parameters.

[0022] Furthermore, the iterative feeding steps for the remaining rounds are as follows:

[0023] Step B1: Feed the current fish group based on the current feeding amount and collect feeding videos for the current round;

[0024] Step B2: Calculate the feeding index for the current round based on the feeding video of the current round, update the feeding parameters, and determine the feeding status of the current round;

[0025] Step B3: Determine whether to terminate feeding based on the current feeding status; if the current feeding status meets any termination condition, the adaptive feeding process terminates; if the current feeding status does not meet the termination condition, proceed to the next step and calculate the feeding amount for the next round.

[0026] Step B4: Calculate the feeding amount for the next round based on the feeding index of the current round and the feeding index of the previous round, use the feeding amount of the next round as the new feeding amount for the current round, and return to step B1.

[0027] Furthermore, the feeding status is determined based on the feeding fatigue coefficient, the number of consecutive declines, the number of adaptive feeding rounds, and the total cumulative feeding amount for the day;

[0028] The formula for calculating the dietary fatigue coefficient is: ;

[0029] F represents the feeding fatigue coefficient for the current round; The highest historical food intake index; The previous feeding index;

[0030] like ,but And the number of consecutive rounds decreased. Reset to zero;

[0031] like ,and ,but Unchanged, continuously decreasing rounds ;

[0032] like ,and ,but Unchanged, continuously decreasing rounds Reset to zero.

[0033] Furthermore, the termination conditions include: satiety condition, round condition, and total quantity condition;

[0034] Satiety condition: The satiation fatigue coefficient is greater than or equal to the satiation fatigue threshold and the number of consecutive decreases is greater than or equal to the round threshold;

[0035] Round condition: The adaptive feeding round reaches the preset maximum round;

[0036] Total quantity condition: The total amount of food fed in a day reaches the daily feeding limit.

[0037] Furthermore, step S31 includes the following steps:

[0038] Step S311: Perform image preprocessing on each frame of the first feeding video to obtain the preprocessed feeding image; process the preprocessed feeding image based on optical flow to obtain the first feeding behavior quantification index;

[0039] Step S312: Input the first feeding video into the second YOLOv8 instance segmentation model to obtain the first feeding activity;

[0040] Step S313: Based on the first feeding behavior quantification index and the first feeding activity, a weighted fusion is performed to obtain the first trial feeding index.

[0041] Furthermore, step S311 includes the following steps:

[0042] Step S3111, Image preprocessing: The first feeding video is processed frame by frame to obtain the RGB image of each frame. Then, the RGB image is converted to the HSV color space and the luminance channel and chrominance channel are separated. The luminance channel is subjected to block-limited contrast adaptive histogram equalization. Then, Gaussian filtering is used to remove the noise of suspended particles in the water, so as to obtain the preprocessed feeding image.

[0043] Step S3112: Image fusion: Map the preprocessed feeding images to a unified world coordinate system, and use a weighted fusion algorithm to generate a panoramic water image;

[0044] Step S3113, Optical flow calculation: The optical flow field of the panoramic water images of two adjacent frames is calculated using the optical flow method to obtain the displacement vector of each pixel.

[0045] Step S3114, Pixel weight calculation: Calculate the pixel weight based on the displacement vector of each pixel and the elliptic Gaussian weight function;

[0046] Step S3115, Calculation of single-frame optical flow quantization index: The optical flow quantization index of each frame image is calculated based on pixel weights;

[0047] Step S3116, Calculation of average optical flow quantization index: Take the arithmetic mean of the optical flow quantization indexes of all frames of the first feeding video to obtain the first feeding behavior quantization index.

[0048] The beneficial effects of this invention are:

[0049] This invention employs a dual-modal fusion approach of optical flow and instance segmentation for feeding detection, improving the accuracy and environmental robustness of fish feeding status identification in complex underwater environments. Through autonomous attraction feeding and a dual-trial calibration mechanism, it eliminates the impact of feeding initiation delays and accurately matches the initial feeding level. Combined with multi-round iterative adaptive feeding logic, it dynamically adjusts the feeding amount according to the fish's satiety level, and with environmental parameter correction, effectively reduces feed waste and uneaten feed in the water, improving feed utilization. Attached Figure Description

[0050] 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.

[0051] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0052] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art can make similar extensions without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0053] This invention provides an adaptive feeding method for redfin pufferfish based on dual-modal machine vision. The feeding status is detected by dual-modal detection of optical flow and instance segmentation. The feeding amount is dynamically adjusted through attraction and aggregation, dual trial calibration and multi-round iterative feeding to achieve matching between the feeding amount and the real-time feeding status of the fish.

[0054] Example 1:

[0055] This embodiment provides an adaptive feeding method for red-finned pufferfish based on bimodal machine vision, such as... Figure 1 As shown, it includes the following steps:

[0056] Step S1: Determine the basic information and feeding parameters of the redfin pufferfish; the feeding parameters include the aggregation threshold and the first baseline duration; the basic information of the redfin pufferfish includes the total biomass of the fish population; the feeding parameters include the trial feeding amount, the first baseline duration, and the sliding time window; the trial feeding amount is determined based on the total biomass of the fish population and is set at 0.1%-0.3% of the total biomass of the fish population.

[0057] Step S2: Perform the autonomous attraction and feeding process on the current fish swarm, and calculate the aggregation degree of the current fish swarm in real time; determine whether the autonomous attraction and feeding process is completed based on the aggregation degree of the current fish swarm; if the aggregation degree of the current fish swarm is greater than or equal to the preset aggregation degree threshold and is continuously and stably maintained for the first baseline time, then the autonomous attraction and feeding process is completed and proceeds to the next step; otherwise, continue the autonomous attraction and feeding process.

[0058] Step S2 includes the following steps:

[0059] Step S21: The self-feeding device feeds the feeding area in batches at a single feeding amount, and captures images of the current fish feeding to autonomously attract and feed the current fish. The single feeding amount is 10%-20% of the trial feeding amount. In this embodiment, the single feeding amount is 15% of the trial feeding amount.

[0060] Specifically, the self-feeding device is set up above the feeding area. Each feeding completes the even distribution of the corresponding amount of feed within 5 seconds, with the feed landing point covering the feeding area centered on the feeding point, thus inducing the scattered red-finned pufferfish to gradually gather in the feeding area. After each feeding, a high-definition waterproof camera captures the current feeding scene of the fish.

[0061] High-definition waterproof cameras are installed at the four corners of the feeding area, with each camera covering one quadrant to ensure no feeding area is missed. The cameras can cover both the surface and bottom water. Internal parameter calibration is performed using Zhang's calibration method, and external parameter calibration is completed using an underwater checkerboard calibration board. The cameras are equipped with a unified world coordinate system, enabling pixel-level spatial alignment of multi-view images.

[0062] Step S22: Input the feeding scene into the first YOLOv8 instance segmentation model to identify individual redfin pufferfish in the water and extract the binary masks of all redfin pufferfish individuals; calculate the percentage of the total pixel area of ​​the feeding area occupied by the binary masks of all redfin pufferfish individuals to obtain the single-frame clustering degree; the overlapping area of ​​fish bodies is only counted once to avoid the percentage exceeding 100%. Take the arithmetic mean of the single-frame clustering degree of all frames within the sliding time window as the current fish swarm clustering degree.

[0063] Step S23: If the current fish population's aggregation degree is greater than or equal to the aggregation degree threshold and remains stable continuously within the first baseline time period, then the current fish population's autonomous attraction and feeding process is complete, and proceed to step S3; otherwise, continue with batch feeding and aggregation degree monitoring. In this embodiment, the aggregation degree threshold is 80%.

[0064] If the cumulative total amount of a single feeding reaches the trial feeding amount, but the aggregation degree still does not meet the threshold requirement, it is determined that the fish's willingness to feed is extremely low. The feeding process for that day will be terminated, and the abnormal data will be recorded so that staff can promptly investigate the cause.

[0065] Step S3: Conduct a trial feeding process for the current fish group and collect feeding videos of the current fish group during the trial feeding process to determine the first trial feeding index and the second trial feeding index of the current fish group.

[0066] Specifically, this step employs a double trial feeding with equal amounts: the first trial feeding is used to awaken the fish's feeding state and eliminate the response delay from the resting state; the second feeding is used to collect steady-state feeding response data after the fish enter an active state. By quantifying the feeding response gain through the ratio of the two feeding indices, the true intensity of the fish's feeding desire can be accurately characterized, providing a calibration benchmark for subsequent formal feeding amount calculations and avoiding initial feeding amount deviations caused by a single trial feeding.

[0067] Step S3 includes the following steps:

[0068] Step S31: Based on the initial feeding amount, conduct the first trial feeding on the current fish population. After the first trial feeding, collect the first feeding video. Based on the first feeding video, obtain the first trial feeding index of the current fish population.

[0069] Step S32: After a certain period of time following the first trial feeding, conduct a second trial feeding on the current fish population based on the trial feeding amount. After the second trial feeding, collect a second feeding video. Based on the second feeding video, obtain the second trial feeding index of the current fish population.

[0070] Step S4: Based on the first and second trial feeding indices of the current fish population, implement an adaptive feeding process for the current fish population in multiple rounds.

[0071] The adaptive feeding process refers to: feeding the current fish group based on the current feeding amount and calculating the feeding status of the current round; determining whether to proceed with the next feeding round based on the feeding status of the current round; if the feeding status of the current round meets any termination condition, then no further feeding round will be conducted; if the feeding status of the current round does not meet the termination condition, then the current fish group will be fed based on the feeding amount of the next round; the feeding amount of the next round is calculated by substituting the feeding amount of the current round into the feeding calculation formula.

[0072] Specifically, after completing the trial feeding process in step S3, the adaptive feeding parameters are first initialized based on the two trial feeding indices, then the first round of formal feeding is executed, followed by a cycle of iterative adjustments in each round. The feeding status is determined based on a comprehensive analysis of the feeding index, historical peak values, and continuous trends.

[0073] The first round of feeding is as follows:

[0074] Step A1: Determine the feeding amount for the first round and initialize the feeding parameters based on the first trial feeding index, the second trial feeding index, and the trial feeding amount;

[0075] The formula for calculating the amount of feed in the first round is: ;

[0076] in, This refers to the initial feeding amount. This refers to the feeding response gain coefficient. This refers to the environmental correction factor. Calculated based on real-time collected environmental parameters; As an amplification factor, since the feeding amount in the first round is related to the trial feeding amount, and the trial feeding amount has a certain difference from the formal feeding amount, an amplification factor is set when calculating the feeding amount in the first round. This is a preset value with a range of 1.5-6, which can be adjusted adaptively according to actual needs.

[0077] Feeding response gain coefficient Calculated based on the first and second trial food intake indices: ;

[0078] in, As a second test of the feeding index, This serves as the first test of the food intake index; in practice, if Less than the minimum effective threshold ,but Values .

[0079] Feeding response gain coefficient This is used to quantify the feeding initiation speed and appetite intensity of fish: the stronger the appetite, the faster the feeding initiation, the smaller the difference between two feeding indices, and the closer the ratio is to 1; the weaker the appetite, the more significant the initiation delay. The lower the value, the larger the ratio. By calibrating the trial feeding amount using this coefficient, the underestimation of feeding activity caused by the initiation lag can be eliminated, making the initial formal feeding amount more in line with the fish's true feeding capacity.

[0080] Environmental correction factor The calculation formula is: ;

[0081] in, This refers to the water temperature coefficient; the optimal growth temperature for the redfin pufferfish is 22-26℃; when the water temperature is in the range of 22-26℃, The value is 1.0; when the water temperature is below 22℃, When the water temperature is above 26℃, ; The current water temperature (°C) is displayed. The optimal growth temperature range can be adjusted based on the specific species of redfin pufferfish during actual aquaculture. 0.1 is the lower limit of the water temperature coefficient to avoid incorrect feeding caused by extreme water temperatures.

[0082] This is the dissolved oxygen coefficient; when dissolved oxygen ≥ 5 mg / L, The value is 1.0; when dissolved oxygen is in the range of 3-5 mg / L, When dissolved oxygen is <3 mg / L, DO represents the current dissolved oxygen concentration (mg / L).

[0083] Initializing feeding parameters refers to using the historical maximum feeding index. Initialize to the maximum value of the two trial feeding indices ( The number of consecutive decreasing rounds n is initialized to 0.

[0084] Step A2: The feeding device performs the first round of feeding based on the feeding amount of the first round, and collects the first formal feeding video after the feeding is completed;

[0085] Step A3: Obtain the first formal feeding index based on the first formal feeding video, and record it as the feeding index for the current round.

[0086] After completing the first round of feeding, update the iteration parameters: adjust the feeding index from the previous round. Update the feeding index to the current round, and update the feeding amount from the first round to the feeding amount from the previous round for calculation of the feeding amount in the next round; at the same time, update according to the rules of Example 3. With consecutive decline rounds .

[0087] The calculation method for the feeding amount in the remaining rounds is as follows:

[0088] Step B1: Feed the current fish group based on the current feeding amount and collect feeding videos for the current round;

[0089] Step B2: Calculate the feeding index for the current round based on the feeding video of the current round, and determine the feeding status of the current round;

[0090] Step B3: Determine whether to terminate feeding based on the current feeding status; if the current feeding status meets any termination condition, the adaptive feeding process terminates; if the current feeding status does not meet the termination condition, proceed to the next step and calculate the feeding amount for the next round.

[0091] Step B4: Calculate the feeding amount for the next round based on the feeding index of the current round and the feeding index of the previous round, use the feeding amount of the next round as the new feeding amount for the current round, and return to step B1.

[0092] The formula for calculating the amount of feed to be given in the next round is: ;

[0093] in, This refers to the amount of food to be fed in the next round. This refers to the amount of food fed in the current round. The feeding status coefficient for the next round: ; This refers to the preset maximum feeding amount for a single round, determined based on the total biomass of the fish population; This sets an upper limit for the amount of food fed in a single round, preventing drastic fluctuations in the amount of food fed in a single round. This represents the feeding index for the current round. This is the food intake index from the previous round.

[0094] Example 2:

[0095] This embodiment describes in detail how to calculate the first tentative feeding index of the current fish swarm based on the first feeding video collected.

[0096] Step S31 includes the following steps:

[0097] Step S311: Perform image preprocessing on each frame of the first feeding video to obtain the preprocessed feeding image; process the preprocessed feeding image based on optical flow to obtain the first feeding behavior quantification index Q;

[0098] Specifically, step S311 includes the following steps:

[0099] Step S3111, Image preprocessing: The first feeding video is processed frame by frame to obtain the RGB image of each frame. Then, the RGB image is converted to the HSV color space and the luminance channel and chrominance channel are separated. The luminance channel is divided into blocks and the contrast is limited by adaptive histogram equalization to suppress water surface reflection and bottom shadow interference. Finally, Gaussian filtering is used to remove the noise of suspended particles in the water, so as to obtain the preprocessed feeding image.

[0100] Step S3112: Image fusion: Map the preprocessed feeding images to a unified world coordinate system, and use a weighted fusion algorithm to generate a panoramic water image to eliminate fish body occlusion and monitoring blind spots from a single viewpoint;

[0101] Step S3113, Optical flow calculation: The Farneback dense optical flow method is used to calculate the optical flow field of the panoramic water images of two adjacent frames to obtain the displacement vector of each pixel;

[0102] Step S3114, Pixel weight calculation: Calculate the pixel weight based on the displacement vector of each pixel and the elliptic Gaussian weight function;

[0103] The calculation formula is:

[0104]

[0105] in, , Let be the coordinates of the feeding point in the panoramic water image, and let a and b be the major and minor axes of the feeding zone of the ellipse. This is the weight attenuation coefficient, used to enhance the motion signal weight in the feeding area and suppress surrounding invalid background noise. In this embodiment, it is... Take 0.7 times the pixel length of the semi-major axis of the feeding area.

[0106] Step S3115, Calculation of single-frame optical flow quantization index: The optical flow quantization index of each frame image is calculated based on pixel weights;

[0107] The calculation formula is: ;

[0108] Where M and N are the width and height pixel counts of the panoramic water image. The magnitude of the pixel displacement vector.

[0109] Step S3116, Calculation of average optical flow quantization index: Take the arithmetic mean of the optical flow quantization indices of all frames of the first feeding video to obtain the first feeding behavior quantization index. .

[0110] Step S312: Input the first feeding video into the second YOLOv8 instance segmentation model to obtain the first feeding activity;

[0111] Specifically, step S312 includes the following steps:

[0112] Step S3121, Redfin Pufferfish Instance Segmentation: Input the first feeding video into the second YOLOv8 instance segmentation model, infer for each frame of panoramic image, and output the binary mask and bounding box coordinates of the redfin pufferfish individual;

[0113] Step S3122, Calculation of feeding area density: Based on the binary mask and bounding box coordinates of individual redfin pufferfish, count the number of redfin pufferfish individuals in the feeding area and calculate the feeding area density;

[0114] The calculation formula is: ,in The surface area of ​​the feeding area;

[0115] Step S3123, Calculation of buoyancy rate and movement speed: Determine the water layer position of the redfin pufferfish based on the ordinate in the bounding box coordinates, count the proportion of individuals that have risen to the middle and upper layers to obtain the buoyancy rate; Combine the Kalman filter tracking algorithm to calculate the average instantaneous movement speed of all individuals;

[0116] Step S3124, Single-frame segmentation activity calculation: The segmentation feeding activity of each frame image is calculated based on the feeding area density, buoyancy rate, and average instantaneous motion speed of the individual; the segmentation activity of all frames of the first feeding video is averaged to obtain the first segmentation feeding activity.

[0117] The formula for calculating the segmentation feeding activity of each frame is: ;

[0118] in, This represents the normalized density of the feeding zone. R represents the average instantaneous velocity after normalization, and R is the buoyancy rate.

[0119] Step S313: Based on the first feeding behavior quantification index and the first feeding activity, a weighted fusion is performed to obtain the first trial feeding index. .

[0120] Specifically, the first feeding behavior quantification index and the first segmented feeding activity are normalized to map them to the range [0,1], and then the first trial feeding index is calculated.

[0121] The formula for calculating the first trial food intake index is: ;

[0122] in, This is the normalized quantitative index of the first feeding behavior. The normalized first-segment feeding activity; When the light intensity is >3000 lux, It is 0.7. The value is 0.3 (under strong light, the visibility of bottom-dwelling fish is low, so the weight of the optical flow method is increased); when the light intensity is ≤3000 lux, It is 0.4. The value is 0.6 (individual features are clear under low light, which improves the instance segmentation weight).

[0123] The light intensity threshold (3000 lux) serves as an inflection point for instance segmentation performance: below this threshold, underwater image clarity is high, and instance segmentation detection accuracy is stable, allowing for an increase in its weight; above this threshold, water surface reflection intensifies, leading to a decrease in instance segmentation accuracy, thus requiring an increase in the weight of the optical flow method. Adaptive weight adjustment ensures detection accuracy under different lighting conditions. Those skilled in the art can adjust this threshold based on lighting conditions, water depth, water turbidity, and actual needs in different environments.

[0124] The second trial feeding index in subsequent steps and the comprehensive feeding index for each round in the adaptive feeding process are calculated using the above method.

[0125] It should be noted that the first YOLOv8 instance segmentation model is a lightweight version, taking a single-view original image as input and outputting only a binary mask of the red-finned pufferfish for fast calculation of clustering. The second YOLOv8 instance segmentation model is a high-precision version, taking a panoramic fused image as input and outputting a binary mask, bounding box, and class confidence score for each red-finned pufferfish individual. It is used in conjunction with a Kalman filter tracking algorithm to track individual trajectories for calculating the feeding index. Both models are trained using red-finned pufferfish image datasets under different lighting conditions and water turbidity levels, with an inference confidence threshold of 0.5 for both models.

[0126] This embodiment employs a dual-modal fusion approach combining optical flow and instance segmentation to calculate the feeding index. Optical flow, based on pixel motion statistics of the overall feeding movement of the fish school, is more robust to fluctuations in water turbidity and sudden changes in light intensity, but it cannot distinguish between individual fish and water layer distribution. Instance segmentation can accurately identify the number of fish, water layer location, and individual movement speed, with high accuracy in static feature representation, but its recognition rate decreases under strong light reflection and high turbidity scenarios. The two methods are weighted and fused, and the weighting coefficients are adapted to different lighting and turbidity environments to achieve complementary errors between the two modalities. This enables environmentally adaptive feeding status assessment, significantly improving the accuracy of the feeding index under different aquaculture scenarios and avoiding the failure risk of a single visual modality.

[0127] Example 3:

[0128] This embodiment provides a detailed explanation of the calculation rules for feeding status and the termination criteria.

[0129] Feeding status is determined based on feeding fatigue coefficient, number of consecutive decline cycles, number of feeding cycles in the adaptive feeding process, and total daily feeding amount.

[0130] The formula for calculating the food fatigue coefficient is as follows: ;

[0131] F represents the feeding fatigue coefficient for the current round. The closer the value is to 1, the more significant the decline in the fish's feeding desire. This refers to the historical maximum feeding index during this feeding process.

[0132] like ,but And the number of consecutive rounds decreased. Reset to zero;

[0133] like ,and ,but Unchanged, continuously decreasing rounds ;

[0134] like ,and ,but Unchanged, continuously decreasing rounds Reset to zero.

[0135] A series of consecutive declines refers to the number of times the fish's feeding activity level decreases in each feeding cycle.

[0136] Termination conditions include satiety, round number, and total quantity; meeting any one of these conditions will trigger the termination condition.

[0137] Satiation condition: If the feeding fatigue coefficient is greater than or equal to a preset satiation fatigue threshold and the number of consecutive decreasing rounds is greater than or equal to a preset round threshold, then the current fish population is determined to be satiated, and the termination condition is met. The satiation fatigue threshold ranges from 0.4 to 0.6, and the round threshold ranges from 2 to 3. In this embodiment, the satiation fatigue threshold is 0.5, and the round threshold is 2.

[0138] Round condition: The number of rounds in the adaptive feeding process reaches the preset maximum number of rounds (6 rounds in this embodiment).

[0139] Total Feeding Limit: The total daily feeding amount (including self-attracting feeding, trial feeding, and adaptive feeding) must reach the preset daily feeding limit. Before each feeding round, the cumulative daily feeding amount is calculated. If the remaining amount is less than the calculated feeding amount for the next round, feeding will continue until the remaining amount is reached. The daily feeding limit is determined based on the total biomass of the fish population, ranging from 1% to 5% of the total biomass.

[0140] Example 4:

[0141] The application object of this embodiment is a standard single-mouth circular culture pond in a certain aquaculture workshop. The culture pond has a diameter of 8m and a water depth of 1.5m. The cultured species is redfin pufferfish. The average size of the fish is 400±15g / fish, and the total biomass of the fish is 500kg. A recirculating aquaculture system is adopted.

[0142] I. Basic Conditions

[0143] Hardware configuration: The feeding area is located in the center of the aquaculture pond, with a rectangular projection on the water surface; a 2-megapixel underwater high-definition waterproof camera is installed at each of the four corners of the feeding area, with a frame rate of 25fps, which can simultaneously cover the water surface and the middle and lower water layers; an automatic feeder is installed directly above the feeding area, with a feeding range covering the entire feeding area.

[0144] The cameras were calibrated using Zhang's calibration method for internal parameters and using an underwater checkerboard calibration plate for external parameters. The calibration process was combined with water refractive index of 1.33 for refraction distortion correction. The homography matrix of the four cameras was solved by extracting the corresponding corner points of the calibration plate to construct a unified world coordinate system, which enabled pixel-level spatial alignment of multi-view images with an alignment error of no more than 2 pixels.

[0145] Preset feeding parameters:

[0146] Trial feeding amount: 0.2% of the total biomass of the fish population, i.e., 1 kg;

[0147] Daily feeding limit: 3% of the total biomass of the fish population, i.e., 15 kg;

[0148] Maximum feeding amount per round Take 1 / 3 of the daily feeding limit, approximately 5 kg;

[0149] Magnification factor D: 1.7;

[0150] Aggregation threshold: 80%, first baseline duration: 8s, continuous stability judgment criterion is that the deviation of the aggregation degree of each frame within 8 consecutive seconds from the average value of the time period is ≤ ±5%;

[0151] Sliding time window: 15s;

[0152] Fatigue threshold: 0.5; Round threshold: 2 rounds; Maximum adaptive feeding rounds: 6 rounds;

[0153] Minimum effective threshold Take 1% of the maximum calorie intake index in the pre-calibrated scenario;

[0154] Real-time environmental parameters: During the feeding period, the measured water temperature was 24±1℃, the dissolved oxygen in the water was 6.2mg / L, and the light intensity on the water surface was 1200lux.

[0155] II. Complete Feeding Execution Process

[0156] Step S1: Parameter initialization: Based on a total fish biomass of 500kg, complete the setting of all the above feeding parameters and system thresholds, and confirm that each device is functioning normally.

[0157] Step S2: Autonomous attraction and feeding process.

[0158] Initiate autonomous attraction and feeding: The amount of each feeding is 15% of the trial feeding amount, i.e., 150g; the feeder uses pulse throwing, performing a single feeding every 10 seconds, and feeding and image acquisition are carried out simultaneously.

[0159] The first lightweight instance segmentation model is used to capture the screen, calculate the single-frame clustering degree, and take the average value of the 15-second sliding window as the real-time clustering degree.

[0160] In the early stages of feeding, the fish were dispersed, with an initial aggregation rate of about 28%. After 50 seconds of continuous feeding and the completion of the 6th feeding, the real-time aggregation rate rose to 81%, and the fluctuation range was ≤±4% for 8 consecutive seconds, which met the aggregation rate judgment conditions, and the fish were able to attract and feed themselves.

[0161] During this attraction phase, a total of 900g of feed was given, which did not exceed the upper limit for trial feeding.

[0162] Step S3: In this stage, equal-volume double trial feeding is used to eliminate the feeding initiation delay: the first feeding awakens the fish's feeding state, and the second feeding collects steady-state feeding response data.

[0163] First trial feeding: 1 kg of feed was fed by the feeder; after the feeding was completed, the first feeding video was collected and the first trial feeding index was calculated.

[0164] Based on dual-modal fusion calculation: Normalized optical flow index =0.45, normalized segmentation activity =0.52; Since the light intensity is 1200 lux ≤ 3000 lux, take... =0.4、 =0.6, calculated as follows:

[0165] =0.4×0.45+0.6×0.52=0.492.

[0166] After a 30-second interval following the first feeding, a second trial feeding was conducted: 1 kg of feed was fed in the same quantity. After the second feeding, a second feeding video was recorded. At this point, the fish had eliminated the initial feeding delay and entered a steady-state feeding state. The second trial feeding index was calculated.

[0167] The normalized optical flow index Q2 = 0.68, and the normalized segmentation activity A2 = 0.75; calculated with the same weights: =0.4×0.68+0.6×0.75=0.722.

[0168] Calculate the feeding response gain coefficient: ;because Much greater than the minimum effective threshold No need to trigger the lower limit protection.

[0169] Environmental correction factor: water temperature 24±1℃, within the 22-26℃ range. Dissolved oxygen ≥ 5 mg / L (6.2 mg / L) ; .

[0170] Step S4: Multi-round adaptive feeding process

[0171] After completing the trial feeding, initialize the feeding parameters: historical maximum feeding index. The number of consecutive decreasing rounds is n=0.

[0172] The first round of adaptive feeding:

[0173] The first round of feeding amount for adaptive feeding: ;

[0174] Since the amount of feed given in the first round is less than the maximum amount of feed given in a single round by 5 kg, the amount of feed given in the first round is 2.494 kg.

[0175] First round of formal feeding index It is 0.841.

[0176] Update iteration parameters: because =0.841> =0.722, Update The index is 0.841, and the number of consecutive decreasing rounds (n) is reset to zero; the previous round's food intake index is then reset. The value has been updated to 0.841, and the previous feeding amount has been updated to 2.494 kg.

[0177] The second round of adaptive feeding:

[0178] Feeding status coefficient and feeding amount for the next round: ;

[0179] ;

[0180] The second round of feeding and video recording was completed, and the feeding index for the second round was calculated. =0.735.

[0181] Update iteration parameters: =0.735< =0.841, and < =0.841, therefore, The number of consecutive decreasing rounds is n=1;

[0182] renew =0.735, the previous feeding amount was updated to 2.494 kg.

[0183] The third round of adaptive feeding:

[0184] Feeding amount for the next round: ;

[0185] ;

[0186] The third round of feeding and video recording was completed, and the feeding index for the third round was calculated. =0.580.

[0187] Update iteration parameters: =0.580< =0.841, and < =0.735, continuous decreasing rounds n=2;

[0188] Calculate the fatigue coefficient from food intake: The satiety threshold of 0.5 was not reached.

[0189] renew =0.580, the previous feeding amount was updated to 2.180kg.

[0190] Fourth round of adaptive feeding:

[0191] Calculate the feeding amount for the next round: ;

[0192] ;

[0193] The fourth round of feeding and video recording was completed, and the feeding index for the fourth round was calculated. =0.374.

[0194] Termination decision: =0.374< =0.841, and < =0.580, continuous decreasing rounds n=3;

[0195] Calculate the fatigue coefficient from food intake: When the satiation condition of "feeding fatigue coefficient ≥ 0.5 and continuous decrease for ≥ 2 rounds" is met, the adaptive feeding process terminates.

[0196] Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

Claims

1. An adaptive feeding method for redfin pufferfish based on bimodal machine vision, characterized in that, Includes the following steps: Step S1: Determine the basic information and feeding parameters of the redfin pufferfish; the feeding parameters include the aggregation threshold and the first baseline duration; Step S2: Implement an autonomous fish attraction and feeding process for the current fish population, and calculate the aggregation degree of the current fish population in real time; Determine whether the autonomous attraction and feeding process has been completed based on the current concentration of fish in the school; If the current fish population density is greater than or equal to the preset population density threshold and remains stable for the first baseline duration, then the autonomous attraction and feeding process is considered complete, and the process proceeds to the next step. Otherwise, continue with the autonomous attraction and feeding process; Step S3: Conduct a trial feeding process for the current fish group and collect feeding videos of the current fish group during the trial feeding process to determine the first trial feeding index and the second trial feeding index of the current fish group; Step S4: Using the first and second trial feeding indices of the current fish population as initial benchmarks, conduct multiple rounds of adaptive feeding for the current fish population; after each round of feeding, dynamically adjust the feeding amount for the next round based on the feeding index of the fish population until the preset termination condition is met.

2. The adaptive feeding method for redfin pufferfish based on bimodal machine vision according to claim 1, characterized in that, Step S2 includes the following steps: Step S21: The self-feeding device feeds the feeding area in batches according to the single feeding amount, and collects the feeding scene of the current fish group to carry out the autonomous attraction and feeding process for the current fish group. Step S22: Input the feeding scene into the first YOLOv8 instance segmentation model to identify the red-finned pufferfish in the feeding scene and obtain the single-frame clustering degree; take the arithmetic mean of the single-frame clustering degree of all frames within the sliding time window as the current fish school clustering degree; Step S23: If the current fish population density is greater than or equal to the population density threshold and remains stable for the first baseline duration, the autonomous attraction and feeding process of the current fish population is completed, and proceed to step S3; otherwise, continue with batch feeding and population density monitoring.

3. The adaptive feeding method for red-finned pufferfish based on bimodal machine vision according to claim 1, characterized in that, Step S3 includes the following steps: Step S31: Based on the initial feeding amount, conduct the first trial feeding on the current fish population and collect the first feeding video; obtain the first trial feeding index of the current fish population based on the first feeding video; Step S32: Based on the initial feeding amount, conduct a second trial feeding on the current fish population and collect a second feeding video; obtain the second trial feeding index of the current fish population based on the second feeding video.

4. The adaptive feeding method for redfin pufferfish based on bimodal machine vision according to claim 1, characterized in that, The adaptive feeding process refers to: initializing the adaptive feeding parameters based on the first and second trial feeding indices, then executing the first round of formal feeding, and subsequently entering the iterative cycle adjustment of the remaining rounds.

5. The adaptive feeding method for redfin pufferfish based on bimodal machine vision according to claim 4, characterized in that, The steps for the first round of formal feeding are as follows: Step A1: Determine the feeding amount for the first round based on the first trial feeding index, the second trial feeding index, and the trial feeding amount, and initialize the feeding parameters; the feeding parameters include the historical maximum feeding index and the number of consecutive decreasing rounds; Step A2: The feeding device performs the first round of feeding based on the feeding amount of the first round, and collects the first formal feeding video after the feeding is completed; Step A3: Obtain the first formal feeding index based on the first formal feeding video, record it as the feeding index for the current round, and update the feeding parameters.

6. The adaptive feeding method for redfin pufferfish based on bimodal machine vision according to claim 5, characterized in that, The iterative feeding steps for the remaining rounds are as follows: Step B1: Feed the current fish group based on the current feeding amount and collect feeding videos for the current round; Step B2: Calculate the feeding index for the current round based on the feeding video of the current round, update the feeding parameters, and determine the feeding status of the current round; Step B3: Determine whether to terminate feeding based on the current feeding status; If the feeding status in the current round meets any termination condition, the adaptive feeding process terminates. If the feeding status in the current round does not meet the termination condition, proceed to the next step and calculate the feeding amount for the next round. Step B4: Calculate the feeding amount for the next round based on the feeding index of the current round and the feeding index of the previous round, use the feeding amount of the next round as the new feeding amount for the current round, and return to step B1.

7. The adaptive feeding method for redfin pufferfish based on bimodal machine vision according to claim 6, characterized in that, Feeding status is determined based on feeding fatigue coefficient, number of consecutive decline cycles, number of adaptive feeding cycles, and total daily feeding amount; The formula for calculating the dietary fatigue coefficient is: ; F represents the feeding fatigue coefficient for the current round; The highest historical food intake index; The previous feeding index; like ,but And the number of consecutive rounds decreased. Reset to zero; like ,and ,but Unchanged, continuously decreasing rounds ; like ,and ,but Unchanged, continuously decreasing rounds Reset to zero.

8. The adaptive feeding method for redfin pufferfish based on bimodal machine vision according to claim 7, characterized in that, Termination conditions include: satiety condition, round condition, and total quantity condition; Satiety condition: The satiation fatigue coefficient is greater than or equal to the satiation fatigue threshold and the number of consecutive decreases is greater than or equal to the round threshold; Round condition: The adaptive feeding round reaches the preset maximum round; Total quantity condition: The total amount of food fed in a day reaches the daily feeding limit.

9. The adaptive feeding method for redfin pufferfish based on bimodal machine vision according to claim 3, characterized in that, Step S31 includes the following steps: Step S311: Perform image preprocessing on each frame of the first feeding video to obtain the preprocessed feeding image; process the preprocessed feeding image based on optical flow to obtain the first feeding behavior quantification index; Step S312: Input the first feeding video into the second YOLOv8 instance segmentation model to obtain the first feeding activity; Step S313: Based on the first feeding behavior quantification index and the first feeding activity, a weighted fusion is performed to obtain the first trial feeding index.

10. The adaptive feeding method for redfin pufferfish based on bimodal machine vision according to claim 9, characterized in that, Step S311 includes the following steps: Step S3111, Image preprocessing: The first feeding video is processed frame by frame to obtain the RGB image of each frame. Then, the RGB image is converted to the HSV color space and the luminance channel and chrominance channel are separated. The luminance channel is subjected to block-limited contrast adaptive histogram equalization. Then, Gaussian filtering is used to remove the noise of suspended particles in the water, so as to obtain the preprocessed feeding image. Step S3112: Image fusion: Map the preprocessed feeding images to a unified world coordinate system, and use a weighted fusion algorithm to generate a panoramic water image; Step S3113, Optical flow calculation: The optical flow field of the panoramic water images of two adjacent frames is calculated using the optical flow method to obtain the displacement vector of each pixel. Step S3114, Pixel weight calculation: Calculate the pixel weight based on the displacement vector of each pixel and the elliptic Gaussian weight function; Step S3115, Calculation of single-frame optical flow quantization index: The optical flow quantization index of each frame image is calculated based on pixel weights; Step S3116, Calculation of average optical flow quantization index: Take the arithmetic mean of the optical flow quantization indexes of all frames of the first feeding video to obtain the first feeding behavior quantization index.