An intelligent fish body surface lesion detection system for an underwater farming scene

CN122453829APending Publication Date: 2026-07-24SOUTH CHINA NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610912555.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-24
Publication Date
2026-07-24

Smart Images

  • Figure CN122453829A_ABST
    Figure CN122453829A_ABST
Patent Text Reader

Abstract

The application discloses an intelligent fish body surface lesion detection system for an underwater aquaculture scene, and relates to the technical field of intelligent aquaculture monitoring.The system comprises an underwater image acquisition module, which is used for acquiring underwater images of fish in real time in an aquaculture water body, ensuring illumination through a light supplement lamp, and transmitting image data to an edge computing processing module; the edge computing processing module is based on an edge inference chip and is used for quality enhancement, target positioning, feature extraction and enhancement, target detection and multi-task decoding of the underwater images, and real-time detection and analysis of fish body lesions; an aquaculture management cloud platform module is used for receiving and storing detection results, statistically analyzing lesion data, and providing disease early warning, and for pushing alarm information to aquaculture personnel when a lesion is found, and for realizing account and permission management.The system is used to realize high-precision, real-time and robust detection and classification of various lesions on the surface of fish, and to provide remote monitoring and disease early warning services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision, deep learning and intelligent monitoring technology for aquaculture, and in particular to an intelligent detection system for fish lesions on the body surface for underwater aquaculture scenarios. Background Technology

[0002] Early and accurate detection of lesions on the surface of fish is a core aspect of disease control in aquaculture. The global aquaculture industry suffers extremely heavy economic losses every year due to fish diseases, with lesions on the surface (such as white spot disease, gill rot, red spot disease, and saprolegniasis) accounting for more than 40%. Traditional fish disease diagnosis mainly relies on the naked eye observation of aquaculture workers, which has the following prominent problems: (1) Manual inspection is inefficient, and it is difficult for large-scale farms to achieve timely and full coverage; (2) Early lesions are small in size, usually only 100-500 micrometers, and are easily missed by the naked eye; (3) Diagnostic results are highly dependent on experience, with strong subjectivity and poor consistency; (4) Uneven lighting and turbid water in the underwater environment further increase the difficulty of observation.

[0003] With the rapid development of computer vision and deep learning technologies, image-based automated detection methods have gradually become an important direction for intelligent aquaculture. YOLO series, Faster R-CNN, DETR, and other target detection algorithms have achieved significant results in the field of natural images. However, when these general algorithms are directly applied to lesions on the surface of underwater fish, many technical bottlenecks remain due to the complex underwater environment, the characteristics of the lesions, and practical application requirements.

[0004] The underwater environment is complex and variable. The selective absorption and scattering of light by water leads to image quality degradation issues such as color cast, haze, and decreased contrast. The degree of degradation dynamically changes with water depth, turbidity, and lighting conditions. Traditional fixed-parameter image enhancement methods have poor adaptability. Physical model-based restoration methods are computationally complex and sensitive to prior parameters. Existing deep learning enhancement methods do not consider the need to protect the fine textures of lesions, easily causing blurring or distortion of small lesion features, making it difficult to meet lesion detection requirements. Fish surface lesions are mostly extremely small targets, occupying a very small proportion in the image; some lesions are only a few pixels in size, resulting in severely insufficient feature representation. Furthermore, the morphology of lesions varies significantly between different diseases, and the morphology of the same disease continuously evolves at different stages of the disease. Existing small-target detection methods struggle to achieve effective feature extraction and accurate classification. In actual aquaculture scenarios, factors such as motion blur caused by fish swimming, mutual occlusion of fish bodies, interference from suspended particles and bubbles in the water, and dynamic changes in lighting can lead to unstable detection results. Existing methods lack a systematic mechanism to address dynamic interference. Furthermore, current research focuses on optimizing single algorithm components and has not developed an end-to-end integrated solution that includes image acquisition, real-time edge processing, cloud management, and early warning. This fails to meet the comprehensive needs of actual aquaculture in terms of detection accuracy, inference speed, equipment deployment, and remote management.

[0005] Given the current state of the technology, there is an urgent need for an intelligent detection system for fish surface lesions that integrates underwater image acquisition, edge-end intelligent detection, and cloud-based management and early warning. Summary of the Invention

[0006] The purpose of this invention is to provide an intelligent detection system for fish surface lesions in underwater aquaculture scenarios, in order to solve the problems mentioned in the background art.

[0007] To achieve the above objectives, this invention provides an intelligent detection system for fish surface lesions in underwater aquaculture scenarios, comprising: The underwater image acquisition module is used to acquire underwater images of fish in aquaculture water in real time. It provides illumination through supplemental lighting and transmits the image data to the edge computing processing module. It has waterproof sealing and communication transmission capabilities; it includes an underwater high-definition camera unit, a supplemental lighting unit, a waterproof sealing shell, and a communication interface unit. The underwater high-definition camera unit is used to acquire underwater images of fish in aquaculture waters in real time; The supplementary lighting unit is used to provide auxiliary lighting for underwater photography; The communication interface unit is used to transmit the acquired image data to the edge computing processing module; The edge computing processing module, which runs on the edge inference chip, performs quality enhancement, target localization, feature extraction and enhancement, target detection and multi-task decoding on underwater images, and completes real-time detection and analysis of fish lesions. The aquaculture management cloud platform module is used to receive and store test results, perform statistical analysis and disease warning on lesion data, push alarm information to aquaculture personnel when lesions are detected, and implement account and permission management. The underwater image acquisition module is connected to the edge computing processing module via wired or wireless means, and the edge computing processing module is connected to the aquaculture management cloud platform module via a network.

[0008] Preferably, the edge computing processing module includes an image quality perception adaptive enhancement unit, a fish target localization unit, a super-resolution feature magnification unit, a multi-granularity feature extraction unit, a deformable attention feature enhancement unit, an adaptive dynamic anchor box detection unit, a multi-task joint decoding unit, and an edge inference chip. The image quality perception adaptive enhancement unit, fish target localization unit, super-resolution feature magnification unit, multi-granularity feature extraction unit, deformable attention feature enhancement unit, adaptive dynamic anchor box detection unit, and multi-task joint decoding unit are all deployed on the edge inference chip.

[0009] Preferably, the image quality perception adaptive enhancement unit constructs an underwater image quality assessment network to perceive the degree of degradation of the input image, and dynamically adjusts the enhancement parameters based on the perception results, performing wavelength adaptive color compensation, contrast adaptive enhancement guided by depth estimation, and structure-aware denoising for lesion texture preservation in sequence. The fish target localization unit uses a lightweight target detection network to detect fish regions in the enhanced image and extract the regions of interest for the fish. The super-resolution feature magnification unit magnifies the resolution of the region of interest in the fish and injects the super-resolution reconstructed features into the subsequent feature extraction process through a gated fusion mechanism. The multi-granularity feature extraction unit extracts multi-level semantic features through an improved cross-stage gradient flow feature aggregation structure; The deformable attention feature enhancement unit introduces a deformable spatial attention module and a frequency domain sensing channel attention module to enhance the feature response of the lesion region; The adaptive dynamic anchor frame detection unit uses an improved bidirectional feature pyramid structure for multi-scale feature fusion and dynamically adjusts the anchor frame parameters through the adaptive dynamic anchor frame generation module. The multi-task joint decoding unit adopts a task-aware decoupling design and simultaneously outputs the lesion bounding box coordinates, lesion category, lesion severity level, and confidence score.

[0010] Preferably, a lightweight underwater image quality assessment network, Q-Net, is constructed in the image quality perception adaptive enhancement unit. The underwater image quality assessment network adopts a lightweight convolutional network architecture, and outputs a three-dimensional quality vector to represent the degree of color cast, the degree of contrast degradation, and the noise level, respectively. Wavelength adaptive color compensation dynamically calculates the compensation coefficients of each channel based on the three-dimensional quality vector. , , ,in , , To obtain learnable parameters, the input image is converted to the Lab color space, and then the illumination components are estimated using the multi-scale Retinex algorithm on the L channel, followed by normalization. The calculation formula is: ; in It is a Gaussian filter kernel. The weighting coefficients are and satisfy the following conditions: =1; Adaptive grayscale world correction is applied to channels a and b to eliminate color cast; The contrast adaptive enhancement based on depth estimation uses a monocular depth estimation network to generate a depth map. Based on the depth value, the image is divided into three regions: near, middle and far. Different contrast limit parameters are adaptively set for different depth regions to perform CLAHE enhancement. Bilinear interpolation is used to eliminate sub-block boundary artifacts. The structure-aware denoising method for lesion texture preservation adopts a dual-branch structure. The main branch uses a guided filtering algorithm for global denoising, while the auxiliary branch extracts the edge map of the lesion candidate region through morphological operations as a weight mask. The filtering intensity is reduced in the lesion edge region to preserve fine texture, while the normal filtering intensity is maintained in the smooth non-lesion region.

[0011] Preferably, the super-resolution feature amplification unit is designed with a lightweight super-resolution network SR-Lite, which adopts a residual dense connection architecture, containing 4 residual dense blocks. Each residual dense block contains 4 layers of 3×3 convolutions, with 64 channels and a growth rate of 302. At the end of the lightweight super-resolution network, a 2× upsampling is achieved through sub-pixel convolutional layers, amplifying the 640×640 input to 102080×102080. The lightweight super-resolution network employs a residual dense connection architecture and sub-pixel convolutional upsampling. A gated fusion mechanism extracts auxiliary features from the intermediate layers of the super-resolution network and adaptively fuses these features with shallow features from the backbone network using learnable gate weights. The fusion formula is as follows: ; Where G is the gating weight.

[0012] Preferably, the multi-granularity feature extraction unit adopts an improved CSPDarknet backbone network, introducing a gradient flow redistribution mechanism, and includes five feature extraction stages: the first stage outputs a 160×160×64 feature map, the second stage outputs an 80×80×10208 feature map, the third stage outputs a 40×40×2056 feature map, the fourth stage outputs a 20×20×5102 feature map, and the fifth stage outputs a 10×10×10204 feature map. The improved CSP module divides the input features into three parts along the channel dimension in a ratio of 2:1:1. The first part is processed by multiple Bottleneck residual units, the second part is processed by a 1×1 convolution and then establishes a skip connection with the intermediate layer features of the first part, and the third part is directly passed. Finally, the three parts are concatenated and channel fusion is performed by a 1×1 convolution.

[0013] Preferably, the deformable attention feature enhancement unit adds a deformable spatial attention module and a frequency domain sensing channel attention module to the output features of the third stage, fourth stage, and fifth stage of the backbone network, respectively. The deformable spatial attention module predicts the spatial offset of the input features through a 3×3 deformable convolution, so that the sampling position of the attention calculation can be adaptively offset to the lesion region. Then, the spatial attention weight is calculated at the offset feature position, and finally the weight is multiplied element-wise with the offset feature to obtain the spatial enhancement feature. The frequency domain sensing channel attention module performs discrete cosine transform on the input features along the spatial dimension to obtain the frequency domain representation. It separates the low-frequency and high-frequency components from the frequency domain representation and performs global average pooling on each to obtain the frequency domain channel descriptor. The two descriptors are concatenated and fed into a shared multilayer perceptron and activated by Sigmoid to obtain the channel attention weights.

[0014] Preferably, the adaptive dynamic anchor box detection unit includes an improved Enhanced BiFPN bidirectional feature pyramid structure and an adaptive dynamic anchor box generation module. Before training, the adaptive dynamic anchor box generation module performs statistical analysis on the lesion annotation boxes in the training dataset using a clustering algorithm to generate multiple sets of optimal anchor box parameters. During the inference stage, it predicts the size adjustment factor and aspect ratio adjustment factor of the anchor box at each feature map position through convolution, so as to realize the adaptive adjustment of the anchor box parameters according to the local semantic information. The improved bidirectional feature pyramid structure introduces learnable weight coefficients to weight and fuse features from different paths. After each fusion node, a depthwise separable convolution is added to refine the features, and an ultra-high resolution feature branch derived from the shallow layers of the backbone network is added to form five-scale detection features.

[0015] Preferably, the multi-task joint decoding unit includes three parallel branches: a classification branch, a regression branch, and a severity rating branch. The classification branch outputs the probability distribution of various lesions. The lesion categories include five categories: white spot disease, gill rot, red spot disease, water mold disease, and normal body surface. The regression branch outputs the center point coordinate offset and width and height of the lesion bounding box. The severity rating branch outputs three levels of lesion severity: mild, moderate, and severe. Post-processing uses soft nonmaximum suppression to reduce the false negative rate of dense lesion areas.

[0016] Preferably, the cloud platform module for aquaculture management includes: The data receiving and storage unit is used to receive and store the detection result data uploaded by the edge computing processing module; The lesion statistical analysis unit is used for trend analysis and disease early warning of historical test data; The alarm push unit is used to push alarm information to the farmer's terminal when lesions are detected; The user management unit is used to manage the accounts and permissions of aquaculture personnel.

[0017] Therefore, the present invention employs the above-mentioned intelligent detection system for fish surface lesions in underwater aquaculture scenarios, which has the following beneficial effects: (1) A complete three-layer architecture of end-edge-cloud is proposed, realizing an end-to-end integrated solution from underwater image acquisition, edge intelligent detection to cloud management and early warning, filling the gap in the existing technology of lacking a complete system design for aquaculture scenarios.

[0018] (2) In the edge computing processing module, an underwater image quality perception adaptive enhancement unit is proposed for the first time. The lightweight quality assessment network perceives the degree of degradation in real time and dynamically adjusts the enhancement parameters, which overcomes the technical bottleneck of poor generalization of traditional fixed parameter enhancement schemes in variable underwater environments. In particular, the structure perception denoising design for lesion texture preservation effectively preserves the edge details of small lesions while removing noise.

[0019] (3) A super-resolution guided feature amplification mechanism for small lesions is proposed. By gating fusion, high-frequency details of super-resolution are injected into the backbone network, which significantly enhances the feature expression ability of extremely small lesions at the 100-500 micrometer level. The small target detection recall rate is improved by 203.7% compared with the baseline method.

[0020] (4) A multi-granularity lesion feature modeling based on deformable attention is proposed. Deformable spatial attention breaks through the limitations of traditional fixed receptive fields, and frequency domain perception channel attention captures the texture frequency domain features of different diseases, significantly improving the classification and discrimination ability. An adaptive dynamic anchor frame generation strategy is proposed, which enables the anchor frame parameters to be adaptively adjusted according to local semantic information, effectively covering lesions of a wide scale range. A new lesion severity rating function is added, and disease trend analysis and alarm push are realized through the cloud platform, providing comprehensive support for the treatment decision of aquaculture personnel.

[0021] (5) The system adopts a lightweight design across the entire chain, with the total number of model parameters controlled within 8.5M. The end-to-end inference time on the edge computing platform is 35ms, which meets the requirements for real-time detection. The system achieves mAP@0.5 of 0.892 and mAP@0.5:0.95 of 0.571 on the self-built dataset.

[0022] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0023] Figure 1 This is an overall architecture diagram of an embodiment of the intelligent detection system for fish surface lesions in underwater aquaculture scenarios according to the present invention; Figure 2 This is a schematic diagram of the deformable attention feature enhancement module according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the bidirectional feature pyramid and adaptive dynamic anchor frame detection structure according to an embodiment of the present invention; Figure 4 This is an algorithm flowchart of the edge computing processing module in an embodiment of the present invention; Figure Labels 10. Underwater Image Acquisition Module; 101. Underwater High-Definition Camera Unit; 102. Supplemental Light Unit; 103. Waterproof Sealed Housing; 104. Communication Interface Unit; 20. Edge Computing Processing Module; 201. Image Quality Perception Adaptive Enhancement Unit; 202. Fish Target Localization Unit; 203. Super-Resolution Feature Magnification Unit; 204. Multi-Granularity Feature Extraction Unit; 205. Deformable Attention Feature Enhancement Unit; 206. Adaptive Dynamic Anchor Frame Detection Unit; 207. Multi-Task Joint Decoding Unit; 208. Edge Inference Chip; 30. Aquaculture Management Cloud Platform Module; 301. Data Receiving and Storage Unit; 302. Lesion Statistical Analysis Unit; 303. Alarm Push Unit; 304. User Management Unit. Detailed Implementation

[0024] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0025] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0026] Example Please see Figure 1 This invention provides an intelligent detection system for fish surface lesions in underwater aquaculture scenarios, comprising an underwater image acquisition module 10, an edge computing processing module 20, and an aquaculture management cloud platform module 30. The underwater image acquisition module 10 and the edge computing processing module 20 are connected via wired or wireless means, and the edge computing processing module 20 and the aquaculture management cloud platform module 30 are connected via a network.

[0027] The underwater image acquisition module 10 is used to acquire underwater images of fish in aquaculture water in real time. It provides illumination through supplementary lighting and transmits the image data to the edge computing processing module 20. It features waterproof sealing and communication transmission capabilities. The module includes an underwater high-definition camera unit 101, a supplementary lighting unit 102, a waterproof sealed housing 103, and a communication interface unit 104. The underwater high-definition camera unit 101 uses an industrial-grade underwater camera, supporting real-time video acquisition at 1920×1080 resolution and 30 frames per second, and is equipped with autofocus and automatic white balance functions. The supplementary lighting unit 102 uses an LED array for supplementary lighting, supporting an adjustable color temperature of 4000K-6500K, and automatically adjusts brightness according to ambient light, providing a stable light source for underwater imaging. The waterproof sealed housing 103 has an IP68 protection rating and can operate normally in water depths of 0-15 meters. The communication interface unit 104 supports both wired Ethernet and wireless WiFi transmission methods, transmitting the acquired image data to the edge computing processing module 20 in real time. The underwater camera unit is installed 1-3 meters below the water surface of the aquaculture pond using a fixed bracket. Supplemental lights are installed around the camera and connected to the edge computing processing module 20 on the shore via waterproof cables.

[0028] The edge computing processing module 20, operating based on the edge inference chip 208, performs quality enhancement, target localization, feature extraction and enhancement, target detection, and multi-task decoding on underwater images, completing real-time detection and analysis of fish lesions. The edge computing processing module 20 includes an image quality-aware adaptive enhancement unit 201, a fish target localization unit 202, a super-resolution feature magnification unit 203, a multi-granularity feature extraction unit 204, a deformable attention feature enhancement unit 205, an adaptive dynamic anchor frame detection unit 206, a multi-task joint decoding unit 207, and an edge inference chip 208.

[0029] The image quality perception adaptive enhancement unit 201, fish target localization unit 202, super-resolution feature magnification unit 203, multi-granularity feature extraction unit 204, deformable attention feature enhancement unit 205, adaptive dynamic anchor box detection unit 206, and multi-task joint decoding unit 207 are all deployed as software algorithm modules on the edge inference chip 208. The edge inference chip 208 adopts an embedded AI inference platform with NVIDIA Jetson AGX Xavier or equivalent computing power, and has 302GB of memory and a 512-core GPU, which can meet the real-time inference requirements of all algorithm modules.

[0030] The image quality perception adaptive enhancement unit 201 constructs an underwater image quality assessment network to perceive the degree of degradation in the input image. Based on the perception results, it dynamically adjusts the enhancement parameters, sequentially performing wavelength adaptive color compensation, depth estimation-guided contrast adaptive enhancement, and structure-aware denoising to preserve lesion texture. The specific implementation of the image quality perception adaptive enhancement unit 201 is as follows: A lightweight underwater image quality assessment network, Q-Net, is constructed. The network uses the lightweight convolutional network architecture MobileNetV3-Small as the backbone. After global average pooling (GAP), a fully connected layer (input dimension 576, output dimension 3) is applied, followed by a sigmoid activation function to output a 3D quality vector. ; in, , , The Q-Net is pre-trained on a self-built underwater image quality assessment dataset containing 5,000 labeled images covering four typical water quality conditions: clear water, murky water, deep water, and shallow water. The inference time is less than 2ms.

[0031] Wavelength adaptive color compensation is based on the physical characteristics of underwater light attenuation and is grounded in a three-dimensional mass vector. Dynamically calculate the compensation coefficient for each channel: ; ; ; in , , To obtain learnable parameters, the input image is converted to the Lab color space, and then the illumination components are estimated using the multi-scale Retinex algorithm on the L channel, followed by normalization. The calculation formula is: ; in It is a Gaussian filter kernel. The weighting coefficients are and satisfy the following conditions: =1; Adaptive grayscale world correction is applied to channels a and b to eliminate color shift, and finally, channel compensation coefficients are used to convert the color back to RGB space.

[0032] Contrast adaptive enhancement guided by depth estimation utilizes a monocular depth estimation network to generate a depth map D. Based on the depth values, the image is divided into three regions: near-field, mid-field, and far-field. Different contrast limiting parameters are adaptively set for different depth regions for CLAHE enhancement: clipLimit=1.5 for the near-field region, clipLimit=2.0 for the mid-field region, and clipLimit=3.0 for the far-field region. The image is divided into 8×8 sub-blocks, and bilinear interpolation is used to eliminate sub-block boundary artifacts.

[0033] Contrast adaptive enhancement guided by depth estimation utilizes a lightweight monocular depth estimation network based on the MobileNetV2 encoder-decoder architecture. The input is the enhanced image scaled to 256×256 resolution, and the output is a normalized depth map at the same resolution. The model has approximately 2M parameters and an inference time of less than 3ms; the image is divided into near-field regions based on the normalized depth values. ), mid-range area ( ) and distant areas ( Different contrast limiting parameters were adaptively set for different depth regions to perform CLAHE (Contrast Limited Adaptive Histogram Equalization) enhancement: clipLimit=1.5 for near-field region, clipLimit=2.0 for mid-field region, and clipLimit=3.0 for far-field region; the image was divided into 8×8 sub-blocks, and bilinear interpolation was used to eliminate sub-block boundary artifacts.

[0034] Structure-aware denoising for lesion texture preservation employs a dual-branch structure, where the main branch uses a guided filtering algorithm for global denoising, with a filter window radius of [missing information]. Regularization parameters The auxiliary branch extracts the edge map of the candidate lesion region through morphological operations. As a weighted mask, in the lesion edge area, The value is increased to 0.05 to reduce the filter intensity, preserve fine textures, and maintain normal filter intensity in smooth, non-lesion areas, resulting in the final enhanced image. .

[0035] The fish target localization unit 202 employs a lightweight target detection network to detect fish regions and extract regions of interest (ROIs) from the enhanced image. The YOLOv8-nano lightweight detection network is used, with an input image resolution of 640×640, model parameters controlled within 3M, and an inference speed of at least 30 frames per second. The detection confidence threshold is set to 0.5, and the non-maximum suppression IoU threshold is set to 0.45. Based on the selected bounding boxes, the ROIs are cropped from the enhanced image, and each region is uniformly scaled to a resolution of 640×640.

[0036] The super-resolution feature amplification unit 203 amplifies the resolution of the region of interest (ROI) on the fish body and injects the super-resolution reconstructed features into the subsequent feature extraction process through a gated fusion mechanism. The super-resolution feature amplification unit 203 incorporates a lightweight super-resolution network, SR-Lite, which uses a residual dense connection architecture containing four residual dense blocks. Each residual dense block contains four 3×3 convolutional layers with 64 channels and a growth rate of 302. At the end of the lightweight super-resolution network, a sub-pixel convolutional layer achieves 2× upsampling, amplifying the 640×640 input to 1280×1280. The number of network parameters is controlled within 0.8M, and the inference time per image is less than 5ms.

[0037] The lightweight super-resolution network SR-Lite employs a residual dense connection architecture and subpixel convolutional upsampling; a gated fusion mechanism. Auxiliary features are extracted from the intermediate layers of the super-resolution network. These features are then adaptively fused with shallow features from the backbone network using learnable gating weights. This allows the high-frequency detail information from the super-resolution reconstruction to selectively supplement the spatial information of missing micro-lesions in the backbone network. The fusion formula is as follows: ; Where G is the gating weight. These are the intermediate layer features of SR-Lite.

[0038] The multi-granularity feature extraction unit 204 extracts multi-level semantic features through an improved cross-stage gradient flow feature aggregation structure. The multi-granularity feature extraction unit 204 adopts an improved CSPDarknet backbone network and introduces a gradient flow redistribution mechanism, comprising five feature extraction stages: the first stage outputs a 160×160×64 feature map, the second stage outputs an 80×80×128 feature map, the third stage outputs a 40×40×256 feature map, the fourth stage outputs a 20×20×512 feature map, and the fifth stage outputs a 10×10×1024 feature map. The improved CSP module divides the input features into three parts along the channel dimension in a 2:1:1 ratio. The first part is processed by multiple Bottleneck residual units, the second part is processed by a 1×1 convolution and then establishes a skip connection with the intermediate layer features of the first part, the third part is directly passed, and finally the three parts are concatenated and fused through a 1×1 convolution.

[0039] like Figure 2 The deformable attention feature enhancement unit 205 introduces a deformable spatial attention module and a frequency domain sensing channel attention module to enhance the feature response of the lesion region. The deformable attention feature enhancement unit 205 adds the deformable spatial attention module and the frequency domain sensing channel attention module to the output features of the third, fourth, and fifth stages of the backbone network, respectively; the deformable spatial attention module predicts the spatial offset of the input features through a 3×3 deformable convolution. , The default number of sampling points This allows the sampling location for attention computation to be adaptively shifted to the lesion region. Then, pooling, concatenation, 7×7 convolution, and Sigmoid activation are performed on the shifted feature locations to compute spatial attention weights. Finally, the weights are multiplied element-wise with the shifted features to obtain spatially enhanced features.

[0040] The frequency domain sensing channel attention module performs a 2D discrete cosine transform on the input features along the spatial dimension to obtain a frequency domain representation. Low-frequency and high-frequency components are separated from the frequency domain representation and global average pooling is performed on each to obtain a frequency domain channel descriptor. The two descriptors are concatenated and fed into a shared multilayer perceptron (compression ratio 16) and activated by Sigmoid to obtain the channel attention weights.

[0041] like Figure 3The adaptive dynamic anchor box detection unit 206 employs an improved bidirectional feature pyramid structure for multi-scale feature fusion and dynamically adjusts anchor box parameters through an adaptive dynamic anchor box generation module. The adaptive dynamic anchor box detection unit 206 includes an improved Enhanced BiFPN bidirectional feature pyramid structure and an adaptive dynamic anchor box generation module. Enhanced BiFPN introduces learnable weight coefficients for weighted fusion based on PANet, adds depthwise separable convolutions after the fusion node for feature refinement, and adds an ultra-high resolution feature branch P2: derived from the 160×160×64 feature map output from the first stage of the backbone network, processed by two depthwise separable 3×3 convolutional layers, and then concatenated with the upsampled result of the N3 feature map. Finally, it outputs detection features at five scales: P2 (160×160), N3 (80×80), N4 (40×40), N5 (20×20), and N6 (10×10). The adaptive dynamic anchor box generation module performs statistical analysis on the lesion annotation boxes in the training dataset using the K-Means++ clustering algorithm before training to generate K=12 sets of optimal anchor box parameters. During the inference phase, it performs clustering on each feature map location... The convolutional prediction anchor box size and aspect ratio adjustment factors enable adaptive adjustment of anchor box parameters based on local semantic information. The anchor box parameters are: in, Indicates the first Group anchor frame, This corresponds to the 12 initial anchor boxes generated by K-Means++ clustering; Indicates the first The initial width of the anchor box is obtained by clustering the lesion annotation boxes in the training set using K-Means++. ; This represents the width adjustment factor, which is the offset predicted in real time by the network at this feature map location through convolution; This represents the height adjustment factor, which, as above, reflects the anchor frame parameters adjusted to meet the need for aspect ratio correction based on local semantic information at that location. This indicates the actual width of the anchor frame after adaptive adjustment; This indicates the actual height of the anchor frame after adaptive adjustment.

[0042] The improved bidirectional feature pyramid structure introduces learnable weight coefficients to weight and fuse features from different paths. After each fusion node, a depthwise separable convolution is added to refine the features, and an ultra-high resolution feature branch derived from the shallow layers of the backbone network is added to form five-scale detection features.

[0043] The multi-task joint decoding unit 207 employs a task-aware decoupled design, simultaneously outputting lesion bounding box coordinates, lesion category, lesion severity level, and confidence score. The multi-task joint decoding unit 207 includes three parallel branches: a classification branch, a regression branch, and a severity rating branch. The classification branch contains two 3×3 convolutional layers (256 channels) and one 1×1 convolutional output layer, outputting five categories (white spot disease, gill rot, red spot disease, saprolegniasis, and normal body surface). The regression branch contains two 3×3 convolutional layers (256 channels) and one 1×1 convolutional output layer, outputting 4D bounding box parameters. The severity rating branch contains one 3×3 convolutional layer (128 channels) and one 1×1 convolutional output layer, outputting three levels: mild, moderate, and severe. Post-processing uses Soft-NMS (Gaussian penalty function σ=0.5) to filter predicted boxes with a confidence score below 0.25.

[0044] The model training of each algorithm unit in the edge computing processing module 20 adopts a progressive transfer learning strategy: the first stage is pre-training on the COCO dataset to obtain general object detection capabilities; the second stage is full-parameter fine-tuning training on a self-built underwater fish body surface lesion dataset. The training dataset contains 15,000 high-quality labeled images, including 3,500 samples of white spot disease, 2,800 samples of gill rot disease, 2,500 samples of red spot disease, 2,400 samples of water mold disease, and 3,800 samples of normal body surface. Each image is simultaneously labeled with the lesion location, category, and severity level; the dataset is divided into training, validation, and test sets in a 7:1.5:1.5 ratio. Training uses the AdamW optimizer with an initial learning rate of 1e-3 and a weight decay of 0.05; the training loss function is: .

[0045] Focal Loss was used for classification, CIoU loss for bounding box regression, and ordered regression loss for severity rating. Data augmentation included customized underwater scene enhancement methods such as Mosaic augmentation, MixUp augmentation, random horizontal flipping, random underwater color shift simulation, random underwater fogging enhancement, and random bubble suspended particle overlay.

[0046] like Figure 4 After the image data is transmitted from the underwater image acquisition module 10 to the edge computing processing module 20 via the communication interface, it undergoes the following processing steps: Step 1: Image quality-aware adaptive enhancement unit 201 receives the original underwater image. The image (1920×1080) is scaled down to 224×224 and input into a Q-Net quality assessment network to obtain a quality vector q. Based on q, wavelength-adaptive color compensation coefficients are dynamically calculated for Lab color correction. A depth map is generated using a depth estimation network, and the CLAHE parameters are adaptively set for near, mid, and far-field regions to enhance contrast. A dual-branch perceptual denoising method preserves lesion texture and outputs an enhanced image. .

[0047] Step 2: The fish body target localization unit 202 will... The input YOLOv8-nano network is scaled to 640×640, and the output fish body bounding box is generated. Boxes with confidence scores <0.5 are filtered out, and NMS is used to remove duplicates (IoU=0.45). The fish body region of interest is cropped and normalized to 640×640.

[0048] Step 3: The super-resolution feature magnification unit 203 inputs the fish body region into the SR-Lite network to generate a 1280×1280 super-resolution image and extracts auxiliary features from the intermediate layers. spare.

[0049] Step 4: The multi-granularity feature extraction unit 204 inputs the 640×640 fish body region into the improved CSPDarknet backbone network to generate multi-scale feature maps in 5 stages; at the output of the first stage, SR-Lite auxiliary features are injected through a gating fusion mechanism.

[0050] Step 5: The deformable attention feature enhancement unit 205 adds deformable spatial attention and frequency domain perception channel attention dual modules to the outputs of the third, fourth and fifth stages of the backbone network to enhance the response of lesion features.

[0051] Step 6: The adaptive dynamic anchor frame detection unit 206 performs weighted bidirectional fusion of five-scale features through Enhanced BiFPN, and the P2 ultra-high resolution branch is derived from the 160×160 feature; the ADA-Anchor module dynamically predicts the anchor frame adjustment factor at each feature location.

[0052] Step 7: The multi-task joint decoding unit 207 outputs classification results (5 classes), bounding box regression (4 dimensions), severity level (3 levels), and target confidence (1 dimension) in parallel across five scales; the final detection results are obtained through Soft-NMS post-processing.

[0053] The aquaculture management cloud platform module 30 includes a data receiving and storage unit 301, a lesion statistical analysis unit 302, an alarm push unit 303, and a user management unit 304. The data receiving and storage unit 301 receives the detection results uploaded by the edge computing processing module 20 via RESTful API or MQTT protocol, including lesion images, detection box coordinates, lesion category, severity level, confidence score, and timestamp, and stores them in the database. The lesion statistical analysis unit 302 performs multi-dimensional statistics on historical detection data according to aquaculture pond, time period, and lesion type, and generates a lesion development trend curve. When the detection frequency of a certain lesion type exceeds a preset threshold within 24 hours, a disease warning is triggered. The alarm push unit 303 sends alarm information to aquaculture personnel via mobile APP push, SMS, or WeChat notification when moderate or severe lesions are detected. The alarm content includes lesion type, severity, detection image, and suggested treatment measures. The user management unit 304 supports multi-level permission management, including three roles: administrator, aquaculture technician, and ordinary aquaculture personnel. Aquaculture personnel can view the detection results, historical trends, and alarm records in real time through mobile APP or web page.

[0054] The model training employs a progressive transfer learning strategy: it is first pre-trained on the COCO dataset, and then fine-tuned with all parameters on a self-built dataset of 15,000 underwater fish lesion annotation images. Training uses the AdamW optimizer with cosine annealing learning rate scheduling, for a total of 500 training epochs. The loss function includes Focal Loss classification loss, CIoU bounding box regression loss, binary cross-entropy target confidence loss, and ordered regression severity rating loss. Data augmentation includes Mosaic, MixUp, and customized underwater scene enhancements such as random underwater color shift simulation, random underwater fogging enhancement, and random bubble suspended particle overlay.

[0055] Experimental results show that the system of this invention achieved excellent detection performance on the test set: mAP@0.5 reached 0.892, and mAP@0.5:0.95 reached 0.571; mAP@0.5 for white spot disease was 0.923, for gill rot disease it was 0.878, for red spot disease it was 0.869, and for water mold disease it was 0.881; the severity rating accuracy reached 87.2%; the end-to-end inference time was 35ms (Jetson AGX Xavier), meeting the requirements for real-time detection. Compared with directly applying the original YOLOv8, mAP@0.5 was improved by 10.5 percentage points, and the recall rate for small target detection was improved by 23.7 percentage points.

[0056] As shown in Table 1, the ablation experiments verified the contribution of each module: the baseline mAP@0.5 was 0.787; it increased to 0.821 (+3.4%) after adding UQAA; it increased to 0.845 (+2.4%) after adding SR-Guide; it increased to 0.872 (+2.7%) after adding DSA+FACA; it increased to 0.884 (+1.2%) after adding ADA-Anchor; it increased to 0.889 (+0.5%) after adding Enhanced BiFPN+P2; and it reached 0.892 (+0.3%) after adding severity rating.

[0057] Table 1 Ablation Experiment Results for Each Module

[0058] Therefore, this invention adopts the aforementioned intelligent detection system for fish surface lesions in underwater aquaculture scenarios, employing a three-layer architecture of end-edge-cloud. The underwater image acquisition end is equipped with a high-definition camera and adaptive supplementary lighting device. The edge computing end integrates core algorithm modules such as underwater image quality perception adaptive enhancement, super-resolution guided magnification of micro-lesion features, multi-granularity lesion feature modeling based on deformable attention, and adaptive dynamic anchor frame generation. A lesion statistical analysis and alarm early warning platform is built in the cloud, enabling high-precision, real-time, and robust detection and classification of various lesions on the fish surface, and providing remote monitoring and disease early warning services.

[0059] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A smart detection system for fish surface lesions in underwater aquaculture scenarios, characterized in that, include: The underwater image acquisition module is used to acquire underwater images of fish in aquaculture water in real time. It provides illumination through supplemental lighting and transmits the image data to the edge computing processing module. It has waterproof sealing and communication transmission capabilities. Includes an underwater high-definition camera unit, a supplementary lighting unit, a waterproof sealed housing, and a communication interface unit; The underwater high-definition camera unit is used to acquire underwater images of fish in aquaculture waters in real time; The supplementary lighting unit is used to provide auxiliary lighting for underwater photography; The communication interface unit is used to transmit the acquired image data to the edge computing processing module; The edge computing processing module, which runs on the edge inference chip, performs quality enhancement, target localization, feature extraction and enhancement, target detection and multi-task decoding on underwater images, and completes real-time detection and analysis of fish lesions. The aquaculture management cloud platform module is used to receive and store test results, perform statistical analysis and disease warning on lesion data, push alarm information to aquaculture personnel when lesions are detected, and implement account and permission management. The underwater image acquisition module is connected to the edge computing processing module via wired or wireless means, and the edge computing processing module is connected to the aquaculture management cloud platform module via a network.

2. The intelligent detection system for fish surface lesions in underwater aquaculture scenarios according to claim 1, characterized in that: The edge computing processing module includes an image quality perception adaptive enhancement unit, a fish target localization unit, a super-resolution feature magnification unit, a multi-granularity feature extraction unit, a deformable attention feature enhancement unit, an adaptive dynamic anchor box detection unit, a multi-task joint decoding unit, and an edge inference chip. The image quality perception adaptive enhancement unit, fish target localization unit, super-resolution feature magnification unit, multi-granularity feature extraction unit, deformable attention feature enhancement unit, adaptive dynamic anchor box detection unit, and multi-task joint decoding unit are all deployed on the edge inference chip.

3. The intelligent detection system for fish surface lesions in underwater aquaculture scenarios according to claim 2, characterized in that: The image quality perception adaptive enhancement unit constructs an underwater image quality assessment network to perceive the degree of degradation of the input image. Based on the perception results, it dynamically adjusts the enhancement parameters and sequentially performs wavelength adaptive color compensation, contrast adaptive enhancement guided by depth estimation, and structure-aware denoising for lesion texture preservation. The fish target localization unit uses a lightweight target detection network to detect fish regions in the enhanced image and extract the regions of interest for the fish. The super-resolution feature magnification unit magnifies the resolution of the region of interest in the fish and injects the super-resolution reconstructed features into the subsequent feature extraction process through a gated fusion mechanism. The multi-granularity feature extraction unit extracts multi-level semantic features through an improved cross-stage gradient flow feature aggregation structure; The deformable attention feature enhancement unit introduces a deformable spatial attention module and a frequency domain sensing channel attention module to enhance the feature response of the lesion region; The adaptive dynamic anchor frame detection unit uses an improved bidirectional feature pyramid structure for multi-scale feature fusion and dynamically adjusts the anchor frame parameters through the adaptive dynamic anchor frame generation module. The multi-task joint decoding unit adopts a task-aware decoupling design and simultaneously outputs the lesion bounding box coordinates, lesion category, lesion severity level, and confidence score.

4. The intelligent detection system for fish surface lesions in underwater aquaculture scenarios according to claim 2, characterized in that: A lightweight underwater image quality assessment network, Q-Net, is constructed in the image quality perception adaptive enhancement unit. The underwater image quality assessment network adopts a lightweight convolutional network architecture and outputs a three-dimensional quality vector to represent the degree of color cast, the degree of contrast degradation, and the noise level, respectively. Wavelength adaptive color compensation dynamically calculates the compensation coefficients for each channel based on the three-dimensional quality vector. , , ,in , , To obtain learnable parameters, the input image is converted to the Lab color space, and then the illumination components are estimated using the multi-scale Retinex algorithm on the L channel, followed by normalization. The calculation formula is: ; in It is a Gaussian filter kernel. The weighting coefficients are satisfied. =1; Adaptive grayscale world correction is applied to channels a and b to eliminate color cast; The contrast adaptive enhancement based on depth estimation uses a monocular depth estimation network to generate a depth map. Based on the depth value, the image is divided into three regions: near, middle and far. Different contrast limit parameters are adaptively set for different depth regions to perform CLAHE enhancement. Bilinear interpolation is used to eliminate sub-block boundary artifacts. The structure-aware denoising method for lesion texture preservation adopts a dual-branch structure. The main branch uses a guided filtering algorithm for global denoising, while the auxiliary branch extracts the edge map of the lesion candidate region through morphological operations as a weight mask. The filtering intensity is reduced in the lesion edge region to preserve fine texture, while the normal filtering intensity is maintained in the smooth non-lesion region.

5. The intelligent detection system for fish surface lesions in underwater aquaculture scenarios according to claim 2, characterized in that: The super-resolution feature amplification unit incorporates a lightweight super-resolution network, SR-Lite, which employs a residual dense connection architecture. It consists of four residual dense blocks, each containing four 3×3 convolutional layers with 64 channels and a growth rate of 302. At the end of the lightweight super-resolution network, a sub-pixel convolutional layer is used to achieve 2× upsampling, amplifying the 640×640 input to 102080×102080. The lightweight super-resolution network SR-Lite employs a residual dense connection architecture and sub-pixel convolutional upsampling. A gated fusion mechanism extracts auxiliary features from the intermediate layers of the super-resolution network and adaptively fuses these features with shallow features from the backbone network using learnable gate weights. The fusion formula is as follows: ; Where G is the gating weight. These are the intermediate layer features of SR-Lite.

6. The intelligent detection system for fish surface lesions in underwater aquaculture scenarios according to claim 2, characterized in that: The multi-granularity feature extraction unit adopts an improved CSPDarknet backbone network and introduces a gradient flow redistribution mechanism, which includes five feature extraction stages: the first stage outputs a 160×160×64 feature map, the second stage outputs an 80×80×10208 feature map, the third stage outputs a 40×40×2056 feature map, the fourth stage outputs a 20×20×5102 feature map, and the fifth stage outputs a 10×10×10204 feature map. The improved CSP module divides the input features into three parts along the channel dimension in a ratio of 2:1:

1. The first part is processed by multiple Bottleneck residual units, the second part is processed by a 1×1 convolution and then establishes a skip connection with the intermediate layer features of the first part, and the third part is directly passed. Finally, the first, second and third parts are concatenated and channel fusion is performed by a 1×1 convolution.

7. The intelligent detection system for fish surface lesions in underwater aquaculture scenarios according to claim 2, characterized in that: The deformable attention feature enhancement unit adds a deformable spatial attention module and a frequency domain sensing channel attention module to the output features of the third, fourth, and fifth stages of the backbone network, respectively. The deformable spatial attention module predicts the spatial offset of the input features through a 3×3 deformable convolution, so that the sampling position of the attention calculation can be adaptively shifted to the lesion region. The spatial attention weight is calculated at the offset feature position, and finally the weight is multiplied element-wise with the offset feature to obtain the spatial enhancement feature. The frequency domain sensing channel attention module performs discrete cosine transform on the input features along the spatial dimension to obtain the frequency domain representation. It separates the low-frequency and high-frequency components from the frequency domain representation and performs global average pooling on each to obtain the corresponding frequency domain channel descriptors. The two frequency domain channel descriptors are concatenated and fed into a shared multilayer perceptron and activated by Sigmoid to obtain the channel attention weights.

8. The intelligent detection system for fish surface lesions in underwater aquaculture scenarios according to claim 2, characterized in that: The adaptive dynamic anchor box detection unit includes an improved BiFPN bidirectional feature pyramid structure and an adaptive dynamic anchor box generation module. The adaptive dynamic anchor box generation module generates multiple sets of optimal anchor box parameters by performing statistical analysis on the lesion annotation boxes in the training dataset through clustering algorithms. During the inference stage, the size adjustment factor and aspect ratio adjustment factor of the anchor box are predicted for each feature map position through convolution, so as to realize the adaptive adjustment of the anchor box parameters according to local semantic information. The improved bidirectional feature pyramid structure introduces learnable weight coefficients to weight and fuse features from different paths. After each fusion node, a depthwise separable convolution is added to refine the features, and an ultra-high resolution feature branch derived from the shallow layers of the backbone network is added to form five-scale detection features.

9. The intelligent detection system for fish surface lesions in underwater aquaculture scenarios according to claim 2, characterized in that: The multi-task joint decoding unit includes three parallel branches: classification branch, regression branch, and severity rating branch. The classification branch outputs the probability distribution of various lesions. The lesion categories include five categories: white spot disease, gill rot disease, red spot disease, water mold disease, and normal body surface. The regression branch outputs the center point coordinate offset and width and height of the lesion bounding box. The severity rating branch outputs three levels of lesion severity: mild, moderate, and severe. Post-processing employs soft nonmaximum suppression to reduce the false negative rate in dense lesion areas.

10. The intelligent detection system for fish surface lesions in underwater aquaculture scenarios according to claim 1, characterized in that, The cloud platform for aquaculture management includes the following modules: The data receiving and storage unit is used to receive and store the detection result data uploaded by the edge computing processing module; The lesion statistical analysis unit is used for trend analysis and disease early warning of historical test data; The alarm push unit is used to push alarm information to the farmer's terminal when lesions are detected; The user management unit is used to manage the accounts and permissions of aquaculture personnel.