Accurate early-stage detection and enumeration of citrus fruits play a crucial role in agricultural logistics, orchard management, and harvest planning, yet field-level implementation has historically been hindered by the optical characteristics of immature citrus. In natural orchard settings, green Orah mandarin fruits present severe visual challenges because their green peel closely matches the color of surrounding canopy foliage, dense clusters produce extensive inter-fruit occlusion, and natural variations in lighting and fruit geometry complicate automated identification. Traditional manual inspection remains labor-intensive, slow, and prone to observer bias, while classical image processing pipelines and standard deep learning detectors frequently miss partially hidden targets or generate false detections against leafy backgrounds. To address these persistent orchard inspection bottlenecks, a research team developed DD-YOLOv8, an enhanced convolutional neural network architecture, and integrated it into a multi-object tracking and video counting pipeline powered by the ByteTrack algorithm, establishing an automated framework for monitoring green fruit across video sequences.
The study was conducted within a commercial Orah mandarin plantation located in Shuitang Town, Xinping Yi and Dai Autonomous County, Yuxi City, Yunnan Province, China. The regional environment features a subtropical low-latitude plateau monsoon climate and mountainous terrain where traditional farming practices have historically lacked precise advance yield estimation, creating recurring inefficiencies in labor allocation and post-harvest logistical coordination. To capture the complex orchard environment, field data were gathered in early October 2023 during active fruit growth across an orchard containing 550 Orah mandarin trees. The researchers deployed an unmanned aerial vehicle platform, specifically a DJI Mavic Air 2 quadcopter weighing 0.25 kilograms with a 0.5-inch sensor and an aperture of f/2.8, operating at a steady scanning speed of 0.2 meters per second. Because tree height, crown width, and foliage density varied across the site, flight altitude and camera-to-canopy distances were dynamically adapted to canopy dimensions rather than locked to fixed measurements, ensuring adequate coverage of the visible fruit bearing canopy.
Video acquisition followed two distinct spatial configurations designed to address separate computer vision objectives: top-view and front-view imaging. Top-view recording surveyed 30 trees by filming each tree from four distinct directions, comprising front, back, left, and right vantage points, producing 120 video recordings. From these top-view sequences, individual frames were extracted at 30-frame intervals and screened to construct an object detection dataset comprising 3,520 high-resolution images. To prevent data leakage and guarantee valid evaluation, the image dataset was partitioned at the tree level so that all imagery from any single tree resided strictly within either the training set of 2,620 images from 23 trees, the validation set of 400 images from three trees, or the test set of 500 images from four trees. In contrast, front-view recording was dedicated to continuous tracking and counting experiments across a separate cohort of 10 trees, designated T01 through T10, capturing one vertical descent video on the front side and one on the back side of each tree to produce 20 video sequences recorded at 1920 by 1080 resolution and 60 frames per second.
The core detection architecture, designated DD-YOLOv8, modified the baseline YOLOv8 model by introducing structural mechanisms tailored to irregular shapes, dense clustering, and high visual similarity. Standard convolution operations rely on a rigid, rectangular sampling grid that cannot adapt flexibly to the irregular geometric profiles of occluded or overlapping citrus fruits. The authors replaced standard convolutional layers across the backbone and neck networks with second-generation deformable convolutions, known as DCNv2, which learn continuous coordinate offsets and modulation masks to dynamically reshape the receptive field according to the observed object geometry. Furthermore, the standard C2f feature aggregation modules of YOLOv8 were redesigned into custom C2f_DCNv2 modules by substituting standard CBS blocks within the residual bottlenecks with deformable DBS blocks, allowing deeper network layers to extract fine-grained spatial representations despite cluttered orchard backgrounds.
To tackle the severe false positive and false negative rates caused by chromatic camouflage between green fruit and green foliage, the architecture integrated deformable large kernel attention, or D-LKA, into the modified bottleneck blocks, forming the C2f_DCNv2_D-LKA module. The D-LKA mechanism combines large-kernel two-dimensional convolutions with deformable depthwise convolutions, convolution-based spatial offset prediction, and Gaussian error linear unit activations. This structural combination captures extended contextual relationships across broad canopy patches without incurring the massive computational overhead of self-attention mechanisms, while dynamically adjusting its sampling locations to isolate subtle boundary and texture contrasts between fruit surfaces and surrounding leaves. Through these combined spatial and contextual adaptations, DD-YOLOv8 was engineered to preserve feature sensitivity where standard object detectors frequently confuse fruit contours with vegetative foliage.
At an intersection-over-union threshold of 0.5, DD-YOLOv8 achieved a precision of 92.0 percent, a recall of 87.9 percent, and a mean average precision of 94.6 percent. These metrics outperformed the baseline YOLOv8 by 1.9 percentage points in precision, 2.2 percentage points in recall, and 1.4 percentage points in mean average precision, while also surpassing comparative results obtained from YOLOv3, YOLOv3-tiny, YOLOv5, YOLOv6, and YOLOv10. The architectural modifications resulted in a model size of 3.664 million parameters, computational complexity of 8.716 GFLOPs, and a weight file size of 7.534 megabytes, representing modest increases in computational demand compared to baseline YOLOv8 while remaining substantially more compact than older multi-scale networks.
Ablation experiments conducted on the dataset systematically validated the individual and collective contributions of each architectural enhancement relative to the baseline YOLOv8 model. Introducing DCNv2 alone improved mean average precision by 0.2 percentage points and recall by 0.5 percentage points, whereas introducing the C2f_DCNv2 module alone increased mean average precision by 0.7 percentage points without altering recall. Integrating D-LKA alone into C2f improved mean average precision by 0.6 percentage points and increased recall by 1.5 percentage points, underscoring its utility in mitigating missed detections. Pairing C2f_DCNv2 with D-LKA produced gains of 1.3 percentage points in mean average precision and 1.4 percentage points in recall, while the complete DD-YOLOv8 framework incorporating all three modifications achieved the maximum overall gains of 1.4 percentage points in mean average precision and 2.2 percentage points in recall. Repeated fine-tuning across three independent random seeds confirmed the stability of these performance gains, yielding an average validation mean average precision of 93.75 percent for DD-YOLOv8 compared to 93.20 percent for the baseline model.
For video-based monitoring, the improved detector was coupled with the ByteTrack multi-object tracking algorithm, which utilizes a two-stage data association framework to link candidate detections into continuous fruit trajectories. In empirical tracking trials across five video sequences spanning 6,740 evaluated frames, 101,347 ground-truth frame-level fruit instances, and 758 distinct ground-truth trajectories, the DD-YOLOv8 and ByteTrack combination achieved a multiple-object tracking accuracy of 75.08 percent and an identification F1 score of 84.59 percent. These figures represented substantial improvements over the baseline YOLOv8 plus ByteTrack configuration, which recorded 64.36 percent multiple-object tracking accuracy and 75.50 percent identification F1 score, as well as outperforming alternate tracking configurations paired with DeepSORT.
Fruit counting was executed using a virtual horizontal line-crossing mechanism positioned across the video frame, leveraging the upward visual translation of fruit caused by the top-to-bottom descent of the drone along the tree canopy. When a tracked fruit center transitioned from below the horizontal reference coordinate to above it under a consistent tracking identifier, the system recorded an upward crossing event, with the cumulative upward tally serving as the estimated count for that video. In bilateral cumulative counting evaluations covering 20 front and back videos across 10 trees, DD-YOLOv8 paired with ByteTrack recorded a mean absolute error of 3.60 fruits, a root mean square error of 3.66 fruits, and a mean absolute percentage error of 2.94 percent relative to manual video reference counts. This represented an approximately 70.7 percent reduction in mean absolute error compared to YOLOv8 paired with ByteTrack, which exhibited a mean absolute error of 12.30 fruits and consistently underestimated fruit counts due to missed detections during dense canopy traversal.
Despite these quantitative gains, the authors highlighted clear technical constraints and procedural boundaries governing the interpretation of their findings. The bilateral video cumulative count derived from summing front-side and back-side tallies serves as an operational counting benchmark under fixed trajectory rules rather than an absolute count of unique physical fruits, as no cross-view deduplication or three-dimensional spatial identity matching was conducted between opposing camera angles. Furthermore, the combined framework did not achieve the lowest number of identity switches during tracking evaluations, recording 10,184 identity switches compared to 8,853 for YOLOv8 plus ByteTrack, showing that severe occlusion and rapid camera motion can still disrupt continuous trajectory modeling. Finally, processing speed evaluations reached 51.77 frames per second on a desktop NVIDIA GeForce RTX 4070 graphics card, leaving direct real-time deployment on lightweight drone hardware unverified, while field testing remained restricted to a single geographic plantation during one developmental growth stage.
Subject of Research: Automated detection, tracking, and bilateral cumulative counting of green Orah mandarin fruits using an improved YOLOv8 neural network and ByteTrack
Article Title: Tracking and counting based on fusion of improved YOLOv8 and ByteTrack algorithms for green Orah mandarin fruits
Article References: Wu, Z., Wen, B., Gao, H., & Chen, S. (2026). Tracking and counting based on fusion of improved YOLOv8 and ByteTrack algorithms for green Orah mandarin fruits. Smart Agricultural Technology, 15, Article 102770. https://doi.org/10.1016/j.atech.2026.102770
Image Credits: AI Generated
DOI: 10.1016/j.atech.2026.102770
Keywords: Orah mandarin, agricultural computer vision, YOLOv8, ByteTrack, citrus fruit detection, deformable convolution, DCNv2, deformable large kernel attention, multi-object tracking, orchard monitoring, unmanned aerial vehicles, yield estimation, deep learning in agriculture, line-crossing counting, precision agriculture, visual tracking, object detection
News Source: Alan Morgan. (November 27, 2026). Computer Vision Framework Automates Early Orchard Counting for Green Mandarin Fruit. Scienmag.



