A Lightweight and High-Accuracy Deep Learning Method for Grassland Grazing Livestock Detection Using UAV Imagery

Yuhang Wang, Lingling Ma, Qi Wang, Ning Wang, Dongliang Wang, Xinhong Wang, Qing‐Chuan Zheng, Xiaoxin Hou, Guangzhou OuyangRemote 2023

TL;DR

This paper introduces GLDM, a lightweight and highly accurate deep learning model for detecting grazing livestock in UAV imagery. By enhancing the YOLOX-nano architecture with novel backbone and neck modules, GLDM achieves state-of-the-art performance in identifying small, clustered animals, crucial for ecological management.

What Problem Does This Paper Address?

Unregulated livestock grazing poses a significant threat to grassland ecosystems. Traditional methods for surveying livestock distribution are labor-intensive and can be inaccurate. While remote sensing offers a scalable solution, detecting small, often clustered animals like sheep, cattle, and horses in high-resolution UAV imagery presents a challenge. These animals occupy very few pixels, making them difficult to distinguish from complex backgrounds and prone to missed detections or false positives. Existing deep learning models, while powerful, can be too computationally expensive for deployment on resource-constrained platforms or struggle with the specific characteristics of livestock in UAV images.

Methods

The core of this work is the GLDM (Grazing Livestock Detection Model), built upon the lightweight YOLOX-nano architecture. To address the challenges of small object detection and computational efficiency, the authors introduce two key novel components:

  • Enhanced CSPDarknet (ECSP): This improved backbone network incorporates a "Cascade Hybrid Dilated Convolution Module" (CHDC) to expand the receptive field and capture context features without losing resolution. It also includes optimizations for stage compute ratios and input size.
  • Weighted Aggregation Feature Re-Extraction Pyramid (WAFR): This novel neck module enhances feature fusion by using a weighted aggregation approach with top-down and bottom-up pathways, improving the utilization of shallow features and the detection of small objects.

These enhancements aim to boost recall and precision while keeping the model parameters low.

Datasets

The study utilizes a newly created dataset for training and evaluation:

  • Hadatu Pasture Dataset: This dataset comprises 12,901 instances of grazing livestock (cattle, horses, and sheep) captured by UAVs in the Hadatu Pasture, Hulunbuir, Inner Mongolia, China. The original images were split into 1024x1024 subpatches.
  • Multi-scale Test Dataset: A dataset with nine scales (0.2 to 5) was created to evaluate the model's adaptability to varying image resolutions.

Key Insights and Ideas

  • Dilated Convolutions for Context: The CHDC module effectively leverages dilated convolutions to expand the receptive field, allowing the model to "see" more context around small livestock objects, which is critical for distinguishing them from similar-looking background elements.
  • Weighted Feature Fusion: The WAFR module's weighted aggregation approach is more effective than standard concatenation for fusing features from different layers, particularly for small objects.
  • Lightweight Yet Powerful: The paper demonstrates that it's possible to achieve high accuracy (mAP of 86.47%) with a significantly smaller model (5.7M parameters) compared to larger, state-of-the-art models, making it suitable for practical deployment.
  • Scale Adaptability is Crucial: Livestock detection performance degrades as image scale deviates significantly from the training scale, but the GLDM shows reasonable robustness within a certain range (e.g., 2.5-10 cm resolution).

Key Results

  • High Accuracy: The proposed GLDM achieved a mean Average Precision (mAP) of 86.47%, outperforming mainstream object detection models on their dataset.
  • Excellent Recall and Precision: Both average recall and average precision were consistently above 85%.
  • Lightweight Model: The GLDM has only 5.7 million parameters, making it significantly more efficient than models like YOLOX-x (99M parameters).
  • Improved Sheep Detection: The average precision for sheep detection saw a notable increase of 12.25% compared to baseline models, highlighting the effectiveness of the enhancements for small objects.
  • Accurate Livestock Counting: The livestock accuracy (LAC), a novel metric for evaluating counting accuracy in sheep units, reached 99% on the test dataset.
  • Scale Robustness: The model performed well with image resolutions ranging from 2.5 to 10 cm.

Limitations and Future Work

  • Computational Efficiency: The authors acknowledge that the model's computational efficiency has not been fully optimized.
  • Ultra-Dense Scenes: The model's performance in extremely dense sheep pens (ultra-dense scenes) needs further improvement.
  • Dataset Size and Diversity: Future work could involve increasing the number of labeled samples and incorporating other object categories to improve robustness and handle "long-tail" distributions.
  • Multi-Angle and Multi-Scale Data: Collecting and utilizing multi-angle and multi-scale data would enhance the model's flexibility and applicability to tasks like target tracking.
  • Domain Adaptation: Exploring domain adaptation techniques could improve knowledge transfer and reduce data labeling costs.

Summary updated

BibTeX
@inproceedings{wang2023lightweight,
  author = {Yuhang Wang and Lingling Ma and Qi Wang and Ning Wang and Dongliang Wang and Xinhong Wang and Qing‐Chuan Zheng and Xiaoxin Hou and Guangzhou Ouyang},
  title = {{A Lightweight and High-Accuracy Deep Learning Method for Grassland Grazing Livestock Detection Using UAV Imagery}},
  booktitle = {Remote},
  year = {2023},
  doi = {10.3390/rs15061593},
}
Figure