Counting cattle Dataset: Supporting livestock Multi Objetct Tracking
Description
Abstract Livestock farming has made technological advancements in recent times; however, there is still much to improve, as AI and computer vision have not yet fully penetrated the area. Livestock farming involves many routine tasks that require automation for improved control over production processes. Although the scientific community has made significant efforts to support precision livestock farming in recent years, artificial intelligence-based solutions for livestock counting and management remain limited (Myat Noe et al., 2023). Myat Noe et al. (2023) proposed a method for counting black cattle counting using the YOLO (You Only Look Once) object detection framework, in combination with the Detectron2 segmentation model and the DeepSORT (Wojke, Bewley and Paulus, 2017) and StrongSORT (Du et al., 2023) Multi Object Tracking (MOT) solutions. The study highlights the challenges faced in supporting cattle tracking as MOT solutions generally target objects with distinctly visual features. In the context of cattle detection and tracking, the requirements are more demanding due to the high visual similarity in color and shape among individuals. As a result, additional effort is still required to support precision agriculture through cattle identification and monitoring. This includes the creation of custom datasets for livestock MOT since existing public repositories do not meet the specific needs of this application. Moreover, retraining the models and applying additional techniques in combination are still necessary to achieve more satisfactory results (Myat Noe et al., 2023). In this context, the present dataset provides a series of videos and ground truth information for tracking Brangus cattle in a ranch environment in Uruguay. The dataset maintains consistent bounding boxes and identifiers for individual animals, being specifically useful for evaluating the effectiveness of tracking algorithms in support of cattle monitoring through MOT metrics. DataRecords The dataset contains 10 preselected videos, totaling a recording time of 3.17 minutes and a total of 93 cattle. It is organized into folders, one containing the videos used for tracking and another folder containing the ground truth, which consists of a CSV file with the processed information and the video on which the analysis was performed. The detection values were stored in the mentioned CSV file, so they can be processed later. Each line represents a detection, with the following information per line: -The frame number corresponding to the detection -The identifier number corresponding to the detected object -The x-coordinate value of the top-left corner of the detected object -The y-coordinate value of the top-left corner of the detected object -The width of the bounding box -The height of the bounding box -The confidence of the detection Further information on dataset construction and organization available on the dataset description attached file.
Files
Steps to reproduce
Publicly available datasets for cattle detection are limited, and obtaining proprietary datasets to support tracking applications presents an even greater challenge. In this context, the development and validation of multiple object tracking (MOT) algorithms for livestock monitoring require the construction of a dedicated dataset tailored to the specific visual and behavioral characteristics of cattle. The present dataset encompasses a set of videos taken at 30 FPS (frames per second) with conventional mobile phone cameras at the "La Cordillera" ranch, located in the Northeast of Uruguay, specifically in the Rivera department. This ranch raises Brangus cattle, a breed characterized by animals with uniform coloration, typically either black or red. The videos were recorded in different locations and during various seasons of the year to ensure diverse lighting conditions and backgrounds. The videos were preprocessed to support both the animal counting and the use of traditional MOT metrics. The videos provided for animal counting provide, for each video, its length, resolution and the number of animals within the recording. The ground truth for MOT usage was constructed based on a 1920x1080 pixel video, 15 seconds in length, taken at Estancia La Cordillera. The video was divided into frames, resulting in 478 frames for analysis. This video, which is analyzed in more detail to study cattle trajectories, features a rocky background with diffuse patterns. The workflow for dataset construction encompasses the following steps: video acquisition, data preprocessing through Yolo-v8 and DeepSort and review of data annotations. The ground truth annotations were generated manually based on frame-by-frame analysis. Although an initial approximation of animal detection was obtained using the YOLOv8 model pre-trained on the COCO dataset, the DeepSORT algorithm was subsequently applied for object tracking and ID assignment for each individual animal. Manual corrections were then performed to adjust bounding boxes in cases of detection errors and to add annotations for animals not initially detected. Additionally, ID reassignment was necessary to ensure that each animal retained a consistent identifier throughout its trajectory in the video. From the total of 478 frames extracted through video segmentation, animal trajectories were analyzed, yielding 1,774 annotated trajectory lines for 8 animals—resulting in an average of 3.7 bounding boxes per frame.
Institutions
- Universidad Tecnologica del Uruguay