AUTHOR=Oczak Maciej , Bayer Florian , Vetter Sebastian G. , Maschat Kristina , Baumgartner Johannes TITLE=Where is the sow’s nose: RetinaNet object detector as a basis for monitoring the use of rack with nest-building material JOURNAL=Frontiers in Animal Science VOLUME=Volume 3 - 2022 YEAR=2022 URL=https://www.frontiersin.org/journals/animal-science/articles/10.3389/fanim.2022.913407 DOI=10.3389/fanim.2022.913407 ISSN=2673-6225 ABSTRACT=Access to nest building material in pre-parturient period is beneficial for sows’ welfare. However, on slatted floors long-stem forage can drop into the slurry and block the drainage system. As a compromise considering the needs of the sow for access to adequate nest building material, farrowing pens with slatted floors are equipped with dispensers (racks) accessible by sows. In this study we developed a computer vision method to monitor the use of the racks with nest-building material. In total, 12 sows were included in the experiment from five days before farrowing to the end of farrowing. Hay rack use behaviours were labelled for all the sows i.e. pulling hay, nose close to the rack, exploratory behaviour and bar biting. Object detection algorithm RetinaNet was used to extract centroids of parts of the sow's body and the hay rack. Several feature variables were estimated from centroids of detected parts of sows body and Random Forest was used for classification of hay rack use behaviours. The model for the detection of pulling hay behaviour had the best performance 83.5% sensitivity, 98.7% specificity and 98.6% accuracy. Distance between the sows’ nose and the hay rack was the most important feature variable, which indicated the importance of nose location for recognition of behaviours in which pigs interact with other objects. The developed models could be applied for automated monitoring of the use of nest building material in pre-parturient sows. Such monitoring might be especially important in sows housed on slatted floors.