412 A model generalization study in localizing indoor cows with COw LOcalization (COLO) dataset.
Abstract This study evaluates the generalization capabilities of computer vision (CV) models for detecting cow locations in indoor free-stall barns, with a focus on quantifying the resources required for effective deployment across different farms where camera angles and lighting conditions vary. Given the increasing reliance of precision livestock farming (PLF) on object localization techniques to monitor livestock health and optimize resource management, understanding how to deploy CV models with minimal resources while maintaining high performance is critical. To assess generalization, we investigated three key hypotheses: (1) Model generalization is equally influenced by changes in lighting conditions and camera angles; (2) Higher model complexity guarantees better generalization performance; and (3) Fine-tuning with custom initial weights trained on related tasks enhances final performance compared to using pre-trained weights. The study utilized the newly released COws LOcalization (COLO) dataset, comprising 1,254 images and 11,818 cow instances captured from five distinct imaging settings with varying camera angles and lighting conditions. The first hypothesis was tested by training models on images from specific camera angles and evaluating performance on new angles. The second hypothesis was examined by comparing the performance of five different model sizes (e.g., YOLO11n with 2.6M parameters vs. YOLO11x with 56.9M parameters) on the same dataset. The third hypothesis was evaluated by pre-training a model on a subset of images from a specific barn and fine-tuning it on another subset from a similar setting to simulate transferring the training outcome to a different location within the same barn. Results indicate that changes in lighting conditions have a negligible impact on model generalization, whereas shifting from a top-view to a side-view perspective significantly reduces performance (P < 0.001). Model complexity does not always correlate with improved generalization, as optimal complexity depends on the dataset and task. Additionally, fine-tuning with custom initial weights benefits small, simple models but provides no significant (P > 0.05) advantage for larger models compared to training from scratch. As artificial intelligence adoption grows, alongside rising concerns about its environmental impact, this study provides practical guidelines for PLF researchers to optimize CV model deployment with minimal resource consumption. It also highlights key generalization challenges and leverages the COLO dataset to drive further research in resource-efficient livestock monitoring.
Authors
- Gonzalo Ferreira (ORCID: https://orcid.org/0000-0002-8254-8090)
- Mautushi Das (ORCID: https://orcid.org/0009-0001-8932-142X)
- Chao‐Wei Chen (ORCID: https://orcid.org/0000-0002-9084-6741)
Institutions
- Virginia Tech (US)
Publication Details
- Journal
- Journal of Animal Science
- Published
- 2025-10-01
- DOI
- https://doi.org/10.1093/jas/skaf300.300
- Primary Topic
- Food Supply Chain Traceability
- Type
- article
- Field-Weighted Citation Impact
- 0.00