Plant Leaf Detection Research in Complex Backgrounds Based on YOLOv5
Detecting plant leaves forms the basis for studying plant phenotypic traits.However,real-world conditions,such as mutual leaf occlusion,indistinct leaf edge characteristics,small target leaves,and external factors like varying lighting conditions,pose substantial obstacles to effective leaf detection.To address leaf detection challenges in complex backgrounds,we present an improved plant leaf detection approach based on the YOLOv5 model.The introduction of dilated convolutions in the backbone network extends the network's ability to capture a wider contextual information range.Leveraging a bidirectional connected and weighted feature pyramid network enhances the extraction of target leaf features and improves feature information integration.The incorporation of attention mechanisms dy-namically adjusts attention distributions,thereby enhancing edge feature representation.Test results confirm the feasibility of the enhanced algorithm on grape leaf images from the Plant Village dataset and self-captured grapevine leaf images.The improved YOLOv5 model a-chievesa5.8%increase in leaf detection mean average precision(mAP)compared to the original model,with a 7.09%enhancement in occluded leaf detection accuracy.This study significantly enhances leaf detection performance in complex backgrounds.The proposed method effectively addresses the issue of subpar plant leaf detection in such scenarios,thereby providing valuable technical support for plant phenotypic research.