Angle measurement of stems and slender crop organs is often constrained in natural field environments. Manual measurement cannot fully meet the needs of large-scale cultivation, due to the unstable performance caused by cluttered backgrounds, irregular organ boundaries, local curvature, and multi-view projection distortion. Non-destructive measurement is often required for the field robustness of angle phenotyping for crop slender organs. In this study, a growth angle measurement was developed using a fast segment anything model with skeleton-geometric constraints (FS-SGC). A task-oriented workflow was also constructed to integrate zero-shot instance segmentation, global-topology-guided geometric feature extraction, and vector-based angle estimation. (1) Fast segment anything model (FastSAM) was adopted as the front-end segmentation model to isolate target organs from complex scenes without task-specific dense annotation training. A multi-scale region-of-interest cascade strategy was then introduced to progressively refine local target regions, suppress redundant background interference, and generate high-quality binary masks for individual target organs. (2) A topology-constrained skeleton extraction was designed to preserve continuity and endpoint integrity during thinning. The extracted skeleton was further used to construct a global geometric envelope, indicating the dominant structural extent and directional trend of the target organ. Local ridge-like geometric features were extracted in multi-scale space using a Hessian-matrix-based strategy. Subtle structural information was retained along slender organs. Local directional deviations were corrected to complement global description. (3) Key feature points were converted into vectors using least-squares edge updating. Organ growth angle was estimated from the fitted directional structure under the global geometric envelope. In field deployment, a geometric correction with a calibration board was further incorporated to reduce projection distortion caused by non-orthogonal image acquisition, particularly for the geometric fidelity under multi-view imaging. The model was finally evaluated on a self-constructed rapeseed stem dataset. Among them, 330 images were collected from growth stages and structural forms. The cross-organ generalization was further examined on a public wheat flag leaf dataset. Experiments were conducted against representative geometry-, edge-, contour-, and segmentation-assisted approaches. Results showed that the best performance was achieved with a coefficient of determination (R2) of 0.928 2 and a root mean square error (RMSE) of 2.078° on the rapeseed stem dataset. The model outperformed the reference ones in terms of mean absolute error (MAE), RMSE, R2, Pearson correlation coefficient (r), and agronomic tolerance compliance rate (ATCR), with an acceptable pipeline processing time of 0.366 0 s per sample. The workflow was more effective for organs with slender morphology, irregular boundaries, local bending, or background interference, where conventional ones were more likely to produce biased direction estimation. Ablation experiments further demonstrated that each module contributed positively to the final performance: High-quality target isolation was essential for reliable angle estimation; topology-constrained skeleton extraction improved structural continuity and directional stability; and local geometric features with Hessian matrix compensated directional deviations that coarse global envelopes failed to fully resolve alone. Furthermore, an R2 of 0.993 2 was obtained on the wheat flag leaf dataset, indicating better adaptability over crops, organs, and image characteristics. In addition, the geometric correction with a calibration board improved field measurement reliability under non-orthogonal imaging, particularly with the high average angular error (within 1.8°) caused by perspective distortion. Overall, the FS-SGC model can provide an effective solution to measure crop slender organs using zero-shot segmentation, topology-preserving skeleton analysis, local geometric enhancement, and least-squares vector fitting within a unified workflow. The high accuracy was achieved on both self-constructed and public datasets, indicating robust adaptability to slender and irregular plant structures and practical applicability under field imaging after geometric correction. The findings can provide technical support for fine-scale characterization of crop slender-organ architecture, lodging phenotyping, and non-destructive monitoring in smart agriculture. A feasible technical pathway can also be offered for high-throughput extraction of structural traits for crop phenomics in field environments.
- Article type
- Year
- Co-author
Accurate and high-throughput detection of rapeseed pods has been a key prerequisite for phenotypic analysis and genetic breeding. However, the axis-aligned object detection cannot fully meet the slender morphology, unpredictable spatial orientation, and high-density overlap of pods in natural field environments. Severe background interference and feature fragmentation have often limited to maintain bounding box integrity for the elongated structures, leading to the labor-intensive manual post-processing. In this study, a rotating object detection framework (SwinPodDet) was proposed to be designed specifically for the slender targets. A non-destructive pipeline was also provided to precisely localize and quantify the individual pods directly from high-resolution field imagery, thereby bypassing the constraints of axis-aligned detectors. Several key innovations were introduced for the complex geometry and topology. Firstly, a special backbone (R-SwinTransformer) was integrated with an Adaptive Shifting Window Multi-Head Self-Attention (ASW-MSA) mechanism. The window aspect ratio and shift offsets of the backbone were dynamically adjusted to effectively capture the long-range dependencies of elongated pods. The backbone was used to bridge the structural gap between local surface textures and global symmetry. Secondly, an Elongated Feature Enhancer (EFE) module was embedded to reinforce the directional sensitivity. The anisotropic depthwise separable convolutions were employed with the asymmetric 1×11 and 11×1 kernels to combine with a dual-attention mechanism. Features were selectively amplified along the pod's principal axis to suppress the orthogonal environmental noise and branch interference. Thirdly, a Multi-Scale Context Channel Attention (MSCAA) module was integrated into the feature-pyramid neck. Four parallel heterogeneous branches were utilized from local average pooling to dilated separable convolutions. MSCAA was adaptively fused with multi-scale contextual information using learnable weights. Missed detections were significantly mitigated in dense and overlapping clusters, where boundary definitions were often blurred. The model was trained and validated on the newly constructed Rotated Bounding Box Rapeseed Pod Dataset (RBRD), which was a benchmark with the 8 505 manually annotated rotating boxes. The crop was also captured over multiple growth stages. Experimental results demonstrate that the SwinPodDet was achieved in a precision (P) of 98.50%, a recall (R) of 80.76%, and a mean average precision (mAP50) of 81.74%. Furthermore, there were improvements of 2.62, 0.12, and 0.18 percentage points over the same metrics, respectively, compared with the rotating object detection network with a standard Swin-Transformer backbone. The high computational efficiency was also maintained with a parameter count of 53.32 M and an inference speed of 19.0 frames per second. The framework was achieved in an optimal Pareto balance between accuracy and deployment costs. Ablation studies and visualization analysis confirm that the "feature fracture" was effectively resolved in the high-overlap scenarios, with an impressive 95.51% counting accuracy at the whole-plant level. This performance at different maturation stages—from green-succulent to yellow-gray shriveled phases—demonstrated the superior adaptability to varying field conditions. The rapeseed pod detection was realized to treat the challenges, namely dense overlap, extreme elongation, and orientation variability. The reliable, scalable, and end-to-end tool was obtained for high-throughput phenotyping. This finding can also provide a solid algorithmic foundation for the yield estimation and large-scale agronomic monitoring in precision agriculture.
Oilseed rape has been one of the largest cash crops in the national security of edible oil supply. The yields of oilseed rape can be improved under large-scale production in recent years. The lodging has restricted the high yield, stability, and quality of oilseed crops. Real-time monitoring and evaluation of lodging types are of great significance to the pre-production and variety selection. Unmanned aerial vehicles (UAVs) combined with deep learning can be expected to identify the lodging with the rapid development of artificial intelligence. Among them, the image classification is superior to the oilseed rape lodging, due to the small model size and high accuracy. In this study, an oilseed rape lodging classification was proposed to incorporate multi-scale features and attention mechanisms. The lodging level of oilseed rape was determined at the green and yellow maturity stage. Firstly, an image classification network (NGnet) was designed to identify the lodging of oilseed rape during the pod period. An improved Ghost Bottle Neck structure was then used instead of the traditional convolution. The number of network parameters and computations was reduced greatly because the redundant operation was reduced to maintain the feature expressiveness; Normalization-based attention (NAM) was integrated with the weight factor to represent the important features. The new network was then focused on the interest lodging areas at different lodging levels, leading to suppression of the irrelevant information; A multi-scale fusion strategy was used to fuse attention features at different scales. Multi-scale feature representations were obtained to appropriately weight the fusion of features at different scales, according to the weights of the attention mechanism; The UAV high-altitude remote sensing orthophoto was utilized to construct the rape lodging dataset (RLD). The data was collected from the Yangluo base of the Oilseed Research Institute of the Chinese Academy of Agricultural Sciences in Wuhan City, Hubei Province, China, and the oilseed rape planting area of the Jingzhou Academy of Agricultural Sciences in Shazhou City, Jingzhou City, Hubei Province, China; The dataset consisted of 5 789 images with a resolution of 3 × 255 × 255, of which 4 648 were in the training set, and 1 141 were in the testing set; Lastly, the NGnet network model on the RLD was achieved in recognition accuracy of 85.10%, which was 15.6, 11.92, 7.01, 6.22, 6.08, and 2.37 percentage points higher than that of T2T-VIT, SwinTransformerV2, MobileNetV3, Res2Net, RepVGG, and RepLKNet, respectively. The recognition of the improved model was further evaluated in the task of oilseed rape lodging. The experimental fields of oilseed rape were selected as the validation set at Yangluo and Jingzhou base of the Oilseed Research Institute of the Chinese Academy of Agricultural Sciences in 2021. The average accuracy of the model reached 86.36% and 85.71% in the Yangluo and Jingzhou bases. The improved model was achieved in the high accuracy, small model size, and generalization performance, which fully met the classification of oilseed rape lodging degree in the oilseed rape breeding. In addition, the lodging situation of different plots was also explored in the same field. The lodging resistance of different varieties was better distinguished to visualize. The finding can also provide a strong reference for the UAV RGB images to identify the lodging disaster of rapeseed in the selective breeding of good varieties.
Wheat is one of the most widely cultivated staple food crops in the globe. Its yield prediction can share the profound implications for food security. Deep learning can be expected to detect and count wheat spikes, and then rapidly predict wheat yields. However, some challenges are still remained on in the low detection accuracy and a large number of model parameters under complex agricultural environments. This study aims to propose a lightweight wheat ear detection model, RT-WEDT (Real-Time Wheat Ear Detection Transformer), using RT-DETR. Firstly, EfficientFormerV2 was selected as the backbone network structure of RT-WEDT to fully capture both the long-range and local features of wheat ear images with the high computational efficiency. Secondly, a multiscale enhanced hybrid encoder (MSEHE) was introduced to take as the input feature maps at four scales output from the four downsampling stages of the backbone network. The MSEHE consisted of three sub-modules: the Attention-based intra-scale feature interaction (AIFI) module acted on the smallest feature maps to extract global features of the image; the Scale Sequence Feature Fusion (SSFF) module with multiscale fusion and 3D convolution was utilized to extract information about wheat ear targets at different scales. The outputs of these two modules were fed into the Enhanced Feature Fusion Module (EFFM) for feature fusion, in order to integrate the global and local information of the wheat ear image. Additionally, the localization accuracy was improved for wheat targets. WIoUv3 loss function was employed as the bounding box one to enhance the quality of the anchor frame. The detection dataset was obtained for the global wheat head. Experimental results demonstrate that the RT-WEDT model was had 12 M parameters, a floating-point operation capacity of 33.1 G, an average accuracy of 90.2%, and a detection speed of 79.7 frames/s. Compared with RT-DETR, the RT-WEDT model was had 62.5% fewer parameters, 68% fewer floating-point operations, an AP50-95 increase of 0.6 percent point, an AP50 increase of 0.5 percent point, and a detection speed increase of 22.4%. The AP50-95 values were improved by 8.2, 2.4, and 1.7 percent points, respectively, and the AP50 values were improved by 4.6, 1.1, and 0.7 percent points, respectively, compared with YOLOv5, YOLOv8, and YOLOX with a similar parameter volume. Furthermore, samples were classified from the detection dataset of global wheat heads. The performance was then evaluated on wheat ear targets in various scenarios. The experimental results indicate that the dense and overlapping wheat ears were the most significant influencing factors on the performance of the model, followed by image blurriness. The intensity of light during photography shared the a minimal effect on the detection. Drone The drone perspective wheat spike dataset (DPWSD) was constructed for two periods, in order to verify the robustness of the improved RT-WEDT. And then, the RT-WEDT was directly tested on the drone perspective wheat dataset. Specifically, 60.2% AP50-95 and 97.4% AP50 were achieved during the filling stage; 61.0% AP50-95 and 96.1% AP50 were achieved during the maturity stage. The counting experiments were conducted on the test set from the global wheat dataset and the self-built drone perspective wheat ear dataset, respectively, in order to validate the counting effectiveness of RT-WEDT. The R2 values of RT-WEDT on the DPWSD were 0.949, respectively, indicating an excellent fit between predicted and actual values. Therefore, the RT-WEDT was highly accurate for wheat ear detection and counting. The improved model was significantly reduced the complexity to maintain a high average accuracy, indicating the real-time detection of the wheat ear. This finding can provide the technical support for the efficient and rapid estimation of wheat yields in smart agriculture.
京公网安备11010802044758号