Abstract
Automatic and accurate recognition of the parts to be picked is the key to realize the intelligent picking of sweet pepper. However, pepper fruits are always covered by other organs, and small objects like stems and shoots are difficult to be recognized by machines or cameras under certain extreme conditions. To accurately segment and recognize all kinds of objects in sweet pepper images captured at night, three experiments were performed in this paper, and an enhanced model based on convolutional neural networks (CNNs) was eventually achieved. In experiment I, several semantic segmentation networks were trained on a small dataset, and the full-resolution residual network (FRRN) was taken as a primary network. Then, the impact of resolution of input images on the segmentation effect was investigated in experiment II. In order to strengthen the feature presentation of inconspicuous objects, the position attention module (PAM) was appended on top of the FRRN in experiment III. This architecture was further trained to provide more precise segmentation results. The experimental result shows that the mean intersection over union (IoU) is 78.88%, which is at least 1.94 percentage points higher than other models, and the mean pixel accuracy (PA) is 97.94% on the test set. The proposed method has higher generalization performance when facing unforeseen picking situations, meanwhile it is generic and can be applied to other fruits and vegetables.
Introduction
Automated harvesting in precision agriculture is notoriously difficult due to the complex, unstructured nature of plant environments. In greenhouse settings, sweet pepper fruits are frequently obscured by leaves, and critical components such as the stem—which a robotic harvester must locate to perform a clean cut—are often small and easily missed. These challenges are exacerbated during nighttime operations or under artificial lighting, where shadows and low contrast render "inconspicuous" objects nearly invisible to standard computer vision systems. Most existing semantic segmentation models, optimized for urban street scenes, struggle with the fine-grained, overlapping textures of biological environments. This research aims to bridge this gap by developing a model capable of leveraging global context to identify individual plant parts accurately.
Methodology
The researchers developed a solution through a multi-stage experimental approach designed to optimize both spatial detail and semantic understanding.
Model Architecture
The solution is built upon the Full-Resolution Residual Network (FRRN). Unlike standard CNNs that lose spatial detail through successive downsampling, FRRN maintains two parallel streams: a pooling stream to capture high-level semantic information and a residual stream that preserves full image resolution. This ensures the model can identify "what" an object is while precisely determining "where" its boundaries lie.
To enhance the recognition of small or partially hidden parts, a Position Attention Module (PAM) was appended to the FRRN. The PAM functions as a global "sanity check" by calculating relationships between every pixel in the image. This allows the model to use features from clearly visible organs (like leaves or fruits) to infer the location of nearby, inconspicuous parts like stems or peduncles.
Experimental Design and Datasets
The study utilized a combination of synthetic and empirical data. A synthetic dataset of 10,500 images was rendered using Blender, based on 21 empirically measured plant properties to ensure biological accuracy. This provided a robust training set with perfect ground truth labels for eight classes: background, leaves, peppers, peduncles, stems, shoots, wires, and cuts. For real-world validation, 50 images were captured in a commercial greenhouse at night.
As shown in Table 1, the research progressed through three distinct phases to isolate the effects of architecture, resolution, and attention mechanisms.
Results and Discussion
The final FRRN + PAM model, utilizing a 512×512 resolution, achieved a Mean Pixel Accuracy (PA) of 97.94% and a mean Intersection over Union (mIoU) of 78.88% on the test set. This performance significantly outperformed other popular architectures, including ENet (65.78%), BiseNet (69.75%), and DANet (76.94%).
Key Insights
- The Power of Attention: The PAM was instrumental in boosting the recognition of inconspicuous objects. By capturing long-range dependencies, the model could infer stem locations based on the surrounding context rather than relying solely on the stem's own often-blurry pixels.
- Resolution Sensitivity: Increasing input resolution from 384px to 512px resulted in a 3.14% improvement in mIoU. In agricultural robotics, where precision is measured in millimeters, this additional detail is critical for successful manipulation.
- Synthetic-to-Real Generalization: While models trained purely on synthetic data saw a performance drop on real-world images (51.63% mIoU), fine-tuning with a small set of 30 real images boosted performance to nearly 60%, demonstrating the value of synthetic data as a powerful bootstrapping tool.
Conclusion
The proposed FRRN + PAM architecture provides a robust framework for the semantic segmentation of sweet peppers in challenging greenhouse environments. While the model achieves high accuracy, future work will focus on optimizing real-time performance for deployment on physical robotic platforms. High-resolution processing with attention modules is computationally intensive, and balancing this precision with the speed required for field operations remains a key challenge. Additionally, exploring unsupervised methods to further bridge the gap between synthetic training and real-world application will be a priority.
Summary updated