Full-automatic sea cucumber high-throughput growth character measurement and prediction device and method

By designing a fully automatic high-throughput growth trait measurement and prediction device for sea cucumber, the improved YOLOv8-seacucumber visual recognition model and multi-module work together, the problem of automated measurement and prediction in sea cucumber breeding is solved, and the rapid and accurate sea cucumber identification and growth trait measurement is achieved, which improves detection efficiency and sea cucumber health.

CN119762265AActive Publication Date: 2025-04-04INST OF OCEANOLOGY - CHINESE ACAD OF SCI
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

During the sea cucumber breeding process, it is difficult for the existing technology to achieve automated and high-speed measurement and prediction of sea cucumber growth traits, which leads to time-consuming and labor-intensive and affects sea cucumber health.

Method used

A fully automatic high-throughput growth trait measurement and prediction device for sea cucumber is designed, and the improved YOLOv8-seacucumber visual recognition model is used to identify sea cucumbers. Combined with the image acquisition module, ranging module, image recognition module, data processing module and prediction module, the automatic identification, measurement and prediction of sea cucumbers are realized.

Benefits of technology

It realizes rapid and accurate identification of sea cucumbers and automatic measurement and prediction of growth traits, significantly reduces calculation intensity, improves detection efficiency, reduces physical damage to sea cucumbers, and ensures the healthy growth of sea cucumbers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119762265A_ABST
    Figure CN119762265A_ABST
Patent Text Reader

Abstract

The invention provides a full-automatic sea cucumber high-throughput growth character measurement and prediction device and method, and the method comprises the steps: obtaining an image containing a sea cucumber target through an image collection module which is installed on a walking unit in a support, and recognizing the sea cucumber target through an image recognition module through a pre-constructed visual recognition model; a recognition frame is drawn with the longest position and the widest position of the sea cucumber target edge as critical points, the data processing module calculates the actual size of the recognition frame, and the prediction model measures and predicts the sea cucumber target growth character data based on the relation between the actual size of the recognition frame and the sea cucumber growth character. A plurality of fitting models with the highest confidence coefficient larger than a threshold value are selected, the average value of the fitting models is calculated, measured data of the target length and width of the sea cucumbers and predicted data of the wet weight and the dry weight are obtained, and the target growth character data of the sea cucumbers in the recognition area can be automatically measured and predicted at a time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of sea cucumber breeding, and provides a fully automatic sea cucumber high-throughput growth trait measurement and prediction device and method. Background Art

[0002] Sea cucumber has become a valuable fishery resource due to its unique nutritional value and market demand. With the development of economy and the improvement of acceptance in the future, the demand of Chinese residents for sea cucumber products will further increase. In the process of sea cucumber cultivation, it is necessary to regularly evaluate the growth status and quantity of sea cucumbers to judge whether their growth status meets expectations. If abnormal conditions such as growth stagnation are found, measures such as adjusting feed formula and improving water quality can be taken in time to promote the normal growth of sea cucumbers. If sea cucumbers are counted and measured manually, it is time-consuming and labor-intensive, and has a great impact on sea cucumbers, which can easily cause stress reactions in sea cucumbers, and sea cucumbers will discharge their internal organs and affect their growth. Therefore, a device that can automatically measure the amount of sea cucumbers and their growth status is provided, which is of great significance to the sea cucumber cultivation industry. Summary of the invention

[0003] In order to solve the problems existing in the prior art, the present invention provides a fully automatic sea cucumber high-throughput growth trait measurement and prediction device, and provides a fully automatic sea cucumber high-throughput growth trait measurement and prediction method.

[0004] The present invention first provides a fully automatic high-throughput growth trait measurement and prediction device for sea cucumbers, comprising:

[0005] A bracket, wherein the bracket is arranged on the area to be measured, a linear guide rail is arranged in the bracket, and a walking unit movable along the linear guide rail is arranged in the linear guide rail;

[0006] An image acquisition module, wherein the image acquisition module is arranged on the walking unit, and a polarized lens is arranged on the lens of the image acquisition module, and is used to acquire an image containing a sea cucumber target;

[0007] A distance measuring module, which is arranged on the walking unit and is used to obtain the distance between the optical center of the image acquisition module and the plane where the sea cucumber target is located;

[0008] An image recognition module, wherein the image recognition module obtains an image containing a sea cucumber target, identifies the sea cucumber target using a pre-built visual recognition model, draws an identification frame with the longest and widest parts of the edge of the sea cucumber target as critical points, records the size of the identification frame, and sequentially sorts each identification frame in the identification area, and counts the total number of sea cucumber target individuals;

[0009] A data processing module, wherein the data processing module obtains the size of the identification frame and the distance from the image acquisition module to the plane where the sea cucumber target is located, and calculates the actual size of the identification frame based on the image acquisition module parameters;

[0010] A prediction module, wherein the prediction module obtains the actual size of the identification frame, uses a pre-built prediction model to take the actual size of the sea cucumber target identification frame as a prediction parameter, selects multiple fitting models with the highest confidence and a confidence greater than a threshold, and calculates the average value of the fitting models to obtain the measurement data of the sea cucumber target length and width and the prediction data of the wet weight and dry weight.

[0011] Specifically, a first motor is arranged on the linear guide rail, and the first motor drives the walking unit to move. A steering device is also arranged in the walking unit, and a second motor for driving the steering device to rotate is arranged in the steering device. The image acquisition module and the ranging module are arranged in the steering device.

[0012] The present invention also provides a fully automatic high-throughput growth trait measurement and prediction method for sea cucumbers, comprising:

[0013] The calibrated image acquisition module captures an image containing a sea cucumber target;

[0014] The pre-built visual recognition model recognizes the sea cucumber target image, draws a recognition frame with the longest and widest parts of the edge of the sea cucumber target as critical points, and records the size of the recognition frame;

[0015] Obtain the distance from the image acquisition module to the plane where the sea cucumber target is located, and calculate the actual size of the identification frame based on the image acquisition module parameters, and sort each identification frame in turn to count the total number of sea cucumber target individuals;

[0016] The actual size of the identification frame is loaded as a prediction parameter into a pre-constructed prediction model. The prediction model measures and predicts the target growth trait data of the sea cucumber based on the relationship between the actual size of the identification frame and the growth traits of the sea cucumber. A plurality of fitting models with the highest confidence and a confidence greater than a threshold are selected, and the average value of the fitting models is calculated to obtain the measurement data of the target length and width of the sea cucumber and the prediction data of the wet weight and dry weight.

[0017] Specifically, the actual size calculation method is as follows: based on the calibrated image acquisition module parameters, the recognition frame size and the distance from the image acquisition module to the plane where the sea cucumber target is located, the recognition frame size is converted into a first actual size of the recognition frame, and the second actual size of the recognition frame is calculated using a plane perspective, the error between the first actual size and the second actual size is verified, the recognition frame with an error value within the error threshold is obtained, and the first actual size and the second actual size are averaged to obtain the actual size of the recognition frame.

[0018] Specifically, the calculation formulas for the first actual size and the second actual size are:

[0019] The first actual size includes a first actual length and a first actual width. The calculation formula of the first actual length is:

[0020]

[0021] In the formula, l a is the first actual length, l is the camera sensor length, H is the shooting height, P la P is the number of pixels of the identification box length. l is the image length in pixels, f x is the calibrated x-axis focal length, μ1 is the first correction coefficient;

[0022] The calculation formula of the first actual width is:

[0023]

[0024] In the formula, w a is the first actual width, w is the camera sensor width, H is the shooting height, P wa P is the number of pixels of the recognition frame width. w is the image width in pixels, f y is the calibrated y-axis focal length;

[0025] The second actual size includes a second actual length and a second actual width. The calculation formula of the second actual length is:

[0026]

[0027] In the formula, l b is the second actual length, θ l is the calibrated horizontal viewing angle, μ2 is the second correction coefficient,

[0028] The calculation formula of the second actual width is,

[0029]

[0030] In the formula, w b is the second actual width, θ w is the calibrated vertical viewing angle.

[0031] Specifically, the image recognition module adopts an improved YOLOv8-seacucumber visual recognition model to identify sea cucumbers, identifies targets with confidence greater than a threshold as sea cucumber targets and draws an identification box, the YOLOv8-seacucumber visual recognition model includes an input end, a backbone network and a detection head, and on the basis of the original YOLOv8 visual recognition model, a C2f-F-SA module is used to replace the C2f module in the backbone network and the detection head, the C2f-F-SA module includes a convolutional layer, a segmentation layer, a plurality of FasterBlock structures, a connection layer and a convolutional layer arranged in sequence, the bottleneck layer in the original C2f module is replaced by a FasterBlock structure, and a Shuffle Attention mechanism is added to the FasterNet Block module; the Conv module of the detection head part is replaced by an Adown module.

[0032] Specifically, the Shuffle Attention mechanism includes an input end, a segmentation layer, an upper branch, a lower branch, a connection layer and an output end;

[0033] Input port input sea cucumber characteristics Figure X ∈R (C,H,W) , the sea cucumber feature map is divided into G groups according to the channel dimension, expressed as:

[0034] X=[X1,…,X G ], X k ∈R (C / G×H×W) ,

[0035] Where C is the number of channels of the sea cucumber feature map, H is the spatial height of the sea cucumber feature map, W is the spatial width of the sea cucumber feature map, R represents the set of all images in the dataset, and X k is the input feature;

[0036] The segmentation layer takes as input the feature X k Along the channel dimension, it is divided into upper branch X K1 With the lower branch X K2 , X K1 , X K2 ∈R (C / 2G×H×W) , the upper branch uses channel attention, and generates channel information S by scaling and shifting the transformation parameters w1, b1. First, global average pooling (GAP) is performed to embed global information to generate channel information S∈R (C / 2G×1×1) , the channel information is obtained by k1 It is calculated by shrinking in the spatial dimension H×W,

[0037]

[0038] Use the fully connected layer to transform the channel information S and apply the σ activation function (sigmoid) to generate the weight matrix and multiply it by X k1 , and get the weighted features Figure X ' k1 :

[0039] X′ k1 =σ(F C (S))·X k1 =σ(w1S+b1)·X k1 ,

[0040] Where w1∈R (C / 2G×1×1) , b1∈R (C / 2G×1×1) ;

[0041] The lower branch uses spatial attention to capture the spatial dependencies between features, scales and shifts the amount of spatial information by transforming parameters w2 and b2, and uses the group norm (GN) to generate statistics of spatial attention:

[0042] X′ k2 =σ(w2·GN(X k2 )+b2)·X k2 ,

[0043] Where w2∈R (C / 2G×1×1) , b2∈R (C / 2G×1×1) ;

[0044] The connection layer processes the X′ obtained by the upper and lower branches K1 and X′ K2 Combined, the output feature map has the same size as the input.

[0045] X′ k =[X′ k1, X′ k2 ]R (C / G×H×W) .

[0046] Specifically, the ADown module includes an input end, an average pooling layer, a segmentation layer, a first path, a second path, a connection layer, and an output end.

[0047] Input terminal input characteristics Figure X ∈R (C,H,W) , the average pooling layer takes the input feature Figure X The average pooling feature is obtained by performing an average pooling operation through an average pooling layer with a pooling kernel k of size 2, a step size s of 1, and no padding (p = 0). Figure X avg ,

[0048] X avg =Avgpool(X, k=2, s=1, p=0),

[0049] The segmentation layer will average the pooled features Figure X avg Split into two sub-features along the channel dimension Figure X 1 and X2, sub-features Figure X 1 and X2 are downsampled through the first path and the second path respectively to obtain feature maps Y1 and Y2.

[0050] The first path is,sub-feature Figure X 1 directly downsamples through a traditional convolutional layer to obtain the feature map Y1,

[0051] Y1=Conv1(X1, k=3, s=2, p=1);

[0052] The second path is,sub-feature Figure X 2 First, a maximum pooling layer with a pooling kernel size k of 3, a step size s of 2, and a padding p of 1 is used to extract the maximum value X2 in the local window and highlight the significant features. Subsequently, the feature map is further extracted and refined through a convolution layer with a convolution kernel size k of 1, a step size s of 1, and a padding p of 0 to obtain the feature map Y2.

[0053] X 2,max =MaxPool(X2, k=3, s=2, p=1),

[0054] Y2=Conv2(X 2,max , k=1, s=1, p=0),

[0055] Two learnable weight factors α and β are introduced in the connection layer. Through the training process optimization, the downsampling results are weighted fused. The weight factors α and β control the contribution of Y1 and Y2 in the fusion process respectively. The dimensions of the weight factors α and β are both 1×1×1. The feature map Y after weighted fusion is fusion for:

[0056] Y fusion =α·Y1+β·Y2,

[0057] In the formula, · represents element-by-element multiplication,

[0058] Normalize the weight factors α and β to ensure that their sum is 1.

[0059]

[0060]

[0061] The weighted fusion feature map is recalculated using the normalized weight factor:

[0062] Y fusion =αnorm ·Y1+β norm Y2,

[0063] From the output end, the weighted fused feature map Y fusion As output, its dimension is Where C' is the number of output channels.

[0064] Specifically, the YOLOv8-seacucumber visual recognition model construction method is to group sea cucumbers according to their regions and species, and perform sampling training, obtain photos of each sea cucumber under natural conditions with different shooting angles, different lighting and different backgrounds, and divide the pictures into a training set and a test set in proportion, manually use a bounding box to mark the sea cucumbers in the training set, use a convolutional neural network to perform model training on all marked sea cucumber image information, use a test set to test the model, manually review the training results, and obtain a visual recognition model.

[0065] Specifically, the prediction model construction method is: based on the marked sea cucumber images and sea cucumber growth trait data, the actual size of the identification box of the same variety of sea cucumbers in the same area is fitted with its growth trait data, and multiple regression models and machine learning are used to perform model training to obtain the prediction model.

[0066] Compared with the prior art, the present invention has the following beneficial effects:

[0067] The fully automatic high-throughput growth trait measurement and prediction device and method provided by the present invention use the improved YOLOv8-seacucumber visual recognition model to identify the sea cucumber target, draw the recognition frame with the longest and widest parts of the edge of the sea cucumber target as the critical points, and calculate the real size of the recognition frame based on the pixel size of the recognition frame. The real size of the recognition frame is used as the prediction parameter, and a pre-built prediction model is used to select multiple fitting models to obtain the measurement data of the length and width of the sea cucumber target and the prediction data of the wet weight and dry weight, thereby achieving the purpose of measuring and predicting the growth traits of the sea cucumber. And using the actual size of the recognition frame to predict the growth trait data can significantly reduce the calculation intensity and improve the detection efficiency;

[0068] The present invention adopts an improved YOLOv8-seacucumber visual recognition model to identify sea cucumbers. On the basis of the original YOLOv8 visual recognition model, a C2f-F-SA module is used to replace the C2f module in the backbone network and the detection head. The C2f-F-SA module includes a convolution layer, a segmentation layer FasterBlock structure, a connection layer and a convolution layer which are arranged in sequence. The bottleneck layer in the original C2f module is replaced by the FasterBlock structure to improve the feature extraction efficiency of the network, reduce the calculation complexity in the backbone network, thereby more effectively utilizing the computing resources of the device, and further improve the ability of the backbone network in spatial feature extraction. The invention can effectively extract the key features of the sea cucumber in the image, enhance the model's perception ability of the input sea cucumber spatial features, and reduce the amount of calculation and improve the detection speed, thereby improving the overall performance of the model in the sea cucumber image feature extraction task. The Shuffle Attention mechanism is added to the FasterNet Block module, and the convolutional layer of the detection head is replaced with the Adown module to prevent potential information loss during the downsampling process and improve the model's sensitivity to detail features. At the same time, a weight factor learning mechanism is introduced to achieve more refined downsampling result fusion. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 It is a schematic diagram of the overall structure of the present invention;

[0070] Figure 2 This is a schematic diagram of the use state of the present invention;

[0071] Figure 3 It is a flow chart of the present invention;

[0072] Figure 4 Determine the chessboard pattern for the present invention;

[0073] Figure 5 It is a structural block diagram of the YOLOv8-seacucumber visual recognition model of the present invention;

[0074] Figure 6 It is a structural block diagram of the C2f-F-SA module of the present invention;

[0075] Figure 7 It is a structural block diagram of the FasterNet Block structure of the present invention;

[0076] Figure 8 This is a structural diagram of the Shuffle Attention mechanism of the present invention;

[0077] Fig. 9 It is a structural block diagram of the ADown module of the present invention;

[0078] Fig.10 This is the recognition effect diagram of the YOLOv8-seacucumber visual recognition model of the present invention;

[0079] Fig.11 It is the fitting model of the sea cucumber mass and the length and width of the identification frame of the present invention. DETAILED DESCRIPTION

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

[0081] like Figure 1 and Figure 2 As shown, the present invention first provides a fully automatic sea cucumber high-throughput growth trait measurement and prediction device, including a bracket 1, an image acquisition module, a ranging module and a host 7, which is suitable for use in a sea cucumber breeding pond 10, and measures and predicts the growth trait data of sea cucumbers by taking sea cucumber images based on a prediction model.

[0082] The support 1 is a detachable and retractable support, which is set up in the sea cucumber culture pond 10, and includes a support leg and a detachable linear guide rail 2 installed on the support leg, and a walking unit 3 is arranged in the linear guide rail 2. The support leg is a telescopic structure, and the height of the support 1 can be adjusted according to the water depth in the sea cucumber culture pond 10, and the height of the support 1 is fixed by a pin. The support 1 adopts a detachable design, which is easy to store when not in use, and can be used after being assembled when in use.

[0083] A first motor 4 is provided on one side of the linear guide rail 2, and the first motor 4 drives the walking unit 3 to move along the linear guide rail 2. An image acquisition module and a distance measurement module are provided in the walking unit 3. Usually, the environment of the sea cucumber breeding pond 10 is relatively dim, and a fill light is also provided in the walking unit 3 to improve the image clarity.

[0084] The image acquisition module is a camera 5, which captures images containing sea cucumber targets. A polarizer is provided on the lens of the camera 5 to eliminate reflected light from the water surface and improve the clarity of the image. The distance measurement module is a laser rangefinder 6, which is used to obtain the distance between the optical center of the image acquisition module and the plane where the sea cucumber target is located. The laser beam emitted by the laser rangefinder 6 will reflect part of the echo when it reaches the water surface, and will reflect part of the echo when it reaches the bottom of the water. The distance from the laser rangefinder 6 to the water surface and the water depth are calculated based on the time of measuring the two laser echoes, thereby obtaining the distance from the laser rangefinder 6 to the plane where the sea cucumber target is located.

[0085] Before shooting, the camera is calibrated using Zhang's Calibration Method to obtain the actual external parameters and actual internal parameters of the camera. The actual internal parameters of the camera include the camera sensor length, camera sensor width, image length pixel number, image width pixel number, focal length, and distortion coefficient. The actual external parameters of the camera include: horizontal viewing angle and vertical viewing angle. The specific steps of camera calibration are:

[0086] 1. Prepare the calibration plate:

[0087] A high-precision checkerboard pattern of known size is used. Figure 4 As shown, the checkerboard pattern is black and white, with each square being a square block of actual size.

[0088] 2. Collect calibration images:

[0089] Fix the camera in one position and make sure it does not move during the entire calibration process. Change the position and angle of the calibration plate and take multiple images from different viewing angles. Take at least 10 images to get more accurate results.

[0090] During the shooting process, ensure that different parts of the chessboard are in the camera's field of view; ensure that the calibration plate is shot at different angles and distances to increase diversity and obtain rich projection information; ensure that there is no obvious blur or distortion in the image, keep it clear, and the corners are clearly visible.

[0091] 3. Extract chessboard corner points:

[0092] In the captured image, the checkerboard corner point extraction algorithm in OpenCV is used to extract the inner corner points of the checkerboard in each image (that is, the four corner points of each small square). The position of the corner point of each checkerboard is used as the input data for calibration. These corner points will be used as the geometric relationship data between the camera and the calibration plate. The extraction steps are as follows:

[0093] (1) Corner detection: Use the corner detection algorithm, i.e. cv::findChessboardCorners in OpenCV, to automatically identify the corners of the chessboard from the image;

[0094] (2) Sub-pixel corner positioning: To improve accuracy, the cv::cornerSubPix function in OpenCV is used to accurately locate corners at the sub-pixel level;

[0095] (3) Storing corner point coordinates: The corner points of each image need to be saved and converted into two-dimensional coordinates in the image coordinate system.

[0096] 4. Construct the calibration matrix:

[0097] Convert the corner point coordinates detected in each image into coordinates in the world coordinate system, and construct the camera's intrinsic parameter matrix (including parameters such as focal length and principal point) and extrinsic parameter matrix (including rotation and translation vectors);

[0098] The mathematical model of Zhang's calibration is:

[0099] Assume that point P in the world coordinate system w =(X, Y, Z) T , point P in the camera coordinate system c =(X′, Y′, Z′) T , whose coordinates projected onto the image plane are p = (x, y) T Transformed by the camera projection matrix P:

[0100]

[0101] Where K is the camera's intrinsic matrix, [R|t] is the camera's extrinsic matrix, where R is the rotation matrix, t is the translation vector, and (x, y) is the image coordinate;

[0102] The relationship between image coordinates (x, y) and normalized coordinates (x', y') is:

[0103]

[0104] Where (c x , c y ) is the principal point coordinate, f x and f y is the focal length in the x and y directions;

[0105] The distortion model is:

[0106] x distorrted =x′(1+k1r 2 +k2r 4 +k3r 6 )+2p1x'y′+p2(r 2 +2x′ 2 ),

[0107] y distorted =y′(1+k1r 2 +k2r 4 +k3r 6 )+p1(r 2 +2y′ 2 )+2p2x′y′,

[0108] where r 2 = x′ 2 +y′ 2, k1, k2, k3 are radial distortion coefficients, p1, p2 are tangential distortion coefficients;

[0109] The reprojection error is:

[0110]

[0111] where p i is the observation point in the image, P i is a point in the world coordinate system, K is the intrinsic parameter matrix, R i and t i is the external parameter matrix of the i-th image;

[0112] During the calibration process, the Levenberg-Marquardt algorithm is used to minimize the error between the actual corner points and the reprojected points on each image, and the internal and external parameters of the camera are estimated. Then, the internal and external parameters are iteratively optimized and continuously adjusted to minimize the overall reprojection error.

[0113] 5. Calculate camera parameters:

[0114] After the calibration is completed, the following important parameters are obtained:

[0115] Camera intrinsic parameter matrix (Ihtrinsic Parameters):

[0116]

[0117] c x and c y are the principal point coordinates, usually close to the center of the image;

[0118] Distortion Coefficients: including radial distortion coefficients (k1, k2, k3) and tangential distortion coefficients (P1, P2);

[0119] Camera extrinsic parameters: includes the rotation matrix R and translation vector t of each image, which are used to transform points in the world coordinate system to the camera coordinate system;

[0120] Reprojection Error: It indicates the error between the theoretical projection and the corner point position in the actual image.

[0121] Correction coefficient: including the first correction coefficient μ1 and the second correction coefficient μ2, which correct the error between the calculated size and the actual size;

[0122] The horizontal and vertical viewing angles of the camera are calculated using the focal length and image resolution in the intrinsic parameter matrix.

[0123] 6. Reprojection error analysis and result verification:

[0124] Using the obtained camera parameters, the corner point coordinates in the world coordinate system are projected back to the image plane, and the error between the reprojected points and the actually detected corner points is calculated to evaluate the accuracy of the calibration. Finally, the calibration result is verified by placing the calibration plate in a known position and using the parameters obtained by calibration to reconstruct its position in three-dimensional space.

[0125] A steering device may also be provided in the walking unit 3, so that the camera 5 and the laser rangefinder 6 installed in the walking unit 3 are turned 90 degrees along the length direction of the linear guide rail 2 to shoot the sea cucumbers attached to the pool wall of the sea cucumber culture pool 10. The steering device includes a fixing frame and a second motor 8 installed outside the fixing frame, and a steering plate 9 is provided on the output shaft of the second motor 8. The camera 5, the laser rangefinder 6 and the fill light are arranged on the lower side of the steering plate 9, and the host 7 is arranged on the upper side of the steering plate 9. The second motor 8 can rotate clockwise or counterclockwise, so that the steering plate 9 faces the water surface or the side walls on both sides of the sea cucumber culture pool 10, respectively, to measure the distance and shoot the sea cucumbers attached to the bottom of the pool and the pool walls on both sides.

[0126] The host 7 includes an image recognition module, a data processing module and a prediction module, and the host 7 is communicatively connected with the image acquisition unit and the distance measurement unit.

[0127] The image recognition module obtains images containing sea cucumber targets and uses a pre-built visual recognition model to identify the sea cucumber targets. Sea cucumbers with the same feature points in consecutive images are recorded only once.

[0128] like Figure 5 As shown, the image recognition module uses an improved YOLOv8-seacucumber visual recognition model to identify sea cucumbers and draw an identification frame. The improved YOLOv8-seacucumber visual recognition model includes an input terminal (Input), a backbone network (Backbone) and a detection head (Head). The present invention uses the FasterNet Block module to replace the Bottleneck module in C2f to obtain a C2f-F (C2f-Faster) structure, and adds a ShuffleAttention (SA) attention mechanism in the FasterNet Block module, designs a new C2f-F-SA (C2f-Faster-ShuffleAttention) structure, and replaces the C2f structure in the traditional YOLOv8 visual recognition model with this structure; and replaces all the Conv modules of the Head part in the YOLOv8 visual recognition model with Adown modules. Provides strong technical support for the rapid and accurate identification of sea cucumbers.

[0129] like Figure 6 As shown in the figure, the C2f-F-SA module includes a convolutional layer (Conv), a segmentation layer (Split), multiple FasterBlock structures, a connection layer (Concat) and a convolutional layer (Conv) arranged in sequence. The convolutional layer extracts the features of the input data, and the features are divided into multiple branches through the segmentation layer. Each branch further extracts features and fuses information through a FasterBlock structure composed of multiple sub-FasterBlock structures, which are spliced ​​together through the connection layer, and finally the final feature fusion and output are performed through the convolutional layer.

[0130] The traditional C2f structure consists of a series of bottleneck layers, which are responsible for extracting and enhancing local features. In this technical solution, the bottleneck layer structure in the YOLOv8 model is replaced with the FasterBlock structure to improve the feature extraction efficiency of the network. This replacement strategy aims to reduce the computational complexity in the backbone network, thereby more effectively utilizing device computing resources and further improving the backbone network's ability to extract spatial features. Through this replacement, the FasterBlock structure replaces the bottleneck layer structure in C2f, providing strong technical support for the rapid and accurate identification of sea cucumbers.

[0131] The specific steps for replacing the bottleneck layer structure are:

[0132] Step 1: Identification and positioning

[0133] First, we conduct an in-depth analysis of the C2f module of the YOLOv8 model to accurately locate the existing bottleneck layer and prepare for the subsequent replacement process;

[0134] Step 2: Replacement and Integration

[0135] (1) Removal operations, gradually removing the existing bottleneck layers in the C2f module to free up space for the integration of the new FasterBlock;

[0136] (2) Insertion operation: insert the FasterBlock structure into the C2f module according to the position order of the original bottleneck layer to ensure the coherence of the network structure;

[0137] (3) Dimension matching: To ensure the compatibility of FasterBlock with the original network architecture, the input and output dimensions of FasterBlock are adjusted. This process includes adding or removing 1x1 convolutional layers (linear layers) when necessary to achieve dimensional consistency.

[0138] S3: Model reconstruction

[0139] After completing the integration of the FasterBlock structure, recompile the entire model to ensure that all network layers are connected correctly and that information flows smoothly in the model;

[0140] Step 4: Training and Optimization

[0141] The updated model structure is used for training, and during this process, the hyperparameters are carefully adjusted to optimize the performance indicators of the model. Through this series of training and optimization steps, it is ensured that the improved YOLOv8 model provided by the present invention shows excellent performance in the sea cucumber identification task.

[0142] When identifying sea cucumbers, some sea cucumbers account for a small proportion, resulting in an excessively high proportion of the image background. In order to more accurately and quickly identify small and medium-sized individual sea cucumbers, such as Figure 7 As shown in the figure, the SA attention mechanism (ShuffleAttention) is added to the C2f-F structure. When performing individual sea cucumber recognition, the SA attention mechanism can effectively extract the key features of sea cucumbers in the image. When identifying normal sea cucumbers and diseased sea cucumbers, it enhances the model's perception of the input sea cucumber spatial features, while reducing the amount of calculation and increasing the detection speed, thereby improving the overall performance of the model in the task of extracting sea cucumber image features.

[0143] like Figure 8 As shown in the figure, the SA attention mechanism includes an input end (Input), a segmentation layer (Split), an upper branch, a lower branch, a connection layer (Concat) and an output end (Output).

[0144] Input port input sea cucumber characteristics Figure X ∈R (C,H,W) , the sea cucumber feature map is divided into G groups according to the channel dimension, represented as X = [X1, ..., X G ], X k ∈R (C / G×H×W) , where C is the number of channels of the sea cucumber feature map, H is the spatial height of the sea cucumber feature map, W is the spatial width of the sea cucumber feature map, R represents the set of all images in the dataset, and X k is the input feature.

[0145] The segmentation layer takes as input the feature X k Along the channel dimension, it is divided into upper branch X K1 With the lower branch X K2 , X K1 , X K2 ∈R (C / 2G×H×W) , the upper branch uses channel attention to generate channel information S by scaling and shifting the transformation parameters w1, b1, and first performs global average pooling (GAP) to embed global information and generate channel information S∈R (C / 2G×1×1) , the channel information is obtained byk1 It is calculated by shrinking in the spatial dimension H×W,

[0146]

[0147] Use the fully connected layer to transform the channel information S and apply the σ activation function (sigmoid) to generate the weight matrix and multiply it by X k1 , and get the weighted features Figure X ' k1 :

[0148] X′ k1 =σ(F C (S))·X k1 =σ(w1S+b1)·X k1 ,

[0149] Where w1∈R (C / 2G×1×1) , b1∈R (C / 2G×1×1) ,

[0150] The mathematical expression of the σ activation function is:

[0151] Where z is the input of the function, which can be a scalar, vector, matrix, or higher-dimensional tensor;

[0152] The lower branch uses spatial attention to capture the spatial dependencies between features, scales and shifts the amount of spatial information by transforming parameters w2 and b2, and uses the group norm (GN) to generate statistics of spatial attention:

[0153] X′ k2 =σ(w2·GN(X k2 )+b2)·X k2 ,

[0154] Where w2∈R (C / 2G×1×1) , b2∈R (C / 2G×1×1) .

[0155] The connection layer processes the X′ obtained by the upper and lower branches K1 and X′ K2 Combined, the output feature map has the same size as the input.

[0156] X′ k =[X′ k1 , X′ k2 ]R (C / G×H×W) .

[0157] To address the challenges faced by the backbone network in performing the sea cucumber feature extraction task, an innovative ADown module is used to optimize the downsampling process. Traditional standard convolution downsampling reduces the spatial size of the feature map by increasing the step size. However, this method often leads to a significant reduction in the size of the feature map, so that the sea cucumber area that accounts for a small proportion of the original image may be mistakenly merged into the larger background area, resulting in the loss of key information. This information loss phenomenon makes the features of small sea cucumbers become blurred or diluted during the downsampling process, seriously affecting the model's ability to recognize these targets in subsequent layers.

[0158] like Fig. 9 As shown in the figure, the ADown downsampling method combines the advantages of average pooling (AvgPool2d) and maximum pooling (MaxPool2d), where average pooling is responsible for retaining global information, while maximum pooling emphasizes significant features. By performing convolution operations on the outputs of these two pooling methods respectively, the ADown module can effectively retain multi-level information, thereby preventing potential information loss during the downsampling process and improving the model's sensitivity to detail features. At the same time, a weight factor learning mechanism is introduced to achieve a more refined fusion of downsampling results.

[0159] By replacing the traditional ordinary downsampling convolutional layer with the downsampling Adown module, the model's ability to perceive the target is significantly improved, thereby improving the accuracy and reliability of sea cucumber detection. This innovative design provides a new solution for the field of sea cucumber feature extraction and detection, and has broad application prospects and practical value.

[0160] The ADown module includes an input terminal (Input), an average pooling layer (AvgPool2d), a segmentation layer (Split), a first path (cv1), a second path (cv2), a connection layer (Concat) and an output terminal.

[0161] Input terminal input characteristics Figure X ∈R (C,H,W) , the average pooling layer takes the input feature Figure X The average pooling feature is obtained by performing an average pooling operation through an average pooling layer with a pooling kernel k of size 2, a step size s of 1, and no padding (p = 0). Figure X avg ,

[0162] X avg =AvgpoolX, k=2, s=1, p=0).

[0163] The segmentation layer will average the pooled features Figure X avg Split into two sub-features along the channel dimension Figure X 1 and X2, sub-features Figure X1 and X2 are downsampled simultaneously through the first path and the second path respectively to obtain feature maps Y1 and Y2.

[0164] The first path is: sub-feature Figure X 1 directly downsamples through a traditional convolutional layer to obtain the feature map Y1,

[0165] Y1=Conv1(X1, k=3, s=2, p=1);

[0166] The second path is: sub-feature Figure X 2 First, a maximum pooling layer with a pooling kernel size k of 3, a step size s of 2, and a padding p of 1 is used to extract the maximum value X2 in the local window and highlight the significant features. Subsequently, the feature map is further extracted and refined through a convolution layer with a convolution kernel size k of 1, a step size s of 1, and a padding p of 0 to obtain the feature map Y2.

[0167] X 2,max =MaxPool(X2, k=3, s=2, p=1),

[0168] Y2=Conv2(X 2,max , k=1, s=1, p=0),

[0169] Two learnable weight factors α and β are introduced in the connection layer. Through the training process optimization, the downsampling results are weighted fused. The weight factors α and β control the contribution of Y1 and Y2 in the fusion process respectively. The dimensions of the weight factors α and β are both 1×1×1. The feature map Y after weighted fusion fusion for:

[0170] Y fusion =α·Y1+β·Y2,

[0171] where · represents element-wise multiplication.

[0172] Normalize the weight factors α and β to ensure that their sum is 1:

[0173]

[0174] The weighted fusion feature map is recalculated using the normalized weight factor:

[0175] Y fusion =α norm ·Y1+β norm ·Y2.

[0176] From the output end, the weighted fused feature map Y fusion As output, its dimension is Where C' is the number of output channels.

[0177] The construction method of the visual recognition model is as follows: grouping sea cucumbers according to their regions and species, and making the sizes of sea cucumbers in each group in a similar range, and the number of sea cucumbers in each group is not less than 100; obtaining photos of each sea cucumber under natural conditions with different shooting angles, different lighting and different backgrounds, the number of photos is not less than 1000, obtaining the growth trait data of each sea cucumber, the growth trait data including body length, body width, wet weight and dry weight, matching the sea cucumber images with their growth trait data, and constructing a data set; dividing the photographed pictures into training sets and test sets in proportion, manually using bounding boxes to annotate the sea cucumbers in the training set, training the model for all labeled sea cucumber image information through the YOLOv8-seacucumber visual recognition model, testing the model using the test set until the detection accuracy and detection speed of the model meet the requirements, and manually reviewing the training results; performing random tests on the trained model, and if the average accuracy (Average Accuracy) of the test results is not satisfactory, the training results will be compared with the training set. If the average precision (AP) of the confidence level is greater than the threshold, the visual recognition model is successfully trained, and the confidence level AP (IoU = 0.75) threshold is preferably 0.8. This visual recognition model can be used to identify sea cucumbers of the same species in the region. If the region where the sea cucumber is located or the species of the sea cucumber is changed, it is necessary to resample and repeat the above steps to re-establish the model. The YOLOv8-seacucumber visual recognition model identifies the possible sea cucumber targets in the image and calculates its confidence level. The targets with confidence levels greater than the threshold are identified as sea cucumber targets and marked in the figure. The confidence level threshold is preferably 0.9. The longest and widest points of the edge of the sea cucumber target are used as critical points to draw the recognition frame, and the recognition frame size is recorded. The size includes the number of pixels of the length and width of the recognition frame. Each recognition frame is sorted in turn, and the final sort value of the recognition frame is recorded as the total number of sea cucumber target individuals identified in this round.

[0178] Furthermore, the image recognition module is also provided with a sea cucumber disease recognition model, which monitors the health status of sea cucumbers based on sea cucumber images and can timely detect the disease risks of sea cucumbers. The sea cucumber disease library model is trained using photos of diseased sea cucumbers, and the pictures are divided into training sets and test sets in proportion. The disease conditions of sea cucumbers in the training set are manually annotated using bounding boxes. The model is trained on all annotated sea cucumber image information using the YOLOv8-seacucumber visual recognition model, and the model is tested using the test set until the detection accuracy and detection speed of the model meet the requirements, and the training results are manually reviewed. While identifying sea cucumbers, the sea cucumber disease recognition model is also used to identify the health status of sea cucumbers, and diseased or abnormal sea cucumbers are additionally marked and labeled with warning labels for easy individual distinction. Staff can take appropriate treatment measures based on the identification information of the health status of sea cucumbers to ensure the healthy growth of sea cucumbers.

[0179] The data processing module obtains the distance between the optical center of the camera and the shooting target measured by the laser rangefinder, and calculates the actual size of the recognition frame based on the calibrated camera parameters and the recognition frame size. The camera parameters include the camera sensor length, the camera sensor width, the number of pixels of the image length, the number of pixels of the image width, the focal length, the horizontal viewing angle, and the vertical viewing angle. The calculation of the actual size of the recognition frame includes converting the pixel size of the recognition frame into the first actual size of the recognition frame, and calculating the second actual size of the recognition frame using the plane viewing angle. The calculation results of the first actual size and the second actual size are mutually verified, the error between the first actual size and the second actual size is verified, and whether the first actual size is within the error threshold of the second actual size is calculated. The recognition frame with an error value within the error threshold is obtained, and the average of its first actual size and the second actual size is taken to obtain the actual size of the recognition frame. The error threshold is preferably 5%. The calculation formula for the first actual size and the second actual size is:

[0180] The first actual size includes a first actual length and a first actual width. The calculation formula of the first actual length is:

[0181]

[0182] In the formula, l a is the first actual length, l is the camera sensor length, H is the shooting height, P la P is the number of pixels of the identification box length. l is the image length in pixels, f x is the calibrated x-axis focal length, μ1 is the first correction coefficient, which corrects the error between the average calculated value and the actual measured value of the first actual size,

[0183]

[0184] The calculation formula for the first actual width is:

[0185]

[0186] In the formula, w a is the first actual width, w is the camera sensor width, P wa P is the number of pixels of the recognition frame width. w is the image width in pixels, f y is the calibrated y-axis focal length;

[0187] The second actual size includes a second actual length and a second actual width. The calculation formula of the second actual length is:

[0188]

[0189] In the formula, lb is the second actual length, θ l is the calibrated horizontal viewing angle, μ2 is the second correction coefficient, which corrects the error between the average calculated value and the actual measured value of the second actual size,

[0190]

[0191] The calculation formula for the second actual width is,

[0192]

[0193] In, w b is the second actual width, θ w is the calibrated vertical viewing angle.

[0194] If the first actual size and the second actual size are greater than the error threshold, the data information of the abnormal sea cucumber is recorded and a prompt is issued, and the abnormal sea cucumber data information is temporarily not recorded in the statistical results. The abnormal data is manually reviewed and the data is loaded into the statistical results after manual review. If the first actual size and the second actual size generally have a large error, it is usually because the camera shooting accuracy does not meet the use requirements, and the camera needs to be recalibrated.

[0195] The prediction model is used to measure and predict the growth status of the sea cucumber target based on the actual size of the recognition box. The prediction model is based on the labeled sea cucumber image and the sea cucumber growth trait data. The actual size of the recognition box of the same species of sea cucumber in the same area is fitted with its growth trait data, and the prediction model is obtained by model training using multiple regression models and machine learning. The method for constructing the prediction model is to use the image of the sea cucumber and its growth trait data as a data set, and use multiple regression models to train the data set based on the actual size of the recognition box in the sea cucumber image. The training models include multiple linear regression (Multiple Linear Regression), polynomial regression (Polynomial Regression), generalized linear models (Generalized Linear Models, GLM), decision tree regression (Decision TreeRegression), ridge regression (Ridge Regression), random forests (Random Forests) and support vector regression (Support Vector Regression, SVR), etc. The trained model is tested and the determination coefficient R is used. 2 Evaluate model performance, coefficient of determination R 2 It indicates the degree of explanation of the target variable by the variables explained by the regression model. The larger the determination coefficient is, the smaller the errors are, which means that the corresponding model is better. If the evaluation result R 2If it is greater than 0.9, the model is considered qualified.

[0196] The actual size of each sea cucumber target identification frame is loaded into the prediction model as a prediction parameter, and the growth state of the sea cucumber target is fitted and predicted. The prediction model selects multiple fitting models with the highest confidence and a confidence greater than a threshold, and the growth trait data of multiple fitting models that meet the requirements are averaged to obtain the measurement data of the length and width of a single sea cucumber target and the prediction data of the current wet weight and dry weight, and the predicted value is stored in the database to record the growth trait data of each sea cucumber. Specifically, the actual size of a target sea cucumber identification frame is obtained and loaded into the prediction model. The prediction model selects three fitting models with the highest confidence and a confidence greater than 0.9 according to the actual size of the sea cucumber target identification frame, which are the fitting models closest to the sea cucumber target, and the average value of these three fitting models is calculated to obtain the growth trait data of the target sea cucumber.

[0197] Sea cucumbers often present a twisted shape under the real growth state, and it is difficult to measure the real length, width and other information of sea cucumbers in the living state of sea cucumbers and under the state that does not affect the normal growth of sea cucumbers, and the dry weight of sea cucumbers cannot be measured, and the length and width of sea cucumbers calculated based on the twisted arc of sea cucumbers are also easily caused by the shrinkage of sea cucumbers themselves, which causes the calculation result and the real length of sea cucumbers to have a certain error. Therefore, the present invention takes into account the twisted state of sea cucumbers, even if sea cucumbers are in a twisted state, the length-width ratio of its identification frame changes, and the high confidence regression model established according to the growth property data of sea cucumbers fitted by the identification frame actual size can measure and predict the growth property data of sea cucumbers, and obtain the measured data of sea cucumber length and width and the predicted data of wet weight and dry weight. In addition, compared with calculating the real length of sea cucumbers, using the identification frame actual size to measure and predict the growth property data of sea cucumbers can significantly reduce the computing intensity and improve the detection efficiency.

[0198] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, 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 the present invention.

Claims

1. A fully automatic high-throughput growth trait measurement and prediction device for sea cucumbers, characterized in that: include: A bracket, wherein the bracket is arranged on the area to be measured, a linear guide rail is arranged in the bracket, and a walking unit movable along the linear guide rail is arranged in the linear guide rail; An image acquisition module, wherein the image acquisition module is arranged on the walking unit, and a polarized lens is arranged on the lens of the image acquisition module, and is used to acquire an image containing a sea cucumber target; A distance measuring module, which is arranged on the walking unit and is used to obtain the distance between the optical center of the image acquisition module and the plane where the sea cucumber target is located; An image recognition module, wherein the image recognition module obtains an image containing a sea cucumber target, identifies the sea cucumber target using a pre-built visual recognition model, draws an identification frame with the longest and widest parts of the edge of the sea cucumber target as critical points, records the size of the identification frame, and sequentially sorts each identification frame in the identification area, and counts the total number of sea cucumber target individuals; A data processing module, wherein the data processing module obtains the size of the identification frame and the distance from the image acquisition module to the plane where the sea cucumber target is located, and calculates the actual size of the identification frame based on the image acquisition module parameters; A prediction module, wherein the prediction module obtains the actual size of the identification frame, uses a pre-built prediction model to take the actual size of the sea cucumber target identification frame as a prediction parameter, selects multiple fitting models with the highest confidence and a confidence greater than a threshold, and calculates the average value of the fitting models to obtain the measurement data of the sea cucumber target length and width and the prediction data of the wet weight and dry weight.

2. The fully automatic sea cucumber high-throughput growth trait measurement and prediction device according to claim 1, characterized in that: A first motor is arranged on the linear guide rail, and the first motor drives the walking unit to move. A steering device is also arranged in the walking unit, and a second motor is arranged in the steering device to drive the steering device to rotate. The image acquisition module and the distance measurement module are arranged in the steering device.

3. A fully automatic high-throughput growth trait measurement and prediction method for sea cucumbers, characterized in that: include: The calibrated image acquisition module captures an image containing a sea cucumber target; The pre-built visual recognition model recognizes the sea cucumber target image, draws a recognition frame with the longest and widest parts of the edge of the sea cucumber target as critical points, and records the size of the recognition frame; Obtain the distance from the image acquisition module to the plane where the sea cucumber target is located, and calculate the actual size of the identification frame based on the image acquisition module parameters, and sort each identification frame in turn to count the total number of sea cucumber target individuals; The actual size of the identification frame is loaded as a prediction parameter into a pre-constructed prediction model. The prediction model measures and predicts the target growth trait data of the sea cucumber based on the relationship between the actual size of the identification frame and the growth traits of the sea cucumber. A plurality of fitting models with the highest confidence and a confidence greater than a threshold are selected, and the average value of the fitting models is calculated to obtain the measurement data of the target length and width of the sea cucumber and the prediction data of the wet weight and dry weight.

4. The fully automatic sea cucumber high-throughput growth trait measurement and prediction method according to claim 3, characterized in that: The actual size calculation method is as follows: based on the calibrated image acquisition module parameters, the recognition frame size and the distance from the image acquisition module to the plane where the sea cucumber target is located, the recognition frame size is converted into a first actual size of the recognition frame, and the second actual size of the recognition frame is calculated using a plane perspective, the error between the first actual size and the second actual size is verified, the recognition frame whose error value is within the error threshold is obtained, and the first actual size and the second actual size are averaged to obtain the actual size of the recognition frame.

5. The fully automatic sea cucumber high-throughput growth trait measurement and prediction method according to claim 4, characterized in that: The calculation formula for the first actual size and the second actual size is: The first actual size includes a first actual length and a first actual width. The calculation formula of the first actual length is: In the formula, l a is the first actual length, l is the camera sensor length, H is the shooting height, P la P is the number of pixels of the identification box length. l is the image length in pixels, f x is the calibrated x-axis focal length, μ1 is the first correction coefficient; The calculation formula of the first actual width is: In the formula, w a is the first actual width, w is the camera sensor width, H is the shooting height, P wa P is the number of pixels of the recognition frame width. w is the image width in pixels, f y is the calibrated y-axis focal length; The second actual size includes a second actual length and a second actual width. The calculation formula of the second actual length is: In the formula, l b is the second actual length, θ l is the calibrated horizontal viewing angle, μ2 is the second correction coefficient, The calculation formula of the second actual width is: In the formula, w b is the second actual width, θ w is the calibrated vertical viewing angle.

6. The fully automatic sea cucumber high-throughput growth trait measurement and prediction method according to claim 3, characterized in that: The image recognition module adopts an improved YOLOv8-seacucumber visual recognition model to identify sea cucumbers, identifies targets with confidence greater than a threshold as sea cucumber targets and draws an identification frame. The YOLOv8-seacucumber visual recognition model includes an input end, a backbone network and a detection head. On the basis of the original YOLOv8 visual recognition model, a C2f-F-SA module is used to replace the C2f module in the backbone network and the detection head. The C2f-F-SA module includes a convolutional layer, a segmentation layer, a plurality of FasterBlock structures, a connection layer and a convolutional layer arranged in sequence. The bottleneck layer in the original C2f module is replaced by a FasterBlock structure, and a Shuffle Attention mechanism is added to the FasterNet Block module; the Conv module of the detection head part is replaced by an Adown module.

7. The fully automatic sea cucumber high-throughput growth trait measurement and prediction method according to claim 6, characterized in that: The Shuffle Attention mechanism includes an input end, a segmentation layer, an upper branch, a lower branch, a connection layer and an output end; Input: sea cucumber feature map X∈R (C,H,W) , the sea cucumber feature map is divided into G groups according to the channel dimension, expressed as: X=[X1,…,X G ],X k ∈R (C / G×H×W) , Where C is the number of channels of the sea cucumber feature map, H is the spatial height of the sea cucumber feature map, W is the spatial width of the sea cucumber feature map, R represents the set of all images in the dataset, and X k is the input feature; The segmentation layer takes as input the feature X k Along the channel dimension, it is divided into upper branch X K1 With the lower branch X K2 , X K1 ,X K2 ∈R (C / 2G×H×W) , the upper branch uses channel attention, and generates channel information S by scaling and shifting the transformation parameters w1, b1. First, global average pooling (GAP) is performed to embed global information to generate channel information S∈R (C / 2G×1×1) , the channel information is obtained by k1 It is calculated by shrinking in the spatial dimension H×W, Use the fully connected layer to transform the channel information S and apply the σ activation function (sigmoid) to generate the weight matrix and multiply it by X k1 , get the weighted feature map X' k1 : X' k1 =σ(F C (S))·X k1 =σ(w1S+b1)·X k1 , Where w1∈R (C / 2G×1×1) , b1∈R (C / 2G×1×1) ; The lower branch uses spatial attention to capture the spatial dependencies between features, scales and shifts the amount of spatial information by transforming parameters w2, b2, and uses the group norm (GN) to generate statistics of spatial attention: X’ k2 =σ(w2·GN(X k2 )+b2)·X k2 , Where w2∈R (C / 2G×1×1) , b2∈R (C / 2G×1×1) ; The connection layer processes the X' obtained by the upper and lower branches K1 and X' K2 Combined, the output feature map has the same size as the input. X' k =[X' k1 ,X' k2 ]R (C / G×H×W) 。 8. The fully automatic sea cucumber high-throughput growth trait measurement and prediction method according to claim 6, characterized in that: The ADown module includes an input terminal, an average pooling layer, a segmentation layer, a first path, a second path, a connection layer, and an output terminal. Input feature map X∈R (C,H,W) , the average pooling layer performs an average pooling operation on the input feature map X through an average pooling layer with a pooling kernel k of size 2, a step size s of 1, and no padding (p = 0), and obtains the average pooling feature map X avg , X avg =Avgpool(X,k=2,s=1,p=0), The segmentation layer averages the pooled feature map X avg The sub-feature maps X1 and X2 are divided into two sub-feature maps X1 and X2 along the channel dimension. The sub-feature maps X1 and X2 are downsampled simultaneously through the first path and the second path respectively to obtain feature maps Y1 and Y2. The first path is that the sub-feature map X1 is directly downsampled through a traditional convolutional layer to obtain the feature map Y1. Y1=Conv1(X1,k=3,s=2,p=1); The second path is that the sub-feature map X2 first passes through a maximum pooling layer with a pooling kernel size k of 3, a step size s of 2, and a padding p of 1 to extract the maximum value X2 in the local window and highlight the significant features. Subsequently, the feature map passes through a convolution layer with a convolution kernel size k of 1, a step size s of 1, and a padding p of 0 to further extract and refine the features and obtain the feature map Y2. X 2,max =MaxPool(X2,k=3,s=2,p=1), Y2=Conv2(X 2,max ,k=1,s=1,p=0), Two learnable weight factors α and β are introduced in the connection layer. Through the training process optimization, the downsampling results are weighted fused. The weight factors α and β control the contribution of Y1 and Y2 in the fusion process respectively. The dimensions of the weight factors α and β are both 1×1×1. The feature map Y after weighted fusion is fusion for: Y fusion =α·Y1+β·Y2, In the formula, · represents element-by-element multiplication, Normalize the weight factors α and β to ensure that their sum is 1. The weighted fusion feature map is recalculated using the normalized weight factor: Y fusion =a norm ·Y1+β norm ·Y2, From the output end, the weighted fused feature map Y fusion As output, its dimension is Where C' is the number of output channels.

9. The fully automatic sea cucumber high-throughput growth trait measurement and prediction method according to claim 6, characterized in that: The YOLOv8-seacucumber visual recognition model construction method is to group sea cucumbers according to their regions and species, and perform sampling training, obtain photos of each sea cucumber under natural conditions with different shooting angles, different lighting and different backgrounds, and divide the pictures into a training set and a test set in proportion, manually use bounding boxes to annotate the sea cucumbers in the training set, use a convolutional neural network to perform model training on all labeled sea cucumber image information, use a test set to test the model, manually review the training results, and obtain a visual recognition model.

10. The fully automatic high-throughput growth trait measurement and prediction method of sea cucumber according to claim 3, characterized in that: The prediction model construction method is as follows: based on the marked sea cucumber images and sea cucumber growth trait data, the actual size of the identification frame of the same variety of sea cucumbers in the same area is fitted with its growth trait data, and a prediction model is obtained by model training using multiple regression models and machine learning.

Citation Information

Patent Citations

  • An underwater sea cucumber identification method and system

    CN109325504A

  • Method for labeling sea cucumber target detection result by using rotatable boundary frame

    CN109754362A

  • Holothurian size screening method adopting computer vision

    CN112077018A

  • Underwater sea cucumber detection method combined with image enhancement

    CN112465803A