Wheat Head Detection using Deep, Semi-Supervised and Ensemble Learning

Fares Fourati, Wided Souidene Mseddi, Rabah AttiaCanadian 2021 · DOI · arXiv

Abstract

In this paper, we propose an object detection methodology applied to the Global Wheat Head Detection (GWHD) Dataset. We explored two major architectures, Faster R-CNN and EfficientDet, to design a robust wheat head detection model. Our approach emphasizes optimizing performance through extensive exploratory data analysis, data cleaning, and the adaptation of advanced data augmentation techniques. We utilize semi-supervised learning, specifically pseudo-labeling, to enhance supervised models. Furthermore, we implement ensemble learning strategies, including test-time augmentation (TTA), multi-scale ensembles, and bootstrap aggregating (bagging). Finally, Weighted Boxes Fusion (WBF) is employed as a post-processing technique. Our proposed method was ranked within the top 6% in the GWHD research challenge.

Introduction

Accurately counting wheat heads in the field is a critical task for yield estimation and plant breeding, but manual counting is labor-intensive and error-prone. Computer vision offers a solution, yet the "in-the-wild" reality of wheat fields presents several hurdles:

  • Visual Complexity: Wheat heads often overlap densely, and wind creates motion blur in photographs.
  • Biological Diversity: Appearance varies wildly based on maturity, color, genotype, and orientation.
  • Geographic Bias: Most existing models are trained on datasets from specific regions, causing them to fail when deployed in different climates or soil conditions.

The goal of this research is to create a generalized model that can identify wheat heads across diverse global environments, even in regions not represented in the training data.

Methodology

Our researchers built a multi-stage pipeline focused on robustness:

  1. Architectures: We compared Faster R-CNN (a two-stage detector) and EfficientDet (a modern one-stage detector using BiFPN for multi-scale feature fusion).
  2. Data Refinement: Extensive Exploratory Data Analysis (EDA) was performed to clean the dataset, removing "noisy" bounding boxes that were unrealistic in size.
  3. Advanced Augmentation: To simulate field conditions, we used standard flips and rotations alongside complex techniques like Cutmix and custom augmentations that simulate wind blur and sun shadows. We categorized these into two strategy groups, G1 and G2, with G2 focusing on more complex environmental simulations.
Probabilities of different image transformations for G1 and G2 augmentation strategies.
  1. Semi-Supervised Learning (Pseudo-Labeling): The model was first trained on labeled data, then used to predict labels for the test set. These "pseudo-labels" were added back into the training process to help the model adapt to the test data's distribution.
  2. Ensemble & Post-Processing: Instead of relying on a single prediction, we used Test Time Augmentation (TTA) and Bagging. Crucially, we replaced standard Non-Maximum Suppression (NMS) with Weighted Boxes Fusion (WBF), which averages overlapping predictions—a vital change for dense object detection.

Experimental Setup

The study utilizes the Global Wheat Head Detection (GWHD) Dataset:

  • Training/Validation: ~3,400 images from Europe (France, UK, Switzerland) and North America (Canada).
  • Testing: Images from Australia, Japan, and China. This split forces the model to generalize across different continents and wheat varieties. The dataset contains approximately 147,793 labeled bounding boxes.

Discussion and Key Insights

  • The Power of WBF: In dense scenarios like wheat fields, standard NMS often discards valid detections because they overlap. WBF treats overlapping boxes as "votes" for a final averaged box, significantly boosting precision.
  • Generalization via Diversity: By training on one set of countries and testing on another, we proved that heavy data augmentation and regularization are essential to prevent a model from "memorizing" specific regional appearances.
  • Pseudo-Labeling as a Bridge: Pseudo-labeling acted as a form of domain adaptation, allowing the model to learn characteristics of unseen test regions without requiring manual human labeling.

Results

Clear incremental improvements were observed as components were added to the framework. Faster R-CNN improved from a baseline of 63.09% mAP to 68.46% mAP after adding cleaning, augmentation, and pseudo-labeling. EfficientDet provided a higher baseline and reached the highest overall performance through ensemble techniques.

Ablation study of EfficientDet performance with various optimization techniques.

By combining EfficientDet with TTA, Bagging, and Multi-scale ensembles (512x512 and 1024x1024 resolutions), the final framework reached a score of 74.22% mAP, placing the team in the top 6% of the GWHD challenge.

Conclusion

While multi-scale ensembles provide the best accuracy, they are computationally expensive for training. For real-time deployment on agricultural drones or handheld devices, future work will focus on compressing these ensembles into lightweight, inference-ready models without sacrificing robustness.

Summary updated

Abstract

In this paper, we propose an object detection methodology applied to Global Wheat Head Detection (GWHD) Dataset. We have been through two major architectures of object detection which are Faster R-CNN, and EfficientDet, in order to design a novel and robust wheat head detection model. We emphasize on optimizing the performance of our proposed final architectures. Furthermore, we have been through an extensive exploratory data analysis, data cleaning, data splitting and adapted best data augmentation techniques to our context. We use semi supervised learning, precisely pseudo-labeling, to boost previous supervised models of object detection. Moreover, we put much effort on ensemble learning including test time augmentation, multi-scale ensemble and bootstrap aggregating to achieve higher performance. Finally, we use weighted boxes fusion as our post processing technique to optimize our wheat head detection results. Our solution has been submitted to solve a research challenge launched on the GWHD Dataset which was led by nine research institutes from seven countries. Our proposed method was ranked within the top 6% in the above-mentioned challenge.
BibTeX
@inproceedings{fourati2021wheat,
  author = {Fares Fourati and Wided Souidene Mseddi and Rabah Attia},
  title = {{Wheat Head Detection using Deep, Semi-Supervised and Ensemble Learning}},
  booktitle = {Canadian},
  year = {2021},
  doi = {10.1080/07038992.2021.1906213},
}
Figure