Evaluation of two computer vision approaches for grazing dairy cow identification
Abstract
Computer vision is being used in Precision Livestock Farming to monitor and analyze animal health, behavior, and productivity. However, the implementation of these technologies faces technical challenges that require collaboration between farmers, researchers, and technology providers. In this study, the performance of two different grazing dairy cow identification approaches was compared using a ResNet-based computer vision model. The first approach consisted of image classification, while the second approach was based on the comparison of features or embeddings. The YOLOv5 model was used to detect and classify cows in images captured with three high-definition cameras on a dairy farm. A database consisting of two main folders: "TRAIN" and "TEST" was generated based on 19 Holstein dairy cows. Each folder contains 19 subfolders numbered from 001 to 019, corresponding to each cow. The approaches for the identification of cows were trained and validated using 4740 and 2256 images, respectively. FastAI was used for training the ResNet50 model in the first approach and the open-source PyTorch ReID project in the second. Validation tests of the models trained with the approaches were performed and the results were compared using a confusion matrix and five performance metrics. The results indicate that the embedding comparison approach performed significantly better in all validation tests compared to the image classification approach. This suggests that the embedding comparison approach is a more robust and accurate technique for the identification of Holstein cows under diverse conditions, which has great potential for its application in the implementation of automated monitoring systems for dairy farms. In summary, this study shows that computer vision is a valuable tool to improve the productivity and health of animals in Precision Farming.
Downloads
Disciplines:
Agricultural and livestock sciences, Animal Sciences, Precision Livestock FarmingLanguages:
English, SpanishReferences
ALBAWI, SAAD; MOHAMMED, TAREQ-ABED; AL-ZAWI, SAAD. Understanding of a convolutional neural network. in 2017 IEEE International conference on engineering and technology (ICET) (Antalya, Turkey, 2017). Memorias, Antalya (Turkey): 2017. p. 1-6.http://doi.org/10.1109/ICEngTechnol.2017.8308186
BAO, JUN; XIE, QIUJU. Artificial intelligence in animal farming: A systematic literature review. Journal of Cleaner Production, v. 331, 2022, p.129956.https://doi.org/10.1016/j.jclepro.2021.129956
FAN, XING; JIANG, WEI; LUO, HAO; FEI, MENGJUAN. Spherereid: Deep hypersphere manifold embedding for person re-identification. Journal of Visual Communication and Image Representation, v. 60, 2019, p. 51-58.https://doi.org/10.1016/j.jvcir.2019.01.010
GARCÍA, RODRIGO; AGUILAR, JOSE; TORO, MAURICIO; PINTO, ANGEL; RODRÍGUEZ, PAUL. A systematic literature review on the use of machine learning in precision livestock farming. Computers and Electronics in Agriculture, v. 179, 2020, p. 105826.https://doi.org/10.1016/j.compag.2020.105826
GOLLAPUDI, SUNILA. Artificial intelligence and computer vision. Learn Computer Vision Using OpenCV: With Deep Learning CNNs and RNNs, 2019, p. 1-29.http://doi.org/10.1007/978-1-4842-4261-2_1
Google Colaboratory. (2022). https://colab.research.google.com/notebooks/intro.ipynb
He, K., Zhang, X., Ren, S., & Sun, J. Deep residual learning for image recognition. In Proceedings of the 2016 IEEE conference on computer vision and pattern recognition (CVPR), (Las Vegas, USA, 2016). Memorias, Las Vegas (USA): 2016, p. 770-778.http://doi.org/10.1109/CVPR.2016.90
HOSTIUO, NATHALIE; FAGO, JOCELYN; CHAUVAT, SOPHIE; TURLOT, AMÉLIE; KLING-EVEILLARD, FLORENCE; BOIVIN, XAVIER; ALLAIN, CLÉMENT. Impact of precision livestock farming on work and human-animal interactions on dairy farms. A review. Bioscience, Biotechnology and Biochemistry, v. 21,n. 4, 2017, p. 1-8.http://doi.org/10.25518/1780-4507.13706
HOWARD, JEREMY; GUGGER, SYLVAIN. Fastai: A layered API for deep learning. Information, v. 11, n. 2, 2020, p. 108.https://doi.org/10.3390/info11020108
HU, WEI-JIAN; FAN, JIE; DU, YONG-XING; LI, BAO-SHAN; XIONG, NAIXUE; BEKKERING, ERNST. MDFC–ResNet: an agricultural IoT system to accurately recognize crop diseases. IEEE Access, v. 8, 2020, p. 115287- 115298.http://doi.org/10.1109/ACCESS.2020.3001237
JAFAR, ABBAS; LEE, MYUNGHO. High-speed hyperparameter optimization for deep ResNet models in image recognition. Cluster Computing, 2021, p. 1-9.https://doi.org/10.1007/s10586-021-03284-6
KUMAR, SANTOSH; SINGH, SANJAY-KUMAR. Automatic identification of cattle using muzzle point pattern: a hybrid feature extraction and classification paradigm. Multimedia Tools and Applications, v. 76, 2017, p. 26551-26580.https://doi.org/10.1007/s11042-016-4181-9
KUMAR, SANTOSH; TIWARI, SHRIKANT; SINGH, SANJAY-KUMAR. Face recognition for cattle. In 2015 IEEE Third International Conference on Image Information Processing (ICIIP) (Waknaghat, India, 2015). Memorias, Waknaghat (India): 2015, p. 65-72.https://doi.org/10.1109/ICIIP.2015.7414742
LEE, MINGYUNG, SEO, SEONGWON. Wearable wireless biosensor technology for monitoring cattle: A review. Animals, v. 11, n.10, 2021, p. 2779.https://doi.org/10.3390%2Fani11102779
LOVARELLI, DANIELA; BACENETTI, JACOPO; GUARINO, MARCELLA. A review on dairy cattle farming: Is precision livestock farming the compromise for an environmental, economic and social sustainable production?. Journal of Cleaner Production, v. 262, 2020, p. 121409.https://doi.org/10.1016/j.jclepro.2020.121409
LU, XIN; KANG, XIN; NISHIDE, SHUN; REN, FUJI. Object detection based on SSD-ResNet. In 2019 IEEE 6th International Conference on Cloud Computing and Intelligence Systems (CCIS) (Singapore, 2019). Memorias, Singapore: 2019, p. 89-92.https://doi.org/10.1109/CCIS48116.2019.9073753
MAHAJAN, ARPANA; CHAUDHARY, SANJAY. (2019, June). Categorical image classification based on representational deep network (RESNET). In 2019 IEEE 3rd International conference on Electronics, Communication and Aerospace Technology (ICECA) (Coimbatore, India, 2019). Memorias, Coimbatore (India): 2019, p. 327-330.http://doi.org/10.1109/ICECA.2019.8822133
MANTILLA-GONZÁLEZ, JUAN-MIGUEL, DUQUE-DAZA, CARLOS-ALBERTO; GALEANO-URUEÑA, CARLOS-HUMBERTO. Análisis del esquema de generación distribuida como una opción para el sistema eléctrico colombiano. Revista Facultad de Ingeniería Universidad de Antioquia, v. 44, 2008, p. 97-110.
MCKINNEY, WES. Data structures for statistical computing in python. In Proceedings of the 9th Python in Science Conference v. 445, n. 1, 2010, p. 51-56.http://doi.org/10.25080/Majora-92bf1922-00a
NEETHIRAJAN, SURESH; KEMP, BAS. Digital livestock farming. Sensing and Bio-Sensing Research, v. 32, 2021, p. 100408.
https://doi.org/10.1016/j.sbsr.2021.100408
OKURA, FUMIO; IKUMA, SAYA; MAKIHARA, YASUSHI; MURAMATSU, DAIGO; NAKADA, KEN; YAGI, YASUSHI. RGB- D video-based individual identification of dairy cows using gait and texture analyses. Computers and Electronics in Agriculture, v. 165, 2019, p. 104944.https://doi.org/10.1016/j.compag.2019.104944
PEDREGOSA, FABIAN; VAROQUAUX, GAEL; GRAMFORT, ALEXANDRE; MICHEL, VINCENT; THIRION, BERTRAND; GRISEL, OLIVIER; BLONDEL, MATHIEU; PRETTENHOFER, PETER; WEISS, RON; DUBOURG, VINCENT; VANDERPIAS, JAKE; PASSOS, ALEXANDRE; COURNAPEAU, DAVID; BRUCHER, MATTHIEU; DUCHESNAY, MATTHIEU-PERROT-ÉDOUARD. Scikit-learn: Machine learning in Python. the Journal of machine Learning research, v. 12, 2011, p. 2825-2830.
PENG, SHUAI; HUANG, HONGBO; CHEN, WEIJUN; ZHANG, LIANG; FANG, WEIWEI. More trainable inception- ResNet for face recognition. Neurocomputing, v. 411, 2020, p. 9-19.http://doi.org/10.1016/j.neucom.2020.05.022
RABAH, KEFA. Convergence of AI, IoT, big data and blockchain: a review. The lake institute Journal, v. 1, n. 1, 2018, p. 1-18.
RUIZ- MARTÍNEZ, IRUNE; ESPARCIA, JAVIER. Internet access in rural areas: brake or stimulus as post-Covid-19 opportunity?. Sustainability, v. 12, n. 22, 2020, p. 9619.https://doi.org/10.3390/su12229619
RUMELHART, DAVID; HINTON, GEOFFREY; WILLIAMS, RONALD. Learning representations by back-propagating errors. Nature, v. 323, 1986, p. 533-536.https://doi.org/10.1038/323533a0
SCHILLINGS, JULIETTE; BENNETT, RICHARD; ROSE, DAVID-CHRISTIAN. Exploring the potential of precision livestock farming technologies to help address farm animal welfare. Frontiers in Animal Science, v. 2, 2021.http://doi.org/10.3389/fanim.2021.639678
UNITED NATIONS. Objetivos y metas de desarrollo sostenible. https://www.un.org/sustainabledevelopment/es/objetivos-de-desarrollo- sostenible/
WIJERATHNA-YAPA, AKILA; PATHIRANA, RANJITH. Sustainable Agro-Food Systems for Addressing Climate Change and Food Security. Agriculture, v. 12, n. 10, 2022, p. 1554.https://doi.org/10.3390/agriculture12101554
ZHANG, CHAO; ZHOU, GUANGHUI. A view-based 3D CAD model reuse framework enabling product lifecycle reuse. Advances in Engineering Software, v. 127, 2019, p. 82-89.http://doi.org/10.1016/j.advengsoft.2018.09.001
ZHOU, TAO; LIU, YUNCAN; LU, HUILING; YE, XINYU; CHANG, XIAOYU. ResNet and its application to medical image processing: research Progress and challenges. 电子与信息学报, v. 44, n. 1, 2022, p. 149-167.https://doi.org/10.11999/JEIT21091
Copyright (c) 2023 Universidad del Cauca

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
Spanish
English


















.png)


