A Weight Monitoring Platform for Small Ruminants Using U-Net and EfficientNetB1

  • Rafael L. Araújo UFPI / IFPI
  • Júlio V. M. Marques UFPI
  • Anthony I. M. Luz UFPI
  • Marina C. M. Santos UFPI
  • João dos Santos Neto UFPI
  • Alcilene D. de Sousa UFPI
  • Frank C. L. Veras UFPI
  • Antônio O. de Carvalho Filho UFPI
  • Romuere R. V. e Silva UFPI

Abstract


The raising of goats and sheep on small farms in Brazil faces challenges in monitoring animal weight due to the lack of precise scales, which are essential for proper nutritional and health management. This study proposes a web-based system for the automatic and non-invasive estimation of small ruminants’ body weight. Developed with open-source technologies such as Django and SQLite, the system employs deep learning with U-Net for animal segmentation, EfficientNetB1 for feature extraction, and regression models for weight prediction. A total of 203 images from 42 animals were evaluated, with promising results: Dice score of 97.7 for segmentation, MAE of 2.65, RMSE of 4.20, and R² of 0.81 for regression. The solution offers competitive performance and low cost, made possible by using a standard camera and free software.

References

Abadi, M. et al. (2016). Tensorflow: A system for large-scale machine learning. In OSDI.

ABIEC (2022). Beef report – brazilian livestock profile. [link].

Allen, T. et al. (2024). Django rest framework simple jwt. [link].

Araújo, R. L., Araújo, F. H. d., and Silva, R. R. e. (2022). Automatic segmentation of melanoma skin cancer using transfer learning and fine-tuning. Multimedia Systems, 28(4):1239–1250.

Chollet, F. (2017). Xception: Deep learning with depthwise separable convolutions. arXiv preprint arXiv:1610.02357.

Chollet, F. et al. (2015). Keras. [link].

Christie, T. and Gibson, C. (2024). Django rest framework. [link].

de LUCENA, C. and GUIMARAES, V. (2018). Boletim do centro de inteligência e mercado de caprinos e ovinos.

Dickinson, R., Morton, J., Beggs, D., Anderson, G., Pyman, M., Mansell, P., and Blackwood, C. (2013). An automated walk-over weighing system as a tool for measuring liveweight change in lactating dairy cows. Journal of dairy science, 96(7):4477–4486.

DROVERS (2020). World cattle inventory: Ranking of countries (fao).

He, C., Qiao, Y., Mao, R., Li, M., and Wang, M. (2023). Enhanced litehrnet based sheep weight estimation using rgb-d images. Computers and Electronics in Agriculture, 206:107667.

Iakubovskii, P. (2019). Segmentation models. [link].

Klivans, A., Kothari, P. K., and Meka, R. (2018). Efficient algorithms for outlier-robust regression. In Conference On Learning Theory, pages 1420–1430. PMLR.

Kreibich, J. A. (2010). Using SQLite. O’Reilly Media, Inc.

Liu, D., He, D., and Norton, T. (2020). Automatic estimation of dairy cattle body condition score from depth image using ensemble model. biosystems engineering, 194:16–27.

Martins, B., Mendes, A., Silva, L., Moreira, T., Costa, J., Rotta, P., Chizzotti, M., and Marcondes, M. (2020). Estimating body weight, body condition score, and type traits in dairy cows using three dimensional cameras and manual body measurements. Livestock science, 236:104054.

Menesatti, P., Costa, C., Antonucci, F., Steri, R., Pallottino, F., and Catillo, G. (2014). A low-cost stereovision system to estimate size and weight of live sheep. Computers and Electronics in Agriculture, 103:33–38.

NÓBREGA, A. and VERGNE, M. (2018). Novo censo agropecuário mostra crescimento de efetivo de caprinos e ovinos no nordeste. Embrapa Ovinos e Caprinos.

of Geography, I. B. I. and Statistics (2018). Municipal livestock production. 2018.

Oliveira, T. M., Sarmento, J. L., Figueiredo Filho, L. A., and Silva, R. R. (2021). Segmentaçao de imagens de ultrassonografia da carcaça em pequenos ruminantes utilizando deep learning. In Anais do XIV Encontro Unificado de Computação do Piauí e XI Simpósio de Sistemas de Informação, pages 144–151. SBC.

Pedregosa, F. et al. (2011). Scikit-learn: Machine learning in python. Journal of Machine Learning Research, 12:2825–2830.

Ronneberger, O., Fischer, P., and Brox, T. (2015). U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer-assisted intervention, pages 234–241. Springer.

Sabbioni, A., Beretti, V., Superchi, P., and Ablondi, M. (2020). Body weight estimation from body measures in cornigliese sheep breed. Italian Journal of Animal Science, 19(1):25–30.

Samperio, E., Lidón, I., Rebollar, R., Castejón-Limas, M., and Álvarez-Aparicio, C. (2021). Lambs’ live weight estimation using 3d images. Animal, 15(5):100212.

Sant’Ana, D. A., Pache, M. C. B., Martins, J., Soares, W. P., de Melo, S. L. N., Garcia, V., de Moares Weber, V. A., da Silva Heimbach, N., Mateus, R. G., and Pistori, H. (2021). Weighing live sheep using computer vision techniques and regression machine learning. Machine Learning with Applications, 5:100076.

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

Song, X., Bokkers, E., Van der Tol, P., Koerkamp, P. G., and Van Mourik, S. (2018). Automated body weight prediction of dairy cows using 3-dimensional vision. Journal of Dairy Science, 101(5):4448–4459.

Szegedy, C., Ioffe, S., Vanhoucke, V., and Alemi, A. (2017). Inception-v4, inception-resnet and the impact of residual connections on learning. arXiv preprint arXiv:1602.07261.

Tan, M. and Le, Q. V. (2019). Efficientnet: Rethinking model scaling for convolutional neural networks. arXiv preprint arXiv:1905.11946.

Vincent, W. S. (2018). Django for Beginners. Independently published.

Zhang, A. L., Wu, B. P., Wuyun, C. T., Jiang, D. X., Xuan, E. C., and Ma, F. Y. (2018). Algorithm of sheep body dimension measurement and its applications based on image analysis. Computers and Electronics in Agriculture, 153:33–45.
Published
2025-09-29
ARAÚJO, Rafael L. et al. A Weight Monitoring Platform for Small Ruminants Using U-Net and EfficientNetB1. In: NATIONAL MEETING ON ARTIFICIAL AND COMPUTATIONAL INTELLIGENCE (ENIAC), 22. , 2025, Fortaleza/CE. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2025 . p. 201-212. ISSN 2763-9061. DOI: https://doi.org/10.5753/eniac.2025.12277.

Most read articles by the same author(s)