Lightweight CNN and transformer detectors for real-time single-fruit date-variety recognition on edge GPU hardware
Adnan Miski, Moayad AlshangitiManual sorting of date fruits is time-consuming and labor-intensive, while automated optical sorting lines remain costly for small- and medium-sized enterprises (SMEs). This study presents a deployment-oriented benchmark of five lightweight object detectors for single-fruit date-variety recognition, namely the Convolutional Neural Network (CNN)-based YOLOv8, YOLOv10, YOLOv11, and YOLOv12 Nano variants and the Transformer-based D-Fine-Nano, with RT-DETR-Large included as a high-capacity accuracy reference. Models were evaluated on 1,658 controlled-environment images of nine commercial varieties using grouped 5-fold cross-validation, which kept identified repeat photographs of the same fruit within the same cross-validation fold. Latency was measured on an NVIDIA T4-class edge GPU/industrial-PC accelerator, and the CNN detectors were also exported to Open Neural Network Exchange (ONNX) and TensorRT half-precision (FP16) engines. All Nano models met the 30 frames-per-second threshold for model-side detection latency under the tested conditions and achieved high accuracy, while a Friedman–Nemenyi analysis detected no statistically significant accuracy difference among the lightweight models. Under TensorRT FP16, YOLOv10-Nano achieved the lowest model-side end-to-end latency of 6.27 ms with no observed accuracy degradation. YOLOv8-Nano attained the lowest inference-stage latency of 3.31 ms, but its mean average precision (mAP@50–95) decreased by 1.2 percentage points after TensorRT FP16 conversion. YOLOv12-Nano had the numerically highest mean cross-validation mAP@50–95 and the lowest fold-to-fold variability, albeit at higher latency. These findings characterize model-level detector behavior rather than a complete sorting line. Within that scope, YOLOv10-Nano represents one practical configuration for a T4/TensorRT FP16 pipeline, while the other models offer different speed, stability, and deployment trade-offs, providing SMEs with a well-characterized starting point for the vision component of affordable date-sorting systems.