magazinelogo

International Journal of Food Science and Agriculture

ISSN Online: 2578-3475 ISSN Print: 2578-3467 CODEN: IJFSJ3
Frequency: quarterly Email: ijfsa@hillpublisher.com
Total View: 3438783 Downloads: 558761 Citations: 1007 (From Dimensions)
Google-based citation data
  • citations

    1954
  • h-index

    19
  • i10-index

    59
ArticleOpen Access http://dx.doi.org/10.26855/ijfsa.2026.03.006

TinyML-based Image Recognition for Real-time Capybara Detection on Resource-constrained Embedded Hardware in Precision Livestock Farming

Tung Chiun Wen*, Fabiano Gregolin, Késia Oliveira da Silva Miranda, Luana Maria Benicio, Miguel Ângelo Cyrillo Narbot

GBAZP - Grupo de Pesquisa em Bem-Estar, Ambiência e Zootecnia de Precisão, ESALQ/USP, Piracicaba, São Paulo 13418-900, Brazil.

*Corresponding author: Tung Chiun Wen

Published: March 21,2026

Abstract

The modernization of animal production increasingly relies on precision technologies to improve productivity, reduce operational costs, and maintain animal welfare and environmental sustainability. Among these technologies, artificial intelligence and computer vision have enabled automated monitoring of animals throughout the production chain. However, manual data collection remains a significant limitation for achieving efficient and scalable monitoring systems. This study aimed to develop and evaluate an image recognition system based on Deep Learning implemented through Tiny Machine Learning (TinyML) for the detection of capybaras in invasive animal containment systems. The methodology comprised four stages: image collection, dataset preparation and analysis, model training, and deployment on embedded hardware. A convolutional neural network based on the MobileNet architecture was trained and optimized using the Edge Impulse platform for deployment on resource-constrained edge devices. The results demonstrated that the MobileNet-based model achieved 97% accuracy during validation and 94.83% during testing on a holdout set of 116 images, with a capybara detection precision of 96.22% and sensitivity of 92.72%. The classifier was successfully deployed on an ESP32 microcontroller, enabling real-time inference on embedded hardware. These findings demonstrate the feasi-bility of integrating TinyML and computer vision for low-cost, intelligent monitoring systems. The proposed approach provides a practical solution for automated invasive animal detection and contributes to the advancement of embedded artificial intelligence in precision livestock farming.

Keywords

TinyML; convolutional neural network; MobileNet; edge inference; invasive species detection; precision livestock farming; Brazilian spotted fever; ESP32

References

[1] Sevegnani KB. Zootecnia de precisão: desafios para a produção animal. In: Tecnologia e inovação na agricultura: aplicação, produtividade, e sustentabilidade em pesquisa. Editora Científica; 2023. p. 258-71.

[2] Berckmans D. Precision livestock farming technologies for welfare management in intensive livestock systems. Rev Sci Tech. 2014;33(1):189-207.

[3] Goap A, Sharma D, Shukla AK, Krishna CR. An IoT based smart irrigation management system using Machine learning and open source technologies. Comput Electron Agric. 2018;155:41-9.

[4] Krishnamoorthy R, Thiagarajan R, Padmapriya S, Mohan I, Arun S, Dineshkumar T. Applications of machine learning and deep learning in smart agriculture. In: Machine learning algorithms for signal and image processing. IEEE; 2022. p. 371-95.

[5] LeCun Y, Bengio Y, Hinton G. Deep learning. Nature. 2015;521(7553):436-44.

[6] Ünal Z. Smart farming becomes even smarter with deep learning—A bibliographical analysis. IEEE Access. 2020;8:105587-609.

[7] Lin J, Zhu L, Chen WM, Wang WC, Han S. Tiny machine learning: progress and futures. IEEE Circuits Syst Mag. 2023;23(3):8-34.

[8] Banbury CR, Reddi VJ, Lam M, Fu W, Fazel A, Holleman J, et al. Benchmarking TinyML systems: challenges and direction. arXiv [Preprint]. 2021; arXiv:2003.04821. Available from: https://arxiv.org/abs/2003.04821

[9] Zennaro M, Nduati R, Masera M, Nkenyereye L. Machine learning on low-power embedded devices for the African context: a review. IEEE Access. 2022;10:21450-62.

[10] David R, Duke J, Jain A, Reddi VJ, Jeffries N, Li J, et al. TensorFlow Lite Micro: embedded machine learning for TinyML systems. Proc Mach Learn Syst. 2021;3:800-11.

[11] Ramírez-Hernández A, Uchoa F, de Azevedo Serpa MC, Binder LC, Rodrigues AC, Szabó MPJ, et al. Clinical and serological evaluation of capybaras (Hydrochoerus hydrochaeris) successively exposed to an Amblyomma sculptum-derived strain of Rickettsia rickettsii. Sci Rep. 2020;10(1):924.

[12] Lessa DAM, Moreira-Soto A, Ramos DGS, Krawczak FS, Pacheco TA, Martins MM, et al. Brazilian Spotted Fever: A re-emerging public health threat. Front Public Health. 2021;9:638000.

[13] Labruna MB. Ecology of Rickettsiain South America. Ann N Y Acad Sci. 2009;1166:156-66.

[14] SINAN/SVS/MS. Sistema de Informação de Agravos de Notificação: Febre Maculosa Brasileira. Ministério da Saúde do Brasil; 2023 [cited 2026 Apr 14]. Available from: https://portalsinan.saude.gov.br

[15] Torralba A, Efros AA. Unbiased look at dataset bias. Proc IEEE Comput Soc Conf Comput Vis Pattern Recognit. 2011:1521-8.

[16] Hymel S, Banbury CR, Situnayake D, Elium A, Ward C, Kelcey M, et al. Edge Impulse: an MLOps platform for tiny machine learning. arXiv [Preprint]. 2022; arXiv:2212.03332. Available from: https://arxiv.org/abs/2212.03332

[17] Raschka S. Model evaluation, model selection, and algorithm selection in machine learning. arXiv [Preprint]. 2020; arXiv:1811.12808. Available from: https://arxiv.org/abs/1811.12808

[18] Shahinfar S, Meek P, Falzon G. “How many images do I need?” Understanding how sample size per class affects deep learning model performance metrics for balanced designs in autonomous wildlife monitoring. Ecol Inform. 2020;57:101085.

[19] Yadav S, Bhole GP. Handling imbalanced dataset classification in machine learning. 2020 IEEE Pune Sect Int Conf (PuneCon). 2020:1-6.

[20] Kingma DP, Ba J. Adam: A method for stochastic optimization. arXiv [Preprint]. 2015; arXiv:1412.6980. Available from: https://arxiv.org/abs/1412.6980

[21] Chowdhery A, Warden P, Shlens J, Howard A, Rhodes R. Visual Wake Words Dataset. arXiv [Preprint]. 2019; arXiv:1906.05721. Available from: https://arxiv.org/abs/1906.05721

[22] Espressif Systems. ESP32-CAM: Technical Reference Manual. Espressif Systems Co., Ltd.; 2023.

Copyright

© 2026 by the author(s).
This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution-NonCommercial-NoDerivatives (CC BY-NC-ND) license, which permits non-commercial use, distribution, and reproduction in any medium, provided the original work is properly cited and is not modified or adapted.
https://creativecommons.org/licenses/by-nc-nd/4.0/

How to cite this paper

TinyML-based Image Recognition for Real-time Capybara Detection on Resource-constrained Embedded Hardware in Precision Livestock Farming

How to cite this paper: Tung Chiun Wen, Fabiano Gregolin, Késia Oliveira da Silva Miranda, Luana Maria Benicio, Miguel Ângelo Cyrillo Narbot. (2026) TinyML-based Image Recognition for Real-time Capybara Detection on Resource-constrained Embedded Hardware in Precision Livestock Farming. International Journal of Food Science and Agriculture10(1), 40-51.

DOI: http://dx.doi.org/10.26855/ijfsa.2026.03.006