Predicting the spatial distribution and demographics of commercial swine farms in the United States.
Journal:
Preventive veterinary medicine
Published Date:
Jul 18, 2026
Abstract
Data on livestock farm locations and demographics are essential for disease monitoring, risk assessment, and spatially explicit epidemiological modeling. In the United States, however, farm-level information is unavailable, limiting access to comprehensive datasets and requiring predictive tools to estimate farm infrastructure and populations. We developed a four-stage machine learning framework to detect and characterize commercial swine farms using aerial imagery across two major U.S. pig-production regions. First, a deep learning semantic segmentation model was trained to identify swine barns. Next, a filtering pipeline combining a Random Forest classifier, geometric constraints, and open-source map data refined barn predictions. Retained barns were then grouped into farms and classified into three production types: sow, nursery, and finisher, using a Random Forest classifier. Finally, we used a Random Forest regression model to estimate swine populations. The segmentation model achieved an F₂-score of 92% and a mean Intersection over Union of 76% on the withheld test dataset, and state-level spatial cross-validation showed that performance was broadly retained across geographically independent test states. After filtering, 65,749 predicted barns were retained across six states and grouped into 36,105 predicted farms. The production type classifier achieved an accuracy of 92.1% and a weighted F1-score of 91.8%. The population regression model achieved an R² of 0.79 and a root mean squared error of 1437 pigs. These results demonstrate the potential of imagery-based machine learning workflows to generate spatially explicit estimates of commercial swine farm locations, production types, and population capacity for epidemiological modeling.
Authors
Keywords
No keywords available for this article.