Automatic counting of cattle with Faster R-CNN on UAV images

  • João Vitor de Andrade Porto Inovisão / UCDB
  • Fábio Prestes Cesar Rezende Inovisão / UCDB
  • Gilberto Astolfi Inovisão / IFMS / UCDB
  • Vanessa Aparecida de Moraes Weber Inovisão / UEMS / UCDB
  • Marcio Carneiro Brito Pache Inovisão / IFMS / UCDB
  • Hemerson Pistori Inovisão / UCDB


It is remarkable the growth of the bovine herd in the last four decades however, the availability of areas for pasture did not follow the same trend and thus caused direct interference in the binomial quality and price of the final product. One of the ways to get around this interference is by the use of technologies to help minimize the handling costs, from the breeding in a controlled environment with the need of trained manpower in the confinement process. Thus, as opposed to the current format done manually and in restricted space, computer vision technology can mitigate the identification and counting of cattle problems using unmanned aerial vehicle (UAV). Attending to the objective outlined in this article demonstrates the use of the Faster R-CNN for counting cattle in feedlots employing aerial images, obtaining an average precision of 89.7% for the set of hyperparameters that differed most positively from the others in this experiment.

Palavras-chave: Computer vision, UAV, deep learning, automatic counting, Faster R-CNN


R. da Costa Gomes, G. L. D. Feijó, and L. Chiari, “Evolução e qualidade da pecuária brasileira,” EMBRAPA, Tech. Rep., 03 2017.

C. Bernardes, “O gado e as larguezas dos gerais,” Estudos avançados, vol. 9, no. 23, pp. 33-58, 1995.

ABIEC, “Beef report 2021,” ABIEC, Tech. Rep., 06 2021. [Online]. Available:

G. Bueno and M. Junior, “A sustentabilidade da pecuria brasileira.” EMBRAPA, Tech. Rep., 03 2017.

B. G. Weinstein, “A computer vision for animal ecology,” Journal of Animal Ecology, vol. 87, no. 3, pp. 533-545, 2018.

E. C. Tetila, B. B. Machado, N. A. de Souza Belete, D. A. Guimarães, and H. Pistori, “Identification of soybean foliar diseases using unmanned aerial vehicle images,” IEEE Geoscience and Remote Sensing Letters, vol. 14, no. 12, pp. 2190-2194, 2017.

G. H. M. Cassemiro and H. B. Pinto, “Composição e processamento de imagens aéreas de alta-resolução obtidas com drone,” Trabalho de Conclusão de Curso, Universidade de Brasília, Brasília, 2014.

S. Ren, K. He, R. Girshick, and J. Sun, “Faster r-cnn: Towards real-time object detection with region proposal networks,” in Advances in neural information processing systems, 2015, pp. 91-99.

M. d. S. Mendes, “Aprendizado em profundidade na descrição semântica de imagens.” Trabalho de Conclusão de Curso, Universidade Federal de Ouro Preto, Ouro Preto, 2018.

R. Girshick, “Fast r-cnn,” in Proceedings of the IEEE international conference on computer vision, 2015, pp. 1440-1448.

W. Shao, R. Kawakami, R. Yoshihashi, S. You, H. Kawase, and T. Naemura, “Cattle detection and counting in uav images based on convolutional neural networks,” International Journal of Remote Sensing, vol. 41, no. 1, pp. 31-52, 2020.

J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, “You only look once: Unified, real-time object detection,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2016, pp. 779-788.

J. H. Muribo “Locating sheep with yolov3,” Master's thesis, NTNU, 2019.

Q.-J. Wang, S.-Y. Zhang, S.-F. Dong, G.-C. Zhang, J. Yang, R. Li, and H.-Q. Wang, “Pest24: A large-scale very small object data set of agricultural pests for multi-target detection,” Computers and Electronics in Agriculture, vol. 175, p. 105585, Aug. 2020. [Online]. Available:

A. Rivas, P. Chamoso, A. González-Briones, and J. M. Corchado, “Detection of cattle using drones and convolutional neural networks,” Sensors, vol. 18, no. 7, p. 2048, 2018.

L. Quan, H. Feng, Y. Lv, Q. Wang, C. Zhang, J. Liu, and Z. Yuan, “Maize seedling detection under different growth stages and complex field environments based on an improved faster r-CNN,” Biosystems Engineering, vol. 184, pp. 1-23, Aug. 2019. [Online]. Available:

B. Xu, W. Wang, G. Falzon, P. Kwan, L. Guo, G. Chen, A. Tait, and D. Schneider, “Automated cattle counting using mask r-cnn in quadcopter vision system,” Computers and Electronics in Agriculture, vol. 171, p. 105300, 2020.

K. He, G. Gkioxari, P. Dollár, and R. Girshick, “Mask r-cnn,” in Proceedings of the IEEE international conference on computer vision, 2017, pp. 2961-2969.

M. Everingham, L. Van Gool, C. K. Williams, J. Winn, and A. Zisserman, “The pascal visual object classes (voc) challenge,” International journal of computer vision, vol. 88, no. 2, pp. 303-338, 2010.
Como Citar

Selecione um Formato
PORTO, João Vitor de Andrade; REZENDE, Fábio Prestes Cesar; ASTOLFI, Gilberto; WEBER, Vanessa Aparecida de Moraes; PACHE, Marcio Carneiro Brito; PISTORI, Hemerson. Automatic counting of cattle with Faster R-CNN on UAV images. In: WORKSHOP DE VISÃO COMPUTACIONAL (WVC), 17. , 2021, Online. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2021 . p. 1-6. DOI: