Improved YOLOv7-Based Method for Strawberry Ripeness Detection
[Objective]To achieve efficient and accurate detection of strawberry maturity in natural envi-ronments,an improved YOLOv7 model for strawberry ripeness detection is designed.[Method]In this study,YOLOv7 is used as the base network for strawberry ripeness detection,based on which,firstly,the 3×3 convolution of the original head part is replaced by the PConv convolution to improve the detec-tion speed.Secondly,the CBAM attention mechanism is added to some feature layers to improve the model's ability to focus on important information.Furthermore,the simple bilinear interpolation operator in the original upsampling is replaced by CARAFE,which can increase the model's ability to perceive straw-berry fruit details.Finally,migration learning is used to achieve training and fine-tuning of the strawberry dataset.[Result]The experimental results showed that the mAP50 of the model before improvement was 85.6%,while the mAP50 of the enhanced model reached 87.7%.Additionally,the number of parameters decreased from 9.14×106 to 7.32×106,and the GFLOPs decreased to 19.8,resulting in an enhanced de-tection speed.[Conclusion]The improved model has higher detection accuracy and speed in the detection of strawberries and their ripeness,which can realize the growth monitoring of strawberry fruits in practical application scenarios.