Abstract:Accurately estimating the weight of Chinese mitten crab (hairy crab) plays an important role in monitoring growth status, controlling breeding density, determining feeding amount, and predicting production. Existing crab weight estimation methods usually use monocular cameras and rely on reference objects for real body size correction. And the uncertain angle of the hairy crab carapace in the image can easily lead to low target detection accuracy, which limits its application in actual breeding environments. In order to solve the above problems, a crab weight estimation method based on oriented object detection and binocular vision was proposed. Firstly, hairy crab images were collected through binocular cameras. Secondly, a hairy crab carapace oriented object detection model based on SSP-YOLO v7 (SK-SimCSPSPPF-ProbIoU-YOLO v7) was built. The model introduced the selective kernel (SK) attention mechanism in the backbone, used simplified cross stage partial spatial pyramid pooling fast (SimCSPSPPF) to optimize the spatial pyramid pooling, and used probabilistic intersection over union (ProbIoU) loss to calculate the rotation box regression loss, enhance feature extraction capability while reducing the amount of calculation, and effectively improve the accuracy of oriented object detection. Then three-dimensional reconstruction of the hairy crab binocular image was performed, and the body size of the hairy crab carapace was calculated through the Euclidean distance formula. Finally, a particle swarm optimization-extreme gradient boosting (PSO-XGBoost) model based on particle swarm optimization was constructed to fit the body size and true weight of hairy crabs of different genders to achieve weight estimation of hairy crabs of different genders. Tested on the self-built dataset, the mAP0.5 of the model proposed was 99.46%, the model parameters were 7.321×106, the floating point operations (FLOPs) was 1.6684×1011, and the FPS was 39f/s. The weight estimation model based on PSO-XGBoost had a root mean square error (RMSE) of 8.549g, a mean absolute error (MAE) of 6.172g, a coefficient of determination of 0.946 for male crabs, and a RMSE of 6.902g, a MAE of 5.175g, a coefficient of determination of 0.955 for female crabs. The results showed that this method can accurately estimate the weight of hairy crabs and provide technical support for growth monitoring and intelligent breeding of hairy crabs.