Publications
Sort:
Issue
Wheat canopy segmentation and height estimation in UAV remote sensing images using improved SegFormer
Transactions of the Chinese Society of Agricultural Engineering 2026, 42(7): 151-161
Published: 15 April 2026
Abstract PDF (2.3 MB) Collect
Downloads:0

Plant height is one of the key phenotypic traits to reflect the crop growth for the yield prediction in precision agriculture. It is often required to monitor the wheat plant height in the field during crop breeding and cultivation. However, the conventional measurements of plant height in the field cannot fully meet the high scalability and consistency in large-scale agricultural production, due to the labor-intensive, time-consuming, and subjective errors. In this study, an estimation framework of wheat height was proposed to integrate the semantic segmentation over the entire growth stages. UAV RGB images were acquired from multiple perspectives. Spatiotemporal patterns were combined with structure from motion (SfM) 3D reconstruction to generate digital surface models (DSM) and digital terrain models (DTM). Then the crop height model (CHM) was derived to subtract the DSM from the DTM. Meanwhile, an improved SegFormer model was employed for semantic segmentation to accurately extract wheat canopy regions from field images. Background noise was effectively eliminated, such as the soil and non-vegetation elements. According to the segmentation masks and CHM, a height inversion was established to realize the accurate and efficient estimation of wheat canopy height. Specifically, the masks were used to isolate canopy regions in the CHM. Its canopy height was represented by the 95th percentile of height values within each connected vegetation cluster. The average wheat height was derived at the plot level over each growth stage, enabling reliable phenotypic and temporal monitoring. A parallel structure was combined with a CNN and a Transformer semantic branch in the encoder of the segmentation model. The synergistic representation was then enhanced by the local texture features and global contextual information. The CNN branch was employed to capture subtle edge structures and local texture variations, particularly when the canopies were sparse and fragmented during early growth stages. In contrast, the Transformer branch was used to encode the long-range dependencies and semantic context, leading to the robust representation of large-scale canopy structures. In the decoder, progressive upsampling with skip connection was combined with a feature fusion module to effectively integrate multi-scale features. Thereby, the spatial information was preserved to refine the boundary features. An Aggregation Layer was introduced as a feature fusion module to effectively combine heterogeneous features from the dual-branch encoder and multi-scale decoder. Point-wise multiplication and addition were used to enhance feature correlations between local and global representations. Additionally, the convolutional refinement, normalization, and channel recalibration were incorporated to improve the stability and semantic consistency of the fused output. Experimental results demonstrate that the better performance was achieved in the mean intersection over union (mIoU), mean pixel accuracy (mPA), and pixel accuracy (PA) values of 80.92%, 89.42%, and 90.07%, respectively, outperforming the original SegFormer model. The canopy heights were estimated with a strong correlation after field measurements, with a coefficient of determination (R2) of 0.985, a root mean square error (RMSE) of 0.73cm, and a relative RMSE (rRMSE) of 2.41%. In addition, the temporal dynamics of wheat growth shared consistent height accumulation over the different stages. The improved model efficiently and accurately retrieved the spatial distribution and plant height information of wheat canopies. The finding can provide reliable technical support to dynamically monitor the winter wheat growth and field phenotyping in precision agriculture.

Issue
Lightweight YOLOv8s-Based Strawberry Plug Seedling Grading Detection and Localization via Channel Pruning
Smart Agriculture 2024, 6(6): 132-143
Published: 01 November 2024
Abstract PDF (76.6 MB) Collect
Downloads:65
Objective

Plug tray seedling cultivation is a contemporary method known for its high germination rates, uniform seedling growth, shortened transplant recovery period, diminished pest and disease incidence, and enhanced labor efficiency. Despite these advantages, challenges such as missing or underdeveloped seedlings can arise due to seedling quality and environmental factors. To ensure uniformity and consistency of the seedlings, sorting is frequently necessary, and the adoption of automated seedling sorting technology can significantly reduce labor costs. Nevertheless, the overgrowth of seedlings within the plugs can effect the accuracy of detection algorithms. A method for grading and locating strawberry seedlings based on a lightweight YOLOv8s model was presented in this research to effectively mitigate the interference caused by overgrown seedlings.

Methods

The YOLOv8s model was selected as the baseline for detecting different categories of seedlings in the strawberry plug tray cultivation process, namely weak seedlings, normal seedlings, and plug holes. To improve the detection efficiency and reduce the model's computational cost, the layer-adaptive magnitude-based pruning(LAMP) score-based channel pruning algorithm was applied to compress the base YOLOv8s model. The pruning procedure involved using the dependency graph to derive the group matrices, followed by normalizing the group importance scores using the LAMP Score, and ultimately pruning the channels according to these processed scores. This pruning strategy effectively reduced the number of model parameters and the overall size of the model, thereby significantly enhancing its inference speed while maintaining the capability to accurately detect both seedlings and plug holes. Furthermore, a two-stage seedling-hole matching algorithm was introduced based on the pruned YOLOv8s model. In the first stage, seedling and plug hole bounding boxes were matched according to their the degree of overlap (Dp), resulting in an initial set of high-quality matches. This step helped minimize the number of potential matching holes for seedlings exhibiting overgrowth. Subsequently, before the second stage of matching, the remaining unmatched seedlings were ranked according to their potential matching hole scores (S), with higher scores indicating fewer potential matching holes. The seedlings were then prioritized during the second round of matching based on these scores, thus ensuring an accurate pairing of each seedling with its corresponding plug hole, even in cases where adjacent seedling leaves encroached into neighboring plug holes.

Results and Discussions

The pruning process inevitably resulted in the loss of some parameters that were originally beneficial for feature representation and model generalization. This led to a noticeable decline in model performance. However, through meticulous fine-tuning, the model's feature expression capabilities were restored, compensating for the information loss caused by pruning. Experimental results demonstrated that the fine-tuned model not only maintained high detection accuracy but also achieved significant reductions in FLOPs (86.3%) and parameter count (95.4%). The final model size was only 1.2 MB. Compared to the original YOLOv8s model, the pruned version showed improvements in several key performance metrics: precision increased by 0.4%, recall by 1.2%, mAP by 1%, and the F1-Score by 0.1%. The impact of the pruning rate on model performance was found to be non-linear. As the pruning rate increased, model performance dropped significantly after certain crucial channels were removed. However, further pruning led to a reallocation of the remaining channels' weights, which in some cases allowed the model to recover or even exceed its previous performance levels. Consequently, it was necessary to experiment extensively to identify the optimal pruning rate that balanced model accuracy and speed. The experiments indicated that when the pruning rate reached 85.7%, the mAP peaked at 96.4%. Beyond this point, performance began to decline, suggesting that this was the optimal pruning rate for achieving a balance between model efficiency and performance, resulting in a model size of 1.2 MB. To further validate the improved model's effectiveness, comparisons were conducted with different lightweight backbone networks, including MobileNetv3, ShuffleNetv2, EfficientViT, and FasterNet, while retaining the Neck and Head modules of the original YOLOv8s model. Results indicated that the modified model outperformed these alternatives, with mAP improvements of 1.3%, 1.8%, 1.5%, and 1.1%, respectively, and F1-Score increases of 1.5%, 1.8%, 1.1%, and 1%. Moreover, the pruned model showed substantial advantages in terms of floating-point operations, model size, and parameter count compared to these other lightweight networks. To verify the effectiveness of the proposed two-stage seedling-hole matching algorithm, tests were conducted using a variety of complex images from the test set. Results indicated that the proposed method achieved precise grading and localization of strawberry seedlings even under challenging overgrowth conditions. Specifically, the correct matching rate for normal seedlings reached 96.6%, for missing seedlings 84.5%, and for weak seedlings 82.9%, with an average matching accuracy of 88%, meeting the practical requirements of the strawberry plug tray cultivation process.

Conclusions

The pruned YOLOv8s model successfully maintained high detection accuracy while reducing computational costs and improving inference speed. The proposed two-stage seedling-hole matching algorithm effectively minimized the interference caused by overgrown seedlings, accurately locating and classifying seedlings of various growth stages within the plug tray. The research provides a robust and reliable technical solution for automated strawberry seedling sorting in practical plug tray cultivation scenarios, offering valuable insights and technical support for optimizing the efficiency and precision of automated seedling grading systems.

Total 2