arXiv:2610.32174cs.CVOct 2026

Manuscript Offprint

arXiv:2610.32174

Real-Time Localisation of Dorsal Anatomical Regions on Dairy Cows in Commercial Rotary Parlours from RGB-D

Vineet Prasad, Shiron Melvin, Sheikh Azid, Hai Wang

Abstract

Automated monitoring of dairy cows increasingly measures one part of the body, such as the rump for temperature or the back for posture, yet the region itself is usually placed by hand. Existing systems either score the cow as a whole or detect sparse keypoints, often in controlled walkways, and neither yields the named region masks that such measurements need on a crowded commercial rotary platform. We present a perception front end that finds the target cow, ten bony landmarks and four named dorsal regions (withers, back, rump and tailhead) in a single forward pass over a whole RGB-D frame from a commercial rotary parlour. Two encoders, one for colour and one for depth, are fused late and share one decoder with three heads. On an anatomical region dataset that we built on public rotary-parlour RGB-D images (538 annotated frames, cow-disjoint test set), the network reaches PCK@10 0.905 for landmarks and region IoU 0.70 to 0.91, and runs end to end in 26.4 ms per frame on a T4 GPU, against an 11 fps camera. Dense region supervision is what makes the landmarks accurate: removing the region head costs 0.15 PCK@10. Agreement between the two heads flags unreliable frames without labels. On our own rig at Western Australia's largest dairy farm, the model transfers with ten labelled frames (PCK@10 0.84), and its regions are carried through depth into a radiometric thermal camera, giving one repeatable temperature per region and cow.

1 Introduction

Precision dairy farming increasingly relies on automated, non-contact measurement of individual cows [Halachmi et al., 2019]. Many of these measurements concern one part of the body: rump and tail-head temperature around oestrus [Perez Marquez et al., 2019], hip width for body weight [Song et al., 2018], back posture for lameness [Viazzi et al., 2014; Van Hertem et al., 2014; Tun et al., 2024], and the rump and tail-head for body condition [Spoliansky et al., 2016]. Each study defines its region of interest by hand or with a task-specific crop. The region is therefore never measured, reused or validated in its own right, and a new measurement needs a new region-finding method.

A rotary milking parlour is a natural place to measure every cow twice a day: the platform carries each cow past a fixed sensor at a known point in the milking routine. It is also a hard scene for machine vision. The camera sees the cow in the stall together with two neighbours, through rails and cluster hoses, from an oblique view that changes between installations. Colour alone is unreliable on black-and-white coats, and depth alone loses fine landmarks. A front end for such a parlour has to find the right cow, localise anatomy on it and keep up with the platform, on hardware that can sit in the dairy.

Prior work on overhead RGB-D stops short of this. Duan et al. [2025] localise eight dorsal keypoints for lameness features; Ruchay et al. [2026a] regress a body condition score from the whole frame in real time (95 ms per frame) on the recording our dataset is built on; thermal studies place their regions by hand [Perez Marquez et al., 2019; Salles et al., 2016]. None outputs named anatomical regions as masks that a second sensor can reuse.

We address this gap with one multi-task network, illustrated in Figure 2. Its contributions are:

  1. A whole-frame, multi-task RGB-D network (late fusion of two encoders, a shared feature pyramid decoder, and heads for the target-cow mask, ten landmarks with visibility, and four region masks) whose regions come with the depth behind every pixel, so any co-calibrated sensor can receive them.

  2. An anatomical region dataset built on the colour and depth images of a public rotary-parlour recording [Ruchay et al., 2026b]: 538 landmark frames, 18 hand-drawn region outlines, 36 within-pass repeat pairs, reviewed target-cow masks and a depth-to-colour calibration.

  3. A controlled study on cow-disjoint and session splits,

∗^{*}Corresponding author: hai.wang@murdoch.edu.au three seeds each: input modality and fusion, head ablations, four backbones including a backbone-specific recipe, and a label-free quality flag from the agreement between the two heads.

  1. End-to-end timing on a T4 GPU at batch size one: 13.8 to 28.6 ms per frame, three to six times faster than the camera.

  2. An industrial-scale proof of concept on our own rig at Peninsula Downs, Western Australia’s largest dairy farm: few-label transfer to a second RGB-D camera and projection of the regions into radiometric thermal images.

References (25)