Novel green-fruit detection algorithm based on D2D framework

Jinmeng Wei, Yanhui Ding, Jie Liu, Muhammad Zakir Ullah, Xiang Yin, Weikuan JiaInternational Journal of Agricultural and Biological Engineering 2022

Abstract

In the complex orchard environment, the efficient and accurate detection of object fruit is the basic requirement to realize the orchard yield measurement and automatic harvesting. Sometimes it is hard to differentiate between the object fruits and the background because of the similar color, and it is challenging due to the ambient light and camera angle by which the photos have been taken. These problems make it hard to detect green fruits in orchard environments. In this study, a two-stage dense to detection framework (D2D) was proposed to detect green fruits in orchard environments. The proposed model was based on multi-scale feature extraction of target fruit by using feature pyramid networks MobileNetV2 +FPN structure and generated region proposal of target fruit by using Region Proposal Network (RPN) structure. In the regression branch, the offset of each local feature was calculated, and the positive and negative samples of the region proposals were predicted by a binary mask prediction to reduce the interference of the background to the prediction box. In the classification branch, features were extracted from each sub-region of the region proposal, and features with distinguishing information were obtained through adaptive weighted pooling to achieve accurate classification. The new proposed model adopted an anchor-free frame design, which improves the generalization ability, makes the model more robust, and reduces the storage requirements. The experimental results of persimmon and green apple datasets show that the new model has the best detection performance, which can provide theoretical reference for other green object detection.

Introduction

Automated harvesting and yield estimation in orchards rely heavily on robust computer vision systems. However, "green-on-green" detection—identifying green fruits against a backdrop of similarly colored leaves—remains a significant challenge. Beyond color similarity, orchard environments present complex lighting conditions, including dappled sunlight, deep shadows, and backlighting, which can obscure fruit features and lead to false negatives or inaccurate localization.

Green fruit under side-sunlighting conditions illustrating the challenge of ambient light in orchards.

Furthermore, many high-performance deep learning models are computationally intensive, making them difficult to deploy on the edge hardware typically used in agricultural robotics. There is a critical need for an algorithm that is not only accurate enough to handle occlusions and similar colors but also efficient enough for real-time operation.

The D2D Framework

To address these issues, researchers developed the Dense to Detection (D2D) framework. This two-stage model moves away from traditional anchor-based designs, which rely on fixed bounding box shapes, in favor of an anchor-free approach. This design choice enhances the model's ability to generalize across different fruit shapes and sizes while reducing memory overhead.

Architecture and Methodology

The D2D framework utilizes a MobileNetV2 backbone coupled with a Feature Pyramid Network (FPN). This combination allows for lightweight yet effective multi-scale feature extraction. The process involves two primary branches:

  1. Regression Branch: This branch calculates offsets for a grid of $k \times k$ local features. By using a binary mask prediction, the model filters out background interference, ensuring that the regression focuses specifically on the fruit's boundaries.
  2. Classification Branch: Utilizing ROI Align and a novel adaptive weighted pooling mechanism, this branch extracts features from sub-regions of the proposal. The adaptive weighting learns to emphasize the most discriminative parts of the fruit, which is crucial when fruits are partially occluded by foliage.
The overall structure of the proposed D2D framework, highlighting the regression and classification branches.

Experimental Results

The model was rigorously tested on two datasets: green persimmons (568 images) and green apples (1,361 images), captured under various lighting conditions and angles.

The D2D framework demonstrated superior performance compared to established models like Faster R-CNN, SSD, and FCOS. On the persimmon dataset, the model achieved an Average Recall (AR) of 80.4% and an Average Precision (AP) of 73.4%. Notably, it showed a 7.7% improvement in recall and a 7.4% improvement in precision over the anchor-free FCOS model. Qualitative analysis confirmed the model's robustness in challenging scenarios, such as near-darkness with LED assistance and heavy occlusion.

Conclusion and Future Work

The D2D framework provides a robust and efficient solution for green-fruit detection in complex orchard environments. By leveraging an anchor-free design and adaptive weighted pooling, it overcomes the limitations of traditional detectors in "green-on-green" scenarios. Future research will focus on expanding dataset diversity and evolving the binary mask prediction into full instance segmentation to provide more precise 3D contours for robotic picking.

Summary updated

BibTeX
@article{wei2022novel,
  author = {Jinmeng Wei and Yanhui Ding and Jie Liu and Muhammad Zakir Ullah and Xiang Yin and Weikuan Jia},
  title = {{Novel green-fruit detection algorithm based on D2D framework}},
  journal = {International Journal of Agricultural and Biological Engineering},
  year = {2022},
  doi = {10.25165/j.ijabe.20221501.6943},
}
Figure