YOLO-based scylla paramamosain phenotype parameter calculation method

Through the phenotypic parameter calculation method of phonomic blue crab based on YOLO, the image acquisition and improved YOLOv11-DSPF model are used for contactless key point detection and weight prediction, which solves the problems of low efficiency and large error in traditional manual measurement, and realizes high-precision and rapid measurement of phenotype parameters of blue crab, and promotes the intelligent development of aquaculture industry.

CN120279460APending Publication Date: 2025-07-08EAST CHINA SEA FISHERIES RES INST CHINESE ACAD OF FISHERY SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510341445.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

The traditional method of artificially measuring the phenotypic parameters of the phonological blue crab is inefficient and is easily subjectively influenced by the operator. The stress response of living blue crabs leads to large measurement errors, making it difficult to meet the efficient measurement needs in large-scale breeding scenarios.

Method used

Using the phenotypic parameter calculation method based on YOLO, the contactless measurement of the key point position of the blue crab is achieved through image acquisition, key point detection model training and prediction, combined with the support vector regression model to predict weight, and the improved YOLOv11-DSPF model is used for multi-scale feature fusion and dynamic upsampling to improve the accuracy of edge key point positioning.

Benefits of technology

It realizes high-precision automated measurement of phenotypic parameters of blue crab, significantly improves data acquisition efficiency, and controls errors within the millimeter level. It is suitable for aquaculture management and scientific research, and promotes the transformation of the aquaculture industry to precision and intelligence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120279460A_ABST
    Figure CN120279460A_ABST
Patent Text Reader

Abstract

The invention relates to a YOLO-based scylla paramamosain phenotype parameter calculation method, which comprises the following steps of: acquiring multi-angle images of scylla paramamosain to obtain a scylla paramamosain image data set; training a YOLO model which is based on a point sampling method and introduces secondary pooling mechanism fusion through the marked blue crab image data set to obtain a blue crab key point detection model; performing key point prediction on a target blue crab image based on the blue crab key point detection model to obtain position coordinates of key points on blue crab shells; according to the position coordinates of the key points, phenotypic parameters of the blue crabs are calculated, and parameter results are obtained. According to the method, the feature extraction capability of the key points at the edge of the blue crab carapace is enhanced, and the data acquisition and processing efficiency and accuracy of aquaculture are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of morphological measurement of aquatic products, and particularly relates to a method for calculating phenotypic parameters of Scylla paramamosain based on YOLO. Background Art

[0002] As an important marine aquaculture crab, Scylla paramamosain is an important protein source in aquatic products. In the huge aquatic consumption market, it has extremely high economic value. For the species of Scylla paramamosain, individual size and weight, as core phenotypic parameters, are key biological indicators for analyzing its growth and metabolism laws and evaluating population dynamic characteristics, and are also important factors determining its quality. Therefore, constructing an efficient and accurate morphological measurement system for Scylla paramamosain has multi-dimensional application value.

[0003] Traditional collection of aquatic organism size parameters mainly relies on manual measurement methods, using tools such as vernier calipers and electronic balances for contact measurement. This method has significant limitations: First, crustaceans have morphological characteristics such as strong leg extensibility and irregular carapaces, and the positioning of key size definition points (such as the width of the cephalothorax and the distance between the bases of the chelipeds) is easily affected by the subjective judgment of the operator; Second, the stress response of live Scylla paramamosain will cause limb contraction, and static measurement is difficult to reflect the true biomass; Third, in the large-scale aquaculture scenario, the measurement requirements for thousands of individuals need to be processed daily, and the efficiency bottleneck of the manual method is prominent. Summary of the Invention

[0004] In view of the above deficiencies of the prior art, the purpose of the invention is to provide a method for calculating phenotypic parameters of Scylla paramamosain based on YOLO.

[0005] The present invention provides a method for calculating phenotypic parameters of Scylla paramamosain based on YOLO, including:

[0006] S1: Collect multi-angle images of Scylla paramamosain to obtain a Scylla paramamosain image dataset;

[0007] S2: Through the labeled Scylla paramamosain image dataset, train a YOLO model based on the point sampling method and the introduction of a secondary pooling mechanism fusion to obtain a Scylla paramamosain key point detection model;

[0008] S3: Based on the Scylla paramamosain key point detection model, predict the key points of the target Scylla paramamosain image to obtain the position coordinates of the key points on the Scylla paramamosain carapace;

[0009] S4: Calculate the phenotypic parameters of Scylla paramamosain according to the position coordinates of the key points to obtain the parameter results.

[0010] According to the method for calculating phenotypic parameters of Scylla paramamosain based on YOLO provided by the present invention, step S1 further includes:

[0011] S11: Collect video data including different postures of Scylla paramamosain;

[0012] S12: Intercept the video data according to a preset interval to obtain multiple pieces of image data;

[0013] S13: Perform key point annotation on the multiple pieces of image data to obtain a mud crab image dataset.

[0014] According to a mud crab phenotypic parameter calculation method based on YOLO provided by the present invention, the key points annotated in step S13 include:

[0015] The front endpoint of the carapace, the rear endpoint of the carapace, the leftmost point of the carapace, the rightmost point of the carapace, the left inner point of the carapace, the right inner point of the carapace, the left point of the eighth tooth, the right point of the eighth tooth, the left point of the first lateral tooth, the right point of the first lateral tooth, the left point of the second lateral tooth, and the right point of the second lateral tooth.

[0016] According to a mud crab phenotypic parameter calculation method based on YOLO provided by the present invention, the YOLO model in S2 is the YOLOv11 model.

[0017] According to a mud crab phenotypic parameter calculation method based on YOLO provided by the present invention, step S2 further includes:

[0018] S21: Receive the input mud crab image dataset to obtain an initial feature map;

[0019] S22: Perform multi-layer convolution on the initial feature map through a backbone network to obtain a basic feature map of the mud crab image;

[0020] S23: At the end of the backbone network, process the basic feature map through a multi-scale fusion module based on a secondary pooling mechanism to obtain a SPPF-MP2 output feature;

[0021] S24: Send the SPPF-MP2 output feature after spatial attention processing into a Neck network to obtain a multi-scale feature pyramid structure;

[0022] S25: Send the multi-level features output by the Neck network into a Head detection head, perform feature enhancement through multiple SPPF modules, and map to the key point coordinate space by using a fully connected layer to obtain the position prediction of multiple key points on the mud crab carapace;

[0023] S26: Optimize the loss function according to the position difference between the predicted key point positions and the true annotated key point positions to obtain a mud crab key point detection model.

[0024] According to a mud crab phenotypic parameter calculation method based on YOLO provided by the present invention, step S23 further includes:

[0025] S231: Perform a pooling operation on the basic feature map to obtain a first-level pooled feature;

[0026] S232: Concatenate the basic feature map and the first-level pooled feature in the channel dimension through a connection layer to obtain a first-level fused feature;

[0027] S233: Perform a second pooling operation on the first-level fused feature to obtain a second-level pooled feature;

[0028] S234: Concatenate the first-level fused feature and the second-level pooled feature in the channel dimension through a connection layer to obtain a second-level fused feature;

[0029] S235: Perform a third pooling operation on the second-level fused feature to obtain a third-level pooled feature;

[0030] S236: Concatenate the second-level fused feature and the third-level pooled feature in the channel dimension through a connection layer to obtain a multi-scale fused feature;

[0031] S237: Compress the channels of the multi-scale fused feature through a convolution operation to obtain the SPPF-MP2 output feature.

[0032] According to a method for calculating the phenotypic parameters of Scylla paramamosain based on YOLO provided by the present invention, step S24 further includes:

[0033] S241: Extract features from the SPPF-MP2 output feature after spatial attention processing to obtain a multi-scale hierarchical feature map;

[0034] S242: Fuse the hierarchical feature maps of different scales through a connection layer to obtain a fused feature map;

[0035] S243: Upsample the fused feature map through a point sampling method using a point resampling strategy, and combine the shallow features and the deep features through skip connections to construct a multi-scale feature pyramid structure.

[0036] According to a method for calculating the phenotypic parameters of Scylla paramamosain based on YOLO provided by the present invention, step S4 further includes:

[0037] S41: Calculate the first pixel distance between key point pairs according to the position coordinates of the key points;

[0038] S42: Obtain the second pixel distance of the calibrated color block and the true size of the calibrated color block;

[0039] S43: Based on the equal ratio mapping method, calculate the predicted size of the Scylla paramamosain through the first pixel distance, the second pixel distance, and the true size;

[0040] S44: Predict the weight of the mud crab based on the predicted size of the mud crab to obtain the predicted weight of the mud crab;

[0041] S45: Output the predicted size and the predicted weight of the mud crab to obtain the parameter result.

[0042] According to a method for calculating phenotypic parameters of Scylla paramamosain based on YOLO provided by the present invention, the expression of the predicted size of the mud crab in step S43 is:

[0043]

[0044] where L is the predicted size of the mud crab, L1 is the pixel distance between the key point pairs of the target size, L2 is the pixel distance between the key point pairs of the calibrated color block, and r is the true size of the calibrated color block.

[0045] According to a method for calculating phenotypic parameters of Scylla paramamosain based on YOLO provided by the present invention, step S44 further includes:

[0046] S441: Screen out the carapace size parameter with the strongest correlation with the mud crab weight through Pearson correlation coefficient analysis to obtain the correlation parameter;

[0047] S442: Use the measured size of the mud crab based on the correlation parameter as the input feature and the measured weight of the mud crab as the target feature to perform fitting training on the regression model;

[0048] S443: Evaluate the model performance through root mean square error, mean absolute error, root mean square coefficient, and maximum absolute error indicators to obtain the optimal fitting model;

[0049] S444: Predict the weight of the mud crab based on the predicted size of the mud crab through the optimal fitting model to obtain the predicted weight of the mud crab.

[0050] A method for calculating phenotypic parameters of Scylla paramamosain based on YOLO provided by the present invention realizes high-precision automatic measurement of the morphological parameters of mud crabs by introducing an improved YOLOv11-DSPF model, bringing significant technological progress and application value.

[0051] First, the present invention uses an image acquisition device to obtain multi-angle images of Scylla paramamosain to construct a dataset, breaking through the efficiency bottleneck of traditional manual measurement methods, compressing the measurement time from several minutes of manual measurement to the millisecond level, and greatly improving the data acquisition efficiency of aquaculture and scientific research work. Secondly, the core of the present invention lies in the innovative integration of the SPPF-MP2 multi-scale fusion module and the Dysample dynamic upsampling module. By constructing a local-global-local hierarchical perception system through a multi-level pooling strategy respectively, it effectively enhances the feature extraction ability of the key points on the edge of the Scylla paramamosain carapace, and uses a point resampling strategy to replace the traditional kernel-based upsampling method, which reduces the computational burden while maintaining the spatial geometric consistency of the feature map. The synergistic effect of the two makes the model achieve a significant improvement in prediction performance, especially in dealing with the edge positioning problem under the interference of the reflective texture of the Scylla paramamosain carapace.

[0052] In view of the characteristic that the key points of the Scylla paramamosain carapace are concentrated in the edge area, the present invention proposes a dual-module collaborative mechanism: SPPF-MP2 enhances the response intensity of the edge area through multi-scale feature fusion, and Dysample ensures the undistorted spatial details through lightweight dynamic sampling. The algorithm optimization strategy for specific application fields greatly improves the applicability and accuracy of the model in measuring the phenotypic parameters of Scylla paramamosain.

[0053] The present invention calculates the size parameters of the Scylla paramamosain cephalothorax based on the key point position coordinates obtained by the improved model prediction. Among them, the average error of the core length and width dimensions is relatively low, and the absolute error of micro-scale parameters such as the side tooth spacing is also controlled within the millimeter-level accuracy range, fully meeting the actual needs of aquaculture grading and market transactions.

[0054] The non-contact visual measurement technology implemented by the present invention is not only applicable to the aquaculture management of Scylla paramamosain, but also opens up a new method dimension for the phenomics research of crustaceans and even fish and other aquatic organisms, and has important engineering practice value for promoting the transformation of the aquaculture industry towards precision and intelligence. Especially in the context of the increasing fluctuations in the aquaculture environment caused by climate change, the technical means provided by the present invention for quickly obtaining the phenotypic data of aquatic organisms provides key support for evaluating the adaptability of euryhaline species. Description of the Drawings

[0055] The drawings are only for the purpose of showing specific embodiments and are not considered to be a limitation of the present invention. Throughout the drawings, the same reference numerals represent the same components. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings.

[0056] Figure 1 It is a flowchart of a method for calculating the phenotypic parameters of Scylla paramamosain based on YOLO provided by the embodiment of the present invention;

[0057] Figure 2 Schematic diagram of key points marked on the carapace of Scylla serrata provided by the embodiment of the present invention;

[0058] Figure 3 Schematic diagram of the SPPF-MP2 module structure provided by the embodiment of the present invention. Detailed implementation manners

[0059] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some, rather than all, of the embodiments of the present invention. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0060] In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessarily obscuring the concepts disclosed in the present invention.

[0061] In the description of the present invention, it should be noted that unless otherwise clearly defined and limited, the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. The terms "installation", "connection", "connection" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.

[0062] Here, the exemplary embodiments will be described in detail, and the examples are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. On the contrary, they are merely examples of methods and systems consistent with some aspects of the present invention as detailed in the appended claims.

[0063] The embodiments of the present invention will be described below with reference to the drawings.

[0064] As Figure 1 shown, the present invention provides a method for calculating the phenotypic parameters of Scylla paramamosain based on YOLO, including:

[0065] S1: Collect multi-angle images of Scylla paramamosain to obtain a Scylla paramamosain image dataset.

[0066] In a specific embodiment, first, a Scylla paramamosain is weighed using an electronic balance with an accuracy of 0.1 g, and each key dimension data is measured item by item using a vernier caliper with an accuracy of 0.01 mm to obtain standard values for model training and verification; subsequently, the Scylla paramamosain is placed in a specially designed photographing device for image collection. The photographing device includes an enclosed black box body, and four rows of supplementary light LED light strips are installed at the top of the box body. At the same time, a DJI action camera with 40 million pixels is installed at each of the top and bottom. The photographing resolution is 3840×2160, and the frame rate is 60 FPS. The main purpose of closed photographing is to avoid the interference of external light on the imaging quality. At the same time, the light can be manually controlled to enhance the image brightness and improve the data quality. During the photographing process, in order to enrich the data type and improve the model training effect, it is necessary to record the images of Scylla paramamosain in different postures and positions in the active state to ensure the diversity and representativeness of the dataset. Finally, multi-angle image data of 112 Scylla paramamosain of different genders are obtained in this embodiment.

[0067] Among them, step S1 further includes:

[0068] S11: Collect video data including different postures of Scylla paramamosain.

[0069] Specifically, first, each Scylla paramamosain is weighed using an electronic balance with an accuracy of 0.1 g, and its actual weight is recorded as the standard value for subsequent model training and verification. Then, each key dimension data is measured item by item using a vernier caliper with an accuracy of 0.01 mm, including 7 groups of key dimensions such as the length of the carapace, the width of the carapace, the inner width of the carapace, the width of the carapace at the eighth tooth, the distance between the first lateral teeth, the distance between the second lateral teeth, and the distance between the frontal marginal lateral teeth.

[0070] After completing the recording of basic data, the mud crabs are placed in a specially designed shooting device for video acquisition. The shooting device used includes an enclosed black box, with a 40-megapixel DJI action camera installed at each of the top and bottom ends of the box, and is equipped with four rows of supplementary lighting LED light strips to provide uniform lighting conditions. To avoid interference from external light affecting the imaging quality, a closed shooting method is adopted, and at the same time, the light intensity can be manually controlled to optimize the image brightness and contrast. During the shooting process, the different postures and positions of the mud crabs in the active state are mainly recorded. Each crab is recorded for about 5-7 minutes of video to ensure that sufficient diverse dynamic performances are captured. In this embodiment, high-definition video data of 112 mud crabs of different genders and body sizes are collected. The shooting resolution is 3840×2160, and the frame rate is 60FPS, providing rich original materials for subsequent data processing and model training.

[0071] S12: Intercept the video data at a preset interval to obtain multiple image data.

[0072] Specifically, in this embodiment, the 5-7 minutes of video recorded for each mud crab is systematically intercepted at a fixed time interval of 1000ms. The interval setting of the present invention takes into account both the time span of the mud crab posture change and the efficiency and storage capacity of data processing. Through this method, a large amount of image data is obtained from the video data of 112 mud crabs. Subsequently, these images are preliminarily screened to remove low-quality images such as blurred, uneven lighting, and incomplete mud crab postures, and images with high clarity, obvious features, and complete postures are retained. In particular, to enhance the diversity and representativeness of the dataset, pictures with large differences in the postures and positions of the mud crabs are mainly screened out to avoid a large number of redundant images with high similarity in the dataset. Through this series of processing and screening, 1020 high-quality mud crab images are finally obtained. These images cover the characteristic performances of the mud crabs at different angles and in different postures, providing a solid data foundation for subsequent key point annotation and model training, and ensuring the quality and diversity of the dataset, which is the key prerequisite for the success of model training.

[0073] S13: Perform key point annotation on multiple image data to obtain a mud crab image dataset.

[0074] In step S13, first, from the 1020 mud crab images obtained in step S12, the partial images to be predicted are extracted as the test set, and detailed key point annotation work is carried out on the remaining 960 images. The annotation work is performed using the open-source tool X-Anylabeling, and precise annotation is carried out for 12 key positions on the carapace of each mud crab. After the annotation is completed, the data set is divided into a training set, a validation set, and a test set according to the ratio of 7:2:1, that is, 672 images are used for training, 193 images are used for validation during the training process, and finally 95 images are used for the model test work after training. This scientific data set division method ensures the effectiveness of model training and the objectivity of evaluation, laying a data foundation for building a high-performance mud crab key point detection model.

[0075] Among them, the key points annotated in step S13 include:

[0076] The front endpoint of the carapace, the rear endpoint of the carapace, the leftmost point of the carapace, the rightmost point of the carapace, the left inner point of the carapace, the right inner point of the carapace, the left point of the eighth tooth, the right point of the eighth tooth, the left point of the first lateral tooth, the right point of the first lateral tooth, the left point of the second lateral tooth, and the right point of the second lateral tooth.

[0077] The key points annotated in step S13 are specifically as described above, and the specific key point positions are as Figure 2 shown, Figure 2 where p0 - p11 respectively correspond to the above-mentioned annotated key points. The selection of these key points is based on the anatomical characteristics of the mud crab and the size parameters to be calculated. They jointly define 7 groups of key dimensions such as the carapace length, carapace width, inner carapace width, carapace width of the eighth tooth, first lateral tooth spacing, second lateral tooth spacing, and frontal margin lateral tooth distance. During the annotation process, special attention is paid to maintaining the consistency and accuracy of the annotation positions to avoid deviations in subsequent model training caused by annotation errors.

[0078] S2: Through the annotated mud crab image data set, train the YOLO model based on the point sampling method and the introduction of the secondary pooling mechanism fusion to obtain a mud crab key point detection model.

[0079] Furthermore, the point sampling method mentioned refers to using the Dysample lightweight dynamic upsampling operator to replace the traditional kernel-based upsampling method, and the introduction of the secondary pooling mechanism fusion refers to using the SPPF-MP2 multi-scale fusion module to replace the traditional SPPF module.

[0080] Among them, the YOLO model in S2 is the YOLOv11 model.

[0081] Specifically, the present invention selects the YOLOv11 model as the basic architecture, mainly based on its excellent performance and adaptability to complex application scenarios. The YOLOv11 model is known for its efficient real-time processing ability and strong generalization ability, and can significantly reduce the computational overhead while maintaining high accuracy. The model effectively integrates multi-level semantic information through multi-scale feature fusion and the Path Aggregation Network (PANet), thereby improving the detection accuracy of mud crab targets of different sizes and poses.

[0082] On this basis, the present invention introduces the Dysample lightweight dynamic upsampling operator and the SPPF-MP2 multi-scale fusion module, further enhancing the model's detection ability for the key points of the mud crab carapace edge. During the training process, the model is trained using the labeled mud crab image dataset, and the model performance is evaluated through indicators such as precision P, recall R, map50, and map50-95.

[0083] Among them, step S2 further includes:

[0084] S21: Receive the input mud crab image dataset to obtain an initial feature map.

[0085] In step S21, the YOLOv11-DSPF model first receives the input mud crab image data, which has been normalized and the size is uniformly adjusted to 640×640 pixels.

[0086] The input layer of the model receives this standardized image data and converts it into an initial feature map suitable for subsequent network processing. Specifically, the input image first undergoes a series of preprocessing operations, including normalization of pixel values (mapping pixel values from 0-255 to the 0-1 range), channel conversion (from RGB to the format required by the model), and scale adjustment, etc. These preprocessing operations ensure the consistency and standardization of the input data, and help the model better learn image features.

[0087] The preprocessed image data is fed into the first layer of the model to form an initial feature map. The feature map retains the spatial information and basic features of the original image, and is represented in tensor form for subsequent neural network layers to process. The quality and accuracy of the initial feature map directly affect the effect of subsequent feature extraction. Therefore, special attention is paid to the quality of image preprocessing and the accuracy of data conversion in this step.

[0088] S22: Successively perform multi-layer convolutions on the initial feature map through the backbone network to obtain the basic feature map of the mud crab image.

[0089] In step S22, the initial feature map is subjected to deep feature extraction through the Backbone to obtain the basic feature map of the mud crab image. The Backbone of the YOLOv11 model is the core component in the object detection network, responsible for extracting multi-scale and multi-level features from the input image.

[0090] Specifically, the Backbone first processes the input initial feature map through a multi-layer convolutional neural network. Each convolutional operation includes convolution, batch normalization, and an activation function (such as SiLU). Multiple convolutional layers capture different scale features in the image with different convolutional kernel sizes and strides, forming a multi-level feature map. Subsequently, the feature map is processed through multiple Focus modules. The Focus module increases the number of channels by rearranging pixels while reducing the spatial dimension, effectively improving the efficiency of feature extraction. Through a series of convolutional and feature extraction operations, the Backbone finally outputs the basic feature map of the mud crab image. These feature maps contain rich semantic information and spatial details, providing a feature basis for subsequent key point detection.

[0091] S23: At the end of the Backbone, the basic feature map is processed through a multi-scale fusion module based on the secondary pooling mechanism to obtain the SPPF-MP2 output feature.

[0092] In step S23, the present invention proposes the SPPF-MP2 multi-scale fusion module, which is specifically designed for the characteristic that the target features are concentrated in the carapace edge area in the mud crab key point detection task. Although the traditional SPPF (SpatialPyramidPooling-Fast) module can achieve multi-scale context fusion by concatenating the maximum pooling features of different scales, its single-level feature interaction is difficult to fully capture the high-frequency information of the edge details. The SPPF-MP2 module proposed by the present invention introduces a secondary pooling mechanism on the basis of SPPF, significantly enhancing the ability to capture the carapace edge details.

[0093] The SPPF-MP2 multi-scale fusion module of the present invention constructs a "local-global-local" hierarchical perception system through two-stage feature interaction. While retaining the edge details of the high-resolution shallow features (through the splicing of the original features), it uses cross-level pooling to enhance the modeling ability of the long-range dependence relationship of the carapace contour. This structure improves the response intensity of the model in the carapace edge area, thereby reducing the prediction error of the key point coordinates and improving the edge localization blur problem under the interference of the mud crab carapace reflective texture.

[0094] Among them, step S23 further includes:

[0095] S231: Perform a pooling operation on the basic feature map to obtain the first-level pooling feature.

[0096] S232: Concatenate the base feature map and the first-level pooled feature in the channel dimension through a connection layer to obtain a first fusion feature.

[0097] S233: Perform a second pooling operation on the first fusion feature to obtain a second-level pooled feature.

[0098] S234: Concatenate the first fusion feature and the second-level pooled feature in the channel dimension through a connection layer to obtain a second fusion feature.

[0099] S235: Perform a third pooling operation on the second fusion feature to obtain a third-level pooled feature.

[0100] S236: Concatenate the second fusion feature and the third-level pooled feature in the channel dimension through a connection layer to obtain a multi-scale fusion feature.

[0101] S237: Compress the channels of the multi-scale fusion feature through a convolution operation to obtain the SPPF-MP2 output feature.

[0102] As Figure 3 shown, it is the structure of the SPPF-MP2 multi-scale fusion module provided by the present invention. Specifically, the working process of the SPPF-MP2 multi-scale fusion module includes: First, perform a first max pooling operation on the base feature map to obtain a first-level pooled feature, and then concatenate the base feature map and the first-level pooled feature in the channel dimension through a Contact connection layer to form a first fusion feature; then perform a second max pooling operation on the first fusion feature to obtain a second-level pooled feature; subsequently, concatenate the first fusion feature and the second-level pooled feature in the channel dimension through a Contact connection layer to obtain a second fusion feature; continue to perform a third max pooling operation on the second fusion feature to obtain a third-level pooled feature; then concatenate the second fusion feature and the third-level pooled feature in the channel dimension through a Contact connection layer to obtain a multi-scale fusion feature; finally, perform channel compression on the multi-scale fusion feature through a 1×1 convolution to obtain the final output feature of SPPF-MP2.

[0103] S24: Feed the SPPF-MP2 output feature after spatial attention processing into the Neck network to obtain a multi-scale feature pyramid structure.

[0104] Specifically, first, the features output by SPPF-MP2 are processed by the C2PSA module for spatial attention. This module incorporates a multi-head attention mechanism inside C2, which can adaptively highlight important feature regions and suppress irrelevant backgrounds. This is particularly important for precisely locating the key points on the edge of the mud crab carapace. The features enhanced by spatial attention are fed into the Neck network for processing. The Neck network mainly completes the further refinement and fusion of features through three sub-steps: First, feature extraction is performed on the input features through the C3s module. The C3s module contains multiple convolutional layers and residual connections, which can enhance the expressive power of features while maintaining feature information, generating multi-level feature maps. Then, the Contact module is used to fuse feature maps of different scales to enhance the multi-scale expressive power of features. Finally, the Dysample dynamic upsampling module is adopted to replace the traditional Upsample module. The feature map is precisely upsampled through a point resampling strategy, and at the same time, shallow features are combined with deep features through skip connections to construct a complete multi-scale feature pyramid structure.

[0105] Among them, step S24 further includes:

[0106] S241: Perform feature extraction on the SPPF-MP2 output features after spatial attention processing to obtain multi-scale hierarchical feature maps.

[0107] S242: Fuse the hierarchical feature maps of different scales through a connection layer to obtain a fused feature map.

[0108] S243: Upsample the fused feature map through the point sampling method of the point resampling strategy, and combine shallow features with deep features through skip connections to construct a multi-scale feature pyramid structure.

[0109] Step S24 corresponds to the Dysample module provided by the present invention. The method of point resampling is adopted to replace the traditional kernel-based upsampling method, significantly improving the efficiency and accuracy of upsampling. It is particularly suitable for processing regions with rich details such as the edge of the mud crab carapace. Through this series of processes, the Neck network successfully constructs a multi-scale feature pyramid with rich semantic information and fine spatial details, laying a solid foundation for the subsequent precise key point localization.

[0110] S25: Feed the multi-level features output by the Neck network into the Head detection head, enhance the features through multiple SPPF modules, and map them to the key point coordinate space using a fully connected layer to obtain the position predictions of multiple key points on the mud crab carapace.

[0111] Furthermore, the Head detection head is responsible for finally converting the features extracted by the previous network into the precise coordinates of the key points. Specifically, first, the multi-level features from the Neck network are fed into the Head detection head for processing. The Head detection head contains multiple SPPF modules, which can further enhance the feature expression ability, especially the perception ability for targets of different scales. The SPPF module enables the model to better adapt to various size and shape changes that the mud crab may exhibit in the image through multi-scale pooling and feature fusion. The features processed by the SPPF module are mapped to the key point coordinate space through a series of convolutional layers and fully connected layers. This mapping process is actually to convert the representation in the high-dimensional feature space into the point positions in the actual image coordinate system. Specifically, for the 12 predefined key points on the mud crab's carapace, the model predicts the x and y coordinate values of each point, as well as a confidence score indicating the reliability of the predicted point position. These prediction results are optimized through post-processing techniques such as non-maximum suppression (NMS) to eliminate redundant or low-confidence predictions, and finally the accurate key point position coordinates are obtained.

[0112] S26: Optimize the loss function according to the position difference between the predicted key point positions and the true annotated key point positions to obtain the mud crab key point detection model.

[0113] Furthermore, in the training stage, the model will compare the predicted key point positions with the true annotated key point positions in the dataset, calculate the difference between the two, and continuously adjust the model parameters by optimizing the loss function to improve the prediction accuracy.

[0114] Specifically, the loss function mainly includes two parts: localization loss and confidence loss. The localization loss measures the Euclidean distance between the predicted coordinates and the true coordinates, usually using mean squared error (MSE) or smooth L1 loss; the confidence loss measures the certainty of the model about the prediction results, usually using binary cross-entropy loss. These two parts of the loss are combined into the total loss in a weighted manner to guide the update of the model parameters.

[0115] During the training process, the Adam optimizer is used for parameter optimization, the initial learning rate is set to 0.001, and a learning rate scheduling strategy is used to dynamically adjust the learning rate according to the training progress. The model performs multiple rounds of iterative learning on the training set, and evaluates the performance on the validation set after each round (epoch). The training progress and generalization ability of the model are monitored through metrics such as precision P, recall R, map50, map50-95, etc. When the performance metrics on the validation set no longer improve significantly or reach the preset number of training rounds, the training process ends, and the final mud crab key point detection model is obtained.

[0116] The training strategy described ensures that the model can effectively learn the feature representation of the key points of the blue crab carapace and accurately locate these key points under various postures and lighting conditions, providing a reliable basis for subsequent phenotypic parameter calculations.

[0117] S3: Based on the blue crab key point detection model, key point prediction is performed on the target blue crab image to obtain the key point position coordinates on the blue crab carapace.

[0118] After the training of the blue crab key point detection model is completed, step S3 applies the model to the actual scene to predict the key points of the target blue crab image. The model extracts features and locates key points of the input blue crab image through the forward propagation process, and finally outputs the position coordinates of each key point on the blue crab carapace.

[0119] During the prediction process, the model will automatically identify the position of the blue crab in the image and accurately locate each key point. Even when the blue crab's posture changes or the lighting conditions are not ideal, it can maintain a high positioning accuracy. The accuracy of key point prediction directly affects the accuracy of subsequent phenotypic parameter calculation. Therefore, the present invention significantly improves the accuracy of key point positioning through an improved YOLO model architecture, especially by introducing the SPPF-MP2 multi-scale fusion module and the Dysample dynamic upsampling module.

[0120] S4: Calculate the phenotypic parameters of the blue crab according to the position coordinates of the key points to obtain parameter results.

[0121] This step calculates the key phenotypic parameters of the blue crab, including various sizes and weight, based on the predicted key point position coordinates. First, the pixel distance between the key point pairs is calculated based on the key point coordinates, and then the pixel distance is converted into the actual physical size by calibrating the proportional relationship between the pixel distance of the color block and the true size. On the basis of obtaining the size parameters, the weight of the blue crab is further predicted by the support vector machine regression model. The model establishes an accurate weight prediction model based on the correlation between the key sizes of the blue crab's cephalothorax length, cephalothorax width and weight. Finally, the calculated size parameters and predicted weight are output as the results of the blue crab phenotypic parameters.

[0122] Wherein, step S4 further comprises:

[0123] S41: Calculate the first pixel distance between key point pairs according to the key point position coordinates.

[0124] Specifically, each key point predicted by the model has corresponding x and y coordinate values, representing its exact position on the image plane. Based on these coordinate values, the Euclidean distances between the key points that define the key dimensions of the mud crab can be calculated. It should be noted that the pixel distances calculated in this step are relative values and need to be calibrated by the calibration color block to be converted into the actual physical dimensions of the mud crab. This calculation method based on pixel distances has the advantages of non-contact and non-damage, and is particularly suitable for quickly measuring live mud crabs, avoiding stress reactions and measurement errors caused by physical contact in traditional measurement methods.

[0125] S42: Obtain the second pixel distance of the calibration color block and the true size of the calibration color block.

[0126] During the image acquisition process, a calibration color block with a known size is placed in the imaging device, usually a standard square or rectangular color block, whose side length or diagonal length has been accurately measured. When the mud crab image is captured, this calibration color block also appears in the image at the same time as a reference standard for size conversion. By obtaining the pixel distance and true size of the calibration color block, a mapping relationship from image pixels to actual physical dimensions is established subsequently, providing an accurate proportional benchmark for the next size conversion.

[0127] S43: Based on the equal-proportion mapping method, calculate the predicted size of the mud crab through the first pixel distance, the second pixel distance, and the true size.

[0128] In step S43, based on the equal-proportion mapping principle, a linear correspondence relationship between the pixel distance and the actual physical dimension is established. Through this equal-proportion mapping method, seven groups of key dimensions of the mud crab can be accurately calculated: the length of the carapace, the width of the carapace, the inner width of the carapace, the width of the carapace at the eighth tooth, the distance between the first lateral teeth, the distance between the second lateral teeth, and the distance between the frontal marginal lateral teeth. Experimental data show that the average error of the seven groups of key dimensions of the mud crab calculated by this method does not exceed 10%, and the average error of the core length and width dimensions is even controlled within 5%, which has high practical value and application potential.

[0129] Among them, the expression of the predicted size of the mud crab in step S43 is:

[0130]

[0131] Among them, L is the predicted size of the mud crab, L1 is the pixel distance between the key points of the target size, L2 is the pixel distance between the key points of the calibration color block, and r is the true size of the calibration color block.

[0132] S44: Predict the weight of the mud crab based on the predicted size of the mud crab to obtain the predicted weight of the mud crab.

[0133] Among them, step S44 further includes:

[0134] S441: Screen out the carapace size parameters with the strongest correlation with the weight of the mud crab through Pearson correlation coefficient analysis to obtain the correlation parameters.

[0135] Furthermore, the weight calculation of the mud crab is mainly based on the correlation between size and weight for reasoning. Therefore, it is necessary to first establish a mapping relationship model between the size and weight of the mud crab.

[0136] Specifically, in step S441, first screen out the carapace size parameters with the strongest correlation with the weight through Pearson correlation coefficient analysis. Research shows that all 7 size parameters of the carapace of the mud crab have a strong positive correlation with the weight. Among them, four groups of length-width size parameters such as the inner width of the carapace and the length of the carapace have an extremely strong correlation with the weight, and the Pearson correlation coefficients are all above 0.9. In order to reduce the amount of features and at the same time reduce the model complexity to prevent overfitting, four groups of sizes, namely the length of the carapace, the width of the carapace, the inner width of the carapace, and the width of the carapace at the eighth tooth, are selected as input features.

[0137] S442: Use the measured size of the mud crab based on the correlation parameters as the input feature and the measured weight of the mud crab as the target feature to perform fitting training on the regression model.

[0138] Secondly, in step S442, a regression model is established using the existing measured data of the mud crab. Specifically, the measured length-width sizes of 200 mud crabs are used as input features and the weight as the target feature to perform fitting training on various regression models, including function models such as linear regression, polynomial regression, and exponential regression, as well as machine learning algorithms such as support vector machine regression (SVR), decision tree (DecisionTree), and random forest (RandomForest).

[0139] S443: Evaluate the model performance through indicators such as root mean square error, mean absolute error, root mean square coefficient, and maximum absolute error to obtain the optimal fitting model.

[0140] Furthermore, in step S443, the performance of different models is comprehensively evaluated through various evaluation indicators, including root mean square error (RMSE), mean absolute error (MAE), root mean square coefficient (R2), and maximum absolute error (MaxAE), etc. The evaluation results show that the SVR model exhibits the best prediction performance, and its average weight prediction error is only 4.90%, significantly lower than other models.

[0141] S444: Based on the predicted size of the mud crab, predict the weight of the mud crab through the optimal fitting model to obtain the predicted weight of the mud crab.

[0142] Finally, input the predicted size of the mud crab obtained from the previous steps into the SVR model to predict the weight of the mud crab. The SVR model maps the morphological characteristics of the mud crab to a high-dimensional space through the kernel trick, effectively capturing the complex non-linear relationship between carapace growth and weight accumulation, and is particularly suitable for processing the body size-weight prediction task of organisms with significant morphological heterogeneity such as mud crabs.

[0143] S45: Output the predicted size and predicted weight of the mud crab to obtain parameter results.

[0144] Step S45 is the final link in the entire calculation process of mud crab phenotypic parameters. It integrates and outputs the predicted size and predicted weight of the mud crab calculated in the previous steps to form complete parameter results.

[0145] In practical application scenarios, these parameter results can be directly used for various purposes: in aquaculture management, the growth status of mud crabs can be evaluated based on these parameters to formulate feeding and management strategies; in scientific research, the relationships between these parameters and environmental factors and genetic characteristics can be analyzed to deeply understand the growth laws of mud crabs; in market transactions, the quality grading and pricing of mud crabs can be carried out according to size and weight parameters to improve transaction efficiency and fairness. In addition, this system can achieve batch processing and real-time analysis, greatly improving the efficiency of mud crab phenotypic parameter measurement. Compared with the traditional manual measurement method that takes several minutes, the automated measurement of this system only takes milliseconds. At the same time, with a more convenient and standardized operation, the measurement error remains at a low level. This non-contact measurement method also avoids the stress response and damage that physical contact may cause to mud crabs, and is particularly suitable for rapid and non-destructive measurement of phenotypic parameters of live mud crabs, providing strong technical support for the informatization and intelligent development of aquaculture.

[0146] Next, a specific calculation example is used to further describe a method for calculating the phenotypic parameters of Scylla paramamosain based on YOLO provided by the present invention.

[0147] To verify the effectiveness of the improvements in each module of the network, ablation experiments of YOLOv11n-pose, YOLOv11n-pose-SPPF-MP2, and YOLOv11n-Dysample were designed for comparison. YOLOv11n-pose-SPPF-MP2 means replacing the SPPF module with the SPPF-MP2 module based on the YOLOv11n network. YOLOv11n-pose-Dysample means replacing the basic upsampling module with the dynamic and flexible upsampling module based on YOLOv11n. YOLOv11n-pose-DSPF means adding both the SPPF-MP2 pooling module and the Dysample dynamic upsampling module based on YOLOv11n. mAP50 evaluates the basic detection ability of the model under a loose threshold, and mAP50-95 comprehensively measures the localization accuracy of the model from coarse to fine. The two together reflect the comprehensive performance of the object detection model in terms of recall rate, classification accuracy, and localization robustness, and are the core indicators for balancing practicality and high-precision requirements. Therefore, in this experiment, the map50 and map50-95 indicators were mainly concerned. The comparison results of the performance indicators of different improved combined models are shown in Table 1.

[0148] Table 1 Results of Ablation Experiments

[0149] model P R Map50 Map50-95 parameters YOLOv11n 0.989 1 0.988 0.959 2766703 YOLOv11-dysample 0.989 1 0.986 0.973 2767487 YOLOv11-SPPF-MP2 0.989 1 0.99 0.973 3094895 YOLOv11-DSPF 0.989 1 0.989 0.977 3095679

[0150] As shown in Table 1, the experimental results show that the models with the Dysample dynamic upsampling module and the SPPF-MP2 pooling module have a relatively obvious improvement in the map50-95 indicator compared with the YOLOv11n model, and the SPPF-MP2 also has a small improvement in map50. After replacing both of them into the original network structure, the average precision has been improved. However, due to the already high map50 value of the basic model, the improvement amplitude is small, while the map50-95 indicator has a more obvious improvement. Therefore, the improved model can more accurately detect and identify the key points of the mud crab, thereby further improving the size calculation accuracy.

[0151] Since the key points required for calculating the size are mainly concentrated on the tooth tips at the edge of the mud crab carapace and the connections between adjacent teeth, it is very important to improve the recognition accuracy of the edge key points in order to reduce the error of size prediction.

[0152] Based on the basic YOLOv11n model, the present invention replaces the original SPPF and Upsample modules with the SPPF-MP2 and Dysample modules to further improve the accuracy of the key points on the edge of the green crab carapace. In the improved architecture design, the collaborative application of the Dysample lightweight dynamic upsampling operator and the SPPF-MP2 multi-scale fusion module significantly improves the localization accuracy and computational efficiency of the key points on the carapace edge through a complementary mechanism.

[0153] Dysample adopts a point resampling strategy to replace traditional dynamic convolution, and efficiently restores the feature map resolution with lower parameter quantity and computational overhead in the decoding stage, providing a high-resolution and lightweight feature representation for key point coordinate regression; at the same time, the SPPF-MP2 module strengthens the modeling ability of the carapace edge structure through a two-stage pooling mechanism: in the first stage, multi-scale pooling (5×5 / 9×9 / 13×13) extracts local edge features of different granularities, and in the second stage, cross-level global pooling captures the long-range spatial dependence relationship of the carapace contour. Finally, the original shallow layer features are spliced to retain the high-frequency detail information that has not been smoothed by pooling. The collaborative advantage of the two is reflected in that SPPF-MP2 enhances the multi-scale feature response of the key point area on the carapace edge (such as the carapace connection or morphological mutation point) through "local-global-local" hierarchical perception, while Dysample accurately reconstructs the spatial topology structure of the feature map with a lightweight point resampling strategy, avoiding the edge blurring problem caused by traditional interpolation methods. This combined design not only optimizes the allocation of computing resources - the reduced upsampling delay of Dysample provides computing power redundancy for the multi-scale fusion of SPPF-MP2, but also ensures the full-link geometric consistency from feature extraction to spatial reconstruction through the detail retention mechanisms of the two modules (shallow layer feature splicing and point resampling). Finally, a significant reduction in the key point localization error is achieved under complex carapace morphologies, and the core lies in the combined effect of SPPF-MP2 improving feature discrimination and Dysample maintaining spatial fidelity.

[0154] The method provided by the present invention is not only applicable to green crab farming management, but the proposed general paradigm of "visual perception + machine learning" also opens up a new method dimension for the phenomics research of euryhaline aquatic organisms such as crustaceans and even fish, and has clear engineering practice value for promoting the transformation of the aquaculture industry towards precision and intelligence.

[0155] The present invention realizes the automatic measurement of 7 morphological parameters of green crabs through an improved CNN key point detection technology, and constructs a weight prediction system combined with a support vector regression (SVR) model, showing significant advantages in error control and model applicability. Experimental data show that except for micro-scale parameters such as the inner width of the carapace (maximum error 14.48%) and the distance between lateral teeth (average error 5 - 8.86%), which are affected by image resolution and annotation difficulty, the average error of the core length and width dimensions is less than 5%, and the minimum error even reaches 0.24%, verifying the reliability of non-contact vision measurement technology in the phenotypic analysis of aquatic organisms. It is worth noting that although the relative error percentage of the measurement of the distance between lateral teeth is amplified due to the small absolute size (at the 1 - 2 mm level), its absolute error is still within the millimeter-level accuracy range, basically meeting the practical needs of aquaculture grading and market transactions. In the future, it is possible to try to further optimize the extraction accuracy of micro-scale parameters by combining vision models with edge detection algorithms (such as B-spline interpolation).

[0156] At the level of model selection, SVR shows stronger prediction stability compared with linear models, polynomial models, and MLP models. Its average weight prediction error (4.90%) is significantly lower than that of traditional methods (>20%), which is closely related to its analytical ability for high-dimensional non-linear relationships. Specifically, SVR maps the morphological characteristics of green crabs (such as the length-width ratio of the carapace and the symmetry of frontal teeth) to a high-dimensional space through the kernel trick, effectively capturing the complex coupling relationship between carapace growth and weight accumulation. This mechanism is universal in the prediction of crustacean biomass. Although the MLP model has the theoretical advantage of high-order fitting, it may introduce the risk of overfitting due to interference factors such as the morphology of the chelipeds, which is not conducive to generalization in actual scenarios and may be the key factor leading to its performance decline in this experiment. This finding provides an important reference for the algorithm selection of aquatic animal growth prediction: when there are significant morphological heterogeneities in the target organism (such as differences in the development of green crab chelipeds), using a more robust SVR model can effectively balance prediction accuracy and generalization ability.

[0157] The present invention proves that the two-stage technical framework based on CNN-SVR has successfully broken through the efficiency bottleneck of traditional manual measurement. Its batch detection ability and standard unity advantage (error < 10%) provide key technical support for the intelligent aquaculture system. This method can achieve a sub-second processing speed relying on monocular vision, which is more suitable for the real-time detection scenario by the aquaculture pond. With the iterative upgrade of real-time detection algorithms such as YOLO, in the future, it is possible to try to integrate multi-spectral imaging and three-dimensional reconstruction technologies to further improve the measurement accuracy of micro-scale parameters (such as the distance between frontal margin teeth). This technical path is not only applicable to the aquaculture management of mud crabs, but its general paradigm of "visual perception + machine learning" also opens up a new method dimension for the phenomics research of euryhaline aquatic organisms such as crustaceans and even fish, and has clear engineering practice value for promoting the transformation of the aquaculture industry towards precision and intelligence. Especially in the context of the increasing fluctuation of estuarine salinity caused by climate change today, quickly obtaining the phenotypic data of aquatic organisms will provide key indicator support for evaluating the adaptability of euryhaline species.

[0158] The present invention provides an efficient and concise method for measuring biological parameters such as the size and weight of mud crabs. The combination of a convolutional neural network based on key point recognition and a support vector machine regression model can automatically extract the phenotypic characteristics of mud crabs and quickly estimate growth parameters such as size and weight. Compared with the manual measurement that takes several minutes, the automated measurement is not only more convenient and standardized in operation, but also compresses the time to the ms level, greatly improving the detection efficiency. The non-invasive nature of this technology avoids potential damage to aquatic organisms caused by physical contact, and can provide reference for various tasks such as biological experiments, aquaculture process data statistics, market transactions, and genetic breeding.

[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or replacements that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.

Claims

1. A method for calculating the phenotypic parameters of Scylla paramamosain based on YOLO, characterized in that, Including: S1: Collect multi-angle images of mud crabs to obtain a mud crab image dataset; S2: Train a YOLO model based on the point sampling method and incorporating a secondary pooling mechanism fusion using the annotated mud crab image dataset to obtain a mud crab key point detection model; S3: Perform key point prediction on the target mud crab image based on the mud crab key point detection model to obtain the position coordinates of the key points on the mud crab carapace; S4: Calculate the phenotypic parameters of the mud crab according to the key point position coordinates to obtain the parameter results.

2. The method for calculating the phenotypic parameters of Scylla paramamosain based on YOLO according to claim 1, wherein Step S1 further includes: S11: Collect video data including different postures of mud crabs; S12: Intercept the video data at preset intervals to obtain multiple image data; S13: Perform key point annotation on the multiple image data to obtain a mud crab image dataset.

3. The method for calculating the phenotypic parameters of Scylla paramamosain based on YOLO according to claim 2, wherein, The key points annotated in step S13 include: The front endpoint of the carapace, the rear endpoint of the carapace, the leftmost point of the carapace, the rightmost point of the carapace, the inner left point of the carapace, the inner right point of the carapace, the left point of the eighth tooth, the right point of the eighth tooth, the left point of the first lateral tooth, the right point of the first lateral tooth, the left point of the second lateral tooth, and the right point of the second lateral tooth.

4. A method for calculating the phenotypic parameters of Scylla paramamosain based on YOLO according to claim 1, characterized in that The YOLO model in S2 is the YOLOv11 model.

5. The method for calculating the phenotypic parameters of Scylla paramamosain based on YOLO according to claim 1, wherein Step S2 further includes: S21: Receive the input mud crab image dataset to obtain an initial feature map; S22: Perform multi-layer convolution on the initial feature map through the backbone network to obtain the basic feature map of the mud crab image; S23: At the end of the backbone network, process the basic feature map through a multi-scale fusion module based on the secondary pooling mechanism to obtain the SPPF-MP2 output feature; S24: Send the SPPF-MP2 output feature after spatial attention processing into the Neck network to obtain a multi-scale feature pyramid structure; S25: Send the multi-level features output by the Neck network into the Head detection head, perform feature enhancement through multiple SPPF modules, and map to the key point coordinate space using the fully connected layer to obtain the position prediction of multiple key points on the mud crab carapace; S26: Optimize the loss function according to the position difference between the predicted key point positions and the true annotated key point positions to obtain a mud crab key point detection model.

6. The method for calculating the phenotypic parameters of Scylla paramamosain based on YOLO according to claim 5, wherein Step S23 further includes: S231: Perform a pooling operation on the basic feature map to obtain a first-level pooling feature; S232: Concatenate the basic feature map and the first-level pooling feature in the channel dimension through a connection layer to obtain a first fusion feature; S233: Perform a secondary pooling operation on the first fusion feature to obtain a second-level pooling feature; S234: Concatenate the first fusion feature and the second-level pooling feature in the channel dimension through a connection layer to obtain a second fusion feature; S235: Perform a third pooling operation on the second fusion feature to obtain a third-level pooling feature; S236: Concatenate the second fusion feature and the third-level pooling feature in the channel dimension through a connection layer to obtain a multi-scale fusion feature; S237: Compress the channel of the multi-scale fusion feature through a convolution operation to obtain the SPPF-MP2 output feature.

7. A method for calculating the phenotypic parameters of Scylla paramamosain based on YOLO according to claim 5, characterized in that Step S24 further includes: S241: Extract features from the output features of SPPF-MP2 after spatial attention processing to obtain multi-scale hierarchical feature maps; S242: Fuse the hierarchical feature maps of different scales through a connection layer to obtain a fused feature map; S243: Upsample the fused feature map through the point sampling method of the point resampling strategy, and combine the shallow features and deep features through skip connections to construct a multi-scale feature pyramid structure.

8. A method for calculating the phenotypic parameters of Scylla paramamosain based on YOLO according to claim 1, characterized in that, Step S4 further includes: S41: Calculate the first pixel distance between key point pairs according to the position coordinates of the key points; S42: Obtain the second pixel distance of the calibrated color block and the true size of the calibrated color block; S43: Based on the equal ratio mapping method, calculate the predicted size of the mud crab through the first pixel distance, the second pixel distance and the true size; S44: Predict the weight of the mud crab based on the predicted size of the mud crab to obtain the predicted weight of the mud crab; S45: Output the predicted size of the mud crab and the predicted weight of the mud crab to obtain parameter results.

9. A method for calculating the phenotypic parameters of Scylla paramamosain based on YOLO according to claim 8, characterized in that The expression of the predicted size of the mud crab in step S43 is: where L is the predicted size of the mud crab, L1 is the pixel distance between the key points of the target size, L2 is the pixel distance between the key points of the calibrated color block, and r is the true size of the calibrated color block.

10. A method for calculating the phenotypic parameters of Scylla paramamosain based on YOLO according to claim 8, characterized in that, Step S44 further includes: S441: Screen out the carapace size parameter with the strongest correlation with the mud crab weight through Pearson correlation coefficient analysis to obtain a correlation parameter; S442: Use the measured size of the mud crab based on the correlation parameter as the input feature and the measured weight of the mud crab as the target feature to perform fitting training on the regression model; S443: Evaluate the model performance through indicators such as root mean square error, mean absolute error, root mean square coefficient, and maximum absolute error to obtain an optimal fitting model; S444: Based on the predicted size of the mud crab, predict the weight of the mud crab through the optimal fitting model to obtain the predicted weight of the mud crab.