Sensors (Nov 2024)
Detection of Critical Parts of River Crab Based on Lightweight YOLOv7-SPSD
Abstract
The removal of back armor marks the first stage in the comprehensive processing of river crabs. However, the current low level of mechanization undermines the effectiveness of this process. By integrating robotic systems with image recognition technology, the efficient removal of dorsal armor from river crabs is anticipated. This approach relies on the rapid identification and precise positioning of the processing location at the crab’s tail, both of which are essential for optimal results. In this paper, we propose a lightweight deep learning model called YOLOv7-SPSD for detecting river crab tails. The goal is to accurately determine the processing location for the robotic removal of river crab back armor. We start by constructing a crab tail dataset and completing the data labeling process. To enhance the lightweight nature of the YOLOv7-tiny model, we incorporate the Slimneck module, PConv, and the SimAM attention mechanism. These additions help achieve an initial reduction in model size while preserving detection accuracy. Furthermore, we optimize the model by removing redundant parameters using the DepGraph pruning algorithm, which facilitates its application on edge devices. Experimental results show that the lightweight YOLOv7-SPSD model achieves a mean Average Precision (mAP) of 99.6% at a threshold of 0.5, an F1-score of 99.6%, and processes frames at a rate of 7.1 frames per second (FPS) on a CPU. Compared to YOLOv7-tiny, the improved model increases FPS by 2.7, reduces GFLOPS by 74.6%, decreases the number of parameters by 71.6%, and lowers its size by 8.1 MB. This study enhances the deployment of models in river crab processing equipment and introduces innovative concepts and methodologies for advancing intelligent river crab deep processing technology.
Keywords