Automatic sheep counting method and experimental study based on mask R-CNN
With the rapid growth of global meat demand and the expansion of livestock farming, accurate and efficient sheep counting has become crucial in modern livestock management. However, traditional manual counting methods are inefficient and lack accuracy, while automatic counting systems based on RFID and GPS, though more precise, are costly and challenging to scale. To address this issue, this paper proposes an automatic sheep counting method based on Mask R-CNN, aiming to enhance the accuracy and robustness of object detection using instance segmentation technology from deep learning. Mask R-CNN not only provides pixel-level precise segmentation for each sheep but also resolves misdetections and missed detections in occluded and densely populated scenes by optimizing bounding box and mask thresholds. The study was conducted using sheep image data from an actual livestock farm in Inner Mongolia, China, and tested the model under various environmental factors, such as lighting, background complexity, and sheep density. The experimental results indicate that the optimized Mask R-CNN model performs exceptionally well in diverse scenarios, achieving a counting accuracy of 96.1% and a generalization accuracy of 88.8%, significantly outperforming traditional detection models like YOLOv5M (80.3%) and SSD (83.7%). This research not only demonstrates the excellent performance of Mask R-CNN in sheep counting tasks but also provides a low-cost, efficient automated management solution for modern livestock farms.
Authors
- Peng Zhou (ORCID: https://orcid.org/0000-0002-3675-4985)
- Huilin Jiang (ORCID: https://orcid.org/0000-0002-9268-4424)
- Fan Yi (ORCID: https://orcid.org/0000-0001-8634-9788)
- Wenqian Yang (ORCID: https://orcid.org/0009-0005-0742-9103)
- Meian Li (ORCID: https://orcid.org/0000-0002-1581-1389)
- Hao Lian (ORCID: https://orcid.org/0009-0005-4147-4813)
- Ting Li (ORCID: https://orcid.org/0000-0003-4962-6875)
Institutions
- Inner Mongolia Agricultural University (CN)
- Inner Mongolia Academy of Agricultural & Animal Husbandry Sciences (CN)
Publication Details
- Journal
- Journal of Agricultural Engineering
- Published
- 2025-09-12
- DOI
- https://doi.org/10.4081/jae.2025.1614
- Primary Topic
- Advanced Measurement and Detection Methods
- Type
- article
- Field-Weighted Citation Impact
- 0.00