Due to the different weed characteristics in peanut fields at different weeding periods, there is an urgent need to study a general model of peanut and weed detection and identification applicable to different weeding periods in order to adapt to the development of mechanical intelligent weeding in fields. To this end, we propose a BEM-YOLOv7-tiny target detection model for peanuts and weeds identification and localization at different weeding periods to achieve mechanical intelligent weeding in peanut fields at different weeding periods. The ECA and MHSA modules were used to enhance the extraction of target features and the focus on predicted targets, respectively, the BiFPN module was used to enhance the feature transfer between network layers, and the SIoU loss function was used to increase the convergence speed and efficiency of model training and to improve the detection performance of the model in the field. The experimental results showed that the precision, recall, mAP and F1 values of the BEM-YOLOv7-tiny model were improved by 1.6%, 4.9%, 4.4% and 3.2% for weed targets and 1.0%, 2.4%, 2.2% and 1.7% for all targets compared with the original YOLOv7-tiny. The experimental results of positioning error show that the peanut positioning offset error detected by BEM-YOLOv7-tiny is less than 16 pixels, and the detection speed is 33.8 f/s, which meets the requirements of real-time seedling grass detection and positioning in the field. It provides preliminary technical support for intelligent mechanical weeding in peanut fields at different stages.
Citation: Yong Hua, Hongzhen Xu, Jiaodi Liu, Longzhe Quan, Xiaoman Wu, Qingli Chen. A peanut and weed detection model used in fields based on BEM-YOLOv7-tiny[J]. Mathematical Biosciences and Engineering, 2023, 20(11): 19341-19359. doi: 10.3934/mbe.2023855
Due to the different weed characteristics in peanut fields at different weeding periods, there is an urgent need to study a general model of peanut and weed detection and identification applicable to different weeding periods in order to adapt to the development of mechanical intelligent weeding in fields. To this end, we propose a BEM-YOLOv7-tiny target detection model for peanuts and weeds identification and localization at different weeding periods to achieve mechanical intelligent weeding in peanut fields at different weeding periods. The ECA and MHSA modules were used to enhance the extraction of target features and the focus on predicted targets, respectively, the BiFPN module was used to enhance the feature transfer between network layers, and the SIoU loss function was used to increase the convergence speed and efficiency of model training and to improve the detection performance of the model in the field. The experimental results showed that the precision, recall, mAP and F1 values of the BEM-YOLOv7-tiny model were improved by 1.6%, 4.9%, 4.4% and 3.2% for weed targets and 1.0%, 2.4%, 2.2% and 1.7% for all targets compared with the original YOLOv7-tiny. The experimental results of positioning error show that the peanut positioning offset error detected by BEM-YOLOv7-tiny is less than 16 pixels, and the detection speed is 33.8 f/s, which meets the requirements of real-time seedling grass detection and positioning in the field. It provides preliminary technical support for intelligent mechanical weeding in peanut fields at different stages.
[1] | J. W. Yang, C. H. Cui, Safe weed control technology for peanut fields, China Sci. Technol. Exp., 32 (2010), 27. |
[2] | Z. H. Tian, Y. L. Jiang, Y. H. Yin, J. Liang, L. Li, D. W. Liu, Current situation and prospect of weed control in peanut field of southern China, Shandong Agric. Sci., 52 (2020), 162–167. https://doi.10.14083/j.issn.1001-4942.2020.01.031 doi: 10.14083/j.issn.1001-4942.2020.01.031 |
[3] | B. G. Shen, S. R. Chen, J. J. Yin, H. P. Mao, Image recognition of green weeds in cotton fields based on color feature, Trans. Chin. Soc. Agric. Eng., 25 (2009), 163–167. https://doi.10.3969/j.issn.1002-6819.2009.06.031 doi: 10.3969/j.issn.1002-6819.2009.06.031 |
[4] | H. Y. Wang, J. X. Lü, Identifying corn weed based on texture features and optimized SVM, Hubei Agric. Sci., 53 (2014), 3163–3166+3169. https://doi.10.14088/j.cnki.issn0439-8114.2014.13.110 doi: 10.14088/j.cnki.issn0439-8114.2014.13.110 |
[5] | X. F. Li, W. X. Zhu, B. Ji, B. Liu, C. H. Ma, Shape feature selection and weed recognition based on image processing and ant colony optimization, Trans. Chin. Soc. Agric. Eng., 26 (2010), 178–182. https://doi.10.3969/j.issn.1002-6819.2010.10.030 doi: 10.3969/j.issn.1002-6819.2010.10.030 |
[6] | X. W. Deng, L. Qi, X. Ma, Y. Jiang, X. S. Chen, H. Y. Liu, et al., Recognition of weeds at seedling stage in paddy fields using multi-feature fusion and deep belief networks, Trans. Chin. Soc. Agric. Eng., 34 (2018), 165–172. https://doi.10.11975/j.issn.1002-6819.2018.14.021 doi: 10.11975/j.issn.1002-6819.2018.14.021 |
[7] | M. Dyrmann, H. Karstoft, H. S. Midtiby, Plant species classification using deep convolutional neural network, Biosyst. Eng., 151 (2016), 72–80. https://doi.10.1016/j.biosystemseng.2016.08.024 doi: 10.1016/j.biosystemseng.2016.08.024 |
[8] | T. Tao, X. Wei, A hybrid CNN-SVM classifier for weed recognition in winter rape field, Plant Methods, 18 (2022), 1–12. https://doi.10.1186/s13007-022-00869-z doi: 10.1186/s13007-022-00869-z |
[9] | Z. Zong, S. Zhao, G. Liu, Coronal identification and centroid location of maize seedling stage, Trans Chin. Soc. Agric. Mach., 50 (2019), 27–33. |
[10] | W. R. Zhang, H. J. Wen, C. F. Qiao, G. Y. Wang, Mask R-CNN-based method for detecting corn seedlings and corms, Xinjiang Agric. Sci., 58 (2021), 1918–1928. https://doi.10.6048/j.issn.1001-4330.2021.10.020 doi: 10.6048/j.issn.1001-4330.2021.10.020 |
[11] | Y. Xu, D. S. Wen, J. P. Zhou, X. P. Pan, Y. Liu, Identification method of cotton seedlings and weeds in Xinjiang based on faster R-CNN, J. Drain. Irrig. Mach. Eng., 39 (2021), 602–607. https://doi.10.3969/j.issn.1674-8530.19.0244 doi: 10.3969/j.issn.1674-8530.19.0244 |
[12] | H. H. Jiang, C. Y. Zhang, Z. Zhang, W. H. Mao, D. Wang, D. W. Wang, Detection method of corn weed based on mask R-CNN, Trans. Chin. Soc. Agric. Mach., 51 (2020), 220–228+247. |
[13] | X. Li, J. D. Pan, F. P. Xie, J. P. Zeng, Q. Li, X. J. Huang, et al., Fast and accurate green pepper detection in complex backgrounds via an improved YOLOv4-tiny model, Comput. Electron. Agric., 191 (2021), 106503. https://doi.10.1016/j.compag.2021.106503 doi: 10.1016/j.compag.2021.106503 |
[14] | J. F. Gao, A. P. French, M. P. Pound, Y. He, J. G. Pieters, Deep convolutional neural networks for image-based Convolvulus sepium detection in sugar beet fields, Plant Methods, 16 (2020), 1–12. https://doi.10.1186/s13007-020-00570-z doi: 10.1186/s13007-020-00570-z |
[15] | L. Z. Quan, H. D. Li, H. L. Li, W. Jiang, Z. X. Lou, L. Q. Chen, Two-stream dense feature fusion network based on RGB-D Data for the real-time prediction of weed aboveground fresh weight in a field environment, Remote Sens., 13 (2021), 2288. https://doi.10.3390/rs13122288 doi: 10.3390/rs13122288 |
[16] | L. Z. Quan, F. L. Xie, W. Jiang, H. L. Li, H. D. Li, Z. X. Lou, et al., Research on recognition of maize seedlings and weeds in maize mield based on YOLOv4 convolutional neural network, J. Northeast Agric. Univ., 52 (2021), 89–98. https://doi.10.19720/j.cnki.issn.1005-9369.2021.07.011 doi: 10.19720/j.cnki.issn.1005-9369.2021.07.011 |
[17] | J. X. Gao, F. Tan, J. P. Cui, B. Ma, A method for obtaining the number of maize seedlings based on the improved YOLOv4 lightweight neural network, Agriculture, 12 (2020), 2077–0472. https://doi.org/10.3390/agriculture12101679 doi: 10.3390/agriculture12101679 |
[18] | A. Ahmad, Performance of deep learning models for classifying and detecting common weeds in corn and soybean production systems, Comput. Electron. Agric., 184 (2021), 106081. https://doi.10.1016/j.compag.2021.106081 doi: 10.1016/j.compag.2021.106081 |
[19] | J. L. Zhang, W. H. Su, H. Y. Zhang, Y. K. Peng, SE-YOLOv5x: An optimized model based on transfer learning and visual attention mechanism for identifying and localizing and visual attention mechanism for identifying and localizing weeds and vegetables, Agronomy, 12 (2022), 2061. https://doi.10.3390/agronomy12092061 doi: 10.3390/agronomy12092061 |
[20] | Q. F. Wang, M. Cheng, S. Huang, Z. J. Gai, J. L. Zhang, H. B. Yuan, A deep learning approach incorporating YOLOv5 and attention mechanisms for field real-time detection of the invasive weed Solanum rostratum Dunal seedlings, Comput. Electron. Agric., 199 (2022), 107194. https://doi.10.1016/j.compag.2022.107194 doi: 10.1016/j.compag.2022.107194 |
[21] | H. Zhang, Z. Wang, Y. F. Guo, Y. Ma, W. K. Gao, D. X. Chen, Weed detection in peanut fields based on machine vision, Agriculture, 12 (2022), 1541. https://doi.org/10.3390/agriculture12101541 doi: 10.3390/agriculture12101541 |
[22] | Y. D. Lin, T. T. Chen, S. Y. Liu, Quick and accurate monitoring peanut seedlings emergence rate through UAV video and deep learning, Comput. Electron. Agric., 197 (2022), 106938. https://doi.10.1016/j.compag.2022.106938 doi: 10.1016/j.compag.2022.106938 |
[23] | Z. L. Guan, W. Y. Liu, Characteristics of weed occurrence and control in peanut fields, Modern Agric., 10 (2021), 61–62. |
[24] | D. Q. Wann, R. S. Tubbs, Interactive effects of hand weeding, tine and sweep cultivation for weed control in organic peanut production, Peanut Sci., 41 (2014), 124–130. https://doi.10.3146/PS13-15.1 doi: 10.3146/PS13-15.1 |
[25] | H. J. Liu, H. Sun, M. Z. Li, M. Iida, Application of color featuring and deep learning in maize plant detection, Remote Sens., 12 (2020), 2229. https://doi.10.3390/rs12142229 doi: 10.3390/rs12142229 |
[26] | D. S. F. Alessandro, D. M. Freitas, G. D. S. Gercina, H. Pistoei, M. T. Folhes, Weed detection in soybean crops using ConvNets, Comput. Electron. Agric., 143 (2017), 314–324. https://doi.10.1016/j.compag.2017.10.027 doi: 10.1016/j.compag.2017.10.027 |
[27] | Q. L. Wang, B. G. Wu, P. F. Zhu, P. H. Li, W. M. Zuo, Q. H. Hu, ECA-Net: Efficient channel attention for deep convolutional neural net-works, in 2020 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, (2020), 11531–11539. https://doi.10.1109/CVPR42600.2020.01155 |
[28] | M. X. Tan, R. M. Pang, Q. V. Le, EfficientDet: Scalable and efficient object detection, in 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, (2020), 10781–10790. https://doi.10.1109/CVPR42600.2020.01079 |
[29] | A. Srinivas, T. Y. Lin, N. Parmar, J. Shlens, P. Abbeel, A. Vaswani, Bottleneck transformers for visual recognition, in 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), (2021), 16519–16529. https://doi.10.1109/CVPR46437.2021.01625 |
[30] | Z. H. Zheng, P. Wang, W. Liu, J. Z. Li, R. G. Ye, D. W. Ren, Distance-IoU loss: Faster and better learning for bounding box regression, in Proceedings of the AAAI conference on Artificial Intelligence, 34 (2020), 12993–13000. https://doi.10.1609/aaai.v34i07.6999 |
[31] | Z. Gevorgyan, SIoU loss: More powerful learning for bounding box regression, preprint, arXiv: 2205.12740. |
[32] | M. Perez-Ruiz, D. C. Slaughter, F. A. Fathallah, C. J. Gliever, B. J. Miller, Co-robotic intra-row weed control system, Biosyst. Eng., 126 (2014), 45–55. https://doi.016/j.biosystemseng.2014.07.009 doi: 10.1016/j.biosystemseng.2014.07.009 |
[33] | C. Wang, S. He, H. Wu, G. Teng, C. Zhao, Identification of growing points of cotton main stem based on convolutional neural network, IEEE Access, 8 (2020), 208407–208417. https://doi.10.1109/ACCESS.2020.3038396 doi: 10.1109/ACCESS.2020.3038396 |
[34] | H. H. Liu, Y. M. Fan, H. Q. He, K. H. Hui, Improved YOLOv7-tiny's object detection lightweight model, Comput. Eng. Appl., 59 (2023), 1–11. https://doi.10.3778/j.issn.1002-8331.2302-0115 doi: 10.3778/j.issn.1002-8331.2302-0115 |
[35] | X. Li, C. Wang, B. Li, Z. P. Guo, Q. L. Li, Z. Y. Li, Steel surface defect detection algorithm based on improved YOLOv5, J. Air Force Eng. Univ., 23 (2022), 26–33. https://doi.10.3969/j.issn.1009-3516.2022.02.005 doi: 10.3969/j.issn.1009-3516.2022.02.005 |
[36] | A. M. Roy, J. Bhaduri, DenseSPH-YOLOv5: An automated damage detection model based on DenseNet and Swin-Transformer prediction head-enabled YOLOv5 with attention mechanism, Adv. Eng. Inf., 56 (2023), 102007. https://doi.org/10.1016/j.aei.2023.102007 doi: 10.1016/j.aei.2023.102007 |