In the dairy industry, maintaining the welfare of every cow and curbing financial losses requires individual-level surveillance, which is achieved through cow Re-Identification (Re-ID). Computer vision-based Re-ID hinges on visually distinguishing characteristics, such as the specific coat patterns seen in breeds like Holstein. However, manually labelling every cow across all farms is financially unfeasible. We aim to formulate Re-ID strategies that work on both annotated and non-annotated farms, accommodating new individuals and varied settings. Unsupervised Domain Adaptation (UDA) approaches aim to close this divide by transferring knowledge from labelled source domains to unlabelled target domains. However, they have largely been tailored to person and vehicle Re-ID scenarios. Our research proposes Cumulative Unsupervised Multi-Domain Adaptation (CUMDA) to address the challenges of constrained identity variation and dissimilar farm appearances. CUMDA gathers knowledge across all domains, reinforcing specialization in familiar domains while strengthening generalization to unknown ones. Our offerings include a CUMDA technique that adapts to multiple unlabelled target domains while safeguarding source-domain efficacy, along with thorough cross-dataset testing across three cattle Re-ID datasets. These tests reveal substantial gains in source conservation, target-domain specialization, and adaptation to unseen domains.
Leaching losses of nitrogen (N) from grazed pasture are driven predominantly by urinary N deposited by cattle. This work aimed to use non-invasive accelerometer-based sensors to capture the timing and duration of urination and defecation events in grazing cattle. To register the back arching motion that accompanies urination and defecation, each cow was fitted with two accelerometer sensors. Experiments took place outdoors under grazing conditions during two seasons—autumn and summer—and captured a total of 160 urination events. Across the majority of these events, the tilt angle was observed to shift within a range of 8 to 22.5 degrees. Using 18 selected features that characterise a cow's back arching, ensemble machine learning classifiers were constructed to recognise urination and defecation. The urination classifier delivered an F1 score of 0.80 (harmonic mean computed from a precision of 0.82 and a sensitivity of 0.78). In contrast, the defecation classifier gave an F1 score of 0.73 (calculated from 408 hours of recordings made between 9 a.m. and 3 p.m. from 19 cows). Predictive models for urination event duration were statistically significant. Still, they underperformed, with low explanatory power, in part because the relationship between the duration of back arching and the duration of urine passage was only moderate (R² values of 0.29 in autumn and 0.47 in summer). The work highlights that non-invasive accelerometer sensing has real promise for capturing individual cows' urination patterns and for generating animal-level information that farm decision support systems (such as those addressing urine-N excretion) and managerial actions (such as selective culling or breeding) could use as input.