DOI: 10.3390/agriculture16151675 ISSN: 2077-0472

Improved YOLOv8 Weed Segmentation Method Based on Dual-ViT

Weihan Wu, Kaiwen Huang, Haonan Ji, Tujia Chen, Xueshen Chen

To address inaccurate weed segmentation under crop overlap, occlusion, and complex field backgrounds, this study developed a combined method integrating DViT-YOLOv8-seg with confidence-guided SLIC voting. The dataset contained 1872 field images (800 × 600 pixels) of Guangzhou soft-stem lettuce and four common weed species: Eleusine indica, Digitaria sanguinalis, Portulaca oleracea, and Amaranthus blitum. All weed species were merged into one weed class, while lettuce, soil, and other field regions were treated as non-weed. Real-ESRGAN and data augmentation enhanced the training samples; Dual-ViT strengthened global–local feature interaction; GSConv reduced redundant computation; BiFPN improved multi-scale fusion; and SLIC refined ambiguous boundaries. After super-resolution preprocessing and three-fold expansion, baseline mPA increased by 10.9 percentage points. The improved network achieved 88.3% mPA at 7.9 GFLOPs, corresponding to +3.6 percentage points and -1.0 GFLOPs relative to the baseline. SLIC voting increased FWIoU to 95.6%, 4.1 percentage points above the network without SLIC. Compared with YOLOv5-seg and Fast-SCNN, mPA improved by 2.0 and 6.5 percentage points, respectively; GFLOPs were 87.7% and 95.5% lower than those of YOLOv5-seg and DeepLabv3+, respectively. The method therefore provides a favorable trade-off between segmentation accuracy and theoretical network computation for complex lettuce field imagery.

More from our Archive