Abstract
The accurate detection and non-contact weight estimation of zucchini fruits are crucial for automated harvesting systems. This study presents a novel weakly supervised oriented object detection method for zucchini fruit recognition and weight prediction in complex greenhouse environments. Our approach, termed H2RBox-v2-SF, introduces three key enhancements to the original H2RBox-v2 model. First, the Swin Transformer V2 (SwinV2) is adopted as the backbone network to replace 50-layer Residual Networks (ResNet-50), significantly strengthening feature extraction capabilities. Second, the Bi-directional Feature Pyramid Network (BiFPN) is employed instead of the original Feature Pyramid Network (FPN) to achieve more efficient multi-scale feature fusion. Third, the FPDIoU loss is introduced to replace the CircumIoU loss, enhancing the accuracy and efficiency of bounding box regression. Furthermore, we propose a Morphology-based Fruit Weight Estimation (MFWE) algorithm that leverages depth information for non-contact weight estimation. Experimental results demonstrate that the improved model achieves an AP@0.75 of 87.8%, a precision of 69.8%, and a recall of 91.5%, representing improvements of 9.6%, 5.0%, and 4.7% respectively over the original model. Additionally, the weight estimation achieves a mean absolute error (MAE) of 55.05 g, a coefficient of determination () of 0.899, and a root mean square error (RMSE) of 63.59 g. The proposed method achieves high accuracy for ‘Jinghu No. 43’ zucchini fruit detection and weight estimation under greenhouse conditions, offering an effective technical solution for automated zucchini harvesting.
1. Introduction
Zucchini, valued for its high nutritional content and yield, has become an important vegetable crop, particularly in northern China. However, the current reliance on manual harvesting is labor-intensive and inefficient. The development of automated harvesting robots is, therefore, crucial to enhance efficiency and reduce costs. In such robotic systems, the accurate detection of fruits and non-contact estimation of their weight are fundamental capabilities, enabling robots to make reasonable decisions, such as prioritizing the harvesting of ripe, marketable-sized fruits.
With the development of deep learning, fully supervised object detection techniques have been widely used for a variety of fruit detection, such as mango [1], apple [2], kiwifruit [3] and tomato [4]. However, these methods require a large number of fully labeled datasets, which is not only time-consuming but also costly. To simplify the data labeling, the methods of weakly supervised learning [5,6] and semi-supervised learning have gained significant development. Weakly supervised learning can utilize incomplete labels to train models, which is less costly and more readily available than fully labeled data. Wu and Xu [7] proposed a method using only bounding-box annotations for crop organ instance segmentation and disease detection, which showed 97.5% segmentation accuracy and 98.61% recognition accuracy on tomato disease datasets. In a study by Kim et al. [8], onion disease symptoms were classified and localized in a real-time field monitoring system equipped with a high-resolution camera using only image-level annotations. It achieved a mAP@0.5 from 74.1% to 87.2%. In a study by Bellocchio et al. [9], fruit counting was possible using only image-level-binary annotations, achieving high counting accuracies compared to the two supervised methods on the apple, almond and olive datasets. These studies demonstrate the feasibility of weakly supervised methods in unstructured environments.
In terms of fruit size measurement and weight estimation, traditional methods rely on manual measurement and visual estimation. With the development of technology, in recent years, researchers have begun to apply computer vision and deep learning techniques to automate non-contact estimation of fruit weight. Calixto et al. [10] filtered color in RGB color space and using the Otsu method to extract melon contours from images to obtain fruit dimensions and predict fruit weights by linear regression. Wang et al. [11] proposed an object edge detection network with fused convolutional features (FCF) to segment the apple image, and subsequently used the region growing method on the extracted apple edge maps to compute the horizontal diameter of the apples. However, all these methods use 2D RGB images, which require the fruit to be fixed from the camera during data acquisition, or the distance from the camera to the fruit needs to be measured [12,13]. Therefore, more and more studies are using 3D data to generate reconstructed point clouds of fruits or fruit trees and measure their sizes by LiDAR or RGB-D cameras [14,15]. For example, Zhou et al. [16] used YOLO-Banana network to detect color images to obtain 2D information of banana bunches and stalks, then calculated 3D coordinates of the center point of banana stalks based on the depth information and derived the size of banana bunches based on the depth information of the center point. This non-contact method of predicting the weight of fruits by dimensional size has also been applied to a variety of fruits, such as strawberries [17], mandarin oranges [18], and green peppers [19]. However, research on weight prediction for elongated cylindrical fruits like zucchini in complex greenhouse environments remains very limited. Furthermore, accurately estimating the length and diameter of such non-axisymmetric fruits often requires precise fruit localization and orientation, which common horizontal bounding boxes fail to provide.
Based on the current research progress, this study proposes a novel framework for zucchini fruit detection and weight prediction in complex greenhouse environments. First, an improved weakly supervised oriented object detection model, H2RBox-v2-SF, is introduced to accurately localize zucchini fruits with rotated bounding boxes. Subsequently, a vision-based algorithm is designed to extract keypoints from the detected oriented boxes. These keypoints are combined with depth information to calculate the fruit’s 3D length and transverse diameter. Finally, a regression model is established to predict the fruit’s weight based on these measured dimensions. The method proposed in this study enables high-precision detection in complex greenhouse environments while overcoming the limitations of two-dimensional images, providing an effective technical solution for the automated harvesting of zucchini fruits.
2. Dataset
2.1. Image Acquisition
The dataset was collected in multiple greenhouses located in Taigu District, Jinzhong City, Shanxi Province, China, between December 2023 and April 2024. To reflect real-world greenhouse conditions, images were captured under a wide range of natural lighting scenarios—including midday strong light conditions, morning soft light conditions, and low light conditions during late afternoon. All zucchini fruits belong to the commercial cultivar ‘Jinghu No. 43’, which is widely cultivated in northern China. Data acquisition was performed using two devices: an Intel RealSense D455 RGB-D camera and a Xiaomi 14 smartphone camera, operated in a handheld manner to capture images. Images were captured at varying distances from the fruits, primarily within 0.6 to 1.0 m from the camera to the target zucchini. This range ensures that fruits occupy a sufficient portion of the image for detection while accounting for depth variations in dense canopies. images were captured from multiple viewpoints: Top-down views (approximately 60°–90° from the horizontal plane), horizontal or near-horizontal views (0°–30° elevation angle) The Intel RealSense D455 camera was used to capture 221 sets of RGB-D data. Each set includes one RGB image and a corresponding depth map, both at a resolution of 1280 × 720 pixels, as shown in Figure 1. Figure 1a displays a sample RGB image, while Figure 1b visualizes its associated depth information. Additionally, 734 high-resolution RGB images (3450 × 3450 pixels) were acquired using the smartphone camera. All images exhibit high sharpness; visual inspection confirmed that all images are in focus with clear fruit boundaries. To maintain input consistency and mitigate scale variation, all images were centrally cropped to a uniform size of 720 × 720 pixels before being fed into the model.
Figure 1.
RGB-D data visualization. (a) color image; (b) depth image.
2.2. Fruit Size and Weight Data Collection
During the RGB-D data collection process, a total of 310 zucchini fruits in 221 sets of RGB-D data were manually labeled and harvested from the plants. These harvested fruits were then transported to the laboratory to measure their weight, length, and transverse diameter, as documented in Figure 2. The measurement procedure was as follows: First, each fruit was weighed using a precision electronic scale (accuracy ≤ 0.1 g), and the weight was recorded (Figure 2a). Subsequently, the fruit size was measured using vernier calipers. The fruit’s transverse diameter was recorded at its midpoint and its maximum longitudinal length, as shown in Figure 2b and Figure 2c, respectively. For the weight estimation task, the 310 samples of zucchini fruits (each with recorded size and weight) were randomly divided into a training set and a validation set at a ratio of 7:3.
Figure 2.
Fruit weight and size measurements. (a) fruit weight measurement; (b) transverse diameter measurement; (c) length measurement.
2.3. Data Pre-Processing
Zucchini fruit instances were annotated using the roLabelImg tool [20]. Oriented bounding boxes were applied to delineate each fruit, an example of which is presented in Figure 3. Compared to horizontal bounding boxes, this approach provides a more accurate representation of the fruit’s geometry, which is essential for the subsequent model performance evaluation [21]. Our annotation experiments demonstrate that for the same batch of 50 fruit images, the average time required to annotate a oriented bounding box is 2.26 ± 0.34 s, whereas an horizontal bounding box requires only 1.18 ± 0.21 s—the former consumes 55% more time.
Figure 3.
Image annotation.
The dataset for the detection task comprised 955 images, which were randomly split into a training set (669 images), a validation set (191 images), and a test set (95 images) at a ratio of 7:2:1. To improve model generalization, we applied extensive data augmentation to the training set, including contrast enhancement, rotation, and random flipping. Examples of the augmented images are presented in Figure 4. It should be noted that the detection model was trained and evaluated on the complete dataset of 955 RGB images. However, the subsequent 3D keypoint conversion and weight prediction steps were only applied to the subset of 221 RGB-D image sets that contained both color and depth information.
Figure 4.
Data Enhancement. (a) Original map; (b) contrast enhancement; (c) random rotation; (d) horizontal flip; (e) vertical flipping; (f) diagonal flipping.
3. Method
The overall workflow, illustrated in Figure 5, comprised three main stages. First, zucchini fruits were detected using our improved H2RBox-v2-SF model, which is based on H2RBox-v2 [22]. Subsequently, for each detected fruit with a confidence score exceeding 0.75, the 2D keypoints—namely the Left, Right, Bottom, and Top points—were localized from the oriented bounding box. These 2D keypoints were then converted into 3D coordinates using the depth information from the RGB-D camera. Finally, the 3D Euclidean distances between corresponding keypoints were calculated to estimate the fruit’s length and transverse diameter. These physical dimensions were used as input to a multivariate power-law regression model to predict the fruit’s weight.
Figure 5.
Workflow framework.
3.1. H2RBox-v2-SF Network Model
H2RBox-v2 is a weakly supervised deep learning method using ResNet-50 [23] as the backbone network and FPN [24] as the neck network, aiming at extracting and fusing multi-scale feature maps. These feature maps are then fed into self supervised and weakly supervised branches to compute loss. The model utilizes the fundamental symmetry of the object and can be trained using horizontal box annotations to predict oriented bounding boxes. In the training model phase, the horizontal box annotations are used for training, while the oriented ground truth boxes are only used for network detection performance evaluation, as shown in Figure 6. The blue box in Figure 6a denotes the oriented ground truth, and the orange box in Figure 6b denotes the horizontal box annotation, which is horizontal minimum bounding rectangle of the oriented ground truth box.
Figure 6.
Oriented ground truth box and its horizontal minimum bounding rectangle. (a) Oriented bounding box is used for network evaluation; (b) horizontal bounding box is used for training network.
To enhance detection accuracy in complex greenhouse environments and to support the subsequent task of weight prediction, we introduce three key improvements to the base H2RBox-v2 model. The overall structure of our improved model H2RBox-v2-SF is depicted in Figure 7. First, SwinV2 [25] is adopted as the new backbone network, replacing the original ResNet-50, to significantly strengthen the model’s feature extraction capabilities. Second, the original FPN in the neck network is replaced with a BiFPN [26], which facilitates more effective multi-scale feature fusion. Third, the FPDIoU loss function [27] is employed instead of the original CircumIoU, thereby enhancing the efficiency and accuracy of the oriented bounding box regression.
Figure 7.
The improved network structure.
3.1.1. Improved Backbone Network
While the original H2RBox-v2 employs a deep CNN backbone to capture multi-scale features, such architectures are prone to gradient vanishing and limited receptive fields without a substantial increase in computational cost. To overcome these limitations, we replace ResNet-50 with SwinV2. By computing self-attention within and across non-overlapping windows, SwinV2 efficiently achieves a global receptive field and superior feature representation capabilities. This enhancement is crucial for robust detection in complex greenhouse environments.The structure of the improved backbone is shown in Figure 8.
Figure 8.
Backbone and neck network structure.
The SwinV2 backbone processes the image by first dividing it into non-overlapping patches, resulting in patch features of dimension . These patches are then processed in multiple stages. The first stage employs a Linear Embedding layer and two consecutive Swin Transformer Blocks, which utilize the self-attention mechanism defined in Equation (1) to model feature representations.
where Q, K, and V denote the query, key, and value vectors, while encodes relative positional biases to capture spatial relationships. Subsequent stages build a feature pyramid via Patch Merging layers, which progressively halve the spatial resolution and double the channel dimension of the feature maps. The multi-scale features from the last three stages are finally fused by the BiFPN neck and passed to the detection heads for loss computation.
3.1.2. Improved Neck Network
In complex greenhouse environments, zucchini fruits exhibit significant scale variations due to factors such as their distance from the camera and occlusion by leaves. The original Feature Pyramid Network (FPN) in H2RBox-v2 facilitates multi-scale feature fusion through a top-down pathway. However, its unidirectional information flow and equal treatment of all input features limit its ability to fully leverage the rich spatial details present in low-level features and the robust semantic information in high-level features.
To address this limitation, we replace the FPN with a BiFPN. As illustrated in Figure 8, BiFPN enhances the classic PANet structure by introducing efficient bidirectional (top-down and bottom-up) cross-scale connections and learnable feature weights. This design allows for more effective and iterative fusion of features across different scales.
The core innovation of BiFPN lies in its weighted feature fusion mechanism. Unlike traditional methods that treat all input features equally, BiFPN assigns a learnable weight to each input, acknowledging that features at different resolutions contribute unequally to the output. In this study, we adopt the fast normalized fusion strategy. The fusion process for an output feature can be generically represented by Equation (2):
where denotes an input feature, is a learnable weight associated with that input, and is a small constant to ensure numerical stability.
Taking the feature at level as a concrete example, its computation involves two key steps, as defined in Equations (3) and (4):
where Resize denotes either upsampling or downsampling operations for resolution alignment, and Conv represents a convolutional block for feature processing. By integrating this bidirectional architecture and adaptive weighting, the BiFPN neck in our H2RBox-v2-SF model significantly enhances the fusion of multi-scale features. This leads to more robust and discriminative feature representations, which is crucial for accurately detecting zucchini fruits of varying sizes amidst the challenging conditions of a greenhouse.
3.1.3. Loss Function
The original H2RBox-v2 uses CircumIoU to compute the overlap between the horizontal ground truth box to generate a projected and the oriented predicted box , as shown in Figure 9, before calculating the IoU. It is necessary to project the oriented predicted box onto the direction of the horizontal to generate a projected . shows the formula for calculating CircumIoU Loss.
Figure 9.
CircumIoU loss.
When the predicted box has no intersection area with the ground truth box, is 0, tends to infinity, resulting in CircumIoU Loss being unable to reflect the distance between the two boxes. Meanwhile, FPDIoU Loss can reflect the distance between two boxes when there is no intersection area, so FPDIoU Loss is chosen to replace CircumIoU Loss. The structure of FPDIoU is shown in Figure 10.
Figure 10.
FPDIoU loss.
When calculating the FPDIoU Loss, ,,, denote the coordinates of the four vertices of the bounding box, respectively. In order to ensure that there is a one-to-one correspondence between the four corner points of the projected box and the ground truth box , these corner points are sorted according to the ascending order of the x-coordinate values, that is, and . The steps of the FPDIoU Loss computation are shown in Algorithm 1.
| Algorithm 1 Calculating FPDIoU loss |
Require: Two oriented boxes: , , width and height of input image: w, h Ensure: FPDIoU Loss 1: 2: 3: 4: 5: 6: 7: return
|
3.2. Weight Prediction
Our proposed Morphology-based Fruit Weight Estimation (MFWE) algorithm proceeds from detection: Only oriented bounding boxes with a confidence score greater than 0.8 are retained for subsequent processing. This threshold effectively filters out low-confidence predictions often caused by severe occlusion or background clutter, thereby preventing the mislocalization of keypoints onto leaves, stems, or other non-fruit structures. The selected high-confidence boxes are then processed by a series of image processing techniques to pinpoint four morphological keypoints (left, right, top, and bottom). These points are converted into 3D coordinates using depth data, from which the fruit’s transverse diameter and longitudinal length are derived. The measured dimensions are subsequently fed into a nonlinear regression model to predict the fruit’s weight. The complete MFWE algorithm is shown in Algorithm 2.
| Algorithm 2 Morphology-based Fruit Weight Estimation |
Require: Oriented bounding box (with confidence score s), RGB image , Depth map Ensure: Predicted weight W 1: if then ▷ Process high-confidence detections only 2: 3: 4: 5: 6: ▷ Get the center point of the RoI 7: // Scan outwards from the center to find boundary keypoints 8: 9: 10: 11: 12: // Convert 2D keypoints to 3D using depth information 13: for each in do 14: 15: end for 16: // Calculate physical dimensions:Transverse diameter, Length (in mm) 17: 18: 19: // Predict weight using the nonlinear regression model 20: ▷ See Equation (19) for the model 21: return W 22: end if |
3.2.1. Keypoint Extraction for Weight Estimation
To visually elucidate the core procedure of our weight estimation algorithm, this section details the keypoint extraction process, The process begins with the oriented bounding box predicted by the H2RBox-v2-SF model. The region within this box is cropped from the original RGB image to form the Region of Interest (RoI), which isolates the zucchini fruit from the complex greenhouse background Figure 11b. Subsequently, the RoI is converted from the RGB color space to the HSV color space. This conversion provides better separation of color and illumination, facilitating more robust color-based segmentation. The individual H (Hue), S (Saturation), and V (Value) channels are displayed in Figure 11c, Figure 11d and Figure 11e, respectively.
Figure 11.
Zucchini stalk localization and picking point identification. (a) original image, the orange frame is the predicted box; (b) RoI of the fruit and the stalk; (c) H channel; (d) S channel; (e) V channel.
By analyzing the data in the HSV color space, specific color ranges for zucchini fruits are determined, with specific values detailed in Table 1. A binary image is then generated by thresholding the RoI in the HSV space. In this binary image, pixels belonging to the fruit are set to white, while the background is set to black (Figure 12a). To eliminate noise and small, disconnected components, the largest connected white region is identified and retained (Figure 12b). This step effectively captures the main body of the zucchini fruit, filtering out potential artifacts from the background or on the fruit surface.
Table 1.
Parameters for color channels (H, S, V).
Figure 12.
Zucchini stalk localization and picking point identification. (a) Binarized images; (b) maximum connectivity area. (c) The blue points are keypoints, the red point is the center of the ROI.
Finally, the four keypoints are localized. Starting from the center of the RoI, the algorithm scans outward along the horizontal and vertical axes. The outermost white pixels encountered in the left, right, top, and bottom directions are identified as the keypoints, marking the fruit’s boundaries (Figure 12c). These 2D keypoints are then projected into 3D space using the depth information to calculate the physical dimensions.
3.2.2. Conversion of 2D Keypoints to 3D Coordinates
To enable accurate non-contact weight prediction and precise harvesting of zucchini fruits, it is essential to transform the 2D keypoints, localized on the RGB image, into the 3D world coordinate system with the camera’s optical center as the origin. The geometric relationship of this process is illustrated in Figure 13. Here, represents the pixel coordinates of a keypoint on the RGB image plane, and denotes the corresponding 3D coordinates in the camera coordinate system, whose origin is located at the camera’s optical center.
Figure 13.
Convert 2D point to 3D point. The is the 2D keypoint, the is the 3D keypoint in camera coordinate system.
The core of the transformation involves using the camera’s intrinsic parameters to establish the relationship between pixel coordinates and 3D spatial coordinates. The camera intrinsic matrix K defines the geometric model of the camera imaging and is expressed as Equation (5):
where and represent the focal length of the camera in the X axes and Y axes directions, respectively, and , are the coordinates of the center of the image. Given a 2D keypoint in the image, its corresponding 3D coordinates are calculated using the following equation Equation (6), z is depth value of , representing the perpendicular distance from the object point to the camera plane.
Through this transformation, the 2D keypoints extracted from the image are successfully projected into 3D space. These 3D coordinates are subsequently used to calculate the physical dimensions of the fruit.
3.2.3. Weight Prediction Model
Following the acquisition of the 2D keypoints and their subsequent projection into 3D space using depth information, the physical dimensions of the zucchini fruit—namely the transverse diameter (w) and length (h)—are calculated. The transverse diameter is determined by computing the 3D Euclidean distance between the left and right keypoints, which correspond to the fruit’s transverse diameter. Simultaneously, the fruit length is obtained by calculating the 3D Euclidean distance between the top and bottom keypoints, representing the maximum longitudinal dimension. These calculations are performed using Equation (7), ensuring accurate metric measurements that effectively translate the oriented detection from the image plane into physically meaningful size parameters crucial for subsequent weight prediction.
The measured transverse diameter (w) and length (h) of the zucchini fruits, both in millimeters, are used to establish a regression model for predicting fruit weight. To capture the complex, non-linear relationship between the physical dimensions and the weight, we employ a multivariate power-law model, as shown in Equation (8). In plant biology, fruit mass is often proportional to its volume, which for elongated fruits like zucchini can be approximated as an ellipsoid or cylinder—both of which have volumes proportional to the product of diameter squared and length. However, due to natural shape variations (e.g., tapering, curvature), the exponents may deviate from theoretical values. Therefore, we adopt a flexible power-law form with learnable exponents b and c to capture the actual nonlinear relationship between morphological dimensions and weight. This model has been widely used in prior studies for non-destructive fruit weight estimation, such as for apples [28], avocado [29], and mango [30], demonstrating strong fitting performance.
where is the predicted mass of the fruit (in grams), w is the transverse diameter (in mm), h is the length (in mm), and are the regression coefficients to be determined. This model provides a compact and effective representation of the non-linear correlation between the fruit’s morphometric features and its weight.
3.3. Evaluation Metrics
3.3.1. Evaluation of Detection
In the object detection task, Intersection over Union (IoU) is a commonly used metric to measure the degree of overlap between a predicted bounding box and its corresponding ground truth box. The IoU is calculated using Equation (9), where A represents the area of the predicted box and B represents the area of the ground truth box.
To comprehensively evaluate the detection performance of the model, three metrics—precision (P), recall (R), and average precision ()—are employed. Their calculations are shown in Equations (10) and (11). Here, true positives () denotes the number of ground truth objects for which the model has made a correct detection with an IoU greater than a set threshold. False positives () denotes the number of detected bounding boxes that either have an IoU below the threshold with any ground truth or are incorrectly assigned to a ground truth. False Negatives () denotes the number of ground truth objects that the model failed to detect. The average precision () is defined as the area under the precision–recall curve plotted across all recall levels. This metric provides a single-figure measure of the detection quality across all confidence levels.
3.3.2. Evaluation of Weight Prediction
The regression error is measured using the Mean Absolute Error (MAE), which is commonly used in regression models to reflect the actual error in the predicted values, as shown in Equation (13).
where is true weight value for the i-th sample and is the predicted value, and M is the total number of samples.
In addition to MAE, the Root Mean Square Error (RMSE) and the Coefficient of Determination () are also calculated as evaluation indices. The RMSE indicates the sample standard deviation of the prediction errors, reflecting the fluctuation in error magnitude. Its formula is shown in Equation (14).
The metric is used to determine the goodness of fit of the regression model. A value closer to 1 indicates that the model better explains the variance in the observed data. It is calculated using Equation (15):
where is mean of the true weight values across all test samples.
4. Results
4.1. Experimental Parameters
In this study, all models were implemented using the PyTorch 2.0.1 deep learning framework and Python 3.8. The experiments were conducted on a workstation equipped with an Intel i7-14700 CPU and NVIDIA RTX 3090 and RTX 4090 GPUs. For model training, the AdamW optimizer was adopted with an initial learning rate of 0.005, a weight decay coefficient of 0.05, and a batch size of 8. The models were trained for 100 epochs. The backbone network utilized a SwinV2 small configuration, with the number of Swin Transformer blocks in the four stages set to [2, 2, 6, 2] and the corresponding numbers of output channels set to [96, 192, 384, 768]. The window size for the multi-head self-attention computation in SwinV2 was set to 7 × 7. The input image size was standardized to 768 × 768 pixels for all experiments.
4.2. Algorithm Comparison Experiment
To comprehensively evaluate the performance of H2RBox-v2-SF in recognizing zucchini fruits within complex greenhouse environments, we conducted a comparative study against several state-of-the-art oriented object detection methods. The selected baselines include both fully supervised models (RoI Transformer [31], R3Det [32], Rotation RetinaNet [33]) and the original weakly supervised model (H2RBox-v2), ensuring a thorough benchmarking across different learning paradigms.
The quantitative results on the validation set are summarized in Table 2. Our H2RBox-v2-SF achieves the highest AP@0.75 of 87.8% and recall of 91.5%, surpassing RoI Transformer, R3Det, Rotation RetinaNet, and H2RBox-v2 by 7.2%, 19.9%, 18.4%, and 9.6% in AP@0.75, and by 3.8%, 13.7%, 14.6%, and 4.7% in recall, respectively. These results demonstrate the superior detection capability of H2RBox-v2-SF, particularly in minimizing missed detections. In terms of precision, H2RBox-v2-SF also outperforms R3Det, Rotation RetinaNet, and H2RBox-v2 by a significant margin (30.5%, 24.7%, and 5.0%, respectively). It is noteworthy that while the precision of our weakly supervised H2RBox-v2-SF (69.8%) is slightly lower than that of the fully supervised RoI Transformer (70.2%), this performance is achieved with only horizontal bounding box annotations during training, significantly reducing the data annotation cost compared to the precise rotated box annotations required by RoI Transformer. This represents an excellent trade-off between annotation efficiency and detection performance.
Table 2.
Performance comparison of different models.
Figure 14 presents a visual comparison of detection results, with red ellipses marking missed detection areas and blue ellipses indicating instances where bounding boxes did not tightly enclose objects. The RoI Transformer method missed fruits in all three sub-images. R3Det produced misaligned rotation boxes for fruits in all three sub-images, with blue ellipses highlighting fruit segments outside the bounding boxes. Rotation RetinaNet missed fruits and generated poorly aligned rotation boxes. The original H2RBox-v2 model similarly omitted fruits in the top-left corners of the first and third images, while its rotation boxes in the second image failed to adequately enclose the fruits. In contrast, our proposed H2RBox-v2-SF model correctly identifies all fruits, including those severely occluded in the top-left corners of the first and third rows, while generating tightly aligned rotation boxes for every fruit. This superior geometric alignment capability is crucial for the accuracy of subsequent steps like weight estimation.
Figure 14.
Results of different models of zucchini fruit detection. The black boxes are confidence, where orange frames are predicted boxes, red ellipses marking missed detection areas and blue ellipses indicating instances where bounding boxes did not tightly enclose objects.
4.3. Ablation Experiments
To validate the contribution of each proposed component, we conducted comprehensive ablation studies, with the results summarized in Table 3. Using H2RBox-v2 as our baseline, we incrementally integrated the FPDIoU loss (F), Swin Transformer V2 backbone (S), and BiFPN neck (B). The introduction of the FPDIoU loss alone yielded a moderate AP@0.75 improvement of 2.3%, with negligible impact on model complexity. Replacing the backbone with SwinV2 resulted in the most substantial performance gain, boosting AP@0.75 by 8.2% to 86.4%, albeit at the cost of increased computational load. Conversely, employing BiFPN alone not only improved AP@0.75 by 4.5% but also simultaneously reduced both parameters and GFlops, underscoring its efficiency. The combination of SwinV2 and BiFPN achieved a high AP@0.75 of 87.2%, demonstrating their complementary nature. The computational cost of this combination was significantly lower than using SwinV2 with the original FPN, highlighting the effectiveness of BiFPN in mitigating the computational burden of the powerful transformer backbone. Finally, our complete model (H2RBox-v2-SF), integrating all three components, attained the best performance across all metrics—87.8% AP@0.75, 69.8% precision, and 91.5% recall—confirming the cumulative and synergistic effect of our proposed improvements.
Table 3.
Comparison results of different models for ablation experiments. F stands for FPDIoU loss, S stands for Swin Transformer V2 backbone, and B stands for BiFPN neck.
The Figure 15 illustrates the AP curves resulting from an ablation study conducted on the validation set for various models. The five distinct curves in the graph correspond to five different configurations: H2RBox-v2 (blue), H2RBox-v2 + F (light blue), H2RBox-v2 + S (red), H2RBox-v2 + B (orange), H2RBox-v2 + S + B (green), and H2RBox-v2 + S + B + F (dark green). The performance of all models improves with the increase in epochs, although the rate of improvement and the final stability levels vary among them. The data indicate that all the modules introduced in this study have enhanced the accuracy of the models beyond that of the original baseline network. The models achieve stability after approximately 80 epochs, and the training process demonstrates better model stability without excessive fluctuations, overfitting, or underfitting. This suggests that the incorporation of different modules has significantly boosted the performance of the models, and they maintain stability in the later stages of training, which is a desirable trait for deep learning models.
Figure 15.
AP curves in ablation experiments.
4.4. Comparison of Keypoint Localization Accuracy
To systematically evaluate the impact of different detection models on the subsequent keypoint extraction task, we first quantitatively analyzed the accuracy of the extracted keypoints, followed by qualitative comparisons of visual results.
The accuracy of keypoints ultimately determines the measurement of the fruit’s physical dimensions. Therefore, the quality of keypoint extraction is indirectly but powerfully reflected by comparing the errors between the fruit length and transverse diameter calculated from the keypoints and the manually measured ground truth values. We calculated the mean absolute error (MAE) of the size calculations for all test samples under different detection models, as shown in Table 4.
Table 4.
Fruit size calculation error.
Our proposed H2RBox-v2-SF model achieves the smallest error in size calculation, with the MAE for length and diameter as low as 6.34 mm and 2.87 mm, respectively. This confirms that the keypoints extracted by this model are the most accurate, most faithfully reconstructing the physical dimensions of the fruit. The size error of the original H2RBox-v2 model is significantly larger than that of our improved model H2RBox-v2-SF, indicating that slight geometric inaccuracies in its detection boxes (e.g., in angle or coverage) are transmitted and amplified into keypoint localization errors. The size errors of the R3Det and Rotation RetinaNet models are substantially higher than others, demonstrating that due to their poor detection box quality (as seen in Figure 14), the keypoints extracted based on them cannot be reliably used for size measurement.
The qualitative results in Figure 16 provide intuitive explanations for the quantitative differences, illustrating the keypoint extraction process and results from different models in the same scene. In Figure 16e, the oriented detection box of H2RBox-v2-SF fits the fruit contour tightly. The resulting binarized mask completely preserves the morphological characteristics of the fruit. Consequently, the four keypoints extracted via the axial scanning algorithm are precisely located at the fruit’s left, right, top, and bottom boundaries. In Figure 16a–d, the detection box for the right fruit exhibits exhibits insufficient coverage, causing the binarized mask to incompletely represent the fruit end. This directly leads to an inward offset of the extracted top keypoint, which fails to land on the true physical endpoint, explaining its larger length error in Table 4. In Figure 16c, the detection box for the left fruit suffers from range error, resulting in a completely distorted binarized mask that only captures a portion of the fruit. The keypoint extraction based on this mask fails entirely, and the obtained points cannot represent the actual size of the fruit.
Figure 16.
Comparison of the keypoint extraction process and results from different models. For each row, from top to bottom: Original RGB image with detection box and keypoints, binarized mask, and ROI with keypoints. The red dots are keypoints.
The quantitative and qualitative analyses collectively demonstrate that the precision of the detection module is the prerequisite for successful keypoint extraction. Only high-quality, well-aligned oriented detection boxes can ensure that subsequent image processing pipelines generate accurate binarized masks and ultimately locate precise keypoints. The H2RBox-v2-SF model, through its series of enhancements, provides the highest quality detection results in complex environments, thereby establishing a solid foundation for the reliability of the entire fruit analysis pipeline—from detection and size measurement to weight prediction.
4.5. Comparison of Different Weight Prediction Models
To select the most suitable model for predicting zucchini fruit weight from its physical dimensions—namely, transverse diameter w and length h—we evaluated several regression model on the dataset described in Section 2.3. This dataset consists of 310 zucchini fruits with manually measured dimensions and weights, which were randomly split into training and validation sets in a 7:3 ratio. We fitted and compared four candidate models: a linear model, a quadratic polynomial model, a log-linear model, and a power-law model, all aimed at capturing the relationship between fruit morphology and weight. Each model was trained using the ordinary least squares method to minimize the sum of squared errors between predicted and actual fruit weights. These weight prediction model are given by Equations (16)–(19):
where w is the transverse diameter (mm), h is the length (mm), and is the predicted fruit weight (g).
The results are summarized in Table 5. The power-law model demonstrated the best overall performance, achieving the highest and the lowest RMSE and MAE. This indicates its superior ability to capture the non-linear, multiplicative relationship between the fruit’s dimensions and its weight, which aligns with the geometric principle that weight scales with the product of powers of its linear dimensions. Therefore, we adopted the power-law model for the final weight prediction model.
Table 5.
Weight rediction model error calculation analysis.
To further assess the adequacy of the selected power-law regression model, we conducted a residual analysis on the validation set. The left subfigure of Figure 17 shows the residual plot (predicted weight vs. residuals). The residuals are randomly scattered around the zero line with no discernible pattern, indicating that the model captures the underlying relationship well and there is no significant nonlinearity or heteroscedasticity. The right subfigure of Figure 17 presents the Q–Q plot of the residuals, which approximately follows a straight line, suggesting that the residuals are reasonably normally distributed. Additionally, the Durbin–Watson statistic for the residuals is 1.92, confirming the absence of autocorrelation. These diagnostic results collectively support the validity and adequacy of our regression model for zucchini weight prediction.
Figure 17.
Model residual analysis.
4.6. Weight Prediction Results Analysis
The core objective of this study is to achieve accurate, non-contact weight estimation of zucchini fruits, which is directly built upon the precise detection and size measurement capabilities of the proposed framework. This section evaluates the performance of the final weight prediction module, which utilizes the MFWE algorithm described in Section 3.2.
The performance of this power-law regression model, when applied to the dimensions extracted by different detection algorithms, is quantitatively compared in Table 6. Our proposed H2RBox-v2-SF model achieves the most accurate weight predictions, with an RMSE of 63.59 g, an MAE of 55.05 g, and an of 0.899. The original H2RBox-v2 model also demonstrates strong performance, which validates the foundation of the weakly supervised approach. In contrast, models with inferior detection accuracy, such as Rotation RetinaNet, consequently yield the highest prediction errors (RMSE: 91.62 g, : 0.797), as the inaccuracies in their oriented bounding boxes propagate into erroneous size measurements and, ultimately, less reliable weight estimates.
Table 6.
Weight error calculation analysis.
Figure 18 presents a scatter plot of predicted versus true fruit weights for the proposed method on the validation set, showing a strong linear correlation clustered around the ideal red fit line. Figure 19 illustrates the relationship between the RMSE and the fruit weight range. The observed increase in RMSE for heavier fruits suggests a potential positive correlation between prediction error and fruit size, which may be due to the greater morphological variability among larger fruits.
Figure 18.
Real weight of fruits and predicted weight of fruits.
Figure 19.
RMSE in different ranges.
To investigate the robustness of our weight prediction method under varying illumination conditions—a common challenge in greenhouse environments—we retrospectively categorized the 93 test samples into three representative lighting scenarios based on the RGB images: strong light conditions, normal light conditions, and low light conditions. We then evaluated the weight prediction accuracy of H2RBox-v2-SF in each group. The weight prediction performance under each condition is summarized in Table 7. Our method achieves the best accuracy under normal lighting, while performance slightly degrades under adverse lighting—particularly in shadowed cases. This degradation is primarily attributed to minor inaccuracies in HSV-based segmentation, where extreme contrast can cause incomplete fruit masks and slight keypoint offsets. Nevertheless, the model maintains reasonable robustness across all conditions (overall MAE < 65 g), demonstrating its practical applicability in real-world greenhouse settings with uncontrolled lighting.
Table 7.
Weight prediction error under different light conditions.
In summary, the weight prediction results conclusively demonstrate that the enhancements in the H2RBox-v2-SF detection model directly contribute to more reliable non-contact weight estimation. By providing higher-quality oriented bounding boxes, the improved model ensures more accurate fruit size measurements, which, in turn, lead to lower errors in the final weight prediction. This integrated pipeline for detection, sizing, and weight estimation provides a robust technical solution for automated harvesting robots to identify and prioritize marketable zucchini fruits in complex greenhouse environments.
Error Quantification Analysis
The observed prediction errors can be attributed to three factors. First, as established in Section 4.4, the quality of the initial oriented detection box is paramount. Slight geometric inaccuracies in the box are directly transmitted to the keypoint extraction step, leading to biases in the calculated length and diameter. The superior detection performance of H2RBox-v2-SF, as evidenced by its higher AP and more precise bounding boxes, forms the primary basis for its leading performance in weight prediction. In addition, the Intel RealSense D455 camera has inherent depth measurement errors, which introduce uncertainty when projecting 2D keypoints into 3D coordinates. This sensor noise directly impacts the accuracy of the calculated physical dimensions. Finally, The MFWE algorithm approximates the complex, irregular shape of a zucchini fruit using a simple length and diameter model. This simplification inevitably introduces some error, as it does not account for variations in fruit curvature or tapering.
To further validate the robustness and generalizability of our error attribution, we conducted an additional field experiment in January 2026, collecting a new set of 30 zucchini fruits from the same ‘Jinghu No. 43’ cultivar in a previously unseen greenhouse. For each sample, we recorded RGB-D images using the Intel RealSense D455 and manually harvested the fruit for ground truth weight measurement. Using this independent dataset, we performed a component-wise error analysis by replacing individual modules with their GT (ground truth) counterparts. (1) GT boxes: manually annotated oriented bounding boxes. (2) GT keyPoints: hand-labeled keypoints used to calculate the diameter (w) and length of zucchini fruit (h). (3) GT depth: We used a handheld laser rangefinder (accuracy: ±1 mm) to measure the distance from the Intel RealSense D455 camera to the fruit’s central surface as the GT depth.
As shown in Table 8, replacing the detector with GT boxes reduces the MAE by 9.79 g (16.94%), indicating that detection accuracy significantly influences downstream keypoint extraction. Replacing keypoints with GT annotations further reduces the MAE to 42.32 g, contributing an additional 15.49 g (26.79%) of error reduction. Finally, substituting measured depth with laser-derived true depth yields the lowest MAE (39.56 g), accounting for 18.25 g (31.57%) of total error—making it the dominant source of uncertainty in our pipeline.
Table 8.
Sources of Weight Prediction Error.
This analysis not only enhances the interpretability of our method but also provides a framework for adapting the pipeline to other depth cameras or environmental conditionsy.
5. Conclusions
5.1. Main Findings and Conclusions
This study presented a comprehensive vision-based framework for automated zucchini harvesting in complex greenhouse environments, addressing two critical tasks: high-precision fruit detection and non-contact weight estimation.
To achieve robust fruit detection, we proposed an improved weakly supervised oriented object detection model, H2RBox-v2-SF. The model incorporates three key enhancements over the original H2RBox-v2: SwinV2 as the backbone network to strengthen feature extraction capabilities, a BiFPN for more efficient multi-scale feature fusion, and the FPDIoU loss function to enhance the accuracy and efficiency of bounding box regression. Ablation studies confirmed the individual and synergistic contributions of these components. The final model achieved the best performance on the validation set, with an AP@0.75 of 87.8%, a precision of 69.8%, and a recall of 91.5%, demonstrating a superior balance between annotation cost and detection accuracy.
Subsequently, based on the high-quality oriented detection results, a MFWE algorithm was developed. This algorithm leverages depth information to convert 2D image keypoints into 3D coordinates, from which the fruit’s physical dimensions are accurately calculated. A multivariate power-law regression model was then established to predict fruit weight from these dimensions. The proposed H2RBox-v2-SF model, by providing the most precise detection boxes, enabled the most accurate weight estimation in our pipeline, achieving a MAE of 55.05 g, an RMSE of 63.59 g and an of 0.899 on ‘Jinghu No. 43’ zucchini fruits in complex greenhouse environments. This performance is competitive with or superior to existing vision-based fruit weight estimation studies: For example, Basak et al. [17] achieved an of 0.896 for strawberry weight prediction using machine learning on morphological features; Zhou et al. [16] obtained an of 0.8947 for banana bunch weight estimation using RGB-D data; and Fu et al. [34] developed a method for non-destructive, precise, and rapid quality estimation of whole bunches of bananas and individual banana fingers using RGBD data, achieving an value of 0.905. Notably, our method achieves high accuracy without requiring fully supervised rotated annotations, leveraging instead a weakly supervised detection framework combined with 3D depth information. This represents a significant improvement over other baseline models tested in this study, further underscoring the critical importance of precise oriented detection for downstream agricultural tasks such as non-contact weight estimation.
In summary, this work realizes an accurate, non-destructive, and efficient integrated solution for zucchini fruit detection, size measurement, and weight prediction. The proposed method effectively reduces data annotation costs while maintaining high performance in complex environments, providing a valuable technical reference and a reliable perceptual foundation for the control systems of automated harvesting robots.
5.2. Limitations and Future Work
While the proposed H2RBox-v2-SF framework demonstrates strong performance in zucchini fruit detection and weight estimation under complex greenhouse conditions, several limitations should be acknowledged.
First, the current dataset is restricted to a single cultivar—‘Jinghu No. 43’—which is widely grown in northern China but may not represent the morphological diversity of other zucchini varieties which differ in color, surface texture. Although our data were collected across multiple greenhouses and over an extended period (December 2023 to April 2024) to capture variations in lighting, plant density, and fruit development stages, the model’s generalization to other cultivars or geographic regions remains unverified.
Second, the MFWE algorithm relies on a fixed HSV color threshold (H: 11–47, S: 100–250, V: 50–250) to segment zucchini fruits from the background. While this range was determined based on ‘Jinghu No. 43’ under diverse greenhouse lighting conditions (December 2023–April 2024), it may not generalize well to other cultivars with different skin hues (e.g., lighter green or yellowish varieties) or to extreme illumination scenarios. This fixed-threshold approach, though computationally efficient, is inherently sensitive to color variability.
To address these limitations, future work will focus on (1) expanding the dataset to include multiple zucchini cultivars and diverse growing environments, and (2) exploring adaptive segmentation strategies, such as learning-based foreground extraction or illumination-invariant color features, to enhance robustness across cultivars and environments.
Author Contributions
Conceptualization, H.S. and J.L.; methodology, H.S. and S.W.; validation, H.S., S.W. and Y.L.; formal analysis, H.S. and F.M.; resources, F.M. and S.W.; writing—original draft preparation, H.S. and S.W.; writing—review and editing, S.W., F.M., J.L. and Y.L.; funding acquisition, J.L. All authors have read and agreed to the published version of the manuscript.
Funding
This research was supported by Postgraduate Education Innovation Program of Shanxi Province (Grant No. 2025AL05).
Data Availability Statement
The data presented in this study are available on request from the corresponding author.
Acknowledgments
We appreciate and thank the anonymous reviewers for their helpful comments that led to the overall improvement of the manuscript. We also thank the Journal Editor Board for their help and patience throughout the review process.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Koirala, A.; Walsh, K.B.; Wang, Z.; McCarthy, C. Deep learning for real-time fruit detection and orchard fruit load estimation: Benchmarking of ‘MangoYOLO’. Precis. Agric. 2019, 20, 1107–1135. [Google Scholar] [CrossRef] [Scilit]
- Gao, F.; Fu, L.; Zhang, X.; Majeed, Y.; Li, R.; Karkee, M.; Zhang, Q. Multi-class fruit-on-plant detection for apple in SNAP system using Faster R-CNN. Comput. Electron. Agric. 2020, 176, 105634. [Google Scholar] [CrossRef] [Scilit]
- Suo, R.; Gao, F.; Zhou, Z.; Fu, L.; Song, Z.; Dhupia, J.; Li, R.; Cui, Y. Improved multi-classes kiwifruit detection in orchard to avoid collisions during robotic picking. Comput. Electron. Agric. 2021, 182, 106052. [Google Scholar] [CrossRef] [Scilit]
- Zeng, T.; Li, S.; Song, Q.; Zhong, F.; Wei, X. Lightweight tomato real-time detection method based on improved YOLO and mobile deployment. Comput. Electron. Agric. 2023, 205, 107625. [Google Scholar] [CrossRef] [Scilit]
- Papandreou, G.; Chen, L.C.; Murphy, K.P.; Yuille, A.L. Weakly-and Semi-Supervised Learning of a Deep Convolutional Network for Semantic Image Segmentation. In Proceedings of the 2015 IEEE International Conference on Computer Vision (ICCV), Santiago, Chile, 7–13 December 2015; pp. 1742–1750. [Google Scholar] [CrossRef] [Scilit]
- Pinheiro, P.O.; Collobert, R. From image-level to pixel-level labeling with Convolutional Networks. In Proceedings of the 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Boston, MA, USA, 7–12 June 2015; pp. 1713–1721. [Google Scholar] [CrossRef] [Scilit]
- Wu, Y.; Xu, L. Crop Organ Segmentation and Disease Identification Based on Weakly Supervised Deep Neural Network. Agronomy 2019, 9, 737. [Google Scholar] [CrossRef] [Scilit]
- Kim, W.S.; Lee, D.H.; Kim, Y.J. Machine vision-based automatic disease symptom detection of onion downy mildew. Comput. Electron. Agric. 2020, 168, 105099. [Google Scholar] [CrossRef] [Scilit]
- Bellocchio, E.; Ciarfuglia, T.A.; Costante, G.; Valigi, P. Weakly Supervised Fruit Counting for Yield Estimation Using Spatial Consistency. IEEE Robot. Autom. Lett. 2019, 4, 2348–2355. [Google Scholar] [CrossRef] [Scilit]
- Calixto, R.R.; Pinheiro Neto, L.G.; da Silveira Cavalcante, T.; Aragão, M.F.; de Oliveira Silva, E. A computer vision model development for size and weight estimation of yellow melon in the Brazilian northeast. Sci. Hortic. 2019, 256, 108521. [Google Scholar] [CrossRef] [Scilit]
- Wang, D.; Li, C.; Song, H.; Xiong, H.; Liu, C.; He, D. Deep Learning Approach for Apple Edge Detection to Remotely Monitor Apple Growth in Orchards. IEEE Access 2020, 8, 26911–26925. [Google Scholar] [CrossRef] [Scilit]
- Ferrer-Ferrer, M.; Ruiz-Hidalgo, J.; Gregorio, E.; Vilaplana, V.; Morros, J.R.; Gené-Mola, J. Simultaneous fruit detection and size estimation using multitask deep neural networks. Biosyst. Eng. 2023, 233, 63–75. [Google Scholar] [CrossRef] [Scilit]
- Gongal, A.; Karkee, M.; Amatya, S. Apple fruit size estimation using a 3D machine vision system. Inf. Process. Agric. 2018, 5, 498–503. [Google Scholar] [CrossRef] [Scilit]
- Gené-Mola, J.; Sanz-Cortiella, R.; Rosell-Polo, J.R.; Escolà, A.; Gregorio, E. In-field apple size estimation using photogrammetry-derived 3D point clouds: Comparison of 4 different methods considering fruit occlusions. Comput. Electron. Agric. 2021, 188, 106343. [Google Scholar] [CrossRef] [Scilit]
- Tsoulias, N.; Paraforos, D.S.; Xanthopoulos, G.; Zude-Sasse, M. Apple Shape Detection Based on Geometric and Radiometric Features Using a LiDAR Laser Scanner. Remote Sens. 2020, 12, 2481. [Google Scholar] [CrossRef] [Scilit]
- Zhou, L.; Yang, Z.; Deng, F.; Zhang, J.; Xiao, Q.; Fu, L.; Duan, J. Banana Bunch Weight Estimation and Stalk Central Point Localization in Banana Orchards Based on RGB-D Images. Agronomy 2024, 14, 1123. [Google Scholar] [CrossRef] [Scilit]
- Basak, J.K.; Paudel, B.; Kim, N.E.; Deb, N.C.; Kaushalya Madhavi, B.G.; Kim, H.T. Non-Destructive Estimation of Fruit Weight of Strawberry Using Machine Learning Models. Agronomy 2022, 12, 2487. [Google Scholar] [CrossRef] [Scilit]
- Omid, M.; Khojastehnazhand, M.; Tabatabaeefar, A. Estimating volume and mass of citrus fruits by image processing technique. J. Food Eng. 2010, 100, 315–321. [Google Scholar] [CrossRef] [Scilit]
- Lee, J.W.; Son, J.E. Nondestructive and Continuous Fresh Weight Measurements of Bell Peppers Grown in Soilless Culture Systems. Agronomy 2019, 9, 652. [Google Scholar] [CrossRef] [Scilit]
- You, H. roLabelImg: A Rotated Bounding Box Annotation Tool for Object Detection. GitHub Repository. 2020. Available online: https://github.com/cgvict/roLabelImg (accessed on 1 May 2024).
- Gao, G.H.; Fang, L.F.; Zhang, Z.H.; Li, J.H. YOLOR-Stem: Gaussian rotating bounding boxes and probability similarity measure for enhanced tomato main stem detection. Comput. Electron. Agric. 2025, 233, 110192. [Google Scholar] [CrossRef] [Scilit]
- Yu, Y.; Yang, X.; Li, Q.; Zhou, Y.; Da, F.; Yan, J. H2RBox-v2: Incorporating Symmetry for Boosting Horizontal Box Supervised Oriented Object Detection. In Advances in Neural Information Processing Systems; Oh, A., Naumann, T., Globerson, A., Saenko, K., Hardt, M., Levine, S., Eds.; Curran Associates, Inc.: Red Hook, NY, USA, 2023; Volume 36, pp. 59137–59150. [Google Scholar]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar] [CrossRef] [Scilit]
- Lin, T.Y.; Dollár, P.; Girshick, R.; He, K.; Hariharan, B.; Belongie, S. Feature Pyramid Networks for Object Detection. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 936–944. [Google Scholar] [CrossRef] [Scilit]
- Liu, Z.; Hu, H.; Lin, Y.; Yao, Z.; Xie, Z.; Wei, Y.; Ning, J.; Cao, Y.; Zhang, Z.; Dong, L.; et al. Swin Transformer V2: Scaling Up Capacity and Resolution. In Proceedings of the 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 18–24 June 2022; pp. 11999–12009. [Google Scholar] [CrossRef] [Scilit]
- Tan, M.; Pang, R.; Le, Q.V. EfficientDet: Scalable and Efficient Object Detection. In Proceedings of the 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 13–19 June 2020; pp. 10778–10787. [Google Scholar] [CrossRef] [Scilit]
- Ma, S.; Xu, Y. FPDIoU Loss: A loss function for efficient bounding box regression of rotated object detection. Image Vis. Comput. 2025, 154, 105381. [Google Scholar] [CrossRef] [Scilit]
- Miranda, J.C.; Arnó, J.; Gené-Mola, J.; Lordan, J.; Asín, L.; Gregorio, E. Assessing automatic data processing algorithms for RGB-D cameras to predict fruit size and weight in apples. Comput. Electron. Agric. 2023, 214, 108302. [Google Scholar] [CrossRef] [Scilit]
- Mokria, M.; Gebrekirstos, A.; Said, H.; Hadgu, K.; Hagazi, N.; Dubale, W.; Bräuning, A. Fruit weight and yield estimation models for five avocado cultivars in Ethiopia. Environ. Res. Commun. 2022, 4, 075013. [Google Scholar] [CrossRef] [Scilit]
- Spreer, W.; Müller, J. Estimating the mass of mango fruit (Mangifera indica, cv. Chok Anan) from its geometric dimensions by optical measurement. Comput. Electron. Agric. 2011, 75, 125–131. [Google Scholar] [CrossRef] [Scilit]
- Ding, J.; Xue, N.; Long, Y.; Xia, G.S.; Lu, Q. Learning RoI Transformer for Oriented Object Detection in Aerial Images. In Proceedings of the 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 15–20 June 2019; pp. 2844–2853. [Google Scholar] [CrossRef] [Scilit]
- Yang, X.; Yan, J.; Feng, Z.; He, T. R3Det: Refined Single-Stage Detector with Feature Refinement for Rotating Object. Proc. AAAI Conf. Artif. Intell. 2021, 35, 3163–3171. [Google Scholar] [CrossRef] [Scilit]
- Lin, T.Y.; Goyal, P.; Girshick, R.; He, K.; Dollár, P. Focal Loss for Dense Object Detection. In Proceedings of the 2017 IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017; pp. 2999–3007. [Google Scholar] [CrossRef] [Scilit]
- Fu, Y.S.Z.; Liu, F.; Chu, X.; She, N.; Mo, D.Y.; Xu, X.; Jin, M.H.; Duan, J.L. Estimating the weight of banana hands and fingers using RGB-D. Trans. Chin. Soc. Agric. Eng. 2025, 41, 333–343. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.


















