Tomato Fruit Counting Algorithm Based on Improved Yolov7
To address the issues of low efficiency,high labor costs,and inaccurate tomato fruit counting,this paper proposed an im-proved Yolov7 tomato fruit counting algorithm.The algorithm used the CBAM module to adaptively weight the eigenvalues,enhance the tomato characteristics,and reduce the background interference.Additionally,the BiFPN structure is fused to optimize the weight distribution of features at different scales,effectively improving the feature fusion efficiency.The result was fast and accurate recognition.The experimental results indicated that the proposed algorithm outperforms other algorithms in terms of average counting accuracy,mean absolute error,and mean square error.The MAE,MSE and MAPE of the improved Yolov7 reached 1.63,1.98 and 5.31%,respectively.Compared to the Yolov4,Yolov5s and the original Yolov7,the MAE and MSE reduced by 3.24 and 3.15,2.35 and 2.29,and 1.13 and 1.05,respectively,and the counting error rate reduced by 3.34%,1.71%and 1.53%,respectively.