TL;DR
This paper presents a computer vision pipeline to estimate citrus fruit yields before harvest without manual counting. By combining a YOLOv5 object detection model with knowledge distillation for compression and a linear regression model for yield mapping, the authors achieved an 86.56% counting accuracy and an 8.5% overall yield prediction error while reducing the model's footprint for potential use on mobile devices.
What Problem Does This Paper Address?
In the citrus industry, knowing how much fruit is on the trees before harvest is vital for planning storage, logistics, and pricing. Traditionally, this is done manually—a process that is labor-intensive, prone to human error, and expensive.
Automating this with computer vision is challenging because citrus trees are complex environments. Fruits often overlap, are hidden behind leaves (occlusion), or appear very small in high-resolution images. Furthermore, deploying heavy deep learning models in the field requires significant computational power, which isn't always available on handheld devices or agricultural robots. The authors aim to bridge the gap between high-accuracy detection and lightweight deployment.
Methods
The authors proposed a three-stage pipeline:
- Object Detection (YOLOv5): They utilized the YOLOv5 architecture to identify and count citrus fruits in images. YOLOv5 is a "one-stage" detector, meaning it processes the image in a single pass, making it inherently faster than older two-stage models.
- Model Compression (Knowledge Distillation): To make the model more efficient, they employed a "Teacher-Student" framework. A larger, high-performing "Teacher" model (YOLOv5s-T) trains a smaller "Student" model (YOLOv5n-S). Instead of just learning from hard labels (0 or 1), the student learns from the "soft" probability outputs of the teacher, allowing it to capture the nuances of the teacher's decision-making process with fewer parameters.
- Yield Prediction (Linear Regression): Simply counting the visible fruit in a photo doesn't give the total yield, as many fruits are hidden inside the canopy. The authors used a univariate linear regression model to map the "detected count" from two-angle photos to the "actual yield" based on historical data.
Datasets
The study focused on Newhall navel oranges, a common variety in Southwest China.
- Image Acquisition: 40 high-resolution photos (4000x3000 pixels) were taken of 20 different trees from two different angles using a standard mobile phone.
- Conditions: The dataset included challenging real-world factors like overlapping fruit, leaf occlusion, and varying lighting conditions.
- Ground Truth: A total of 5,069 fruit instances were manually labeled to train and validate the detection model.
Key Insights and Ideas
- The "Soft Label" Advantage: Knowledge distillation proved highly effective. Interestingly, while the student model's precision dropped slightly compared to the teacher, its recall improved significantly (from 74.8% to 88.4%). This suggests the distillation process helped the smaller model become better at "finding" fruits it might have otherwise missed.
- Correcting for the Invisible: The authors recognized that a camera only sees the "surface" of the tree. By using the linear regression formula $y = 0.998x - 15.101$, they created a statistical correction to estimate the total fruit count ($y$) based on the detected count ($x$).
- Efficiency Matters: The model size was reduced from 15.11MB to 13.43MB. While a ~11% reduction seems modest, in the context of edge computing and mobile deployment, every megabyte saved contributes to faster inference speeds and lower power consumption.
Key Results
- Counting Accuracy: The system achieved an overall accuracy rate of 86.56% for fruit recognition.
- Yield Prediction: After applying the linear regression fitting, the relative error for the overall yield of the 20 test trees was only 8.5%.
- Model Performance: The compressed "Student" model maintained a mean Average Precision (mAP) of 83.6%, proving that compression didn't sacrifice the model's ability to localize fruit accurately.
- Error Variance: On an individual tree basis, the error varied (from 0% to 30% in extreme cases), but the aggregate error remained low, making it a viable tool for orchard-level estimation.
Limitations and Future Work
- Dataset Size: The study relied on a relatively small sample of 20 trees and 40 images. The authors acknowledge that increasing the dataset size and variety would likely improve the robustness of the linear regression model.
- Variety Specificity: The current regression model is tuned specifically for Newhall navel oranges. Different citrus varieties with different canopy densities would likely require their own specific regression calibrations.
- Environmental Factors: While the model handles some lighting changes, extreme weather or different growth stages (e.g., green fruit vs. ripe fruit) were not extensively tested. Future work could involve multi-spectral imaging or more diverse environmental training data.
Summary updated