Underwater crab quality nonlinear estimation method, system, equipment, medium and product

By applying image processing and machine learning technology in underwater crab farming, the Dfe-Mask Transfiner model and XGBoost model are used to achieve accurate estimation of the quality of underwater hairy crabs, solving the problems of low monitoring accuracy and high cost in traditional methods, and improving breeding efficiency and work efficiency.

CN119762464AActive Publication Date: 2025-04-04CHINA AGRI UNIV +1
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202411874194.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-04
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

In aquaculture, traditional methods are difficult to achieve low-cost, contactless, high-precision and strong generalization quality monitoring of underwater crabs, resulting in the impact of breeding benefits and work efficiency.

Method used

A nonlinear estimation method of underwater crab mass is used to obtain and process the images of underwater crabs, and instance segmentation is performed using the Dfe-Mask Transfiner model to extract crab shell features, and these features are input into the trained XGBoost model for mass estimation.

Benefits of technology

The accurate estimate of the quality of underwater hairy crabs is achieved, the accuracy and efficiency of quality monitoring is improved, the cost of breeding is reduced, and the scientific nature of breeding management is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119762464A_ABST
    Figure CN119762464A_ABST
Patent Text Reader

Abstract

The invention discloses an underwater crab quality nonlinear estimation method, system and device, a medium and a product, and relates to the field of aquaculture, and the method comprises the steps: carrying out the color correction and low illumination enhancement of an image of a single crab with the quality to be estimated, and obtaining a color correction image and an illumination enhancement image; carrying out pixel point fusion on the illumination enhancement image and the color correction image to obtain a fused image; performing white balance and low illumination enhancement on the fused image to obtain a to-be-segmented image; performing instance segmentation on the image to be segmented by using a Dfe-Mask Transfer model to obtain a crab shell image; obtaining crab characteristics according to the crab shell image; the crab characteristics comprise the length, the width and the perimeter of the crab shell and the mean value of three RGB color channels of the RGB image of the crab shell; and inputting the characteristics of the crabs into the trained XGBoost model to obtain the quality of the crabs. According to the invention, the quality of the underwater hairy crab can be accurately estimated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of aquaculture technology, and in particular to a method, system, equipment, medium and product for nonlinear estimation of underwater crab mass. Background Art

[0002] Chinese mitten crab (Eriocheir sinensis), commonly known as hairy crab, is highly respected for its rich nutrition and high economic value. In recent years, with the continuous growth of market demand and the expansion of aquaculture scale, the aquaculture area of ​​crabs has increased steadily year by year. However, in the process of crab farming, not only is it still facing the challenges of low feeding efficiency and high feed input cost, but the traditional random feeding method is difficult to ensure the uniform distribution of feed, which seriously affects the cost-effectiveness and work efficiency of aquaculture. The quality of crabs is the key basis for determining the feeding amount, and regular acquisition of crab quality information is particularly important for optimizing daily feeding management. Therefore, continuous and accurate monitoring of the body size and weight information of Chinese mitten crabs at different growth stages is the key to accurate feeding. By accurately estimating the quality of crabs, farmers can adjust the feeding strategy in time to ensure that the crabs obtain sufficient nutrition and a suitable growth environment during the growth period, thereby improving the survival rate, accelerating the growth rate, and ultimately improving the aquaculture efficiency.

[0003] At present, in the process of hairy crab farming, crab farmers need to regularly take a small amount of samples for measurement, weigh their quality to determine the amount of feeding and monitor their growth. However, this artificial method is not only costly and inaccurate, but also causes stress reactions in Chinese mitten crabs, which in turn affects their growth. Therefore, there is an urgent need for a low-cost, non-contact, high-precision and strong generalization method to achieve automated measurement of Chinese mitten crabs, which is of great significance to the aquaculture industry. However, there is currently a lack of effective evaluation research on underwater crustacean mass estimation. The main methods for crab mass estimation are simple data fitting methods and machine learning methods. For example: the watershed segmentation technique is used to obtain the image of the head carapace of the swimming crab, and then the three features of projection area, carapace length and carapace width are extracted. The support vector machine algorithm optimized by genetic algorithm is used to establish a three-factor regression prediction model for swimming crab mass to estimate the crab mass. The root mean square error of the model prediction is 5.80g, and the average absolute percentage error is 2.23%. Although the current crab mass estimation method can estimate the crab mass, it cannot accurately estimate the mass of underwater hairy crabs at all. Summary of the invention

[0004] The purpose of this application is to provide a method, system, device, medium and product for nonlinear estimation of underwater crab mass, which can accurately estimate the mass of underwater hairy crabs.

[0005] To achieve the above objectives, this application provides the following solutions:

[0006] In a first aspect, the present application provides a method for nonlinear estimation of underwater crab mass, the method comprising:

[0007] Acquire an image to be processed; the image to be processed is an image of a single crab whose mass is to be estimated;

[0008] Performing color correction on the image to be processed to obtain a color-corrected image;

[0009] Performing low-light enhancement on the image to be processed to obtain a light-enhanced image;

[0010] fusing the illumination enhanced image and the color corrected image pixel by pixel to obtain a fused image;

[0011] Performing white balance and low-light enhancement on the fused image to obtain an image to be segmented;

[0012] The Dfe-Mask Transfiner model is used to perform instance segmentation on the image to be segmented to obtain a crab shell image; wherein the Dfe-Mask Transfiner model is obtained by improving the Mask Transfiner model on the basis of the Mask Transfiner model; the improvements to the Mask Transfiner model include: first, adding a deformable large core attention mechanism module to the backbone network of the Mask Transfiner model, then, in the FPN feature fusion, modifying the input and output of the FPN, re-fusing the P5 output features of the FPN downsampled with the P4 downsampled output features, and using them as the input features of the P4 upsampled, re-fusing the P4 output features of the FPN downsampled with the P3 downsampled output features, and using them as the input features of the P3 upsampled, finally, adding an EMA attention mechanism to the downsampled P5 output layer of the FPN feature fusion layer, and adding a deformable large core attention mechanism to the downsampled P6 output layer of the FPN feature fusion layer;

[0013] Obtaining crab features according to the crab shell image; the crab features include the length of the crab shell, the width of the crab shell, the circumference of the crab shell, and the average values ​​of three RGB color channels of the RGB image of the crab shell;

[0014] The crab features are input into a trained XGBoost model to obtain the crab mass output by the trained XGBoost model; the trained XGBoost model is trained using a plurality of crab feature samples and the crab mass corresponding to each of the crab feature samples.

[0015] Optionally, before acquiring the image to be processed, the underwater crab mass nonlinear estimation method further includes:

[0016] Obtain a video of the back of an underwater crab captured by an image acquisition device;

[0017] Extracting one image per second from the video of the back of the underwater crab to obtain multiple images of the underwater crab;

[0018] obtaining an image of each crab whose mass is to be estimated according to the plurality of images of the underwater crabs;

[0019] An image to be processed is obtained according to the image of each crab whose mass is to be estimated.

[0020] Optionally, performing low-light enhancement on the image to be processed to obtain a light-enhanced image specifically includes:

[0021] The image to be processed is subjected to low-light enhancement by using contrast-limited adaptive histogram equalization to obtain a light-enhanced image.

[0022] Optionally, performing white balance and low-light enhancement on the fused image to obtain an image to be segmented specifically includes:

[0023] White balancing and low-light enhancement based on adaptive histogram equalization with limited contrast are performed on the fused image to obtain an image to be segmented.

[0024] Optionally, obtaining crab features according to the crab shell image specifically includes:

[0025] Performing a binarization operation on the crab shell image to obtain a binary image of the crab shell;

[0026] Obtaining the circumscribed minimum ellipse of the crab shell according to the binary image of the crab shell;

[0027] According to the minimum circumscribed ellipse of the crab shell, the length of the crab shell is calculated using the major axis of the ellipse, the width of the crab shell is calculated using the minor axis of the ellipse, and the perimeter of the crab shell is calculated using the length of the pixels surrounding the crab shell.

[0028] The mean values ​​of three RGB color channels of the RGB image of the crab shell are obtained according to the crab shell image.

[0029] Optionally, the crab feature sample includes the length, width, circumference of a crab shell of a single crab of known mass and the average values ​​of three RGB color channels of an RGB image of the crab shell.

[0030] In a second aspect, the present application provides a nonlinear underwater crab mass estimation system, the nonlinear underwater crab mass estimation system comprising:

[0031] The module for acquiring an image to be processed is used to acquire an image to be processed; the image to be processed is an image of a single crab whose mass is to be estimated;

[0032] A color correction module, used for performing color correction on the image to be processed to obtain a color-corrected image;

[0033] A low-light enhancement module, used to perform low-light enhancement on the image to be processed to obtain a light-enhanced image;

[0034] A pixel fusion module, used for fusing pixels of the illumination enhanced image and the color corrected image to obtain a fused image;

[0035] A white balance and low light enhancement module, used to perform white balance and low light enhancement on the fused image to obtain an image to be segmented;

[0036] An instance segmentation module is used to perform instance segmentation on the image to be segmented by using a Dfe-Mask Transfiner model to obtain a crab shell image; wherein the Dfe-Mask Transfiner model is obtained by improving the Mask Transfiner model on the basis of the Mask Transfiner model; the improvements to the Mask Transfiner model include: first, adding a deformable large core attention mechanism module to the backbone network of the Mask Transfiner model, then, in FPN feature fusion, modifying the input and output of FPN, re-fusing the P5 output features of FPN down-sampled with the output features of P4 down-sampled, and using them as the input features of P4 up-sampling, re-fusing the P4 output features of FPN down-sampled with the output features of P3 down-sampled, and using them as the input features of P3 up-sampling, finally, adding an EMA attention mechanism to the down-sampled P5 output layer of the FPN feature fusion layer, and adding a deformable large core attention mechanism to the down-sampled P6 output layer of the FPN feature fusion layer;

[0037] A crab feature extraction module, used for obtaining crab features according to the crab shell image; the crab features include the length of the crab shell, the width of the crab shell, the circumference of the crab shell and the mean of three RGB color channels of the RGB image of the crab shell;

[0038] The crab mass estimation module is used to input the crab features into the trained XGBoost model to obtain the crab mass output by the trained XGBoost model; the trained XGBoost model is trained using multiple crab feature samples and the crab mass corresponding to each of the crab feature samples.

[0039] In a third aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-described nonlinear estimation methods for underwater crab mass.

[0040] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described nonlinear estimation methods for underwater crab mass.

[0041] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned nonlinear estimation methods for underwater crab mass.

[0042] According to the specific embodiments provided in this application, this application has the following technical effects:

[0043] The present application provides a method, system, device, medium and product for nonlinear estimation of underwater crab quality. By performing color correction and low-light enhancement on the image of a single crab to be estimated, pixel fusion of the light-enhanced image and the color-corrected image, and white balancing and low-light enhancement on the fused image, a clearer outline of the underwater crab can be obtained. By applying the Mask Transfiner model to crab segmentation for the first time, and improving the MaskTransfiner model to obtain the Dfe-Mask Transfiner model, the Dfe-Mask Transfiner model can be used to achieve refined segmentation of the crab shell, and more accurate crab features (i.e., the length, width, circumference of the crab shell and the mean of the three RGB color channels of the RGB image of the crab shell) can be obtained using the accurate segmentation image of the crab shell. By applying the nonlinear model XGBoost to underwater crab quality estimation for the first time, the XGBoost model can better capture and express the relationship between crab features and crab quality, improve the accuracy of quality prediction, and ultimately achieve the effect of accurately estimating the quality of underwater hairy crabs. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 A schematic diagram of a flow chart of a nonlinear estimation method for underwater crab mass provided in one embodiment of the present application;

[0046] Figure 2 A flowchart of a nonlinear mass estimation method for underwater crabs based on refined segmentation provided in one embodiment of the present application;

[0047] Figure 3 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0049] The purpose of this application is to provide a method, system, device, medium and product for nonlinear estimation of underwater crab mass, which can accurately estimate the mass of underwater hairy crabs.

[0050] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0051] like Figure 1 As shown, the present application provides a nonlinear estimation method for underwater crab mass, comprising:

[0052] Step 101: Acquire an image to be processed; the image to be processed is an image of a single crab whose mass is to be estimated.

[0053] Before step 101, the following steps are also included:

[0054] Get a video of the back of an underwater crab captured by an image acquisition device.

[0055] An image is extracted from the back video of the underwater crab every second to obtain multiple images of the underwater crab.

[0056] An image of each crab whose mass is to be estimated is obtained according to a plurality of underwater crab images.

[0057] An image to be processed is obtained according to the image of each crab whose mass is to be estimated.

[0058] Step 102: Perform color correction on the image to be processed to obtain a color-corrected image.

[0059] Step 103: Perform low-light enhancement on the image to be processed to obtain a light-enhanced image.

[0060] The step 103 specifically includes:

[0061] The contrast-limited adaptive histogram equalization is used to perform low-light enhancement on the processed image to obtain a light-enhanced image.

[0062] Step 104: fusing the illumination enhanced image and the color corrected image pixel by pixel to obtain a fused image.

[0063] Step 105: white balance and low-light enhancement are performed on the fused image to obtain an image to be segmented.

[0064] The step 105 specifically includes:

[0065] The fused image is white-balanced and low-light enhancement is performed based on contrast-limited adaptive histogram equalization to obtain the image to be segmented.

[0066] Step 106: Use the Dfe-Mask Transfiner model to perform instance segmentation on the image to be segmented to obtain a crab shell image; wherein the Dfe-Mask Transfiner model is obtained by improving the Mask Transfiner model on the basis of the Mask Transfiner model; the improvements to the Mask Transfiner model include: first, adding a deformable large core attention mechanism module to the backbone network of the Mask Transfiner model; then, in the FPN feature fusion, modifying the input and output of the FPN, re-fusing the FPN down-sampled P5 output features with the P4 down-sampled output features, and using them as the input features of the P4 up-sampling; re-fusing the FPN down-sampled P4 output features with the P3 down-sampled output features, and using them as the input features of the P3 up-sampling; finally, adding the EMA attention mechanism to the down-sampled P5 output layer of the FPN feature fusion layer, and adding the deformable large core attention mechanism to the down-sampled P6 output layer of the FPN feature fusion layer.

[0067] Step 107: Obtain crab features according to the crab shell image; the crab features include the length of the crab shell, the width of the crab shell, the circumference of the crab shell, and the average values ​​of the three RGB color channels of the RGB image of the crab shell.

[0068] The step 107 specifically includes:

[0069] The crab shell image is binarized to obtain a binary image of the crab shell.

[0070] The minimum circumscribed ellipse of the crab shell is obtained according to the binary image of the crab shell.

[0071] According to the minimum circumscribed ellipse of the crab shell, the pixel size is used as the annotation, the length of the crab shell is calculated using the major axis of the ellipse, the width of the crab shell is calculated using the minor axis of the ellipse, and the circumference of the crab shell is calculated using the length of the pixels surrounding the crab shell.

[0072] The mean values ​​of the three RGB color channels of the RGB image of the crab shell are obtained according to the crab shell image.

[0073] Step 108: Input the crab features into the trained XGBoost model to obtain the crab mass output by the trained XGBoost model; the trained XGBoost model is trained using multiple crab feature samples and the crab mass corresponding to each crab feature sample.

[0074] In step 108, the crab feature sample includes the length, width, circumference of the crab shell of a single crab of known mass and the average values ​​of three RGB color channels of the RGB image of the crab shell.

[0075] The technical solution of this application is described below with a specific embodiment:

[0076] The present application provides a nonlinear mass estimation method for underwater crabs based on refined segmentation (i.e., a nonlinear mass estimation method for underwater crabs based on refined segmentation), such as Figure 2 As shown, the nonlinear estimation method of underwater crab mass provided by the present application includes:

[0077] S1: Obtain the underwater crab shell video frame to be processed.

[0078] Video images of underwater crabs can be obtained through image acquisition equipment (such as a camera), but before video acquisition, the camera needs to be calibrated using a calibration board for image acquisition.

[0079] S2: Extract images from the video, extracting one image per second (the camera shooting speed is 30 frames per second).

[0080] S3: Perform color correction on the image to obtain a crab image with less color variation.

[0081] Color correction is to repair color cast, color temperature, contrast and other problems in underwater crab images, and to improve the visual effect and color accuracy of underwater crab images.

[0082] S4: Perform low-light enhancement on the image to obtain an underwater image with less noise and stronger contrast.

[0083] In the specific implementation, the low-light enhancement of the CLAHE histogram equalization algorithm can be used to solve the global problem of the image, the background noise enhancement problem, improve the contrast and suppress the noise.

[0084] S5: Fusing the color-corrected image and the underwater enhanced image to obtain a clear image with correct color.

[0085] In a specific implementation, pixel image fusion may be used to obtain a clearer image by adding and subtracting corresponding image pixels.

[0086] S6: performing white balance and low-light enhancement on the fused image to obtain an enhanced image that is more conducive to a computer.

[0087] In a specific implementation, white balance and low-light enhancement can be used to eliminate or reduce the color cast of underwater images so that the image colors are not distorted as much as possible and the colors are restored to normal.

[0088] S7: Performing fine segmentation on the enhanced image to obtain a more comprehensive crab shell feature (i.e., crab feature) image.

[0089] The precise segmentation model of underwater crabs specifically includes:

[0090] The task of crab mass estimation needs to consider the accuracy of shape feature segmentation and the refinement of edge segmentation. The specific structure of the Dfe-Mask Transfiner crab refined instance segmentation model is as follows:

[0091] The Dfe-Mask Transfiner river crab refined instance segmentation model improves the segmentation model based on MaskTransfiner. First, the Deformable LargeKernelAttention (D-LKANet) attention mechanism module is added to the backbone of Mask Transfiner to facilitate the preprocessing of the input image and realize the refined calculation of the image contour features through the calculation of pixel points. Then in the FPN feature fusion, this application modifies the input and output of FPN, and re-fuse the P5 output features of the FPN downsampled (that is, the output of FPN, the original feature fusion FPN is improved) with the P4 downsampled output features, and use them as the input features of the P4 upsampled (that is, the input of the first upsampling, that is, the output layer of P4 is upsampled). The P4 output features of the FPN downsampled are re-fused with the output features of the P3 downsampled, and used as the input features of the P3 upsampled (that is, the input of FPN), and finally more accurate feature pixel point calculation is achieved. Finally, the EMA attention mechanism is added to the downsampled P5 output layer of the FPN feature fusion layer (i.e., the fourth downsampled output layer P5) to capture pixel-level pairwise relationships, and the D-LKANet attention mechanism is added to the downsampled P6 output layer of the FPN feature fusion layer to improve the model’s segmentation accuracy for irregularly shaped objects or features.

[0092] In the crab fine segmentation task, the accuracy of edge segmentation requires clearer pixel-level features. In order to enable the model to generate better pixel-level high-level feature maps after feature fusion, this application utilizes an efficient multi-scale attention module for cross-space learning (i.e., adding an EMA attention mechanism to the P5 output layer downsampled from the FPN feature fusion layer). The efficient multi-scale attention module (EMA) for cross-space learning can not only retain the information on each channel, but also reduce the side effects of modeling cross-channels on extracting deep visual representations.

[0093] EMA reshapes some channels into batch dimensions and groups the channel dimensions into multiple sub-features so that the spatial semantic features are evenly distributed in each feature group. Specifically, for any given input feature map, EMA divides the input features (X) into G sub-feature groups, each group learning different semantics. This grouping method not only strengthens the feature learning of semantic areas, but also compresses noise. EMA uses three parallel paths to extract attention weight descriptors for grouped feature maps. Two paths are 1x1 branches and the third path is a 3x3 branch. A one-dimensional global average pooling operation is used in the 1x1 branch to encode channel information in two spatial directions respectively. The 3x3 branch captures multi-scale feature representations through 3x3 convolutions. In this way, EMA can not only encode cross-channel information to adjust the importance of different channels, but also retain precise spatial structure information into the channel.

[0094] Since the features of the crab carapace (i.e., crab shell) and the features of the crab claws are extremely similar in color, texture, or the texture, color, or surrounding area of ​​the object, when only the carapace is segmented, other features will have a certain impact on the accurate segmentation of the carapace. Therefore, in order to accurately segment the complete carapace, this application adds D-LKA Net to the backbone of the model, and adds D-LKANet to the downsampled P6 output layer after the FPN feature fusion (i.e., D-LKANet is added to the ResNet in the backbone, and D-LKANet is added after the downsampled P6 output layer after the FPN feature fusion). D-LKA uses large convolution kernels to make full use of contextual information. This "complete contextual information" can improve the model's ability to understand and parse images based on the global and local information in the image.

[0095] The D-LKAAttention model benefits from deformable convolutions. By flexibly deforming the sampling grid through deformable convolutions, the model can adapt to diverse data patterns and enhance the ability to represent deformations of segmented targets. In addition, D-LKA enhances the model's adaptability to geometric changes by introducing learnable offsets, allowing the network to better handle objects or features of irregular shapes. Specifically, two variants, MaxViT and deformable LKA layers, are used in D-LKA, which can effectively extract features and perform finer and superior segmentation.

[0096] S8: According to the segmented image, a binary image of the crab shell is obtained, and then the features of the crab are extracted using the binary image, mainly extracting the carapace width, carapace length, carapace circumference and the mean of the carapace RGB color channel.

[0097] S9: Construct feature values ​​based on information such as carapace width, carapace length, carapace circumference, and the mean of the carapace RGB color channels to obtain multi-feature information for crab mass estimation.

[0098] In the specific implementation, the minimum circumscribed ellipse of the crab shell is used as the annotation based on the pixel size, and the length and width are calculated using the major and minor axes of the ellipse. The circumference is the length of the pixels around the crab shell, and the length, width, and circumference of the crab shell are finally obtained. Based on the segmented image of the crab shell, Python language programming is used to extract the three means of the RGB color channels to obtain color information. Finally, the mean information of the three RGB color channels is obtained, and the information is written into a TXT file to construct a nonlinear estimation file of crab characteristics and crab mass (i.e., the weight of the crab).

[0099] S10: Use multi-feature TXT files to train the XGBoost mass estimation model to achieve accurate estimation of the mass of underwater hairy crabs.

[0100] The underwater nonlinear mass estimation model specifically includes:

[0101] Different morphological features and color features have different correlations with quality. Therefore, when estimating the quality of different river crabs, linear correlation cannot be used directly to predict the quality of crabs. In order to consider the quality estimation under multiple features, this application uses eXtreme GradientBoosting (XGBoost) to construct a multi-feature quality estimation regression model. XGBoost is an improvement based on the gradient boosting tree (GradientBoosting Decision Trees, GBDT), which achieves excellent fitting effect on data by combining basis functions and weights. Unlike traditional GBDT, XGBoost introduces a regularization term in the loss function, thereby enhancing the robustness of model training. By combining basis functions and weights, XGBoost can more accurately process complex data relationships, thereby improving the generalization ability and robustness of the model, and making contributions in multiple fields such as soil, hydrology, and atmosphere. Therefore, this application uses the XGBoost algorithm to predict the quality of crabs to achieve quality estimation of hairy crabs under multiple features. The quality prediction model of the XGBoost algorithm is shown as follows:

[0102]

[0103] Among them, y′ i is the final predicted value of the model, x i is the input feature vector of the sample, K is the number of decision trees, f k is the k-fold training function, F corresponds to the set of all decision trees, that is, F is f k The set of all decision trees; f k (x i ) is the prediction value of the kth tree for sample i, k∈[1,K]. The prediction value of the t-th round model y' i(t) is the predicted value y' of the model in round t-1 i(t-1) Add new tree f k (x i )get:

[0104] y′ i(t) =f k (x i )+y′ i(t-1) ;

[0105] In order to prevent overfitting, a regularization term is introduced into the loss function of XGBoost to control the complexity of the model and reduce the variance of the model. This application finally uses the XGBoost mass estimation algorithm to accurately predict the weight (mass size) of underwater crabs.

[0106] The present application relates to the field of image segmentation and nonlinear quality estimation model of underwater crabs. The present application provides a nonlinear estimation method of underwater crab quality based on refined segmentation, including: obtaining a bird's-eye view video of underwater crabs; using a low-light enhancement algorithm to obtain clearer crab image data, and then using an improved refined segmentation algorithm (Dfe-MaskTransfiner) to complete the accurate segmentation of the crab shell, extracting the information of the crab shell size and color information on the basis of the segmentation, constructing a multi-feature quality estimation by using the length, width, circumference and RGB color mean of the crab shell, and training a nonlinear XGBoost model based on the multi-features, so as to achieve real-time estimation of the underwater crab quality. The present application can ensure the acquisition of a clearer outline of underwater crabs in the pond through low-light image enhancement, accurately extract the crab shell information based on the refined segmentation model, and construct the relationship between the shell features and the quality with a nonlinear regression model. The nonlinear model can better capture and express these complex interactive relationships, thereby improving the accuracy of the prediction. This application allows farmers to monitor and understand the changes in underwater crab quality in real time, providing scientific guidance for optimizing daily feeding amount, controlling stocking density and ultimately determining the best harvesting time.

[0107] In short, the nonlinear estimation method of underwater crab mass based on refined segmentation in this application includes:

[0108] A video image of a crab shell of an underwater crab is obtained, and underwater low-light enhancement is performed on the video image (i.e., the obtained video) to obtain a clearer video image.

[0109] Color correction is performed on the video image to reduce the impact of low light on the crab shell color channel.

[0110] The illumination enhanced image and the color corrected image are fused pixel by pixel to obtain a first fused image.

[0111] White balance and CLAHE low-light enhancement are performed on the first fused image to obtain an enhanced image with higher resolution and color correction.

[0112] Based on the improved segmentation network, the enhanced image (image segmentation is performed directly after white balance and CLAHE low-light enhancement) is used to accurately segment the underwater crab shell target.

[0113] According to the Dfe-MaskTransfiner algorithm, the accurate segmentation image of the crab shell is obtained to obtain the crab shell image for binarization operation to obtain the binary image of the crab shell. Through the Python programming language, the feature processing of the crab shell image is realized to extract the size and color information of the crab shell.

[0114] According to the size and color information of the crab shell, the minimum circumscribed ellipse of the crab shell is used as an annotation based on the pixel size, and the length and width are calculated using the major and minor axes of the ellipse. The perimeter is the length of the pixels around the crab shell, and finally the length, width, and perimeter of the crab shell are obtained. According to the segmented image of the crab shell, the three means of the RGB color channels are extracted using Python programming to obtain the color information, and finally the mean information of the three RGB color channels is obtained.

[0115] Underwater nonlinear mass estimation based on multi-information features.

[0116] In this application, low-light enhancement technology is used to obtain high-quality images of underwater crabs. Then, by adding an attention module and a new FPN to the segmentation network, the segmentation accuracy of the crab carapace is improved, and the refined segmentation of the carapace is completed. The segmented carapace image is used to obtain the length, width, circumference and RGB color channel information of the crab carapace, and the quality is estimated using the features of multiple information. The quality prediction of the crab is completed through the XGBoost nonlinear regression model. This crab quality estimation method of the present application can realize real-time and accurate quality estimation and monitoring of underwater crabs, and provides effective technical support for real-time monitoring and scientific feeding in crab farming.

[0117] This application is aimed at the shape features of crab shells, and quality estimation requires accurate crab shell feature segmentation. Due to the complex texture, similar colors, strong reflectiveness and other characteristics of crab shells, how to achieve high-precision segmentation has become a difficult point, especially in aquaculture automation, quality inspection and biometric research. However, traditional image processing methods include edge detection, threshold segmentation, region growing and other technologies. These methods rely on low-level features of the image (such as color, texture, edge) and use mathematical models for segmentation. However, for complex textures and morphologies such as crab shells, the accuracy is not high and is easily affected by factors such as illumination changes and background interference. In recent years, with the development of deep learning, especially the success of convolutional neural networks (CNN) in image segmentation, many studies have begun to use deep learning methods to segment crab shells, such as: coarse to fine segmentation of underwater crabs. Although the accuracy of instance segmentation is high and good results have been achieved, its mask is still relatively rough. The problem of accurate and refined segmentation of crab shells is an important challenge in the field of computer vision and image processing. Therefore, in order to obtain the segmentation map of the crab shell and obtain a clear crab shell instance mask through the segmented crab shell image (obtaining a clear crab shell instance mask requires the use of a segmented image, specifically using the segmented image and the original image to remove the background and obtain an instance segmentation mask map), this application first applies Mask Transfiner to the segmentation of crabs, and proposes a segmentation model based on Dfe-Mask Transfiner. At the same time, for the first time, a nonlinear model is used in combination with multiple features to estimate the quality of underwater crabs. This application uses the XGBoost regression model to fit multi-feature data, establishes a nonlinear regression quality estimation model for underwater live crabs, and realizes accurate estimation of the quality of underwater hairy crabs. This type of monitoring is economical, remotely operable, contact-free, and highly accurate, and this method has become a trend for non-destructive testing of aquatic biological features in aquaculture environments.

[0118] Based on the same inventive concept, the embodiment of the present application also provides an underwater crab mass nonlinear estimation system for implementing the underwater crab mass nonlinear estimation method involved above. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above method, so the specific limitations of one or more underwater crab mass nonlinear estimation system embodiments provided below can refer to the limitations of the underwater crab mass nonlinear estimation method above, and will not be repeated here.

[0119] In an exemplary embodiment, a nonlinear mass estimation system for underwater crabs is provided, which is a nonlinear mass estimation system for underwater crabs based on refined segmentation (i.e., a nonlinear mass estimation system for underwater crabs based on refined segmentation), comprising:

[0120] The module for acquiring images to be processed is used to acquire images to be processed; the image to be processed is an image of a single crab whose mass is to be estimated.

[0121] The color correction module is used to perform color correction on the image to be processed to obtain a color corrected image.

[0122] The low-light enhancement module is used to perform low-light enhancement on the image to be processed to obtain a light-enhanced image.

[0123] The pixel fusion module is used to fuse the pixels of the illumination enhanced image and the color corrected image to obtain a fused image.

[0124] The white balance and low light enhancement module is used to perform white balance and low light enhancement on the fused image to obtain the image to be segmented.

[0125] The instance segmentation module is used to perform instance segmentation on the image to be segmented by using the Dfe-Mask Transfiner model to obtain a crab shell image; wherein the Dfe-Mask Transfiner model is obtained by improving the Mask Transfiner model on the basis of the Mask Transfiner model; the improvements to the Mask Transfiner model include: first, adding a deformable large core attention mechanism module to the backbone network of the Mask Transfiner model; then, in the FPN feature fusion, modifying the input and output of the FPN, re-fusing the P5 output features of the FPN downsampled with the P4 downsampled output features and using them as the input features of the P4 upsampled; re-fusing the P4 output features of the FPN downsampled with the P3 downsampled output features and using them as the input features of the P3 upsampled; finally, adding the EMA attention mechanism to the downsampled P5 output layer of the FPN feature fusion layer, and adding the deformable large core attention mechanism to the downsampled P6 output layer of the FPN feature fusion layer.

[0126] The crab feature extraction module is used to obtain crab features according to the crab shell image; the crab features include the length of the crab shell, the width of the crab shell, the circumference of the crab shell and the mean of the three RGB color channels of the RGB image of the crab shell.

[0127] The crab mass estimation module is used to input crab features into the trained XGBoost model to obtain the crab mass output by the trained XGBoost model; the trained XGBoost model is trained using multiple crab feature samples and the crab mass corresponding to each crab feature sample.

[0128] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 3As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store underwater crab mass nonlinear estimation data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for nonlinear estimation of underwater crab mass is implemented.

[0129] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0130] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0131] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0132] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0133] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0134] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0135] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0136] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A nonlinear estimation method for underwater crab mass, characterized in that: The underwater crab mass nonlinear estimation method comprises: Acquire an image to be processed; the image to be processed is an image of a single crab whose mass is to be estimated; Performing color correction on the image to be processed to obtain a color-corrected image; Performing low-light enhancement on the image to be processed to obtain a light-enhanced image; fusing the illumination enhanced image and the color corrected image pixel by pixel to obtain a fused image; Performing white balance and low-light enhancement on the fused image to obtain an image to be segmented; The Dfe-Mask Transfiner model is used to perform instance segmentation on the image to be segmented to obtain a crab shell image; wherein the Dfe-Mask Transfiner model is obtained by improving the Mask Transfiner model on the basis of the Mask Transfiner model; the improvements to the Mask Transfiner model include: first, adding a deformable large core attention mechanism module to the backbone network of the Mask Transfiner model, then, in the FPN feature fusion, modifying the input and output of the FPN, re-fusing the P5 output features of the FPN downsampled with the P4 downsampled output features, and using them as the input features of the P4 upsampled, re-fusing the P4 output features of the FPN downsampled with the P3 downsampled output features, and using them as the input features of the P3 upsampled, finally, adding an EMA attention mechanism to the downsampled P5 output layer of the FPN feature fusion layer, and adding a deformable large core attention mechanism to the downsampled P6 output layer of the FPN feature fusion layer; Obtaining crab features according to the crab shell image; the crab features include the length of the crab shell, the width of the crab shell, the circumference of the crab shell, and the average values ​​of three RGB color channels of the RGB image of the crab shell; The crab features are input into a trained XGBoost model to obtain the crab mass output by the trained XGBoost model; the trained XGBoost model is trained using a plurality of crab feature samples and the crab mass corresponding to each of the crab feature samples.

2. The nonlinear estimation method for underwater crab mass according to claim 1, characterized in that: Before obtaining the image to be processed, the underwater crab mass nonlinear estimation method further includes: Obtain a video of the back of an underwater crab captured by an image acquisition device; Extracting one image per second from the video of the back of the underwater crab to obtain multiple images of the underwater crab; obtaining an image of each crab whose mass is to be estimated according to the plurality of images of the underwater crabs; An image to be processed is obtained according to the image of each crab whose mass is to be estimated.

3. The nonlinear estimation method for underwater crab mass according to claim 1, characterized in that: Performing low-light enhancement on the image to be processed to obtain a light-enhanced image specifically includes: The image to be processed is subjected to low-light enhancement by using contrast-limited adaptive histogram equalization to obtain a light-enhanced image.

4. The method for nonlinear estimation of underwater crab mass according to claim 1, characterized in that: Performing white balance and low-light enhancement on the fused image to obtain an image to be segmented specifically includes: White balancing and low-light enhancement based on adaptive histogram equalization with limited contrast are performed on the fused image to obtain an image to be segmented.

5. The method for nonlinear estimation of underwater crab mass according to claim 1, characterized in that: The crab features are obtained according to the crab shell image, specifically including: Performing a binarization operation on the crab shell image to obtain a binary image of the crab shell; Obtaining the circumscribed minimum ellipse of the crab shell according to the binary image of the crab shell; According to the minimum circumscribed ellipse of the crab shell, the length of the crab shell is calculated using the major axis of the ellipse, the width of the crab shell is calculated using the minor axis of the ellipse, and the perimeter of the crab shell is calculated using the length of the pixels surrounding the crab shell. The mean values ​​of three RGB color channels of the RGB image of the crab shell are obtained according to the crab shell image.

6. The method for nonlinear estimation of underwater crab mass according to claim 1, characterized in that: The crab feature samples include the length, width, circumference of a crab shell of a single crab with known mass and the average values ​​of three RGB color channels of an RGB image of the crab shell.

7. A nonlinear estimation system for underwater crab mass, characterized in that: The underwater crab mass nonlinear estimation system comprises: The module for acquiring an image to be processed is used to acquire an image to be processed; the image to be processed is an image of a single crab whose mass is to be estimated; A color correction module, used for performing color correction on the image to be processed to obtain a color-corrected image; A low-light enhancement module, used to perform low-light enhancement on the image to be processed to obtain a light-enhanced image; A pixel fusion module, used for fusing pixels of the illumination enhanced image and the color corrected image to obtain a fused image; A white balance and low light enhancement module, used to perform white balance and low light enhancement on the fused image to obtain an image to be segmented; An instance segmentation module is used to perform instance segmentation on the image to be segmented by using a Dfe-Mask Transfiner model to obtain a crab shell image; wherein the Dfe-Mask Transfiner model is obtained by improving the Mask Transfiner model on the basis of the Mask Transfiner model; the improvements to the Mask Transfiner model include: first, adding a deformable large core attention mechanism module to the backbone network of the Mask Transfiner model, then, in FPN feature fusion, modifying the input and output of FPN, re-fusing the P5 output features of FPN down-sampled with the output features of P4 down-sampled, and using them as the input features of P4 up-sampling, re-fusing the P4 output features of FPN down-sampled with the output features of P3 down-sampled, and using them as the input features of P3 up-sampling, finally, adding an EMA attention mechanism to the down-sampled P5 output layer of the FPN feature fusion layer, and adding a deformable large core attention mechanism to the down-sampled P6 output layer of the FPN feature fusion layer; A crab feature extraction module, used for obtaining crab features according to the crab shell image; the crab features include the length of the crab shell, the width of the crab shell, the circumference of the crab shell and the mean of three RGB color channels of the RGB image of the crab shell; The crab mass estimation module is used to input the crab features into the trained XGBoost model to obtain the crab mass output by the trained XGBoost model; the trained XGBoost model is trained using multiple crab feature samples and the crab mass corresponding to each of the crab feature samples.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the nonlinear estimation method for underwater crab mass according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the nonlinear estimation method for underwater crab mass according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the nonlinear estimation method for underwater crab mass according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Eriocheir sinensis quality estimation method based on unmanned aerial vehicle image processing

    CN112417378A

  • Transform-based optical remote sensing target detection method

    CN114821357A

  • Scene image semantic segmentation method based on transform structure

    CN117315241A

  • Image instance segmentation method based on enhanced one-time aggregation network

    CN117422876A

  • Small tampering region positioning method based on multi-information guidance and progressive mask Transform

    CN117876704A