Next Article in Journal
Towards Software Architecture as an Auditable Practice
Previous Article in Journal
Multi-Scale Attention Transformer for Oil-Temperature Prediction in Hydraulic Systems of Polar Ship Decks
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Approach to Crayfish Weight Estimation Based on Pose Awareness

1
School of Mechanical Engineering, Hubei University of Technology, Wuhan 430068, China
2
Agricultural Machinery Engineering Research and Design Institute, Hubei University of Technology, Wuhan 430068, China
3
School of Mechanical and Electrical Engineering, Wuhan Donghu University, Wuhan 430212, China
4
Wuhan Documentation and Information Center, Chinese Academy of Sciences, Wuhan 430071, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2026, 16(6), 3019; https://doi.org/10.3390/app16063019
Submission received: 17 February 2026 / Revised: 13 March 2026 / Accepted: 18 March 2026 / Published: 20 March 2026

Abstract

To address the challenges of low accuracy and poor robustness in industrial crayfish weight estimation caused by variable postures, this paper proposes a lightweight method that integrates pose awareness. First, a multi-task perception model, Crayfish-YOLO, is developed based on the YOLOv8s-Seg framework. By reconstructing the backbone with MobileNetV3 and integrating Coordinate Attention (CA), CARAFE upsampling, and the Wise Intersection over Union (Wise-IoU) loss function, the model is significantly compressed while enhancing its ability to output high-fidelity pixel-level masks and pose categories. Second, a pose-adaptive weight estimation strategy is proposed, which leverages perceived pose information to dynamically invoke the optimal regression model from a pre-constructed heterogeneous model library. Using seven core geometric features extracted from the segmentation masks, the system achieves precise weight estimation. Experimental results on a self-built dataset show that Crayfish-YOLO reduces parameters by 75.2% compared to YOLOv8s-Seg, while core segmentation accuracy (mAP50~95 (Seg)) improves by 1.1%. The integrated end-to-end system achieves a Mean Absolute Error (MAE) of 2.1 g and a mean coefficient of determination (R2) of 0.92, significantly outperforming comparative algorithms. This research provides an efficient visual perception and estimation solution for the automated grading of crayfish and similar non-rigid aquatic products.

1. Introduction

Crayfish (Procambarus clarkii), a freshwater crustacean native to North America, has become a globally significant economic aquatic species. Valued for its unique flavor and texture, crayfish is widely welcomed in culinary cultures worldwide, with massive consumer markets established particularly in Asia, Europe, and the Americas. As the industrial scale continues to expand, the efficient and accurate grading of crayfish by size has emerged as a universal industry demand, essential for ensuring product quality and achieving premium pricing. This challenge is especially prominent in China, the world’s largest crayfish producer, where aquaculture output reached a remarkable 3.4476 million tons in 2024 [1].
In the face of such immense industrial volume, the current mainstream method of manual sorting is not only labor-intensive and inefficient but also suffers from inconsistent grading standards. Meanwhile, traditional mechanical sorting equipment, though improving efficiency to some degree, still faces design limitations. For instance, the pipeline control system designed by Sun et al. [2] still causes physical damage to live crayfish. Additionally, weighing-based equipment is highly susceptible to interference from factors such as stress-induced movements and surface water adhesion, which compromise sorting accuracy.
To overcome the drawbacks of traditional methods, non-destructive testing technology based on machine vision has emerged as a critical research direction in aquatic product processing. Early studies primarily focused on conventional computer vision algorithms. For example, Wang et al. [3] employed an ellipse-cutting method to detect residual limbs based on the structural characteristics of crayfish appendages. Berillis [4] analyzed lobster morphology through complex image-processing workflows. In terms of weight assessment, researchers have frequently attempted to construct geometric correlation models between biological length and weight, such as the study by Rodger [5] on lobsters and the contactless fish weight estimation system developed by Ayob et al. [6]. However, these methods, which rely on manually designed features, exhibit limited robustness and generalization when faced with variations in lighting, background interference, and, especially, the uncontrollable postures of live, moving crayfish, making it difficult to stably and accurately extract effective features.
In recent years, with the rapid development of deep-learning technology, models centered around Convolutional Neural Networks (CNNs) have provided new avenues for solving these challenges [7,8,9,10]. Significant progress has also been made in more refined measurement tasks: Yu et al. [9] proposed a non-contact fish weight estimation system based on instance segmentation, and Al-Alawi et al. [10] introduced a method combining Mask R-CNN with a regression model for tilapia weight estimation. Furthermore, to capture richer spatial features for addressing posture variations, Li et al. [11] utilized a NeRF-supervised stereo matching network for high-precision 3D reconstruction of swimming fish, and Wang et al. [12] proposed a system combining lightweight instance segmentation with 3D surface reconstruction, effectively enhancing the biomass estimation accuracy for free-swimming fish. However, to balance high accuracy with the speed requirements of industrial settings, one-stage algorithms, such as the YOLO series, have gained widespread attention for their efficiency [13,14,15]. Additionally, Geng et al. [16] achieved precise segmentation of the crayfish trunk and weight conversion by improving YOLOv8n-seg. Furthermore, Wen et al. [17] explored a weight grading method based on an improved Swin Transformer, utilizing the area ratios of various body parts to enhance estimation accuracy.
Despite these studies demonstrating the advantages of deep learning in terms of speed and accuracy, the task of intelligent weight estimation for live crayfish still faces dual constraints from industrial deployment conditions and biological characteristics. On one hand, edge computing devices in industrial environments have limited computational power, requiring algorithms to operate under extremely low computational loads. Meanwhile, conventional lightweighting strategies often come at the cost of sacrificing the perception of fine-grained features. On the other hand, and more critically, crayfish are non-rigid living organisms. The random postures they exhibit on the conveyor belt, such as curling and lying on their side, significantly reduce the correlation between their 2D projected contours and actual weight. This causes traditional regression strategies based on a single global model to often fail when confronted with complex postures, preventing robust weight estimation.
To address the aforementioned challenges of lightweight deployment and variable postures, this paper proposes a lightweight multi-task perception and weight estimation method integrating pose awareness. The core contributions are twofold: first, at the perception level, this study builds upon the YOLOv8s-Seg baseline to construct an improved lightweight multi-task perception model (Crayfish-YOLO) by integrating optimization strategies such as a MobileNetV3 lightweight backbone, CARAFE content-aware upsampling, a CA mechanism, and the Wise Intersection over Union (Wise-IoU) loss function. Second, at the estimation level, to tackle the problem of variable postures, a pose-adaptive multi-feature fusion regression strategy is proposed, which intelligently invokes the optimal estimation model from a scientifically optimized heterogeneous model library based on real-time perceived poses. Experimental results demonstrate that the proposed framework achieves high-precision weight estimation while significantly reducing model complexity (6.2 MB), highlighting its substantial potential for real-time deployment on industrial edge-computing devices. This research provides an efficient visual perception and estimation solution for the automated grading of crayfish and similar non-rigid aquatic products.

2. Materials

To ensure the reproducibility of the experiments and the reliability of the proposed method, this section details the experimental hardware setup, the data acquisition process, and the subsequent dataset construction and annotation procedures.

2.1. Experimental Materials and Image Acquisition System

The crayfish images used in this study were collected at the Intelligent Agricultural Machinery and Equipment Laboratory of the Agricultural Machinery Engineering Research and Design Institute, Hubei University of Technology, from May to July 2025. To ensure sample diversity and representativeness, two batches of healthy live crayfish were procured and photographed.
All images were captured on-site using a self-developed intelligent crayfish sorting machine (built by Hubei University of Technology, Wuhan, China) and saved in “.png” format. This sorting machine, equipped with a white conveyor belt, a synchronously triggered camera, and controlled lighting, highly replicates the on-site working environment and workflow. To enrich data diversity and enhance the model’s generalization ability, the acquisition process fully covered various natural postures of the crayfish on the conveyor belt, including upright, upside-down, side-view, curled-tail, and straight-tail poses.
To support this high-quality acquisition, the specific hardware system was constructed as shown in Figure 1. The system primarily consists of an industrial camera, a lens, a conveyor belt, light sources, and a synchronous triggering device. The core components include a HIKROBOT (Hangzhou Hikrobot Technology Co., Ltd., Hangzhou, China) MV-CS016-10GC industrial area-scan camera paired with an MVL-HF0828M-6MPE lens (Hikrobot, Hangzhou, China), vertically mounted 51.2 cm above the conveyor belt. To eliminate ambient light interference and provide uniform illumination, light-shielding baffles were installed on both sides of the conveyor, and dual LED strip lights were used for supplementary lighting. When a crayfish entered the shooting area on the conveyor, an infrared sensor triggered the camera to capture a single frame, with an original image resolution of 1440 × 1080 pixels.

2.2. Dataset Preparation and Annotation

After screening and organizing the collected images, a total of 1770 valid sample images were obtained. The detailed distribution of these samples across the six defined pose categories in both the perception and calibration datasets is summarized in Table 1. The total number of samples was primarily constrained by the seasonal growth window of crayfish and the labor-intensive nature of high-precision manual weighing (0.1 g accuracy) combined with pixel-level annotation. To ensure data integrity, biological vitality, and measurement precision were prioritized to ensure that each data point represents a high-fidelity mapping under realistic conditions.
Depending on the specific research objectives, these images were categorized into two core datasets:
Complex-Condition Perception Dataset: This dataset is used to train and evaluate the robustness of the visual perception model in a simulated industrial environment. It contains 981 crayfish images captured at the normal operating speed of the conveyor belt. These images generally exhibit a certain degree of motion blur. As illustrated in Figure 2, the acquisition process fully covered various natural postures, including Upright-Straight, Upright-Curled, Upside-down-Straight, Upside-down-Curled, Side-Straight, and Side-Curled.
Standardized Calibration Dataset: This dataset is used to explore and establish the mathematical relationship for weight estimation. It consists of 789 images captured under static or extremely low-speed conditions, with the conveyor belt background replaced by an ideal white light-emitting panel. The actual weight of each crayfish was measured using an electronic scale (0.1 g accuracy).
All datasets were partitioned into training, validation, and test sets at an 8:1:1 ratio using stratified random sampling. With the datasets established, targeted preprocessing and fine-grained annotation were performed to generate high-quality ground truth for the proposed model.
For the Complex-Condition Dataset, detailed image annotation was performed using LabelMe (version 5.1.1). To build a multi-task model capable of performing both instance segmentation and pose classification, the polygon tool was used to trace the contour of each crayfish instance at the pixel level. Considering that fine appendages like legs and antennae are prone to severe motion blur and contribute minimally to the overall weight, the annotation only included the main body parts—specifically the cephalothorax, abdomen, and tail fan—to improve model convergence. Simultaneously, each instance was assigned a pose category label according to the six-pose classification system defined in Figure 2. All annotation information was converted into the format required for YOLOv8 segmentation tasks. Regarding preprocessing, all images were resized to 640 × 640 pixels, and data augmentation (random flips) was applied to enhance generalization.
For the Standardized Calibration Dataset, a traditional image processing workflow was designed to obtain baseline contours consistent with the deep-learning output, as shown in Figure 3. First, the original RGB image (Figure 3a) was converted to grayscale and subjected to Gaussian filtering. Next, the OTSU adaptive thresholding algorithm was used for binarization (Figure 3b). Finally, a morphological opening operation was applied to filter out noise from small appendages, retaining only the main body region as the final mask (Figure 3c).
Through these rigorous preprocessing and annotation steps, a standardized and high-quality data foundation was established, providing reliable inputs for the Crayfish-YOLO perception model and the weight estimation strategy proposed in Section 3.

3. Proposed Method

Building upon the high-quality dataset and annotation standards established in Section 2, this section details the proposed algorithmic framework. The core of the method is a multi-stage system designed to address the challenges of non-rigid deformations and variable postures in live crayfish.

3.1. System Architecture

The proposed framework consists of two sequential stages: Perception and Estimation [18].
In the first stage, a customized lightweight multi-task perception network, named Crayfish-YOLO, is employed to process the raw input images. Unlike traditional methods that treat detection and classification separately, this model simultaneously performs instance segmentation and pose classification. It precisely extracts the pixel-level contour of the crayfish’s main body (filtering out background noise) while identifying its specific pose category (e.g., upright, upside-down, or side-view). These high-fidelity visual outputs serve as the prerequisite data for the subsequent weight analysis.
After obtaining these two-dimensional visual features, the central challenge is to accurately translate them into an estimation of the actual weight. As crayfish are non-rigid living organisms, random changes in their posture (such as tail curling) can cause drastic alterations in their projected contours [19], making traditional static regression models unsuitable.
To address this issue, a pose-adaptive weight estimation strategy is introduced. The core mechanism involves dynamically invoking a dedicated regression model from a pre-constructed model library based on the pose category perceived in real time by the perception model. Concurrently, a series of geometric features calculated from the synchronously acquired pixel-level contour is used as input [20], ultimately outputting a high-precision estimated weight. The overall workflow of the algorithm is illustrated in Figure 4.

3.2. The Lightweight Perception Model: Crayfish-YOLO

To resolve the conflict between the need for lightweight deployment on edge devices and the demand for high perception accuracy under complex working conditions, this study proposes an improved multi-task perception model based on the YOLOv8s-Seg baseline, named Crayfish-YOLO.
This model aims to enhance the perception accuracy of crayfish postures and contours while significantly reducing computational costs through systematic structural optimization. The specific improvement strategies include four main aspects: (1) reconstructing the backbone with MobileNetV3 to achieve extreme lightweighting; (2) integrating a Coordinate Attention (CA) mechanism into the final layer of the backbone to enhance the discriminative power for key postural features; (3) introducing CARAFE (Content-Aware ReAssembly of Features) for upsampling to improve the ability to restore blurry contours; and (4) using the Wise-IoU loss function to optimize the model’s localization robustness. By synergizing these modules, Crayfish-YOLO compensates for the loss of fine-grained information inherent in lightweight downsampling, specifically addressing motion blur and pose confusion in industrial environments. The overall architecture of the model is shown in Figure 5.

3.2.1. MobileNetV3-Based Backbone Network

The standard YOLOv8s-Seg employs CSPDarknet as its backbone. To meet the real-time inference demands of embedded sorting equipment, this paper replaces the original backbone with MobileNetV3-Small [21].
The core component is the MobileNetV3 Block, as illustrated in Figure 6. The process begins with a 1 × 1 pointwise convolution and a non-linear (NL) activation function to expand the channel dimension. Subsequently, a 3 × 3 Depthwise (Dwise) convolution with NL activation is applied to extract spatial features efficiently. To further enhance the features, a lightweight Squeeze-and-Excitation (SE) branch is integrated, which utilizes global average pooling (Pool) followed by two fully connected (FC) layers with ReLU and Hard-α (Hard-Sigmoid) activations to re-weight the channel importance. Finally, a 1 × 1 convolution projects the features back to the target dimension. This inverted residual structure significantly reduces model size while retaining core feature extraction capabilities.

3.2.2. Coordinate Attention Mechanism

In the pose classification task, the distinction between similar poses (e.g., “Upright” vs. “Upside-down”) primarily lies in fine-grained local details such as pleopods and carapace textures. Although the MobileNetV3 backbone is lightweight, its native Squeeze-and-Excitation (SE) attention module only focuses on channel-wise information and neglects spatial coordinate information, making it difficult for the model to accurately locate these key discriminative feature regions.
To address this, this paper integrates the Coordinate Attention (CA) mechanism [22] into the final layer of the backbone network, as illustrated in Figure 5. Unlike the SE module, the CA mechanism embeds positional information into channel attention. As shown in the detailed architecture (Figure 7), the process begins by aggregating input features along the horizontal and vertical directions separately using X Avg Pool and Y Avg Pool to generate two direction-aware feature maps with dimensions of C × H × 1 and C × 1 × W .
These maps are subsequently concatenated and processed through a shared Conv2d layer, Batch Normalization, and a Non-linear activation function to produce an intermediate feature map ( C / r × 1 × ( W + H ) ) that captures cross-channel information. This map is then split and transformed by two separate Conv2d and Sigmoid layers back into attention weights for the X and Y directions. Finally, these weights are applied to the original input feature map through a Re-Weight operation. This strategy effectively guides the network to focus on local regions with high discriminative value, such as abdominal textures, thereby significantly improving the classification accuracy for easily confusable crayfish poses.

3.2.3. Feature Upsampling Operator

To address the common issue of image quality degradation in industrial settings (e.g., motion blur, low resolution), the default Nearest Neighbor Interpolation upsampling method in YOLOv8 has limitations. This method performs interpolation based solely on pixel location, ignoring semantic content, which can easily lead to further smoothing of contour edges in blurry images and the loss of high-frequency details.
To overcome this, this paper introduces the CARAFE (Content-Aware ReAssembly of Features) [23] operator to replace the default upsampling layers. As shown in Figure 8, CARAFE consists of two primary parts: a Kernel prediction module and a Content-aware reassembly module. Specifically, the input feature map is first processed by a Channel compressor and a Content encoder to extract semantic information, after which a Kernel normalizer predicts specialized upsampling kernels for each pixel location.
Unlike interpolation methods with fixed kernels, CARAFE can dynamically reassemble features within a local neighborhood N ( T i , K u p ) based on the semantic content. This content-adaptive reassembly strategy provides it with a larger receptive field and a stronger capability for detail recovery, enabling it to reconstruct clear and sharp edge contours from blurry feature maps, thereby significantly improving the quality of the instance segmentation masks.

3.2.4. Loss Function Optimization

Training data from industrial scenes often contains a large number of low-quality samples and an uneven distribution of easy and hard samples. The default CIoU loss function in YOLOv8 uses a static focusing mechanism, which struggles to dynamically adjust gradient weights based on sample quality, thereby limiting the model’s convergence performance.
To solve this problem, this study introduces the Wise-IoU loss function [24]. After comparative experiments with its three versions (v1, v2, and v3), the Wise-IoU v2 (WIoUv2) variant was selected for its superior performance. The WIoUv2 loss is designed to intelligently adjust the gradient contribution of samples of varying quality through a dynamic monotonic focusing mechanism. The overall structure of the loss function, L W I o U v 2 , is defined in Equation (1):
L W I o U v 2 = r L W I o U v 1 = r R W I o U L I o U
The core of this mechanism is the focusing coefficient r, defined in Equation (2). The value of r is determined by the ratio of the current sample’s IoU loss, L I o U * , to the sliding average IoU loss, L I o U ¯ . Here, γ is a focusing hyperparameter that controls the rate of down-weighting for high-quality samples.
r = L I o U * L I o U ¯ γ
Furthermore, the distance penalty term R W I o U in Equation (1) penalizes the deviation between the center points of the predicted and ground-truth boxes. This term ensures that the model continues to optimize the localization precision of the bounding box even when the IoU is high, as formulated in Equation (3):
R W I o U = e x p x x g t 2 + y y g t 2 W c 2 + H c 2
where x , y and ( x g t , y g t ) represent the center coordinates of the predicted and ground-truth boxes, respectively. W c and H c denote the width and height of the smallest enclosing box covering both boxes. Through this design, WIoUv2 achieves more robust and efficient model convergence under complex industrial conditions.

3.3. Pose-Adaptive Weight Estimation Strategy

Based on the pose categories and pixel-level contours obtained from the Crayfish-YOLO model (Section 3.2), the next core task is to construct an estimation framework that can establish a precise mapping relationship with the actual physical weight. To address the measurement challenges caused by the variable postures of non-rigid living organisms, this study proposes a pose-adaptive, multi-feature fusion regression strategy. The construction process of this strategy is as follows: first, exploratory data analysis is conducted to reveal the impact of pose variations on feature effectiveness; second, the optimal feature subset is optimized for each pose; finally, by comparing various regression algorithms, a dedicated regression model is constructed for each pose, ultimately forming a heterogeneous model library.

3.3.1. Analysis of the Effect of Pose on the Validity of Contour Features

To establish the necessity of a pose-adaptive regression strategy, this study first defines the basis for the analysis. Through observation of numerous actual images, a refined six-pose classification system was established (Upright-Straight, Upright-Curled, Upside-down-Straight, Upside-down-Curled, Side-Straight, and Side-Curled; as illustrated in Figure 2). Observations and statistics confirm that this system covers over 95% of the common natural postures encountered in a real production environment. Concurrently, for each segmented contour, this study calculated 7 core geometric and morphological features to serve as a candidate variable pool, as defined in Table 2.
Based on the defined pose categories and candidate features, this study first deeply investigated the predictive limitations of a single feature under different poses. Taking the length of the minimum bounding rectangle as an example, Figure 9 shows a comparison of its linear regression fit for two typical poses: “Upside-down-Straight” and “Upside-down-Curled”.
Figure 9 clearly reveals that the effectiveness of contour features is highly pose-dependent. In the “Upside-down-Straight” pose, the length feature is significantly positively correlated with weight. However, when the pose changes to “Upside-down-Curled,” the projected length can be reduced by more than 100 pixels, causing the entire numerical range to shift downwards. This distribution shift proves that using a single, global model would inevitably lead to prediction failure. Therefore, to overcome the inherent deficiencies of single features, it is necessary to perform multi-dimensional feature optimization for each pose.

3.3.2. Feature Subset Optimization

To ensure the reliability of the feature subsets and mitigate multicollinearity, we assessed the candidate features using the Variance Inflation Factor (VIF) diagnostics. All selected features in the final subsets maintained VIF values below 5.0, confirming that multicollinearity is within an acceptable range. We prioritized the Forward Stepwise Selection approach over regularization methods (e.g., LASSO or Ridge) due to the low dimensionality of our feature space (d = 7). In this context, stepwise selection offers superior physical interpretability. It enables a transparent mapping between individual morphological traits (e.g., perimeter variations during curling) and weight, which is a primary requirement for industrial grading standards, compared to the “black-box” nature of some regularized estimators.
Based on these diagnostics, this study employed the Forward Stepwise Selection method [25]. The method uses the Adjusted R-squared ( R a d j 2 ) as the evaluation criterion to prevent overfitting, as formulated in Equation (4):
R a d j 2 = 1 ( 1 R 2 ) n     1 n     p     1
where n is the number of samples, p is the number of features, and R2 is the coefficient of determination. For each pose, the optimization process is summarized as follows:
Step 1: Initialization. Set the feature set S = , the candidate set C = {Area, Perimeter, Length, Width, Aspect Ratio, Compactness, Equivalent Diameter}, and initial score S c o r e b e s t = .
Step 2: Iterative Search. For each feature f i in C, form a temporary model M i = S { f i } and calculate its R a d j 2 ( M i ) .
Step 3: Evaluation and Selection. Identify the feature f b e s t that yields the maximum R a d j 2 . If R a d j 2 S f b e s t > S c o r e b e s t , update the sets:
S = S { f b e s t }
C = C { f b e s t }
S c o r e b e s t = R a d j 2 ( S )
Return to Step 2 until no further improvement is achieved.
Step 4: Termination. The output set S constitutes the optimal feature subset for the respective pose.
Before presenting the final selection results, to understand the intrinsic correlations between features and the selection mechanism, this study plotted the feature-weight correlation matrices for two typical poses, “Upright-Straight” and “Upright-Curled,” as shown in Figure 10.
The correlation analysis in Figure 10 provides clear insight into the underlying decision-making logic of the feature selection algorithm:
First, it eliminates redundant features to address multicollinearity. As shown in Figure 10a, although Equivalent Diameter exhibits a very high univariate correlation with weight (r > 0.9) across all poses, its physical information is highly redundant with Area. After prioritizing the more direct Area feature, the algorithm automatically discards Equivalent Diameter to reduce model redundancy.
Second, it leverages feature complementarity to construct a 3D representation (using the straight-tail pose as an example). As depicted in Figure 10a, for the “Upright-Straight” pose, although the univariate correlation of Width (r = 0.79) is slightly higher than that of Length (r = 0.75), the model ultimately selects the latter. This is because Width is too highly correlated with Area, whereas Length provides an independent dimension of information related to the creature’s longitudinal growth, which is distinct from Area. The combination of Area and Length creates a more robust three-dimensional representation of the crayfish’s volume.
Third, it uses boundary information to compensate for the loss of length information (using the curled-tail pose as an example). In the “Upright-Curled” pose, the Length feature becomes ineffective because it degenerates to the diameter of a sphere. At this point, Perimeter, as shown in Figure 10b, is selected by the model. This occurs because, in a curled state, the perimeter contains arc length information along the body’s outer edge. It acts as an “implicit length metric” and, when combined with the Area feature, effectively compensates for the information loss caused by the failure of direct body length measurement.
Finally, it introduces a non-linear correction factor. Although Figure 10b shows that Compactness has a very low direct linear correlation with weight (r ≈ −0.10), it is still identified by the model as a key feature. This is because Compactness quantifies the “tightness of the curl” of the body. In multivariate regression, it plays a critical role as a non-linear correction factor, effectively compensating for fluctuations in the area-weight relationship that arise from variations in how tightly or loosely the tail is curled.
Based on the feature interaction logic described above, this study performed an iterative screening process. This process ultimately determined the optimal feature subset for each of the six poses, with the results presented in Table 3.
The results in Table 3 confirm that the core feature combinations contributing most to weight prediction vary significantly across different poses. For instance, curled-tail poses incorporate Perimeter and Compactness, whereas straight-tail poses rely on length and width dimensions. This finding further validates the necessity of constructing differentiated feature subsets for different poses to ensure high-precision weight estimation.

3.3.3. Comparison of Regression Models and Final Model Library Construction

After determining the optimal feature subset for each pose category in Section 3.3.2, the next step is to evaluate and select the most suitable regression algorithm. We introduced three representative machine-learning models—Multiple Linear Regression (MLR), K-Nearest Neighbors (KNN), and Support Vector Regression (SVR)—for a comparative analysis to construct the final heterogeneous model library.
To ensure the statistical robustness of the model library and mitigate selection bias, a 5-fold cross-validation strategy was implemented during the training and hyperparameter tuning phase. For algorithms requiring optimization, such as SVR (penalty parameter C and kernel coefficient γ ) and KNN (number of neighbors k), a Grid Search was conducted within the training folds. The finalized models were subsequently evaluated on an independent, held-out test set to ensure that the reported performance reflects true generalization capability, with the quantitative results detailed in the later section (Section 4.3).
The mathematical basis for these models is summarized as follows:
  • MLR: A parametric model seeking an optimal linear hyperplane in the feature space, as expressed in Equation (8):
    Y = β 0 + i = 1 p β i X i + ϵ
  • KNN: An instance-based non-parametric model [26] where the predicted value y ^ is the weighted average of K nearest neighbors, defined in Equation (9):
    y ^ = x i N k ( x ) w i y i x i N k ( x ) w i
  • SVR: Maps data into a high-dimensional space [27] via a Gaussian Radial Basis Function (RBF) kernel to address non-linear distributions, formulated in Equation (10):
    K ( x i , x j ) = e x p ( γ x i x j 2 )
To analyze the intrinsic fitting mechanisms in response to pose variations, we plotted the fitting surfaces for two typical poses (“Upright-Straight” and “Side-Curled”) in Figure 11.
In the “Upright-Straight” pose (Figure 11a–c), the features and weight exhibit a strong linear trend. SVR (Figure 11c) constructs a smooth, flexible hyperplane that fits the data manifold best, achieving the highest mean R2 of 0.934. In contrast, MLR (Figure 11a) is limited by its rigid linearity, while KNN (Figure 11b) appears fragmented and sensitive to noise. However, in the “Side-Curled” pose (Figure 11d–f), data points are highly scattered. MLR (Figure 11d) captures the primary linear component more robustly, whereas the complex surfaces of KNN and SVR suffer from local noise, leading to decreased generalization.
The preceding qualitative analysis is substantiated by the quantitative evaluation on the test set, with detailed results, including the mean coefficient of determination (R2) and standard deviation (SD) for the three models, presented in Section 4.3. The data indicate that no single algorithm achieves optimal performance across all categories, which strongly justifies the necessity of the pose-adaptive strategy. Consequently, we constructed a Heterogeneous Regression Model Library, which dynamically assigns the best-performing algorithm to each specific pose, ensuring the system consistently operates in an optimal predictive state for varying crayfish morphologies.

4. Results and Analysis

This section presents a comprehensive evaluation of the proposed framework, beginning with the experimental setup and metrics, followed by detailed performance analyses of the Crayfish-YOLO perception model, the pose-adaptive regression library, and the final end-to-end weight estimation system.

4.1. Experimental Environment and Evaluation Metrics

All experiments in this study were conducted on a Windows 10 operating system. The hardware configuration included an Intel Core i5-13600KF CPU and an NVIDIA RTX 4060 Ti (8 GB) GPU. The software environment was built on the PyTorch 2.0.0 deep-learning framework and CUDA 11.8. Python 3.8 and the Ultralytics YOLO framework were used for all model training, validation, and testing. The training hyperparameters are detailed in Table 4.
To comprehensively evaluate algorithm performance, multiple evaluation metrics were selected. The performance of the perception model was evaluated using Precision (P), Recall (R), mean Average Precision at an IoU threshold of 0.5 (mAP50), and mean Average Precision over a range of IoU thresholds from 0.5 to 0.95 for both box detection (mAP50~95 (Box)) and instance segmentation (mAP50~95 (Seg)).
The final performance of the weight estimation was measured using Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and the coefficient of determination (R2). Model efficiency was assessed by the number of parameters (Params, M), Giga Floating-point Operations Per Second (GFLOPs), model size (Size, MB), and inference speed (ms/img). Following this setup, the subsequent subsections detail the validation of each core component of the framework.

4.2. Performance Evaluation of the Perception Model

This section aims to comprehensively evaluate the overall performance of the proposed Crayfish-YOLO model on the parallel tasks of instance segmentation and pose classification. All experiments were conducted on the complex-condition test set.

4.2.1. Comparison with Other Algorithms

To validate the overall superiority of the Crayfish-YOLO algorithm, this section presents a comparative analysis against YOLOv5s-Seg, YOLOv11s-Seg, and the baseline YOLOv8s-Seg. The experimental results are presented in Table 5.
The analysis of Table 5 shows that, compared to the baseline YOLOv8s-Seg, the proposed Crayfish-YOLO significantly reduces the number of parameters and GFLOPs by 75.2% and 56.2%, respectively. Notably, the model size is compressed by 74.1% (to only 6.2 MB). In terms of accuracy, Crayfish-YOLO achieves the highest precision across key metrics, with mAP50 reaching 0.968 and the core segmentation accuracy (mAP50~95 (Seg)) improving by 1.1% over the baseline. Although the box detection accuracy (mAP50~95 (Box)) remains at a similar level to the baseline, the overall framework demonstrates a superior balance between extreme lightweighting and high-fidelity instance segmentation performance, which is critical for our application.
Regarding inference speed, although the introduction of content-aware upsampling and attention modules slightly increased the latency to 3.7 ms, the throughput remains at approximately 270 FPS. While these measurements were obtained on a desktop GPU (RTX 4060 Ti, Micro-Star International Co., Ltd., New Taipei City, Taiwan, China), the extreme reduction in model size and GFLOPs indicates that Crayfish-YOLO has substantial potential for real-time deployment on embedded edge devices (e.g., NVIDIA Jetson series, NVIDIA Corp., Santa Clara, CA, USA). Such devices are far more sensitive to memory footprint (6.2 MB) and computational complexity (18.7 GFLOPs) than to absolute high-end GPU throughput. This strategy of trading a minor increase in latency for drastic lightweighting and improved precision is highly advantageous for cost-constrained industrial pipelines where high-precision weight estimation is required.

4.2.2. Evaluation of Backbone Architectures

To justify the selection of MobileNetV3 as the backbone, we conducted a comparative study replacing it with other State-of-the-Art lightweight architectures, as shown in Table 6.
While EfficientViT and FasterNet achieve slightly higher mAP50 (0.963), their parameters and GFLOPs are significantly higher. MobileNetV3 strikes the optimal balance between accuracy and extreme lightweighting (2.80 M params, 5.9 MB size), providing a larger computational “budget” for the subsequent integration of CA and CARAFE modules.

4.2.3. Ablation Study

To individually verify the specific contributions of each proposed module, this study conducted a detailed ablation study by incrementally adding each module to the baseline model. Additionally, the CA module was compared with other mainstream attention mechanisms (SE, ECA, CBAM). The results are shown in Table 7.
The results in Table 7 clearly illustrate the systematic impact of each improvement. Replacing the original backbone with MobileNetV3 achieved significant lightweighting, reducing the model size from 23.9 MB to only 6.2 MB (a 74.1% reduction) while maintaining robust baseline detection capabilities. Building on this, the CARAFE operator and CA module (Exp. 3 and Exp. 7) led to incremental increases in segmentation accuracy (mAP50~95 (Seg)), demonstrating their advantages in recovering contour details and discriminating postural features with high positional sensitivity. Finally, the WIoUv2 loss function optimized localization robustness, significantly boosting the final core segmentation metric to 0.791, thereby surpassing the much larger baseline model (0.780). Although the detection accuracy (mAP50~95 (Box)) of 0.893 remains nearly identical to the baseline, the proposed Crayfish-YOLO achieves a superior balance between extreme compression and high-fidelity instance segmentation. To complement these quantitative results, a visual comparison of the model’s performance is provided below.

4.2.4. Pose Classification Visualization Analysis

To evaluate the reliability of the pose classification stage—which is the prerequisite for selecting the optimal regression model—a confusion matrix was generated for the Crayfish-YOLO model on the test set, as shown in Figure 12.
Quantitative analysis of the matrix reveals that the model achieves an overall pose classification accuracy of 94.9% (93/98 samples). The majority of the six pose categories are correctly identified with high precision. Minor misclassifications primarily occur between similar orientations, such as Upside-down-Straight (UDS) being occasionally confused with Upright-Straight (US). From the perspective of error propagation, since “Area” remains the dominant predictor across these similar pose-specific models, such minor classification errors do not lead to catastrophic weight estimation failures, ensuring the overall robustness of the end-to-end system.
To more intuitively compare the perception performance under complex conditions, Figure 13 presents a visual analysis of three representative samples.
The comparison illustrates that the proposed Crayfish-YOLO algorithm performs robustly and optimally across various complex scenarios. Specifically, in Sample A (a side-straight pose), YOLOv5s-seg exhibits a distinct category misclassification accompanied by very low confidence. For Sample B, while YOLOv5s-seg and YOLOv11s-seg yield correct predictions, the baseline YOLOv8s-seg fails by assigning an incorrect pose category. In contrast, for Sample C, although all models identify the pose correctly, Crayfish-YOLO achieves the highest confidence score of 0.97 and generates a significantly more refined segmentation contour with sharper edges.
Overall, the quantitative classification results and qualitative visualizations provide strong evidence that Crayfish-YOLO is significantly superior to the other comparative models in terms of both contour segmentation robustness and discriminative capability for key postural features in complex industrial backgrounds. These advantages ensure that the subsequent weight estimation stage receives the most accurate visual inputs, which is critical for the high precision of the entire end-to-end system.

4.3. Validation of the Pose-Adaptive Regression Model

Having established a high-performance perception model, this section aims to independently validate the effectiveness of the heterogeneous pose-adaptive regression model library constructed in Section 3.3. All experiments were conducted on the independent test set of the standardized calibration dataset to ensure that the reported metrics reflect true generalization capability.
First, the performance of the three regression algorithms (MLR, KNN, SVR) was compared across all pose categories. To account for statistical variance and ensure the robustness of the results, the metrics are reported as the mean and standard deviation (Mean ± SD) obtained from the 5-fold cross-validation procedure. The results are summarized in Table 8.
The results confirm that no single algorithm achieves optimal performance across all poses, substantiating the rationale behind the heterogeneous model library. The low standard deviations (SD < 0.025) across all categories indicate that the selected models are highly stable and resistant to variations in data partitioning. By dynamically selecting the best-performing model for each specific pose (as indicated in the “Selected Model” column), the system can effectively adapt to various crayfish morphologies.
To evaluate the overall performance of this library under ideal conditions, a final validation was conducted on the standardized test set, with the results shown in Figure 14.
The scatter plot illustrates high consistency between predicted and actual values. Quantitative analysis (Mean ± SD) reveals an MAE of 1.75 ± 0.12 g, an RMSE of 2.3 ± 0.15 g, and an overall R2 of 0.96 ± 0.008. This performance demonstrates that the regression library possesses extremely high reliability and statistical significance, providing a trustworthy algorithmic core for the end-to-end system.

4.4. End-to-End System Evaluation

The final stage of evaluation focuses on the complete end-to-end system, which integrates Crayfish-YOLO with the pose-adaptive regression library, tested under realistic, complex conditions.

4.4.1. Overall Performance Under Complex Conditions

The evaluation strictly simulates a real-world application: Crayfish-YOLO performs inference to obtain contours and pose labels, followed by the dynamic invocation of the corresponding regression model. The comparison between final predicted weights and actual values is shown in Figure 15.
Experimental results show that the system remains highly robust even when perception model errors are introduced, achieving a mean MAE of 2.1 ± 0.15 g, a mean RMSE of 2.8 ± 0.21 g, and a mean R2 of 0.92 ± 0.02. Compared to the mean performance under ideal conditions (mean R2 = 0.96 ± 0.008) reported in Section 4.3, the end-to-end system exhibits only a minor decay. Based on the confusion matrix (Figure 12, Section 4.2.4), we analyzed the impact of pose misclassification on weight estimation. It is observed that most misclassifications occur between similar poses (e.g., UDS and US). Since the ‘Area’ feature—the dominant predictor—remains consistent across these similar categories, the system inherently buffers the impact of individual classification errors. This structural robustness explains why the estimation error remains stable even when perception errors are introduced, ensuring the high precision and stability of the entire system in practical industrial application scenarios. Notably, while Figure 12 shows a 5.1% pose misclassification rate, the total mean MAE increase from ideal conditions (1.75 g) to real-world deployment (2.1 g) is only 0.35 g. This indicates that most errors occur between similar poses (e.g., UDS and US). Since the ‘Area’ feature remains consistent across these categories, the system inherently buffers the impact of individual classification errors, demonstrating strong structural robustness.

4.4.2. Comparison of Different Technical Routes

To systematically evaluate advancement, this section presents a comparative experiment against two other technical routes in Table 9.
The experiment clearly reveals the advancement of the proposed framework. The effectiveness of the pose-adaptive strategy is validated as the baseline method significantly outperforms traditional vision methods. Furthermore, the integration of Crayfish-YOLO with this adaptive strategy achieves the best overall performance (mean R2 = 0.92), realizing a 4.5% gain over the baseline method while being significantly more lightweight. These results demonstrate the practical value of the proposed technical route in solving the intelligent grading problem for live crayfish.

5. Discussion

The experimental results presented in Section 4 demonstrate that the proposed framework successfully addresses the dual challenges of lightweight model deployment and pose-induced measurement errors in live crayfish weight estimation.

5.1. Significance of Perception Optimization

The success of the Crayfish-YOLO model confirms that extreme lightweighting (75.2% parameter reduction) does not necessarily come at the expense of accuracy. By integrating the Coordinate Attention (CA) mechanism and the CARAFE operator, the model effectively captures spatial-sensitive features and restores blurry contours caused by the motion of the conveyor belt. This suggests that for industrial edge devices, a targeted structural optimization—focusing on task-specific features (such as crayfish textures and shapes)—is more efficient than simply increasing the depth of the network.
Regarding industrial deployment, it is important to clarify that while the inference speed of 3.7 ms was measured on an RTX 4060 Ti for developmental consistency, the model’s extreme lightweighting (2.92 M parameters and 18.7 GFLOPs) indicates significant suitability for edge-computing hardware. The model’s minimal memory footprint (6.2 MB) is well-aligned with the constraints of industrial embedded systems, where storage and power efficiency are primary concerns. Future work will involve implementing TensorRT-based INT8 quantization to further optimize real-time performance on typical embedded platforms (e.g., NVIDIA Jetson series), ensuring robust operation in real-world industrial pipelines.

5.2. Effectiveness of the Pose-Adaptive Strategy

A key finding of this study is the significant performance gap between pose-adaptive and traditional static regression methods. As shown in the comparison of technical routes (Table 9), the pose-adaptive strategy achieved a substantial accuracy gain. This confirms the hypothesis that the 2D projected features of non-rigid organisms are highly dependent on their 3D posture. By constructing a heterogeneous model library (MLR, KNN, and SVR), the system can dynamically compensate for the information loss caused by tail curling or side-view projections, providing a robust solution for the dynamic measurement of non-rigid subjects.
It is worth noting that while end-to-end deep-learning regressing directly from image embeddings could theoretically capture more complex latent features, the current two-stage framework was selected for its superior industrial interpretability and sample efficiency. By explicitly utilizing seven core geometric metrics as a transparent “bridge,” the system provides a verifiable sorting logic and maintains high statistical stability in small-sample scenarios. More importantly, this modularity enables the independent optimization of regression models for specific poses, which is critical for handling the drastic non-linear contour deformations typical of live, non-rigid organisms.
Compared with existing methods for aquatic biomass estimation [7,9,16], our framework demonstrates a unique advantage. While traditional methods often struggle with either the computational overhead of high-resolution 3D reconstruction [11,12] or the low accuracy of simple geometric regressions [5], our pose-adaptive heterogeneous model library achieves a superior balance. By decoupling perception and estimation, the system maintains high precision even under the non-linear deformations characteristic of live crayfish, which is a significant improvement over static 2D-to-weight mapping methods.

5.3. Limitations and Practical Implications

While the proposed method achieves high precision (mean R2 = 0.92), certain limitations remain. The system primarily relies on contour-based geometric features; therefore, its accuracy may degrade when processing individuals with morphological abnormalities caused by disease or injury. Moreover, although the pose-adaptive strategy effectively addresses common posture variations, deducing volume or mass from 2D projections remains inherently vulnerable to scenarios involving severe occlusions or significant vertical morphological differences. Future research could explore the integration of 3D vision sensors, such as Time-of-Flight (ToF) or stereo depth cameras, to obtain volumetric data, which could potentially enhance estimation accuracy in more cluttered or non-standardized environments where 2D projections are insufficient. Additionally, the robustness of the segmentation model could be challenged in extremely crowded scenarios where multiple crayfish are severely clustered or overlapping on the conveyor belt. Addressing these issues through multi-modal sensor fusion and enhanced model training will be crucial for the further commercialization of the technology. Finally, we acknowledge that the current dataset was primarily collected in a controlled laboratory environment. While the perception model’s training process utilized stochastic online data augmentations (including the random flips mentioned in Section 2.2 and inherent pixel-level variations) to enhance its generalization, the model’s performance under extreme industrial lighting and across different crayfish sizes or species may still encounter domain shift. Future work will focus on domain adaptation techniques and the collection of multi-source datasets to ensure the transferability of the proposed framework in diverse, real-world aquaculture environments.

6. Conclusions

This research proposes a complete, lightweight weight estimation system incorporating pose awareness for live crayfish on industrial pipelines. The main contributions and findings are summarized as follows:
Lightweight Perception: The proposed Crayfish-YOLO model achieved a 1.1% improvement in core segmentation accuracy (mAP50~95 (Seg) = 0.791) compared to the baseline, despite significant reductions in parameters and GFLOPs by 75.2% and 56.2%, respectively. With an extremely compact model size of only 6.2 MB, the perception framework demonstrates substantial potential for real-time deployment on resource-constrained edge-computing devices.
High-Precision Estimation: By integrating the pose-adaptive strategy with a heterogeneous regression library, the end-to-end system demonstrated excellent performance under complex industrial conditions, achieving a mean coefficient of determination (R2) of 0.92 ± 0.02 and a Mean Absolute Error (MAE) of 2.1 ± 0.15 g. The structural robustness of the two-stage framework effectively buffers the impact of individual classification errors on the final weight output.
Industrial Applicability: The framework provides a reliable technical solution for developing automated grading equipment for crayfish and similar non-rigid aquatic products, addressing the challenges of dynamic measurement in unconstrained postures.
Future work will focus on domain adaptation techniques and integrating multi-modal information (such as texture and color) to enhance the recognition of abnormal individuals and ensure system transferability across different species and varied industrial backgrounds. Concurrently, we will pursue the porting of the model to embedded platforms with TensorRT optimization.

Author Contributions

Conceptualization, X.Y. and J.X.; methodology, M.H.; software, M.H. and J.W.; validation, M.H., J.W. and L.H.; formal analysis, M.H. and R.Z.; investigation, M.H., J.W. and L.H.; resources, X.Y., B.L. and J.X.; data curation, M.H. and J.W.; writing—original draft preparation, M.H.; writing—review and editing, X.Y., J.X. and R.Z.; visualization, M.H.; supervision, X.Y., J.X. and B.L.; project administration, X.Y. and J.X.; funding acquisition, X.Y. and J.X. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the General Program of the Hubei Provincial Natural Science Foundation (grant number 2023AFB381), the Youth Talent Project of the Science and Technology Research Program of the Hubei Provincial Department of Education (grant number Q20231412), and the Open Fund of Hubei Key Laboratory of Big Data in Science and Technology (grant number E4KF011001).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available on request from the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. National Fisheries Technology Extension Center. Report on the development of China’s crayfish industry. China Fish. 2025, 7, 10–16. (In Chinese) [Google Scholar]
  2. Sun, T.B.; Li, M. Design of control system for automatic crayfish grading pipeline. Electromech. Technol. 2017, 3, 40–41. (In Chinese) [Google Scholar]
  3. Wang, Y.; Yang, C.; Zeng, R.M. Design of crayfish grading algorithm based on machine vision. Sci. Technol. Eng. 2019, 19, 234–238. (In Chinese) [Google Scholar]
  4. Berillis, P.; Simon, C.; Mente, E.; Sofos, F.; Karapanagiotidis, I.T. A novel image processing method to determine the nutritional condition of lobsters. Micron 2013, 45, 140–144. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  5. Rodger, A.W.; Starks, T.A. Length–weight and morphological relationships for ecological studies involving ringed crayfish (Faxonius neglectus neglectus): An extraregional invader. Southeast. Nat. 2020, 19, 637–648. [Google Scholar] [CrossRef] [Scilit]
  6. Ayob, M.Z.; Sanusi, M.F.; Yusoff, S.B.; Ismail, N.F.; Baharuddin, H. Contactless fish weight estimation. In Proceedings of the 2024 IEEE International Conference on Agrosystem Engineering, Technology & Applications (AGRETA), Virtual, 7 September 2024; pp. 54–60. [Google Scholar] [CrossRef] [Scilit]
  7. Vo, S.A.; Scanlan, J.; Turner, P. An application of convolutional neural network to lobster grading in the southern rock lobster supply chain. Food Control 2020, 113, 107184. [Google Scholar] [CrossRef] [Scilit]
  8. Wang, H.; Zhu, H.; Bi, L.; Xu, W.; Song, N.; Zhou, Z.; Ding, L.; Xiao, M. Quality grading of river crabs based on machine vision and GA-BPNN. Sensors 2023, 23, 5317. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  9. Yu, X.; Wang, Y.; Liu, J.; Wang, J.; An, D.; Wei, Y. Non-contact weight estimation system for fish based on instance segmentation. Expert Syst. Appl. 2022, 210, 118403. [Google Scholar] [CrossRef] [Scilit]
  10. Al-Alawi, A.H.; Aloui, N.; Hamza, T.A.; Elhoda, M.C.; Echabibi, A.H.; Sobhy, N.M. Tilapia fish weight estimation in freshwater using deep learning and regression methods. In Proceedings of the International Conference on Artificial Intelligence Applications, Innovations and Ethics (AI2E), Muscat, Oman, 3–5 February 2025; pp. 1–5. [Google Scholar] [CrossRef] [Scilit]
  11. Wang, G.; Li, X.; Yu, J.; Xu, W.; Akhter, M.; Ji, S.; Hao, Y.; Li, D. Stereo matching and 3D reconstruction with NeRF supervision for accurate weight estimation in free-swimming fish. Comput. Electron. Agric. 2024, 225, 109255. [Google Scholar] [CrossRef] [Scilit]
  12. Wang, G.; Yu, J.; Liu, S.; Xu, W.; Li, X.; Hao, Y.; Li, D. Automatic fish weight estimation and 3D surface reconstruction with a lightweight instance segmentation model. Expert Syst. Appl. 2025, 288, 128275. [Google Scholar] [CrossRef] [Scilit]
  13. Ganesan, R.; Raghuram, C.; Rajesh, K.S.; Hemavathi, E.; Shanthi, S.; Muthulekshmi, M. Smart aquaculture for fish counting and weight estimation using YOLOv5. In Proceedings of the 6th International Conference on Electronics and Sustainable Communication Systems (ICESC), Coimbatore, India, 10–12 September 2025; pp. 1942–1947. [Google Scholar] [CrossRef] [Scilit]
  14. Kuswantori, A.; Suesut, T.; Tangsrirat, W.; Schleining, G.; Nunak, N. Fish detection and classification for automatic sorting system with an optimized YOLO algorithm. Appl. Sci. 2023, 13, 3812. [Google Scholar] [CrossRef] [Scilit]
  15. Ye, X.; Liu, Y.; Zhang, D.; Hu, X.; He, Z.; Chen, Y. Rapid and accurate crayfish sorting by size and maturity based on improved YOLOv5. Appl. Sci. 2023, 13, 8619. [Google Scholar] [CrossRef] [Scilit]
  16. Geng, C.; Wang, A.; Yang, C.; Xu, Z.; Xu, Y.; Liu, X.; Zhu, H. Application of improved YOLOv8n-seg in crayfish trunk segmentation. Isr. J. Aquacult.–Bamidgeh 2024, 76, 126850. [Google Scholar] [CrossRef] [Scilit]
  17. Wen, K.; Chen, Y.; Zhu, Z.; Yang, J.; Bao, J.; Fu, D.; Hu, Z.; Peng, X.; Jiao, M. A novel real-time crayfish weight grading method based on improved Swin Transformer. J. Food Sci. 2025, 90, e70008. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  18. Córdova, M.; Sokolova, M.; van Helmond, A.; Mencarelli, A.; Kootstra, G. Multi-stage image-based approach for fish detection and weight estimation. Biosyst. Eng. 2025, 257, 104239. [Google Scholar] [CrossRef] [Scilit]
  19. Tan, Z.; Xiao, D.; Liu, J.; Huang, Y.; Liu, Y. Cascade vision-based weight estimation algorithm for monitoring fattening pig weight. Comput. Electron. Agric. 2025, 236, 110384. [Google Scholar] [CrossRef] [Scilit]
  20. Ji, X.; Li, Q.; Guo, K.; Ma, W.; Li, M.; Xu, Z.; Yang, S.X.; Ren, Z. A machine learning-based method for pig weight estimation and the PIGRGB-Weight dataset. Agriculture 2025, 15, 814. [Google Scholar] [CrossRef] [Scilit]
  21. Howard, A.; Sandler, M.; Chu, G.; Chen, L.C.; Chen, B.; Tan, M.; Wang, W.; Zhu, Y.; Pang, R.; Vasudevan, V.; et al. Searching for MobileNetV3. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, Republic of Korea, 27–28 October 2019; pp. 1314–1324. [Google Scholar] [CrossRef] [Scilit]
  22. Hou, Q.; Zhou, D.; Feng, J. Coordinate attention for efficient mobile network design. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, TN, USA, 19–25 June 2021; pp. 13713–13722. [Google Scholar] [CrossRef] [Scilit]
  23. Wang, J.; Chen, K.; Xu, R.; Liu, Z.; Loy, C.C.; Lin, D. CARAFE: Content-aware reassembly of features. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, Republic of Korea, 27 October–2 November 2019; pp. 3007–3016. [Google Scholar] [CrossRef] [Scilit]
  24. Tong, Z.; Chen, Y.; Xu, Z.; Yu, R. Wise-IoU: Bounding box regression loss with dynamic focusing mechanism. arXiv 2023, arXiv:2301.10051. [Google Scholar] [CrossRef] [Scilit]
  25. Abimbola, L.A.; Oladoja, O.M.; Adegoke, T.M.; Oyebanjo, O.R. On linear modeling of blackpod disease in Ibadan (A forward stepwise selection approach). In Proceedings of the International Conference on Science, Engineering and Business Driving Sustainable Development Goals (SEB4SDG), Omu-Aran, Nigeria, 2–4 April 2024; pp. 1–6. [Google Scholar]
  26. Shabani, H.; Abdel-Mawgood, A.; Shimada, A. Tomato quality classification based on transfer learning feature extraction and machine learning algorithm classifiers. IEEE Access 2024, 12, 8283–8295. [Google Scholar] [CrossRef] [Scilit]
  27. Gültepe, Y.; Berber, S.; Gültepe, N. Modeling and predicting meat yield and growth performance using morphological features of narrow-clawed crayfish with machine learning techniques. Sci. Rep. 2024, 14, 18499. [Google Scholar] [CrossRef] [Scilit] [PubMed]
Figure 1. The crayfish image acquisition system: (a) industrial camera; (b) LED strip light source; (c) light-shielding baffle; (d) crayfish sample; (e) infrared sensor; (f) conveyor belt.
Figure 1. The crayfish image acquisition system: (a) industrial camera; (b) LED strip light source; (c) light-shielding baffle; (d) crayfish sample; (e) infrared sensor; (f) conveyor belt.
Applsci 16 03019 g001
Figure 2. Sample images from the complex-condition dataset, illustrating the six defined pose categories: (a) Upright-Straight; (b) Upright-Curled; (c) Upside-down-Straight; (d) Upside-down-Curled; (e) Side-Straight; and (f) Side-Curled.
Figure 2. Sample images from the complex-condition dataset, illustrating the six defined pose categories: (a) Upright-Straight; (b) Upright-Curled; (c) Upside-down-Straight; (d) Upside-down-Curled; (e) Side-Straight; and (f) Side-Curled.
Applsci 16 03019 g002
Figure 3. Image preprocessing workflow for the standardized dataset: (a) original captured image; (b) result of OTSU binarization; (c) main body mask after morphological processing.
Figure 3. Image preprocessing workflow for the standardized dataset: (a) original captured image; (b) result of OTSU binarization; (c) main body mask after morphological processing.
Applsci 16 03019 g003
Figure 4. Flowchart of the proposed overall algorithm, where the dashed box represents the Pose-Adaptive Regression Model Library.
Figure 4. Flowchart of the proposed overall algorithm, where the dashed box represents the Pose-Adaptive Regression Model Library.
Applsci 16 03019 g004
Figure 5. Architecture of the Crayfish-YOLO model.
Figure 5. Architecture of the Crayfish-YOLO model.
Applsci 16 03019 g005
Figure 6. Schematic diagram of the MobileNetV3 block (⊗ denotes element-wise multiplication).
Figure 6. Schematic diagram of the MobileNetV3 block (⊗ denotes element-wise multiplication).
Applsci 16 03019 g006
Figure 7. Architecture of the Coordinate Attention (CA) module.
Figure 7. Architecture of the Coordinate Attention (CA) module.
Applsci 16 03019 g007
Figure 8. Architecture of the CARAFE upsampling operator (⊗ denotes element-wise multiplication).
Figure 8. Architecture of the CARAFE upsampling operator (⊗ denotes element-wise multiplication).
Applsci 16 03019 g008
Figure 9. Effectiveness comparison of the ‘bounding rectangle length’ feature under different poses: (a) linear regression fit for the Upside-down-Straight (UDS) pose; (b) linear regression fit for the Upside-down-Curled (UDC) pose.
Figure 9. Effectiveness comparison of the ‘bounding rectangle length’ feature under different poses: (a) linear regression fit for the Upside-down-Straight (UDS) pose; (b) linear regression fit for the Upside-down-Curled (UDC) pose.
Applsci 16 03019 g009
Figure 10. Correlation matrix comparing seven contour features with weight for Upright-Straight and Upright-Curled poses: (a) Correlation between major dimensional features and weight. (b) Correlation between shape and boundary features and weight.
Figure 10. Correlation matrix comparing seven contour features with weight for Upright-Straight and Upright-Curled poses: (a) Correlation between major dimensional features and weight. (b) Correlation between shape and boundary features and weight.
Applsci 16 03019 g010
Figure 11. Comparison of fitting surfaces for three regression models under typical poses: (ac) Upright-Straight; (df) Side-Curled.
Figure 11. Comparison of fitting surfaces for three regression models under typical poses: (ac) Upright-Straight; (df) Side-Curled.
Applsci 16 03019 g011
Figure 12. Confusion matrix of pose classification for the Crayfish-YOLO model.
Figure 12. Confusion matrix of pose classification for the Crayfish-YOLO model.
Applsci 16 03019 g012
Figure 13. Comparison of detection results from different algorithms in complex scenarios.
Figure 13. Comparison of detection results from different algorithms in complex scenarios.
Applsci 16 03019 g013
Figure 14. Performance of the heterogeneous regression model library on the standardized test set.
Figure 14. Performance of the heterogeneous regression model library on the standardized test set.
Applsci 16 03019 g014
Figure 15. End-to-end weight estimation performance on the complex-condition test set.
Figure 15. End-to-end weight estimation performance on the complex-condition test set.
Applsci 16 03019 g015
Table 1. Distribution of crayfish samples across the six defined pose categories.
Table 1. Distribution of crayfish samples across the six defined pose categories.
Pose CategoryPerception DatasetCalibration DatasetTotal
Upside-down-Curled (UDC)148108256
Upside-down-Straight (UDS)281158439
Side-Curled (SC)8376159
Side-Straight (SS)118169287
Upright-Curled (UC)205124329
Upright-Straight (US)146154300
Total9817891770
Table 2. Core contour features and their descriptions.
Table 2. Core contour features and their descriptions.
IllustrationFeatureDescription
Applsci 16 03019 i001AreaThe total number of pixels enclosed by the contour, directly reflecting the target’s 2D projected size.
Applsci 16 03019 i002PerimeterThe total length of the contour’s edge, which indicates the target’s degree of extension and morphological complexity.
Applsci 16 03019 i003LengthThe length of the major axis of the minimum bounding rectangle, characterizing the target’s maximum scale in its principal direction.
Applsci 16 03019 i004WidthThe length of the minor axis of the minimum bounding rectangle, representing the target’s body width or thickness.
Applsci 16 03019 i005Aspect RatioThe ratio of length to width, measuring the shape’s elongation. Highly sensitive for distinguishing curled vs. straight poses.
Applsci 16 03019 i006CompactnessA standardized measure of shape regularity, quantifying how closely the contour resembles a perfect circle.
Applsci 16 03019 i007Equivalent DiameterThe diameter of a circle with the same area as the contour, converting area into a 1D length metric for comparison.
Table 3. Optimal feature subsets for each pose category.
Table 3. Optimal feature subsets for each pose category.
Pose CategoryCore Fused Features
Upright-Straight (US)Length, Area
Upside-down-Straight (UDS)Length, Area
Upright-Curled (UC)Area, Compactness, Perimeter
Upside-down-Curled (UDC)Area, Compactness, Perimeter
Side-Straight (SS)Area, Width, Length
Side-Curled (SC)Area, Width
Table 4. Training hyperparameters for the perception model.
Table 4. Training hyperparameters for the perception model.
ParameterValueParameterValue
Epochs300OptimizerSGD
Patience0lr00.01
Batch Size16lrf0.01
Image Size640Momentum0.937
Workers0Weight Decay0.0005
Close Mosaic10Warmup Epochs3.0
Table 5. Performance comparison of different instance segmentation models.
Table 5. Performance comparison of different instance segmentation models.
ModelPRmAP50mAP50~95 (Box)mAP50~95 (Seg)Params (M)GFLOPsSpeed (ms)Model Size (MB)
YOLOv5s-Seg0.8230.8880.9340.8690.7689.7838.12.919.9
YOLOv11s-Seg0.8450.8820.9530.8850.77710.0835.62.620.5
YOLOv8s-Seg0.8200.8850.9500.8940.78011.7942.72.623.9
Crayfish-YOLO0.8590.8490.9680.8930.7912.9218.73.76.2
Note: Since the mAP50 values for box detection and instance segmentation are identical in our multi-task training, a single mAP50 column is maintained for conciseness. Speed refers to the inference time measured on the RTX 4060 Ti.
Table 6. Performance comparison of various backbone architectures on the YOLOv8s-seg baseline.
Table 6. Performance comparison of various backbone architectures on the YOLOv8s-seg baseline.
BackbonemAP50Params (M)GFLOPsModel Size (MB)
Baseline (CSPDarknet)0.95011.7942.723.9
EfficientViT_M00.9637.7429.416.4
FasterNet_T00.9637.9830.716.3
StarNet_S0500.9555.9126.412.1
MobileNetV3 (Ours)0.9452.8018.55.9
Table 7. Ablation study of the proposed modules in Crayfish-YOLO.
Table 7. Ablation study of the proposed modules in Crayfish-YOLO.
IDConfigurationPRmAP50mAP50~95 (Box)mAP50~95 (Seg)Params (M)GFLOPsModel Size (MB)
1Baseline0.8200.8850.9500.8940.78011.7942.723.9
2Baseline + A0.8480.8690.9450.8570.7612.8018.55.9
3Baseline + A + B0.8640.7910.9390.8590.7642.9218.76.2
4Baseline + A + B + SE0.7990.8860.9470.8830.7712.9218.76.2
5Baseline + A + B + ECA0.8660.8950.9640.8860.7742.9218.76.2
6Baseline + A + B + CBAM0.7480.9090.9500.8450.7662.9318.76.2
7Baseline + A + B + CA0.7430.9470.9650.8850.7742.9218.76.2
8Crayfish-YOLO (A + B + CA + W)0.8590.8490.9680.8930.7912.9218.76.2
Note: Baseline denotes the original YOLOv8s-Seg framework; A: MobileNetV3, B: CARAFE, CA: Coordinate Attention, W: WIoUv2. The full model in row 8 incorporates all modules (A + B + CA + W). In experiment 8, the three versions of WIoU (v1, v2, and v3) were compared, with v2 being selected as it demonstrated the best performance. Since the mAP50 values for box detection and instance segmentation are identical in our multi-task training, a single mAP50 column is maintained for conciseness.
Table 8. Performance comparison (R2, Mean ± SD) of regression algorithms on the test set.
Table 8. Performance comparison (R2, Mean ± SD) of regression algorithms on the test set.
Pose CategoryMLRKNNSVRSelected Model
Upright-Straight (US)0.872 ± 0.0150.928 ± 0.0120.934 ± 0.009SVR
Upside-down-Straight (UDS)0.884 ± 0.0140.906 ± 0.0130.921 ± 0.011SVR
Upright-Curled (UC)0.863 ± 0.0180.846 ± 0.0210.836 ± 0.022MLR
Upside-down-Curled (UDC)0.874 ± 0.0160.921 ± 0.0100.900 ± 0.014KNN
Side-Straight (SS)0.945 ± 0.0080.934 ± 0.0110.942 ± 0.010MLR
Side-Curled (SC)0.882 ± 0.0170.828 ± 0.0240.843 ± 0.023MLR
Average Performance0.887 ± 0.0150.894 ± 0.0150.896 ± 0.015-
Table 9. End-to-end performance comparison of different technical routes.
Table 9. End-to-end performance comparison of different technical routes.
MethodPerception ModelEstimation StrategyR2 (Mean ± SD)MAE (Mean ± SD, g)
Traditional VisionOTSUSingle Area Regression0.65 ± 0.054.85 ± 0.42
Baseline MethodYOLOv8s-SegPose-Adaptive Regression0.88 ± 0.032.53 ± 0.18
Proposed MethodCrayfish-YOLOPose-Adaptive Regression0.92 ± 0.022.10 ± 0.15
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ye, X.; He, M.; Wang, J.; Huang, L.; Xu, J.; Zhang, R.; Li, B. An Approach to Crayfish Weight Estimation Based on Pose Awareness. Appl. Sci. 2026, 16, 3019. https://doi.org/10.3390/app16063019

AMA Style

Ye X, He M, Wang J, Huang L, Xu J, Zhang R, Li B. An Approach to Crayfish Weight Estimation Based on Pose Awareness. Applied Sciences. 2026; 16(6):3019. https://doi.org/10.3390/app16063019

Chicago/Turabian Style

Ye, Xuhui, Mingyang He, Jun Wang, Lilu Huang, Jing Xu, Rihui Zhang, and Bo Li. 2026. "An Approach to Crayfish Weight Estimation Based on Pose Awareness" Applied Sciences 16, no. 6: 3019. https://doi.org/10.3390/app16063019

APA Style

Ye, X., He, M., Wang, J., Huang, L., Xu, J., Zhang, R., & Li, B. (2026). An Approach to Crayfish Weight Estimation Based on Pose Awareness. Applied Sciences, 16(6), 3019. https://doi.org/10.3390/app16063019

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop