You need to agree to share your Hugging Face information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

Beef Cattle Methane Emission OGI Dataset

Paper: arXiv | CVF | IEEE Xplore | Code: GitHub | Weights: Hugging Face | Project: AI for Greener Livestock

Overview

This dataset has optical gas imaging frames of methane emitted by beef cattle, with pixel masks of the plume and the diet of the animal. It was recorded with a FLIR camera.

Videos Labelled frames Resolution Animals Diets
19 11,694 640x480 12 mixed diet, high forage, high grain

Data

Each parquet file in data/ is one video. Each row is one labelled frame, ordered by frame index.

Column Content
video_id video name, for example FLIR0368
frame_index frame number in the video
image original PNG, 3 channels
mask original PNG, 1 channel. 0 is background and 1 is methane plume
mask_class original PNG, 1 channel. 0 is background, and 1, 2 and 3 are the plume of a high forage, high grain and mixed diet animal
diet mixed_diet, high_forage or high_grain
animal_id animal in the video
official_split train, validation or test, as in the GasTwinFormer paper
animal_split train, validation or test, with every animal in one part only

metadata.csv lists the animal, diet, frame counts and animal_split of every video.

Usage

from datasets import load_dataset

ds = load_dataset("toqi/beef-cattle-methane-ogi", split="all")
train = ds.filter(lambda r: r["animal_split"] == "train")

To write PNG folders and split lists for training code, download the repo and run

hf download toqi/beef-cattle-methane-ogi --repo-type dataset --local-dir gastwin_hf
python unpack_to_png.py gastwin_hf out

This writes images/, masks/, masks_class/, metadata.csv and the lists train.txt, val.txt, test.txt, animal_train.txt, animal_val.txt and animal_test.txt. verify.py checks the Parquet files against the unpacked PNGs.

Splits

official_split is the split of the paper. It places frames of the same video in different parts. We recommend animal_split for new work, because neighbouring frames are nearly identical.

Split official_split animal_split
train 8,177 6,598
validation 1,744 2,572
test 1,773 2,524

License

License: CC BY-NC 4.0. Commercial use is not permitted.

Citation

If you use this dataset, you must cite the paper below.

@inproceedings{sarker2025gastwinformer,
  author    = {Sarker, Toqi Tahamid and Embaby, Mohamed and Islam, Taminul and AbuGhazaleh, Amer and Ahmed, Khaled},
  title     = {GasTwinFormer: A Hybrid Vision Transformer for Livestock Methane Emission Segmentation and Dietary Classification in Optical Gas Imaging},
  booktitle = {2025 IEEE/CVF International Conference on Computer Vision Workshops (ICCVW)},
  year      = {2025},
  pages     = {2808--2817},
  doi       = {10.1109/ICCVW69036.2025.00293}
}

Acknowledgments

This work is supported by the project "Artificial Intelligence for Greener Livestock: Educational and Research", award no. 2022-70001-37404, from the U.S. Department of Agriculture's National Institute of Food and Agriculture.

Downloads last month
22

Models trained or fine-tuned on toqi/beef-cattle-methane-ogi

Paper for toqi/beef-cattle-methane-ogi