Unsupervised Segmentation of Cattle Images Using Deep Learning

  • Vinícius Guardieiro Sousa UFU
  • André R. Backes UFU


In this work, we used the Deep Learning (DL) architecture named U-Net to segment images containing side view cattle. We evaluated the ability of the U-Net to segment images captured with different backgrounds and from the different breeds, both acquired by us and from the Internet. Since cattle images present a more constant background than other applications, we also evaluated the performance of the U-Net when we change the numbers of convolutional blocks and filters. Results show that U-Net can be used to segment cattle images using fewer blocks and filters than traditional U-Net and that the number of blocks is more important than the total number of filters used.

Palavras-chave: U-Net, semantic segmentation, cow detection, deep Learning


G. J. Tu, H. Karstoft, L. J. Pedersen, and E. Jorgensen, “Segmentation of sows in farrowing pens,” IET Image Processing, vol. 8, no. 1, pp. 56-68, 2014.

Y. Guo, Z. Zhang, D. He, J. Niu, and Y. Tan, “Detection of cow mounting behavior using region geometry and optical flow characteristics,” Computers and Electronics in Agriculture, vol. 163, p. 104828, 2019.

R. Nishide, Y. Hosomi, T. Ohkawa, K. Oyama, and C. Ohta, “Detecting and tracking breeding cows from bird's eye video of pasture,” in Proceedings of the 5th IIAE International Conference on Intelligent Systems and Image Processing, 2017, pp. 239-246.

L. C. Silva Júnior, M. B. S. Pádua, L. M. Ogusuku, M. Keese Albertini, R. Pimentel, and A. R. Backes, “Wild boar recognition using convolutional neural networks,” Concurrency and Computation: Practice and Experience, vol. n/a, no. n/a, p. e6010. [Online]. Available: https://onlinelibrary.wiley.com/doi/abs/10.1002/cpe.6010

Y. Guo, W. Zhu, P. Jiao, and J. Chen, “Foreground detection of grouphoused pigs based on the combination of mixture of gaussians using prediction mechanism and threshold segmentation,” Biosystems Engineering, vol. 125, pp. 98-104, 2014.

G. J. Tu, H. Karstoft, L. J. Pedersen, and E. Jorgensen, “Illumination and reflectance estimation with its application in foreground detection,” Sensors, vol. 15, no. 9, pp. 21 407-21 426, 2015.

G. Ding, Y. Song, J. Guo, C. Feng, G. Li, B. He, and T. Yan, “Fish recognition using convolutional neural network,” in OCEANS 2017-Anchorage. IEEE, 2017, pp. 1-4.

J. G. A. Barbedo, L. V. Koenigkan, T. T. Santos, and P. M. Santos, “A study on the detection of cattle in uav images using deep learning,” Sensors, vol. 19, no. 24, p. 5436, 2019.

K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” arXiv preprint arXiv:1409.1556, 2014.

K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2016, pp. 770-778.

D. Feng, C. Haase-Schütz, L. Rosenbaum, H. Hertlein, C. Glaeser, F. Timm, W. Wiesbeck, and K. Dietmayer, “Deep multi-modal object detection and semantic segmentation for autonomous driving: Datasets, methods, and challenges,” IEEE Transactions on Intelligent Transportation Systems, 2020.

Z. Kaixuan and H. Dongjian, “Target detection method for moving cows based on background subtraction,” International Journal of Agricultural and Biological Engineering, vol. 8, no. 1, pp. 42-49, 2015.

M. Aotani, R. Nishide, Y. Takaki, C. Ohta, K. Oyama, and T. Ohkawa, “Refined cattle detection using composite background subtraction and brightness intensity from bird's eye images,” in Proceedings of the Ninth International Symposium on Information and Communication Technology, 2018, pp. 243-250.

N. J. McFarlane and C. P. Schofield, “Segmentation and tracking of piglets in images,” Machine vision and applications, vol. 8, no. 3, pp. 187-193, 1995.

T. Stan, Z. T. Thompson, and P. W. Voorhees, “Optimizing convolutional neural networks to perform semantic segmentation on large materials imaging datasets: X-ray tomography and serial sectioning,” Materials Characterization, vol. 160, p. 110119, 2020.

G. Bras, V. Fernandes, A. C. de Paiva, G. B. Júnior, and L. Rivero, “Transfer learning method evaluation for automatic pediatric chest xray image segmentation,” in 2020 International Conference on Systems, Signals and Image Processing (IWSSIP), 2020, pp. 128-133.

M. Treml, J. Arjona-Medina, T. Unterthiner, R. Durgesh, F. Friedmann, P. Schuberth, A. Mayr, M. Heusel, M. Hofmarcher, M. Widrich et al., “Speeding up semantic segmentation for autonomous driving,” in MLITS, NIPS Workshop, vol. 2, no. 7, 2016.

O. Ronneberger, P. Fischer, and T. Brox, “U-net: Convolutional networks for biomedical image segmentation,” in International Conference on Medical image computing and computer-assisted intervention. Springer, 2015, pp. 234-241.
Como Citar

Selecione um Formato
SOUSA, Vinícius Guardieiro; BACKES, André R.. Unsupervised Segmentation of Cattle Images Using Deep Learning. In: WORKSHOP DE VISÃO COMPUTACIONAL (WVC), 17. , 2021, Online. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2021 . p. 37-41. DOI: https://doi.org/10.5753/wvc.2021.18886.