image listlengths 4 4 | label listlengths 512 512 | filename stringlengths 70 70 |
|---|---|---|
[[[134,142,124,121,121,140,150,127,142,120,157,186,190,165,112,128,164,186,150,162,165,236,218,183,1(...TRUNCATED) | [[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,(...TRUNCATED) | S2A_MSIL2A_20200111T142701_N0213_R053_T20NQG_20200111T164651_01_07.tif |
[[[170,178,186,152,139,118,123,124,165,191,172,171,191,197,231,294,258,186,149,96,104,109,128,101,10(...TRUNCATED) | [[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,(...TRUNCATED) | S2A_MSIL2A_20200111T142701_N0213_R053_T20NQG_20200111T164651_01_13.tif |
[[[332,265,260,405,430,448,338,209,198,202,214,288,320,321,327,354,532,768,791,682,651,618,738,955,1(...TRUNCATED) | [[1,1,1,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(...TRUNCATED) | S2A_MSIL2A_20200111T142701_N0213_R053_T20NQG_20200111T164651_02_03.tif |
[[[180,189,182,216,233,220,268,264,277,274,304,298,280,330,375,269,193,224,239,274,245,246,272,251,2(...TRUNCATED) | [[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,(...TRUNCATED) | S2A_MSIL2A_20200111T142701_N0213_R053_T20NQG_20200111T164651_02_04.tif |
[[[186,168,146,154,133,109,103,90,82,86,92,85,85,86,98,107,105,116,118,109,99,92,73,63,79,91,86,78,8(...TRUNCATED) | [[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,(...TRUNCATED) | S2A_MSIL2A_20200111T142701_N0213_R053_T20NQG_20200111T164651_02_07.tif |
[[[288,297,279,323,404,409,372,357,382,342,268,260,277,298,291,325,367,348,329,348,325,321,284,296,2(...TRUNCATED) | [[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,(...TRUNCATED) | S2A_MSIL2A_20200111T142701_N0213_R053_T20NQG_20200111T164651_02_10.tif |
[[[180,254,264,208,216,234,260,250,198,236,254,263,270,222,227,234,202,178,214,267,272,236,229,188,2(...TRUNCATED) | [[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,(...TRUNCATED) | S2A_MSIL2A_20200111T142701_N0213_R053_T20NQG_20200111T164651_02_11.tif |
[[[220,213,208,185,173,125,92,79,71,84,96,96,76,81,80,82,103,101,102,94,94,91,88,101,83,82,124,113,1(...TRUNCATED) | [[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(...TRUNCATED) | S2A_MSIL2A_20200111T142701_N0213_R053_T20NQG_20200111T164651_03_05.tif |
[[[830,637,605,656,580,480,557,634,648,691,531,396,467,485,599,761,764,817,855,813,822,849,832,817,8(...TRUNCATED) | [[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(...TRUNCATED) | S2A_MSIL2A_20200111T142701_N0213_R053_T20NQG_20200111T164651_03_06.tif |
[[[266,230,206,201,203,255,243,197,205,206,224,262,243,208,207,174,197,220,203,206,185,212,236,249,2(...TRUNCATED) | [[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,(...TRUNCATED) | S2A_MSIL2A_20200111T142701_N0213_R053_T20NQG_20200111T164651_03_11.tif |
End of preview. Expand in Data Studio
Amazon Sentinel-2 Forest Segmentation Dataset
Dataset Description
This dataset contains satellite images from the Amazon biome for semantic segmentation of forested areas. The images were extracted from Sentinel-2 Level 2A satellite imagery and converted to GeoTIFF format to preserve all four spectral bands.
Source
- Original Source: Zenodo
- Paper: Bragagnolo, L., da Silva, R.V., & Grzybowski, J.M.V. (2021). Amazon and Atlantic Forest image datasets for semantic segmentation. Zenodo. https://doi.org/10.5281/zenodo.4498086
Dataset Structure
| Split | Images | Masks | Description |
|---|---|---|---|
| train | 499 | 499 | Training samples with pixel masks |
| val | 100 | 100 | Validation samples with pixel masks |
| test | 20 | - | Test samples (no masks provided) |
| Total | 619 | 599 |
Image Properties
| Property | Value |
|---|---|
| Format | GeoTIFF (.tif) |
| Size | 512 × 512 pixels |
| Data type | 8-bit unsigned integer (0-255) |
| Spectral bands | 4 (R, G, B, NIR) |
Spectral Bands
| Band | Sentinel-2 Band | Wavelength | Description |
|---|---|---|---|
| 0 | B4 | 664.5 nm | Red |
| 1 | B3 | 559 nm | Green |
| 2 | B2 | 492.4 nm | Blue |
| 3 | B8 | 832.8 nm | Near-Infrared |
Label Encoding
| Value | Class | Description |
|---|---|---|
| 0 | Background | Non-forested areas (soil, water, urban) |
| 1 | Forest | Forested areas |
Loading the Dataset
Using HuggingFace Datasets (Recommended)
from datasets import load_dataset
# Load from HuggingFace Hub
dataset = load_dataset("NickBurns/amazon-sentinel2-forest-segmentation")
# Access splits
train_ds = dataset["train"]
val_ds = dataset["val"]
test_ds = dataset["test"]
# Example: access a single sample
sample = train_ds[0]
image = sample["image"] # shape: (4, 512, 512) - [R, G, B, NIR]
label = sample["label"] # shape: (512, 512) - binary mask
filename = sample["filename"]
Using Rasterio (Manual Loading)
import rasterio
import numpy as np
from pathlib import Path
def load_sample(image_path, label_path=None):
"""Load a single image and optional mask."""
with rasterio.open(image_path) as src:
image = src.read() # shape: (4, H, W)
label = None
if label_path and Path(label_path).exists():
with rasterio.open(label_path) as src:
label = src.read() # shape: (H, W)
return image, label
Using torchgeo
from torchgeo.datasets import RasterDataset
from torch.utils.data import DataLoader
# Note: Requires separate handling for multi-band GeoTIFF
class Sentinel2Dataset(RasterDataset):
filename_glob = "*.tif"
is_image = True
ds = Sentinel2Dataset("path/to/train/image/")
dl = DataLoader(ds, batch_size=4)
Example Sample
from datasets import load_dataset
ds = load_dataset("NickBurns/amazon-sentinel2-forest-segmentation", split="train")
sample = ds[0]
print(f"Image shape: {sample['image'].shape}") # (4, 512, 512)
print(f"Label shape: {sample['label'].shape}") # (512, 512)
print(f"Unique labels: {np.unique(sample['label'])}") # [0, 1]
print(f"Filename: {sample['filename']}")
Dataset Statistics
Class Distribution (Training Set)
Based on the original Zenodo publication, the dataset was curated to include diverse forest and non-forest coverage for semantic segmentation training.
Geographic Coverage
- Region: Amazon Biome, Brazil
- Satellite: Sentinel-2A
- Acquisition: 2020
License
Creative Commons Attribution 4.0 International (CC-BY 4.0)
Citation
@misc{bragagnolo2021amazon,
title = {Amazon and Atlantic Forest image datasets for semantic segmentation},
author = {Bragagnolo, Lucimara and da Silva, Roberto Valmir and Grzybowski, José Mario Vicensi},
year = {2021},
publisher = {Zenodo},
doi = {10.5281/zenodo.4498086},
url = {https://doi.org/10.5281/zenodo.4498086}
}
Acknowledgments
Original dataset created by researchers at the Federal University of Fronteira Sul, Brazil. Converted and uploaded to HuggingFace for easier access and integration with machine learning workflows.
- Downloads last month
- 9