Spatial--Semantic Enhanced Detection and Identity-Aware Tracking for Video Counting of Coexisting Blueberry Flowers and Fruits
Accurate stage-specific counting of blueberry flowers and fruits is essential for yield estimation, harvest planning, and labor scheduling in commercial orchards. Existing image-level methods cannot preserve temporal identities and may repeatedly count the same target, while generic crop MOT counting methods typically target single-category objects that are large and sparsely distributed. As illustrated in Figure 1, this task is further complicated by tiny targets, dense overlap and intra-stage appearance homogeneity, which can cause missed detections, identity switches, and duplicate counts. To address these coupled challenges, The proposed framework integrates an enhanced YOLO11 detector with MSSC, a Deep OC-SORT-based tracker with VCM-CIoU, VDC, and CARM association cues, and Phenology-Specific Trajectory-Gated Counting (PTGC) to produce stable, class-specific counts from continuous orchard videos.
Real MOT Counting Demonstration
This video shows class-specific counting on a manually annotated real-world MOT sequence.
Video 1. Counting results on the real-world MOT dataset.
Real Orchard Demonstration
This video demonstrates visible-object counting along a blueberry planting row during field acquisition.
Video 2. Counting results on a real blueberry planting row.
Figure 1. Motivation and overview of the proposed framework. (A) Image-level counting may repeatedly count the same targets across frames. (B) Generic crop MOT counting is often single-category. (C) Blueberry video counting involves tiny, densely overlapping, visually similar targets. (D) The framework combines enhanced YOLO11 detection, BerryTracker identity association, and PTGC.
Dataset: We constructed a dedicated benchmark comprising a static detection image set and a multi-object tracking (MOT) sequence set. It covers four classes—Flower, Green, Light Purple, and Blue—corresponding to flowering, greening, coloring, and ripening stages. The detection set contains 368 high-resolution images and 66,717 annotations. The programmatically generated MOT set contains 40 sequences, 9,213 frames, 1,121,129 box instances, and 14,819 trajectories. The manually annotated real-world MOT set contains six sequences, 2,028 frames, 69,964 box instances, and 3,980 trajectories.
Figure 2. Construction pipeline of the blueberry video counting dataset. The dataset contains a static detection image set and two MOT sequence set.
Overview: Given a field video, the enhanced YOLO11 detector with MSSC and SAHI outputs bounding boxes, phenological class labels, and confidence scores for each frame. BerryTracker extends Deep OC-SORT with VCM-CIoU, velocity direction consistency, and CARM appearance association to preserve identities in dense clusters. PTGC records a trajectory only when its center first enters a predefined central counting region and maintains separate ID sets for Flower, Green, Light Purple, and Blue.
Figure 3. Overall framework of the proposed blueberry video counting pipeline. The enhanced YOLO11 detector performs small-target detection, BerryTracker maintains target identities, and PTGC converts stable trajectories into stage-specific counts.
Main Contributions:
- A blueberry video counting dataset linking class labels, temporal identities, and video-level counts.
- An enhanced YOLO11 detector with MSSC for small blueberry detection in high-resolution orchard imagery.
- BerryTracker, which introduces VCM-CIoU and CARM to improve identity association under dense overlap and similar appearance.
- PTGC, which applies spatial tolerance and trajectory-level gating to obtain deduplicated class-specific counts.
Key Results: achieved 89.1% mAP@0.5. On the blueberry MOT test set, BerryTracker obtained 62.08% MOTA, 77.35% IDF1, and 2,588 identity switches while operating at 37.50 FPS. The complete framework reached 93.48% counting accuracy, a GEH statistic of 1.22, an RMSE of 30.11, and an R2 of 0.966. PTGC reached 85.75% total accuracy on the manually annotated real-world MOT set. The class-specific accuracies were 72.73% for Flower, 85.73% for Green, 68.77% for Light Purple, and 89.88% for Blue.
Keywords: Blueberry video counting; Multi-object tracking; Small-object detection; Class-specific counting
