An AI vision health monitoring device for farmed fish
Patent Information
- Application Number
- CN202611278888.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]本发明的目的在于提供一种养殖鱼类AI视觉健康监测装置,以解决上述背景中问题
(1)本发明通过偏振差分去耀斑与基于径向距离加权的编码卷积,从图像采集和特征提取源头抑制了水面反射及图像边缘畸变对鱼体纹理特征的干扰,并结合偏态与峰态高阶统计量进行校正,使健康评估仅敏感于鱼体表真实病理变化,避免了水体浊度变化等环境光学漂移引发的虚假预警,提升了复杂养殖环境下健康监测结果的稳定性和可信度。
Smart Images

Figure CN122929375A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of aquaculture management and decision support technology, specifically to an AI visual health monitoring device for farmed fish. Background Technology
[0002] In recent years, with the rapid development of aquaculture towards intensification and factory farming, and the continuous increase in stocking density, the spread and severity of fish diseases have significantly increased. Traditional health management methods relying on manual experience observation and regular sampling inspections are no longer sufficient to meet the actual needs of precision aquaculture decision-making. Automated monitoring methods based on computer vision have gradually become a research hotspot in the field of aquaculture health management due to their advantages such as non-contact operation, stress-free operation, and continuous operation.
[0003] The existing technology has the following shortcomings: Existing visual health monitoring methods for farmed fish suffer from frequent uncontrolled spurious drifts in health assessment indicators due to the lack of effective decoupling of optical noise and real pathological phenotypic signals in complex aquaculture environments. Furthermore, existing methods rely on pre-labeled disease sample libraries and require offline retraining to adapt to different aquaculture scenarios, making it difficult to use the monitoring results as a reliable basis for aquaculture management decisions. Summary of the Invention
[0004] The purpose of this invention is to provide an AI visual health monitoring device for farmed fish to solve the problems mentioned above.
[0005] The objective of this invention can be achieved through the following technical solutions: An AI-powered visual health monitoring device for farmed fish includes: The optical state sensing module acquires visible light images of fish in aquaculture water and simultaneously extracts pixel statistics of background water areas without fish coverage in the visible light images of fish, which serve as the current optical state anchor point. The optical drift detection module compares the current optical state anchor point with the historical optical benchmark in the previous stable period. When the difference between the two exceeds a preset threshold, an optical drift trigger signal is generated, and the visible light image of the fish swarm at the current acquisition time is used as the calibration sample set. The affine parameter generation module, in response to the optical drift trigger signal, takes the pre-set meta-learning initialization parameters at the beginning of the monitoring process as the starting point, performs a single inner loop gradient update using the calibration sample set, and generates affine modulation coefficient pairs adapted to the current optical state. The feature distribution correction module uses affine modulation coefficient pairs to dynamically weight and correct the cumulative statistical moments in the feature distribution reference, mapping the feature distribution of the current degraded image to a reference distribution range aligned with the clear water baseline, thus obtaining the corrected feature distribution. The health assessment and decision-making module calculates the individual deviation degree based on the corrected feature distribution, compares the individual deviation degree with the preset management threshold, and outputs health monitoring results including the identity of the abnormal fish and the degree of deviation, which serve as the basis for aquaculture management decisions.
[0006] As a further aspect of the present invention: the process of obtaining the current optical state anchor point is as follows: Simultaneously trigger the acquisition of two polarization images with orthogonal polarization directions to obtain the first polarization image and the second polarization image; The first polarization image and the second polarization image are differentially processed to eliminate water surface reflection flares, resulting in a flare-free image. Perform saliency detection based on pixel-level texture gradient and edge intensity on the flare-removed image to mark the area covered by the fish body; The marked fish-covered areas are masked out of the flare-free image, while the background water areas not covered by the fish are retained. The mean and variance of the grayscale of all pixels in the background water area are calculated and used as the anchor point of the current optical state.
[0007] As a further aspect of the present invention: the process of obtaining the calibration sample set is as follows: Construct a sliding time window with the current time as the endpoint, and extract the optical state anchor point at each acquisition time within the sliding time window; Sequential weighted fusion is performed on the mean and variance of gray levels of all anchor points within the sliding time window to generate a historical optical benchmark with confidence intervals. Calculate the first deviation between the mean gray value of the current optical state anchor point and the mean gray value of the historical optical reference, and at the same time calculate the second deviation between the gray variance of the current optical state anchor point and the gray variance of the historical optical reference. When the first deviation and the second deviation both exceed their respective preset tolerance ranges, it is determined that the difference between the two exceeds the preset threshold, an optical drift trigger signal is generated, and the visible light image of the fish swarm at the current acquisition time is marked as the calibration sample set.
[0008] As a further aspect of the present invention: the generation process of the affine modulation coefficient pair is as follows: Each frame of the calibration sample set is sequentially encoded and convolved to obtain the intermediate feature map corresponding to each frame, and the mean and variance of all intermediate feature maps in the channel dimension are calculated. Using the meta-learning initialization parameters as the initial scaling factor and initial offset factor for the affine modulation coefficient pair, and taking the optimization direction of the mean approaching the clear mean and variance of the feature distribution reference, a single gradient descent iteration is performed to adjust the initial scaling factor and initial offset factor, thereby generating an affine modulation coefficient pair adapted to the current optical state.
[0009] As a further aspect of the present invention: the process of obtaining the intermediate feature map is as follows: Acquire visible light images of fish swarms for each frame of the calibration sample set, and generate a two-dimensional radial distance weight matrix based on the distance of each pixel position in the image to the center point of the image. The pixel values within each convolution window in the encoding convolution operation are weighted using a two-dimensional radial distance weight matrix to obtain the spatial weighted response value corresponding to each convolution window. Arrange the spatially weighted response values of all convolutional windows according to the original image space to form the intermediate feature map corresponding to the corresponding frame image.
[0010] As a further aspect of the present invention: obtaining the corrected feature distribution specifically includes: Extract the skewness and kurtosis statistics of the intermediate feature maps of each frame in the calibration sample set along the channel dimension; The skewness statistic and kurtosis statistic are compared with the clear skewness benchmark and clear kurtosis benchmark stored in the characteristic distribution benchmark, respectively, to obtain the skewness deviation and kurtosis deviation. The skewness correction strength and kurtosis correction strength are determined based on the numerical ranges of the skewness deviation and kurtosis deviation, respectively. The scaling factor in the affine modulation coefficient pair is used to update the cumulative mean statistic according to the skewness correction strength, and the offset factor in the affine modulation coefficient pair is used to update the cumulative variance statistic according to the kurtosis correction strength, thus obtaining the corrected characteristic distribution.
[0011] As a further aspect of the present invention: the extraction of skewness and kurtosis statistics of the intermediate feature maps of each frame in the calibration sample set along the channel dimension specifically includes: The activation values of the intermediate feature map in each channel dimension are divided into multiple equal-width intervals according to their numerical values. The number of activation values in each interval is counted, and a histogram distribution of activation values for each channel is generated. Based on the cumulative difference in quantity between the left and right sides of each interval in the histogram distribution with the median of the channel as the boundary, a skewness statistic representing the degree of asymmetry of the distribution is obtained. Based on the ratio of the number of activation values in the central peak interval to the number of activation values in the two tail intervals of the histogram distribution, a kurtosis statistic representing the degree of concentration of the tails of the distribution relative to the center is obtained.
[0012] As a further aspect of the present invention: the output includes health monitoring results that identify the abnormal fish and the degree of deviation, specifically including: Extract the set of feature vectors corresponding to each individual's identity from the corrected feature distribution; Calculate the average distance between each feature vector in the feature vector set of each individual and the remaining feature vectors, and use it as the local neighborhood radius of the individual; The local neighborhood radius of all individuals is statistically analyzed to obtain the group neighborhood baseline value. The local neighborhood radius of each individual is compared with the group neighborhood baseline value to obtain the deviation degree of the individual. Individuals whose deviation degree exceeds the preset management threshold are marked as abnormal, and the identity of the abnormal fish and the degree of deviation are output.
[0013] The beneficial effects of this invention are: (1) This invention suppresses the interference of water surface reflection and image edge distortion on fish texture features from the source of image acquisition and feature extraction by polarization difference flare removal and radial distance-weighted coding convolution. It also combines skewness and kurtosis higher-order statistics for correction, so that health assessment is only sensitive to the real pathological changes on the fish body surface, avoiding false warnings caused by environmental optical drift such as water turbidity changes, and improving the stability and reliability of health monitoring results in complex aquaculture environments.
[0014] (2) This invention uses a sliding window to sequentially fuse dynamic detection of optical drift and generate affine modulation coefficient pairs online. It completes feature distribution correction by performing a single gradient descent on the calibration sample set, achieving fast adaptation with low computational overhead and avoiding offline retraining or manual calibration. At the same time, it identifies abnormal individuals by comparing the local neighborhood radius of the individual feature vector set with the population benchmark, without relying on a pre-labeled disease sample library, enabling the device to have good general deployment capability in different breeding scenarios. Attached Figure Description
[0015] The invention will now be further described with reference to the accompanying drawings.
[0016] Figure 1 This is a flowchart of an AI visual health monitoring device for farmed fish according to the present invention; Figure 2 This is a flowchart of the process for obtaining the calibration sample set in this invention; Figure 3 This is a flowchart of the process for generating affine modulation coefficient pairs in 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] Please see Figure 1As shown, the present invention is an AI visual health monitoring device for farmed fish, comprising: The optical state sensing module acquires visible light images of fish in aquaculture water and simultaneously extracts pixel statistics of background water areas without fish coverage in the visible light images of fish, which serve as the current optical state anchor point. The optical drift detection module compares the current optical state anchor point with the historical optical benchmark in the previous stable period. When the difference between the two exceeds a preset threshold, an optical drift trigger signal is generated, and the visible light image of the fish swarm at the current acquisition time is used as the calibration sample set. The affine parameter generation module, in response to the optical drift trigger signal, takes the pre-set meta-learning initialization parameters at the beginning of the monitoring process as the starting point, performs a single inner loop gradient update using the calibration sample set, and generates affine modulation coefficient pairs adapted to the current optical state. The feature distribution correction module uses affine modulation coefficient pairs to dynamically weight and correct the cumulative statistical moments in the feature distribution reference, mapping the feature distribution of the current degraded image to a reference distribution range aligned with the clear water baseline, thus obtaining the corrected feature distribution. The health assessment and decision-making module calculates the individual deviation degree based on the corrected feature distribution, compares the individual deviation degree with the preset management threshold, and outputs health monitoring results including the identity of the abnormal fish and the degree of deviation, which serve as the basis for aquaculture management decisions.
[0019] In the optical state perception module, visible light images of fish schools in the aquaculture water are acquired, and pixel statistics of background water areas without fish cover in the visible light images of the fish schools are extracted simultaneously as the current optical state anchor point, specifically including: Two polarization cameras with mutually orthogonal polarization directions are installed at fixed monitoring points in the aquaculture pond. The two polarization cameras acquire images using a synchronous triggering method.
[0020] When the acquisition time arrives, the first polarization camera and the second polarization camera are simultaneously triggered to expose and image the same fish population area in the aquaculture water body, respectively, to obtain the first polarization image and the second polarization image. The first polarization image is an image acquired in the horizontal polarization direction, and the second polarization image is an image acquired in the vertical polarization direction.
[0021] Because water surface reflection flares have opposite polarization response characteristics in the horizontal and vertical polarization directions, while the reflected light from fish targets in the water body remains relatively stable in polarization characteristics.
[0022] After obtaining the first polarization image and the second polarization image, the pixel values at the same pixel positions in the two images are differentially calculated.
[0023] For each pixel location, the absolute value of the difference between the pixel value of the first polarization image and the pixel value of the second polarization image is taken as the difference pixel value at that location. After traversing all pixel locations, a flare-free image is constructed.
[0024] In this deflare image, the water surface reflection flares are suppressed due to the polarization cancellation effect, while the target area of the fish body is preserved due to the stable polarization characteristics.
[0025] Saliency detection is performed on the deflare-removed image to mark the areas covered by the fish. The saliency detection process is as follows: for each pixel position in the deflare-removed image, the gray-level change rate of that pixel in the horizontal and vertical directions is calculated and recorded as the horizontal gradient and vertical gradient, respectively. The absolute values of the horizontal gradient and the vertical gradient are added together to obtain the gradient magnitude of that pixel.
[0026] Simultaneously, taking this pixel as the center, the gray values of the eight surrounding neighboring pixels are taken, and the average of the absolute values of the differences between the gray values of the center pixel and the gray values of the eight neighboring pixels is calculated as the edge intensity of this pixel.
[0027] The saliency value of a pixel is obtained by multiplying the gradient magnitude by a preset gradient weight coefficient and adding the edge strength by a preset edge weight coefficient, where the gradient weight coefficient is 0.4 and the edge weight coefficient is 0.6.
[0028] Pixels with a saliency value greater than a preset saliency threshold are marked as fish body regions. The preset saliency threshold is 1.2 times the average saliency value of all pixels in the deflare image of that frame.
[0029] After traversing all pixels, the fish-body coverage area is obtained, consisting of the set of pixels marked as fish-body regions.
[0030] After obtaining the fish body coverage area, the fish body coverage area is masked out from the deflare image.
[0031] Specifically, all pixel locations in the flare-free image that were not marked as fish areas are retained, and these retained pixel locations are used to form the background water area.
[0032] The grayscale values of all pixels within the background water area are statistically analyzed. The sum of the grayscale values of all retained pixels is calculated and divided by the total number of retained pixels to obtain the grayscale mean. The square of the difference between the grayscale value of each retained pixel and the grayscale mean is calculated. The sum of all squared values is then divided by the total number of retained pixels to obtain the grayscale variance.
[0033] The mean and variance of grayscale are used together as the current optical state anchor point to characterize the optical properties of the aquaculture water body at the current moment.
[0034] Please see Figure 2As shown, in the optical drift detection module, the current optical state anchor point is compared with the historical optical benchmark in the previous stable period. When the difference between the two exceeds a preset threshold, an optical drift trigger signal is generated. The visible light image of the fish swarm at the current acquisition time is used as the calibration sample set, specifically including: Construct a sliding time window with the current data collection time as the endpoint.
[0035] The sliding time window covers 50 consecutive acquisition times prior to the current time. Each acquisition time corresponds to a recorded optical state anchor point, which is composed of the gray mean and gray variance of the background water area.
[0036] If there are fewer than 50 data collection moments before the current moment, then the sliding time window is formed by all the data collection moments that have actually been collected.
[0037] Extract the optical state anchor point corresponding to each acquisition moment within the sliding time window for subsequent historical benchmark generation.
[0038] Sequential weighted fusion is performed on all gray-level mean values within the sliding time window to generate a historical benchmark for the gray-level mean and a confidence interval for that benchmark.
[0039] The specific process of sequential weighted fusion is as follows: the gray-scale mean value of the first acquisition time within the sliding time window is used as the initial fusion value. For each subsequent acquisition time, fusion is performed sequentially in the order from the oldest to the newest acquisition time. The gray-scale mean value of the current acquisition time participates in fusion with a weight of 0.1, and the historical values that have already been fused participate in fusion with a weight of 0.9. This process is repeated until all gray-scale mean values within the window are fused, thus obtaining the historical benchmark of the gray-scale mean value.
[0040] Record the root mean square difference of the fusion value at each step in the sequential weighted fusion process based on all gray-level means within the window. Subtract the product of this root mean square difference and the coefficient 1.96 from the historical benchmark of the gray-level means to obtain the lower limit of the gray-level mean confidence interval. Add the product of this root mean square difference and the coefficient 1.96 to the historical benchmark of the gray-level means to obtain the upper limit of the gray-level mean confidence interval.
[0041] For grayscale variance, the same sequential weighted fusion method is adopted. The grayscale variance of the first acquisition time in the sliding time window is used as the initial fusion value. The grayscale variance of each subsequent acquisition time participates in the fusion with a weight of 0.1, and the fused historical values participate in the fusion with a weight of 0.9, until all grayscale variances in the window are fused to obtain the historical benchmark of grayscale variance. The lower limit and upper limit of the grayscale variance confidence interval are obtained in the same way as above.
[0042] After obtaining the historical optical reference, calculate the absolute difference between the average gray value of the current optical state anchor point and the average gray value of the historical optical reference, and record this absolute difference as the first deviation.
[0043] Calculate the absolute difference between the grayscale variance of the current optical state anchor point and the grayscale variance of the historical optical reference, and denote this absolute difference as the second deviation.
[0044] For the grayscale mean, the preset tolerance range is within 5% above and below the historical baseline of the grayscale mean. That is, the lower limit of the tolerance range is 0.95 times the historical baseline of the grayscale mean, and the upper limit of the tolerance range is 1.05 times the historical baseline of the grayscale mean. For the grayscale variance, the preset tolerance range is within 10% above and below the historical baseline of the grayscale variance. That is, the lower limit of the tolerance range is 0.90 times the historical baseline of the grayscale variance, and the upper limit of the tolerance range is 1.10 times the historical baseline of the grayscale variance.
[0045] Determine whether the first deviation exceeds the tolerance range of the grayscale mean, that is, determine whether the grayscale mean is less than the lower limit of the grayscale mean tolerance range or greater than the upper limit of the grayscale mean tolerance range. Determine whether the second deviation exceeds the gray-scale variance tolerance range, that is, determine whether the gray-scale variance is less than the lower limit of the gray-scale variance tolerance range or greater than the upper limit of the gray-scale variance tolerance range.
[0046] When the first deviation and the second deviation both exceed their respective tolerance ranges, it is determined that the difference between the current optical state anchor point and the historical optical reference exceeds a preset threshold, and an optical drift trigger signal is generated at this time.
[0047] While generating the optical drift trigger signal, the visible light image of the fish swarm obtained at the current acquisition time is marked as a calibration sample set, which is used for the subsequent affine modulation coefficient generation process.
[0048] Please see Figure 2 As shown, in the affine parameter generation module, in response to the optical drift trigger signal, the pre-set meta-learning initialization parameters at the beginning of the monitoring process are used as the starting point. A single inner loop gradient update is performed using the calibration sample set to generate affine modulation coefficient pairs adapted to the current optical state, specifically including: After generating the optical drift trigger signal and marking the visible light image of the fish swarm at the current acquisition time as the calibration sample set, the generation process of affine modulation coefficient pairs is initiated.
[0049] The calibration sample set contains visible light images of fish swarms obtained at the current acquisition time. An encoding convolution operation is performed on these images to obtain intermediate feature maps.
[0050] The encoding convolution operation uses preset convolution kernel parameters, where the kernel size is 3x3, the stride is 1, the padding method is zero padding to keep the output space size consistent with the input, and the number of convolution kernels is 64.
[0051] Before performing the encoding convolution operation, for each frame of visible light image of a school of fish in the calibration sample set, the two-dimensional spatial dimensions of the image are first obtained, and a pixel position coordinate mapping is established with the center point of the image as the origin.
[0052] Based on the distances of each pixel in the image to the image center point, a two-dimensional radial distance weight matrix with the same size as the image is generated. For any pixel in the image located at the horizontal direction... The first, vertical direction Given the position of each pixel, calculate the Euclidean distance from that pixel to the center point of the image, and record it as the distance value. .
[0053] With this distance value Compared with the preset radial distance reference value The ratio is used as the independent variable, where the radial distance reference value is... The value is the square root of the sum of the squares of half the total number of pixels in the horizontal direction and half the total number of pixels in the vertical direction of the image.
[0054] The radial distance weighting coefficient corresponding to the pixel position is determined according to the following weighting formula. The calculation expression is: ; in, This represents the Euclidean distance from the pixel location to the center point of the image. This represents a radial distance reference value. This represents the radial distance weighting coefficient corresponding to the pixel position.
[0055] As can be seen from the above formula, the closer a pixel is to the center of the image, the greater its distance value. The smaller the value, the higher the weighting coefficient. The closer a pixel is to 1, the closer it is to the edge of the image; its distance value The larger the value, the higher the weighting coefficient. The closer it is to 0.
[0056] Traverse all pixel positions in the image, and arrange the weight coefficients calculated for each position according to the original image space to form a two-dimensional radial distance weight matrix corresponding to the frame image.
[0057] After obtaining the two-dimensional radial distance weight matrix, the pixel values in each convolution window in the encoding convolution operation are weighted using this weight matrix to obtain the spatial weighted response value corresponding to each convolution window.
[0058] Specifically, for each convolution window, the convolution window covers a local region in the image, which contains 9 pixel positions, numbered from the first pixel to the ninth pixel in order from top to bottom and from left to right.
[0059] Extract the weight coefficients corresponding to the nine pixel positions in the two-dimensional radial distance weight matrix, and denote them as the first weight coefficient to the ninth weight coefficient.
[0060] Multiply the gray value of the first pixel by the first weighting coefficient, add the gray value of the second pixel by the second weighting coefficient, and so on, until the gray value of the ninth pixel is multiplied by the ninth weighting coefficient to obtain a weighted sum.
[0061] Add the first to the ninth weight coefficients together to get the total weight.
[0062] Dividing the weighted sum by the total weights yields the spatially weighted response value of the convolution window.
[0063] The convolution window is moved according to the preset convolution stride, and all spatial positions are traversed to obtain the spatial weighted response values corresponding to all convolution windows.
[0064] Arrange the spatially weighted response values corresponding to all convolutional windows according to the original image space. That is, each spatially weighted response value corresponds to the position of the center pixel of the convolutional window in the original image, thus forming the intermediate feature map corresponding to the frame image.
[0065] The spatial dimensions of the intermediate feature map are the same as those of the original image, and the value at each spatial location is the spatial weighted response value of the convolution window corresponding to that location.
[0066] For the calibration sample set, which contains only one frame of image at the current acquisition time, after obtaining the intermediate feature map corresponding to the frame image, the mean and variance of the intermediate feature map in the channel dimension are calculated.
[0067] The mean value in the channel dimension is calculated as follows: add the values of all 64 channels in the intermediate feature map at the same spatial position, divide by the number of channels 64, and obtain the channel mean value at that spatial position; traverse all spatial positions to obtain the channel mean value map.
[0068] The variance in the channel dimension is calculated as follows: For each spatial location in the intermediate feature map, calculate the square of the difference between the values of each of the 64 channels at that location and the mean of the aforementioned channels, add all the squared values together and divide by 64 to obtain the channel variance at that spatial location; traverse all spatial locations to obtain the channel variance map.
[0069] Before the encoding convolution operation begins, the monitoring process starts with a pre-set meta-learning initialization parameter, which includes the initial values of the scaling factor and the offset factor.
[0070] After obtaining the channel mean map and channel variance map of the current image, the initial value of the scaling factor in the meta-learning initialization parameters is used as the starting point for the scaling factor of the affine modulation coefficient pair, and the initial value of the offset factor in the meta-learning initialization parameters is used as the starting point for the offset factor of the affine modulation coefficient pair, and a single gradient descent iteration is performed.
[0071] The optimization direction of this single gradient descent iteration is to make the channel mean map approach the clear mean benchmark map pre-saved in the characteristic distribution benchmark, and the channel variance map approach the clear variance benchmark map pre-saved in the characteristic distribution benchmark.
[0072] In a single gradient descent iteration, the absolute difference between the channel mean map and the clear mean baseline map is used as the mean loss, and the absolute difference between the channel variance map and the clear variance baseline map is used as the variance loss. The mean loss and variance loss are added together and multiplied by a preset step size coefficient of 0.01 to obtain the adjustment amount of the scaling factor and the offset factor.
[0073] Subtract the scaling factor adjustment from the starting point of the scaling factor to obtain the updated scaling factor; subtract the offset factor adjustment from the starting point of the offset factor to obtain the updated offset factor.
[0074] The updated scaling factor and the updated offset factor are used as a pair of affine modulation coefficients adapted to the current optical state for subsequent feature distribution correction processes.
[0075] In the feature distribution correction module, affine modulation coefficient pairs are used to dynamically weight and correct the cumulative statistical moments in the feature distribution reference, mapping the feature distribution of the current degraded image to a reference distribution range aligned with the clear water baseline, thus obtaining the corrected feature distribution. Specifically, this includes: After obtaining an affine modulation coefficient pair adapted to the current optical state, the affine modulation coefficient pair is used for the correction of the characteristic distribution reference.
[0076] The clear mean baseline map, clear variance baseline map, clear skewness baseline vector, and clear kurtosis baseline vector are extracted from the feature distribution baseline. The clear skewness baseline vector and the clear kurtosis baseline vector are 64-dimensional vectors obtained by statistical analysis of intermediate feature maps of a large number of images collected under clear water conditions during the training phase. Each dimension corresponds to the standard skewness value and standard kurtosis value of a channel.
[0077] For the intermediate feature map corresponding to the current frame image of the calibration sample set, the intermediate feature map contains 64 channels, and each channel is a feature map with a two-dimensional spatial distribution.
[0078] The skewness and kurtosis statistics of the intermediate feature maps of each frame in the calibration sample set are extracted in the channel dimension. The specific process is as follows: For each channel of the intermediate feature map, the activation values of all spatial locations in the channel are sorted in ascending order of value. The minimum and maximum values of the activation values of the channel are determined. Starting from the minimum value and ending at the maximum value, the range of values is divided into 10 consecutive numerical intervals. The width of each interval is 1 / 10 of the difference between the maximum and minimum values.
[0079] The number of activation values falling within each numerical interval is counted, and a histogram distribution of activation values for that channel is generated. This histogram distribution contains the number of activation values corresponding to each of the 10 intervals.
[0080] After obtaining the histogram distribution, determine the median of the activation values for that channel, which is the activation value in the middle position after arranging the values from smallest to largest.
[0081] Using the median as the dividing point, the 10 intervals are divided into a left interval set and a right interval set. The intervals with the upper limit of the activation value less than or equal to the median are assigned to the left interval, and the intervals with the lower limit of the activation value greater than the median are assigned to the right interval.
[0082] Calculate the sum of all activation values in the left interval set and the sum of all activation values in the right interval set respectively. Subtract the cumulative number on the right from the cumulative number on the left, and the difference is used as the skewness statistic for the channel. This difference reflects the degree of asymmetry of the channel's activation value distribution relative to the median.
[0083] Locate the interval containing the median from the histogram distribution and mark that interval as the central peak interval.
[0084] The two leftmost intervals and the two rightmost intervals in the histogram distribution are collectively labeled as the two tail intervals.
[0085] Calculate the number of activation values in the central peak interval, and calculate the sum of the number of activation values in the two tail intervals. Divide the number of activation values in the central peak interval by the sum of the number of activation values in the two tail intervals. The resulting ratio is used as the kurtosis statistic of the channel. This ratio reflects the degree of concentration of the activation value distribution in the center relative to the tail in the channel.
[0086] The above process is performed on each of the 64 channels to obtain the skewness statistics and kurtosis statistics for each channel, which form a 64-dimensional skewness statistics vector and a kurtosis statistics vector, respectively.
[0087] The skewed statistical vector is compared with the clear skewed reference vector stored in the characteristic distribution reference. For each channel, the absolute difference between the skewed statistic of the channel and the standard skewness value of the corresponding channel in the clear skewed reference vector is calculated. The absolute difference is divided by the sum of the absolute value of the standard skewness value and the constant 0.01 to obtain the skewness deviation of the channel.
[0088] The kurtosis statistics vector is compared with the clear kurtosis reference vector stored in the characteristic distribution reference. For each channel, the absolute difference between the kurtosis statistics of that channel and the standard kurtosis value of the corresponding channel in the clear kurtosis reference vector is calculated. The absolute difference is divided by the sum of the absolute value of the standard kurtosis value and the constant 0.01 to obtain the kurtosis deviation of that channel.
[0089] After obtaining the skewness deviation and kurtosis deviation, the skewness correction intensity corresponding to each channel is determined based on the numerical range of the skewness deviation of each channel.
[0090] Specifically, the skewness deviation is divided into three numerical intervals: The first interval is greater than or equal to 0 and less than 0.3, the second interval is greater than or equal to 0.3 and less than 0.7, and the third interval is greater than or equal to 0.7.
[0091] When the skewness deviation is in the first interval, the skewness correction strength is 0.2; when the skewness deviation is in the second interval, the skewness correction strength is 0.5; when the skewness deviation is in the third interval, the skewness correction strength is 0.8.
[0092] Using the same interval division method and value selection rules, the peak correction intensity of each channel is determined based on the numerical interval of the peak deviation of each channel.
[0093] The scaling factor in the affine modulation coefficient pair is used to update the cumulative mean statistic according to the skewness correction intensity of each channel. Specifically, the current value of the cumulative mean statistic in the characteristic distribution benchmark is multiplied by the coefficient and minus the skewness correction intensity, and then the value of the corresponding channel in the clear mean benchmark is multiplied by the skewness correction intensity to obtain the updated cumulative mean statistic.
[0094] The offset factor in the affine modulation coefficient pair is used to update the cumulative variance statistic according to the kurtosis correction intensity of each channel. Specifically, the value of the cumulative variance statistic currently stored in the characteristic distribution benchmark is multiplied by the coefficient and minus the kurtosis correction intensity. Then, the value of the corresponding channel in the clear variance benchmark is multiplied by the kurtosis correction intensity to obtain the updated cumulative variance statistic.
[0095] The updated cumulative mean statistic and the updated cumulative variance statistic are used together as the corrected feature distribution, which is aligned with the clear water baseline.
[0096] In the health assessment and decision-making module, individual deviation is calculated based on the corrected feature distribution, and the individual deviation is compared with a preset management threshold. The output includes health monitoring results that specify the identity of the abnormal fish and the degree of deviation, serving as the basis for aquaculture management decisions. Specifically, this includes: After obtaining the corrected feature distribution, the feature distribution contains the corrected feature vector corresponding to each spatial location in the currently acquired frame image. The spatial coordinates of each spatial location correspond to the spatial coordinates of a local region in the visible light image of the fish school. The image content contained in this local region corresponds to part or all of the area of a farmed fish individual.
[0097] Based on the unique identifier assigned to each individual fish during multi-target tracking, the feature vectors corresponding to all spatial locations belonging to the same identifier in the corrected feature distribution are collected into a feature vector set. Each feature vector in this feature vector set corresponds to a spatial location, and the feature vector contains 64 corrected channel values.
[0098] After obtaining the feature vector set corresponding to each individual's identity, the local neighborhood radius of that individual is calculated. For a given individual's identity, the feature vector set contains m feature vectors, where m is the total number of spatial locations occupied by that individual in the image.
[0099] For the j-th feature vector in the set, calculate the distance between the feature vector and the other m-1 feature vectors in the set excluding itself. The distance is calculated by summing the squares of the differences between the two feature vectors on the same channel dimension across all 64 channels.
[0100] Add the distance values of the j-th feature vector to the remaining m-1 feature vectors, and divide by m-1 to obtain the average distance of the j-th feature vector.
[0101] The average distances of all m feature vectors in the set are summed and divided by m to obtain the local neighborhood radius of the individual. This local neighborhood radius represents the inherent dispersion between the spatial features on the surface of the individual.
[0102] After obtaining the local neighborhood radius of all individuals, sort the local neighborhood radii of all individuals in ascending order of value to form a radius sequence.
[0103] The value at the middle position in the radius sequence is taken as the population neighborhood benchmark value. Specifically, when the total number of all individuals is odd, the radius value at the middle position after sorting is taken as the population neighborhood benchmark value; when the total number of all individuals is even, the average of the two middle radius values after sorting is taken as the population neighborhood benchmark value. This population neighborhood benchmark value represents the current overall feature discrete benchmark level of the fish population.
[0104] The deviation of each individual is obtained by comparing its local neighborhood radius with the population neighborhood baseline.
[0105] The specific comparison method is as follows: calculate the absolute difference between the local neighborhood radius of the individual and the benchmark value of the group neighborhood, and take this absolute difference as the absolute deviation of the individual. The preset management threshold is set to 0.3 times the benchmark value of the group neighborhood. That is, when the absolute deviation of an individual is greater than the benchmark value of the group neighborhood multiplied by 0.3, it is determined that the deviation of the individual exceeds the preset management threshold.
[0106] Individuals whose deviation exceeds the preset management threshold are marked as abnormal individuals. At the same time, the identity of the abnormal individual and its corresponding absolute deviation are recorded. A health monitoring result containing the identity of the abnormal fish individual and the degree of deviation is generated. This health monitoring result is used as the basis for aquaculture management decisions to guide subsequent precise feeding adjustments and isolation of sick fish.
[0107] The working principle of this invention is as follows: Two polarization cameras with orthogonal polarization directions are deployed at fixed points in the aquaculture pond to simultaneously acquire visible light images of the fish population and extract the gray-scale mean and variance of the background area without fish coverage as anchor points for the current optical state. A sliding time window is constructed to sequentially weight and fuse historical anchor points to generate historical optical benchmarks with confidence intervals. When the gray-scale mean and variance of the current anchor point simultaneously exceed their respective tolerance intervals, an optical drift trigger signal is generated, and the current image is marked as a calibration sample set. The calibration sample set images are weighted with a radial distance weight matrix on the pixel values of each window of the encoding convolution to obtain intermediate feature maps. Their channel mean and variance are calculated, and a single gradient descent iteration is performed starting from preset meta-learning initialization parameters to generate a feature map adapted to the current optical state. Affine modulation coefficient pairs are used to extract the skewness and kurtosis statistics of each channel in the intermediate feature map. These statistics are then compared with the clear skewness and kurtosis baselines to obtain the skewness and kurtosis deviation, respectively. Based on this, the correction intensity of each channel is determined. The scaling factor in the affine modulation coefficient pairs is used to update the cumulative mean statistics according to the skewness correction intensity, and the offset factor is used to update the cumulative variance statistics according to the kurtosis correction intensity. This yields a correction feature distribution aligned with the clear water baseline. Based on individual identification, the correction feature distribution is aggregated into a feature vector set for each fish. The local neighborhood radius of each individual is calculated and compared with the group neighborhood baseline value to obtain the deviation. Individuals with deviations exceeding a preset management threshold are marked as abnormal, and their identification and deviation degree are output as a basis for aquaculture management decisions.
[0108] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.
Claims
1. An AI visual health monitoring device for farmed fish, characterized in that, include: The optical state sensing module acquires visible light images of fish in aquaculture water and simultaneously extracts pixel statistics of background water areas without fish coverage in the visible light images of fish, which serve as the current optical state anchor point. The optical drift detection module compares the current optical state anchor point with the historical optical benchmark in the previous stable period. When the difference between the two exceeds a preset threshold, an optical drift trigger signal is generated, and the visible light image of the fish swarm at the current acquisition time is used as the calibration sample set. The affine parameter generation module, in response to the optical drift trigger signal, takes the pre-set meta-learning initialization parameters at the beginning of the monitoring process as the starting point, performs a single inner loop gradient update using the calibration sample set, and generates affine modulation coefficient pairs adapted to the current optical state. The feature distribution correction module uses affine modulation coefficient pairs to dynamically weight and correct the cumulative statistical moments in the feature distribution reference, mapping the feature distribution of the current degraded image to a reference distribution range aligned with the clear water baseline, thus obtaining the corrected feature distribution. The health assessment and decision-making module calculates the individual deviation degree based on the corrected feature distribution, compares the individual deviation degree with the preset management threshold, and outputs health monitoring results including the identity of the abnormal fish and the degree of deviation, which serve as the basis for aquaculture management decisions.
2. The AI visual health monitoring device for farmed fish according to claim 1, characterized in that, The process of obtaining the current optical state anchor point is as follows: Simultaneously trigger the acquisition of two polarization images with orthogonal polarization directions to obtain the first polarization image and the second polarization image; The first polarization image and the second polarization image are differentially processed to eliminate water surface reflection flares, resulting in a flare-free image. Perform saliency detection based on pixel-level texture gradient and edge intensity on the flare-removed image to mark the area covered by the fish body; The marked fish-covered areas are masked out of the flare-free image, while the background water areas not covered by the fish are retained. The mean and variance of the grayscale of all pixels in the background water area are calculated and used as the anchor point of the current optical state.
3. The AI visual health monitoring device for farmed fish according to claim 1, characterized in that, The process of obtaining the calibration sample set is as follows: Construct a sliding time window with the current time as the endpoint, and extract the optical state anchor point at each acquisition time within the sliding time window; Sequential weighted fusion is performed on the mean and variance of gray levels of all anchor points within the sliding time window to generate a historical optical benchmark with confidence intervals. Calculate the first deviation between the mean gray value of the current optical state anchor point and the mean gray value of the historical optical reference, and at the same time calculate the second deviation between the gray variance of the current optical state anchor point and the gray variance of the historical optical reference. When the first deviation and the second deviation both exceed their respective preset tolerance ranges, it is determined that the difference between the two exceeds the preset threshold, an optical drift trigger signal is generated, and the visible light image of the fish swarm at the current acquisition time is marked as the calibration sample set.
4. The AI visual health monitoring device for farmed fish according to claim 1, characterized in that, The generation process of the affine modulation coefficient pairs is as follows: Each frame of the calibration sample set is sequentially encoded and convolved to obtain the intermediate feature map corresponding to each frame, and the mean and variance of all intermediate feature maps in the channel dimension are calculated. Using the meta-learning initialization parameters as the initial scaling factor and initial offset factor for the affine modulation coefficient pair, and taking the optimization direction of the mean approaching the clear mean and variance of the feature distribution reference, a single gradient descent iteration is performed to adjust the initial scaling factor and initial offset factor, thereby generating an affine modulation coefficient pair adapted to the current optical state.
5. The AI visual health monitoring device for farmed fish according to claim 4, characterized in that, The process of obtaining the intermediate feature map is as follows: Acquire visible light images of fish swarms for each frame of the calibration sample set, and generate a two-dimensional radial distance weight matrix based on the distance of each pixel position in the image to the center point of the image. The pixel values within each convolution window in the encoding convolution operation are weighted using a two-dimensional radial distance weight matrix to obtain the spatial weighted response value corresponding to each convolution window. Arrange the spatially weighted response values of all convolutional windows according to the original image space to form the intermediate feature map corresponding to the corresponding frame image.
6. The AI visual health monitoring device for farmed fish according to claim 1, characterized in that, The process of obtaining the corrected feature distribution specifically includes: Extract the skewness and kurtosis statistics of the intermediate feature maps of each frame in the calibration sample set along the channel dimension; The skewness statistic and kurtosis statistic are compared with the clear skewness benchmark and clear kurtosis benchmark stored in the characteristic distribution benchmark, respectively, to obtain the skewness deviation and kurtosis deviation. The skewness correction strength and kurtosis correction strength are determined based on the numerical ranges of the skewness deviation and kurtosis deviation, respectively. The scaling factor in the affine modulation coefficient pair is used to update the cumulative mean statistic according to the skewness correction strength, and the offset factor in the affine modulation coefficient pair is used to update the cumulative variance statistic according to the kurtosis correction strength, thus obtaining the corrected characteristic distribution.
7. The AI visual health monitoring device for farmed fish according to claim 6, characterized in that, The extraction of skewness and kurtosis statistics of intermediate feature maps in each frame of the calibration sample set along the channel dimension specifically includes: The activation values of the intermediate feature map in each channel dimension are divided into multiple equal-width intervals according to their numerical values. The number of activation values in each interval is counted, and a histogram distribution of activation values for each channel is generated. Based on the cumulative difference in quantity between the left and right sides of each interval in the histogram distribution with the median of the channel as the boundary, a skewness statistic representing the degree of asymmetry of the distribution is obtained. Based on the ratio of the number of activation values in the central peak interval to the number of activation values in the two tail intervals of the histogram distribution, a kurtosis statistic representing the degree of concentration of the tails of the distribution relative to the center is obtained.
8. The AI visual health monitoring device for farmed fish according to claim 1, characterized in that, The output includes health monitoring results showing the individual identity of the abnormal fish and the degree of deviation, specifically including: Extract the set of feature vectors corresponding to each individual's identity from the corrected feature distribution; Calculate the average distance between each feature vector in the feature vector set of each individual and the remaining feature vectors, and use it as the local neighborhood radius of the individual; The local neighborhood radius of all individuals is statistically analyzed to obtain the group neighborhood baseline value. The local neighborhood radius of each individual is compared with the group neighborhood baseline value to obtain the deviation degree of the individual. Individuals whose deviation degree exceeds the preset management threshold are marked as abnormal, and the identity of the abnormal fish and the degree of deviation are output.