An Improved YOLOv7-Tiny Method for the Segmentation of Images of Vegetable Fields
Shouwei Wang,
Lijian Yao (),
Lijun Xu,
Dong Hu,
Jiawei Zhou and
Yexin Chen
Additional contact information
Shouwei Wang: College of Optical, Mechanical and Electrical Engineering, Zhejiang A&F University, Hangzhou 311300, China
Lijian Yao: College of Optical, Mechanical and Electrical Engineering, Zhejiang A&F University, Hangzhou 311300, China
Lijun Xu: College of Optical, Mechanical and Electrical Engineering, Zhejiang A&F University, Hangzhou 311300, China
Dong Hu: College of Optical, Mechanical and Electrical Engineering, Zhejiang A&F University, Hangzhou 311300, China
Jiawei Zhou: College of Optical, Mechanical and Electrical Engineering, Zhejiang A&F University, Hangzhou 311300, China
Yexin Chen: College of Optical, Mechanical and Electrical Engineering, Zhejiang A&F University, Hangzhou 311300, China
Agriculture, 2024, vol. 14, issue 6, 1-16
Abstract:
In response to the limitations of existing methods in differentiating between vegetables and all types of weeds in farmlands, a new image segmentation method is proposed based on the improved YOLOv7-tiny. Building on the original YOLOv7-tiny framework, we replace the CIoU loss function with the WIoU loss function, substitute the Leaky ReLU loss function with the SiLU activation function, introduce the SimAM attention mechanism in the neck network, and integrate the PConv convolution module into the backbone network. The improved YOLOv7-tiny is used for vegetable target detection, while the ExG index, in combination with the OTSU method, is utilized to obtain a foreground image that includes both vegetables and weeds. By integrating the vegetable detection results with the foreground image, a vegetable distribution map is generated. Subsequently, by excluding the vegetable targets from the foreground image using the vegetable distribution map, a single weed target is obtained, thereby achieving accurate segmentation between vegetables and weeds. The experimental results show that the improved YOLOv7-tiny achieves an average precision of 96.5% for vegetable detection, with a frame rate of 89.3 fps, Params of 8.2 M, and FLOPs of 10.9 G, surpassing the original YOLOv7-tiny in both detection accuracy and speed. The image segmentation algorithm achieves a mIoU of 84.8% and an mPA of 97.8%. This method can effectively segment vegetables and a variety of weeds, reduce the complexity of segmentation with good feasibility, and provide a reference for the development of intelligent plant protection robots.
Keywords: vegetable detection; improved YOLOv7-tiny; image segmentation; ExG index (search for similar items in EconPapers)
JEL-codes: Q1 Q10 Q11 Q12 Q13 Q14 Q15 Q16 Q17 Q18 (search for similar items in EconPapers)
Date: 2024
References: View references in EconPapers View complete reference list from CitEc
Citations:
Downloads: (external link)
https://www.mdpi.com/2077-0472/14/6/856/pdf (application/pdf)
https://www.mdpi.com/2077-0472/14/6/856/ (text/html)
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:gam:jagris:v:14:y:2024:i:6:p:856-:d:1404943
Access Statistics for this article
Agriculture is currently edited by Ms. Leda Xuan
More articles in Agriculture from MDPI
Bibliographic data for series maintained by MDPI Indexing Manager ().