Datasets:
cluster_id int64 | patch_id string | wc_mode_label string | cluster_size int64 | n_labels int64 |
|---|---|---|---|---|
0 | S2A_MSIL2A_20240927T083731_R064_T36RUU_20240927T130851_892_2406_6842 | Built-up | 2 | 2 |
0 | S2B_MSIL2A_20241007T175129_R141_T12RWS_20241007T213533_6930_5846_40e2 | Shrubland | 2 | 2 |
1 | S2B_MSIL2A_20240404T072609_R049_T38RPV_20240404T134340_10450_394_ba2d | Built-up | 2 | 2 |
1 | S2B_MSIL2A_20240721T082609_R021_T36SWG_20240721T122007_6578_5174_23ff | Grassland | 2 | 2 |
2 | S2B_MSIL2A_20241114T052959_R105_T43RGM_20241114T075133_1348_10232_74d0 | Cropland | 3 | 2 |
2 | S2B_MSIL2A_20241114T052959_R105_T43RGM_20241114T075133_8850_6472_5ca4 | Cropland | 3 | 2 |
2 | S2B_MSIL2A_20240723T072619_R049_T38RQV_20240723T101745_4314_10654_99b1 | Permanent water | 3 | 2 |
3 | S2A_MSIL2A_20240903T171901_R012_T14TNK_20240904T003950_6162_1866_c86a | Cropland | 2 | 2 |
3 | S2A_MSIL2A_20240412T155901_R097_T17RMJ_20240413T001531_8610_5046_9bd5 | Herbaceous wetland | 2 | 2 |
4 | S2A_MSIL2A_20240903T171901_R012_T14TPK_20240904T003950_10294_4578_a73f | Cropland | 2 | 2 |
4 | S2A_MSIL2A_20240709T220531_R072_T06WVD_20240710T031937_2198_10654_b1f6 | Herbaceous wetland | 2 | 2 |
5 | S2A_MSIL2A_20240903T171901_R012_T14TPK_20240904T003950_6728_5192_b0c3 | Cropland | 4 | 2 |
5 | S2A_MSIL2A_20240903T171901_R012_T14TNL_20240904T003950_6788_8524_729d | Cropland | 4 | 2 |
5 | S2A_MSIL2A_20240705T172001_R012_T14TNL_20240706T045514_9252_2114_207a | Cropland | 4 | 2 |
5 | S2A_MSIL2A_20240622T084601_R107_T36UVV_20240622T131254_9760_4848_ed0b | Permanent water | 4 | 2 |
6 | S2A_MSIL2A_20240903T171901_R012_T14TNL_20240904T003950_7734_7256_eed8 | Cropland | 2 | 2 |
6 | S2A_MSIL2A_20240622T084601_R107_T36UVV_20240622T131254_9238_3830_c088 | Permanent water | 2 | 2 |
7 | S2A_MSIL2A_20240605T171901_R012_T14SNH_20240606T022358_3992_9364_6ead | Cropland | 2 | 2 |
7 | S2B_MSIL2A_20240824T133149_R081_T23LKF_20240824T154650_5590_9240_4b10 | Shrubland | 2 | 2 |
8 | S2A_MSIL2A_20240605T171901_R012_T14SNH_20240606T022358_7744_1912_ec3d | Cropland | 2 | 2 |
8 | S2A_MSIL2A_20240709T220531_R072_T06WVD_20240710T031937_1398_8812_a32c | Herbaceous wetland | 2 | 2 |
9 | S2B_MSIL2A_20240819T171859_R012_T14TPK_20240819T214314_3254_2306_6547 | Cropland | 2 | 2 |
9 | S2B_MSIL2A_20240404T072609_R049_T38RPV_20240404T134340_9370_9308_f584 | Permanent water | 2 | 2 |
10 | S2B_MSIL2A_20240819T171859_R012_T14TPK_20240819T214314_216_4146_348b | Cropland | 3 | 3 |
10 | S2B_MSIL2A_20240227T160129_R097_T17RMK_20240227T221324_9006_1832_b563 | Herbaceous wetland | 3 | 3 |
10 | S2A_MSIL2A_20240210T170441_R069_T14QMG_20240211T150932_1768_4870_eec6 | Permanent water | 3 | 3 |
11 | S2B_MSIL2A_20240819T171859_R012_T14TPK_20240819T214314_1656_666_bff2 | Cropland | 2 | 2 |
11 | S2B_MSIL2A_20240730T071619_R006_T42WWD_20240730T083338_9038_5788_e012 | Permanent water | 2 | 2 |
12 | S2A_MSIL2A_20240705T172001_R012_T14TNL_20240706T045514_10650_6912_ec57 | Cropland | 2 | 2 |
12 | S2B_MSIL2A_20250120T135659_R067_T20HNF_20250120T192956_5046_8294_282e | Permanent water | 2 | 2 |
13 | S2B_MSIL2A_20240705T080609_R078_T37TEL_20240706T023152_7906_10194_0db2 | Cropland | 2 | 2 |
13 | S2B_MSIL2A_20240721T082609_R021_T36SWG_20240721T122007_1124_6674_abec | Grassland | 2 | 2 |
14 | S2C_MSIL2A_20250208T133901_R124_T22JBP_20250208T164510_5686_6816_5cf9 | Cropland | 2 | 2 |
14 | S2A_MSIL2A_20241121T043101_R133_T45QZE_20241121T074250_7090_3982_7e53 | Mangroves | 2 | 2 |
15 | S2B_MSIL2A_20240826T170849_R112_T15STD_20240826T212041_10016_652_3f37 | Cropland | 2 | 2 |
15 | S2A_MSIL2A_20240922T074631_R135_T36MYD_20240922T111958_8816_9170_9614 | Shrubland | 2 | 2 |
16 | S2A_MSIL2A_20240610T150731_R082_T18LYL_20240610T220607_278_9352_d87a | Grassland | 2 | 2 |
16 | S2B_MSIL2A_20240715T133149_R081_T23LKE_20240715T173436_2380_4384_1657 | Shrubland | 2 | 2 |
17 | S2A_MSIL2A_20240624T012721_R131_T53LKF_20240624T073349_4126_6990_4c0c | Grassland | 3 | 2 |
17 | S2B_MSIL2A_20240824T133149_R081_T23LKF_20240824T154650_4888_6492_dbad | Shrubland | 3 | 2 |
17 | S2A_MSIL2A_20240922T175041_R141_T12RWR_20240922T232752_5724_528_a633 | Shrubland | 3 | 2 |
18 | S2B_MSIL2A_20250119T142709_R053_T19GDN_20250119T194952_1586_4492_d5e2 | Grassland | 2 | 2 |
18 | S2B_MSIL2A_20240708T081609_R121_T34KGD_20240712T101848_1266_7624_de26 | Herbaceous wetland | 2 | 2 |
19 | S2B_MSIL2A_20240730T071619_R006_T42WWD_20240730T083338_1432_5108_96d8 | Grassland | 2 | 2 |
19 | S2B_MSIL2A_20240907T174909_R141_T12RWR_20240907T215349_7340_1256_96f4 | Shrubland | 2 | 2 |
20 | S2A_MSIL2A_20240829T131251_R081_T27WWM_20240829T155457_5174_9036_18be | Grassland | 4 | 2 |
20 | S2A_MSIL2A_20240824T035531_R004_T48TWT_20240824T103901_9846_4374_84c2 | Grassland | 4 | 2 |
20 | S2A_MSIL2A_20240824T035531_R004_T48TWT_20240824T103901_9222_5526_0834 | Grassland | 4 | 2 |
20 | S2A_MSIL2A_20240729T140051_R067_T21KVA_20240729T232452_9722_5920_f262 | Herbaceous wetland | 4 | 2 |
21 | S2B_MSIL2A_20240227T160129_R097_T17RMK_20240227T221324_6338_4304_f87b | Grassland | 2 | 2 |
21 | S2B_MSIL2A_20240922T135659_R067_T21KWA_20240922T194135_2840_800_2f51 | Herbaceous wetland | 2 | 2 |
22 | S2A_MSIL2A_20240720T213531_R086_T05WPM_20240721T035033_1614_5718_f684 | Grassland | 4 | 2 |
22 | S2B_MSIL2A_20240826T170849_R112_T15STD_20240826T212041_8286_4542_890c | Grassland | 4 | 2 |
22 | S2B_MSIL2A_20250116T054059_R005_T42QZF_20250116T074800_8378_2744_9d93 | Permanent water | 4 | 2 |
22 | S2B_MSIL2A_20250116T054059_R005_T42QZF_20250116T074800_8360_3460_1a39 | Permanent water | 4 | 2 |
23 | S2A_MSIL2A_20240720T213531_R086_T05WPM_20240721T035033_4464_4924_381e | Grassland | 2 | 2 |
23 | S2A_MSIL2A_20240922T175041_R141_T12RWR_20240922T232752_4400_5858_535c | Mangroves | 2 | 2 |
24 | S2A_MSIL2A_20240903T171901_R012_T14TNL_20240904T003950_6708_2568_b9e2 | Grassland | 2 | 2 |
24 | S2A_MSIL2A_20240412T155901_R097_T17RMJ_20240413T001531_9918_5780_8d2e | Herbaceous wetland | 2 | 2 |
25 | S2B_MSIL2A_20241102T001109_R073_T55HFC_20241102T013455_4596_1010_1d7d | Grassland | 2 | 2 |
25 | S2A_MSIL2A_20240922T175041_R141_T12RWR_20240922T232752_10246_1392_e1ca | Shrubland | 2 | 2 |
26 | S2A_MSIL2A_20240824T035531_R004_T48TWT_20240824T103901_8388_4984_850a | Grassland | 2 | 2 |
26 | S2A_MSIL2A_20240818T135701_R067_T21KVA_20240818T212251_4386_1144_7484 | Herbaceous wetland | 2 | 2 |
27 | S2C_MSIL2A_20250205T150751_R082_T19NDG_20250205T181611_10130_2540_d155 | Grassland | 2 | 2 |
27 | S2A_MSIL2A_20240709T220531_R072_T06WVD_20240710T031937_1332_8210_d1be | Herbaceous wetland | 2 | 2 |
28 | S2C_MSIL2A_20250205T150751_R082_T19NDG_20250205T181611_2030_10800_095e | Grassland | 2 | 2 |
28 | S2B_MSIL2A_20240801T125709_R038_T33XWG_20240801T165443_1640_4964_6d93 | Herbaceous wetland | 2 | 2 |
29 | S2C_MSIL2A_20250205T150751_R082_T19NDG_20250205T181611_10260_6044_3d1c | Grassland | 2 | 2 |
29 | S2A_MSIL2A_20240709T220531_R072_T06WVD_20240710T031937_3820_10670_fd76 | Herbaceous wetland | 2 | 2 |
30 | S2C_MSIL2A_20250205T150751_R082_T19NDG_20250205T181611_8418_6924_4f37 | Grassland | 2 | 2 |
30 | S2A_MSIL2A_20250112T083321_R021_T36RTV_20250112T131250_10084_2072_46aa | Herbaceous wetland | 2 | 2 |
31 | S2B_MSIL2A_20240902T135709_R067_T21KWA_20240902T180147_6494_876_e80e | Herbaceous wetland | 2 | 2 |
31 | S2B_MSIL2A_20240831T132239_R038_T23LLE_20240831T152654_4112_7724_44b6 | Tree cover | 2 | 2 |
32 | S2B_MSIL2A_20240902T135709_R067_T21KWA_20240902T180147_8182_1710_1189 | Herbaceous wetland | 2 | 2 |
32 | S2A_MSIL2A_20241012T175301_R141_T12RWR_20241012T232550_6806_234_c473 | Shrubland | 2 | 2 |
33 | S2A_MSIL2A_20240818T135701_R067_T21KVA_20240818T212251_5804_8544_977f | Herbaceous wetland | 2 | 2 |
33 | S2C_MSIL2A_20250207T053031_R105_T43QBB_20250207T084610_9942_10944_a23c | Tree cover | 2 | 2 |
34 | S2A_MSIL2A_20240818T135701_R067_T21KVA_20240818T212251_4258_2088_b775 | Herbaceous wetland | 2 | 2 |
34 | S2C_MSIL2A_20250205T150751_R082_T19NDG_20250205T181611_2272_156_88e0 | Shrubland | 2 | 2 |
35 | S2A_MSIL2A_20240729T140051_R067_T21KVA_20240729T232452_8152_7352_d37c | Herbaceous wetland | 2 | 2 |
35 | S2A_MSIL2A_20240316T074651_R135_T36MYA_20240316T124705_4284_1360_f07f | Shrubland | 2 | 2 |
36 | S2A_MSIL2A_20240729T140051_R067_T21KVA_20240729T232452_4538_22_ab4b | Herbaceous wetland | 2 | 2 |
36 | S2A_MSIL2A_20240415T110621_R137_T29SQD_20240415T192129_6758_4576_b97d | Tree cover | 2 | 2 |
37 | S2A_MSIL2A_20240512T155901_R097_T17RMJ_20240513T012444_10636_2142_44b7 | Herbaceous wetland | 2 | 2 |
37 | S2A_MSIL2A_20240721T023551_R089_T49MDM_20240721T065350_4278_8262_c52a | Tree cover | 2 | 2 |
38 | S2A_MSIL2A_20240512T155901_R097_T17RMJ_20240513T012444_9248_5072_f72d | Herbaceous wetland | 2 | 2 |
38 | S2A_MSIL2A_20240922T074631_R135_T36MYD_20240922T111958_5552_2800_a77a | Shrubland | 2 | 2 |
39 | S2A_MSIL2A_20240709T220531_R072_T06WVD_20240710T031937_4504_10632_e09f | Herbaceous wetland | 2 | 2 |
39 | S2B_MSIL2A_20240715T133149_R081_T23LKE_20240715T173436_486_2712_0813 | Shrubland | 2 | 2 |
40 | S2B_MSIL2A_20240720T071619_R006_T42WWD_20240720T100731_7978_9584_6ef8 | Herbaceous wetland | 2 | 2 |
40 | S2B_MSIL2A_20241115T082119_R121_T34HCH_20241115T111328_7884_3298_4e9b | Shrubland | 2 | 2 |
41 | S2A_MSIL2A_20241130T100351_R122_T31NEH_20241130T132849_812_9084_4354 | Mangroves | 2 | 2 |
41 | S2A_MSIL2A_20240316T074651_R135_T36MYA_20240316T124705_6142_3336_f33c | Shrubland | 2 | 2 |
42 | S2B_MSIL2A_20241126T043029_R133_T45QYE_20241126T064312_5074_4976_c4b2 | Mangroves | 3 | 2 |
42 | S2B_MSIL2A_20250116T054059_R005_T42QZF_20250116T074800_8840_2500_2590 | Permanent water | 3 | 2 |
42 | S2B_MSIL2A_20250116T054059_R005_T42QZF_20250116T074800_8580_3904_3950 | Permanent water | 3 | 2 |
43 | S2B_MSIL2A_20241126T043029_R133_T45QYE_20241126T064312_9284_4112_e2e3 | Mangroves | 3 | 2 |
43 | S2B_MSIL2A_20241126T043029_R133_T45QYE_20241126T064312_4524_4430_75af | Mangroves | 3 | 2 |
43 | S2B_MSIL2A_20250116T054059_R005_T42QZF_20250116T074800_10626_6226_d164 | Permanent water | 3 | 2 |
44 | S2B_MSIL2A_20241126T043029_R133_T45QYE_20241126T064312_7648_8738_ecb7 | Mangroves | 2 | 2 |
Similar But Different — Sentinel-2 patches with deceptive RGB
30,927 32×32 Sentinel-2 L2A multispectral patches (12 bands resampled to 10 m) across ten ESA WorldCover classes, selected so that the visible bands are uninformative by construction: every patch sits in a region of RGB-mean space dominated by patches of other classes, while its NIR / red-edge / SWIR response stays class-informative.
The dataset is a controlled probe for one question: does a model actually use the bands outside the visible range? On most land-cover benchmarks an RGB-only model nearly matches a full multispectral model, so band ablations have no leverage. Here an RGB-only ResNet-18 reaches 0.71 test accuracy while the same model with all 12 bands reaches 0.82 — and frozen multispectral foundation-model probes reach 0.87. See the announcement post at https://geospatialml.com/posts/similar-but-different/ for full benchmarks.
How it was built
Imagery is Sentinel-2 L2A from the Microsoft Planetary Computer; labels come from ESA WorldCover 10 m 2021 v200.
- Candidate sampling. Random 32×32 windows from Sentinel-2 L2A scenes
(scene-level cloud cover < 10%) at 200 hand-picked locations spread across
continents, biomes, and seasons; windows containing cloud or shadow pixels
(per the SCL band) are discarded. This yields 397,839 patches from 5,292
scenes, with per-channel RGB means and standard deviations computed on the
8-bit
visual(true-colour) asset. - Spectral-difference filtering. Find all patch pairs whose RGB-mean vectors are within Euclidean distance 2.0 and whose RGB-std vectors are within distance 3.0 (so pairs match in texture, not just average colour). For those candidates, fetch the NIR band (B08) and keep pairs whose B08 means differ by a large margin — every surviving patch has at least one RGB look-alike with a very different NIR response.
- Full bands + labels. Download all 12 L2A surface-reflectance bands for surviving patches (20 m / 60 m bands resampled to 10 m, bilinear) and label each patch with the mode WorldCover class over its footprint, keeping the full per-class percentage distribution.
- RGB-ambiguity selection. Restrict to patches ≥ 70% a single WorldCover
class that participate in a pair with
|ΔB08| > 1000(uint16 surface reflectance), then compute each patch's k = 20 nearest neighbours in (R̄, Ḡ, B̄) space and keep the patch only if ≥ 18 of its 20 RGB-mean neighbours carry a different label. A k-NN / nearest-centroid classifier on RGB means is therefore wrong on these patches by construction. Snow and ice survived with too few patches to split and was dropped, leaving ten classes and 30,927 patches.
What's in this repo
similar-but-different/
├── README.md # this file
├── splits.json # scene-disjoint 80/10/10 train/val/test
├── landcover_distribution.parquet # per-patch WorldCover percentages
├── eval/
│ ├── test_pairs.parquet # RGB-similar / NIR-different test pairs
│ └── test_hard_clusters.parquet # RGB-confusable, multi-class test clusters
└── shards/
├── Bare_sparse_veg.parquet # one parquet shard per class
├── Built-up.parquet
├── Cropland.parquet
├── Grassland.parquet
├── Herbaceous_wetland.parquet
├── Mangroves.parquet
├── Moss_and_lichen.parquet
├── Permanent_water.parquet
├── Shrubland.parquet
└── Tree_cover.parquet
Each shard row holds one patch: the complete GeoTIFF as tif bytes plus
metadata columns (patch_id, scene_id, wc_mode_class, wc_mode_label,
wc_mode_pct, wc_n_valid, and wc_class_<code>_pct for the full
WorldCover distribution over the patch footprint).
Each embedded GeoTIFF is a 12-band uint16 raster, 32×32 px at 10 m,
georeferenced in the source scene's UTM CRS (nodata=0,
compress=deflate). Values are L2A surface reflectance (divide by 10,000
for reflectance in [0, 1]). GeoTIFF tags carry patch_id, scene_id,
wc_mode_label, wc_mode_pct, and the patch centre in UTM coordinates;
per-band descriptions name each band.
Band order
| # | Band | Wavelength (nm) | Native res (m) |
|---|---|---|---|
| 1 | B01 (coastal aerosol) | 443 | 60 |
| 2 | B02 (blue) | 490 | 10 |
| 3 | B03 (green) | 560 | 10 |
| 4 | B04 (red) | 665 | 10 |
| 5 | B05 (red edge 1) | 705 | 20 |
| 6 | B06 (red edge 2) | 740 | 20 |
| 7 | B07 (red edge 3) | 783 | 20 |
| 8 | B08 (NIR) | 842 | 10 |
| 9 | B8A (narrow NIR) | 865 | 20 |
| 10 | B09 (water vapour) | 945 | 60 |
| 11 | B11 (SWIR 1) | 1610 | 20 |
| 12 | B12 (SWIR 2) | 2190 | 20 |
Non-10 m bands were resampled to 10 m with bilinear interpolation. (B10 cirrus is not part of the L2A product, so it is not included.)
Splits
splits.json provides a fixed 80/10/10 train/val/test split that is
stratified by class and grouped by source Sentinel-2 scene
(sklearn.model_selection.StratifiedGroupKFold(n_splits=10) with
scene_id as the group, seed 42; fold 0 = test, fold 1 = val, folds 2–9 =
train). No scene contributes patches to more than one split, so a model
cannot match a test patch to a visually near-identical neighbour from the
same scene seen during training. Please use this split when reporting
results.
| Class | Total | Train | Val | Test |
|---|---|---|---|---|
| Shrubland | 5,927 | 4,742 | 593 | 592 |
| Tree cover | 5,000 | 4,000 | 500 | 500 |
| Grassland | 4,820 | 3,856 | 482 | 482 |
| Cropland | 3,854 | 3,083 | 385 | 386 |
| Herbaceous wetland | 3,536 | 2,829 | 353 | 354 |
| Permanent water | 2,637 | 2,109 | 264 | 264 |
| Bare/sparse veg. | 2,410 | 1,928 | 241 | 241 |
| Built-up | 1,061 | 849 | 106 | 106 |
| Mangroves | 1,017 | 813 | 102 | 102 |
| Moss and lichen | 665 | 532 | 67 | 66 |
| Total | 30,927 | 24,741 | 3,093 | 3,093 |
The file maps each split to {class_name: [patch_id, ...]} and also stores
class_to_idx and inverse-frequency class weights (clipped at 10.0) for
weighted cross-entropy.
Evaluation groupings (eval/)
Two extra artifacts under eval/ make the dataset's similar-but-different
structure directly testable. Both are built only from the test split, from
the patches' visual-RGB statistics, so a model trained on train has never
seen them — no need to retrain to use them. They ask a sharper question than
plain per-patch accuracy: when two (or more) patches look alike in RGB but
carry different labels, does the model tell them apart?
eval/test_pairs.parquet — 46 pairs of test patches that are close in
visual RGB (mean L2 ≤ 2.0 and per-channel std L2 ≤ 3.0) yet differ by a large
near-infrared margin (|ΔB08 mean| > 500 SR units). Columns: patch_a,
patch_b, label_a, label_b, rgb_l2, std_l2, nir_mean_diff,
re_mean_diff. The similar-but-different pairs are the cross-label ones
(label_a != label_b, 70% of rows).
Pair accuracy = fraction of pairs where the model classifies both
endpoints correctly.
eval/test_hard_clusters.parquet — 53 hard clusters (121 patches, long
format: one row per membership). Clusters are the connected components of the
test-set RGB mean+std similarity graph (same thresholds) that contain ≥ 2
patches spanning ≥ 2 distinct labels — groups that look alike in RGB but cross
class boundaries. Columns: cluster_id, patch_id, wc_mode_label,
cluster_size, n_labels (sizes: 42×2, 7×3, 4×4).
Cluster accuracy = fraction of clusters where the model classifies all
members correctly (the size-2 case reduces to pair accuracy).
import pandas as pd
# pred: dict mapping patch_id -> predicted class label (string)
pairs = pd.read_parquet(f"{local}/eval/test_pairs.parquet")
both_correct = (pairs.patch_a.map(pred).eq(pairs.label_a) &
pairs.patch_b.map(pred).eq(pairs.label_b))
pair_accuracy = both_correct.mean()
clusters = pd.read_parquet(f"{local}/eval/test_hard_clusters.parquet")
ok = clusters.assign(hit=clusters.patch_id.map(pred).eq(clusters.wc_mode_label))
cluster_accuracy = ok.groupby("cluster_id").hit.all().mean()
Reference — a random forest on per-band mean+std (fit on train, the same
baseline as below) scores:
| Bands | Pair accuracy | Cluster accuracy |
|---|---|---|
| RGB | 28% | 6% |
| RGB + NIR | 57% | 28% |
| All 12 bands | 70% | 43% |
RGB-only statistics can barely resolve these groups; the non-visible bands are what make them separable — which is the whole point of the dataset.
Quick start
import io, json
import pandas as pd
import rasterio
from huggingface_hub import snapshot_download
local = snapshot_download(repo_id="calebrob6/similar-but-different",
repo_type="dataset")
# Read one patch from a shard:
shard = pd.read_parquet(f"{local}/shards/Tree_cover.parquet")
row = shard.iloc[0]
with rasterio.open(io.BytesIO(row["tif"])) as src:
arr = src.read() # (12, 32, 32) uint16 surface reflectance
print(src.descriptions[7]) # 'B08 NIR 842nm'
print(src.tags()) # {'patch_id': ..., 'wc_mode_label': ...}
# Use the fixed scene-disjoint split:
splits = json.loads(open(f"{local}/splits.json").read())
train_ids = {pid for ids in splits["train"].values() for pid in ids}
train_rows = shard[shard["patch_id"].isin(train_ids)]
Or with the HF datasets library:
from datasets import load_dataset
ds = load_dataset("calebrob6/similar-but-different",
data_files="shards/*.parquet")
Baseline results
ResNet-18 (ImageNet init, input conv adapted to the channel count; AdamW + cosine schedule, 50 epochs, batch 256, flips/rotations; reflectance / 10,000). Best run per band set from a sweep over learning rate {3e-4, 1e-3, 3e-3} × class weighting {none, inverse}, on the fixed split above:
| Bands used | Channels | Test accuracy | Macro F1 | Weighted F1 |
|---|---|---|---|---|
| RGB (B04, B03, B02) | 3 | 0.712 | 0.727 | 0.712 |
| RGB + NIR (+ B08) | 4 | 0.770 | 0.787 | 0.769 |
| All 12 bands | 12 | 0.822 | 0.841 | 0.821 |
The ordering RGB < RGB+NIR < All holds in every cell of the sweep, and re-running the winning configurations with a different random seed gives 0.717 / 0.772 / 0.817. Frozen foundation-model probes (KNN-5 and linear, in the style of torchgeo-bench) show the same pattern — band-flexible models such as DOFA, Panopticon, and OlmoEarth gain 6–24 points from RGB to the full stack, with an OlmoEarth-v1-Base linear probe reaching 0.867 — see the announcement post for the full table.
Note that the dataset is a controlled probe, not a representative sample of the land surface: class priors and geography reflect the selection procedure, and labels inherit WorldCover's errors (patches are ≥ 70% a single class, but residual label noise remains). Read accuracies as measurements of band reliance, not as operational land-cover accuracy.
License
Released under CC BY 4.0, matching the upstream Sentinel-2 L2A data (Copernicus open access) and ESA WorldCover (CC BY 4.0).
Attribution: Contains modified Copernicus Sentinel-2 L2A data (2024–2025); land-cover labels derived from © ESA WorldCover 2021 v200.
Citation
@misc{similar-but-different-2026,
title = {Similar But Different: a Sentinel-2 benchmark for probing
spectral-band reliance in land-cover models},
author = {Robinson, Caleb},
year = {2026},
url = {https://huggingface.co/datasets/calebrob6/similar-but-different}
}
- Downloads last month
- 114