A hierarchical gradient reconstruction detection method for signs of farmed fish
Patent Information
- Application Number
- CN202611208099.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-10-30
AI Technical Summary
然而,受限于水下固有的成像退化及复杂背景干扰,现有通用目标检测算法在水下养殖场景中仍易出现漏检、误检、状态误判及定位不准确等问题,难以满足现代水产养殖业对实时、高效和精准监测的需求
[0014]与现有技术相比,本发明的有益效果是:本发明利用多维空间差分算子集合,显式提取多维确定性梯度先验,并联合结构重参数化机制实现鱼体边缘特征的锐化与重构,增强了网络对弱边界鱼体区域的表征能力,提高了对弱边界鱼体边缘轮廓的清晰、准确判定;进一步的,利用具有递增感受野的级联处理模块,交织执行全局语义建模与局部特征补偿,在不同尺度上建立鲁棒上下文依赖,兼顾了局部特征与全局语义,提高了网络对鱼类体征状态的辨识力。
Smart Images

Figure CN123016180A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image content recognition and determination technology, specifically a hierarchical gradient reconstruction detection method for the physical characteristics of farmed fish. Background Technology
[0002] In high-density fish farming, the inability to accurately distinguish and locate fish in normal and dead states not only makes it difficult to monitor the overall condition of the fish population, but also risks water pollution from dead individuals, further increasing the risk of mass mortality and causing severe economic losses. Therefore, accurately identifying the physical condition of fish underwater and locating individual fish is of significant practical importance for reducing farming risks and improving farming management efficiency.
[0003] Traditional underwater fish health monitoring relies primarily on manual labor. However, this method suffers from limited coverage and low efficiency due to limitations in personnel experience and frequency of operation. Furthermore, diving operations pose safety hazards in deep-sea cages or large-scale aquaculture areas, hindering real-time monitoring of fish conditions. With the development of computer vision technology, general object detection algorithms have been increasingly applied to underwater fish health monitoring, alleviating some of the limitations of manual methods. However, due to inherent underwater imaging degradation and complex background interference, existing general object detection algorithms still suffer from missed detections, false detections, misjudgments of fish conditions, and inaccurate localization in underwater aquaculture scenarios, failing to meet the demands of modern aquaculture for real-time, efficient, and precise monitoring. Therefore, there is an urgent need for a detection method that can adapt to the complex underwater aquaculture environment and accurately identify and precisely locate individual fish health conditions. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to overcome the existing defects and provide a hierarchical gradient reconstruction detection method for the physical condition of farmed fish, which can effectively solve the problems in the background art.
[0005] To achieve the above objectives, this invention discloses a hierarchical gradient reconstruction detection method for the vital signs of farmed fish, the technical solution of which includes the following steps: Step 1: Obtain the image for analysis, standardize it, and then input it into a shallow feature perception network to extract basic features; Step 2: Process the basic features extracted in Step 1 using a gradient detail reconstruction mechanism. The basic features are segmented to obtain segmented features. Multidimensional deterministic gradient priors are extracted from the segmented features. After the multidimensional deterministic gradient priors are reparameterized into a single basic convolutional kernel, a single-path forward mapping is performed on the segmented features. Then, residual concatenation is performed with the original features to obtain edge sharpening features. Step 3: Process the edge sharpening features using a hierarchical multi-kernel interleaving mechanism: After the edge sharpening features are divided into sub-features, multi-scale contextual semantic modeling is performed by the cascaded processing module. Global semantic modeling and local feature compensation are interwoven in each stage of the cascaded processing module to obtain semantically enhanced features. Step 4: The edge sharpening features and semantic enhancement features are processed by a dynamic denormalization fusion mechanism to obtain the degradation perception fusion features; Step 5: Input the degradation perception fusion features into the detection head for classification and regression mapping, and output the detection result image.
[0006] As a preferred embodiment of the present invention, the process of extracting basic features by the shallow feature perception network in step 1 is as follows: in, To standardize the input image, Represents a shallow convolution mapping. This indicates a batch normalization operation. It is a non-linear activation function. These are the initial shallow features. For pointwise convolution, This indicates feature splicing along the channel dimension. For feature transformation mechanism, This is the output of the process, i.e., the basic features.
[0007] As a preferred embodiment of the present invention, the specific process of the gradient detail reconstruction mechanism in step 2 is as follows: Step 2.1: The basic features output from Step 1 are segmented along the channel dimension. A set of multidimensional spatial difference operators is used to extract multidimensional deterministic gradient priors, which are then fused into a single basic convolutional kernel based on the structure reparameterization mechanism. The gradient prior extraction and parameter reconstruction formulas are expressed as follows: in, These are the learnable weights for the corresponding branches, and their values are determined during network training based on the joint loss function through backpropagation and gradient optimization iterations. A two-dimensional spatial index (row index and column index) representing the convolution kernel. This indicates element-wise multiplication. Indicates the pattern identifier of the difference operator. For the set of difference operators, An indicator matrix that responds only at the center position; For asymmetric masks (such as positive on the left and negative on the right or positive on the top and negative on the bottom). Indicates based on rotation angle The kernel parameter rearrangement operator, An adaptive scaling factor to control the intensity of angular differences; Standard base weights; Step 2.2: Using the reparameterized and fused convolutional kernel, perform single-path forward mapping, normalization, and activation on the segmented features. Then, concatenate the features with the original features that retain the residuals to obtain the edge-sharpening features. This process can be represented as: in, For input features, For pointwise convolution, This indicates a batch normalization operation. It is a non-linear activation function. For segmentation features, The fused bias is obtained by reparameterizing and merging the bias terms of each operator branch. For standard two-dimensional convolution operations, This indicates feature splicing along the channel dimension. This is the edge sharpening feature for the output.
[0008] As a preferred embodiment of the present invention, the specific process of the hierarchical multi-core interleaving mechanism in step 3 is as follows: Step 3.1: Input the edge sharpening features output from Step 2 into a hierarchical multi-kernel interleaving mechanism, uniformly divide them into multiple sub-features along the channel dimension, and send them to a cascaded processing module with an increasing receptive field for multi-scale contextual semantic modeling. Combined with an adaptive gating mechanism, this enhances the ability to identify the physical characteristics of different fish in complex underwater environments. This process can be represented as: in, , , The respective The sub-features, global semantic features, and output features of each stage. This indicates element-wise addition. It is a non-linear activation function. For layer normalization operation, The kernel size represents the convolution kernel size. Depth-separable convolution, For pointwise convolution, This indicates feature splicing along the channel dimension; Step 3.2 involves interleaving global semantic modeling and local feature compensation at each stage of the cascaded processing module to obtain semantically enhanced features. This process can be represented as follows: in, For the first The composite interleaving operator for each stage outputs the state characteristics of that stage. The specific internal calculation process is given by the formula in step 3.1.
[0009] As a preferred embodiment of the present invention, the specific process of the dynamic denormalization fusion mechanism in step 4 is as follows: Step 4.1: To preserve the potential detailed distribution of fish body features across scales, a customized dynamic Tanh unit is used for dynamic activation and adaptive channel response calibration. The calculation process of the dynamic Tanh unit is as follows: in, For input features, It is a learnable scalar used to dynamically adjust the saturation and gradient feedback of the activation function; and These represent learnable weights and biases, respectively. This indicates element-wise multiplication; Step 4.2 involves scaling and concatenating the edge sharpening features and semantic enhancement features output from steps 2 and 3, and then combining them with the dynamic Tanh unit described in step 4.1 to perform channel enhancement and gated aggregation to suppress multi-level semantic conflicts. This process can be represented as follows: in, and These are edge sharpening features and semantic enhancement features, These are the features after alignment and splicing. Representing the aforementioned dynamic Tanh unit, Represents the Sigmoid activation function. For grouped convolutions used to capture local contextual features, For pointwise convolution, This indicates element-wise multiplication; Step 4.3 introduces parallel residual branches to preserve the initial fused features, and aggregates the multi-scale contextual features with them for output. The output degradation-aware fused features can be represented as: in, For scale alignment operators, This indicates element-wise addition. For pointwise convolution, This indicates feature splicing along the channel dimension.
[0010] As a preferred technical solution of the present invention, in step 5, the degradation perception fusion feature output in step 4 is input into the detection head, and the category confidence and bounding box regression distribution are generated through the classification branch and regression branch respectively to obtain the classification and regression mapping results.
[0011] As a preferred embodiment of the present invention, in step 5, the mapping process is optimized based on the core scale modulation loss, the combined distribution focus loss and the classification loss. During optimization, the learnable weights are changed iteratively through backpropagation and gradient optimization. The value of is used to obtain the final detection result after the iteration converges.
[0012] As a preferred embodiment of the present invention, the specific process of joint loss optimization is as follows: Training Step 1: During the network training phase, for the bounding box regression process, a shrinkage factor is used to remove edge blur noise and the core overlap is calculated. An adaptive geometric penalty is then applied using a dynamic scale modulation factor to construct the core scale modulation loss, which can be expressed as follows: in, This is the dynamic scale modulation factor. It is a contractile factor. It is the squared Euclidean distance between the center points of the predicted bounding box and the ground truth bounding box. It is the square of the diagonal length of the smallest closure region containing both. and To control the penalty for aspect ratio consistency, This is the adjustment constant for the equilibrium geometric constraint term; Training step 2 involves combining the classification loss and distribution focus loss with the core scale modulation loss described in training step 1 to jointly optimize the network mapping process and obtain the final detection result. The joint loss formula can be expressed as: in, For the distribution focus loss, For classifying losses, and To balance and Hyperparameters.
[0013] As a preferred embodiment of the present invention, the classification loss and the distribution focus loss can be expressed as follows: in, Indicates the number of prediction terms involved in the loss calculation; and These represent the predicted class probability and the target class score, respectively. Indicates the actual boundary distance; and These represent their left and right adjacent discrete positions, respectively; and This represents the predicted probability for the corresponding position.
[0014] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention utilizes a set of multidimensional spatial difference operators to explicitly extract multidimensional deterministic gradient priors, and combines a structural reparameterization mechanism to achieve sharpening and reconstruction of fish body edge features, thereby enhancing the network's ability to represent weak boundary fish body regions and improving the clarity and accuracy of judging the outline of weak boundary fish bodies; furthermore, by utilizing cascaded processing modules with increasing receptive fields, global semantic modeling and local feature compensation are interleaved, robust contextual dependencies are established at different scales, taking into account both local features and global semantics, thereby improving the network's ability to identify the physical state of fish.
[0015] Furthermore, by customizing dynamic Tanh units for dynamic activation and adaptive channel response calibration, and combining channel enhancement and gating aggregation strategies, semantic conflicts between deep and shallow layers are avoided, while preserving fine-grained structural information of potential fish body regions. By constructing a core scale modulation loss, introducing a shrinkage factor to adaptively remove boundary ambiguity noise, and combining a dynamic scale modulation factor to apply dynamic geometric penalties to fish body regions, and combining classification loss and distribution focus loss for joint optimization, the network's positioning accuracy and robustness in identifying the vital signs of aquaculture fish are improved. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the process of the present invention; Figure 2 This is a schematic diagram of the neural network functional architecture of the present invention; Figure 3 This is a schematic diagram of the neural network architecture of the present invention; Figure 4 This is a manually annotated image of fish vital signs observed during inspections in shallow waters of aquaculture cages. Figure 5 A comparison of manually labeled fish vital signs in shallow waters of aquaculture cages with YOLO v12 detection results; Figure 6 A comparison of manually labeled fish vital signs in shallow waters of aquaculture cages with YOLO v26 detection results; Figure 7 A comparison chart of manually labeled fish vital signs in shallow waters of aquaculture cages and the detection results of this invention; Figure 8This is a manually annotated image of the fish's physical condition during inspections in the deep waters of aquaculture cages. Figure 9 A comparison chart of manually labeled fish vital signs in deep waters of aquaculture cages and YOLO v12 detection results; Figure 10 A comparison chart of manually labeled fish vital signs in deep waters of aquaculture cages and YOLO v26 detection results; Figure 11 A comparison chart of manually labeled fish vital signs in deep waters of aquaculture cages and the detection results of this invention; Figure 12 This is a manually annotated image of the fish's physical condition observed during inspections in the bottom waters of aquaculture cages. Figure 13 A comparison chart of manually labeled fish vital signs in the bottom water of aquaculture cages and YOLO v12 detection results; Figure 14 A comparison chart of manually labeled fish vital signs in the bottom water of aquaculture cages and YOLO v26 detection results; Figure 15 This is a comparison chart of the results of artificial labeling of fish physical characteristics in the bottom water of aquaculture cages and the results of detection by this invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Example 1 The neural network functions and architecture involved in this embodiment are as follows: Figure 2 , Figure 3As shown, the network includes a shallow feature perception network, which includes a feature extraction unit (CBS, Conv + BatchNorm + SiLU activation). The feature extraction unit is connected to a feature aggregation unit at its back end. This shallow feature perception network is used for basic feature extraction of the input image. A gradient detail reconstruction module is connected to the back end of the shallow feature perception network. This module includes three cascaded gradient disparity refinement modules (GDRM). A hierarchical multi-view interleaving module is connected to the back end of the gradient detail reconstruction module. This hierarchical multi-view interaction module includes three hierarchical multi-view interaction modules (HMIM). An upsampling module is also set between the first and second HMIMs. All three HMIMs and the upsampling module have a CBS at their front end for feature extraction. The gradient detail reconstruction module, HMIMs, and upsampling modules are all connected to a dynamic denormalization fusion module. A detection head is connected to the back end of the hierarchical multi-kernel interleaving module, and the detection head outputs the image.
[0019] like Figure 1 , Figure 2 As shown, this invention discloses a hierarchical gradient reconstruction detection method for the vital signs of farmed fish. The technical solution adopted includes the following steps: Step 1: Obtain images of farmed fish and input them into a shallow feature perception network to extract basic features; specifically: Step 1.1: Use the BlueROV2 underwater remotely operated vehicle manufactured by Blue Robotics as the inspection platform. Equipped with a Low-Light HD USB Camera manufactured by Blue Robotics, the vehicle cruises and films in the shallow, deep, and bottom waters of the aquaculture cages. It collects underwater video data containing fish in both normal and dead states at a frame rate of 30 frames / s. The video data is sampled at equal intervals, with one frame extracted every 30 frames, to obtain images of the farmed fish. The images are then uniformly resized to 640×640 pixels, and the pixel values are normalized to obtain standardized input images. Step 1.2: Input the standardized input image output from Step 1.1 into the shallow feature perception network to extract basic features. This network consists of a feature extraction unit and a feature aggregation unit. The feature extraction unit is composed of convolutional mapping, batch normalization, and nonlinear activation functions, used to extract initial shallow features; while the feature aggregation unit is composed of pointwise convolution, feature transformation mechanism, and feature concatenation mechanism, used to enhance the reusability of shallow features and the ability to represent local details; the process is represented as follows: in, To standardize the input image, Represents a shallow convolution mapping. This indicates a batch normalization operation. It is a non-linear activation function. These are the initial shallow features. For pointwise convolution, This indicates feature splicing along the channel dimension. For feature transformation mechanism, This is the output of the process; Step 2: Process the basic features using the gradient detail reconstruction module to obtain edge sharpening features; specifically: Step 2.1: Segment the basic features output from Step 1 along the channel dimension, extract multidimensional deterministic gradient priors using a set of multidimensional spatial difference operators, and fuse them into a single basic convolutional kernel based on the structure reparameterization mechanism. The gradient prior extraction and parameter reconstruction formulas are expressed as follows: in, These are the learnable weights for the corresponding branches, and their values are determined during network training based on the joint loss function through backpropagation and gradient optimization iterations. A two-dimensional spatial index (row index and column index) representing the convolution kernel. This indicates element-wise multiplication. Indicates the pattern identifier of the difference operator. For the set of difference operators, This is an indicator matrix that responds only at the center position. For asymmetric masks (such as positive on the left and negative on the right or positive on top and negative on the bottom); Indicated based on rotation angle The kernel parameter rearrangement operator, An adaptive scaling factor to control the intensity of angular differences; cdc is the center difference convolution, hdc is the horizontal difference convolution, vdc is the vertical difference convolution, and adc is the angular difference convolution. Standard base weights; Step 2.2: Using the reparameterized and fused convolutional kernel, perform single-path forward mapping, normalization, and activation on the segmented features. Then, concatenate the features with the original features that retain the residuals to obtain the edge-sharpening features. This process can be represented as: in, As input features, For segmentation features, The fused bias, obtained by reparameterizing and merging the bias terms of each operator branch, is determined through backpropagation and gradient optimization iterations. This is a standard two-dimensional convolution operation; Step 3: Process the edge sharpening features through a hierarchical multi-kernel interleaving mechanism to obtain semantic enhancement features; specifically: Step 3.1: Input the edge sharpening features output from Step 2 into a hierarchical multi-kernel interleaving mechanism, uniformly divide them into multiple sub-features along the channel dimension, and send them into a cascaded processing module with an increasing receptive field for multi-scale context modeling. Combined with an adaptive gating mechanism, the ability to identify the physical characteristics of different fish in complex underwater environments is enhanced. This process can be represented as follows: in, , , The first The sub-features, global semantic features, and output features of each stage. This indicates element-wise addition. It is a non-linear activation function. For layer normalization operation, The kernel size represents the convolution kernel size. Depth-separable convolution, Set as follows ; Step 3.2 involves interleaving global semantic modeling and local feature compensation at each stage of the cascaded processing module to obtain semantically enhanced features. This process can be represented as follows: in, For the first The composite interleaving operator for each stage outputs the state characteristics of that stage. The specific internal calculation process is given by the formula in step 3.1; Step 4: The edge sharpening features and semantic enhancement features are processed through a dynamic denormalization fusion mechanism to obtain the degradation perception fusion features; specifically: Step 4.1: To preserve the potential detailed distribution of fish body features across scales, a customized dynamic Tanh unit is used for dynamic activation and adaptive channel response calibration. The calculation process of the dynamic Tanh unit is as follows: in, It is a learnable scalar used to dynamically adjust the saturation and gradient feedback of the activation function; and These represent learnable weights and biases, respectively. Step 4.2 involves scaling and concatenating the edge sharpening features and semantic enhancement features output from steps 2 and 3, and then combining them with the dynamic Tanh unit described in step 4.1 to perform channel enhancement and gated aggregation to suppress multi-level semantic conflicts. This process can be represented as follows: in, and These are edge sharpening features and semantic enhancement features, respectively. These are the features after alignment and splicing. Representing the aforementioned dynamic Tanh unit, Represents the Sigmoid activation function. Grouped convolutions are used to capture local contextual features; Step 4.3 introduces parallel residual branches to preserve the initial fused features, and aggregates the multi-scale contextual features with them for output. The output degradation-aware fused features can be represented as: in, For scale alignment operators; Step 5: Input the degradation perception fusion features into the detection head for classification and regression mapping; specifically: Input the degradation-aware fusion features output from step 4 into the detection head, generate class confidence and bounding box regression distribution through classification and regression branches respectively, obtain classification and regression mapping results, and output the results; During the training phase, the mapping process is optimized based on the core scale modulation loss, combined with the distribution focus loss and classification loss, to obtain the final detection result, specifically: Training Step 1: During the network training phase, for the bounding box regression process, a shrinkage factor is used to remove edge blur noise and the core overlap is calculated. An adaptive geometric penalty is then applied using a dynamic scale modulation factor to construct the core scale modulation loss, which can be expressed as follows: in, This is the dynamic scale modulation factor. It is a contractile factor. It is the squared Euclidean distance between the center points of the predicted bounding box and the ground truth bounding box. It is the square of the diagonal length of the smallest closure region containing both. and To control the penalty for aspect ratio consistency, This is the adjustment constant for the equilibrium geometric constraint term; Training step 2 introduces a classification loss to constrain class confidence and a distribution focus loss to optimize the bounding box probability distribution. The classification loss and distribution focus loss can be expressed as follows: in, Indicates the number of prediction terms involved in the loss calculation; and These represent the predicted class probability and the target class score, respectively. Indicates the actual boundary distance; and These represent their left and right adjacent discrete positions, respectively; and This represents the predicted probability at the corresponding position. For the distribution focus loss, For classification loss; Subsequently, the classification loss, distribution focus loss, and core scale modulation loss described in training step 1 are combined to jointly optimize the network mapping process, obtaining the final detection result. The joint loss formula can be expressed as: in, and To balance and Hyperparameters.
[0020] During the iteration process, the parameter update magnitude generally shows a decreasing trend. When the relative rate of change of the joint loss function is less than 10% over 10 consecutive training epochs... -3 When the model enters a local optimum or stable region, the optimization process is considered to have reached convergence.
[0021] ablation experiment To verify the effectiveness of the image processing mechanism proposed in Example 1, a stepwise superposition ablation experiment was conducted under the same experimental conditions, as shown in Table 1. In the table, "√" indicates that the corresponding mechanism was introduced, and "×" indicates that it was not introduced. mAP 50 mAP represents the mean accuracy of each fish state category when the intersection-union ratio (IU) of the model-predicted bounding boxes and the manually labeled boxes is set to 0.50. It is used to evaluate the model's basic detection capability. 50-95 This represents the average of the mean accuracy values calculated with a step size of 0.05 within the cross-union ratio threshold range of 0.50 to 0.95, and is used to comprehensively evaluate the overall detection performance of the model.
[0022] Table 1. Results of ablation experiment in Example 1 As shown in Table 1, with the sequential introduction of Gradient Detail Reconstruction Mechanism (GDRM), Hierarchical Multi-Kernel Interleaving Mechanism (HMIM), Dynamic Denormalization Fusion Mechanism (DNFM), and Core Scale Modulation Loss (CMIoU), the model's mAP increases. 50 With mAP 50-95 All showed a gradual upward trend. The above experimental results indicate that each component mechanism can positively contribute to the model performance, and the complete model achieves optimal detection performance, verifying the effectiveness and synergy of the mechanisms proposed in this invention.
[0023] The detection results of Example 1 were compared with those of existing technologies (YOLO v12, YOLO v26), and the comparison was performed using manual annotation. The comparison was conducted under three different water depth conditions: shallow water, deep water, and bottom water. The comparison not only evaluated missed detections and false detections, but also measured the degree of fit between the detection box and the annotation box through confidence score. Specifically, missed detections and false detections are the comparison model's judgment on the number and location of fish targets, while confidence score is the judgment on the morphological contour of fish targets. The evaluation criterion is the degree of fit between the detection box and the manually annotated box. In the detection result image, the results are presented as numbers above the detection boxes.
[0024] like Figures 4 to 7 The image shows the results of fish vital sign detection in the shallow waters of aquaculture cages. This water area is affected by water scattering and color shift, resulting in high visual confusion between the fish and the water background. Furthermore, the dense distribution and occlusion of fish further exacerbate the detection difficulty. The results indicate that YOLOv12 and YOLOv26 have low confidence in detecting fish targets and exhibit both false negatives and false positives. In contrast, this invention overcomes these problems, effectively reducing false negatives and false positives while maintaining high detection confidence, demonstrating excellent fish vital sign recognition and robust localization capabilities.
[0025] like Figures 8 to 11 The image shows the results of fish vital sign detection in the deep waters of aquaculture cages. This water area suffers from severe light attenuation, exacerbated color shifts, and further reduced visibility of fish at a distance. The detection results indicate that YOLOv12 and YOLOv26 have low confidence levels in detecting fish targets and exhibit both false negatives and false positives. In contrast, this invention overcomes these problems, effectively reducing false negatives and false positives while maintaining high detection confidence, demonstrating excellent fish vital sign recognition and localization robustness.
[0026] like Figures 12 to 15The image shows the results of fish vital sign detection in the bottom water of an aquaculture cage. This water area also suffers from severe light attenuation, and the dense mesh texture and netting deposits further interfere with fish feature extraction. The detection results indicate that YOLOv12 and YOLOv26 have low confidence levels for fish detection and exhibit both false negatives and false positives. In contrast, this invention overcomes these problems, effectively reducing false negatives and false positives while maintaining high detection confidence, demonstrating excellent fish vital sign recognition and localization robustness.
[0027] The above comparison shows that, under three different water depth conditions—shallow water, deep water, and bottom water—this invention demonstrates better fish physical condition identification and localization robustness compared to existing models. The identification and judgment of fish quantity and location by this invention are almost identical to those of manual annotation, and its confidence level is significantly higher than that of existing models.
[0028] The training and application of the model involved in this embodiment are as follows: (1) Acquisition and processing of training dataset This embodiment uses the BlueROV2 underwater remotely operated vehicle (ROV) manufactured by Blue Robotics as a data acquisition platform, equipped with a Low-Light HD USB Camera manufactured by Blue Robotics. It cruises and films in the shallow, deep, and bottom waters of the aquaculture cages, acquiring underwater video data including both normal and dead fish at a frame rate of 30 frames per second. The video data is sampled at equal intervals, with one frame extracted every 30 frames, to obtain images of the farmed fish. Bounding boxes are added to the fish targets in the images, and the fish states are labeled as normal and dead, respectively. Subsequently, the image size is uniformly adjusted to 640×640 pixels, and pixel value normalization is performed to obtain standardized input images. The processed images are divided into training and testing sets at a 9:1 ratio, and the division between the training and testing sets remains unchanged throughout the training process.
[0029] (2) Model training details In this embodiment, both model training and testing were performed on a workstation equipped with a 14th-generation Intel Core i9-14900KF processor, an NVIDIA GeForce RTX 5070 graphics card, and 64 GB of RAM. The training environment was built using the GPU-accelerated PyTorch deep learning framework. To ensure consistency in the model training and testing process, all input images were uniformly adjusted to 640×640 pixels. The model was trained using a stochastic gradient descent optimizer, with a batch size of 16, an initial learning rate of 0.01, a weight decay coefficient of 0.0005, and a total of 300 training epochs. In each training iteration, the standardized input images from each batch were fed into the model for forward propagation. The joint loss was calculated based on the model's prediction results and corresponding annotation information. The gradient of the network parameters was obtained through backpropagation, and the network parameters were updated using the stochastic gradient descent optimizer. During training, the model's detection performance was evaluated using a test set, and the model weights with the best detection performance on the test set were saved as the final model weights for subsequent farmed fish state detection.
[0030] (3) Model application and system embedding In the application phase, the optimal model weight file, after training, is loaded into the fish condition detection program proposed in this invention, and deployed as an independent inference module to the NVIDIA Jetson Orin NX 16GB onboard edge computing module mounted on the BlueROV2 underwater remotely operated vehicle. The onboard edge computing module connects to a low-light camera via a USB interface and to a Raspberry Pi 4B main control unit via a network interface, thereby embedding the fish condition detection module into the underwater robot's existing video acquisition and communication system.
[0031] During the inspection of aquaculture cages, the low-light camera directly transmits the real-time underwater video to the onboard edge computing module. The fish state detection module adjusts the video to 640×640 pixels and performs pixel value normalization. Then, it calls the inference engine to obtain the state category, detection confidence, and bounding box coordinates of the fish target, and maps the detection results to the original video screen, realizing continuous identification and positioning of fish in normal and dead states, providing a detection basis for aquaculture managers to locate and clean up dead fish.
[0032] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A hierarchical gradient reconstruction detection method for the vital signs of farmed fish, characterized in that, Includes the following steps: Step 1: Obtain the image for analysis, standardize it, and then input it into a shallow feature perception network to extract basic features; Step 2: Process the basic features extracted in Step 1 using a gradient detail reconstruction mechanism. The basic features are segmented to obtain segmented features. Multidimensional deterministic gradient priors are extracted from the segmented features. After the multidimensional deterministic gradient priors are reparameterized into a single basic convolutional kernel, a single-path forward mapping is performed on the segmented features. Then, residual concatenation is performed with the original features to obtain edge sharpening features. Step 3: Process the edge sharpening features using a hierarchical multi-kernel interleaving mechanism: After the edge sharpening features are divided into sub-features, multi-scale contextual semantic modeling is performed by the cascaded processing module. Global semantic modeling and local feature compensation are interwoven in each stage of the cascaded processing module to obtain semantically enhanced features. Step 4: The edge sharpening features and semantic enhancement features are processed by a dynamic denormalization fusion mechanism to obtain the degradation perception fusion features; Step 5: Input the degradation perception fusion features into the detection head for classification and regression mapping, and output the detection result image.
2. The hierarchical gradient reconstruction detection method for the vital signs of farmed fish according to claim 1, characterized in that, In step 1, the process of the shallow feature perception network extracting basic features is as follows: in, To standardize the input image, Represents a shallow convolution mapping. This indicates a batch normalization operation. It is a non-linear activation function. These are the initial shallow features. For pointwise convolution, This indicates feature splicing along the channel dimension. For feature transformation mechanism, This is the output of the process, i.e., the basic features.
3. The hierarchical gradient reconstruction detection method for the vital signs of farmed fish according to claim 1, characterized in that: In step 2, the specific process of the gradient detail reconstruction mechanism is as follows: Step 2.1: The basic features output from Step 1 are segmented along the channel dimension. A set of multidimensional spatial difference operators is used to extract multidimensional deterministic gradient priors, which are then fused into a single basic convolutional kernel based on the structure reparameterization mechanism. The gradient prior extraction and parameter reconstruction formulas are expressed as follows: in, For the learnable weights of the corresponding branches, Represents the two-dimensional spatial index of the convolution kernel. This indicates element-wise multiplication. Indicates the pattern identifier of the difference operator. For the set of difference operators, An indicator matrix that responds only at the center position; For anti-symmetric masking, Indicates based on rotation angle The kernel parameter rearrangement operator, An adaptive scaling factor to control the intensity of angular differences; Standard base weights; Step 2.2: Using the reparameterized and fused convolutional kernel, perform single-path forward mapping, normalization, and activation on the segmented features. Then, concatenate the features with the original features that retain the residuals to obtain the edge-sharpening features. This process can be represented as: in, For input features, For pointwise convolution, This indicates a batch normalization operation. It is a non-linear activation function. For segmentation features, The fused bias is obtained by reparameterizing and merging the bias terms of each operator branch. For standard two-dimensional convolution operations, This indicates feature splicing along the channel dimension. This is the edge sharpening feature for the output.
4. The hierarchical gradient reconstruction detection method for the vital signs of farmed fish according to claim 1, characterized in that: In step 3, the specific process of the hierarchical multi-core interleaving mechanism is as follows: Step 3.1: Input the edge sharpening features output from Step 2 into a hierarchical multi-kernel interleaving mechanism, uniformly divide them into multiple sub-features along the channel dimension, and send them to a cascaded processing module with an increasing receptive field for multi-scale contextual semantic modeling. Combined with an adaptive gating mechanism, this enhances the ability to identify the physical characteristics of different fish in complex underwater environments. This process can be represented as: in, , , The respective The sub-features, global semantic features, and output features of each stage. This indicates element-wise addition. It is a non-linear activation function. For layer normalization operation, The kernel size represents the convolution kernel size. Depth-separable convolution, For pointwise convolution, This indicates feature splicing along the channel dimension; Step 3.2 involves interleaving global semantic modeling and local feature compensation at each stage of the cascaded processing module to obtain semantically enhanced features. This process can be represented as follows: in, For the first The composite interleaving operator for each stage outputs the state characteristics of that stage. The specific internal calculation process is given by the formula in step 3.
1.
5. The hierarchical gradient reconstruction detection method for the vital signs of farmed fish according to claim 1, characterized in that, In step 4, the specific process of the dynamic denormalization fusion mechanism is as follows: Step 4.1: Dynamic activation and adaptive channel response calibration are performed using a customized dynamic Tanh unit. The calculation process for the dynamic Tanh unit is as follows: in, For input features, For learnable scalars, and These represent learnable weights and biases, respectively. This indicates element-wise multiplication; Step 4.2 involves scaling and concatenating the edge sharpening features and semantic enhancement features output from steps 2 and 3, and then combining them with the dynamic Tanh unit described in step 4.1 to perform channel enhancement and gated aggregation to suppress multi-level semantic conflicts. This process can be represented as follows: in, and These are edge sharpening features and semantic enhancement features, These are the features after alignment and splicing. Representing the aforementioned dynamic Tanh unit, Represents the Sigmoid activation function. For grouped convolutions used to capture local contextual features, For pointwise convolution, This indicates element-wise multiplication; Step 4.3 introduces parallel residual branches to preserve the initial fused features, and aggregates the multi-scale contextual features with them for output. The output degradation-aware fused features can be represented as: in, For scale alignment operators, This indicates element-wise addition. For pointwise convolution, This indicates feature splicing along the channel dimension.
6. The hierarchical gradient reconstruction detection method for the vital signs of farmed fish according to claim 1, characterized in that: In step 5, the degradation perception fusion features output in step 4 are input into the detection head, and the category confidence and bounding box regression distribution are generated through the classification branch and regression branch respectively to obtain the classification and regression mapping results.
7. The hierarchical gradient reconstruction detection method for the vital signs of farmed fish according to claim 3, characterized in that: During training, the mapping process is optimized based on the core scale modulation loss, combined with the distribution focus loss and classification loss. During optimization, the learnable weights are iteratively changed through backpropagation and gradient optimization. The value of is used to obtain the final detection result after the iteration converges.
8. The hierarchical gradient reconstruction detection method for the vital signs of farmed fish according to claim 7, characterized in that, The specific process of joint loss optimization is as follows: Training Step 1: During the network training phase, for the bounding box regression process, a shrinkage factor is used to remove edge blur noise and the core overlap is calculated. An adaptive geometric penalty is then applied using a dynamic scale modulation factor to construct the core scale modulation loss, which can be expressed as follows: in, This is the dynamic scale modulation factor. It is a contractile factor. It is the squared Euclidean distance between the center points of the predicted bounding box and the ground truth bounding box. It is the square of the diagonal length of the smallest closure region containing both. and To control the penalty for aspect ratio consistency, This is the adjustment constant for the equilibrium geometric constraint term; Training step 2 involves combining the classification loss and distribution focus loss with the core scale modulation loss described in training step 1 to jointly optimize the network mapping process and obtain the final detection result. The joint loss formula can be expressed as: in, For the distribution focus loss, For classifying losses, and To balance and Hyperparameters.
9. The hierarchical gradient reconstruction detection method for the vital signs of farmed fish according to claim 8, characterized in that: The classification loss and the distribution focus loss can be expressed as follows: in, Indicates the number of prediction terms involved in the loss calculation; and These represent the predicted class probability and the target class score, respectively. Indicates the actual boundary distance; and These represent their left and right adjacent discrete positions, respectively; and This represents the predicted probability for the corresponding position.
