Luara A. Freitas , Rafael E.P. Ferreira , Anderson A.C. Alves , João R.R. Dórea , Claudia C.P. Paz , Guilherme J.M. Rosa
{"title":"Detection of anemic sheep using ocular conjunctiva images and deep learning algorithms","authors":"Luara A. Freitas , Rafael E.P. Ferreira , Anderson A.C. Alves , João R.R. Dórea , Claudia C.P. Paz , Guilherme J.M. Rosa","doi":"10.1016/j.livsci.2025.105669","DOIUrl":null,"url":null,"abstract":"<div><div>In sheep, severe anemia often results from gastrointestinal nematode infections, commonly caused by <em>Haemonchus contortus</em>, a blood-sucking nematode. The objective of this study was to develop a model to predict packed cell volume (PCV) in sheep through ocular conjunctiva images as a real-time anemia diagnosis approach. The dataset consisted of 3,441 ocular conjunctiva images collected from 392 sheep from three different farms using a smartphone camera. To identify the region of interest in the images (ocular conjunctiva), we annotated 480 images using the Segment Anything Model (SAM). Subsequently, we employed an image segmentation algorithm based on U-net, utilizing the original images and annotations obtained from SAM. We then cropped the segmented images to retain only the ocular conjunctiva region. These cropped and segmented images were used as input data, with PCV as the target variable, in both regression and classification models. We assessed the performance of three different deep neural network (DNN) architectures: VGG19, Inception v3, and Xception. For the classification tasks, a threshold of 27 % (anemic < 27 %, non-anemic ≥ 27 %) was used to convert PCV into a binary variable. The dataset was split into training, validation, and testing sets using random sampling by sheep. The segmentation was evaluated using intersection over union (IoU). To compare the predictive quality in the testing set, we computed the R<sup>2</sup>, Concordance Correlation Coefficient (CCC), and Root Mean Square Error of Prediction (RMSEP) for the regression models, and the accuracy, precision, recall, and <em>F</em><sub>1</sub> score for the classification tasks. The U-net segmentation model demonstrated reliable segmentation ability, with an average IoU of 0.93, 0.84, and 0.68 in the training, validation, and testing sets, respectively. For regression, the Xception architecture provided the best performance with an R<sup>2</sup> of 0.24. For the classification models, VGG19 outperformed the other models in classifying individuals as anemic or non-anemic, achieving an <em>F</em><sub>1</sub> score of 0.62, indicating its moderate ability to distinguish between these two classes. This innovative approach not only expands the possibilities for integrated high-throughput phenotyping through computer vision, but also aids in identifying anemic animals. The results suggest that integrating ocular conjunctiva images with DNN algorithms can contribute to supporting farm-level management decisions, and potentially reduce economic losses due to parasitic infections like <em>H. contortus</em>. Furthermore, this approach not only facilitates real-time anemia diagnosis but also optimizes the use of blood tests, potentially reducing associated costs.</div></div>","PeriodicalId":18152,"journal":{"name":"Livestock Science","volume":"294 ","pages":"Article 105669"},"PeriodicalIF":1.8000,"publicationDate":"2025-02-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Livestock Science","FirstCategoryId":"97","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S1871141325000320","RegionNum":3,"RegionCategory":"农林科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"AGRICULTURE, DAIRY & ANIMAL SCIENCE","Score":null,"Total":0}
引用次数: 0
Abstract
In sheep, severe anemia often results from gastrointestinal nematode infections, commonly caused by Haemonchus contortus, a blood-sucking nematode. The objective of this study was to develop a model to predict packed cell volume (PCV) in sheep through ocular conjunctiva images as a real-time anemia diagnosis approach. The dataset consisted of 3,441 ocular conjunctiva images collected from 392 sheep from three different farms using a smartphone camera. To identify the region of interest in the images (ocular conjunctiva), we annotated 480 images using the Segment Anything Model (SAM). Subsequently, we employed an image segmentation algorithm based on U-net, utilizing the original images and annotations obtained from SAM. We then cropped the segmented images to retain only the ocular conjunctiva region. These cropped and segmented images were used as input data, with PCV as the target variable, in both regression and classification models. We assessed the performance of three different deep neural network (DNN) architectures: VGG19, Inception v3, and Xception. For the classification tasks, a threshold of 27 % (anemic < 27 %, non-anemic ≥ 27 %) was used to convert PCV into a binary variable. The dataset was split into training, validation, and testing sets using random sampling by sheep. The segmentation was evaluated using intersection over union (IoU). To compare the predictive quality in the testing set, we computed the R2, Concordance Correlation Coefficient (CCC), and Root Mean Square Error of Prediction (RMSEP) for the regression models, and the accuracy, precision, recall, and F1 score for the classification tasks. The U-net segmentation model demonstrated reliable segmentation ability, with an average IoU of 0.93, 0.84, and 0.68 in the training, validation, and testing sets, respectively. For regression, the Xception architecture provided the best performance with an R2 of 0.24. For the classification models, VGG19 outperformed the other models in classifying individuals as anemic or non-anemic, achieving an F1 score of 0.62, indicating its moderate ability to distinguish between these two classes. This innovative approach not only expands the possibilities for integrated high-throughput phenotyping through computer vision, but also aids in identifying anemic animals. The results suggest that integrating ocular conjunctiva images with DNN algorithms can contribute to supporting farm-level management decisions, and potentially reduce economic losses due to parasitic infections like H. contortus. Furthermore, this approach not only facilitates real-time anemia diagnosis but also optimizes the use of blood tests, potentially reducing associated costs.
期刊介绍:
Livestock Science promotes the sound development of the livestock sector by publishing original, peer-reviewed research and review articles covering all aspects of this broad field. The journal welcomes submissions on the avant-garde areas of animal genetics, breeding, growth, reproduction, nutrition, physiology, and behaviour in addition to genetic resources, welfare, ethics, health, management and production systems. The high-quality content of this journal reflects the truly international nature of this broad area of research.