A method and system for detecting satiation index of juvenile fish based on abdominal curve fitting

CN122990748APending Publication Date: 2026-10-27ANHUI SCI & TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610749837.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-28
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

前者仅在投喂期间有效,且易受环境干扰;后者更具直接性,但传统的直接观察方法多依赖人工主观评估腹部饱满程度,存在以下问题:(1)缺乏量化标准,不同观察者之间判断差异大;(2)无法实现连续、实时监测;(3)难以消除因鱼体尺寸、拍摄距离不同造成的视觉尺度差异,导致评估结果不可比

Benefits of technology

[0044]1、非侵入、直接量化:直接利用鱼体自身的腹部形态变化这一生理表型特征进行量化,无需饵料作为刺激源,可在任意时间点进行评估,实现了对个体鱼生理状态的直接、非侵入式监测。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122990748A_ABST
    Figure CN122990748A_ABST
Patent Text Reader

Abstract

The present application provides a kind of based on abdominal curve fitting juvenile fish satiation index detection method, system, comprising: data acquisition and pretreatment;Improved YOLOv8s-ALL model is used to infer input image, and the abdominal key point position corresponding to the fish body boundary frame detected is output;For each detected individual fish, its abdominal key point is regarded as discrete node, and optimized moving least square method is used for curve fitting, to generate abdominal contour curve;Satiation index is calculated based on abdominal contour curve;Based on the satiation threshold value, the fish state is judged.The present application realizes the non-invasive, direct quantitative individual fish physiological state detection, and the detection algorithm is high in accuracy, strong in robustness, efficient in calculation, suitable for deployment, and good in generality, realizes the automatic, digitization, real-time evaluation of individual fish satiation state, provides direct basis for accurate feeding decision, improves feed conversion rate, reduces breeding cost and environmental risk.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent monitoring technology for aquaculture, and particularly relates to a method and system for detecting the satiety index of juvenile fish based on abdominal curve fitting. Background Technology

[0002] Fish feeding is a core aspect of aquaculture; improper feeding strategies can lead to feed waste, water quality deterioration, and damage to fish health. Traditional feeding methods rely heavily on human experience, which suffers from high subjectivity, delayed feedback, and difficulty in achieving precise control. With the development of precision aquaculture, machine vision-based fish behavior and condition monitoring technologies have gradually become a research hotspot.

[0003] However, existing technologies mainly assess fish feeding needs from two perspectives: one is indirectly by analyzing feeding behavior (such as swimming speed and school density) or the amount of leftover food; the other is directly by observing fish phenotypic characteristics. The former is only effective during feeding and is easily affected by environmental interference; the latter is more direct, but traditional direct observation methods mostly rely on subjective human assessment of abdominal fullness, which has the following problems: (1) lack of quantitative standards, resulting in large differences in judgment between different observers; (2) inability to achieve continuous, real-time monitoring; (3) difficulty in eliminating visual scale differences caused by different fish sizes and shooting distances, leading to incomparable assessment results. Therefore, how to transform unstructured visual information such as abdominal morphology into a quantifiable satiety index remains a challenge.

[0004] Furthermore, existing target detection models (such as the YOLO series) often struggle to balance detection accuracy and real-time performance in complex aquaculture environments (e.g., varying target sizes and high density): they are prone to missing small targets at a distance, while large targets nearby can lead to excessive computational burden. In addition, traditional least squares or moving least squares methods suffer from problems such as improper support domain partitioning and distorted inflection point weights when stably and accurately fitting closed contour curves reflecting abdominal fullness from detected discrete key points, resulting in a high fitting failure rate.

[0005] To address this, the present invention improves upon the traditional algorithm model and designs a novel method and system for detecting the satiety index of juvenile fish based on abdominal curve fitting. Summary of the Invention

[0006] To address the shortcomings of existing technologies, this invention provides a method and system for detecting the satiety index of juvenile fish based on abdominal curve fitting. This method enables automated, digital, and real-time assessment of the satiety status of individual fish, providing a direct basis for precise feeding decisions, thereby improving feed conversion rate and reducing aquaculture costs and environmental risks.

[0007] The present invention achieves the above-mentioned technical objectives through the following technical means.

[0008] A method for detecting the satiety index of juvenile fish based on abdominal curve fitting includes the following steps:

[0009] Step 1: Deploy image acquisition equipment on the breeding pond to collect fish data, filter and crop the data to build a dataset, use annotation tools to annotate the minimum bounding rectangle bounding box of individual fish in the dataset, and evenly annotate 12 key points on the abdominal contour;

[0010] Step 2: Use the improved YOLOv8s-ALL model to infer the input image and obtain the fish's bounding box and its corresponding abdominal keypoint locations. The improved YOLOv8s-ALL model is based on the YOLOv8s architecture and includes a backbone network, a neck network, and a head network. The backbone network replaces the C2f module in the original YOLOv8s with a C2f_MSDA module that integrates MSDA. The neck network adopts the PANet structure, replacing the original convolution with an SDS convolution module and the C2f structure with an SDS_CSP module. The head network contains three output branches, corresponding to small, medium, and large-scale targets, respectively. Each branch is divided into a bounding box regression sub-branch and an abdominal keypoint detection sub-branch.

[0011] Step 3: For each detected individual fish, its abdominal key points are used as discrete nodes. An optimized moving least squares method is used for curve fitting to generate a smooth, closed abdominal contour curve; details are as follows:

[0012] Step 3.1: Construct the basic fitting function of the second-order polynomial, define the basis function vector, and define the local fitting coefficient vectors of the horizontal and vertical axes respectively, and determine the local fitting value expressions of the horizontal and vertical axes;

[0013] Step 3.2: Bidirectional support domain partitioning; For the closed sequence of key points, for the position to be fitted between adjacent key points, select multiple neighboring key points forward and backward along the key point sequence to form a support domain, and set the radius of the support domain;

[0014] Step 3.3: Geometric perception weight allocation; Calculate the Euclidean distance from the support point in the support domain to the current position to be fitted, calculate the normalized distance based on the Euclidean distance and the radius of the support domain, and allocate weights using a Gaussian weight function with compact support conditions.

[0015] Step 3.4: Local fitting and curve generation; For each position to be fitted, based on the support points in its support domain and the weights calculated in step 3.3, solve the weighted least squares problem to obtain the local coefficient vectors of the horizontal and vertical coordinates, calculate the fitting coordinates of each interpolation position, generate multiple fitting points and connect them end to end to form a closed abdominal contour curve.

[0016] Step 4: Calculate the satiety index based on the closed abdominal contour curve obtained in Step 3;

[0017] Step 5: Determine the satiety threshold based on the gastrointestinal emptying time of the target fish species, compare and analyze the satiety index with the satiety threshold, and determine whether the individual fish is satiety or not.

[0018] Furthermore, in step 4, the satiety index for: , This represents the area enclosed by the closed abdominal contour curve. It represents the circumference of the closed abdominal contour curve.

[0019] Furthermore, in step 2, the implementation of the backbone network MSDA is as follows:

[0020] The input feature map is first linearly projected to obtain the query matrix, key matrix, and value matrix; the feature map channels are then divided into multiple independent attention heads, each using a different dilation rate; for the ... With one attention head, performing a sliding window expansion attention operation outputs: , This indicates a sliding window operation that expands attention. , , They represent the first The query matrix, key matrix, and value matrix of the first attention head; Individual attention is focused on spatial location The attention value at this location is: , , These represent the indices of the feature map in the height and width directions, respectively. Indicates the first The focus of attention is on spatial location The query vector, Indicated by expansion rate Transpose of the set of key vectors sparsely selected from the key matrix Indicated by expansion rate A set of value vectors sparsely selected from the key matrix Represents the normalized exponential function, Indicates the dimension of the key vector;

[0021] The sliding window expansion attention operation selects key-value pairs sparsely according to the expansion rate within a sliding window centered on the query position and with a size equal to the window's side length. The sparse space set is represented as follows: , Indicates the first A person's attention is focused on the position. The sparse space set to be processed Indicates the side length of the sliding window. Indicates an integer offset in the height direction. This represents the integer offset in the width direction; the outputs of each attention head are fused by a linear layer; by using different expansion rates, MSDA enables each attention head to have a receptive field of 3×3, 5×5, and 7×7, respectively, thereby simultaneously capturing local details and long-range dependencies and improving the detection capability of targets at different scales.

[0022] Furthermore, in step 2, the SDS convolution module of the neck network first divides the feature map into two branches. One branch uses standard convolution, which is output after convolution, batch normalization, and Sigmoid Linear Unit activation function operations. The other branch uses depthwise separable convolution, which first performs channel-wise convolution and then pointwise convolution. Then, the outputs of the two branches are concatenated in the channel dimension, and then the outputs of standard convolution and depthwise separable convolution are uniformly mixed through a shuffling operation, so that the dense information generated by standard convolution is integrated into each part of depthwise separable convolution, thereby reducing the amount of computation while maintaining expressive power.

[0023] The SDS_CSP module is based on the idea of ​​one-time aggregation, which aggregates cross-stage branch features only at the end of the module to avoid the memory overhead caused by dense connections. The SDS_CSP module includes cross-stage branches, SDS bottleneck layer and end SDS convolutional fusion layer.

[0024] Furthermore, step 3.2 is detailed as follows:

[0025] The key point closed sequence is Total number of key points =12, Indicates the first One key point is that the abdominal contour is a closed curve. and Connecting beginning and end; for adjacent key points and ( The current position to be fitted between ) Select forward along the current interval's starting point and backward along the current interval's ending point respectively. Given _n neighborhood key points, including the two endpoints of the current interval, construct the _n ... Support domain set corresponding to each key point interval :

[0026]

[0027] This represents the offset used to select neighboring points forward or backward from the current interval endpoint. Indicates by Modulo closed-loop numbering operation;

[0028] Take each support point within the support domain to the current fitting position. The maximum Euclidean distance is used as the radius of the support domain: , Indicates the first Within the interval of key points, at the current position to be fitted The radius of the support domain is used as a reference. Indicates support domain Inner One support point, Indicates support domain The number of support points This represents the Euclidean distance.

[0029] Furthermore, step 3.3 is detailed as follows:

[0030] For the interval formed by adjacent key points, generate the current position to be fitted on the line segment connecting the two key points: ,in, Indicates the first The interpolation parameters for each key point interval are: The position to be fitted, and These represent the x-coordinate and y-coordinate of the position, respectively. Indicates the key point at the beginning of the current interval. Indicates the key point at the end of the current interval. Represents the normalized interpolation parameters within the interval; for the support domain Inner Support points First, calculate its current position to be fitted. Euclidean distance: ,in, Indicates support domain Inner Support points to the current position to be fitted The Euclidean distance is calculated; then its normalized distance is calculated: , Indicates support domain Inner Each support point is relative to the current position to be fitted. Normalized distance, This represents the support domain radius set in step 3.2; the weighting function is Gaussian and a compact support condition is introduced:

[0031]

[0032] in, Indicates the first Within the interval of the key points The weight of each support point This represents the Gaussian attenuation coefficient. This represents the natural exponential function.

[0033] Furthermore, step 3.4 is detailed as follows:

[0034] For each position to be fitted Based on the support points within its support domain and the weights calculated in step 3.3 Solve the weighted least squares problem in step 3.1 to obtain the local coefficient vector of the horizontal axis. and the local coefficient vector of the ordinate Then calculate the coordinates of the fitted point according to the following formula:

[0035]

[0036] in, and These represent the fitted values ​​of the horizontal and vertical axes obtained by calculating using the local fitting function, respectively. This represents the point where the abdominal contour is fitted at the current interpolation position. This represents the transpose of the second-order polynomial basis function vector at the current position to be fitted. and These are represented as the local fitting coefficient vectors of the horizontal and vertical coordinates obtained in step 3.1 by minimizing the weighted sum of squared residuals; several interpolation parameters are selected at equal intervals within each adjacent keypoint interval. The target number of fitting points for the closed curve is 30. The fitting coordinates of each interpolation position are calculated in sequence to obtain all the fitting points of the abdominal contour. The last fitting point is connected to the first fitting point to form a closed abdominal contour curve.

[0037] A system for implementing the above-mentioned method for detecting the satiety index of juvenile fish based on abdominal curve fitting, comprising:

[0038] The data acquisition module uses image acquisition equipment to acquire video or image sequences containing the target fish group and transmits them to the host computer, where various modules integrated within the host computer perform subsequent data analysis and processing.

[0039] The target and key point detection module uses an improved YOLOv8s-ALL model to infer the input image and outputs the bounding box of each fish body and the corresponding set of abdominal key points.

[0040] The curve fitting module uses the key points on the abdomen of each detected individual fish as discrete nodes and employs an optimized moving least squares method to perform curve fitting, generating a smooth, closed abdominal contour curve.

[0041] The satiety index calculation module calculates the satiety index based on the abdominal contour curve.

[0042] The state classification module compares and analyzes the satiety index with the satiety discrimination threshold to determine whether the fish are in a satiety or non-satiation state.

[0043] The present invention has the following beneficial effects:

[0044] 1. Non-invasive and direct quantification: It directly utilizes the physiological phenotypic characteristics of changes in the abdominal morphology of the fish itself for quantification. No food is required as a stimulus source, and assessment can be carried out at any time point, realizing direct and non-invasive monitoring of the physiological state of individual fish.

[0045] 2. High accuracy and robustness: The improved YOLOv8s-ALL model achieves detection accuracy of 95.03% for fish bodies and 92.76% for key points in complex scenes. The optimized curve fitting method achieves a success rate of 98.7%. The satiety index classification based on roundness achieves an accuracy of 95.21%, with extremely low false positive and false negative rates.

[0046] 3. Computationally efficient and easy to deploy: Through lightweight design such as MSDA, SDS convolution and SDS_CSP, the number of model parameters and computational cost are reduced by 20.66% and 26.05% respectively compared with the baseline model. Real-time processing speed of over 60 FPS can be achieved on edge computing devices such as Jetson Xavier NX, meeting the real-time monitoring needs of actual aquaculture farms.

[0047] 4. Good versatility: The proposed satiety index (roundness) is a relative measure that is independent of the absolute size of the target, which can eliminate the influence of scale differences caused by the different distances of fish from the camera, making the satiety assessments of different individuals comparable.

[0048] 5. Great application potential: This method provides key status sensing technology for building intelligent feeding systems. Its output results can be directly used to trigger or adjust automatic feeders, realize precise feeding on demand, and improve the level of intelligence and economic benefits of aquaculture management. Attached Figure Description

[0049] Figure 1 This is a flowchart of the method for detecting the satiety index of juvenile fish based on abdominal curve fitting as described in this invention.

[0050] Figure 2 This is a schematic diagram of the improved YOLOv8s-ALL network structure described in this invention;

[0051] Figure 3 This is a schematic diagram of the detection results for key points in the abdomen.

[0052] Figure 4 This is a schematic diagram of bidirectional support domain partitioning and geometric weight allocation;

[0053] Figure 5 The image shows the fitting result of the abdominal closed curve.

[0054] Figure 6 This is a schematic diagram showing the results of the satiety index calculation and classification. Detailed Implementation

[0055] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but the scope of protection of the present invention is not limited thereto.

[0056] Reference Figure 1 As shown, the method for detecting the satiety index of juvenile fish based on abdominal curve fitting according to the present invention includes the following process:

[0057] Step 1: Data Acquisition and Preprocessing; Image acquisition devices are deployed above or to the side of the aquaculture pond to collect video or image sequences containing the target fish population, and then transmitted to the host computer for subsequent data analysis and processing. First, the acquired images are filtered and cropped, and a dataset for model training and testing is constructed. The individual fish in the dataset are labeled using the graphic image annotation tool Labelme: the minimum bounding rectangle of each individual fish is labeled, and 12 key points are evenly labeled on the abdominal contour.

[0058] Step 2: Target and key point detection; using methods such as... Figure 2 The improved YOLOv8s-ALL model shown performs inference on the input image. This model uses the bounding boxes and abdominal keypoints labeled during training as learning targets, and during inference, it can simultaneously output the bounding box of each individual fish and the coordinates of 12 abdominal keypoints. The model's input is the original image, and the output is the detected fish bounding box and its corresponding abdominal keypoint locations.

[0059] The improved YOLOv8s-ALL model is based on the YOLOv8s architecture and includes a backbone network, a neck network, and a head network. The specific internal structure and image processing flow are as follows:

[0060] (1) Backbone network feature extraction;

[0061] The input image first enters the backbone network, which is an improvement on the CSPDarkNet (Cross Stage Partial Darknet) structure, containing multiple convolutional layers and a C2f (Convolution to Feature) module. The original C2f module in YOLOv8s is improved to a C2f_MSDA module, which integrates Multi-Scale Dilated Attention (MSDA). MSDA is implemented as follows: Let the input feature map be... The feature map height and width are set to 1. and First, the query matrix is ​​obtained through linear projection. Key matrix Value matrix Divide the feature map channels into An independent attention head (in this embodiment) ), No. The expansion rate used by each attention head is ,in (Expansion rate of the first attention head) The expansion rate of the second attention head The expansion rate of the third attention head For the first... With one attention head, performing a sliding window expansion attention operation outputs: ,in, This indicates a sliding window operation that expands attention. , , They represent the first The query matrix, key matrix, and value matrix for each attention head. For spatial location... Attention is calculated as follows: ,in, Indicates the attention head number, Indicates the first A person's attention is Attention value at the location, These represent the indices of the feature map in the height and width directions, respectively. , , Indicates the first The focus of attention is on spatial location The query vector, Indicated by expansion rate Transpose of the set of key vectors sparsely selected from the key matrix Indicated by expansion rate A set of value vectors sparsely selected from the key matrix Represents the normalized exponential function, This represents the dimension of the key vector.

[0062] The sliding window expansion attention operation selects key-value pairs sparsely according to the expansion rate within a sliding window centered on the query position and with a size equal to the window's side length. The sparse space set is represented as follows: ,in, Indicates the first A person's attention is focused on the position. The sparse space set to be processed Indicates the side length of the sliding window (in this embodiment) ), Indicates an integer offset in the height direction. This represents the integer offset in the width direction. The outputs of each attention head are fused by a linear layer. By using different dilation rates, MSDA enables each attention head to have a receptive field of 3×3, 5×5, and 7×7, respectively, thereby simultaneously capturing local details and long-range dependencies and improving the detection capability for targets at different scales.

[0063] (2) Neck network feature fusion;

[0064] The multi-scale feature maps output by the backbone network are fed into the neck network. The neck network uses a PANet (PathAggregationNetwork) structure for feature fusion, but replaces the original convolutional modules with a hybrid lightweight SDS convolutional module, and replaces the C2f structure with an SDS_CSP module.

[0065] The SDS convolutional module is constructed as follows: the number of input feature channels is denoted as... The number of output feature channels is denoted as First, the features are divided into two branches: one branch uses standard convolution, and after convolution, batch normalization, and Sigmoid Linear Unit activation function operation (Conv+BN+SiLU), the number of output channels is... The other branch uses depthwise separable convolution, first performing channel-wise convolution (each kernel handles one channel, keeping the number of channels constant), and then performing pointwise convolution (…). Convolution kernel, The number of channels input to the pointwise convolution in the previous layer, and the number of output channels. Concatenate the outputs of the two branches along the channel dimension to obtain a channel count of... The feature maps are then used to uniformly mix the outputs of standard convolutions and depthwise separable convolutions through a shuffle operation, integrating the dense information generated by the standard convolutions into each part of the depthwise separable convolutions. This design achieves approximately 50% of the computational cost of standard convolutions while maintaining expressive power.

[0066] The SDS_CSP module is based on the idea of ​​one-time aggregation: it only aggregates cross-stage branch features at the end of the module, avoiding the memory overhead caused by dense connections. Specifically, the SDS_CSP module includes cross-stage branches, an SDS bottleneck layer, and an end SDS convolutional fusion layer. The overall layer order and channel parameters of the neck network are as follows: It should be noted that layers 0 to 12 below describe the overall topological layer order of the neck network, where layers 3, 6, 9, and 12 are four SDS_CSP modules embedded at different scale fusion positions in the neck network, and the remaining layers are SPPF, upsampling, concatenation, or individual SDS convolutional layers.

[0067] Layer 0 (Input Layer): Receives feature map P5 output from the backbone network. P5 is the high-level feature map with the lowest spatial resolution and the strongest semantic information; when the input image size is 640×640, its spatial size is typically 20×20, and the number of channels is 512. This layer uses the Spatial Pyramid Pooling – Fast (SPPF) module to process P5. The SPPF module contains three consecutive max-pooling layers (pooling kernel size 5×5, stride 1, used for local feature enhancement without changing the spatial size), and the number of output channels remains 512.

[0068] Layer 1: Upsample layer, which upsamples the 512-channel feature map output from layer 0 by 2 times, doubling the size of the feature map while keeping the number of channels unchanged at 512.

[0069] Layer 2: Concat layer, which concatenates the intermediate-sized feature map P4 (256 channels, twice the size of P5) output by the backbone network with the upsampled feature map (512 channels) from layer 1 in the channel dimension to obtain a feature map with 768 channels;

[0070] Layer 3: SDS_CSP module (first one). Input channels are 768, output channels are 256. This module internally includes: First, an SDS convolutional layer reduces the input channels to 256. This SDS convolution is obtained by mixing standard convolutions and depthwise separable convolutions and then shuffling them. Then, a cross-stage partial connection structure is used: the input features are split into two paths, one directly passed, and the other passing through several SDS bottleneck layers. Finally, the two feature paths are concatenated and fused through an SDS convolution, resulting in an output feature map with 256 channels.

[0071] Layer 4: Upsample layer, which upsamples the 256-channel feature map output from layer 3 by a factor of 2, and doubles the size of the feature map while keeping the number of channels unchanged at 256.

[0072] Layer 5: Concat layer, which concatenates the smallest feature map P3 (128 channels, P3 is the shallow feature map with the highest spatial resolution and richest details, and its spatial size is twice that of P4) output by the backbone network with the feature map after upsampling from layer 4 (256 channels) in the channel dimension to obtain a feature map with 384 channels.

[0073] Layer 6: SDS_CSP module (2nd one). It has 384 input channels and 128 output channels. Its internal structure is similar to layer 3, with 128 output feature map channels.

[0074] Layer 7: SDS convolutional layer (used alone). Input channels: 128; Output channels: 128. This layer contains only one hybrid SDS convolution (no CSP structure), and the number of output feature map channels remains unchanged, used for subsequent feature fusion.

[0075] Layer 8: Concat layer, which concatenates the features from layer 4 before upsampling (i.e., the 256-channel feature map output from layer 3 after appropriate size matching) with the 128-channel feature map output from layer 7 in the channel dimension, resulting in a feature map with 384 channels.

[0076] Layer 9: SDS_CSP module (3rd one). It has 384 input channels, 256 output channels, and 256 output feature map channels.

[0077] Layer 10: SDS convolutional layer (used alone). It has 256 input channels and 256 output channels, and is used for further feature fusion.

[0078] Layer 11: Concat layer, which concatenates the largest feature map P5 (512 channels) output by the backbone network with the 256-channel feature map output by layer 10 after matching their spatial dimensions; the feature map output by layer 10 is made to match the spatial dimensions of P5 by using SDS convolution or downsampling operation with a stride of 2, and then concatenated along the channel dimension to obtain a feature map with 768 channels.

[0079] Layer 12: SDS_CSP module (4th). It has 768 input channels and 512 output channels. The output feature map has 512 channels and is one of the final outputs of the neck network, fed into the head network for object detection and keypoint regression.

[0080] The internal hierarchy of the SDS_CSP module mentioned above (taking the 3rd level as an example, with input 768 and output 256) can be further described as follows:

[0081] Branch 1: The input features pass directly through an SDS convolutional layer (1×1 kernel, stride 1, 128 output channels), and then enter an SDS bottleneck layer, which contains two SDS convolutions (3×3 kernel, stride 1), and finally outputs 128 channels.

[0082] Branch 2: The input features are passed through an SDS convolutional layer (1×1 kernel, stride 1, 128 output channels), then through a max pooling layer (5×5 pooling kernel, stride 1) for local feature enhancement without changing the spatial size, and then through another SDS convolutional layer (1×1 kernel, 128 output channels).

[0083] The outputs of branch 1 and branch 2 are concatenated along the channel dimension to obtain a 256-channel feature map, which is then output through an SDS convolutional layer (1×1 kernel, 1 stride, 256 output channels).

[0084] (3) Header network output;

[0085] The fused feature map output from the neck network is fed into the head network. The head network contains three output branches, corresponding to small, medium, and large-scale targets, respectively. Each branch is further divided into two sub-branches: one for bounding box regression (outputting the center coordinates of the bounding box). ,width ,high Another one is used for abdominal keypoint detection, outputting the coordinates of 12 keypoints.

[0086] After the above three processing steps, the YOLOv8s-ALL model finally outputs the bounding box of each fish body and the corresponding set of abdominal keypoints. A schematic diagram of the abdominal keypoint detection results is shown below. Figure 3As shown.

[0087] Step 3: Abdominal closed curve fitting; For each detected individual fish, its abdominal key points are used as discrete nodes, and an optimized moving least squares method is used for curve fitting to generate a smooth, closed abdominal contour curve. The specific process is as follows:

[0088] Step 3.1: Construct the basic fitting function;

[0089] Let the total number of key points in the abdomen (referred to as key points) be... (In this embodiment) ), No. The key points are recorded as follows: ,in, , Indicates the index of the key point on the closed contour curve. , Let x and y represent the x and y coordinates of the key point, respectively. For any local location to be fitted, let its coordinates be denoted as . ,in, , Let x and y represent the x and y coordinates of the position to be fitted in the image coordinate system, respectively. A second-order polynomial is used as the basic fitting function, and its basis function vector is defined as: ,in, Indicates the location The second-order polynomial basis function column vector is constructed at point 1, where 1 is a constant term. , For first-order coordinate terms, For intersecting terms, , For second-order coordinate terms, superscript This indicates transpose.

[0090] The current fitted interval number is denoted as The parameterized form of the position to be fitted within this interval is denoted as Then the position The vectors of local fitting coefficients to be obtained are the vectors of local fitting coefficients on the x-axis. and the vector of local fitting coefficients on the ordinate These two coordinates are used to fit the horizontal and vertical coordinates of the current abdominal contour points, respectively. Therefore, the coordinates of the locally fitted points can be expressed as:

[0091]

[0092] in, and These represent the fitted values ​​of the horizontal and vertical axes obtained by calculating using the local fitting function, respectively. This represents the point where the abdominal contour is fitted at the current interpolation position. This represents the transpose of the second-order polynomial basis function vector at the current position to be fitted. and These represent the vectors of local fitting coefficients on the x and y axes, obtained by minimizing the weighted sum of squared residuals.

[0093] For the Let the support region of the key point interval be . Support the first in the domain Each support point is represented as ,in This only indicates the supported domain. Local numbering of internal support points Let x and y be the x and y coordinates of the support point. The local fitting coefficient vectors for the x and y coordinates are determined by minimizing the weighted sum of squared residuals, respectively. , .in, and They represent the first The objective function is the weighted sum of squared residuals of the x and y coordinates within the interval of key points. Indicates support domain The number of support points Indicates support domain Inner Each support point relative to the position to be fitted The weight, Indicates at the support point The basis function vector obtained at point is transposed. and These represent the local fitting coefficient vectors for the horizontal and vertical axes, respectively. and These are the x and y coordinates of the support point.

[0094] Step 3.2: Bidirectional support domain partitioning;

[0095] Reference Figure 4 As shown, the traditional moving least squares method, which projects along the horizontal axis to divide the support domain, is not suitable for closed abdominal contours with connected ends. Therefore, this invention proposes a bidirectional support domain division method for closed keypoint sequences. Let the closed keypoint sequence be... ,in, Represents a closed sequence of key points. Indicates the first A key point in the abdomen, This represents the total number of key points. Since the abdominal contour is a closed curve... and Connected end to end. For adjacent key points and ( The current position to be fitted between ) Select forward along the current interval's starting point and backward along the current interval's ending point respectively. Key points (in this example) The support domain is defined as follows: ,in, Indicates the first The set of support domains corresponding to each key point interval This represents the offset used to select neighboring points forward or backward from the current interval endpoint. Indicates by Modulo closed-loop numbering operation; because ,according to The modulo subscript operation means that when the subscript is less than 0 or greater than 11, it automatically wraps back to the valid numbering range of 0-11. Indicates the key point from the starting point of the current interval. Start selecting the first (counter-clockwise / reverse direction) For each neighborhood key point, if the index is less than 0, the sequence automatically wraps back to the end. Indicates the key point from the current interval endpoint. Starting from the beginning, select the first (clockwise / sequential direction)... A neighborhood of key points, when the index exceeds When that happens, it automatically wraps back to the beginning of the sequence.

[0096] Let the radius of the support domain be Take each support point within the support domain and move it to the current fitting position. The maximum Euclidean distance is: ,in Indicates the first Within the interval of key points, at the current position to be fitted The radius of the support domain is used as a reference. Indicates support domain Inner One support point, Indicates support domain The number of support points This represents the Euclidean distance.

[0097] Step 3.3: Geometric perception weight allocation;

[0098] For the interval formed by adjacent key points, generate the current position to be fitted on the line segment connecting the two key points: ,in, Indicates the first The interpolation parameters for each key point interval are: The position to be fitted, and These represent the x-coordinate and y-coordinate of the position, respectively. Indicates the key point at the beginning of the current interval. Indicates the key point at the end of the current interval. This represents the normalized interpolation parameters within the interval. For the support domain... Inner Support points First, calculate its current position to be fitted. Euclidean distance: ,in, Indicates support domain Inner Support points to the current fitted position The Euclidean distance is then calculated. Then, its normalized distance is calculated: ,in, Indicates support domain Inner Each support point is relative to the current position to be fitted. Normalized distance, This represents the support region radius defined in step 3.2. The weighting function is Gaussian and a compact support condition is introduced:

[0099]

[0100] in, Indicates the first Within the interval of the key points The weight of each support point This represents the Gaussian attenuation coefficient (in this example) ), This represents the natural exponential function.

[0101] Step 3.4: Local fitting and curve generation;

[0102] For each position to be fitted Based on its supported domains The support points within and the weights calculated in step 3.3 Solve the weighted least squares problem in step 3.1 to obtain the local coefficient vector of the abscissa. and the local coefficient vector of the ordinate Then, calculate the coordinates of the fitted point according to the following formula:

[0103]

[0104] in, and These represent the fitted values ​​of the horizontal and vertical axes obtained by calculating using the local fitting function, respectively. This represents the point where the abdominal contour is fitted at the current interpolation position. This represents the transpose of the second-order polynomial basis function vector at the current position to be fitted. and These are represented as the local fitting coefficient vectors of the horizontal and vertical axes obtained in step 3.1 by minimizing the weighted sum of squared residuals. Within each adjacent keypoint interval... Several interpolation parameters are selected at equal intervals. In this example, the target number of fitting points for the closed curve is 30. The fitting coordinates of each interpolation position are calculated sequentially to obtain all fitting points of the abdominal contour. The last fitting point is then connected to the first fitting point to form a smooth closed curve.

[0105] Step 4: Satiety index calculation;

[0106] Let the perimeter of the closed curve obtained in step 3 be... The enclosed area is Define the satiety index. For the corrected roundness: ;in, Indicates the satiety index. This represents the area enclosed by the closed curve in the abdomen. Represents the circumference of the abdominal closed curve, coefficient The normalization factor for roundness derived from the standard circle (assuming the radius of the standard circle is ). Its perimeter ,area Then the roundness is ); The value range is (0,1]. A value closer to 1 indicates a more circular abdominal contour, meaning the fish is more satiated. This definition eliminates the influence of target imaging scale: for curves of similar shapes but different sizes, Since the values ​​are the same, individual fish at different distances are comparable.

[0107] Step 5: Classify satiety status;

[0108] The satiety threshold was determined based on the gastrointestinal emptying time of the target fish species (American black bass in this example); through experimental statistics, the abdominal satiety index of the target fish species was determined when gastrointestinal emptying was completed (time greater than 10 hours) or when the fish was close to starvation. It is approximately 0.47 ± 0.01. Therefore, it will... Set the satiety threshold as the threshold for judging the state of the individual fish. Compared with the satiety threshold: if SI ≥ 0.47, it is determined as "satisfied"; if SI < 0.47, it is determined as "not satietyed" (hunger), as detailed below. Figure 5 , 6As shown in the figure. This classification result can be used to guide feeding decisions.

[0109] The present invention also provides a system for implementing the above-mentioned method for detecting the satiety index of juvenile fish based on abdominal curve fitting, comprising:

[0110] The data acquisition module uses image acquisition equipment to acquire video or image sequences containing the target fish group and transmits them to the host computer, where various modules integrated within the host computer perform subsequent data analysis and processing.

[0111] The target and key point detection module uses an improved YOLOv8s-ALL model to infer the input image and outputs the bounding box of each fish body and the corresponding set of abdominal key points.

[0112] The curve fitting module uses the key points on the abdomen of each detected individual fish as discrete nodes and performs curve fitting using an optimized moving least squares method to generate a smooth, closed abdominal contour curve.

[0113] The satiety index calculation module calculates the satiety index based on the abdominal contour curve.

[0114] The status classification module compares and analyzes the satiety index with the satiety threshold to determine the hunger status of fish.

[0115] The embodiments described above are preferred embodiments of the present invention, but the present invention is not limited to the above embodiments. Any obvious improvements, substitutions or modifications that can be made by those skilled in the art without departing from the essence of the present invention shall fall within the protection scope of the present invention.

Claims

1. A method for detecting the satiety index of juvenile fish based on abdominal curve fitting, characterized in that, The process includes the following: Step 1: Deploy image acquisition equipment on the breeding pond to collect fish data, filter and crop the data to build a dataset, use annotation tools to annotate the minimum bounding rectangle bounding box of individual fish in the dataset, and evenly annotate 12 key points on the abdominal contour; Step 2: Use the improved YOLOv8s-ALL model to infer the input image and obtain the fish's bounding box and its corresponding abdominal keypoint locations. The improved YOLOv8s-ALL model is based on the YOLOv8s architecture and includes a backbone network, a neck network, and a head network. The backbone network replaces the C2f module in the original YOLOv8s with a C2f_MSDA module that integrates MSDA. The neck network adopts the PANet structure, replacing the original convolution with an SDS convolution module and the C2f structure with an SDS_CSP module. The head network contains three output branches, corresponding to small, medium, and large-scale targets, respectively. Each branch is divided into a bounding box regression sub-branch and an abdominal keypoint detection sub-branch. Step 3: For each detected individual fish, its abdominal key points are used as discrete nodes. An optimized moving least squares method is used for curve fitting to generate a smooth, closed abdominal contour curve; details are as follows: Step 3.1: Construct the basic fitting function of the second-order polynomial, define the basis function vector, and define the local fitting coefficient vector of the horizontal axis and the local fitting vector of the vertical axis respectively, and determine the expressions of the local fitting values ​​of the horizontal and vertical axes of the fitting point. Step 3.2: Bidirectional support domain partitioning; For the closed sequence of key points, for the position to be fitted between adjacent key points, select multiple neighboring key points forward and backward along the key point sequence to form a support domain, and set the radius of the support domain; Step 3.3: Geometric perception weight allocation; Calculate the Euclidean distance from the support point in the support domain to the current position to be fitted, calculate the normalized distance based on the Euclidean distance and the radius of the support domain, and allocate weights using a Gaussian weight function with compact support conditions. Step 3.4: Local fitting and curve generation; For each position to be fitted, based on the support points in its support domain and the weights calculated in step 3.3, solve the weighted least squares problem to obtain the local fitting coefficient vectors of the horizontal and vertical coordinates, calculate the fitting coordinates of each interpolation position, generate multiple fitting points and connect them end to end to form a closed abdominal contour curve. Step 4: Calculate the satiety index based on the closed abdominal contour curve obtained in Step 3; Step 5: Determine the satiety threshold based on the gastrointestinal emptying time of the target fish species, compare and analyze the satiety index with the satiety threshold, and judge the condition of individual fish.

2. The method for detecting the satiety index of juvenile fish based on abdominal curve fitting according to claim 1, characterized in that, In step 4, the satiety index for: , This represents the area enclosed by the closed abdominal contour curve. It represents the circumference of the closed abdominal contour curve.

3. The method for detecting the satiety index of juvenile fish based on abdominal curve fitting according to claim 1, characterized in that, In step 2, the implementation of the backbone network MSDA is as follows: The input feature map is first linearly projected to obtain the query matrix, key matrix, and value matrix; the feature map channels are then divided into multiple independent attention heads, each using a different dilation rate; for the ... With one attention head, performing a sliding window expansion attention operation outputs: , This indicates a sliding window operation that expands attention. , , They represent the first The query matrix, key matrix, and value matrix of the first attention head; Individual attention is focused on spatial location The attention value at this location is: , , These represent the indices of the feature map in the height and width directions, respectively. Indicates the first The focus of attention is on spatial location The query vector, Indicated by expansion rate Transpose of the set of key vectors sparsely selected from the key matrix Indicated by expansion rate A set of value vectors sparsely selected from the key matrix Represents the normalized exponential function, Indicates the dimension of the key vector; The sliding window expansion attention operation selects key-value pairs sparsely according to the expansion rate within a sliding window centered on the query position and with a size equal to the window's side length. The sparse space set is represented as follows: , Indicates the first A person's attention is focused on the position. The sparse space set to be processed Indicates the side length of the sliding window. Indicates an integer offset in the height direction. This represents the integer offset in the width direction; the outputs of each attention head are fused by a linear layer; by using different expansion rates, MSDA enables each attention head to have a receptive field of 3×3, 5×5, and 7×7, respectively, thereby simultaneously capturing local details and long-range dependencies and improving the detection capability of targets at different scales.

4. The method for detecting the satiety index of juvenile fish based on abdominal curve fitting according to claim 1, characterized in that, In step 2, the SDS convolution module of the neck network first divides the feature map into two branches. One branch uses standard convolution, which is output after convolution, batch normalization, and Sigmoid Linear Unit activation function operations. The other branch uses depthwise separable convolution, which first performs channel-wise convolution and then pointwise convolution. Then, the outputs of the two branches are concatenated along the channel dimension. Then, the outputs of the standard convolution and the depthwise separable convolution are uniformly mixed through a shuffling operation, so that the dense information generated by the standard convolution is integrated into each part of the depthwise separable convolution, thereby reducing the amount of computation while maintaining expressive power. The SDS_CSP module is based on the idea of ​​one-time aggregation, which aggregates cross-stage branch features only at the end of the module to avoid the memory overhead caused by dense connections. The SDS_CSP module includes cross-stage branches, SDS bottleneck layer and end SDS convolutional fusion layer.

5. The method for detecting the satiety index of juvenile fish based on abdominal curve fitting according to claim 1, characterized in that, Step 3.2 is as follows: The key point closed sequence is Total number of key points =12, Indicates the first One key point is that the abdominal contour is a closed curve. and Connecting beginning and end; for adjacent key points and ( The current position to be fitted between ) Select forward along the current interval's starting point and backward along the current interval's ending point respectively. Given _n neighborhood key points, including the two endpoints of the current interval, construct the _n ... Support domain set corresponding to each key point interval : This represents the offset used to select neighboring points forward or backward from the current interval endpoint. Indicates by Modulo closed-loop numbering operation; Take each support point within the support domain to the current fitting position. The maximum Euclidean distance is used as the radius of the support domain: , Indicates the first Within the interval of key points, at the current position to be fitted The radius of the support domain is used as a reference. Indicates support domain Inner One support point, Indicates support domain The number of support points This represents the Euclidean distance.

6. The method for detecting the satiety index of juvenile fish based on abdominal curve fitting according to claim 5, characterized in that, Step 3.3 is as follows: For the interval formed by adjacent key points, generate the current position to be fitted on the line segment connecting the two key points: ,in, Indicates the first The interpolation parameters for each key point interval are: The position to be fitted, and These represent the x-coordinate and y-coordinate of the position, respectively. Indicates the key point at the beginning of the current interval. Indicates the key point at the end of the current interval. Represents the normalized interpolation parameters within the interval; for the support domain Inner Support points First, calculate its current position to be fitted. Euclidean distance: ,in, Indicates support domain Inner Support points to the current position to be fitted The Euclidean distance is calculated; then its normalized distance is calculated: , Indicates support domain Inner Each support point is relative to the current position to be fitted. Normalized distance, This represents the support domain radius set in step 3.2; the weighting function is Gaussian and a compact support condition is introduced: in, Indicates the first Within the interval of the key points The weight of each support point This represents the Gaussian attenuation coefficient. This represents the natural exponential function.

7. The method for detecting the satiety index of juvenile fish based on abdominal curve fitting according to claim 6, characterized in that, Step 3.4 is as follows: For each position to be fitted Based on its supported domains The support points within and the weights calculated in step 3.3 The solution yields the vector of local fitting coefficients for the abscissa defined in step 3.

1. and the vector of local fitting coefficients on the ordinate Then calculate the coordinates of the fitted point according to the following formula: in, and These represent the fitted values ​​of the horizontal and vertical axes obtained by calculating using the local fitting function, respectively. This represents the point where the abdominal contour is fitted at the current interpolation position. This represents the transpose of the second-order polynomial basis function vector at the current position to be fitted; several interpolation parameters are selected at equal intervals within each adjacent keypoint interval. The target number of fitting points for the closed curve is 30. The fitting coordinates of each interpolation position are calculated in sequence to obtain all the fitting points of the abdominal contour. The last fitting point is connected to the first fitting point to form a closed abdominal contour curve.

8. A system for implementing the method for detecting the satiety index of juvenile fish based on abdominal curve fitting as described in claim 1, characterized in that, include: The data acquisition module uses image acquisition equipment to acquire video or image sequences containing the target fish group and transmits them to the host computer, where various modules integrated within the host computer perform subsequent data analysis and processing. The target and key point detection module uses an improved YOLOv8s-ALL model to infer the input image and outputs the bounding box of each fish body and the corresponding set of abdominal key points. The curve fitting module uses the key points on the abdomen of each detected individual fish as discrete nodes and performs curve fitting using an optimized moving least squares method to generate a smooth, closed abdominal contour curve. The satiety index calculation module calculates the satiety index based on the abdominal contour curve. The state classification module compares and analyzes the satiety index with the satiety threshold to determine whether the fish are in a satiety or non-satiation state.