--- license: cc-by-4.0 viewer: false annotations_creators: - expert-generated task_categories: - object-detection - other language: - en pretty_name: PigBench source_datasets: - original tags: - object-detection - multi-object-tracking - pigs - pig - animals - animal - livestock - computer-vision - precision-livestock-farming - image - video modalities: - image - video doi: 10.1016/j.compag.2025.111264 --- # 🐷 Dataset for the paper: Benchmarking pig detection and tracking under diverse and challenging conditions *Note: This dataset does not provide a load_dataset interface*. More detailed descriptions about the dataset can be found in the [corresponding paper](https://doi.org/10.1016/j.compag.2025.111264). # ⬇️ Downloading the dataset You can download the dataset using the Hugging Face CLI. First, install the following package: ```bash pip install huggingface_hub ``` The entire dataset (roughly 25 GB) can then be downloaded as follows: ```bash hf download \ jonaden/pig-detection-and-tracking \ --repo-type dataset \ --local-dir ./pig-detection-and-tracking ``` You can also either specify an individual file to download or use the ``--include`` flag to download a specific folder. # 🗂️ Overview The data is structured as follows: ``` pig-detection-and-tracking/ ├── detection/ ├── PigDetect.zip └── coco_annotations/ ├── train.json ├── val.json └── test.json └── tracking/ ├── PigTrack/ ├── pigtrack0001.zip ├── pigtrack0002.zip ├── ... ├── pigtrack0080.zip └── split.txt ├── PigTrackVideos.zip └── PigTrackViz.zip ``` ``PigDetect.zip`` contains 2931 jpeg images from 31 different conventional barn environments. The ``ccoo_annotations`` folder contains the bounding box annotations. Regarding the tracking dataset, each sequence ``pigtrackxxxx.zip`` (80 in total, spanning roughly 40 minutes of video footage from 9 different barn environments) contains the corresponding jpeg images and multi-object tracking annotations in the DanceTrack format. ``PigTrackVideos.zip`` and ``PigTrackViz.zip`` provide the raw mp4 videos of the sequences as well as the visualized annotations. More information about all files can be found in the READMEs of the original data repositories located [here](https://doi.org/10.25625/I6UYE9) and [here](https://doi.org/10.25625/P7VQTP). The GitHub repository associated with this work can be found [here](https://github.com/jonaden94/PigBench). Further files related to the work, such as trained model checkpoints for pig detection and tracking, can also be found there. # 📌 Citation If you find this dataset useful, please cite as follows: ```bibtex @article{pigbench2026, title = {Benchmarking pig detection and tracking under diverse and challenging conditions}, author = {Henrich, Jonathan and Post, Christian and Zilke, Maximilian and Shiroya, Parth and Chanut, Emma and Yamchi, Amir Mollazadeh and Yahyapour, Ramin and Kneib, Thomas and Traulsen, Imke}, journal = {Computers and Electronics in Agriculture}, volume = {241}, pages = {111264}, year = {2026}, publisher = {Elsevier}, doi = {10.1016/j.compag.2025.111264} } ```