Enhanced YOLOv8 for Robust Pig Detection and Counting in Complex Agricultural Environments.

Animals (Basel)

School of Information and Artificial Intelligence, Anhui Agricultural University, Hefei 230036, China.

Published: July 2025


Category Ranking

98%

Total Visits

921

Avg Visit Duration

2 minutes

Citations

20

Article Abstract

Accurate pig counting is crucial for precision livestock farming, enabling optimized feeding management and health monitoring. Detection-based counting methods face significant challenges due to mutual occlusion, varying illumination conditions, diverse pen configurations, and substantial variations in pig densities. Previous approaches often struggle with complex agricultural environments where lighting conditions, pig postures, and crowding levels create challenging detection scenarios. To address these limitations, we propose EAPC-YOLO (enhanced adaptive pig counting YOLO), a robust architecture integrating density-aware processing with advanced detection optimizations. The method consists of (1) an enhanced YOLOv8 network incorporating multiple architectural improvements for better feature extraction and object localization. These improvements include DCNv4 deformable convolutions for irregular pig postures, BiFPN bidirectional feature fusion for multi-scale information integration, EfficientViT linear attention for computational efficiency, and PIoU v2 loss for improved overlap handling. (2) A density-aware post-processing module with intelligent NMS strategies that adapt to different crowding scenarios. Experimental results on a comprehensive dataset spanning diverse agricultural scenarios (nighttime, controlled indoor, and natural daylight environments with density variations from 4 to 30 pigs) demonstrate our method achieves 94.2% mAP@0.5 for detection performance and 96.8% counting accuracy, representing 12.3% and 15.7% improvements compared to the strongest baseline, YOLOv11n. This work enables robust, accurate pig counting across challenging agricultural environments, supporting precision livestock management.

Download full-text PDF

Source
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC12291981PMC
http://dx.doi.org/10.3390/ani15142149DOI Listing

Publication Analysis

Top Keywords

agricultural environments
12
pig counting
12
enhanced yolov8
8
complex agricultural
8
accurate pig
8
precision livestock
8
pig postures
8
pig
7
counting
6
yolov8 robust
4

Similar Publications

Multiyear Drought Strengthens Positive and Negative Functional Diversity Effects on Tree Growth Response.

Glob Chang Biol

September 2025

Chair of Silviculture, Faculty of Environment and Natural Resources, Institute of Forest Sciences, University of Freiburg, Freiburg, Germany.

Mixed-species forests are proposed to enhance tree resistance and resilience to drought. However, growing evidence shows that tree species richness does not consistently improve tree growth responses to drought. The underlying mechanisms remain uncertain, especially under unprecedented multiyear droughts.

View Article and Find Full Text PDF

Influenza viruses can be aerosolized when slaughtering infected chickens, which increases the risk of zoonotic transmission. We conducted pilot experiments to measure the concentrations of airborne particles <2.5 μm during slaughtering and defeathering of chickens to help identify methods that can minimize workers' exposure to potentially hazardous aerosol particles.

View Article and Find Full Text PDF

Background: Changes in consumer food choices have been associated with transformation in the food environment. Despite the direct impact of consumers' food choices on their diet and health outcomes, there is a lack of comprehensive evidence regarding how various factors within the food environment impact these choices.

Methods: This study uses the Theory of Planned Behavior to examine how socio-psychological factors in the food environment influence consumers' healthy food choices.

View Article and Find Full Text PDF

Introduction: Fermented buffalo milk products from South Asia remain an underexplored source of microbial diversity with potential health-promoting benefits. This study investigates the probiotic and industrial suitability of lactic acid bacteria (LAB) and non-LAB isolates from traditional Pakistani dairy, addressing gaps in region-specific probiotic discovery.

Methods: Forty-seven bacterial isolates were obtained from fermented buffalo milk products (yogurt and cheese).

View Article and Find Full Text PDF

The role of biochar in combating microplastic pollution: a bibliometric analysis in environmental contexts.

Beilstein J Nanotechnol

August 2025

Faculty of Engineering and Technology, Saigon University, 273 An Duong Vuong Street, Cho Quan Ward, Ho Chi Minh City 700000, Vietnam.

This study employs a bibliometric analysis using CiteSpace to explore research trends on the impact of biochar on microplastics (MPs) in soil and water environments. In agricultural soils, MPs reduce crop yield, alter soil properties, and disrupt microbial diversity and nutrient cycling. Biochar, a stable and eco-friendly material, has demonstrated effectiveness in mitigating these effects by restoring soil chemistry, enhancing microbial diversity and improving crop productivity.

View Article and Find Full Text PDF