Introduction #
The authors of the Cows2021 Dataset feature identity annotations of the Holstein-Friesian cattle on a large scale. Additionally, they present a pioneering self-supervision framework tailored for the video-based identification of individual animals. Cows2021 encompasses an extensive collection of 10,402 RGB images, each meticulously labeled with both localization and identity information. Furthermore, the dataset incorporates 301 videos obtained from the same cattle herd. These videos provide top-down in-barn imagery, adept at capturing the distinctive black and white coat patterns characteristic of this breed. Note, that the present version of the dataset at datasetninja has only images.
Given the substantial labeling effort typically required for the development of visual cattle identification systems, the authors propose a novel approach. They leverage the temporal consistency in coat pattern appearance across videos as a self-supervision signal for learning animal identities. To facilitate this, they employ an individual-agnostic cattle detector that produces oriented bounding boxes. These boxes are then used to form rotation-normalized tracklets for individual cattle through a tracking-by-detection process, further enhanced by augmentations. This process generates a “positive” sample set for each tracklet, which is subsequently paired with a “negative” set randomly sampled from other videos featuring different cattle. The authors then employ frame-triplet contrastive learning to construct a metric latent space for identity learning.
The Cows2021 features 186 Holstein-Friesian cattle and was captured using an Intel D435 camera at the University of Bristol’s Wyndhurst Farm in Langford Village, UK. The camera was positioned 4 meters above the ground, overlooking a walkway connecting the milking parlour and holding pens. Recordings, triggered by motion, spanned a month after milking sessions.
The dataset provides images with a resolution of 1280 x 720 pixels per frame, utilizing 8 bits per RGB channel. It encompasses a total of 10,402 still images and 301 videos, each with a duration of 5.5 seconds and a frame rate of 30 frames per second. The distribution of still images across individuals and time aligns with the natural operation of the farm. Additionally, the dataset includes various expert-generated ground truth annotations.
For cattle torso annotations, adhering to VOC 2012 guidelines for object annotation, all visible cattle torso instances were manually labeled, excluding the head, neck, legs, and tail. Torso instances with significant clipping were tagged as “clipped” and excluded from further analysis.
Regarding animal identity annotations, a total of 13,784 detected cattle instances were manually assigned to one of 182 individuals, with four all-black cows excluded from the identity study for future research. The number of occurrences for each individual cow_id varies, with a mean (µ) of 77.5 and a standard deviation (σ) of 39.9.
The dataset also includes video data with tracklet annotations. These tracklets, vital for self-supervision in identity learning, were generated by utilizing a highly reliable ID-agnostic cattle detector and employing tracking-by-detection techniques. The average number of tracklets per video is 1.45.
Summary #
Cows2021 Dataset is a dataset for object detection, identification, and self supervised learning tasks. It is used in the livestock industry.
The dataset consists of 42422 images with 13178 labeled objects belonging to 1 single class (cattle torso).
Images in the Cows2021 dataset have bounding box annotations. There are 32020 (75% of the total) unlabeled images (i.e. without annotations). There are 5 splits in the dataset: identification-train (23350 images), identification-test (8670 images), detection_and_localisation-train (7248 images), detection_and_localisation-test (2131 images), and detection_and_localisation-val (1023 images). Additionally, images in identification-test and identification-train splits contain information about cow_id. The dataset was released in 2021 by the University of Bristol.
![Dataset Poster](https://cdn.datasetninja.com/github/dataset-ninja/cows2021/main/visualizations/poster.png?width=1200)
Explore #
Cows2021 dataset has 42422 images. Click on one of the examples below or open "Explore" tool anytime you need to view dataset images with annotations. This tool has extended visualization capabilities like zoom, translation, objects table, custom filters and more. Hover the mouse over the images to hide or show annotations.
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/k/h/7F/snWb3HjciQiGxp5z0GpY5iPXUayJk0g5JYpgZvvIw8bWHgNZZl1MHKqml8AMl1n0tEfXSFnu1fFZ5RBnRiZPzSTTyKseGhCoEu8RcQIi0Va6zmcMNED6JvAh06rS.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/g/0/H5/LaXrc0I9zn5TgBa2UkFhqzb4txjAc2wA5Bcp9vYT9QMM6JGeFlHflTqO1xTrdjQOj8F77InNBH7KRKF9i0nZNIlG9OAivcEVz3zM2vLIxuVhN4IlvS6Ey2JHuIfZ.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/S/9/I2/bQgNMsTFxYeEwDs4sEtjOOw3UECVadfCzmENMX1ZxMabMmm1ah0TLssdxwI4doO8iAU4OzL5cpS0s1EbujnPx6szCaqxvSLUe3qhQyd0BfUefCergRUsW3wROUtg.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/X/i/c9/aL4fv70rDEFNYq15GciNUqWGPr742Hf1TZr41X4tO0syZ0lXE9FKLqyJBXjoclyANQaMs0GI8B1Lrsm3Wx8E8YiAM622XVHvAJ4WvQbt9UvHLcWFyCnRW90B8E60.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/v/N/FP/QeC4UPSFO2qvbDmTSvr42NzU1PHOiTZjsopLc2KcYnX6PVYXPjKi7JRonM4VROumt80ro7OdlWxkcw5bqz1MRAtwW63YlOruT4ltllDEbYD77ZU2Vlfrk3zC4Uh4.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/I/6/Mh/v3VHAPjbweOiHyujn2fDkwIN2iTuM1lBqqVqHkkDjLvtPbBIJWybyLWKAZuiCLZptp7EtBwaJYCvqrD6pk06cBEZ2ofX4bnDfdl25HIIx9sLSae6xUVADuxR1A1n.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/Y/w/XK/Z15NXAwqzOCS2V8tHSwYxucnQwI1OpwRIC8jPr7JPcnjutFwHNwiolufH4UevwfYEdZlmquCDa6axQvvrQGOq8GDiiz0uU1ZCtSno6wLbDGyO6TphwYnQ8dvZH3S.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/H/S/tA/FsDjBfmrL0GrmgI4bmSAUSOZSjzHuY3DUtiYgQSVUxooF927GbJCAZnOUHCKUP4zgLANMZ8407jFA8LvkRcUQP6w6tJlOhTfd4dcsYciiLfK8odAjNSpqM1jcrZj.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/D/1/kB/NUr2FaIxasK0iIyuw03MmOx1hllSLd0SoakZvFpPuSdgrp4gDGqj7ngwCNoyBe7NXAS97V5CKbVwRQcK0XbVNErSK2dY9rI5xwP2UJDMIu6OmJCX6dK6Im82TrKv.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/e/E/jE/4yQDixdwyiGKtvJ9A2tPLVF5JPokWTJevaLh3m1VWhJHqMCrjpeYr4mpEIge1jeT4natZkgt49ThuM0WmgzXEVYagtsVr9kjNa81JekjBsgJEXXWqyXC2qblejH8.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/V/m/SZ/hnqKsrNNp1UfmQWBFvQQRaNwsuhderqDOQmNXjtKqLjgymmjUB1jcQxcZch6gcaPAD8bZmNBeHKVljHu5Oh9lCMkA5Ceu8TDM2G3LNm6IgZ9Gd1sj5mgaiyvVoPn.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/q/P/eG/6t0x6vBEdOKtyJtbg7hRdquFHta25CyTYCBHPQhgSSeK2LpzGyxXSR3Kh159knGEHiOmS95Qn074yzOxhBtUGm4KdLedLtJDJ2sKoUh6tJ8f9seXLYeE4ziTq00c.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/b/M/lj/w67nF6Y15rQLFVJYAiiuQmCa7DhhF7D5t330QJuSsGpSN2o0ruKUdTXLq9ad50ufbrJN0Q74tbWZlMgGEY2Oeo5Gk1bk7YDUMHHz8hWcY51Yx6uaAPDugb7MC0RI.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/3/d/3K/jEEM8p07BK6ks4laRCYABuEV6dhL00dYXF7Mdqc5U147EQpW4AGcu1T37AKFrf0TwM1YMPy0s0LYvgMzjA4lCxgjpUDciYqA3QzscnJqfQELTe3aWJiV2XT5HT7A.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/9/b/si/2yMINa2ZyAQDRSW2GiSsE72sscDtz10cHGlC4F80q3kzCyGsGAnvnDww3K5OT066auwuT3oWqZhVSwdYKECIkdGrKSSPJbxYozpULItLOegMq73eafQXSv3Kf0nx.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/w/o/XV/fvfHAvttG2lrvBQZB5AsIrFw7AoNi9TqjdH1I72UiYX5faS7cVKJvqI740qMXALWpwgS4cjq9SsnldqzmCMDXR7jTinYhBgvjfh4GFTvdATNeRF8OBq54mZvfYz7.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/5/K/lT/mGROEizX5N2274CBxpBRYehIUBrTNXkOciVWJJsQttUu2gTVVxcXwyfthOIKWh9vcJ796mq2Euo259EOUOIFK81yFwvEDhaglglAv7EKTtjCp6VnQBBL1oWChVFD.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/l/h/Am/DtlUaLVQREcTc6iC7KnQ842o8sH5obC98IqjtzdZr7snbk27uPKkDBZAD0Jni520k34yUmVyigkKal7cHP29ET8JsvNO9U9S9LVVmoEVUrEJwjOBuuzcQ5DG3tG5.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/y/l/dL/cVog3nof7VrYJgXUOwEtn9Wg1rPT1ufUYngz76bH4TGwTRs4TExFFO53HOjvuTJuhCmEuc2d8NODhHtMBUbzw3y3E56KBuOE9BgvRy8URvrOevUkbd7q3aAgV7A6.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/P/q/93/dM9tpAOzeq9L6e2o8wFxV9nh2264I5hNCjJZPUIzZ16TXdrjHIlsAYRMHT3FQfFZoXF9U0CylKGul4JPqdzo6DMTNfBwIHit1eFp5AqBjlqQn4pTeiOJwaIXDWYo.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/W/F/Pg/eB0o92yMvIKhDIDOvByvy5fJiarmJevJIvZA2B67KX368OjYFe40lC9k7kvzjPCd1kWciYNTpmAFtCH6UyFxt5zgVOsZLEIwSgCeo0d2BD30Iim2rD1gwH5wkk0J.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/K/n/wg/SbRR9otZEbcvDTVYp2iOB7yjIu9q90Enc4itu8YGVupzuT8PYXyLEQUH6gs0TVwfKqljNEcCT6yIAErRlU5S304aaNppwMDk0Y6jx6ig1pOCYSebxFVldfuS4zzC.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/V/A/Nk/snNByg7MEcQY06fvUcBiWERmGz13JcgKbVIarfmSsM42O6IB9msiOoEGQVkkqrVQuBIowCaig4RxF9uCEsIMyg8ZxoEmmm8dGKszExB22Kc8C2n15MMKu6E0UYI0.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/l/Y/Xp/uxzhNAImebDFElDGq57tADJUFYIW0DRN5MdVOFJuoss0Qnof0gecoWSRTUFQ45UF4GCYaAb7Bb5GDJOKFyrgre4r21kZ3yoC9bQFjuD7chjREbViCpMoXxnWjVV6.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/u/v/l3/hSOkxLeV7D3fOyTKoO2TOtlW5YhxfZQv5DYqMwU0YtCpvjXa5T1C9M8iJMhqZibuhBi05xBqYVVFau7J5vfmLNDnkQtaB87S4mq2RpyMlnTnLPjlaqAqlx6BkgLB.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/6/a/dJ/JpcEg4nx1RISeAqceqJTNFgb1qi8L7daRpE36Hpdvy0H6kga0EZ9R5MElyWfIcFaFJBxqZUUnALBwNczZaKWI7jmkkRuYgfNxXJnjxzlFc1muhC9fdEVI2l0zYkD.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/h/A/7N/YyXsgL3Ckldig47EfE8R6ionAZfeoIShDoDnLO4rVPmOTxAO9kqEfvXK7vbH5qiQrt0z08ltFQ2kUx2ESTFiT7QcvhCC2OCtvlLLPGFI9uJ3SIhd9cROlaCgp7F7.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/x/0/Vo/H7vApe1mOe9cvoiuinRb7cb4joTcqGPL11Ogp13hDyJ2eL58eKvEUYcjhXhSsMGbyIwz807ls8IaqEwwEoVxIeoEhEnAtyUhHlkI8fwW1wL5Efh9KRKhBYwBFdOM.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/M/1/pl/prV5FOkq8naLEaHOc7G6Y0IH6jU7ZsjKQrZhBecDGHkZDGppZc2csFsHH1uV6LYqUsA2Mu4zijPFYTAL9jUxSuXhABfvXO1Ur6Qlwxvon52B0saZqs4uuVcrwV0R.jpg)
![Sample image from Cows2021](https://cdn.datasetninja.com/previews/q/ext:jpeg/resize:fill:400:0:0/q:70/plain/supervisely-supervisely-assets-public/images/original/8/D/rq/G0kojTXXksww8RLqhtVRqIC0sB4DngjX90VZKI8hTaRYOQPvUoPieC9tRwpeJBNXD0y1rzn2ZO8O4mvMSyFip71VnqMOMH9XFt6HqlOwQZSRDMoIhr3NCnCFkxDi.jpg)
Class balance #
There are 1 annotation classes in the dataset. Find the general statistics and balances for every class in the table below. Click any row to preview images that have labels of the selected class. Sort by column to find the most rare or prevalent classes.
Class ㅤ | Images ㅤ | Objects ㅤ | Count on image average | Area on image average |
---|---|---|---|---|
cattle torso➔ rectangle | 10402 | 13178 | 1.27 | 15.66% |
Images #
Explore every single image in the dataset with respect to the number of annotations of each class it has. Click a row to preview selected image. Sort by any column to find anomalies and edge cases. Use horizontal scroll if the table has many columns for a large number of classes in the dataset.
Object distribution #
Interactive heatmap chart for every class with object distribution shows how many images are in the dataset with a certain number of objects of a specific class. Users can click cell and see the list of all corresponding images.
Class sizes #
The table below gives various size properties of objects for every class. Click a row to see the image with annotations of the selected class. Sort columns to find classes with the smallest or largest objects or understand the size differences between classes.
Class | Object count | Avg area | Max area | Min area | Min height | Min height | Max height | Max height | Avg height | Avg height | Min width | Min width | Max width | Max width |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cattle torso rectangle | 13178 | 12.47% | 18.85% | 0.28% | 27px | 3.75% | 599px | 83.19% | 245px | 33.98% | 53px | 4.14% | 641px | 50.08% |
Spatial Heatmap #
The heatmaps below give the spatial distributions of all objects for every class. These visualizations provide insights into the most probable and rare object locations on the image. It helps analyze objects' placements in a dataset.
![Spatial Heatmap](https://cdn.datasetninja.com/github/dataset-ninja/cows2021/main/stats/classes_heatmaps.png)
Objects #
Table contains all 13178 objects. Click a row to preview an image with annotations, and use search or pagination to navigate. Sort columns to find outliers in the dataset.
Object ID ㅤ | Class ㅤ | Image name click row to open | Image size height x width | Height ㅤ | Height ㅤ | Width ㅤ | Width ㅤ | Area ㅤ |
---|---|---|---|---|---|---|---|---|
1➔ | cattle torso rectangle | 08507.jpg | 720 x 1280 | 227px | 31.53% | 465px | 36.33% | 11.45% |
2➔ | cattle torso rectangle | 08507.jpg | 720 x 1280 | 201px | 27.92% | 491px | 38.36% | 10.71% |
3➔ | cattle torso rectangle | 08333.jpg | 720 x 1280 | 237px | 32.92% | 511px | 39.92% | 13.14% |
4➔ | cattle torso rectangle | 10205.jpg | 720 x 1280 | 239px | 33.19% | 527px | 41.17% | 13.67% |
5➔ | cattle torso rectangle | 09201.jpg | 720 x 1280 | 253px | 35.14% | 599px | 46.8% | 16.44% |
6➔ | cattle torso rectangle | 10311.jpg | 720 x 1280 | 255px | 35.42% | 521px | 40.7% | 14.42% |
7➔ | cattle torso rectangle | 08979.jpg | 720 x 1280 | 219px | 30.42% | 537px | 41.95% | 12.76% |
8➔ | cattle torso rectangle | 09435.jpg | 720 x 1280 | 231px | 32.08% | 519px | 40.55% | 13.01% |
9➔ | cattle torso rectangle | 09376.jpg | 720 x 1280 | 219px | 30.42% | 555px | 43.36% | 13.19% |
10➔ | cattle torso rectangle | 09091.jpg | 720 x 1280 | 215px | 29.86% | 491px | 38.36% | 11.45% |
License #
Citation #
If you make use of the Cows2021 data, please cite the following reference:
Neill Campbell, Tilo Burghardt, Jing Gao, William Andrew, Andrew Dowsey (2021):
Cows2021 Dataset.
https://doi.org/10.5523/bris.4vnrca7qw1642qlwxjadp87h7
If you are happy with Dataset Ninja and use provided visualizations and tools in your work, please cite us:
@misc{ visualization-tools-for-cows2021-dataset,
title = { Visualization Tools for Cows2021 Dataset },
type = { Computer Vision Tools },
author = { Dataset Ninja },
howpublished = { \url{ https://datasetninja.com/cows2021 } },
url = { https://datasetninja.com/cows2021 },
journal = { Dataset Ninja },
publisher = { Dataset Ninja },
year = { 2024 },
month = { sep },
note = { visited on 2024-09-08 },
}
Download #
Dataset Cows2021 can be downloaded in Supervisely format:
As an alternative, it can be downloaded with dataset-tools package:
pip install --upgrade dataset-tools
… using following python code:
import dataset_tools as dtools
dtools.download(dataset='Cows2021', dst_dir='~/dataset-ninja/')
Make sure not to overlook the python code example available on the Supervisely Developer Portal. It will give you a clear idea of how to effortlessly work with the downloaded dataset.
The data in original format can be downloaded here.
Disclaimer #
Our gal from the legal dep told us we need to post this:
Dataset Ninja provides visualizations and statistics for some datasets that can be found online and can be downloaded by general audience. Dataset Ninja is not a dataset hosting platform and can only be used for informational purposes. The platform does not claim any rights for the original content, including images, videos, annotations and descriptions. Joint publishing is prohibited.
You take full responsibility when you use datasets presented at Dataset Ninja, as well as other information, including visualizations and statistics we provide. You are in charge of compliance with any dataset license and all other permissions. You are required to navigate datasets homepage and make sure that you can use it. In case of any questions, get in touch with us at hello@datasetninja.com.