cs.CVNov 6, 2026

UAV-Based Computer Vision for Cattle Detection and Feed Bunk Spatial Analysis

Authors: Pedro Oliveira Torrente, Diego Giaretta de Paulo, Lucas Pascotti Valem, Jianglong Yan, Everton Castelão Tetila, Jayme Garcia Arnal Barbedo, Liang Zhao

Organizations: Institute of Mathematics and Computer Science (ICMC), University of São Paulo (USP), São Carlos - SP, Brazil. · Federal University of Grande Dourados (UFGD), Dourados - MS, Brazil · Embrapa Digital Agriculture, Campinas - SP, Brazil. · Faculty of Philosophy, Sciences and Letters at Ribeirão Preto (FFCLRP); University of São Paulo (USP), Ribeirão Preto - SP, Brazil.

Abstract

Beef cattle production is central to Brazilian agribusiness and faces growing demands for efficiency, sustainability, and animal welfare. Precision Livestock Farming (PLF) offers tools to address these challenges, particularly through monitoring feeding-related spatial patterns in confined systems. Feeding management plays a decisive role in animal performance, yet its evaluation still relies largely on subjective, labor-intensive visual inspections that are hard to scale and prone to bias. This work proposes a computer vision framework based on Unmanned Aerial Vehicles (UAVs) to quantify cattle alignment and spatial dispersion at the feed bunk under real-world feedlot conditions. A UAV dataset was collected during flight campaigns at a commercial feedlot in Mato Grosso do Sul, Brazil. Images were manually annotated into cattle head and cattle back classes to support object detection and image-level spatial analysis of cattle distribution. You Only Look Once (YOLO) models, namely YOLOv8 and YOLOv11, were evaluated, with YOLOv8 small used for the downstream spatial analysis. The feed bunk region was segmented using the Segment Anything Model (SAM), and geometric metrics based on detected head positions were developed to characterize alignment, spacing regularity, and clustering. The selected detector achieved 84.30% mAP50 and 35.50% mAP50-95, with an inference time of approximately 2.7 ms per image on an NVIDIA RTX 5060 Ti GPU. The resulting metrics distinguished representative regular and irregular spatial distributions by Root Mean Square Deviation - RMSD (1.06 m and 4.26 m), Coefficient of Variation - CV (42.70% and 96.31%), and clustering (0 and 2 clusters), respectively. These findings indicate that the proposed approach can provide indicators for assessing feed bunk spatial patterns in PLF.

Figures & tables

Explore similar work

Oct 10, 2026

CowCare: A Unified Visual Framework for Viewpoint-Robust Cattle Tracking and Spatiotemporal Heat-Stress Analysis

Reliable individual monitoring is essential for dairy cattle welfare and early heat stress detection in Precision Livestock Farming (PLF). However, translating raw multi-camera videos into automated diagnostics remains challenging due to disconnected tracking and recognition pipelines and complex physical environments. Dense mutual occlusions and cross-camera viewpoint variations fragment identities, while environmental noise, including camera vibrations, and limited agricultural data obscure subtle heat stress cues such as rapid breathing and flank undulations. To bridge low-level visual features and high-level behavioral diagnostics, we propose CowCare, a unified framework combining viewpoint-robust tracking with spatiotemporal heat stress recognition. Its tracking module, CowTrack, maintains cross-camera identity consistency through a View-Decoupled Aggregation Network (VDA-Net). Instead of relying on static global representations, VDA-Net aggregates localized textures under heavy occlusion and uses a Viewpoint Decoupling Transformer (VDT) to suppress transient viewpoint variations. CowTrack further incorporates a causal online self-supervision mechanism for continuous adaptation to dynamic farm scenes. The resulting tracklets are subsequently processed by TSDF-Net, a fine-grained video understanding network. Its Temporal Stabilization and Aggregation Module (TSAM) suppresses high-frequency jitter, while a Diffusion Semantic Prior (DSP) uses frozen pre-trained diffusion semantics to enhance subtle behavioral signals and mitigate overfitting. Extensive evaluations on two real-world farm benchmarks demonstrate the framework's effectiveness: CowTrack achieves 83.48% HOTA and 87.72% IDF1 for global multi-object tracking on MVCow, and TSDF-Net achieves 87.72% Top-1 accuracy on HSCow. These results establish CowCare as a robust end-to-end framework for automated livestock health monitoring.
Nov 10, 2026

BoviShift: A Six-Year Multi-Attribute Audit of Visual Cattle Phenotyping Across Animals and Time

Computer vision offers a scalable, non-contact means of estimating livestock traits, but correlated images and video frames make reliable evaluation difficult. Image-random splitting can place views of the same animal in both training and test sets, while deployment further requires transfer to animals captured in future years. We introduce BoviShift, a corpus reconstructed from six consecutive annual cohorts of an operational cattle marketplace collected from 2021 to 2026. It contains 2{,}657 cattle, 10{,}610 still images, and 2{,}566 walk-around videos across nine recorded breed categories. We evaluate three splitting strategies through four configurations: image-random and pooled cattle-disjoint splits over the same development cohorts, followed by separate future-2025 and locked future-2026 evaluations. Using a fixed ResNet-50 multi-task baseline, we assess weight, age, height, breed, and coat color. Differences between image-random and cattle-disjoint splitting are task-dependent rather than a universal leakage penalty. Future-cohort behavior is also attribute- and cohort-specific: breed declines relative to pooled evaluation; mean weight and age performance fails to beat constant baselines in 2025; height remains above baseline; and color transfers well to 2025 but degrades in 2026. Multi-task training improves all five point estimates in a single-seed ablation, still-view aggregation helps selectively, and zero-shot video-frame aggregation exposes a still-to-video domain gap. To our knowledge, BoviShift is the longest-spanning cattle-vision resource combining consecutive annual cohorts with physical and visual attributes.
May 25, 2026

SAM3-Assisted Training of Lightweight YOLO Models for Precision Pig Farming

Deep learning-based object detection has revolutionized Precision Livestock Farming (PLF), yet a critical barrier remains: high-performance Foundation Models (such as SAM 3) are too computationally intensive for edge deployment, while lightweight models (like YOLO) require prohibitive manual annotation efforts. This work proposes a fully automated knowledge distillation pipeline that leverages the Segment Anything Model 3 (SAM 3) to generate zero-shot pseudo-labels for training efficient YOLOv8 detectors. By treating SAM 3 as an offline auto-annotator, we eliminate the manual labeling bottleneck, producing models capable of real-time inference on resource-constrained hardware. We systematically evaluate this approach on the PigLife dataset, comparing SAM 3-supervised models against human-annotated baselines. Results demonstrate that a SAM 3-trained YOLOv8m achieves a mean Average Precision (mAP) of 79.4% without human intervention, while reducing inference latency by approximately 200×\times compared to the teacher model. Furthermore, stratified analysis reveals that in low-occlusion scenarios, the automated pipeline achieves detection rates comparable to human benchmarks (AP50>99%AP_{50} > 99\%). These findings indicate that foundation models can serve as effective, zero-annotation-cost supervisors, enabling scalable edge computing solutions for smart agriculture.