Gasformer / README.md
toqi's picture
Add Gasformer dataset
c45f452 verified
|
Raw History Blame Contribute Delete
3.64 kB
---
license: cc-by-nc-4.0
task_categories:
- image-segmentation
tags:
- methane
- optical-gas-imaging
- infrared
- livestock
- segmentation
pretty_name: Gasformer Dataset (MR and CR)
size_categories:
- 1K<n<10K
configs:
- config_name: MR
default: true
data_files:
- split: all
path: MR/data/*.parquet
- config_name: CR
data_files:
- split: all
path: CR/data/*.parquet
---
# Gasformer Dataset: MR and CR
Paper: [arXiv](https://arxiv.org/abs/2404.10841) | [CVF](https://openaccess.thecvf.com/content/CVPR2024W/Vision4Ag/html/Sarker_Gasformer_A_Transformer-based_Architecture_for_Segmenting_Methane_Emissions_from_Livestock_CVPRW_2024_paper.html) | [IEEE Xplore](https://ieeexplore.ieee.org/abstract/document/10678016) | Code: [GitHub](https://github.com/toqitahamid/Gasformer) | Project: [AI for Greener Livestock](https://ai-greener-livestock.github.io/)
## Overview
This dataset has two subsets: MR (Controlled Methane Release) and CR (Dairy Cow Rumen Gas). It holds optical gas imaging frames with pixel masks of methane plumes.
MR is a controlled methane release over an ice-block background at flow rates of 10 to 100 SCCM.
CR is gas from dairy cow rumen samples.
| Dataset | Videos | Labelled frames | Resolution | Camera | Classes |
|---|---|---|---|---|---|
| MR, Controlled Methane Release | 15 | 9,009 | 640x480 | FLIR GF77 | background + 10 flow-rate classes |
| CR, Dairy Cow Rumen Gas | 1 | 340 | 640x480 | FLIR GF77 | background + gas |
## Data
Each parquet file is one video. Each row is one labelled frame, ordered by frame index.
| Column | Content |
|---|---|
| `video_id` | video name, for example `FLIR0659` |
| `frame_index` | frame number in the video, from 0 |
| `image` | original PNG, 3 channels |
| `mask` | original PNG, 1 channel |
| `flow_rate_class` | MR only. The gas class of the frame |
| `official_split` | `train`, `validation` or `test`, or two joined by `+` (for example `train+test`) |
Mask values: 0 is background. In MR, 1 to 10 is the flow-rate class (k x 10 SCCM), and `mask > 0` gives the binary gas mask. In CR, 1 is gas.
## Usage
```python
from datasets import load_dataset
mr = load_dataset("toqi/Gasformer", "MR", split="all")
cr = load_dataset("toqi/Gasformer", "CR", split="all")
image, mask = mr[0]["image"], mr[0]["mask"] # PIL images
```
`python unpack_to_png.py <repo_dir> <out_dir>` writes PNG folders and `train.txt`, `val.txt`, `test.txt` lists.
## Splits
`official_split.csv` lists the train, validation or test split of every frame, as used in the Gasformer paper. We recommend splitting by video, because neighbouring frames are nearly identical.
## License
License: [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/). Commercial use is not permitted.
## Citation
If you use this dataset, you must cite the paper below.
```bibtex
@inproceedings{sarker2024gasformer,
author = {Sarker, Toqi Tahamid and Embaby, Mohamed G. and Ahmed, Khaled R. and AbuGhazaleh, Amer},
title = {Gasformer: A Transformer-based Architecture for Segmenting Methane Emissions from Livestock in Optical Gas Imaging},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
month = {June},
year = {2024},
pages = {5489--5497},
doi = {10.1109/CVPRW63382.2024.00558}
}
```
## Acknowledgments
This work is supported by the project ["Artificial Intelligence for Greener Livestock: Educational and Research"](https://ai-greener-livestock.github.io/), award no. 2022-70001-37404, from the U.S. Department of Agriculture's National Institute of Food and Agriculture.