Jamil Ahmad, M. A. Q. Khan, Wail Gueaieb, Abdulmotaleb El Saddik, G. Masi, Fakhri Karray
Accurate detection of citrus fruit maturity is critical for optimizing harvest schedules and maximizing yield. Consumer-grade unmanned aerial vehicles (UAVs) have emerged as cost-effective alternatives to traditional methods for detecting maturity, which rely on labor-intensive manual inspections. This paper presents a two-step, semi-supervised approach leveraging knowledge distillation (KD) and transfer learning for citrus maturity detection in UAV images. Specifically, we combine teacher-filtered pseudo-labels with a consistency-guided feature distillation signal to exploit abundant unlabeled UAV frames while using only a small labeled seed set. Firstly, a consistency-guided KD transfers knowledge from a pretrained detection transformer with collaborative hybrid assignment training (Co-DETR) to a lightweight student network by exploiting a small labeled and a large unlabeled dataset. The student network (Cit-DETR) is based on the highly efficient detection transformer (RT-DETR) having a ResNet18 backbone with selective kernel blocks and the hybrid encoder module. Step 2 uses a small labeled augmented dataset with maturity labels to fine-tune the Cit-DETR model for maturity detection. Experimental results on a custom UAV-captured citrus dataset demonstrate the effectiveness of our method, achieving 86.2% average precision in citrus detection and 91.0% mean average precision in ripeness detection. The model has been further optimized for real-time inference on edge devices or UAVs, enabling precision agriculture applications.