Improved YOLOv8-Based Method for the Carapace Keypoint Detection and Size Measurement of Chinese Mitten Crabs - Ke Chen; Zhuquan Chen; Changbo Wang; Zhifan Zhou; Maohua Xiao; Hong Zhu; Dongfang Li; Weimin Liu (Animals)
The carapace size of the Chinese mitten crab (Eriocheir sinensis) is a vital indicator for assessing the growth performance of crabs. However, measuring the carapace sizes of Chinese mitten crabs remains challenging due to environmental complexity, species-specific behavioral patterns, and the current limitations of data acquisition methods characterized by labor-intensive manual measurements and subjective empirical judgments. Our study proposes an automated carapace dimension-measuring method integrating enhanced computer vision techniques to address the above challenges. Specifically, we used the YOLOv8 algorithm combined with the pose keypoint detection algorithm to process Chinese mitten crab images to acquire carapace sizes. We redesigned the YOLOv8l-pose architecture by incorporating Swin Transformer as the backbone network to improve feature representation for multikeypoint detection on crab carapaces, significantly enhancing global contextual feature extraction capabilities. Furthermore, we refined the loss function to model spatial correlations between keypoint locations accurately and thus improve detection accuracy for dorsal carapace dimension key points in Chinese mitten crabs. Our system enabled noncontact size measurement to leverage the proportional relationship between precalibrated background markers and detected carapace keypoints. Experimental results demonstrated that our enhanced model achieved a mean average precision of 95.88%, representing a 2.61% improvement over the baseline. The overall object keypoint similarity reached 91.32%, with maximum and mean dimensional measurement errors of 4.8% and 2.34%, respectively, validating our method’s reliability for aquaculture applications.