File size: 5,853 Bytes
9d47498
 
e30d075
 
 
ae12898
 
e30d075
ae12898
e30d075
ae12898
e30d075
 
 
 
ae12898
 
 
 
a07bcc6
 
 
 
eea9475
 
9d47498
 
eea9475
c056701
ae12898
9d47498
ae12898
9d47498
ae12898
 
 
 
a07bcc6
9d47498
4f10320
 
 
9d47498
ae12898
 
 
 
 
9d47498
ae12898
 
98f2eb3
ae12898
98f2eb3
ae12898
 
9d47498
bbc2c72
9d47498
a07bcc6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ae12898
9d47498
a07bcc6
 
 
 
 
 
 
 
 
 
 
 
 
ae12898
9d47498
 
 
 
 
 
 
 
 
 
 
 
 
ae12898
a07bcc6
9d47498
a07bcc6
 
 
 
 
9d47498
ae12898
9d47498
 
 
ae12898
 
 
 
 
 
 
 
 
 
9d47498
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
---
license: cc-by-4.0
tags:
  - remote-sensing
  - satellite-imagery
  - agriculture
  - classification
  - multi-label
  - bounding-box
dataset_type: image-classification
pretty_name: CAFOSat Dataset
size_categories:
  - 10K<n<100K
---

# CAFOSat: CAFO Infrastructure Dataset

CAFOSat is a remote sensing dataset designed for identifying and classifying Concentrated Animal Feeding Operations (CAFOs) across various U.S. states. It includes high-resolution image patches, infrastructure annotations, bounding boxes, and experimental train-test splits for multiple configurations.

## πŸ”— Resources

- **GitHub Repository:** [oishee-hoque/CAFOSat](https://github.com/oishee-hoque/CAFOSat)
- **Explore the Dataset:** [CAFOSat Data Loader and Examples](https://github.com/oishee-hoque/CAFOSat/tree/main/data_loader)

![image/png](/static-proxy?url=https%3A%2F%2Fcdn-uploads.huggingface.co%2Fproduction%2Fuploads%2F682f98451d2997678a5b17a0%2FPtJszVE2tVwO_fl1ZoM0i.png%3C%2Fspan%3E)%3C%2Fspan%3E
---



## Dataset Structure

The dataset is organized into extracted folders originally packaged as `.tar.gz` files:

- `STATE_filtered/`: Original patches per U.S. state  
  (e.g., `IA_filtered/`, `AL_filtered/`)
- `negative_samples/`: Verified non-CAFO examples
- `barn/`, `manure_pond/`, `others/`: Augmented synthetic patches by infrastructure type
- `CAFOSat.csv`: Master metadata file with labels, bounding boxes, and split flags

All image paths referenced in the CSV point to these extracted folders. 
πŸ“„ Example data loader available [here](https://github.com/oishee-hoque/CAFOSat/tree/main/data_loader).


---

## πŸ”– Image File Reference (`patch_file`)

Each row in the metadata includes a `patch_file` field that provides the relative path to the associated image file.

Example:  
-`IA_filtered.tar.gz::IA_filtered/crop_4517_patch_10147_Swine_Nursery_IA.tif`

- `barn.tar.gz::`barn/aug_patch_00123.tif`
  
- `negative_sample.tar.gz::`barn/neg_patch_00098.tif`
---

## Features (CAFOSat.csv)

| Column                                | Description                                                                 |
|---------------------------------------|-----------------------------------------------------------------------------|
| `patch_file`                          | Path to the image file                                                     |
| `label`                               | Integer label for class (0–6)                                              |
| `barn`, `manure_pond`, `grazing_area`, `others` | Binary flags indicating infrastructure types                              |
| `geom_bbox`                           | Bounding box coordinates `[x1, y1, x2, y2]`                                 |
| `geometry`                            | Geospatial polygon outlining the CAFO region                               |
| `poly_crs`                            | Coordinate reference system used for `geometry`                            |
| `patch_crs`                           | Coordinate reference system used for the image patch                       |
| `category`                            | CAFO class name (e.g., Swine, Dairy)                                       |
| `state`                               | U.S. state where the patch is located                                      |
| `verified_label`                      | Boolean indicating if the label is human-verified                          |
| `CAFO_UNIQUE_ID`                      | Unique identifier for each CAFO facility                                   |
| `image_type`                          | Image variant type: `augmented` else real                                  |
| `orig_patch_file`                     | Name/path of the original patch (applicable if the image_type is `augmented`)       |
| `prompt`                              | Text prompt or description for generative/semantic use (if applicable)     |
| `weak_x`, `weak_y`                    | Collected CAFO center coordinates                                          |
| `refined_x`, `refined_y`              | Refined CAFO center coordinates                                            |
| `patch_res`                           | Spatial resolution of the patch in meters per pixel 
| `split columns` | Flags for different train/test/val splits           |

---
## πŸ§ͺ Train/Test/Val Split Flags

These are boolean-like flags (`True`/`False`) that indicate inclusion in various dataset splits:

- `cafosat_verified_training_train`, `cafosat_verified_training_test`, `cafosat_verified_training_val`
- `cafosat_all_training_*`
- `cafosat_training_set1_*`, `set2_*`
- `cafosat_merged_training_*`
- `cafosat_augmented_training_*`

Each flag is a binary indicator (`1` = in split, `0` = excluded).

---

## Labels

| Class ID | Class Name     |
|----------|----------------|
| 0        | Negative        |
| 1        | Swine           |
| 2        | Dairy           |
| 3        | Beef            |
| 4        | Poultry         |
| 5        | Horses          |
| 6        | Sheep/Goats     |

---
## πŸ“Œ Intended Use

- **CAFO detection and classification** – Identify and categorize CAFO facilities from aerial imagery.
- **CAFO area detection with bounding box** – Localize CAFOs using annotated bounding box coordinates.
- **Agricultural infrastructure mapping** – Map features like barns, manure ponds, and grazing areas.
- **Weak supervision and semi-supervised learning** – Leverage partially labeled data for model development.
- **Remote sensing benchmark development** – Support standardized evaluation for remote sensing tasks.

---

## Citation

*TBD

---

## License

This dataset is released under the [CC BY 4.0 License](https://creativecommons.org/licenses/by/4.0/).

You are free to share, use, and adapt the data with attribution.


## Contact

For questions or contributions, contact `[email protected]`.