• Consistency-driven and stem-level detector enforces one-stem-one-box in vineyards. • Morphology-aligned annotation ( C , δ , g ) reduces branch mixing and drift. • Classification–regression consistency tightens boxes and boosts recall. • Hybrid-Linear merges overlaps to near-zero duplicates at ∼32 FPS. • LocGap and Dup offer deployment-ready measures of tightness, redundancy. Automation in vineyards relies on reliable perception of cluster topology, where the primary stem serves as an operational reference for pruning, grasping, and measurement. We present YOLOv8-StemAlign (YOLOv8-SA), a stem-level detector for in-field, multi-cultivar vineyard scenes that targets two persistent failure modes in crowded canopies: classification–regression inconsistency and unstable duplicate suppression. We first propose a morphology-aligned annotation protocol that defines a unified stem box from the peduncle base to the first branching point. To reduce label ambiguity near laterals, the protocol constrains the branching neighborhood using a domain C with size parameter δ , enforces a minimum normal gap g , and applies a short-side lower bound. On the model side, we append the Convolutional Block Attention Module (CBAM) to the last backbone stage, replace the original head with a Dynamic Head (DyHead), and adopt the Minimum-Point-Distance IoU (MPDIoU) loss to strengthen stem-relevant features and stem-axis–aware geometric alignment. At inference, we propose Hybrid-Linear post-processing, which retains borderline candidates with Soft-NMS and then consolidates them via a lightweight hard-NMS step to enforce the one-stem–one-box constraint, effectively driving duplicates to near-zero while preserving recall. Experiments on a real-world dataset of 1,216 images across five cultivars show consistent improvements over the YOLOv8n baseline in AP metrics and error counts at comparable runtime, and Hybrid-Linear achieves an inference throughput of ≈32 FPS on a server-grade GPU under our evaluation protocol. Sensitivity analysis further yields two operating modes—a default setting prioritizing tighter localization and a recall-oriented alternative for crowded scenes—enabling task-aligned configuration in practice. Together with AP/FN/FPS, we also report LocGap (AP50-AP75) and Dup as concise indicators of boundary tightness and redundancy for efficiency-aware evaluation. Overall, YOLOv8-SA delivers tighter fits, fewer misses, and stable de-duplication under diverse cultivars, illumination, and occlusions.
Fang et al. (Sun,) studied this question.