Automatic counting of mounds on UAV images: combining instance segmentation and patch-level correction

Majid Nikougoftar Nategh, Ahmed Zgaren, Wassim Bouachir, Nizar Bouguila

TL;DR

This paper introduces a hybrid computer vision framework that automatically counts mechanically prepared planting spots ("mounds") from UAV imagery. By combining Mask R-CNN instance segmentation with a patch-level machine learning regression model, the system successfully corrects for real-world counting errors caused by environmental factors like erosion, flooding, and debris occlusion.

What Problem Does This Paper Address?

In forestry, "mounding" is a silvicultural practice where soil is mechanically scooped up to create elevated planting spots. These mounds protect young seedlings from waterlogging and reduce competition from surrounding weeds. To plan effectively and purchase the correct number of seedlings, forest managers need an accurate count of these mounds across massive plantation blocks.

Currently, forestry workers rely on manual field sampling or tedious visual inspection of drone orthomosaics—both of which are slow, expensive, and highly prone to human error. While automated computer vision seems like an obvious fix, standard object detection algorithms struggle in the wild. Mounds frequently get washed away by rain, hidden under tree shadows, or covered by woody debris, leading to severe undercounting.

Methods

The authors tackle this challenge with a sequential, two-stage hybrid framework:

  1. Local Image Segmentation (Stage 1): High-resolution UAV orthomosaics are divided into smaller, manageable patches. A Mask R-CNN model—fine-tuned via transfer learning from the COCO dataset—performs pixel-level instance segmentation. It doesn't just look for visible mounds; it also detects and quantifies three major confounding environmental features: trees, woody debris, and water accumulations.
  2. Patch-Level Count Correction (Stage 2): Because the segmentation model inherently undercounts obscured mounds, the authors introduce a secondary machine learning regression layer. This model takes the preliminary mound count along with the calculated ratios of trees, water, and debris within the patch, and predicts the actual number of mounds.

The authors experimented with several regression techniques, including Linear Regression, Lasso, Multilayer Perceptrons (MLP), and Support Vector Regression (SVR), finding that SVR yielded the highest precision.

The evaluation workflow for a new image patch, moving from raw input to segmentation-based counting, and finally through local count correction.

Datasets

The framework was trained and evaluated on a newly constructed dataset consisting of 20 high-resolution UAV orthomosaics captured at an altitude of 120 meters.

  • Pre-processing: Due to the massive size of the original sensor images ($23610 \times 18151$ pixels), the orthomosaics were trimmed into $1,352$ non-overlapping patches of $608 \times 608$ pixels.
  • Splitting: The data was split into Group 1 (3 orthomosaics used exclusively for training the local image segmentation model) and Group 2 (18 orthomosaics reserved for testing the entire framework).
  • Ground Truth: Annotations for mounds, trees, water, and debris were manually generated using the open-source VGG Image Annotator (VIA) tool.

Key Insights and Ideas

  • Context is Key for Error Correction: The core "aha!" moment of this research is that environmental disturbances aren't just noise to be filtered out; they are predictable features. By explicitly measuring the presence of debris or water, the regression model learns how much the primary detector is likely undercounting in a specific terrain type.
  • Texture Blending Challenges: Visual detection drops significantly in dry terrain. When the soil is dry, the texture of the mounds blends almost seamlessly into the background, making edge detection highly challenging even for deep neural networks.
Examples of terrain challenges: (a) tree shadows causing occlusion, (b) water accumulation from heavy rain, and (c) dry terrain where mounds blend into the background.

Key Results

The performance was measured using Relative Counting Precision (RCP):

  • Baseline Segmentation: Using only the Mask R-CNN instance segmentation yielded an average RCP of 93%.
  • With Patch-Level Correction: Adding the SVR correction layer boosted the overall framework precision to 98% (with an average block precision of 96%).
  • Comparison to Humans: The proposed automated framework significantly outperformed traditional manual counting methods, which hover around an average accuracy of 85%.

Limitations and Future Work

While the framework shows strong performance, it is sensitive to completely unseen terrain properties. For instance, on "Block 08"—which was captured under exceptionally dry conditions—the system struggled because the mound textures matched the surrounding background too closely.

Future work will focus on expanding the diversity of the training dataset to include a wider variety of seasonal and environmental conditions, ensuring the model remains robust across different soil types and moisture levels.

Summary updated

Abstract

Site preparation by mounding is a commonly used silvicultural treatment that improves tree growth conditions by mechanically creating planting microsites called mounds. Following site preparation, the next critical step is to count the number of mounds, which provides forest managers with a precise estimate of the number of seedlings required for a given plantation block. Counting the number of mounds is generally conducted through manual field surveys by forestry workers, which is costly and prone to errors, especially for large areas. To address this issue, we present a novel framework exploiting advances in Unmanned Aerial Vehicle (UAV) imaging and computer vision to accurately estimate the number of mounds on a planting block. The proposed framework comprises two main components. First, we exploit a visual recognition method based on a deep learning algorithm for multiple object detection by pixel-based segmentation. This enables a preliminary count of visible mounds, as well as other frequently seen objects (e.g. trees, debris, accumulation of water), to be used to characterize the planting block. Second, since visual recognition could limited by several perturbation factors (e.g. mound erosion, occlusion), we employ a machine learning estimation function that predicts the final number of mounds based on the local block properties extracted in the first stage. We evaluate the proposed framework on a new UAV dataset representing numerous planting blocks with varying features. The proposed method outperformed manual counting methods in terms of relative counting precision, indicating that it has the potential to be advantageous and efficient in difficult situations.
BibTeX
@inproceedings{nategh2022automatic,
  author = {Majid Nikougoftar Nategh and Ahmed Zgaren and Wassim Bouachir and Nizar Bouguila},
  title = {{Automatic counting of mounds on UAV images: combining instance segmentation and patch-level correction}},
  booktitle = {Icmla},
  year = {2022},
  doi = {10.1109/icmla55696.2022.00060},
}
Figure