Accurately detecting apple fruit can crucially assist in estimating the fruit yield in apple orchards in complex scenarios. In such environments, the factors of density, leaf occlusion, and fruit overlap can affect the detection and counting accuracy. This paper proposes an improved YOLOv7-Tiny-PDE network model based on the YOLOv7-Tiny model to detect and count apples from data collected by drones, considering various occlusion and lighting conditions. First, within the backbone network, we replaced the simplified efficient layer aggregation network (ELAN) with partial convolution (PConv), reducing the network parameters and computational redundancy while maintaining the detection accuracy. Second, in the neck network, we used a dynamic detection head to replace the original detection head, effectively suppressing the background interference and capturing the background information more comprehensively, thus enhancing the detection accuracy for occluded targets and improving the fruit feature extraction. To further optimize the model, we replaced the boundary box loss function from CIOU to EIOU. For fruit counting across video frames in complex occlusion scenes, we integrated the improved model with the DeepSort tracking algorithm based on Kalman filtering and motion trajectory prediction with a cascading matching algorithm. According to experimental results, compared with the baseline YOLOv7-Tiny, the improved model reduced the total parameters by 22.2% and computation complexity by 18.3%. Additionally, in data testing, the p-value improved by 0.5%; the R-value rose by 2.7%; the mAP and F1 scores rose by 4% and 1.7%, respectively; and the MOTA value improved by 2%. The improved model is more lightweight and can preserve a high detection accuracy well, and hence, it can be applied to detection and counting tasks in complex orchards and provides a new solution for fruit yield estimation using lightweight devices.
Maize plant height and stem diameter can effectively reflect plant growth status and lodging resistance. Therefore, accurate measurement of these parameters enables precise monitoring of plant growth and provides data to support agricultural decision-making. LiDAR enables the acquisition of three-dimensional (3D) crop point clouds, providing a direct source of data for phenotypic parameter extraction. However, existing 3D point cloud acquisition systems for crop phenotyping are often costly and offer limited operational flexibility under field conditions. This study proposes a workflow for extracting key phenotypic parameters from individual field-grown maize plants by integrating 3D reconstruction with point cloud instance segmentation. First, field-grown maize plants are reconstructed in 3D using a LiDAR–SLAM system mounted on an unmanned ground vehicle (UGV). Because accurate segmentation of individual maize plants from field LiDAR point clouds is challenging, a density-adaptive strategy is incorporated into an instance segmentation network based on central-axis offset aggregation. Specifically, each point is projected toward the central axis of its corresponding plant, and local point density is used to guide individual-plant instance segmentation. Plant height and stem diameter are subsequently extracted automatically from the segmented point cloud of each plant and evaluated against manual measurements. Experimental results show that the density-adaptive instance segmentation method achieves an mAP50-95 of 77.84%, representing an improvement of 8.54%. The mean absolute errors (MAEs) are 7.52 cm for plant height and 1.02 mm for stem diameter. These results demonstrate that, under the tested grain-filling-stage field plots, the proposed method enables effective individual-plant segmentation and extraction of key phenotypic parameters. Given that validation was limited to two plots acquired on a single date, claims of broad field robustness should be interpreted within this experimental scope.