Abstract
Automated counting, tracking, morphometry, behaviour observation and identification of individual animals require reliable cattle localization, which is a prerequisite of precision livestock farming. Fixed camera farm surveillance does have scale variation, occlusion, fencing, complex background and appearance changes from day to night that can decrease the reliability of localization. This paper presents and compares the performance between YOLOv8s-Seg and YOLOv8m-Seg for the one-class cattle detection and instance segmentation task, on a surveillance dataset collected from 1,486 frames, 2304 × 1296-pixel surveillance archive. There were 1,477 byte-unique observations and 9 exact duplicates, and environmental characterization found normal/overcast daylight, bright daylight, low-light colour and mostly infrared/night regimes. All models were trained for 100 epochs at 640 × 640 resolution with the same settings recorded during training, and the results were compared using the same epoch-100 checkpoint. YOLOv8s-Seg achieved box precision/recall of 93.92%/86.65%, box mAP@0.5 of 95.28% and mask mAP@0.5 of 92.71%. YOLOv8m-Seg achieved 94.57%/86.86%, 95.00% and 93.63%, respectively, while improving mask recall by 2.85 percentage points and mask mAP@0.5:0.95 by 0.63 points. The results reveal that the medium model improves the mask recovery performance primarily and not the coarse box detection performance, while the smaller one still maintains a compact 23.86-MB terminal checkpoint. The results are published as a validation result and are not a tracking result and not a biological identity result.