Portunus trituberculatus has high nutritional and economic value, and its appearance integrity directly affects its market value. At present, the sorting of Portunus trituberculatus faces challenges due to low levels of automation in traditional methods. Traditional sorting of Portunus trituberculatus is generally done manually, which has the problems of low efficiency and high labor costs, and human observation is easily affected by subjective factors. To solve the sorting problem of Portunus trituberculatus, this paper proposes a defect recognition model for crabs based on an improved ConvNext model , which can accurately identify the feet of Portunus trituberculatus and carry out intelligent recognition and grading. By accurately identifying the feet of Portunus trituberculatus, intelligent recognition and grading are carried out. Using re-parameterized refocusing convolution to replace depthwise separable convolution in the ConvNext model block, the network is able to capture richer and more detailed features. Coordinate attention mechanisms are added before the Block module and after the Downsample module of the ConvNext model to enhance the model's attention to key features and discard irrelevant features. The results show that the improved model has the highest accuracy on the validation set, at 98.90%, which is 3.32% higher than the original ConvNext baseline model network. The proposed algorithm ensures effectiveness. This study contributes to achieving the goal of intelligent and precise grading in the Portunus trituberculatus industry, and is anticipated to replace traditional methods to improve the sorting efficiency of Portunus trituberculatus. This can provide technical support for the further development of an automatic recognition and classification system for defects in Portunus trituberculatus.