PRS2Net: an efficient intelligent carrot detection model via filter pruning and attention mechanisms.
Journal:
Journal of the science of food and agriculture
Published Date:
Aug 22, 2025
Abstract
BACKGROUND: Carrots, rich in essential nutrients, play a crucial role in supporting human health. Current deep learning networks for carrot quality inspection are constrained by redundant parameters and high computational costs. To address these issues, this paper introduces a lightweight network, PRS2Net, based on ResNet18 selected after comparing four networks (GoogLeNet, MobileNet-v2, ResNet18, ResNet50). ResNet18 was pruned using first-order Taylor expansion to reduce redundancy and enhanced with an attention mechanism to focus on critical features. RESULTS: PRS2Net achieved high efficiency with learnable parameters reduced from 11 173 764 to 444 152, while maintaining 97.25% accuracy on the validation set. Training time was cut by about 53.15% compared to ResNet18, significantly speeding up carrot quality inspection. CONCLUSION: This approach enhances the speed and efficiency of carrot quality evaluation, offering a practical, resource-efficient solution for real-world applications in agriculture and food industries, potentially reducing operational costs and improving scalability for automated systems. © 2025 Society of Chemical Industry.