利用计算机视觉技术在Android和iOS应用程序上实时检测奶牛皮炎。

IF 1.3 Q3 AGRICULTURE, DAIRY & ANIMAL SCIENCE
Translational Animal Science Pub Date : 2025-02-05 eCollection Date: 2025-01-01 DOI:10.1093/tas/txae168
Agam Dwivedi, Marlee Henige, Kelly Anklam, Dörte Döpfer
{"title":"利用计算机视觉技术在Android和iOS应用程序上实时检测奶牛皮炎。","authors":"Agam Dwivedi, Marlee Henige, Kelly Anklam, Dörte Döpfer","doi":"10.1093/tas/txae168","DOIUrl":null,"url":null,"abstract":"<p><p>The aim of the study was to deploy computer vision models for real-time detection of digital dermatitis (DD) lesions in cows using Android or iOS mobile applications. Early detection of DD lesions in dairy cows is crucial for prompt treatment and animal welfare. Android and iOS apps could facilitate routine and early DD detection in cows' feet on dairy and beef farms. Upon detecting signs of DD, dairy farmers could implement preventive and treatment methods, including foot baths, topical treatment, hoof trimming, or quarantining cows affected by DD to prevent its spread. We applied transfer-learning to DD image data for 5 lesion classes, M0, M4H, M2, M2P, and M4P, on pretrained YOLOv5 model architecture using COCO-128 pretrained weights. The combination of localization loss, classification loss, and objectness loss was used for the optimization of prediction performance. The custom DD detection model was trained on 363 images of size 416 × 416 pixels and tested on 46 images. During model training, data were augmented to increase model robustness in different environments. The model was converted into TFLite format for Android devices and CoreML format for iOS devices. Techniques such as quantization were implemented to improve inference speed in real-world settings. The DD models achieved a mean average precision (mAP) of 0.95 on the test dataset. When tested in real-time, iOS devices resulted in Cohen's kappa value of 0.57 (95% CI: 0.49 to 0.65) averaged across the 5 lesion classes denoting the moderate agreement of the model detection with human investigators. The Android device resulted in a Cohen's kappa value of 0.38 (95% CI: 0.29 to 0.47) denoting fair agreement between model and investigator. Combining M2 and M2P classes and M4H and M4P classes resulted in a Cohen's kappa value of 0.65 (95% CI: 0.54 to 0.76) and 0.46 (95% CI: 0.35 to 0.57), for Android and iOS devices, respectively. For the 2-class model (lesion vs. non-lesion), a Cohen's kappa value of 0.74 (95% CI: 0.63 to 0.85) and 0.65 (95% CI: 0.52 to 0.78) was achieved for iOS and Android devices, respectively. iOS achieved a good inference time of 20 ms, compared to 57 ms on Android. Additionally, we deployed models on Ultralytics iOS and Android apps giving kappa scores of 0.56 (95% CI: 0.48 to 0.64) and 0.46 (95% CI: 0.37 to 0.55), respectively. Our custom iOS app surpassed the Ultralytics apps in terms of kappa score and confidence score.</p>","PeriodicalId":23272,"journal":{"name":"Translational Animal Science","volume":"9 ","pages":"txae168"},"PeriodicalIF":1.3000,"publicationDate":"2025-02-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC11829201/pdf/","citationCount":"0","resultStr":"{\"title\":\"Real-time digital dermatitis detection in dairy cows on Android and iOS apps using computer vision techniques.\",\"authors\":\"Agam Dwivedi, Marlee Henige, Kelly Anklam, Dörte Döpfer\",\"doi\":\"10.1093/tas/txae168\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<p><p>The aim of the study was to deploy computer vision models for real-time detection of digital dermatitis (DD) lesions in cows using Android or iOS mobile applications. Early detection of DD lesions in dairy cows is crucial for prompt treatment and animal welfare. Android and iOS apps could facilitate routine and early DD detection in cows' feet on dairy and beef farms. Upon detecting signs of DD, dairy farmers could implement preventive and treatment methods, including foot baths, topical treatment, hoof trimming, or quarantining cows affected by DD to prevent its spread. We applied transfer-learning to DD image data for 5 lesion classes, M0, M4H, M2, M2P, and M4P, on pretrained YOLOv5 model architecture using COCO-128 pretrained weights. The combination of localization loss, classification loss, and objectness loss was used for the optimization of prediction performance. The custom DD detection model was trained on 363 images of size 416 × 416 pixels and tested on 46 images. During model training, data were augmented to increase model robustness in different environments. The model was converted into TFLite format for Android devices and CoreML format for iOS devices. Techniques such as quantization were implemented to improve inference speed in real-world settings. The DD models achieved a mean average precision (mAP) of 0.95 on the test dataset. When tested in real-time, iOS devices resulted in Cohen's kappa value of 0.57 (95% CI: 0.49 to 0.65) averaged across the 5 lesion classes denoting the moderate agreement of the model detection with human investigators. The Android device resulted in a Cohen's kappa value of 0.38 (95% CI: 0.29 to 0.47) denoting fair agreement between model and investigator. Combining M2 and M2P classes and M4H and M4P classes resulted in a Cohen's kappa value of 0.65 (95% CI: 0.54 to 0.76) and 0.46 (95% CI: 0.35 to 0.57), for Android and iOS devices, respectively. For the 2-class model (lesion vs. non-lesion), a Cohen's kappa value of 0.74 (95% CI: 0.63 to 0.85) and 0.65 (95% CI: 0.52 to 0.78) was achieved for iOS and Android devices, respectively. iOS achieved a good inference time of 20 ms, compared to 57 ms on Android. Additionally, we deployed models on Ultralytics iOS and Android apps giving kappa scores of 0.56 (95% CI: 0.48 to 0.64) and 0.46 (95% CI: 0.37 to 0.55), respectively. Our custom iOS app surpassed the Ultralytics apps in terms of kappa score and confidence score.</p>\",\"PeriodicalId\":23272,\"journal\":{\"name\":\"Translational Animal Science\",\"volume\":\"9 \",\"pages\":\"txae168\"},\"PeriodicalIF\":1.3000,\"publicationDate\":\"2025-02-05\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC11829201/pdf/\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Translational Animal Science\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1093/tas/txae168\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"2025/1/1 0:00:00\",\"PubModel\":\"eCollection\",\"JCR\":\"Q3\",\"JCRName\":\"AGRICULTURE, DAIRY & ANIMAL SCIENCE\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Translational Animal Science","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1093/tas/txae168","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2025/1/1 0:00:00","PubModel":"eCollection","JCR":"Q3","JCRName":"AGRICULTURE, DAIRY & ANIMAL SCIENCE","Score":null,"Total":0}
引用次数: 0

摘要

该研究的目的是部署计算机视觉模型,使用Android或iOS移动应用程序实时检测奶牛的数字皮炎(DD)病变。早期发现奶牛DD病变对及时治疗和动物福利至关重要。安卓和iOS应用程序可以帮助在奶牛场和肉牛场对牛脚进行常规和早期的DD检测。在发现DD迹象后,奶农可以采取预防和治疗方法,包括足浴、局部治疗、修剪蹄毛或隔离受DD影响的奶牛,以防止其传播。我们使用COCO-128预训练权值,在预训练的YOLOv5模型架构上,对5个病灶类别(M0、M4H、M2、M2P和M4P)的DD图像数据进行迁移学习。结合定位损失、分类损失和目标损失对预测性能进行优化。自定义DD检测模型在363张416 × 416像素的图像上进行了训练,并在46张图像上进行了测试。在模型训练过程中,对数据进行扩充,以提高模型在不同环境下的鲁棒性。将模型转换为Android设备的TFLite格式和iOS设备的CoreML格式。实现了量化等技术来提高现实环境中的推理速度。DD模型在测试数据集上的平均精度(mAP)为0.95。当实时测试时,iOS设备在5个病变类别中平均得出的Cohen’s kappa值为0.57 (95% CI: 0.49至0.65),表明模型检测与人类研究者的结果中等一致。Android设备的Cohen’s kappa值为0.38 (95% CI: 0.29至0.47),表示模型与研究者之间的公平一致。结合M2和M2P类别以及M4H和M4P类别,Android和iOS设备的Cohen's kappa值分别为0.65 (95% CI: 0.54至0.76)和0.46 (95% CI: 0.35至0.57)。对于2类模型(病变与非病变),iOS和Android设备的Cohen's kappa值分别为0.74 (95% CI: 0.63至0.85)和0.65 (95% CI: 0.52至0.78)。iOS的推理时间为20毫秒,而Android为57毫秒。此外,我们在Ultralytics iOS和Android应用上部署了模型,kappa得分分别为0.56 (95% CI: 0.48至0.64)和0.46 (95% CI: 0.37至0.55)。我们的定制iOS应用在kappa得分和信心得分方面超过了Ultralytics的应用。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Real-time digital dermatitis detection in dairy cows on Android and iOS apps using computer vision techniques.

The aim of the study was to deploy computer vision models for real-time detection of digital dermatitis (DD) lesions in cows using Android or iOS mobile applications. Early detection of DD lesions in dairy cows is crucial for prompt treatment and animal welfare. Android and iOS apps could facilitate routine and early DD detection in cows' feet on dairy and beef farms. Upon detecting signs of DD, dairy farmers could implement preventive and treatment methods, including foot baths, topical treatment, hoof trimming, or quarantining cows affected by DD to prevent its spread. We applied transfer-learning to DD image data for 5 lesion classes, M0, M4H, M2, M2P, and M4P, on pretrained YOLOv5 model architecture using COCO-128 pretrained weights. The combination of localization loss, classification loss, and objectness loss was used for the optimization of prediction performance. The custom DD detection model was trained on 363 images of size 416 × 416 pixels and tested on 46 images. During model training, data were augmented to increase model robustness in different environments. The model was converted into TFLite format for Android devices and CoreML format for iOS devices. Techniques such as quantization were implemented to improve inference speed in real-world settings. The DD models achieved a mean average precision (mAP) of 0.95 on the test dataset. When tested in real-time, iOS devices resulted in Cohen's kappa value of 0.57 (95% CI: 0.49 to 0.65) averaged across the 5 lesion classes denoting the moderate agreement of the model detection with human investigators. The Android device resulted in a Cohen's kappa value of 0.38 (95% CI: 0.29 to 0.47) denoting fair agreement between model and investigator. Combining M2 and M2P classes and M4H and M4P classes resulted in a Cohen's kappa value of 0.65 (95% CI: 0.54 to 0.76) and 0.46 (95% CI: 0.35 to 0.57), for Android and iOS devices, respectively. For the 2-class model (lesion vs. non-lesion), a Cohen's kappa value of 0.74 (95% CI: 0.63 to 0.85) and 0.65 (95% CI: 0.52 to 0.78) was achieved for iOS and Android devices, respectively. iOS achieved a good inference time of 20 ms, compared to 57 ms on Android. Additionally, we deployed models on Ultralytics iOS and Android apps giving kappa scores of 0.56 (95% CI: 0.48 to 0.64) and 0.46 (95% CI: 0.37 to 0.55), respectively. Our custom iOS app surpassed the Ultralytics apps in terms of kappa score and confidence score.

求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
Translational Animal Science
Translational Animal Science Veterinary-Veterinary (all)
CiteScore
2.80
自引率
15.40%
发文量
149
审稿时长
8 weeks
期刊介绍: Translational Animal Science (TAS) is the first open access-open review animal science journal, encompassing a broad scope of research topics in animal science. TAS focuses on translating basic science to innovation, and validation of these innovations by various segments of the allied animal industry. Readers of TAS will typically represent education, industry, and government, including research, teaching, administration, extension, management, quality assurance, product development, and technical services. Those interested in TAS typically include animal breeders, economists, embryologists, engineers, food scientists, geneticists, microbiologists, nutritionists, veterinarians, physiologists, processors, public health professionals, and others with an interest in animal production and applied aspects of animal sciences.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信