Abstract
Ovarian maturity in live female mud crabs (Scylla paramamosain) strongly affects harvest decisions and market value. Current ovarian maturity assessment relies mainly on expert-dependent methods that are subjective and destructive. Therefore, this study aimed to develop an interpretable, non-destructive image-based framework to classify crab ovarian maturity as immature or mature. A total of 240 crab image sets acquired using ventral external-view, dorsal external-view, and dorsal transillumination imaging were retained for analysis. Six primary morphometric features were semi-manually extracted from these views. External-view images quantified carapace width (CW), abdomen width (AW), abdomen area (AA), and sternum area (SA). Dorsal transillumination images yielded carapace area (CA) and ovary area (OA), an internal cue visualized through the intact carapace. To mitigate body-size variation, three ratio-based features—abdomen–carapace width ratio (ACWR), abdomen–sternum area ratio (ASAR), and ovary–carapace area ratio (OCAR)—were calculated. Between-class comparisons and correlation analyses were performed to guide candidate feature-set construction. Because OA and OCAR were strongly correlated, two reduced feature sets (Reduced 1 and Reduced 2) were designed to compare absolute ovary area with normalized ovary occupancy. Five feature sets—Raw, Ratio, Combined, Reduced 1, and Reduced 2—were evaluated using logistic regression (LR), support vector machine (SVM), and random forest (RF) classifiers. The Combined feature set, integrating all primary and ratio-based features, achieved the strongest mean cross-validated performance when paired with LR. On the held-out test set (n = 40), the final Combined-LR model achieved 0.950 accuracy and 0.997 ROC–AUC. On an independent practical implementation set (n = 40), the model correctly classified 39 specimens, achieving 0.975 accuracy. These findings may support non-destructive ovarian maturity screening and commercial grading in mud crab aquaculture.
Keywords:
mud crab; ovarian maturity; transillumination imaging; non-destructive assessment; machine learning; sustainable aquaculture Key Contribution:
This study presents an interpretable, non-destructive image-based framework for ovarian maturity classification in live female mud crabs (Scylla paramamosain). The framework links external morphology with ovary-related dorsal transillumination cues to distinguish immature from mature females. Compared with subjective visual inspection, it converts maturity-related visual cues into biologically meaningful image-derived features. This work provides a methodological basis for standardized maturity screening under practical aquaculture conditions.
1. Introduction
Mud crabs (Scylla spp.) are commercially important crustaceans with high demand in domestic and international seafood markets [1]. Mud crab farming plays a significant role in Thai aquaculture. From 2020 to 2024, mud crab production in Thailand increased from 2555.81 to 3689.25 tons, contributing 876.56 to 1220.91 million Baht to the economy [2,3]. Female mud crabs with well-developed ovaries are preferred by consumers due to their superior nutritional value and desirable flavor. As a result, these females command significantly higher prices than males [4]. The value of female crabs is closely tied to their ovarian maturity, underscoring the necessity of precise and efficient evaluation methods to support harvest decisions and commercial grading.
Currently, ovarian maturity assessment in live female mud crabs relies mainly on invasive examination or qualitative visual inspection. Invasive examination with a pointed tool exposes the ovary through a small opening near the carapace (Figure 1a). This procedure may injure specimens and lead to incorrect maturity assessment because visual access to the ovary is limited [5]. Illumination-assisted visual inspection serves as a non-destructive alternative (Figure 1b). Nevertheless, this method is subjective and can yield variable assessment results under non-standardized imaging conditions [5]. Abdominal flap morphology alone is also insufficient for reliable maturity assessment. The broad U-shaped abdomen commonly associated with mature females can also occur in immature individuals [6,7]. Dissection-based ovary examination and histological confirmation can provide more definitive evidence of maturity [8,9,10,11]. However, both procedures are destructive and unsuitable for routine assessment of live specimens. In commercial practice, the key task is to reliably distinguish immature from mature females. This binary decision is practically important because misclassification can reduce market value and increase unnecessary feeding costs.
Figure 1.
Current ovarian maturity assessment methods: (a) invasive examination using a pointed tool; (b) non-destructive illumination-assisted visual inspection.
These limitations highlight the need for robust non-destructive methods for routine ovarian maturity screening. Previous studies have shown that optical techniques can assess ovary-related internal conditions through the intact carapace [12,13]. These methods include near-infrared transmittance spectroscopy and transmission-mode multispectral imaging. However, practical application remains constrained by acquisition sensitivity, complex calibration, and destructive post-mortem reference validation. Our previous analytic hierarchy process (AHP)-based prioritization identified computer vision as a promising technology for aquaculture deployment [14]. This priority reflected affordability, operational simplicity, high throughput, and non-invasiveness. Therefore, image-based assessment may provide a standardized route for live mud crab maturity screening. Image-derived features have been applied to automated fish length evaluation [15], shrimp body-weight estimation using morphometric features [16], and squid size and species classification based on geometric features [17]. In crabs, quantitative image features have enabled shell condition classification [18] and gonadal maturity estimation [19]. These studies suggest that image-derived features combined with machine learning can support biological-trait assessment in aquatic species.
The image-derived features used in this study were designed to reflect known external and internal morphological changes during ovarian development. In Scylla paramamosain, the ovary enlarges markedly as maturation progresses [10]. This enlargement makes ovary area a biologically meaningful indicator of ovarian maturity. External traits, such as abdominal configuration and carapace width, may provide complementary morphological cues for assessing ovarian maturity [6,10]. Therefore, external width- and area-related features were extracted from ventral and dorsal external-view images. Carapace- and ovary-area features were obtained from dorsal transillumination images. Ratio-based features were calculated to reduce the influence of overall body size.
However, to our knowledge, previous studies have not combined ventral external-view, dorsal external-view, and dorsal transillumination imaging for ovarian maturity classification in live female mud crabs. Therefore, this study developed a non-destructive image-based framework that integrates these three views with machine learning. The framework uses interpretable image-derived features to link external morphology with ovary-related transillumination cues, supporting the classification of ovarian maturity as immature or mature. The proposed framework is intended to support standardized maturity screening under practical aquaculture conditions.
2. Materials and Methods
Figure 2 summarizes the study workflow, which comprises framework development (upper panel) and practical implementation (lower panel). During framework development, live female mud crabs underwent standardized image acquisition to obtain ventral external-view, dorsal external-view, and dorsal transillumination images. Experienced researchers assigned expert reference labels for classifying ovarian maturity as immature or mature. Primary morphometric features were extracted using semi-manual annotation, and ratio-based features were calculated from these primary features. Statistical analyses assessed differences between the immature and mature classes and potential redundancy among features. These analyses guided candidate feature-set construction. The feature sets and reference labels were used to train, tune, and evaluate three supervised machine-learning classifiers. During practical implementation, the selected model classified unseen specimens as immature or mature.
Figure 2.
Schematic workflow of the proposed non-destructive image-based framework for ovarian maturity classification in live female mud crabs. Abbreviations: CW, carapace width; AW, abdomen width; AA, abdomen area; SA, sternum area; CA, carapace area; OA, ovary area; ACWR, abdomen–carapace width ratio; ASAR, abdomen–sternum area ratio; and OCAR, ovary–carapace area ratio.
2.1. Framework Development
2.1.1. Collection of Live Female Mud Crabs
Live female mud crabs (Scylla paramamosain) were collected in March 2026 from a local market and the Songkhla Coastal Aquaculture Research and Development Center, Thailand. From this collection, 242 healthy females with intact external morphology were selected for subsequent imaging and analysis.
2.1.2. Image Acquisition
The custom imaging system consisted of a black imaging box, a sample tray, a smartphone (iPhone 13 mini, Apple Inc., Cupertino, CA, USA), a fixed side-mounted holder, and light sources. Illumination was provided by two red light-emitting diode (LED) flashlights (SMILING SHARK SD-1003, Guangzhou Smile Shark Lighting Technology Co., Ltd., Guangzhou, China). The system operated in two modes: external-view imaging and dorsal transillumination imaging. Images were saved in “.JPG” format at a resolution of 1280 × 960 pixels. The camera-to-sample distance was maintained at approximately 21 cm in both modes. External-view imaging captured visible external morphology. Dorsal transillumination imaging was used to visualize ovary-related internal cues beneath the dorsal carapace. The imaging setups and example images are shown in Figure 3.
Figure 3.
Image acquisition system and example images of live female mud crabs (Scylla paramamosain). (a) External-view imaging configuration; (b) ventral external-view image; (c) dorsal external-view image; (d) enclosed dorsal transillumination setup; and (e) dorsal transillumination image. The inset in panel (d) shows the two red LED light sources beneath the sample.
For external-view imaging, the smartphone was secured in the fixed side-mounted holder to maintain consistent imaging geometry. Each live female crab was placed on the sample tray inside the black imaging box (Figure 3a). Each crab was positioned with its ventral and dorsal sides facing the camera to acquire the corresponding external-view images under daylight illumination. Examples of ventral and dorsal external-view images are shown in Figure 3b,c, respectively. For dorsal transillumination imaging, each crab remained on the sample tray with its dorsal side facing the camera. The imaging system was reconfigured as an enclosed, light-controlled dorsal transillumination setup (Figure 3d) to minimize interference from ambient light. The smartphone was positioned centrally above the sample. Two red LED light sources were mounted beneath the crab on opposite sides and oriented obliquely inward at an angle of approximately 45°. This configuration directed red light from the ventral side through the crab body, enhancing the visibility of ovary-related patterns in the resulting transillumination image. An example of a dorsal transillumination image is shown in Figure 3e.
All acquired images were screened before annotation using predefined quality criteria (Figure 4). Good-quality images were retained when the landmarks or boundaries required for feature measurement were clearly visible. Inclusion criteria were applied to the images from both modes. Ventral external-view images required standardized orientation and clear abdomen and sternum boundaries for AW, AA, and SA measurements (Figure 4a). Dorsal external-view images needed visible left and right ninth anterolateral spine (AL9) tips for CW measurement (Figure 4c). Dorsal transillumination images had to exhibit a clear carapace boundary for CA measurement and sufficient contrast for OA delineation (Figure 4e). Poor-quality images were excluded when restraint bands obscured landmarks, boundaries were unclear, or contrast for OA delineation was insufficient (Figure 4b,d,f). When possible, excluded images were re-acquired; otherwise, the specimen was removed from the dataset.
Figure 4.
Image-quality screening criteria for external-view and dorsal transillumination images. Panels (a,c,e) show good-quality images retained for annotation, whereas panels (b,d,f) show poor-quality images rejected. AL9 denotes the ninth anterolateral spine; the left and right AL9 tips were used as landmarks for carapace width measurement. Yellow ellipses indicate representative problematic regions.
2.1.3. Semi-Manual Feature Definition and Measurement
A custom software tool developed in Python (version 3.11.5) was used for semi-manual annotation and morphometric feature extraction. Anatomical landmarks were manually selected, and polygonal regions of interest (ROIs) were delineated. Six primary morphometric features were obtained and three ratio-based features were calculated. Table 1 provides the biological context and operational definitions for each feature. Figure 5 illustrates the corresponding landmarks and polygonal ROIs. All annotations followed the study-specific landmark selection and ROI delineation protocol described in Table 1 and Figure 5.
Table 1.
Biological context and image-based operational definitions of primary morphometric features and ratio-based features.
Figure 5.
Anatomical landmarks and polygonal ROIs used for semi-manual morphometric measurement. (a) Dorsal external-view image showing carapace width (CW) between the left and right ninth anterolateral spine (AL9) tips; (b) ventral external-view image showing abdomen width (AW); (c) ventral external-view image showing abdomen area (AA) and sternum area (SA) ROIs; and (d) dorsal transillumination image showing carapace area (CA) and ovary area (OA) ROIs. Numbered points ①–⑨ in panel (d) indicate fixed carapace boundary landmarks for CA delineation.
For width-based measurements, CW and AW were defined as horizontal distances between two manually annotated landmarks. CW was measured between the left and right AL9 tips on dorsal external-view images (Figure 5a). AW was measured between the left and right lateral margins of pleon somite 5 at its widest point on ventral external-view images (Figure 5b). For each width variable, the pixel-based distance was calculated as follows:
where represents the measured width in pixels; for CW and for AW; and and denote the horizontal coordinates of the left and right landmarks, respectively.
For area-based measurements, AA, SA, CA, and OA were computed from manually delineated polygonal ROIs. AA and SA were delineated on ventral external-view images (Figure 5c). CA and OA were delineated on dorsal transillumination images (Figure 5d). The area of each polygonal ROI was calculated from its annotated vertices using the contour-area function cv2.contourArea() in OpenCV (version 4.9.0) [24]. CA was calculated from a single polygon delineating the carapace boundary. OA was calculated as the total area of one or more manually delineated ovary polygons. All area measurements were expressed in square pixels (px2).
For CA measurement, the dorsal carapace boundary was delineated using nine fixed landmarks (Figure 5d). These landmarks were placed along the visible carapace margin. AL1 and AL5 denote the first and fifth anterolateral spines, respectively. Landmarks ①–⑤ corresponded to the anterior midline point, the left AL1 tip, the left AL5 tip, the left AL9 tip, and the left posterior curvature apex, respectively. Landmarks ⑥–⑨ corresponded to the right posterior curvature apex, the right AL9 tip, the right AL5 tip, and the right AL1 tip, respectively. These fixed landmarks helped standardize polygon-based CA delineation. AA, SA, and OA were delineated directly from visible anatomical boundaries.
To reduce sensitivity to overall body size and minor geometric variation, three dimensionless ratio-based features were calculated from the primary morphometric features:
2.1.4. Expert Reference Labeling
Expert reference labels were established using visible cues of ovarian development. Ovarian maturation in Scylla paramamosain is commonly described using five stages, from Stage I to Stage V [6]. Gonadosomatic index (GSI) increases progressively during ovarian development [6,10]. Stage V showed the highest GSI and substantial accumulation of essential fatty acids in the ovaries [10]. Because this study focused on immature–mature screening, the five-stage framework was converted into a binary labeling scheme. Stages I–IV were assigned to the immature class, whereas Stage V was assigned to the mature class.
Examples of dorsal transillumination images and the corresponding exposed internal views after carapace removal are shown in Figure 6. This comparison links dorsal transillumination patterns with exposed ovarian morphology across ovarian maturation stages. Therefore, these patterns were used to support expert reference labeling. Labeling was guided by the visible contrast and extent of ovarian regions in the dorsal transillumination images. Specimens were labeled as mature only when a broad, high-contrast bilateral transillumination pattern was clearly present. Specimens without this distinct pattern were assigned to the immature class.
Figure 6.
Examples of dorsal transillumination images and corresponding exposed ovarian morphology across the five maturation stages (I–V) of female Scylla paramamosain.
Five experts, including university academics and crustacean aquaculture specialists, independently labeled each standardized image set. Labeling was based on dorsal transillumination patterns and the corresponding ovarian development cues. Inter-rater agreement was quantified using Fleiss’ kappa [25], which estimates agreement beyond chance. Only specimens with agreement from at least four of five experts were retained. Specimens below this threshold were excluded. The consensus-derived label for each retained specimen served as the reference label for supervised model development.
2.1.5. Statistical Analysis of Image-Derived Features
Image-derived features were analyzed to assess between-class differences and potential redundancy among features. These features included six primary features (CW, AW, AA, SA, CA, and OA) and three ratio-based features (ACWR, ASAR, and OCAR). Normality was assessed using the Shapiro–Wilk test [26]. Descriptive statistics were summarized according to distributional characteristics. Normally distributed variables were presented as mean ± standard deviation. Non-normally distributed variables were expressed as median (interquartile range). Comparisons between immature and mature females were performed using independent-samples t-tests or Mann–Whitney U tests. Test selection was based on the normality results. Statistical significance was set at p < 0.05. Spearman’s rank correlation coefficient (ρ) was used to assess pairwise monotonic associations among features [27]. Correlation strength was classified according to published criteria for correlation coefficients [28]. These analyses characterized feature distributions, between-class differences, and associations among features, guiding candidate feature-set construction for supervised classification.
2.1.6. Model Training, Tuning, and Evaluation
Model training. Candidate feature sets and expert reference labels served as inputs for supervised model development. The framework used structured morphometric features rather than whole-image pixel data. Therefore, classical machine-learning models were selected to support model interpretability and accommodate the dataset size. Three classifiers were evaluated: logistic regression (LR), support vector machines (SVM) [29], and random forest (RF) [30]. These classifiers were used to distinguish immature from mature individuals. LR served as an interpretable linear baseline. SVM provided a kernel-based method for nonlinear binary separation. RF served as an ensemble method for nonlinear relationships and feature interactions. These classifiers represent complementary linear and nonlinear classification strategies. They have been widely used in image-based classification studies [18,19,31,32].
Hyperparameter tuning. The dataset was partitioned into stratified training set (80%) and held-out test set (20%), following established protocols for performance estimation in crustacean maturity classification [19]. Model training, hyperparameter tuning, and validation were conducted using the training set only. The held-out test set was reserved for final performance evaluation. Hyperparameters were optimized using grid search with stratified five-fold cross-validation. For SVM, the penalty parameter (C) and kernel coefficient (γ) were tuned. For RF, the number of trees, tree depth, node-splitting samples, and feature-subsampling settings were optimized. For classifiers requiring feature scaling, scaling parameters were estimated from the training data only and then applied to the validation folds and the held-out test set [33].
Model evaluation and selection. Model performance was quantified using six metrics: accuracy, recall, specificity, precision, F1-score, and area under the receiver operating characteristic curve (ROC–AUC) (Equations (5)–(10)). These metrics were calculated as follows:
For these evaluations, mature and immature females were defined as the positive and negative classes, respectively. Model outcomes were categorized as true positive (TP; mature correctly identified), false negative (FN; mature identified as immature), true negative (TN; immature correctly identified), and false positive (FP; immature identified as mature).
Accuracy quantified overall classification correctness. Recall and specificity measured the ability to correctly identify mature and immature individuals. Precision reflected the reliability of mature predictions, and the F1-score summarized the balance between precision and recall. ROC–AUC provided a threshold-independent measure of classifier discrimination calculated via the true positive rate (), and false positive rate ().
Each candidate feature set was evaluated using LR, SVM, and RF. For model comparison, feature set–classifier pairings were ranked by mean cross-validation performance. ROC–AUC was used as the primary ranking criterion [34]. F1-score and accuracy were used as secondary criteria when ROC–AUC values were similar. Following model selection, the highest-ranked pairing was refitted on the entire training set [35] and subsequently evaluated on the held-out test set [36].
2.2. Practical Implementation of the Proposed Framework
For practical implementation, the selected feature set–classifier combination was refitted using the full model-development dataset (n = 200). The refitted model was then applied to the reserved practical implementation set (n = 40). Images in this set were acquired using the same external-view and dorsal transillumination protocols. Only the primary morphometric features required to derive the selected feature set were obtained. When required, ratio-based features were calculated from these primary features. The resulting feature inputs were processed by the refitted classifier. Each specimen was classified as immature or mature.
3. Results and Discussion
3.1. Dataset Construction and Feature Analysis
After image-quality screening, 240 standardized image sets were retained for analysis. Each set comprised ventral external-view, dorsal external-view, and dorsal transillumination images. Two image sets were excluded because at least one required view failed the predefined quality criteria and could not be re-acquired. Expert reference labeling showed high inter-rater agreement among five experts (Fleiss’ κ = 0.96). This result indicated highly consistent reference-label assignment for subsequent model development. Among the 240 consensus-labeled image sets, a balanced subset of 200 was allocated to model development. This subset represented 100 immature and 100 mature females. The model-development dataset was divided into a stratified training set and a held-out test set. The training set (n = 160; 80 immature, 80 mature) was used for model training, hyperparameter tuning, and five-fold cross-validation. The held-out test set (n = 40; 20 immature, 20 mature) was used only for final model evaluation. The remaining 40 image sets, comprising 18 immature and 22 mature females, were reserved as an independent practical implementation set. This set was not used for model training, tuning, feature-set selection, or held-out test evaluation.
Table 2 presents descriptive statistics and between-class comparisons for the image-derived features. AW, AA, SA, CA, OA, ACWR, and OCAR differed significantly between immature and mature females (p < 0.05). In contrast, CW (p = 0.086) and ASAR (p = 0.222) did not differ significantly between the two maturity classes. Mature females generally showed higher values for abdomen-, sternum-, carapace-, and ovary-related features. This pattern suggests that ovarian maturity was associated with internal ovarian development and measurable external morphological variation. Mature females had higher median OA (103,002 px2) and OCAR (0.372) than immature females (60,101.5 px2 and 0.241). These differences are biologically consistent with ovarian enlargement during maturation in Scylla paramamosain [6,10]. As the ovary enlarges, its visible extent and proportional occupancy beneath the dorsal carapace increase. Therefore, OA and OCAR captured important maturity-related information from dorsal transillumination images. The significant differences in AW, AA, SA, and ACWR suggest complementary discriminatory value from external morphology. The between-class difference in CW was not significant, suggesting that carapace width alone was insufficient for maturity discrimination. Similarly, the between-class difference in ASAR was not significant, indicating that not all ratio-based features provided additional discriminatory value.
Table 2.
Descriptive statistics and between-class comparisons for image-derived features in the model-development dataset.
The Spearman correlation matrix revealed potential redundancy among several image-derived features (Figure 7). Strong positive correlations were observed for OA–OCAR (ρ = 0.90), CW–AW (ρ = 0.87), and AA–SA (ρ = 0.83). These correlations suggest that some feature pairs captured partially overlapping morphological or ovary-related information. The strong OA–OCAR correlation was expected because OCAR was calculated as OA divided by CA. OA reflects absolute ovary area, whereas OCAR reflects ovary area normalized by carapace area. Therefore, these two features may represent related but not identical maturity information. The strong CW–AW correlation suggests covariation between carapace width and abdomen width, consistent with previous findings in female Scylla paramamosain during ovarian maturation [10]. The strong AA–SA correlation may reflect covariation between ventral area-based measurements in the present dataset. CA also showed a substantial positive association with OA (ρ = 0.73). This association suggests that absolute ovary area may partly scale with carapace size. In contrast, ASAR showed a moderate negative correlation with SA (ρ = −0.46). This negative correlation is consistent with SA serving as the denominator in the ASAR formula. It suggests that ASAR was partly influenced by sternum-area variation. Collectively, these results indicate both complementary and redundant information in the feature space. Therefore, correlation analysis supported candidate feature-set construction during model development. Performance-based model comparison was then used to determine the most suitable feature representation for classification.
Figure 7.
Spearman correlation matrix of the nine image-derived features used for candidate feature-set construction. Abbreviations: CW, carapace width; AW, abdomen width; AA, abdomen area; SA, sternum area; CA, carapace area; OA, ovary area; ACWR, abdomen–carapace width ratio; ASAR, abdomen–sternum area ratio; and OCAR, ovary–carapace area ratio.
Based on the between-class comparisons and correlation analysis, five candidate feature sets were constructed to compare interpretable feature representations for supervised classification (Table 3). The Raw set served as a baseline and included six primary image-derived features. The Ratio set evaluated whether normalized ratio-based features could reduce the influence of body-size variation. The Combined set integrated all primary and ratio-based features to test whether these features provided complementary information. Two correlation-guided reduced feature sets were constructed to reduce redundancy while preserving biologically relevant information. CW and ASAR were excluded from the reduced sets because they did not differ significantly between maturity classes. AW was represented by ACWR, which normalized abdomen width by carapace width. AA was retained as a direct ventral abdomen-area feature. SA was not retained separately because it was strongly correlated with AA. CA was not retained separately because it was used to normalize OA in OCAR and was substantially associated with OA. Because OA and OCAR were strongly correlated, Reduced 1 used OCAR to represent normalized ovary occupancy, whereas Reduced 2 used OA to represent absolute ovary area. This design allowed performance-based comparison of full, ratio-based, combined, and reduced feature representations.
Table 3.
Candidate feature sets used for supervised model development.
3.2. Model Comparison and Final Model Evaluation
Table 4 summarizes the cross-validated performance of the 15 feature set–classifier combinations. Across all combinations, accuracy ranged from 0.9169 to 0.9881, and ROC–AUC ranged from 0.9736 to 0.9997. These results indicate that the image-derived features were informative for maturity discrimination. However, performance varied across feature representations and classifiers. The Combined feature set generally produced the strongest and most stable results across the three classifiers: LR, SVM, and RF. This trend suggests that primary and ratio-based features provided complementary information. The Raw feature set also performed well, but it did not include normalized ratio features. The Ratio feature set showed lower performance in several classifier combinations. This finding indicates that ratio-based features alone may not capture all maturity-related information. The Reduced feature sets (Reduced 1 and Reduced 2) provided compact representations but showed lower and less stable performance. This suggests that removing correlated features may also remove useful complementary information. Among all feature set–classifier combinations, Combined-LR achieved the highest mean values across all six metrics. Its accuracy, F1-score, and ROC–AUC were 0.9881 ± 0.0176, 0.9882 ± 0.0173, and 0.9997 ± 0.0011, respectively. The corresponding recall, specificity, and precision were 0.9875 ± 0.0250, 0.9888 ± 0.0298, and 0.9897 ± 0.0271. Although SVM and RF also achieved strong performance, neither provided a clear improvement over Combined-LR. Therefore, Combined-LR was selected as the final model because it provided the strongest cross-validated performance with an interpretable classifier structure.
Table 4.
Cross-validated classification performance of logistic regression (LR), support vector machine (SVM), and random forest (RF) across the five candidate feature sets in the model-development dataset.
Figure 8 presents the held-out test performance of the final Combined-LR model. The model correctly classified 38 of 40 crabs. This included 19 of 20 immature females and 19 of 20 mature females. Two misclassifications occurred. One immature female was classified as mature, and one mature female was classified as immature. These errors may reflect borderline morphology or transillumination patterns near the class boundary. An immature female with enlarged abdomen- or ovary-related regions may be classified as mature. Conversely, a mature female with weak ovary contrast or partial ovary visibility may be classified as immature. Carapace opacity, illumination uniformity, crab positioning, and semi-manual ROI delineation may also contribute to uncertainty. Future improvements should include more borderline samples, illumination calibration, automated segmentation, and low-confidence rechecking. Despite these errors, the model maintained balanced performance. Accuracy, recall, specificity, precision, and F1-score all reached 0.950. The ROC-AUC was 0.997, indicating strong discriminatory ability. Therefore, the Combined-LR model was further evaluated using the practical implementation set.
Figure 8.
Confusion matrix of the final Combined-LR model on the held-out test set.
3.3. Practical Implementation, Limitations, and Future Directions
The reserved practical implementation set was evaluated using the refitted Combined-LR model. This set included 40 live female mud crabs, comprising 18 immature and 22 mature females. The model correctly classified 39 of 40 specimens, yielding an accuracy of 0.975. All 18 immature females were correctly identified, whereas one mature female was misclassified as immature. This misclassification may be related to weak ovary contrast or partial ovary visibility in the mature specimen. Figure 9 illustrates model prediction examples using one immature and one mature specimen. The high implementation accuracy suggests that the proposed framework performed well under the standardized imaging workflow.
Figure 9.
Practical implementation examples using the Combined-LR model: (a) correctly classified immature specimen and (b) correctly classified mature specimen. Each example includes ventral external-view, dorsal external-view, and dorsal transillumination images, together with the model prediction, expert reference label, and classification result. Reference labels were assigned by expert consensus.
From an application perspective, the proposed framework supports a critical decision in mud crab aquaculture: classifying ovarian maturity in live female crabs as immature or mature. By integrating external-view and dorsal transillumination imaging, the framework avoids destructive internal examination during routine classification. This approach is consistent with a previous light-transmission-based study [5], which showed that ovary-related information can support non-invasive maturity assessment in crabs. Therefore, the framework offers a standardized and quantitative alternative to subjective visual inspection. It may support maturity screening and commercial grading under standardized imaging conditions.
These results should be interpreted within the controlled conditions of the present study. Image acquisition was performed using a standardized system with fixed imaging geometry. Feature extraction followed predefined landmarks and ROIs to ensure measurement consistency. Broader deployment may introduce variability in illumination, specimen positioning, device-specific imaging characteristics, image scale, and the visibility of landmarks and ROIs, which could affect feature extraction and classification performance [37]. Reference labels were assigned by expert consensus rather than histological confirmation for every specimen, although the high inter-rater agreement supported labeling consistency. The semi-manual annotation workflow may also introduce operator-dependent variability. Finally, the present study focused on binary ovarian maturity classification, separating females into immature and mature classes.
Accordingly, future work should focus on several directions. First, larger and more diverse datasets should be collected across farms, sampling periods, operators, devices, and imaging conditions to evaluate model generalizability. Imaging calibration and scale normalization should also be incorporated to reduce the effects of device differences and image-scale variation. Second, future validation should include histological confirmation for representative and borderline cases to strengthen reference-label validation. Third, automated segmentation and feature extraction should be developed to reduce operator-dependent variability. Larger datasets could also support end-to-end deep learning for direct maturity classification. Finally, the framework should be extended from binary ovarian maturity classification to multiclass ovarian stage classification, which could support finer reproductive monitoring and stage-specific aquaculture management.
4. Conclusions
This study developed an interpretable, non-destructive, image-based framework for classifying the ovarian maturity of live female mud crabs (Scylla paramamosain) as either immature or mature. The framework integrated standardized image acquisition, semi-manual feature extraction, expert reference labeling, feature analysis, machine-learning model development, and practical implementation. Following image-quality screening, 240 standardized image sets were retained. A balanced subset of 200 image sets (100 immature and 100 mature) was used for model development. This model-development dataset included a training set (n = 160; 80 immature, 80 mature) and a held-out test set (n = 40; 20 immature, 20 mature). The remaining 40 image sets were reserved as an independent practical implementation set (18 immature, 22 mature). This separated workflow allowed model training and tuning, held-out test evaluation, and practical implementation to be assessed independently. Nine image-derived features were used in the framework. Six primary morphometric features were semi-manually extracted from ventral external-view, dorsal external-view, and dorsal transillumination images. Specifically, external-view images quantified CW, AW, AA, and SA, while dorsal transillumination images yielded CA and OA. Three ratio-based features were calculated: ACWR, ASAR, and OCAR. Together, these primary morphometric and ratio-based features successfully bridge external morphology with internal, ovary-related dorsal transillumination cues. Feature analysis showed significant between-class differences in seven of the nine features. This supported the construction of five candidate feature sets: Raw, Ratio, Combined, Reduced 1, and Reduced 2. These feature sets were subsequently evaluated using LR, SVM, and RF classifiers. Among all feature set–classifier combinations, the Combined feature set (CW, AW, AA, SA, CA, OA, ACWR, ASAR, and OCAR) paired with LR achieved the strongest cross-validated performance. The final Combined-LR model achieved accuracies of 0.950 on the held-out test set and 0.975 on the independent practical implementation set. These results indicate that primary morphometric features and ratio-based features provided complementary information for maturity discrimination. The proposed framework may support standardized maturity screening and commercial grading in sustainable mud crab aquaculture. Further validation with larger and more diverse datasets would strengthen its broader application under practical aquaculture conditions.
Supplementary Materials
The following supporting information can be downloaded at https://www.mdpi.com/article/10.3390/fishes11070388/s1. Table S1: Optimal hyperparameters for the 15 feature set–classifier combinations evaluated in this study.
Author Contributions
Conceptualization, methodology, writing—review and editing, G.H., K.T., and S.C.; software, formal analysis, investigation, data curation, writing—original draft preparation, visualization, G.H.; validation, K.T., S.C. and N.N.; resources, supervision, funding acquisition, K.T. and S.C.; project administration, K.T., S.C. and N.N. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the National Science, Research and Innovation Fund (NSRF) and Prince of Songkla University (Grant No. ENG67012405). The APC was jointly funded by Guoxiang Huang and Grant No. ENG67012405.
Institutional Review Board Statement
The animal study protocol was approved by the Institutional Animal Care and Use Committee, Prince of Songkla University, Thailand. (Ref. AI028/2024; approval date: 26 March 2024).
Data Availability Statement
The data presented in this study may be made available upon reasonable request from the corresponding authors because the raw image dataset forms part of an ongoing research project.
Acknowledgments
The authors gratefully acknowledge the Songkhla Coastal Aquaculture Research and Development Center for their valuable support in the assessment of crab ovarian development.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Syafaat, M.N.; Azra, M.N.; Waiho, K.; Fazhan, H.; Abol-Munafi, A.B.; Ishak, S.D.; Syahnon, M.; Ghazali, A.; Ma, H.; Ikhwanuddin, M. A Review of the Nursery Culture of Mud Crabs, Genus Scylla: Current Progress and Future Directions. Animals 2021, 11, 2034. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Fishery Statistics Group. Statistics of Sea Crabs Culture Survey 2020; Fisheries Development Policy and Planning Division: Bangkok, Thailand, 2021; p. 27. Available online: https://www4.fisheries.go.th/local/file_document/20211123105837_new.pdf (accessed on 6 June 2026).
- Fishery Statistics Group. Statistics of Sea Crabs Culture Survey 2024; Fisheries Development Policy and Planning Division: Bangkok, Thailand, 2025; p. 24. Available online: https://www4.fisheries.go.th/local/file_document/20250717111510_1_file.pdf (accessed on 6 June 2026).
- Murak; Waiho, K.; Fazhan, H.; Ahmad, M.S.; Lan, K.-W.; Ma, H.; Ikhwanuddin, M. Emerging Challenges and Sustainability Pathways in Global Aquaculture of Mud Crab (Genus Scylla). Aquac. Int. 2026, 34, 105. [Google Scholar] [CrossRef] [Scilit]
- Thongkaew, K.; Duangsoithong, R.; Chaiprapat, S.; Gonsrang, S.; Nuntapong, N.; Chuaduangpui, P. An Integrated FMEA–QFD and Image Processing Approach for Ovarian Maturity Classification in Crab Processing Systems. J. Adv. Manuf. Technol. 2026, 20, 115–132. [Google Scholar]
- Islam, M.S.; Kodama, K.; Kurokora, H. Ovarian Development of the Mud Crab Scylla paramamosain in a Tropical Mangrove Swamps, Thailand. J. Sci. Res. 2010, 2, 380–389. [Google Scholar] [CrossRef] [Scilit]
- Islam, M.S.; Kodama, K.; Kurokura, H. Ovarian Development and Size at Maturity of the Mud Crab Scylla olivacea in Pak Phanang Mangrove Swamps, Thailand. Mar. Biol. Res. 2010, 6, 503–510. [Google Scholar] [CrossRef] [Scilit]
- Alava, V.R.; Quinitio, E.T.; De Pedro, J.B.; Priolo, F.M.P.; Orozco, Z.G.A.; Wille, M. Lipids and Fatty Acids in Wild and Pond-Reared Mud Crab Scylla serrata (Forsskål) During Ovarian Maturation and Spawning. Aquac. Res. 2007, 38, 1468–1477. [Google Scholar] [CrossRef] [Scilit]
- Aaqillah-Amr, M.A.; Hidir, A.; Noordiyana, M.N.; Ikhwanuddin, M. Morphological, Biochemical and Histological Analysis of Mud Crab Ovary and Hepatopancreas at Different Stages of Development. Anim. Reprod. Sci. 2018, 195, 274–283. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Wu, Q.; Waiho, K.; Huang, Z.; Li, S.; Zheng, H.; Zhang, Y.; Ikhwanuddin, M.; Lin, F.; Ma, H. Growth Performance and Biochemical Composition Dynamics of Ovary, Hepatopancreas and Muscle Tissues at Different Ovarian Maturation Stages of Female Mud Crab, Scylla paramamosain. Aquaculture 2020, 515, 734560. [Google Scholar] [CrossRef] [Scilit]
- Kahar, N.A.S.; Yong, A.S.K.; Sharif, N.A.M.; Hussein, M.A.S.; Ransangan, J. Reproductive Cycle and Size at Maturity of Wild Mud Crab, Scylla tranquebarica (Fabricus, 1798) in Marudu Bay, Sabah. Borneo J. Mar. Sci. Aquac. (BJoMSA) 2022, 6, 20–29. [Google Scholar] [CrossRef] [Scilit]
- Lu, M.; Zhang, C.; Jiang, S.; Yi, J.; Gu, X.; Wang, C.; Zhu, D.; Chen, T. A Non-Destructive Detection Method for Crab Roe Within Live Chinese Mitten Crabs (Eriocheir sinensis) via Near-Infrared Transmittance Spectroscopy. LWT 2025, 235, 118632. [Google Scholar] [CrossRef] [Scilit]
- Vo, H.-D.; Tran, N.-T.; Fukuzawa, M. Non-Destructive Detection of Ovary Regions in Live Female Mud Crabs by Machine-Learning Assisted Multispectral Imaging. CTU J. Innov. Sustain. Dev. 2025, 17, 47–56. [Google Scholar] [CrossRef] [Scilit]
- Huang, G.; Thongkaew, K.; Chaiprapat, S. A Review of Non-Destructive Technologies for Quality Assessment in Aquaculture. Aquac. J. 2026, 6, 3. [Google Scholar] [CrossRef] [Scilit]
- Deng, Y.; Tan, H.; Tong, M.; Zhou, D.; Li, Y.; Zhu, M. An Automatic Recognition Method for Fish Species and Length Using an Underwater Stereo Vision System. Fishes 2022, 7, 326. [Google Scholar] [CrossRef] [Scilit]
- Setiawan, A.; Hadiyanto, H.; Widodo, C.E. Shrimp Body Weight Estimation in Aquaculture Ponds Using Morphometric Features Based on Underwater Image Analysis and Machine Learning Approach. Rev. Intell. Artif. 2022, 36, 905–912. [Google Scholar] [CrossRef] [Scilit]
- Thammachot, N.; Waiyakarn, K.; Chaiprapat, S.; Jirasatitsin, S. Computer Vision for Splendid Squid Size and Species Classification. J. Adv. Manuf. Technol. 2019, 13, 45–60. [Google Scholar]
- Kadri, I.; Surette, T.; Ahmed Selouani, S.; Ghribi, M.; LeBlanc, R. Automated Classification of Snow Crab Shell Condition Using Analysis of Field Images. IEEE Access 2025, 13, 113438–113448. [Google Scholar] [CrossRef] [Scilit]
- Kim, J.; Kwon, D.; Lee, S. Estimation of the Length at First Maturity of the Swimming Crab (Portunus trituberculatus) in the Yellow Sea of Korea Using Machine Learning. J. Mar. Sci. Eng. 2026, 14, 335. [Google Scholar] [CrossRef] [Scilit]
- Waiho, K.; Fazhan, H.; Ikhwanuddin, M. Size Distribution, Length–Weight Relationship and Size at the Onset of Sexual Maturity of the Orange Mud Crab, Scylla olivacea, in Malaysian Waters. Mar. Biol. Res. 2016, 12, 726–738. [Google Scholar] [CrossRef] [Scilit]
- Jadamec, L.S.; Donaldson, W.E.; Cullenberg, P. Biological Field Techniques for Chionoecetes Crabs; Alaska Sea Grant: Fairbanks, AK, USA, 1999. [Google Scholar]
- Luque, J.; Xing, L.; Briggs, D.E.G.; Clark, E.G.; Duque, A.; Hui, J.; Mai, H.; McKellar, R.C. Crab in Amber Reveals an Early Colonization of Nonmarine Environments during the Cretaceous. Sci. Adv. 2021, 7, eabj5689. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Quezada-Villa, K.; Cannizzo, Z.J.; Carver, J.; Dunn, R.P.; Fletcher, L.S.; Kimball, M.E.; McMullin, A.L.; Orocu, B.; Pfirrmann, B.W.; Pinkston, E.; et al. Predicting Diet in Brachyuran Crabs Using External Morphology. PeerJ 2023, 11, e15224. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Bradski, G. The opencv library. Dr. Dobb’s J. Softw. Tools Prof. Program. 2000, 25, 120–125. [Google Scholar]
- Fleiss, J.L. Measuring Nominal Scale Agreement Among Many Raters. Psychol. Bull. 1971, 76, 378–382. [Google Scholar] [CrossRef] [Scilit]
- Shapiro, S.S.; Wilk, M.B. An Analysis of Variance Test for Normality (Complete Samples). Biometrika 1965, 52, 591–611. [Google Scholar] [CrossRef] [Scilit]
- Spearman, C. The Proof and Measurement of Association Between Two Things. Am. J. Psychol. 1904, 15, 72–101. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Schober, P.; Boer, C.; Schwarte, L.A. Correlation Coefficients: Appropriate Use and Interpretation. Anesth. Analg. 2018, 126, 1763. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Cortes, C.; Vapnik, V. Support-Vector Networks. Mach. Learn. 1995, 20, 273–297. [Google Scholar] [CrossRef] [Scilit]
- Breiman, L. Random Forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef] [Scilit]
- Saberioon, M.; Císař, P.; Labbé, L.; Souček, P.; Pelissier, P.; Kerneis, T. Comparative Performance Analysis of Support Vector Machine, Random Forest, Logistic Regression and k-Nearest Neighbours in Rainbow Trout (Oncorhynchus Mykiss) Classification Using Image-Based Features. Sensors 2018, 18, 1027. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Thanasarn, N.; Chaiprapat, S.; Waiyakan, K.; Thongkaew, K. Automated Discrimination of Deveined Shrimps Based on Grayscale Image Parameters. J. Food Process Eng. 2019, 42, e13041. [Google Scholar] [CrossRef] [Scilit]
- Koukaras, P.; Tjortjis, C. Data Preprocessing and Feature Engineering for Data Mining: Techniques, Tools, and Best Practices. AI 2025, 6, 257. [Google Scholar] [CrossRef] [Scilit]
- Bradley, A.P. The Use of the Area Under the ROC Curve in the Evaluation of Machine Learning Algorithms. Pattern Recognit. 1997, 30, 1145–1159. [Google Scholar] [CrossRef] [Scilit]
- Varma, S.; Simon, R. Bias in Error Estimation When Using Cross-Validation for Model Selection. BMC Bioinform. 2006, 7, 91. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Cawley, G.C.; Talbot, N.L.C. On Over-Fitting in Model Selection and Subsequent Selection Bias in Performance Evaluation. J. Mach. Learn. Res. 2010, 11, 2079–2107. [Google Scholar]
- Yang, L.; Liu, Y.; Yu, H.; Fang, X.; Song, L.; Li, D.; Chen, Y. Computer Vision Models in Intelligent Aquaculture with Emphasis on Fish Detection and Behavior Analysis: A Review. Arch. Comput. Methods Eng. 2021, 28, 2785–2816. [Google Scholar] [CrossRef] [Scilit]
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. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.








