The crayfish industry, centered on Procambarus clarkii, is rapidly expanding but faces challenges due to insufficient automation. Traditionally, manual visual inspection to assess the size and integrity of crayfish during breeding and processing is labor-intensive and susceptible to errors. This paper introduces an advanced algorithm using the YOLOv8n framework to intelligently recognize and grade crayfish by accurately identifying the body, tail, and claws of Procambarus clarkii. The proposed method innovates by replacing the conventional loss function with the CIOU (Complete Intersection over Union) and substituting it with the MPDIOU (Modified Perfect Dark Intersection over Union).A novel scale factor, 'ratio,' is integrated to regulate the size of the auxiliary bounding box in the loss calculation. This modification, when synergized with the MPDIoU loss function, significantly bolsters the precision and efficiency of bounding box regression. Consequently, this leads to the accurate identification of the crayfish's distinct body parts, which is a critical step towards automating the grading process. Empirical evaluation showed significant improvements in recognition rates. The integration of Inner-MPDIoU into the YOLOv8n model enhanced the mean Average Precision (mAP) from 83.7% to 90.8% at IOU thresholds from 0.5 to 0.95.This advancement not only streamlines the grading process but also paves the way for more nuanced and automated sorting systems in the crayfish industry. The study's findings underscore the efficacy of the proposed algorithmic model in accurately identifying key components of Procambarus clarkii. This research contributes to the broader objective of achieving intelligent and precise grading within the crayfish sector, potentially revolutionizing traditional methods and bolstering industry efficiency. The implications extend beyond mere automation, offering a foundation for future research into intelligent systems that can be tailored to the specific needs of the crayfish industry.