Abstract:Using machine vision technology to identify underwater crab targets is one of the effective ways to achieve intelligent crab farming equipment. However, river crab detection methods face challenges in the difficulty of target detection in underwater environments, limited feature information and high complexity of mainstream target detection models. To solve these challenges, a lightweight river crab detection model GC-YOLO v5s (GhostNetV2-CBAM-YOLO v5s) was proposed. These specific enhancements were as follows: an improved image enhancement algorithm was used to preprocess underwater crab images to improve the detection accuracy;in order to reduce model complexity, a G3 module based on GhostNetV2 was proposed to improve the feature extraction network of the model, and Ghost convolution was used to further lightweight the model;the convolution block attention module (CBAM) was introduced to solve the challenge of extracting deep features within underwater environments, which were integrated into the feature extraction network. The experimental results demonstrated the improved model’s mAP50, recall, and precision on the test set, reaching 95.61%, 97.03% and 96.94%, respectively. These metrics displayed enhancements of 2.80 percentage points, 2.25 percentage points and 2.28 percentage points compared with the baseline. Moreover, GC-YOLO v5s parameters, computations, and model size were only 69.1%, 56.3%, and 58.3% of YOLO v5s respectively. Comparative trials against mainstream object detection algorithms showcased the superiority in accuracy and model complexity. While slightly trailing YOLO v5s in detect speed, GC-YOLO achieved 104f/s.