A live fish damage detection method based on AI and multi-vision underwater imaging technology
Through the improved ResNet-50 convolutional neural network and multi-view underwater imaging technology, the problems of difficult feature capture and overfitting in underwater live fish damage detection are solved, high-precision damage detection of underwater blurred images is achieved, and the generalization ability and robustness of the model are enhanced.
Patent Information
- Application Number
- CN202510381873.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-03-28
AI Technical Summary
Existing underwater live fish damage detection technology has difficulty in effectively capturing the characteristics of damaged areas when faced with factors such as blur, low contrast, and uneven lighting in underwater imaging. Traditional methods are also prone to overfitting in underwater imaging, resulting in insufficient recognition accuracy and generalization ability.
The system uses AI and multi-vision underwater imaging technology to build an improved ResNet-50 convolutional neural network, combining dilated convolution, Inception module, global context pooling, combined regularization, dynamic learning rate and step size adjustment, category weights, multi-stage optimization and adaptive sample reweighting strategy to dynamically adjust the convolution kernel weights and feature importance, reduce redundant features and improve detection accuracy.
It effectively captures large-scale damage features in underwater blurred images, enhances adaptability to damage areas of different scales, reduces overfitting, improves model generalization ability and recognition accuracy, and solves the category imbalance problem in underwater imaging.
Smart Images

Figure CN120259865B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence and visual detection technology, and in particular to a live fish damage detection method based on AI and multi-view underwater imaging technology. Background Art
[0002] Global aquaculture is expanding rapidly. In 2024, damage rates during live fish transportation and temporary storage reached 15%-30%, resulting in significant economic losses. Therefore, underwater damage detection of live fish is essential to prevent further losses. Underwater images, influenced by the water environment, lighting conditions, and surface fluctuations, often exhibit blur, low contrast, and uneven illumination. These factors complicate image processing and damage detection, particularly in live fish damage detection, where dynamic changes in the fish body and subtle differences in damaged areas increase detection complexity.
[0003] Existing technologies generally include traditional optical detection technology relying on monocular vision and near-infrared imaging, acoustic and mechanical sensor technology, and artificial intelligence technology based on convolutional neural networks. Traditional convolutional neural networks have poor adaptability to interference factors such as lighting changes, noise, and blur in underwater imaging, resulting in an inability to effectively capture the characteristics of damaged areas, affecting recognition accuracy. Traditional methods tend to favor the majority class when faced with minority class samples, resulting in poor recognition of damaged areas and affecting detection accuracy. Traditional training methods lack effective regularization strategies and are prone to overfitting, making it difficult to improve generalization capabilities, especially when the amount of data is insufficient. Existing technologies usually generate a large number of redundant features in underwater imaging, causing the network to easily overfit and unable to effectively extract discriminative features.
[0004] Therefore, the present invention proposes a live fish damage detection method based on AI and multi-vision underwater imaging technology to solve the above problems. Summary of the Invention
[0005] In response to the shortcomings of the existing technology, the present invention develops a live fish damage detection method based on AI and multi-view underwater imaging technology. Through artificial intelligence and multi-view underwater imaging technology, the present invention can accurately identify and extract meaningful local and global features, while addressing the problems of redundant features and inconsistent feature scales in high-dimensional data and avoiding overfitting.
[0006] The technical solution to the technical problem solved by the present invention is a live fish damage detection method based on AI and multi-vision underwater imaging technology, comprising the following steps:
[0007] S1. Image acquisition: Set up a multi-eye visual imaging device to capture clear and complete fish images, and adjust the shooting angle and focal length of the multi-eye visual imaging device in real time according to the size and movement status of the fish;
[0008] S2. Image preprocessing: performing image denoising, grayscale conversion, contrast enhancement, and normalization operations on the collected image to obtain a preprocessed fish image;
[0009] S3. Construct a live fish injury grading detection model for live fish injury detection: Construct a convolutional neural network based on ResNet-50 as the main framework as a live fish injury grading detection model, improve the convolutional neural network based on ResNet-50 as the main framework, adjust the shallow convolution of ResNet-50, replace the first three layers of convolution with expanded convolution, and reset the spacing between the convolution kernel elements, insert a lightweight deep learning convolutional neural network architecture Inception after the third stage Stage3 of ResNet-50, replace the fully connected layer of the ResNet-50 output layer with global context pooling, and then input the preprocessed fish body image into the live fish injury grading detection model for training.
[0010] In a specific implementation, the improvements to the convolutional neural network based on ResNet-50 are as follows:
[0011] A heuristic method is used to initialize the convolution kernel according to the characteristic distribution of the fish image, and then the convolution kernel weight W is calculated;
[0012] Calculate the combined regularization term , embedding the combined regularization term into the feature extraction process of each layer of the convolutional neural network;
[0013] Dynamically adjust the learning rate and step size according to the error changes of the fish image data;
[0014] Dynamically adjust the importance of features extracted by the convolutional layer based on the multi-view data of the fish image;
[0015] Use class weights in the loss function;
[0016] Focus on feature extraction and classification optimization of different categories through multi-stage optimization;
[0017] Reduce redundancy through weight sharing mechanism;
[0018] Adaptive sample reweighting strategy and multi-stage verification mechanism are adopted.
[0019] In a specific embodiment, during the dynamic convolution kernel weight update process, the learning rate and step size are dynamically adjusted according to the error change of the fish image data. The update formula of the convolution kernel weight is as follows:
[0020] ,
[0021] in, Indicates the The convolution kernel weight of the iteration, Indicates the The convolution kernel weight of the iteration, Indicates the The gradient of the loss function of the iteration with respect to the convolution kernel weight, Indicates the The learning rate of the iteration, Indicates the The step size factor for the iteration.
[0022] In a specific embodiment, the learning rate and step size in the convolution kernel weight update process are automatically adjusted according to the error change;
[0023] For the learning rate , calculated by the initial learning rate, error dynamic adjustment coefficient and error metric;
[0024] For step length , calculated by the initial step factor, the adjustment coefficient of the step factor, and the error metric;
[0025] Among them, the calculation of the error dynamic adjustment coefficient adopts the cosine annealing strategy; the calculation of the error metric adopts a composite error function, including cross entropy loss and training error; the adjustment coefficient of the step size factor is calculated by dynamically adjusting the step size amplitude in combination with the current detection accuracy.
[0026] In a specific implementation, during the adaptive fusion process, the importance of features extracted by the convolutional layer is dynamically adjusted according to the multi-view visual data of the fish image, the features extracted by the convolutional layer of each layer of the convolutional neural network are weighted and fused, and the weighting coefficient of each layer feature is dynamically calculated by combining local and global information, wherein the local information is further represented by the correlation between the feature and the input sample, and the correlation is calculated by the Pearson correlation coefficient.
[0027] In a specific implementation, class weights are used in the loss function to balance the minority class and the majority class. The calculation formula is as follows:
[0028] ,
[0029] in, represents the weighted loss, represents the total number of input samples, Indicates the The dynamic weighting coefficient of the category corresponding to the sample, Indicates the Iteration No. The weight of the samples, represents the standard loss function, express The predicted label of Indicates the input samples, express The true label.
[0030] In a specific embodiment, a dynamic weighting factor based on data distribution is used to adjust the weight coefficient of each category, specifically according to the label The number of samples and the total number of input samples determine the distribution of the data. The density of the corresponding dynamic weighting coefficient is calculated .
[0031] In a specific implementation, in different training stages, multi-stage optimization is used to focus on feature extraction and classification optimization of different categories. The calculation formula is as follows:
[0032] ,
[0033] in, represents the total loss after integration, represents the total number of training stages, Indicates the The weighting coefficients of the training phase, Indicates the The loss value of the training phase.
[0034] In a specific implementation, the weight coefficients of each stage are modified according to the strength of the correlation between the stage loss and the feature. , by calculating the Pearson correlation coefficient, the correlation between the output features of each stage of the convolutional neural network and the input samples is determined, and the weighting of the input samples of each stage on the output features of the convolutional neural network is calculated, thereby determining the association between the loss and features of each stage.
[0035] In a specific embodiment, during the iteration process of the live fish injury grading detection model, an adaptive sample reweighting strategy and a multi-stage verification mechanism are adopted to dynamically screen high-value training samples and adjust the training direction. The weights of the samples are dynamically adjusted according to their prediction confidence and feature consistency, reducing the contribution of noisy and blurred samples and strengthening the training weights of clear samples in the damaged area. The calculation formula is as follows:
[0036] ,
[0037] in, Indicates the Iteration No. The weight of the samples, represents the exponential function, represents the smoothing coefficient, Represents the measure of the convolutional neural network The overlap function between the sample prediction and the real damage area is: represents the entropy calculation function, Indicates calculation of The degree of confusion of the sample feature map is used to evaluate the sample clarity. Indicates the maximum entropy value among all samples;
[0038] The training process consists of three stages: feature convergence, regularization and reinforcement, and fine-tuning.
[0039] Feature convergence period: Prioritize the optimization of the backbone network, which consists of ResNet-50 and Inception modules. Use a high initial learning rate to quickly capture the basic features of the damaged area.
[0040] Regularization reinforcement phase: Overfitting is suppressed by randomly discarding 20% of low-weight feature channels, while adversarial sample generation is used to enhance robustness;
[0041] Fine-tuning phase: Freeze shallow network parameters and fine-tune only the high-level modules and classification head after Stage 3. Use a low initial learning rate to force the model to map multi-view image features from different perspectives into a unified semantic space, thus constraining the feature consistency of similar multi-view samples.
[0042] The effects provided in the summary of the invention are only the effects of the embodiments, rather than all the effects of the invention. The above technical solution has the following advantages or beneficial effects:
[0043] The present invention makes adjustments to the convolutional neural network structure and adopts dilated convolution to expand the receptive field, which can effectively capture large-scale damage features in underwater blurred images. By adding the Inception module to ResNet-50, the network can process damage areas of different scales, enhance the joint perception of low-frequency (contour) and high-frequency (texture) features, and improve the adaptability of multi-scale damage areas. In addition, by replacing the traditional fully connected layer with global context pooling, redundant parameters can be reduced, thereby optimizing the network structure and improving the generalization ability of the model. In terms of heuristic optimization of convolution kernel initialization, the present invention optimizes and initializes the convolution kernel according to the characteristics of underwater images (such as illumination changes, blur and noise), which can improve the responsiveness of the convolution kernel to underwater images and overcome the limitations of traditional methods.
[0044] The present invention adopts a combined regularization strategy, combines L1 regularization and L2 regularization, and embeds a combined regularization term in the feature extraction process of each layer to suppress redundant features and enhance discriminative features, thereby effectively reducing the overfitting problem; it also dynamically adjusts the regularization coefficient of each layer during the training process, so that the model can adapt to different noise levels and feature importance, which can further optimize the feature extraction effect.
[0045] The present invention also dynamically adjusts the learning rate and step size according to the error, ensuring that the network converges quickly in the early stages of training and fine-tuning the weights in the later stages to avoid overfitting and improve classification accuracy. In order to deal with the problem of class imbalance, the present invention adopts class weighting in the loss function to strengthen the focus on minority class samples (such as damaged areas), thereby solving the problem of class imbalance in underwater images. The present invention also involves a multi-stage optimization strategy, which is divided into a feature convergence period, a regularization and reinforcement period, and a fine-tuning period. By gradually optimizing the model at each stage, the detection capability of damaged areas can be improved and the robustness can be enhanced.
[0046] In summary, the method proposed in the present invention is different from conventional machine vision tasks. When using multi-view underwater imaging technology to detect damage to live fish, the challenge lies mainly in dealing with interference factors such as blur, noise, and multiple illumination in underwater images, as well as the dynamic changes of the fish body. This requires the detection model to be able to accurately identify and extract meaningful local and global features in the multidimensional feature space, while also dealing with the problem of redundant features and inconsistent feature scales in high-dimensional data and avoiding overfitting. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0048] Figure 1 Schematic diagram of the method of the present invention.
[0049] Figure 2 Live fish images collected by a multi-eye visual imaging device.
[0050] Figure 3 This is the effect diagram of feature extraction after adding the Inception module.
[0051] Figure 4 Comparison examples of feature maps with and without combined regularization constraints.
[0052] Figure 5 are feature maps at different training stages.
[0053] Figure 6 Comparison of recognition accuracy of different network structures.
[0054] Figure 7 Comparison of the impact of different hyperparameter combinations on model performance. DETAILED DESCRIPTION
[0055] To clearly illustrate the technical features of this solution, the present invention is described in detail below through specific embodiments and in conjunction with the accompanying drawings. The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. To simplify the disclosure of the present invention, the components and configurations of specific examples are described below.
[0056] Example 1
[0057] like Figure 1-Figure 5 As shown in FIG, a live fish damage detection method based on AI and multi-vision underwater imaging technology includes the following steps:
[0058] S1. Image acquisition: Set up a multi-eye visual imaging device to capture clear and complete fish images, and adjust the shooting angle and focal length of the multi-eye visual imaging device in real time according to the size and movement status of the fish;
[0059] Among them, the live fish images taken by the multi-eye visual imaging device are as follows: Figure 2 As shown;
[0060] S2. Image preprocessing: performing image denoising, grayscale conversion, contrast enhancement, and normalization operations on the collected image to obtain a preprocessed fish image;
[0061] S3. Construct a live fish injury grading detection model for live fish injury detection: Construct a convolutional neural network based on ResNet-50 as the main framework as the live fish injury grading detection model, improve the convolutional neural network based on ResNet-50 as the main framework, adjust the shallow convolution of ResNet-50, replace the first three layers of convolution with expanded convolution, and reset the spacing between convolution kernel elements. Insert the lightweight deep learning convolutional neural network architecture Inception after the third stage of ResNet-50, replace the fully connected layer of the ResNet-50 output layer with global context pooling, and then input the preprocessed fish body images into the live fish injury grading detection model for training;
[0062] Among them, the feature extraction effect after inserting the lightweight deep learning convolutional neural network architecture Inception is as follows Figure 3 As shown in the figure, the addition of the Inception module can significantly enhance the significant difference between the damaged area and other areas.
[0063] In a specific implementation, the improvements to the convolutional neural network based on ResNet-50 are as follows:
[0064] A heuristic method is used to initialize the convolution kernel according to the feature distribution of fish images;
[0065] Embed the combined regularization term into the feature extraction process of each layer of the convolutional neural network;
[0066] Dynamically adjust the learning rate and step size according to the error changes of the fish image data;
[0067] Dynamically adjust the importance of features extracted by the convolutional layer based on the multi-view data of the fish image;
[0068] Use class weights in the loss function;
[0069] Focus on feature extraction and classification optimization of different categories through multi-stage optimization;
[0070] Reduce redundancy through weight sharing mechanism;
[0071] Adaptive sample reweighting strategy and multi-stage verification mechanism are adopted.
[0072] In a specific implementation, the convolutional neural network structure is initialized. In the multi-view underwater imaging task, the image data distribution under each camera's perspective is quite different. Therefore, the convolution kernel initialization of the convolutional neural network needs to be optimized for these differences. A heuristic method is used to initialize the convolution kernel of the convolutional neural network according to the characteristic distribution of the fish image, so that the convolution kernel can better adapt to the feature differences in the image caused by lighting changes, fluctuations, and object motion. The calculation formula is as follows:
[0073] ,
[0074] in, Represents the convolution kernel weight, representing the learning parameters of each convolution filter, N represents the dimension of the input feature map, representing the number of channels of each image in the convolution operation, means the mean is 0 and the covariance is The normal distribution of Represents the covariance matrix of the input feature map, which is used to initialize the feature distribution of different underwater images;
[0075] Heuristic methods refer to the initialization methods used for convolution kernel weights to adapt to the characteristic distribution of underwater images. Traditional convolutional neural networks are usually initialized using Gaussian distribution or uniform distribution. However, due to the particularity of underwater imaging (such as illumination changes and water surface fluctuations), heuristic methods can better adapt to the characteristic distribution of images. Heuristic methods adjust weight initialization based on the characteristics of underwater images (such as blur and noise) (influencing the convolution kernel weights through the covariance matrix of image features) to optimize the responsiveness of the convolution kernel in underwater images.
[0076] In a specific embodiment, underwater imaging technology may cause the high-dimensional feature space of the image to contain a large amount of redundant information. Traditional convolutional neural networks are unable to effectively deal with these redundant features and are prone to overfitting. A combined regularization term is embedded in the feature extraction process of each layer of the convolutional neural network to solve the multicollinearity and high-dimensional redundancy problems in underwater images, suppress redundant features and enhance discriminative features. The combined regularization term is obtained by combining L1 regularization and L2 regularization.
[0077] The calculation formula of the convolutional layer in the convolutional neural network is as follows:
[0078] ,
[0079] in, represents the image features output by the convolutional layer, represents the image features output by the previous layer, and b represents the bias term;
[0080] The combined regularization term is embedded into the process of extracting image features in each convolutional layer, and the regularization strength of each layer's feature extraction process is dynamically adjusted. The calculation formula of the combined regularization term is as follows:
[0081] ,
[0082] in, represents the combined regularization term, characterizing the constraints on the weights of each convolutional layer, represents the number of layers of the convolutional neural network, Indicates the The L1 regularization coefficient of the layer convolution is used to control the sparsity of the features. Indicates the The L2 regularization coefficient of the layer convolution is used to control the smoothness of the feature. Represents L1 regularization, which penalizes the absolute value of the weight and forces some weights to become zero, thereby achieving feature selection. Represents L2 regularization, which penalizes the sum of squares of weights to make the weight value smaller, increase the smoothness of the model, and avoid overfitting. Indicates the The convolution kernel weight of each layer represents the learning ability of the convolution features of each layer;
[0083] By adopting an adaptive regularization coefficient calculation method, the convolutional neural network dynamically selects the most discriminative features according to the synergistic effect of different image features during training, suppresses the interference of redundant information and noise on the identification of damaged areas, and dynamically calculates the regularization coefficient according to the image characteristics and noise level. The calculation formula is as follows:
[0084] ,
[0085] ,
[0086] in, Indicates the The covariance matrix of the layer feature image, represents the noise level, Represents the importance of features, which is measured by calculating the information gain of the features on the model output.
[0087] Depend on Figure 4 It can be seen that the L1 regularization and L2 regularization constraints contained in the combined regularization term can effectively eliminate noise features and effectively highlight the damaged area, which is conducive to the accurate identification of live fish damage. It can be seen from the traditional binarized feature map without the combined regularization term constraint that not only does it fail to effectively reduce noise, but also introduces new noise areas.
[0088] In a specific embodiment, during the dynamic convolution kernel weight update process, the learning rate and step size are dynamically adjusted according to the error changes of the fish image data, so that the convolutional neural network converges quickly in the early stage of training, and the weight parameters are fine-tuned in the later stage, thereby avoiding overfitting and improving classification accuracy in the detection task of damaged areas of live fish. The update formula of the convolution kernel weight is as follows:
[0089] ,
[0090] in, Indicates the The convolution kernel weight of the iteration, Indicates the The convolution kernel weight of the iteration, Indicates the The gradient of the loss function of the iteration with respect to the convolution kernel weight, Indicates the The learning rate of the iteration, Indicates the The step size factor of the iteration;
[0091] Automatically adjust the learning rate and step size according to the error change. The calculation formula is as follows:
[0092] ,
[0093] ,
[0094] in, represents the initial learning rate, represents the initial step size factor, Indicates the The error dynamic adjustment coefficient of the iteration, Indicates the The error metric for the iterations, Indicates the The adjustment coefficient of the step size factor of the iteration;
[0095] The error dynamic adjustment coefficient uses the cosine annealing strategy to prevent late oscillation. The calculation formula is as follows:
[0096] ,
[0097] in, Indicates the total number of iterations;
[0098] The error metric uses a composite error function, and the calculation formula is as follows:
[0099] ,
[0100] in, represents the cross entropy loss, Indicates the The training error of iterations;
[0101] The adjustment coefficient of the step size factor is combined with the current detection accuracy to dynamically adjust the step size. The calculation formula is as follows:
[0102] ,
[0103] in, Indicates the The training accuracy at this iteration.
[0104] In a specific embodiment, during the adaptive fusion process, the importance of the features extracted by the convolutional layer is dynamically adjusted according to the multi-view data of the fish image. The damaged area of the fish body may contain subtle feature changes, so it is necessary to accurately weight the feature extraction effect of each layer to maximize the recognition ability of the damaged area. The calculation formula of the weighted fusion process is as follows:
[0105] ,
[0106] in, The fused feature map represents the fused feature map, which represents the comprehensive representation of the features extracted by the multi-layer convolutional network. Represents the convolutional neural network The weighting coefficient of the layer feature represents the contribution of the layer feature to damage detection. Represents the convolutional neural network The features extracted by the convolutional layers represent the encoding of local or global features of the image by each layer;
[0107] In order to refine the weighting process of each layer of features, the weight coefficient of each layer is dynamically calculated by combining local and global information. The calculation formula is as follows:
[0108] ,
[0109] in, Represents the number of input live fish images, that is, the number of samples, Indicates the samples, Indicates the input The samples are in the convolutional neural network The L2 norm of the features extracted by the convolutional layer, Represents the convolutional neural network Layer characteristics and The correlation of samples;
[0110] The correlation is calculated by calculating the Pearson correlation coefficient, which is calculated as follows:
[0111] ,
[0112] in, Representation characteristics The mean of Represents a sample The mean of .
[0113] In a specific implementation, class weights are used in the loss function to balance the minority class and the majority class. The calculation formula is as follows:
[0114] ,
[0115] in, represents the weighted loss, Indicates the The dynamic weighting coefficient of the category corresponding to the sample, Indicates the Iteration No. The weight of the samples, represents the standard loss function, express The predicted label of express The true label of
[0116] In order to accurately adjust the weights of each category, a dynamic weighting factor based on data distribution is used to adjust the weighting coefficients of each category. This not only improves the accuracy and robustness of live fish damage detection, but also effectively solves interference problems unique to underwater imaging, such as noise and blur in the image. The calculation formula is as follows:
[0117] ,
[0118] in, Represents a collection of various class labels, Indicates that the label is The number of samples, express density.
[0119] In a specific embodiment, multi-stage optimization is used to focus on feature extraction and classification optimization of different categories in different training stages to maximize the performance of the model. The present invention adopts a multi-stage ensemble learning method. By focusing on different subset features or specific category performance in multiple training stages, the results learned in each stage are integrated to achieve higher accuracy and stability under complex data distribution. The calculation formula is as follows:
[0120] ,
[0121] in, represents the total loss after integration, represents the total number of training stages, Indicates the The weighting coefficients of the training phase, Indicates the The loss value of the training stage;
[0122] In order to take into account the impact of each stage on different sample characteristics, the weighting coefficient is modified according to the strength of the correlation between the stage loss and the characteristics. The calculation formula is as follows:
[0123] ,
[0124] in, Indicates the Stage 1 The weighting of the convolutional neural network output features by samples, For convolutional neural network The characteristics of the stage output are the same as those of the The correlation of samples.
[0125] In a specific embodiment, different damaged areas of the fish body in the image are expressed differently in the feature space using multiple convolutional layers. A weight sharing mechanism is introduced to reduce redundancy. A shared matrix is established between multiple layers of convolution kernels to reduce repeated parameters and strengthen the focus on common features. The calculation formula is as follows:
[0126] ,
[0127] in, represents the shared convolution kernel weight, represents the number of convolution kernels, Indicates the Layer convolution kernel weights, is the number of layers of the convolutional neural network.
[0128] In a specific embodiment, during the iteration process of the live fish injury grading detection model, an adaptive sample reweighting strategy and a multi-stage verification mechanism are adopted to dynamically screen high-value training samples and adjust the training direction. The weights of the samples are dynamically adjusted according to their prediction confidence and feature consistency, reducing the contribution of noisy and blurred samples and strengthening the training weights of clear samples in the damaged area. The calculation formula is as follows:
[0129] ,
[0130] in, Indicates the Iteration No. The weight of the samples, represents the exponential function, represents the smoothing coefficient, Represents the measure of the convolutional neural network The overlap function between the sample prediction and the real damage area is: represents the entropy calculation function, Indicates calculation of The degree of confusion of the sample feature map is used to evaluate the sample clarity. Indicates the maximum entropy value among all samples;
[0131] The training process consists of three stages: feature convergence, regularization and reinforcement, and fine-tuning.
[0132] Feature convergence period: Prioritize the optimization of the backbone network, which consists of ResNet-50 and Inception modules. Use a high initial learning rate to quickly capture the basic features of the damaged area.
[0133] Regularization reinforcement phase: Overfitting is suppressed by randomly discarding 20% of low-weight feature channels, while adversarial sample generation is used to enhance robustness;
[0134] Fine-tuning phase: Freeze shallow network parameters and fine-tune only the high-level modules and classification heads after Stage 3. Use a low initial learning rate to force the model to map multi-view image features from different perspectives into a unified semantic space, ensuring feature consistency among similar multi-view samples.
[0135] During training, if you If the performance improvement of an iteration is lower than the preset threshold, the iteration is stopped, which means that the convolutional neural network training is completed.
[0136] like Figure 5 As shown in the figure, the features extracted in the three stages are visualized. It can be seen from the figure that as the number of training iterations increases, the extracted features become clearer and the damaged parts of the living fish become more prominent.
[0137] Example 2
[0138] The recognition accuracy of the baseline residual network ResNet-50 and the improved network ResNet-Inception with a multi-branch structure are compared with the method in this invention. The comparison results are shown in Figure 2. Figure 6 As shown in the figure, ResNet-50 has a weak ability to recognize damage types with subtle textures, while ResNet-Inception has improved its ability to capture multi-scale features. The method in the present invention achieves optimal detection results for all damage types, verifying the synergistic effect of the multi-branch structure and dynamic feature weighted fusion in this technology. By parallelizing convolution operations of different scales, the model's joint perception of damage contours and textures is enhanced. At the same time, the contribution of each layer is dynamically adjusted based on feature correlation, so that the model can capture large-scale structural damage such as fish fin cracks, and identify local subtle lesions such as surface ulcers, ultimately achieving accurate positioning of multi-morphological damage.
[0139] Example 3
[0140] like Figure 7 As shown in the figure, the parameter sensitivity of the traditional method and the parameter robustness of the method in the present invention are analyzed. The performance surface of the traditional method shows a steep island characteristic, and only achieves better performance in a specific parameter range, indicating that it is highly dependent on fine parameter tuning. The performance surface of the technology of the present invention shows a vast plateau area, and maintains stable performance within a large range of changes in the regularization coefficient and the learning rate, indicating the technical advantages of the adaptive regularization mechanism and dynamic learning rate adjustment. By establishing a self-regulating relationship between parameters, the model can automatically adapt to the data distribution characteristics of different underwater imaging conditions, reducing the dependence on manual parameter tuning and enhancing the engineering feasibility in practical applications.
[0141] Although the above describes the specific implementation methods of the invention in conjunction with the accompanying drawings, it does not limit the scope of protection of the invention. Based on the technical solution of the present invention, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present invention.
Claims
1. A live fish damage detection method based on AI and multi-vision underwater imaging technology, characterized by: The following steps are involved: S1. Image acquisition: Set up a multi-eye visual imaging device to capture clear and complete fish images, and adjust the shooting angle and focal length of the multi-eye visual imaging device in real time according to the size and movement status of the fish; S2. Image preprocessing: performing image denoising, grayscale conversion, contrast enhancement, and normalization operations on the collected image to obtain a preprocessed fish image; S3. Construct a live fish injury grading detection model for live fish injury detection: Construct a convolutional neural network based on ResNet-50 as the main framework as the live fish injury grading detection model, improve the convolutional neural network based on ResNet-50 as the main framework, adjust the shallow convolution of ResNet-50, replace the first three layers of convolution with expanded convolution, and reset the spacing between convolution kernel elements. Insert the lightweight deep learning convolutional neural network architecture Inception after the third stage of ResNet-50, replace the fully connected layer of the ResNet-50 output layer with global context pooling, and then input the preprocessed fish body images into the live fish injury grading detection model for training; The improvements to the convolutional neural network based on ResNet-50 are as follows: A heuristic method is used to initialize the convolution kernel according to the characteristic distribution of the fish image, and then the convolution kernel weight W is calculated. The calculation formula is as follows: , in, Represents the convolution kernel weight, N represents the dimension of the input feature map, means the mean is 0 and the covariance is The normal distribution of Represents the covariance matrix of the input feature map; Calculate the combined regularization term , the combined regularization term is embedded into the feature extraction process of each layer of the convolutional neural network. The calculation formula of the combined regularization term is as follows: , in, represents the combined regularization term, Indicates the L1 regularization coefficient of layer convolution, Indicates the L2 regularization coefficient of layer convolution, represents L1 regularization, represents L2 regularization, Indicates the The convolution kernel weights of the layer; Dynamically adjust the learning rate and step size according to the error changes of the fish image data; Dynamically adjust the importance of features extracted by the convolutional layer based on the multi-view data of the fish image; Use class weights in the loss function; Focus on feature extraction and classification optimization of different categories through multi-stage optimization; Reduce redundancy through weight sharing mechanism; Adaptive sample reweighting strategy and multi-stage verification mechanism are adopted.
2. The method for detecting live fish damage based on AI and multi-view underwater imaging technology according to claim 1 is characterized by: During the dynamic convolution kernel weight update process, the learning rate and step size are dynamically adjusted according to the error changes of the fish image data. The update formula of the convolution kernel weight is as follows: , in, Indicates the The convolution kernel weight of the iteration, Indicates the The convolution kernel weight of the iteration, Indicates the The gradient of the loss function of the iteration with respect to the convolution kernel weight, Indicates the The learning rate of the iteration, Indicates the The step size factor for the iteration.
3. The live fish damage detection method based on AI and multi-view underwater imaging technology according to claim 2 is characterized by: Automatically adjust the learning rate and step size during the convolution kernel weight update process according to the error change; For the learning rate , calculated by the initial learning rate, error dynamic adjustment coefficient and error metric; For step length , calculated by the initial step factor, the adjustment coefficient of the step factor, and the error metric; Among them, the calculation of the error dynamic adjustment coefficient adopts the cosine annealing strategy; the calculation of the error metric adopts a composite error function, including cross entropy loss and training error; the adjustment coefficient of the step size factor is calculated by dynamically adjusting the step size amplitude in combination with the current detection accuracy.
4. The method for detecting live fish damage based on AI and multi-view underwater imaging technology according to claim 3 is characterized by: In the adaptive fusion process, the importance of the features extracted by the convolutional layer is dynamically adjusted according to the multi-view visual data of the fish image. The features extracted by the convolutional layer of each layer of the convolutional neural network are weighted and fused, and the weighting coefficient of each layer feature is dynamically calculated by combining local and global information. Among them, the local information is further represented by the correlation between the feature and the input sample, and the correlation is calculated using the Pearson correlation coefficient.
5. The method for detecting live fish damage based on AI and multi-view underwater imaging technology according to claim 4 is characterized by: Class weights are used in the loss function to balance the minority and majority classes. The calculation formula is as follows: , in, represents the weighted loss, represents the total number of input samples, Indicates the The dynamic weighting coefficient of the category corresponding to the sample, Indicates the Iteration No. The weight of the samples, represents the standard loss function, express The predicted label of Indicates the input samples, express The true label.
6. The method for detecting live fish damage based on AI and multi-view underwater imaging technology according to claim 5, characterized in that: The weighting coefficients of each category are adjusted using a dynamic weighting factor based on data distribution, specifically according to the label The number of samples and the total number of input samples determine the distribution of the data. The density of the corresponding dynamic weighting coefficient is calculated .
7. The method for detecting live fish damage based on AI and multi-view underwater imaging technology according to claim 6, characterized in that: In different training stages, multi-stage optimization is used to focus on feature extraction and classification optimization of different categories. The calculation formula is as follows: , in, represents the total loss after integration, represents the total number of training stages, Indicates the The weighting coefficients of the training phase, Indicates the The loss value of the training phase.
8. The method for detecting live fish damage based on AI and multi-view underwater imaging technology according to claim 7, characterized in that: Modify the weighting coefficient of each stage according to the strength of the correlation between the stage loss and the feature , by calculating the Pearson correlation coefficient, the correlation between the output features of each stage of the convolutional neural network and the input samples is determined, and the weighting of the input samples of each stage on the output features of the convolutional neural network is calculated, thereby determining the association between the loss and features of each stage.
9. The method for detecting damage to live fish based on AI and multi-view underwater imaging technology according to claim 8, characterized in that: During the iteration process of the live fish injury grading detection model, an adaptive sample reweighting strategy and a multi-stage verification mechanism are used to dynamically screen high-value training samples and adjust the training direction. The weights of the samples are dynamically adjusted based on their prediction confidence and feature consistency, reducing the contribution of noisy and blurred samples and strengthening the training weights of clear samples in the damaged area. The calculation formula is as follows: , in, Indicates the Iteration No. The weight of the samples, represents the exponential function, represents the smoothing coefficient, Represents the measure of the convolutional neural network The overlap function between the sample prediction and the real damage area is: represents the entropy calculation function, Indicates calculation of The degree of confusion of the sample feature map is used to evaluate the sample clarity. Indicates the maximum entropy value among all samples; The training process consists of three stages: feature convergence, regularization and reinforcement, and fine-tuning. Feature convergence period: Prioritize the optimization of the backbone network, which consists of ResNet-50 and Inception modules. Use a high initial learning rate to quickly capture the basic features of the damaged area. Regularization reinforcement phase: Overfitting is suppressed by randomly discarding 20% of low-weight feature channels, while adversarial sample generation is used to enhance robustness; Fine-tuning phase: Freeze shallow network parameters and fine-tune only the high-level modules and classification head after Stage 3. Use a low initial learning rate to force the model to map multi-view image features from different perspectives into a unified semantic space, thus constraining the feature consistency of similar multi-view samples.
Citation Information
Patent Citations
Green coffee bean rating and classifying method based on hybrid convolutional neural network structure
CN118608827A
Fish identification method based on convolutional neural network
CN119206462A