Research on High Performance Apple Recognition Model Construction Strategy Based on Deep Learning

Yixuan Wang, Zhengkun SuHighlights 2024

Abstract To enhance the efficiency and environmental adaptability of apple-picking robots, this research proposes a high-performance recognition method based on Faster R-CNN. The system is designed to achieve accurate localization, ripeness assessment, and quality estimation under complex orchard conditions, including leaf, branch, and fruit occlusion. By integrating deep learning with OpenCV-based geometric optimization (color segmentation and shape fitting), the model achieved a detection accuracy of 90.35% and a processing speed of approximately 0.3 seconds per image. Furthermore, a Random Forest classifier was employed for ripeness prediction with 83.2% accuracy, while mass estimation was derived through Canny edge detection and pixel-area conversion.

The Challenge of Orchard Environments

Automated harvesting in orchards is significantly more difficult than industrial automation due to the unstructured nature of the environment. Picking robots must navigate "complex situations" such as heavy leaf occlusion, overlapping fruit (fruit occlusion), and varying lighting conditions. Traditional computer vision methods often fail when fruit is partially hidden, while pure deep learning models may lack the specific geometric constraints needed for precise physical localization. This paper addresses these gaps by creating a hybrid model that is both accurate and fast enough for real-time robotic deployment.

A Hybrid Recognition Pipeline

The core of the proposed system is a multi-stage pipeline that blends the feature extraction power of deep learning with the precision of classical image processing.

  1. Detection via Faster R-CNN: The model uses a Region Proposal Network (RPN) to identify candidate regions likely to contain apples. This deep learning backbone provides the robustness needed to handle visual noise and varied backgrounds.
  2. Geometric and Color Optimization: To refine the RPN outputs, the researchers integrated OpenCV functions (cv2.inRange and cv2.fitEllipse). By setting specific HSV color thresholds and eccentricity limits (0.5), the system filters out false positives—such as reddish leaves or branches—ensuring that only "apple-like" elliptical shapes are confirmed as targets.
  3. Quality Assessment: Beyond simple detection, the system evaluates the fruit's state. A Random Forest model analyzes color histograms and texture features (Entropy and Contrast from a Gray-Level Co-occurrence Matrix) to determine ripeness. Simultaneously, Canny edge detection calculates the pixel area of the fruit, which is converted to a mass estimate using a calculated ratio (0.007) based on image resolution and average apple density.
Figure 4: Examples of apple identification across various conditions, including ripe individuals, clusters, leaf occlusion, and unripe fruit.

Dataset Characteristics and Distribution

The study utilized a dataset from the Asia-Pacific Mathematical Contest in Modeling (APMCM), featuring apples in diverse states. Statistical analysis revealed that the number of apples per image typically follows a normal distribution, with most images containing between 0 and 10 apples. This distribution is critical for training a model that can handle both sparse and dense fruit clusters.

Figure 6: Histogram showing the distribution of the number of apples identified per image in the dataset.

Key Results and Insights

The experimental results demonstrate a highly capable system for robotic applications:

  • Detection Performance: The Faster R-CNN model achieved an accuracy of 90.35%, a recall of 88.44%, and an F1-score of 89.38%.
  • Real-Time Viability: With a recognition time of 0.3 seconds per image, the system meets the temporal requirements for mobile robotic platforms.
  • Ripeness and Mass: The Random Forest classifier reached 83.2% accuracy in ripeness prediction. Mass estimation tests indicated that most apples in the dataset fell within the 0–100g range, providing actionable data for automated sorting.

Conclusion and Future Directions

The integration of "hard-coded" geometric constraints into a deep learning pipeline proved to be a significant advantage, allowing the model to maintain accuracy even when fruit is partially obscured. While the current mass estimation relies on a fixed pixel-to-area ratio, future work could incorporate depth data from RGB-D cameras to account for varying distances between the camera and the fruit. The next phase of research involves physical integration into a robotic chassis to evaluate performance under the mechanical vibrations and movement of active harvesting.

Summary updated

BibTeX
@inproceedings{wang2024research,
  author = {Yixuan Wang and Zhengkun Su},
  title = {{Research on High Performance Apple Recognition Model Construction Strategy Based on Deep Learning}},
  booktitle = {Highlights},
  year = {2024},
  doi = {10.54097/334ks329},
}
Figure