Comparison of CNN and Transformer Architectures for Robust Cattle Segmentation in Complex Farm Environments

Alessandra Lumini, Guilherme Botazzo Rozendo, Maichol Dadi, Annalisa Franco

2025

Abstract

In recent years, computer vision and deep learning have become increasingly important in the livestock industry, offering innovative animal monitoring and farm management solutions. This paper focuses on the critical task of cattle segmentation, an essential application for weight estimation, body condition scoring, and behavior analysis. Despite advances in segmentation techniques, accurately identifying and isolating cattle in complex farm environments remains challenging due to varying lighting conditions and overlapping objects. This study evaluates state-of-the-art segmentation models based on convolutional neural networks and transformers, which leverage self-attention mechanisms to capture long-range image dependencies. By testing these models across multiple publicly available datasets, we assess their performance and generalization capabilities, providing insights into the most effective methods for accurate cattle segmentation in real-world farm conditions. We also explore ensemble techniques, selecting pairs of segmenters with maximum diversity. The results are promising, as an ensemble of only two models improves performance over all stand-alone methods. The findings contribute to improving computer vision-based solutions for livestock management, enhancing their accuracy and reliability in practical applications.

Download


Paper Citation


in Harvard Style

Lumini A., Rozendo G., Dadi M. and Franco A. (2025). Comparison of CNN and Transformer Architectures for Robust Cattle Segmentation in Complex Farm Environments. In Proceedings of the 14th International Conference on Pattern Recognition Applications and Methods - Volume 1: ICPRAM; ISBN 978-989-758-730-6, SciTePress, pages 91-102. DOI: 10.5220/0013176400003905


in Bibtex Style

@conference{icpram25,
author={Alessandra Lumini and Guilherme Rozendo and Maichol Dadi and Annalisa Franco},
title={Comparison of CNN and Transformer Architectures for Robust Cattle Segmentation in Complex Farm Environments},
booktitle={Proceedings of the 14th International Conference on Pattern Recognition Applications and Methods - Volume 1: ICPRAM},
year={2025},
pages={91-102},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0013176400003905},
isbn={978-989-758-730-6},
}


in EndNote Style

TY - CONF

JO - Proceedings of the 14th International Conference on Pattern Recognition Applications and Methods - Volume 1: ICPRAM
TI - Comparison of CNN and Transformer Architectures for Robust Cattle Segmentation in Complex Farm Environments
SN - 978-989-758-730-6
AU - Lumini A.
AU - Rozendo G.
AU - Dadi M.
AU - Franco A.
PY - 2025
SP - 91
EP - 102
DO - 10.5220/0013176400003905
PB - SciTePress