A wheat spike detection method based on Transformer - Zhou, Qiong; Huang, Ziliang; Zheng, Shijian; Jiao, Lin; Wang, Liusan; Wang, Rujing (Frontiers in Plant Science, 2022)
Wheat spike detection has important research significance for production estimation and crop field management. With the development of deep learning-based algorithms, researchers tend to solve the detection task by convolutional neural networks (CNNs). However, traditional CNNs equip with the inductive bias of locality and scale-invariance, which is hard to extract global and long-range dependency. In this paper, we propose a Transformer-based network named Multi-Window Swin Transformer (MW-Swin Transformer). Technically, MW-Swin Transformer introduces the ability of feature pyramid network to extract multi-scale features and inherits the characteristic of Swin Transformer that performs self-attention mechanism by window strategy. Moreover, bounding box regression is a crucial step in detection, we propose a Wheat Intersection over Union (WIoU) loss by incorporating the Euclidean distance, area overlapping, and aspect ratio, thereby leading to a better detection accuracy. We merge the proposed network and regression loss into a popular detection architecture, fully convolutional one-stage object detection (FCOS), and name the unified model WheatFormer. Finally, we construct a wheat spike detection dataset (WSD-2022) to evaluate the performance of the proposed methods. The experimental results show that the proposed network outperforms those state-of-the-art algorithms with 0.459 mAP (mean average precision) and 0.918 AP50. It is proved that our Transformer-based method is effective to handle the wheat spike detection under complex field conditions.