AnimalMotionViz: An interactive software tool for tracking and visualizing animal motion patterns using computer vision

Angelo L. De Castro , Jin Wang , Jessica G. Bonney-King , Gota Morota , Emily K. Miller-Cushon , Haipeng Yu
{"title":"AnimalMotionViz: An interactive software tool for tracking and visualizing animal motion patterns using computer vision","authors":"Angelo L. De Castro ,&nbsp;Jin Wang ,&nbsp;Jessica G. Bonney-King ,&nbsp;Gota Morota ,&nbsp;Emily K. Miller-Cushon ,&nbsp;Haipeng Yu","doi":"10.3168/jdsc.2024-0706","DOIUrl":null,"url":null,"abstract":"<div><div>Monitoring the movement patterns of dairy cattle can provide important insight into space utilization or space occupancy in a barn. Although several precision livestock technologies have been developed to record dairy cattle movements, there is a lack of open-source tools to track and visualize group-level cattle movement patterns. Therefore, we developed an open-source computer vision software tool, AnimalMotionViz, that allows users to track and visualize group-level dairy cattle movement patterns using motion maps. The software comes with an easy-to-use web-based graphical user interface built with the Python Dash package. It implements a set of background subtraction algorithms in the OpenCV package to track animal motion patterns in real time. The software processes each frame of the input video and identifies the background and foreground using these algorithms. Foreground objects are then subtracted from the background across all frames and cumulatively overlaid on an empty mask image created with the first frame of the input video to visualize the intensity or frequency of motion across different regions. The user can generate a space-use distribution map in an image and video, a core and full-range map in an image, and also track specific regional motion with a custom mask. The software also returns the top 3 peak intensity locations, the total percentage of regions used, and the within-quadrant percentage of regions used. In four 5-min sample videos, quadrants with peak intensity of space use, as identified using the software, aligned with quadrants where calves spent the greatest duration of time, according to continuous recording of behavior from video. The space-use distribution and core and full-range maps generated by AnimalMotionViz can be used to understand space utilization or space occupation by dairy cattle, as well as to assess how space allocation affects their movement. Although AnimalMotionViz was developed to analyze dairy cattle data, its design provides the potential for broader application in studying the movement patterns of other animal species. We conclude that the newly developed AnimalMotionViz is a user-friendly and efficient tool to support research developments in precision livestock farming toward enhancing cattle management practices and improving pen designs.</div></div>","PeriodicalId":94061,"journal":{"name":"JDS communications","volume":"6 3","pages":"Pages 416-421"},"PeriodicalIF":0.0000,"publicationDate":"2025-05-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"JDS communications","FirstCategoryId":"1085","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S2666910225000183","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Monitoring the movement patterns of dairy cattle can provide important insight into space utilization or space occupancy in a barn. Although several precision livestock technologies have been developed to record dairy cattle movements, there is a lack of open-source tools to track and visualize group-level cattle movement patterns. Therefore, we developed an open-source computer vision software tool, AnimalMotionViz, that allows users to track and visualize group-level dairy cattle movement patterns using motion maps. The software comes with an easy-to-use web-based graphical user interface built with the Python Dash package. It implements a set of background subtraction algorithms in the OpenCV package to track animal motion patterns in real time. The software processes each frame of the input video and identifies the background and foreground using these algorithms. Foreground objects are then subtracted from the background across all frames and cumulatively overlaid on an empty mask image created with the first frame of the input video to visualize the intensity or frequency of motion across different regions. The user can generate a space-use distribution map in an image and video, a core and full-range map in an image, and also track specific regional motion with a custom mask. The software also returns the top 3 peak intensity locations, the total percentage of regions used, and the within-quadrant percentage of regions used. In four 5-min sample videos, quadrants with peak intensity of space use, as identified using the software, aligned with quadrants where calves spent the greatest duration of time, according to continuous recording of behavior from video. The space-use distribution and core and full-range maps generated by AnimalMotionViz can be used to understand space utilization or space occupation by dairy cattle, as well as to assess how space allocation affects their movement. Although AnimalMotionViz was developed to analyze dairy cattle data, its design provides the potential for broader application in studying the movement patterns of other animal species. We conclude that the newly developed AnimalMotionViz is a user-friendly and efficient tool to support research developments in precision livestock farming toward enhancing cattle management practices and improving pen designs.
AnimalMotionViz:一个交互式软件工具,用于使用计算机视觉跟踪和可视化动物的运动模式
监测奶牛的运动模式可以为了解牛棚的空间利用或空间占用情况提供重要的见解。虽然已经开发了几种精确的牲畜技术来记录奶牛的运动,但缺乏开源工具来跟踪和可视化群体级牛的运动模式。因此,我们开发了一个开源的计算机视觉软件工具AnimalMotionViz,它允许用户使用运动地图跟踪和可视化群体级奶牛的运动模式。该软件带有一个易于使用的基于web的图形用户界面,该界面是用Python Dash包构建的。它在OpenCV包中实现了一套背景减法算法来实时跟踪动物的运动模式。软件处理输入视频的每一帧,并使用这些算法识别背景和前景。然后从所有帧的背景中减去前景对象,并累计覆盖在输入视频的第一帧创建的空掩模图像上,以可视化跨不同区域的运动强度或频率。用户可以在图像和视频中生成空间使用分布图,在图像中生成核心和全范围地图,还可以使用自定义掩码跟踪特定区域的运动。该软件还返回前3个峰值强度位置、使用区域的总百分比以及使用区域的象限内百分比。在4个5分钟的样本视频中,根据对视频行为的连续记录,使用软件确定的空间使用强度峰值象限与小牛花费最长时间的象限对齐。AnimalMotionViz生成的空间利用分布图和核心图和全范围图可以用来了解奶牛的空间利用或空间占用情况,以及评估空间分配如何影响奶牛的运动。虽然AnimalMotionViz是为了分析奶牛数据而开发的,但它的设计为研究其他动物物种的运动模式提供了更广泛的应用潜力。我们得出的结论是,新开发的AnimalMotionViz是一个用户友好且有效的工具,可支持精确畜牧业的研究发展,以加强牛的管理实践和改进猪圈设计。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
JDS communications
JDS communications Animal Science and Zoology
CiteScore
2.00
自引率
0.00%
发文量
0
×
引用
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学术文献互助群
群 号:604180095
Book学术官方微信