CBAM-STN-TPS-YOLO: Enhancing Agricultural Object Detection through Spatially Adaptive Attention Mechanisms
Satvik Praveen 1 , Yoonsung Jung 2 · 2025
Read CBAM-STN-TPS-YOLO: Enhancing Agricultural Object Detection through Spatially Adaptive Attention Mechanisms by Satvik Praveen 1 , Yoonsung Jung 2 (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2506-07357.txt.
Introduction
Satvik Praveen and Yoonsung Jung improved farm object detection in 2025 by making a YOLO model bend its view of plants. Detection in fields must cope with blocked views, odd shapes, and busy backgrounds. Standard spatial transformers align features with stiff maps, which fit bent leaves and overlaps poorly.
Their model adds thin-plate splines, which allow soft, non-rigid warping, plus an attention block that damps background noise and lifts useful channels and places. On a data set heavy with blocked views of growing plants, the model beat a transformer YOLO version in precision, recall, and mean average precision. It also cut a stated error measure by a clear margin. Readers get a design aimed at real crop images, where leaves rarely sit flat and alone for the camera.
Catalog record
| CREATOR | Satvik Praveen 1 , Yoonsung Jung 2 |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 42 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2506-07357
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
CBAM-STN-TPS-YOLO: Enhancing Agricultural Object Detection through Spatially Adaptive Attention Mechanisms Satvik Praveen 1 , Yoonsung Jung 2 Abstract Object detection is vital in precision agriculture for plant monitoring, disease detection, and yield estimation. However, models like YOLO struggle with occlusions, irregular structures, and background noise, reducing detection accuracy. While Spatial Transformer Networks (STNs) improve spatial invariance through learned transformations, affine mappings are insufficient for non-rigid deformations such as bent leaves and overlaps. We propose CBAM-STN-TPS-YOLO, a model integrating Thin-Plate Splines (TPS) into STNs for flexible, non-rigid spatial transformations that better align features. Performance is further enhanced by the Convolutional Block Attention Module (CBAM), which suppresses background noise and emphasizes relevant spatial and channel-wise features. On the occlusion-heavy Plant Growth and Phenotyping (PGP) dataset, our model outperforms STN-YOLO in precision, recall, and mAP. It achieves a 12% reduction in false positives, highlighting the benefits of improved spatial flexibility and attention-guided refinement. We also examine the impact of the TPS regularization parameter in balancing transformation smoothness and detection performance. This lightweight model improves spatial awareness and supports real-time edge deployment, making it ideal for smart farming applications requiring accurate and efficient monitoring. I Introduction Plant phenotyping plays a vital role in advancing modern agriculture by enabling automated monitoring of plant growth, disease detection, and yield prediction [ 1 , 2 ] . Deep learning-based object detection models, particularly You Only Look Once (YOLO) , have significantly contributed to agricultural automation by facilitating tasks such as pest detection [ 2 ] , crop disease classification [ 1 ] , and precision harvesting [ 3 ] . However, YOLO and similar object detection models struggle to maintain high accuracy in agricultural settings due to challenges like occluded plant parts, irregular and non-rigid structures, low-contrast objects, and complex backgrounds [ 1 , zambre2024spatial ] . These conditions result in reduced spatial robustness and a higher rate of false positives and missed detections. Over the past decade, the integration of Artificial Intelligence (AI) in agriculture has experienced significant growth. In 2023, the global AI in agriculture market was valued at approximately $1.91 billion and is projected to reach $7.1 billion by 2030, reflecting a compound annual growth rate (CAGR) of 25.5% [ 4 ] . This surge highlights the growing reliance on AI-powered tools to improve efficiency, productivity, and sustainability in farming. To address the limitations of traditional object detectors like YOLO in complex agricultural scenarios, we propose a hybrid architecture named CBAM-STN-TPS-YOLO . This model incorporates Spatial Transformer Networks (STNs) for spatial adaptability, Thin-Plate Splines (TPS) for non-rigid transformation modeling, and the Convolutional Block Attention Module (CBAM) for refined feature prioritization. Our design addresses three critical needs in plant-based object detection: • Spatial Adaptability: STNs enable the model to dynamically attend to relevant regions, mitigating spatial distortions [ 5 ] . • Handling Non-Rigid Deformations: TPS replaces the affine transform in STNs, allowing the model to learn complex, smooth deformations typical in bent leaves and overlapping structures. • Enhanced Feature Selection: CBAM enhances both channel and spatial feature discrimination, improving object localization in cluttered scenes. • Real-Time Edge Deployment: The modular and lightweight design supports efficient inference on edge devices. Fig. 1 : CBAM-STN-TPS-YOLO Model Pipeline Spatial Transformer Networks (STNs) [ 6 ] enhance deep learning models by introducing learnable transformations that adapt input features to improve spatial consistency. STN-YOLO [ 5 ] extends this idea by incorporating affine transformations into the YOLO pipeline. However, affine transforms are limited in capturing the non-rigid deformations inherent in plant structures—such as bent stems, leaf curling, and non-uniform occlusions —leading to suboptimal spatial alignment and reduced detection performance [ 7 ] . To overcome this, we incorporate Thin-Plate Splines (TPS) —a technique proven effective in medical imaging and shape alignment [ 8 ] —into the STN module. TPS introduces a flexible deformation field, allowing our model to learn smooth, non-linear spatial transformations suitable for highly variable plant images. This adjustment improves the alignment of features before detection, leading to a reduction in false positives. Additionally, we integrate the Convolutional Block Attention Module (CBAM) [ 9 ] , which sequentially applies channel and spatial attention to highlight important visual cues and suppress irrelevant background noise. This module enhances the detection of low-contrast and occluded targets, especially in the dense, noisy conditions found in agricultural datasets. Our model is evaluated on the Plant Growth and Phenotyping (PGP) and GlobalWheat datasets—both characterized by occlusion and visual complexity. Results demonstrate consistent improvements in precision, recall, and mean average precision (mAP) compared to the STN-YOLO baseline. We further analyze the impact of the TPS regularization parameter ( \lambda ) in balancing smoothness and deformation flexibility, establishing its critical role in detection performance. We hypothesize that replacing affine transformations with TPS in STNs will significantly improve detection performance in agricultural settings by better handling non-rigid deformations, and that CBAM will further enhance localization accuracy through attention-guided feature refinement. By introducing non-rigid spatial transformation and lightweight attention mechanisms into the YOLO pipeline, our approach advances the state of agricultural object detection while maintaining computational efficiency for real-time deployment on edge devices. This contributes to the long-term vision of smart, automated farming systems. II Related Work II-A Object Detection Models Detecting objects is an essential aspect of computer vision, significantly contributing to precision agriculture and plant phenotyping [ 10 , 11 , 12 ] . Deep learning-based object detectors are broadly categorized into two-stage and single-stage methods. Two-stage detectors, like Faster R-CNN [ 13 ] , utilize a Region Proposal Network (RPN) to create potential bounding boxes prior to classification. Although these models achieve high accuracy, they suffer from computational inefficiency. In contrast, single-stage detectors like SSD [ 14 ] and YOLO [ 15 , 16 ] identify object locations and class labels in one go, providing a balance of speed and accuracy, which makes them suitable for tasks requiring quick processing. YOLO, in particular, has gained popularity for real-time object detection in agricultural applications such as crop disease detection [ 17 ] , pest identification [ 18 ] , and automated harvesting [ 19 ] . However, YOLO-based models struggle with occlusions, background clutter, and variations in plant structures, leading to reduced performance in challenging environments [ 16 ] . Overlapping leaves, dense foliage, and non-uniform backgrounds can cause false detections, while differences in plant size, shape, and color affect generalization across crop varieties. These limitations make traditional YOLO implementations less effective in complex agricultural settings, such as fruit counting, weed detection, and plant growth analysis. To address these limitations, recent advancements have explored spatial invariance techniques such as Spatial Transformer Networks (STNs) [ 20 ] and attention mechanisms [ 21 ] to improve feature selection. II-B Spatial Transformer Networks (STNs) Spatial Transformer Networks (STNs) [ 20 ] introduce a differentiable transformation module that enhances deep learning models’ spatial adaptability. STNs are composed of three key components: 1. a localization network that predicts transformation parameters 2. a grid generator that creates a sampling grid based on transformation parameters 3. a sampler that interpolates pixel values from the input feature map to generate transformed outputs. By enabling spatial transformations such as rotation, translation, and scaling , STNs improve geometric invariance in deep learning models, making them