diff --git a/docs/api/datamodules.rst b/docs/api/datamodules.rst index abb0c6eaefa..8b87c0eab77 100644 --- a/docs/api/datamodules.rst +++ b/docs/api/datamodules.rst @@ -114,6 +114,11 @@ FireRisk .. autoclass:: FireRiskDataModule +FLAIR2 +^^^^^^ + +.. autoclass:: FLAIR2DataModule + GeoNRW ^^^^^^ diff --git a/docs/api/datasets.rst b/docs/api/datasets.rst index 96ca225344a..8c6b1c27d43 100644 --- a/docs/api/datasets.rst +++ b/docs/api/datasets.rst @@ -297,6 +297,11 @@ FireRisk .. autoclass:: FireRisk +FLAIR2 +^^^^^^ + +.. autoclass:: FLAIR2 + Forest Damage ^^^^^^^^^^^^^ diff --git a/docs/api/datasets/non_geo_datasets.csv b/docs/api/datasets/non_geo_datasets.csv index f000bc1d8da..970f813fe84 100644 --- a/docs/api/datasets/non_geo_datasets.csv +++ b/docs/api/datasets/non_geo_datasets.csv @@ -18,6 +18,7 @@ Dataset,Task,Source,License,# Samples,# Classes,Size (px),Resolution (m),Bands `FAIR1M`_,OD,Gaofen/Google Earth,"CC-BY-NC-SA-3.0","15,000",37,"1,024x1,024",0.3--0.8,RGB `Fields Of The World`_,"S,I",Sentinel-2,"Various","70795","2,3",256x256,10,MSI `FireRisk`_,C,NAIP Aerial,"CC-BY-NC-4.0","91,872",7,"320x320",1,RGB +`FLAIR2`_,S,"IGN, Sentinel-2",OPENLICENSE-2.0,7741,13--18,512x512,0.2--20,"RGB+NIR+NDSM, MSI", `Forest Damage`_,OD,Drone imagery,"CDLA-Permissive-1.0","1,543",4,"1,500x1,500",,RGB `GeoNRW`_,S,Aerial,"CC-BY-4.0","7,783",11,"1,000x1,000",1,"RGB, DEM" `GID-15`_,S,Gaofen-2,-,150,15,"6,800x7,200",3,RGB diff --git a/tests/data/flair2/FLAIR2/flair-2_centroids_sp_to_patch.json b/tests/data/flair2/FLAIR2/flair-2_centroids_sp_to_patch.json new file mode 100644 index 00000000000..b1d35abd2f0 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair-2_centroids_sp_to_patch.json @@ -0,0 +1 @@ +{"IMG_273729.tif": [16, 16], "IMG_660532.tif": [16, 16], "IMG_222419.tif": [16, 16], "IMG_291261.tif": [16, 16], "IMG_130148.tif": [16, 16], "IMG_866506.tif": [16, 16], "IMG_069499.tif": [16, 16], "IMG_379153.tif": [16, 16], "IMG_758165.tif": [16, 16], "IMG_446805.tif": [16, 16], "IMG_821871.tif": [16, 16], "IMG_463424.tif": [16, 16], "IMG_881682.tif": [16, 16], "IMG_966251.tif": [16, 16], "IMG_574217.tif": [16, 16], "IMG_658262.tif": [16, 16], "IMG_516804.tif": [16, 16], "IMG_359115.tif": [16, 16], "IMG_775995.tif": [16, 16], "IMG_145759.tif": [16, 16], "IMG_545250.tif": [16, 16], "IMG_492040.tif": [16, 16], "IMG_320394.tif": [16, 16], "IMG_703337.tif": [16, 16], "IMG_312966.tif": [16, 16], "IMG_215360.tif": [16, 16], "IMG_065691.tif": [16, 16], "IMG_647808.tif": [16, 16], "IMG_960096.tif": [16, 16], "IMG_863235.tif": [16, 16]} \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_aerial_test.zip b/tests/data/flair2/FLAIR2/flair_2_aerial_test.zip new file mode 100644 index 00000000000..5e5ca313c5c Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_aerial_test.zip differ diff --git a/tests/data/flair2/FLAIR2/flair_2_aerial_test/D159_2018/Z15_AU/img/IMG_065691.tif b/tests/data/flair2/FLAIR2/flair_2_aerial_test/D159_2018/Z15_AU/img/IMG_065691.tif new file mode 100644 index 00000000000..d6804bb5bf9 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_aerial_test/D159_2018/Z15_AU/img/IMG_065691.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_aerial_test/D159_2018/Z15_AU/img/IMG_647808.tif b/tests/data/flair2/FLAIR2/flair_2_aerial_test/D159_2018/Z15_AU/img/IMG_647808.tif new file mode 100644 index 00000000000..b52691db2d0 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_aerial_test/D159_2018/Z15_AU/img/IMG_647808.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_aerial_test/D381_2012/Z15_QT/img/IMG_215360.tif b/tests/data/flair2/FLAIR2/flair_2_aerial_test/D381_2012/Z15_QT/img/IMG_215360.tif new file mode 100644 index 00000000000..171d9ac1de3 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_aerial_test/D381_2012/Z15_QT/img/IMG_215360.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_aerial_test/D381_2012/Z15_QT/img/IMG_312966.tif b/tests/data/flair2/FLAIR2/flair_2_aerial_test/D381_2012/Z15_QT/img/IMG_312966.tif new file mode 100644 index 00000000000..56b7360d211 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_aerial_test/D381_2012/Z15_QT/img/IMG_312966.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_aerial_test/D388_2019/Z16_RE/img/IMG_320394.tif b/tests/data/flair2/FLAIR2/flair_2_aerial_test/D388_2019/Z16_RE/img/IMG_320394.tif new file mode 100644 index 00000000000..71c2d6958c2 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_aerial_test/D388_2019/Z16_RE/img/IMG_320394.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_aerial_test/D388_2019/Z16_RE/img/IMG_703337.tif b/tests/data/flair2/FLAIR2/flair_2_aerial_test/D388_2019/Z16_RE/img/IMG_703337.tif new file mode 100644 index 00000000000..807428dac67 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_aerial_test/D388_2019/Z16_RE/img/IMG_703337.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_aerial_test/D590_2016/Z18_GO/img/IMG_492040.tif b/tests/data/flair2/FLAIR2/flair_2_aerial_test/D590_2016/Z18_GO/img/IMG_492040.tif new file mode 100644 index 00000000000..1291b4966a1 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_aerial_test/D590_2016/Z18_GO/img/IMG_492040.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_aerial_test/D590_2016/Z18_GO/img/IMG_545250.tif b/tests/data/flair2/FLAIR2/flair_2_aerial_test/D590_2016/Z18_GO/img/IMG_545250.tif new file mode 100644 index 00000000000..5fdc2ff8ae8 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_aerial_test/D590_2016/Z18_GO/img/IMG_545250.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_aerial_test/D964_2021/Z17_FO/img/IMG_863235.tif b/tests/data/flair2/FLAIR2/flair_2_aerial_test/D964_2021/Z17_FO/img/IMG_863235.tif new file mode 100644 index 00000000000..fef2f27eec0 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_aerial_test/D964_2021/Z17_FO/img/IMG_863235.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_aerial_test/D964_2021/Z17_FO/img/IMG_960096.tif b/tests/data/flair2/FLAIR2/flair_2_aerial_test/D964_2021/Z17_FO/img/IMG_960096.tif new file mode 100644 index 00000000000..6311a8b6815 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_aerial_test/D964_2021/Z17_FO/img/IMG_960096.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_centroids_sp_to_patch.zip b/tests/data/flair2/FLAIR2/flair_2_centroids_sp_to_patch.zip new file mode 100644 index 00000000000..f46798fba3b Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_centroids_sp_to_patch.zip differ diff --git a/tests/data/flair2/FLAIR2/flair_2_labels_test.zip b/tests/data/flair2/FLAIR2/flair_2_labels_test.zip new file mode 100644 index 00000000000..01ab63e4e9e Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_labels_test.zip differ diff --git a/tests/data/flair2/FLAIR2/flair_2_labels_test/D159_2018/Z15_AU/msk/MSK_065691.tif b/tests/data/flair2/FLAIR2/flair_2_labels_test/D159_2018/Z15_AU/msk/MSK_065691.tif new file mode 100644 index 00000000000..0eb524e008a Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_labels_test/D159_2018/Z15_AU/msk/MSK_065691.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_labels_test/D159_2018/Z15_AU/msk/MSK_647808.tif b/tests/data/flair2/FLAIR2/flair_2_labels_test/D159_2018/Z15_AU/msk/MSK_647808.tif new file mode 100644 index 00000000000..4c0d0357f0f Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_labels_test/D159_2018/Z15_AU/msk/MSK_647808.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_labels_test/D381_2012/Z15_QT/msk/MSK_215360.tif b/tests/data/flair2/FLAIR2/flair_2_labels_test/D381_2012/Z15_QT/msk/MSK_215360.tif new file mode 100644 index 00000000000..c9db783e5f2 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_labels_test/D381_2012/Z15_QT/msk/MSK_215360.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_labels_test/D381_2012/Z15_QT/msk/MSK_312966.tif b/tests/data/flair2/FLAIR2/flair_2_labels_test/D381_2012/Z15_QT/msk/MSK_312966.tif new file mode 100644 index 00000000000..fcd6172e881 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_labels_test/D381_2012/Z15_QT/msk/MSK_312966.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_labels_test/D388_2019/Z16_RE/msk/MSK_320394.tif b/tests/data/flair2/FLAIR2/flair_2_labels_test/D388_2019/Z16_RE/msk/MSK_320394.tif new file mode 100644 index 00000000000..f12dddae74a Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_labels_test/D388_2019/Z16_RE/msk/MSK_320394.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_labels_test/D388_2019/Z16_RE/msk/MSK_703337.tif b/tests/data/flair2/FLAIR2/flair_2_labels_test/D388_2019/Z16_RE/msk/MSK_703337.tif new file mode 100644 index 00000000000..ce55039cf00 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_labels_test/D388_2019/Z16_RE/msk/MSK_703337.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_labels_test/D590_2016/Z18_GO/msk/MSK_492040.tif b/tests/data/flair2/FLAIR2/flair_2_labels_test/D590_2016/Z18_GO/msk/MSK_492040.tif new file mode 100644 index 00000000000..599fba612df Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_labels_test/D590_2016/Z18_GO/msk/MSK_492040.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_labels_test/D590_2016/Z18_GO/msk/MSK_545250.tif b/tests/data/flair2/FLAIR2/flair_2_labels_test/D590_2016/Z18_GO/msk/MSK_545250.tif new file mode 100644 index 00000000000..03a66020985 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_labels_test/D590_2016/Z18_GO/msk/MSK_545250.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_labels_test/D964_2021/Z17_FO/msk/MSK_863235.tif b/tests/data/flair2/FLAIR2/flair_2_labels_test/D964_2021/Z17_FO/msk/MSK_863235.tif new file mode 100644 index 00000000000..c3bf800fcf5 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_labels_test/D964_2021/Z17_FO/msk/MSK_863235.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_labels_test/D964_2021/Z17_FO/msk/MSK_960096.tif b/tests/data/flair2/FLAIR2/flair_2_labels_test/D964_2021/Z17_FO/msk/MSK_960096.tif new file mode 100644 index 00000000000..0edaa52a5e7 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_labels_test/D964_2021/Z17_FO/msk/MSK_960096.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_sen_test.zip b/tests/data/flair2/FLAIR2/flair_2_sen_test.zip new file mode 100644 index 00000000000..084cb2f2d5c Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_sen_test.zip differ diff --git a/tests/data/flair2/FLAIR2/flair_2_sen_test/D159_2018/Z15_AU/sen/SEN2_sp_D159_2018_Z15_AU_data.npy b/tests/data/flair2/FLAIR2/flair_2_sen_test/D159_2018/Z15_AU/sen/SEN2_sp_D159_2018_Z15_AU_data.npy new file mode 100644 index 00000000000..e3050e1a665 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_sen_test/D159_2018/Z15_AU/sen/SEN2_sp_D159_2018_Z15_AU_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_sen_test/D159_2018/Z15_AU/sen/SEN2_sp_D159_2018_Z15_AU_masks.npy b/tests/data/flair2/FLAIR2/flair_2_sen_test/D159_2018/Z15_AU/sen/SEN2_sp_D159_2018_Z15_AU_masks.npy new file mode 100644 index 00000000000..59494deee14 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_sen_test/D159_2018/Z15_AU/sen/SEN2_sp_D159_2018_Z15_AU_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_sen_test/D159_2018/Z15_AU/sen/SEN2_sp_D159_2018_Z15_AU_products.txt b/tests/data/flair2/FLAIR2/flair_2_sen_test/D159_2018/Z15_AU/sen/SEN2_sp_D159_2018_Z15_AU_products.txt new file mode 100644 index 00000000000..d69ab4d9800 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_sen_test/D159_2018/Z15_AU/sen/SEN2_sp_D159_2018_Z15_AU_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_sen_test/D381_2012/Z15_QT/sen/SEN2_sp_D381_2012_Z15_QT_data.npy b/tests/data/flair2/FLAIR2/flair_2_sen_test/D381_2012/Z15_QT/sen/SEN2_sp_D381_2012_Z15_QT_data.npy new file mode 100644 index 00000000000..36fb147569a Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_sen_test/D381_2012/Z15_QT/sen/SEN2_sp_D381_2012_Z15_QT_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_sen_test/D381_2012/Z15_QT/sen/SEN2_sp_D381_2012_Z15_QT_masks.npy b/tests/data/flair2/FLAIR2/flair_2_sen_test/D381_2012/Z15_QT/sen/SEN2_sp_D381_2012_Z15_QT_masks.npy new file mode 100644 index 00000000000..888416fd334 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_sen_test/D381_2012/Z15_QT/sen/SEN2_sp_D381_2012_Z15_QT_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_sen_test/D381_2012/Z15_QT/sen/SEN2_sp_D381_2012_Z15_QT_products.txt b/tests/data/flair2/FLAIR2/flair_2_sen_test/D381_2012/Z15_QT/sen/SEN2_sp_D381_2012_Z15_QT_products.txt new file mode 100644 index 00000000000..d69ab4d9800 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_sen_test/D381_2012/Z15_QT/sen/SEN2_sp_D381_2012_Z15_QT_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_sen_test/D388_2019/Z16_RE/sen/SEN2_sp_D388_2019_Z16_RE_data.npy b/tests/data/flair2/FLAIR2/flair_2_sen_test/D388_2019/Z16_RE/sen/SEN2_sp_D388_2019_Z16_RE_data.npy new file mode 100644 index 00000000000..aae20ae819d Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_sen_test/D388_2019/Z16_RE/sen/SEN2_sp_D388_2019_Z16_RE_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_sen_test/D388_2019/Z16_RE/sen/SEN2_sp_D388_2019_Z16_RE_masks.npy b/tests/data/flair2/FLAIR2/flair_2_sen_test/D388_2019/Z16_RE/sen/SEN2_sp_D388_2019_Z16_RE_masks.npy new file mode 100644 index 00000000000..13b57bdad83 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_sen_test/D388_2019/Z16_RE/sen/SEN2_sp_D388_2019_Z16_RE_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_sen_test/D388_2019/Z16_RE/sen/SEN2_sp_D388_2019_Z16_RE_products.txt b/tests/data/flair2/FLAIR2/flair_2_sen_test/D388_2019/Z16_RE/sen/SEN2_sp_D388_2019_Z16_RE_products.txt new file mode 100644 index 00000000000..0aee5f76843 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_sen_test/D388_2019/Z16_RE/sen/SEN2_sp_D388_2019_Z16_RE_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_sen_test/D590_2016/Z18_GO/sen/SEN2_sp_D590_2016_Z18_GO_data.npy b/tests/data/flair2/FLAIR2/flair_2_sen_test/D590_2016/Z18_GO/sen/SEN2_sp_D590_2016_Z18_GO_data.npy new file mode 100644 index 00000000000..d20330d6f84 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_sen_test/D590_2016/Z18_GO/sen/SEN2_sp_D590_2016_Z18_GO_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_sen_test/D590_2016/Z18_GO/sen/SEN2_sp_D590_2016_Z18_GO_masks.npy b/tests/data/flair2/FLAIR2/flair_2_sen_test/D590_2016/Z18_GO/sen/SEN2_sp_D590_2016_Z18_GO_masks.npy new file mode 100644 index 00000000000..77c42fca5c8 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_sen_test/D590_2016/Z18_GO/sen/SEN2_sp_D590_2016_Z18_GO_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_sen_test/D590_2016/Z18_GO/sen/SEN2_sp_D590_2016_Z18_GO_products.txt b/tests/data/flair2/FLAIR2/flair_2_sen_test/D590_2016/Z18_GO/sen/SEN2_sp_D590_2016_Z18_GO_products.txt new file mode 100644 index 00000000000..1c7c6c9ddc7 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_sen_test/D590_2016/Z18_GO/sen/SEN2_sp_D590_2016_Z18_GO_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_sen_test/D964_2021/Z17_FO/sen/SEN2_sp_D964_2021_Z17_FO_data.npy b/tests/data/flair2/FLAIR2/flair_2_sen_test/D964_2021/Z17_FO/sen/SEN2_sp_D964_2021_Z17_FO_data.npy new file mode 100644 index 00000000000..c3325693a35 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_sen_test/D964_2021/Z17_FO/sen/SEN2_sp_D964_2021_Z17_FO_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_sen_test/D964_2021/Z17_FO/sen/SEN2_sp_D964_2021_Z17_FO_masks.npy b/tests/data/flair2/FLAIR2/flair_2_sen_test/D964_2021/Z17_FO/sen/SEN2_sp_D964_2021_Z17_FO_masks.npy new file mode 100644 index 00000000000..ae1d589e1f1 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_sen_test/D964_2021/Z17_FO/sen/SEN2_sp_D964_2021_Z17_FO_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_sen_test/D964_2021/Z17_FO/sen/SEN2_sp_D964_2021_Z17_FO_products.txt b/tests/data/flair2/FLAIR2/flair_2_sen_test/D964_2021/Z17_FO/sen/SEN2_sp_D964_2021_Z17_FO_products.txt new file mode 100644 index 00000000000..1c7c6c9ddc7 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_sen_test/D964_2021/Z17_FO/sen/SEN2_sp_D964_2021_Z17_FO_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset.zip b/tests/data/flair2/FLAIR2/flair_2_toy_dataset.zip new file mode 100644 index 00000000000..4351007b83a Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset.zip differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair-2_centroids_sp_to_patch.json b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair-2_centroids_sp_to_patch.json new file mode 100644 index 00000000000..b1d35abd2f0 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair-2_centroids_sp_to_patch.json @@ -0,0 +1 @@ +{"IMG_273729.tif": [16, 16], "IMG_660532.tif": [16, 16], "IMG_222419.tif": [16, 16], "IMG_291261.tif": [16, 16], "IMG_130148.tif": [16, 16], "IMG_866506.tif": [16, 16], "IMG_069499.tif": [16, 16], "IMG_379153.tif": [16, 16], "IMG_758165.tif": [16, 16], "IMG_446805.tif": [16, 16], "IMG_821871.tif": [16, 16], "IMG_463424.tif": [16, 16], "IMG_881682.tif": [16, 16], "IMG_966251.tif": [16, 16], "IMG_574217.tif": [16, 16], "IMG_658262.tif": [16, 16], "IMG_516804.tif": [16, 16], "IMG_359115.tif": [16, 16], "IMG_775995.tif": [16, 16], "IMG_145759.tif": [16, 16], "IMG_545250.tif": [16, 16], "IMG_492040.tif": [16, 16], "IMG_320394.tif": [16, 16], "IMG_703337.tif": [16, 16], "IMG_312966.tif": [16, 16], "IMG_215360.tif": [16, 16], "IMG_065691.tif": [16, 16], "IMG_647808.tif": [16, 16], "IMG_960096.tif": [16, 16], "IMG_863235.tif": [16, 16]} \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D159_2018/Z15_AU/img/IMG_065691.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D159_2018/Z15_AU/img/IMG_065691.tif new file mode 100644 index 00000000000..d6804bb5bf9 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D159_2018/Z15_AU/img/IMG_065691.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D159_2018/Z15_AU/img/IMG_647808.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D159_2018/Z15_AU/img/IMG_647808.tif new file mode 100644 index 00000000000..b52691db2d0 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D159_2018/Z15_AU/img/IMG_647808.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D381_2012/Z15_QT/img/IMG_215360.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D381_2012/Z15_QT/img/IMG_215360.tif new file mode 100644 index 00000000000..171d9ac1de3 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D381_2012/Z15_QT/img/IMG_215360.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D381_2012/Z15_QT/img/IMG_312966.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D381_2012/Z15_QT/img/IMG_312966.tif new file mode 100644 index 00000000000..56b7360d211 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D381_2012/Z15_QT/img/IMG_312966.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D388_2019/Z16_RE/img/IMG_320394.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D388_2019/Z16_RE/img/IMG_320394.tif new file mode 100644 index 00000000000..71c2d6958c2 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D388_2019/Z16_RE/img/IMG_320394.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D388_2019/Z16_RE/img/IMG_703337.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D388_2019/Z16_RE/img/IMG_703337.tif new file mode 100644 index 00000000000..807428dac67 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D388_2019/Z16_RE/img/IMG_703337.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D590_2016/Z18_GO/img/IMG_492040.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D590_2016/Z18_GO/img/IMG_492040.tif new file mode 100644 index 00000000000..1291b4966a1 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D590_2016/Z18_GO/img/IMG_492040.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D590_2016/Z18_GO/img/IMG_545250.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D590_2016/Z18_GO/img/IMG_545250.tif new file mode 100644 index 00000000000..5fdc2ff8ae8 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D590_2016/Z18_GO/img/IMG_545250.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D964_2021/Z17_FO/img/IMG_863235.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D964_2021/Z17_FO/img/IMG_863235.tif new file mode 100644 index 00000000000..fef2f27eec0 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D964_2021/Z17_FO/img/IMG_863235.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D964_2021/Z17_FO/img/IMG_960096.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D964_2021/Z17_FO/img/IMG_960096.tif new file mode 100644 index 00000000000..6311a8b6815 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_test/D964_2021/Z17_FO/img/IMG_960096.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D162_2014/Z19_RM/img/IMG_069499.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D162_2014/Z19_RM/img/IMG_069499.tif new file mode 100644 index 00000000000..d7e673aab37 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D162_2014/Z19_RM/img/IMG_069499.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D162_2014/Z19_RM/img/IMG_379153.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D162_2014/Z19_RM/img/IMG_379153.tif new file mode 100644 index 00000000000..42e29de1bb5 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D162_2014/Z19_RM/img/IMG_379153.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D217_2021/Z14_XG/img/IMG_130148.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D217_2021/Z14_XG/img/IMG_130148.tif new file mode 100644 index 00000000000..15b80a2dc95 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D217_2021/Z14_XG/img/IMG_130148.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D217_2021/Z14_XG/img/IMG_866506.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D217_2021/Z14_XG/img/IMG_866506.tif new file mode 100644 index 00000000000..a18977e6c5d Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D217_2021/Z14_XG/img/IMG_866506.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D300_2013/Z19_PU/img/IMG_222419.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D300_2013/Z19_PU/img/IMG_222419.tif new file mode 100644 index 00000000000..e25393fa2d8 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D300_2013/Z19_PU/img/IMG_222419.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D300_2013/Z19_PU/img/IMG_291261.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D300_2013/Z19_PU/img/IMG_291261.tif new file mode 100644 index 00000000000..e051b4d2bc7 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D300_2013/Z19_PU/img/IMG_291261.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D346_2018/Z12_IE/img/IMG_273729.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D346_2018/Z12_IE/img/IMG_273729.tif new file mode 100644 index 00000000000..ab3a2560d21 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D346_2018/Z12_IE/img/IMG_273729.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D346_2018/Z12_IE/img/IMG_660532.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D346_2018/Z12_IE/img/IMG_660532.tif new file mode 100644 index 00000000000..a0bbe2ecdeb Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D346_2018/Z12_IE/img/IMG_660532.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D565_2014/Z18_DP/img/IMG_359115.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D565_2014/Z18_DP/img/IMG_359115.tif new file mode 100644 index 00000000000..313119459a4 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D565_2014/Z18_DP/img/IMG_359115.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D565_2014/Z18_DP/img/IMG_516804.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D565_2014/Z18_DP/img/IMG_516804.tif new file mode 100644 index 00000000000..6596bc17252 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D565_2014/Z18_DP/img/IMG_516804.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D616_2018/Z10_OK/img/IMG_574217.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D616_2018/Z10_OK/img/IMG_574217.tif new file mode 100644 index 00000000000..26e23481183 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D616_2018/Z10_OK/img/IMG_574217.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D616_2018/Z10_OK/img/IMG_658262.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D616_2018/Z10_OK/img/IMG_658262.tif new file mode 100644 index 00000000000..e19fb3d4201 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D616_2018/Z10_OK/img/IMG_658262.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D782_2015/Z10_SW/img/IMG_446805.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D782_2015/Z10_SW/img/IMG_446805.tif new file mode 100644 index 00000000000..fccfbc59ec8 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D782_2015/Z10_SW/img/IMG_446805.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D782_2015/Z10_SW/img/IMG_758165.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D782_2015/Z10_SW/img/IMG_758165.tif new file mode 100644 index 00000000000..783c1379648 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D782_2015/Z10_SW/img/IMG_758165.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D798_2011/Z12_MP/img/IMG_145759.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D798_2011/Z12_MP/img/IMG_145759.tif new file mode 100644 index 00000000000..142dc66252a Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D798_2011/Z12_MP/img/IMG_145759.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D798_2011/Z12_MP/img/IMG_775995.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D798_2011/Z12_MP/img/IMG_775995.tif new file mode 100644 index 00000000000..3ed7e2f46b1 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D798_2011/Z12_MP/img/IMG_775995.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D839_2016/Z18_RZ/img/IMG_463424.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D839_2016/Z18_RZ/img/IMG_463424.tif new file mode 100644 index 00000000000..5575d3957f1 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D839_2016/Z18_RZ/img/IMG_463424.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D839_2016/Z18_RZ/img/IMG_821871.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D839_2016/Z18_RZ/img/IMG_821871.tif new file mode 100644 index 00000000000..cdea1c7fc96 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D839_2016/Z18_RZ/img/IMG_821871.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D893_2022/Z11_XN/img/IMG_881682.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D893_2022/Z11_XN/img/IMG_881682.tif new file mode 100644 index 00000000000..d84a46c3f43 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D893_2022/Z11_XN/img/IMG_881682.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D893_2022/Z11_XN/img/IMG_966251.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D893_2022/Z11_XN/img/IMG_966251.tif new file mode 100644 index 00000000000..62c88e0a65f Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_aerial_train/D893_2022/Z11_XN/img/IMG_966251.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D159_2018/Z15_AU/msk/MSK_065691.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D159_2018/Z15_AU/msk/MSK_065691.tif new file mode 100644 index 00000000000..0eb524e008a Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D159_2018/Z15_AU/msk/MSK_065691.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D159_2018/Z15_AU/msk/MSK_647808.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D159_2018/Z15_AU/msk/MSK_647808.tif new file mode 100644 index 00000000000..4c0d0357f0f Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D159_2018/Z15_AU/msk/MSK_647808.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D381_2012/Z15_QT/msk/MSK_215360.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D381_2012/Z15_QT/msk/MSK_215360.tif new file mode 100644 index 00000000000..c9db783e5f2 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D381_2012/Z15_QT/msk/MSK_215360.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D381_2012/Z15_QT/msk/MSK_312966.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D381_2012/Z15_QT/msk/MSK_312966.tif new file mode 100644 index 00000000000..fcd6172e881 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D381_2012/Z15_QT/msk/MSK_312966.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D388_2019/Z16_RE/msk/MSK_320394.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D388_2019/Z16_RE/msk/MSK_320394.tif new file mode 100644 index 00000000000..f12dddae74a Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D388_2019/Z16_RE/msk/MSK_320394.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D388_2019/Z16_RE/msk/MSK_703337.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D388_2019/Z16_RE/msk/MSK_703337.tif new file mode 100644 index 00000000000..ce55039cf00 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D388_2019/Z16_RE/msk/MSK_703337.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D590_2016/Z18_GO/msk/MSK_492040.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D590_2016/Z18_GO/msk/MSK_492040.tif new file mode 100644 index 00000000000..599fba612df Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D590_2016/Z18_GO/msk/MSK_492040.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D590_2016/Z18_GO/msk/MSK_545250.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D590_2016/Z18_GO/msk/MSK_545250.tif new file mode 100644 index 00000000000..03a66020985 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D590_2016/Z18_GO/msk/MSK_545250.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D964_2021/Z17_FO/msk/MSK_863235.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D964_2021/Z17_FO/msk/MSK_863235.tif new file mode 100644 index 00000000000..c3bf800fcf5 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D964_2021/Z17_FO/msk/MSK_863235.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D964_2021/Z17_FO/msk/MSK_960096.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D964_2021/Z17_FO/msk/MSK_960096.tif new file mode 100644 index 00000000000..0edaa52a5e7 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_test/D964_2021/Z17_FO/msk/MSK_960096.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D162_2014/Z19_RM/msk/MSK_069499.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D162_2014/Z19_RM/msk/MSK_069499.tif new file mode 100644 index 00000000000..2efba87b8d1 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D162_2014/Z19_RM/msk/MSK_069499.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D162_2014/Z19_RM/msk/MSK_379153.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D162_2014/Z19_RM/msk/MSK_379153.tif new file mode 100644 index 00000000000..60b20fc8d6f Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D162_2014/Z19_RM/msk/MSK_379153.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D217_2021/Z14_XG/msk/MSK_130148.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D217_2021/Z14_XG/msk/MSK_130148.tif new file mode 100644 index 00000000000..702c4c08b7f Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D217_2021/Z14_XG/msk/MSK_130148.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D217_2021/Z14_XG/msk/MSK_866506.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D217_2021/Z14_XG/msk/MSK_866506.tif new file mode 100644 index 00000000000..61cdb0df364 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D217_2021/Z14_XG/msk/MSK_866506.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D300_2013/Z19_PU/msk/MSK_222419.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D300_2013/Z19_PU/msk/MSK_222419.tif new file mode 100644 index 00000000000..2f2752d4cc0 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D300_2013/Z19_PU/msk/MSK_222419.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D300_2013/Z19_PU/msk/MSK_291261.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D300_2013/Z19_PU/msk/MSK_291261.tif new file mode 100644 index 00000000000..c2d390c356f Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D300_2013/Z19_PU/msk/MSK_291261.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D346_2018/Z12_IE/msk/MSK_273729.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D346_2018/Z12_IE/msk/MSK_273729.tif new file mode 100644 index 00000000000..6af6866db97 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D346_2018/Z12_IE/msk/MSK_273729.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D346_2018/Z12_IE/msk/MSK_660532.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D346_2018/Z12_IE/msk/MSK_660532.tif new file mode 100644 index 00000000000..a8550264536 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D346_2018/Z12_IE/msk/MSK_660532.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D565_2014/Z18_DP/msk/MSK_359115.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D565_2014/Z18_DP/msk/MSK_359115.tif new file mode 100644 index 00000000000..d9f9826493a Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D565_2014/Z18_DP/msk/MSK_359115.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D565_2014/Z18_DP/msk/MSK_516804.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D565_2014/Z18_DP/msk/MSK_516804.tif new file mode 100644 index 00000000000..68f5a37cf7d Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D565_2014/Z18_DP/msk/MSK_516804.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D616_2018/Z10_OK/msk/MSK_574217.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D616_2018/Z10_OK/msk/MSK_574217.tif new file mode 100644 index 00000000000..7689c4535a7 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D616_2018/Z10_OK/msk/MSK_574217.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D616_2018/Z10_OK/msk/MSK_658262.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D616_2018/Z10_OK/msk/MSK_658262.tif new file mode 100644 index 00000000000..757bb0f0e2c Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D616_2018/Z10_OK/msk/MSK_658262.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D782_2015/Z10_SW/msk/MSK_446805.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D782_2015/Z10_SW/msk/MSK_446805.tif new file mode 100644 index 00000000000..2a5dd979fa1 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D782_2015/Z10_SW/msk/MSK_446805.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D782_2015/Z10_SW/msk/MSK_758165.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D782_2015/Z10_SW/msk/MSK_758165.tif new file mode 100644 index 00000000000..ec3b5a7d954 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D782_2015/Z10_SW/msk/MSK_758165.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D798_2011/Z12_MP/msk/MSK_145759.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D798_2011/Z12_MP/msk/MSK_145759.tif new file mode 100644 index 00000000000..0a863cbe1aa Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D798_2011/Z12_MP/msk/MSK_145759.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D798_2011/Z12_MP/msk/MSK_775995.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D798_2011/Z12_MP/msk/MSK_775995.tif new file mode 100644 index 00000000000..2560cb3d125 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D798_2011/Z12_MP/msk/MSK_775995.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D839_2016/Z18_RZ/msk/MSK_463424.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D839_2016/Z18_RZ/msk/MSK_463424.tif new file mode 100644 index 00000000000..e3d4e5ef919 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D839_2016/Z18_RZ/msk/MSK_463424.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D839_2016/Z18_RZ/msk/MSK_821871.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D839_2016/Z18_RZ/msk/MSK_821871.tif new file mode 100644 index 00000000000..4dcc592d2d6 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D839_2016/Z18_RZ/msk/MSK_821871.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D893_2022/Z11_XN/msk/MSK_881682.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D893_2022/Z11_XN/msk/MSK_881682.tif new file mode 100644 index 00000000000..81567057698 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D893_2022/Z11_XN/msk/MSK_881682.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D893_2022/Z11_XN/msk/MSK_966251.tif b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D893_2022/Z11_XN/msk/MSK_966251.tif new file mode 100644 index 00000000000..d9c7477dedc Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_labels_train/D893_2022/Z11_XN/msk/MSK_966251.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D159_2018/Z15_AU/sen/SEN2_sp_D159_2018_Z15_AU_data.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D159_2018/Z15_AU/sen/SEN2_sp_D159_2018_Z15_AU_data.npy new file mode 100644 index 00000000000..e3050e1a665 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D159_2018/Z15_AU/sen/SEN2_sp_D159_2018_Z15_AU_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D159_2018/Z15_AU/sen/SEN2_sp_D159_2018_Z15_AU_masks.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D159_2018/Z15_AU/sen/SEN2_sp_D159_2018_Z15_AU_masks.npy new file mode 100644 index 00000000000..59494deee14 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D159_2018/Z15_AU/sen/SEN2_sp_D159_2018_Z15_AU_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D159_2018/Z15_AU/sen/SEN2_sp_D159_2018_Z15_AU_products.txt b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D159_2018/Z15_AU/sen/SEN2_sp_D159_2018_Z15_AU_products.txt new file mode 100644 index 00000000000..d69ab4d9800 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D159_2018/Z15_AU/sen/SEN2_sp_D159_2018_Z15_AU_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D381_2012/Z15_QT/sen/SEN2_sp_D381_2012_Z15_QT_data.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D381_2012/Z15_QT/sen/SEN2_sp_D381_2012_Z15_QT_data.npy new file mode 100644 index 00000000000..36fb147569a Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D381_2012/Z15_QT/sen/SEN2_sp_D381_2012_Z15_QT_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D381_2012/Z15_QT/sen/SEN2_sp_D381_2012_Z15_QT_masks.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D381_2012/Z15_QT/sen/SEN2_sp_D381_2012_Z15_QT_masks.npy new file mode 100644 index 00000000000..888416fd334 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D381_2012/Z15_QT/sen/SEN2_sp_D381_2012_Z15_QT_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D381_2012/Z15_QT/sen/SEN2_sp_D381_2012_Z15_QT_products.txt b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D381_2012/Z15_QT/sen/SEN2_sp_D381_2012_Z15_QT_products.txt new file mode 100644 index 00000000000..d69ab4d9800 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D381_2012/Z15_QT/sen/SEN2_sp_D381_2012_Z15_QT_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D388_2019/Z16_RE/sen/SEN2_sp_D388_2019_Z16_RE_data.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D388_2019/Z16_RE/sen/SEN2_sp_D388_2019_Z16_RE_data.npy new file mode 100644 index 00000000000..aae20ae819d Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D388_2019/Z16_RE/sen/SEN2_sp_D388_2019_Z16_RE_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D388_2019/Z16_RE/sen/SEN2_sp_D388_2019_Z16_RE_masks.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D388_2019/Z16_RE/sen/SEN2_sp_D388_2019_Z16_RE_masks.npy new file mode 100644 index 00000000000..13b57bdad83 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D388_2019/Z16_RE/sen/SEN2_sp_D388_2019_Z16_RE_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D388_2019/Z16_RE/sen/SEN2_sp_D388_2019_Z16_RE_products.txt b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D388_2019/Z16_RE/sen/SEN2_sp_D388_2019_Z16_RE_products.txt new file mode 100644 index 00000000000..0aee5f76843 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D388_2019/Z16_RE/sen/SEN2_sp_D388_2019_Z16_RE_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D590_2016/Z18_GO/sen/SEN2_sp_D590_2016_Z18_GO_data.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D590_2016/Z18_GO/sen/SEN2_sp_D590_2016_Z18_GO_data.npy new file mode 100644 index 00000000000..d20330d6f84 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D590_2016/Z18_GO/sen/SEN2_sp_D590_2016_Z18_GO_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D590_2016/Z18_GO/sen/SEN2_sp_D590_2016_Z18_GO_masks.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D590_2016/Z18_GO/sen/SEN2_sp_D590_2016_Z18_GO_masks.npy new file mode 100644 index 00000000000..77c42fca5c8 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D590_2016/Z18_GO/sen/SEN2_sp_D590_2016_Z18_GO_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D590_2016/Z18_GO/sen/SEN2_sp_D590_2016_Z18_GO_products.txt b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D590_2016/Z18_GO/sen/SEN2_sp_D590_2016_Z18_GO_products.txt new file mode 100644 index 00000000000..1c7c6c9ddc7 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D590_2016/Z18_GO/sen/SEN2_sp_D590_2016_Z18_GO_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D964_2021/Z17_FO/sen/SEN2_sp_D964_2021_Z17_FO_data.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D964_2021/Z17_FO/sen/SEN2_sp_D964_2021_Z17_FO_data.npy new file mode 100644 index 00000000000..c3325693a35 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D964_2021/Z17_FO/sen/SEN2_sp_D964_2021_Z17_FO_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D964_2021/Z17_FO/sen/SEN2_sp_D964_2021_Z17_FO_masks.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D964_2021/Z17_FO/sen/SEN2_sp_D964_2021_Z17_FO_masks.npy new file mode 100644 index 00000000000..ae1d589e1f1 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D964_2021/Z17_FO/sen/SEN2_sp_D964_2021_Z17_FO_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D964_2021/Z17_FO/sen/SEN2_sp_D964_2021_Z17_FO_products.txt b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D964_2021/Z17_FO/sen/SEN2_sp_D964_2021_Z17_FO_products.txt new file mode 100644 index 00000000000..1c7c6c9ddc7 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_test/D964_2021/Z17_FO/sen/SEN2_sp_D964_2021_Z17_FO_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D162_2014/Z19_RM/sen/SEN2_sp_D162_2014_Z19_RM_data.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D162_2014/Z19_RM/sen/SEN2_sp_D162_2014_Z19_RM_data.npy new file mode 100644 index 00000000000..51e00931a7d Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D162_2014/Z19_RM/sen/SEN2_sp_D162_2014_Z19_RM_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D162_2014/Z19_RM/sen/SEN2_sp_D162_2014_Z19_RM_masks.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D162_2014/Z19_RM/sen/SEN2_sp_D162_2014_Z19_RM_masks.npy new file mode 100644 index 00000000000..722da4e4452 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D162_2014/Z19_RM/sen/SEN2_sp_D162_2014_Z19_RM_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D162_2014/Z19_RM/sen/SEN2_sp_D162_2014_Z19_RM_products.txt b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D162_2014/Z19_RM/sen/SEN2_sp_D162_2014_Z19_RM_products.txt new file mode 100644 index 00000000000..4a2fee57ef7 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D162_2014/Z19_RM/sen/SEN2_sp_D162_2014_Z19_RM_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D217_2021/Z14_XG/sen/SEN2_sp_D217_2021_Z14_XG_data.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D217_2021/Z14_XG/sen/SEN2_sp_D217_2021_Z14_XG_data.npy new file mode 100644 index 00000000000..350ec67458a Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D217_2021/Z14_XG/sen/SEN2_sp_D217_2021_Z14_XG_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D217_2021/Z14_XG/sen/SEN2_sp_D217_2021_Z14_XG_masks.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D217_2021/Z14_XG/sen/SEN2_sp_D217_2021_Z14_XG_masks.npy new file mode 100644 index 00000000000..eaa60fd5670 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D217_2021/Z14_XG/sen/SEN2_sp_D217_2021_Z14_XG_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D217_2021/Z14_XG/sen/SEN2_sp_D217_2021_Z14_XG_products.txt b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D217_2021/Z14_XG/sen/SEN2_sp_D217_2021_Z14_XG_products.txt new file mode 100644 index 00000000000..d69ab4d9800 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D217_2021/Z14_XG/sen/SEN2_sp_D217_2021_Z14_XG_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D300_2013/Z19_PU/sen/SEN2_sp_D300_2013_Z19_PU_data.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D300_2013/Z19_PU/sen/SEN2_sp_D300_2013_Z19_PU_data.npy new file mode 100644 index 00000000000..8d930570482 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D300_2013/Z19_PU/sen/SEN2_sp_D300_2013_Z19_PU_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D300_2013/Z19_PU/sen/SEN2_sp_D300_2013_Z19_PU_masks.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D300_2013/Z19_PU/sen/SEN2_sp_D300_2013_Z19_PU_masks.npy new file mode 100644 index 00000000000..03426cbb99a Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D300_2013/Z19_PU/sen/SEN2_sp_D300_2013_Z19_PU_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D300_2013/Z19_PU/sen/SEN2_sp_D300_2013_Z19_PU_products.txt b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D300_2013/Z19_PU/sen/SEN2_sp_D300_2013_Z19_PU_products.txt new file mode 100644 index 00000000000..4a2fee57ef7 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D300_2013/Z19_PU/sen/SEN2_sp_D300_2013_Z19_PU_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D346_2018/Z12_IE/sen/SEN2_sp_D346_2018_Z12_IE_data.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D346_2018/Z12_IE/sen/SEN2_sp_D346_2018_Z12_IE_data.npy new file mode 100644 index 00000000000..e1ae61696db Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D346_2018/Z12_IE/sen/SEN2_sp_D346_2018_Z12_IE_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D346_2018/Z12_IE/sen/SEN2_sp_D346_2018_Z12_IE_masks.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D346_2018/Z12_IE/sen/SEN2_sp_D346_2018_Z12_IE_masks.npy new file mode 100644 index 00000000000..e14e030791c Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D346_2018/Z12_IE/sen/SEN2_sp_D346_2018_Z12_IE_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D346_2018/Z12_IE/sen/SEN2_sp_D346_2018_Z12_IE_products.txt b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D346_2018/Z12_IE/sen/SEN2_sp_D346_2018_Z12_IE_products.txt new file mode 100644 index 00000000000..5a239933a81 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D346_2018/Z12_IE/sen/SEN2_sp_D346_2018_Z12_IE_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D565_2014/Z18_DP/sen/SEN2_sp_D565_2014_Z18_DP_data.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D565_2014/Z18_DP/sen/SEN2_sp_D565_2014_Z18_DP_data.npy new file mode 100644 index 00000000000..8b88e9f5900 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D565_2014/Z18_DP/sen/SEN2_sp_D565_2014_Z18_DP_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D565_2014/Z18_DP/sen/SEN2_sp_D565_2014_Z18_DP_masks.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D565_2014/Z18_DP/sen/SEN2_sp_D565_2014_Z18_DP_masks.npy new file mode 100644 index 00000000000..ac3de5ce6d7 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D565_2014/Z18_DP/sen/SEN2_sp_D565_2014_Z18_DP_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D565_2014/Z18_DP/sen/SEN2_sp_D565_2014_Z18_DP_products.txt b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D565_2014/Z18_DP/sen/SEN2_sp_D565_2014_Z18_DP_products.txt new file mode 100644 index 00000000000..1c7c6c9ddc7 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D565_2014/Z18_DP/sen/SEN2_sp_D565_2014_Z18_DP_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D616_2018/Z10_OK/sen/SEN2_sp_D616_2018_Z10_OK_data.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D616_2018/Z10_OK/sen/SEN2_sp_D616_2018_Z10_OK_data.npy new file mode 100644 index 00000000000..7aa3d00b7de Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D616_2018/Z10_OK/sen/SEN2_sp_D616_2018_Z10_OK_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D616_2018/Z10_OK/sen/SEN2_sp_D616_2018_Z10_OK_masks.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D616_2018/Z10_OK/sen/SEN2_sp_D616_2018_Z10_OK_masks.npy new file mode 100644 index 00000000000..a94c4ea5edd Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D616_2018/Z10_OK/sen/SEN2_sp_D616_2018_Z10_OK_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D616_2018/Z10_OK/sen/SEN2_sp_D616_2018_Z10_OK_products.txt b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D616_2018/Z10_OK/sen/SEN2_sp_D616_2018_Z10_OK_products.txt new file mode 100644 index 00000000000..e3102a94f19 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D616_2018/Z10_OK/sen/SEN2_sp_D616_2018_Z10_OK_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D782_2015/Z10_SW/sen/SEN2_sp_D782_2015_Z10_SW_data.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D782_2015/Z10_SW/sen/SEN2_sp_D782_2015_Z10_SW_data.npy new file mode 100644 index 00000000000..d6592dc56b8 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D782_2015/Z10_SW/sen/SEN2_sp_D782_2015_Z10_SW_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D782_2015/Z10_SW/sen/SEN2_sp_D782_2015_Z10_SW_masks.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D782_2015/Z10_SW/sen/SEN2_sp_D782_2015_Z10_SW_masks.npy new file mode 100644 index 00000000000..46c0afa1000 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D782_2015/Z10_SW/sen/SEN2_sp_D782_2015_Z10_SW_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D782_2015/Z10_SW/sen/SEN2_sp_D782_2015_Z10_SW_products.txt b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D782_2015/Z10_SW/sen/SEN2_sp_D782_2015_Z10_SW_products.txt new file mode 100644 index 00000000000..e3102a94f19 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D782_2015/Z10_SW/sen/SEN2_sp_D782_2015_Z10_SW_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D798_2011/Z12_MP/sen/SEN2_sp_D798_2011_Z12_MP_data.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D798_2011/Z12_MP/sen/SEN2_sp_D798_2011_Z12_MP_data.npy new file mode 100644 index 00000000000..78efdaf8f73 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D798_2011/Z12_MP/sen/SEN2_sp_D798_2011_Z12_MP_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D798_2011/Z12_MP/sen/SEN2_sp_D798_2011_Z12_MP_masks.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D798_2011/Z12_MP/sen/SEN2_sp_D798_2011_Z12_MP_masks.npy new file mode 100644 index 00000000000..2c06dbfc16c Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D798_2011/Z12_MP/sen/SEN2_sp_D798_2011_Z12_MP_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D798_2011/Z12_MP/sen/SEN2_sp_D798_2011_Z12_MP_products.txt b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D798_2011/Z12_MP/sen/SEN2_sp_D798_2011_Z12_MP_products.txt new file mode 100644 index 00000000000..5a239933a81 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D798_2011/Z12_MP/sen/SEN2_sp_D798_2011_Z12_MP_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D839_2016/Z18_RZ/sen/SEN2_sp_D839_2016_Z18_RZ_data.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D839_2016/Z18_RZ/sen/SEN2_sp_D839_2016_Z18_RZ_data.npy new file mode 100644 index 00000000000..497e3ad825c Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D839_2016/Z18_RZ/sen/SEN2_sp_D839_2016_Z18_RZ_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D839_2016/Z18_RZ/sen/SEN2_sp_D839_2016_Z18_RZ_masks.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D839_2016/Z18_RZ/sen/SEN2_sp_D839_2016_Z18_RZ_masks.npy new file mode 100644 index 00000000000..da007ba3ba7 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D839_2016/Z18_RZ/sen/SEN2_sp_D839_2016_Z18_RZ_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D839_2016/Z18_RZ/sen/SEN2_sp_D839_2016_Z18_RZ_products.txt b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D839_2016/Z18_RZ/sen/SEN2_sp_D839_2016_Z18_RZ_products.txt new file mode 100644 index 00000000000..1c7c6c9ddc7 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D839_2016/Z18_RZ/sen/SEN2_sp_D839_2016_Z18_RZ_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D893_2022/Z11_XN/sen/SEN2_sp_D893_2022_Z11_XN_data.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D893_2022/Z11_XN/sen/SEN2_sp_D893_2022_Z11_XN_data.npy new file mode 100644 index 00000000000..05ba7a49e1d Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D893_2022/Z11_XN/sen/SEN2_sp_D893_2022_Z11_XN_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D893_2022/Z11_XN/sen/SEN2_sp_D893_2022_Z11_XN_masks.npy b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D893_2022/Z11_XN/sen/SEN2_sp_D893_2022_Z11_XN_masks.npy new file mode 100644 index 00000000000..15166ff2b0d Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D893_2022/Z11_XN/sen/SEN2_sp_D893_2022_Z11_XN_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D893_2022/Z11_XN/sen/SEN2_sp_D893_2022_Z11_XN_products.txt b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D893_2022/Z11_XN/sen/SEN2_sp_D893_2022_Z11_XN_products.txt new file mode 100644 index 00000000000..e3102a94f19 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_2_toy_dataset/flair_2_toy_sen_train/D893_2022/Z11_XN/sen/SEN2_sp_D893_2022_Z11_XN_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train.zip b/tests/data/flair2/FLAIR2/flair_aerial_train.zip new file mode 100644 index 00000000000..40cffd61b69 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train.zip differ diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train/D162_2014/Z19_RM/img/IMG_069499.tif b/tests/data/flair2/FLAIR2/flair_aerial_train/D162_2014/Z19_RM/img/IMG_069499.tif new file mode 100644 index 00000000000..d7e673aab37 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train/D162_2014/Z19_RM/img/IMG_069499.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train/D162_2014/Z19_RM/img/IMG_379153.tif b/tests/data/flair2/FLAIR2/flair_aerial_train/D162_2014/Z19_RM/img/IMG_379153.tif new file mode 100644 index 00000000000..42e29de1bb5 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train/D162_2014/Z19_RM/img/IMG_379153.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train/D217_2021/Z14_XG/img/IMG_130148.tif b/tests/data/flair2/FLAIR2/flair_aerial_train/D217_2021/Z14_XG/img/IMG_130148.tif new file mode 100644 index 00000000000..15b80a2dc95 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train/D217_2021/Z14_XG/img/IMG_130148.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train/D217_2021/Z14_XG/img/IMG_866506.tif b/tests/data/flair2/FLAIR2/flair_aerial_train/D217_2021/Z14_XG/img/IMG_866506.tif new file mode 100644 index 00000000000..a18977e6c5d Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train/D217_2021/Z14_XG/img/IMG_866506.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train/D300_2013/Z19_PU/img/IMG_222419.tif b/tests/data/flair2/FLAIR2/flair_aerial_train/D300_2013/Z19_PU/img/IMG_222419.tif new file mode 100644 index 00000000000..e25393fa2d8 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train/D300_2013/Z19_PU/img/IMG_222419.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train/D300_2013/Z19_PU/img/IMG_291261.tif b/tests/data/flair2/FLAIR2/flair_aerial_train/D300_2013/Z19_PU/img/IMG_291261.tif new file mode 100644 index 00000000000..e051b4d2bc7 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train/D300_2013/Z19_PU/img/IMG_291261.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train/D346_2018/Z12_IE/img/IMG_273729.tif b/tests/data/flair2/FLAIR2/flair_aerial_train/D346_2018/Z12_IE/img/IMG_273729.tif new file mode 100644 index 00000000000..ab3a2560d21 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train/D346_2018/Z12_IE/img/IMG_273729.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train/D346_2018/Z12_IE/img/IMG_660532.tif b/tests/data/flair2/FLAIR2/flair_aerial_train/D346_2018/Z12_IE/img/IMG_660532.tif new file mode 100644 index 00000000000..a0bbe2ecdeb Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train/D346_2018/Z12_IE/img/IMG_660532.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train/D565_2014/Z18_DP/img/IMG_359115.tif b/tests/data/flair2/FLAIR2/flair_aerial_train/D565_2014/Z18_DP/img/IMG_359115.tif new file mode 100644 index 00000000000..313119459a4 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train/D565_2014/Z18_DP/img/IMG_359115.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train/D565_2014/Z18_DP/img/IMG_516804.tif b/tests/data/flair2/FLAIR2/flair_aerial_train/D565_2014/Z18_DP/img/IMG_516804.tif new file mode 100644 index 00000000000..6596bc17252 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train/D565_2014/Z18_DP/img/IMG_516804.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train/D616_2018/Z10_OK/img/IMG_574217.tif b/tests/data/flair2/FLAIR2/flair_aerial_train/D616_2018/Z10_OK/img/IMG_574217.tif new file mode 100644 index 00000000000..26e23481183 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train/D616_2018/Z10_OK/img/IMG_574217.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train/D616_2018/Z10_OK/img/IMG_658262.tif b/tests/data/flair2/FLAIR2/flair_aerial_train/D616_2018/Z10_OK/img/IMG_658262.tif new file mode 100644 index 00000000000..e19fb3d4201 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train/D616_2018/Z10_OK/img/IMG_658262.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train/D782_2015/Z10_SW/img/IMG_446805.tif b/tests/data/flair2/FLAIR2/flair_aerial_train/D782_2015/Z10_SW/img/IMG_446805.tif new file mode 100644 index 00000000000..fccfbc59ec8 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train/D782_2015/Z10_SW/img/IMG_446805.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train/D782_2015/Z10_SW/img/IMG_758165.tif b/tests/data/flair2/FLAIR2/flair_aerial_train/D782_2015/Z10_SW/img/IMG_758165.tif new file mode 100644 index 00000000000..783c1379648 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train/D782_2015/Z10_SW/img/IMG_758165.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train/D798_2011/Z12_MP/img/IMG_145759.tif b/tests/data/flair2/FLAIR2/flair_aerial_train/D798_2011/Z12_MP/img/IMG_145759.tif new file mode 100644 index 00000000000..142dc66252a Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train/D798_2011/Z12_MP/img/IMG_145759.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train/D798_2011/Z12_MP/img/IMG_775995.tif b/tests/data/flair2/FLAIR2/flair_aerial_train/D798_2011/Z12_MP/img/IMG_775995.tif new file mode 100644 index 00000000000..3ed7e2f46b1 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train/D798_2011/Z12_MP/img/IMG_775995.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train/D839_2016/Z18_RZ/img/IMG_463424.tif b/tests/data/flair2/FLAIR2/flair_aerial_train/D839_2016/Z18_RZ/img/IMG_463424.tif new file mode 100644 index 00000000000..5575d3957f1 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train/D839_2016/Z18_RZ/img/IMG_463424.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train/D839_2016/Z18_RZ/img/IMG_821871.tif b/tests/data/flair2/FLAIR2/flair_aerial_train/D839_2016/Z18_RZ/img/IMG_821871.tif new file mode 100644 index 00000000000..cdea1c7fc96 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train/D839_2016/Z18_RZ/img/IMG_821871.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train/D893_2022/Z11_XN/img/IMG_881682.tif b/tests/data/flair2/FLAIR2/flair_aerial_train/D893_2022/Z11_XN/img/IMG_881682.tif new file mode 100644 index 00000000000..d84a46c3f43 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train/D893_2022/Z11_XN/img/IMG_881682.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_aerial_train/D893_2022/Z11_XN/img/IMG_966251.tif b/tests/data/flair2/FLAIR2/flair_aerial_train/D893_2022/Z11_XN/img/IMG_966251.tif new file mode 100644 index 00000000000..62c88e0a65f Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_aerial_train/D893_2022/Z11_XN/img/IMG_966251.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train.zip b/tests/data/flair2/FLAIR2/flair_labels_train.zip new file mode 100644 index 00000000000..5a9f9128c40 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train.zip differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train/D162_2014/Z19_RM/msk/MSK_069499.tif b/tests/data/flair2/FLAIR2/flair_labels_train/D162_2014/Z19_RM/msk/MSK_069499.tif new file mode 100644 index 00000000000..2efba87b8d1 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train/D162_2014/Z19_RM/msk/MSK_069499.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train/D162_2014/Z19_RM/msk/MSK_379153.tif b/tests/data/flair2/FLAIR2/flair_labels_train/D162_2014/Z19_RM/msk/MSK_379153.tif new file mode 100644 index 00000000000..60b20fc8d6f Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train/D162_2014/Z19_RM/msk/MSK_379153.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train/D217_2021/Z14_XG/msk/MSK_130148.tif b/tests/data/flair2/FLAIR2/flair_labels_train/D217_2021/Z14_XG/msk/MSK_130148.tif new file mode 100644 index 00000000000..702c4c08b7f Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train/D217_2021/Z14_XG/msk/MSK_130148.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train/D217_2021/Z14_XG/msk/MSK_866506.tif b/tests/data/flair2/FLAIR2/flair_labels_train/D217_2021/Z14_XG/msk/MSK_866506.tif new file mode 100644 index 00000000000..61cdb0df364 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train/D217_2021/Z14_XG/msk/MSK_866506.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train/D300_2013/Z19_PU/msk/MSK_222419.tif b/tests/data/flair2/FLAIR2/flair_labels_train/D300_2013/Z19_PU/msk/MSK_222419.tif new file mode 100644 index 00000000000..2f2752d4cc0 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train/D300_2013/Z19_PU/msk/MSK_222419.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train/D300_2013/Z19_PU/msk/MSK_291261.tif b/tests/data/flair2/FLAIR2/flair_labels_train/D300_2013/Z19_PU/msk/MSK_291261.tif new file mode 100644 index 00000000000..c2d390c356f Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train/D300_2013/Z19_PU/msk/MSK_291261.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train/D346_2018/Z12_IE/msk/MSK_273729.tif b/tests/data/flair2/FLAIR2/flair_labels_train/D346_2018/Z12_IE/msk/MSK_273729.tif new file mode 100644 index 00000000000..6af6866db97 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train/D346_2018/Z12_IE/msk/MSK_273729.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train/D346_2018/Z12_IE/msk/MSK_660532.tif b/tests/data/flair2/FLAIR2/flair_labels_train/D346_2018/Z12_IE/msk/MSK_660532.tif new file mode 100644 index 00000000000..a8550264536 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train/D346_2018/Z12_IE/msk/MSK_660532.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train/D565_2014/Z18_DP/msk/MSK_359115.tif b/tests/data/flair2/FLAIR2/flair_labels_train/D565_2014/Z18_DP/msk/MSK_359115.tif new file mode 100644 index 00000000000..d9f9826493a Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train/D565_2014/Z18_DP/msk/MSK_359115.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train/D565_2014/Z18_DP/msk/MSK_516804.tif b/tests/data/flair2/FLAIR2/flair_labels_train/D565_2014/Z18_DP/msk/MSK_516804.tif new file mode 100644 index 00000000000..68f5a37cf7d Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train/D565_2014/Z18_DP/msk/MSK_516804.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train/D616_2018/Z10_OK/msk/MSK_574217.tif b/tests/data/flair2/FLAIR2/flair_labels_train/D616_2018/Z10_OK/msk/MSK_574217.tif new file mode 100644 index 00000000000..7689c4535a7 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train/D616_2018/Z10_OK/msk/MSK_574217.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train/D616_2018/Z10_OK/msk/MSK_658262.tif b/tests/data/flair2/FLAIR2/flair_labels_train/D616_2018/Z10_OK/msk/MSK_658262.tif new file mode 100644 index 00000000000..757bb0f0e2c Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train/D616_2018/Z10_OK/msk/MSK_658262.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train/D782_2015/Z10_SW/msk/MSK_446805.tif b/tests/data/flair2/FLAIR2/flair_labels_train/D782_2015/Z10_SW/msk/MSK_446805.tif new file mode 100644 index 00000000000..2a5dd979fa1 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train/D782_2015/Z10_SW/msk/MSK_446805.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train/D782_2015/Z10_SW/msk/MSK_758165.tif b/tests/data/flair2/FLAIR2/flair_labels_train/D782_2015/Z10_SW/msk/MSK_758165.tif new file mode 100644 index 00000000000..ec3b5a7d954 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train/D782_2015/Z10_SW/msk/MSK_758165.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train/D798_2011/Z12_MP/msk/MSK_145759.tif b/tests/data/flair2/FLAIR2/flair_labels_train/D798_2011/Z12_MP/msk/MSK_145759.tif new file mode 100644 index 00000000000..0a863cbe1aa Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train/D798_2011/Z12_MP/msk/MSK_145759.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train/D798_2011/Z12_MP/msk/MSK_775995.tif b/tests/data/flair2/FLAIR2/flair_labels_train/D798_2011/Z12_MP/msk/MSK_775995.tif new file mode 100644 index 00000000000..2560cb3d125 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train/D798_2011/Z12_MP/msk/MSK_775995.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train/D839_2016/Z18_RZ/msk/MSK_463424.tif b/tests/data/flair2/FLAIR2/flair_labels_train/D839_2016/Z18_RZ/msk/MSK_463424.tif new file mode 100644 index 00000000000..e3d4e5ef919 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train/D839_2016/Z18_RZ/msk/MSK_463424.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train/D839_2016/Z18_RZ/msk/MSK_821871.tif b/tests/data/flair2/FLAIR2/flair_labels_train/D839_2016/Z18_RZ/msk/MSK_821871.tif new file mode 100644 index 00000000000..4dcc592d2d6 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train/D839_2016/Z18_RZ/msk/MSK_821871.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train/D893_2022/Z11_XN/msk/MSK_881682.tif b/tests/data/flair2/FLAIR2/flair_labels_train/D893_2022/Z11_XN/msk/MSK_881682.tif new file mode 100644 index 00000000000..81567057698 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train/D893_2022/Z11_XN/msk/MSK_881682.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_labels_train/D893_2022/Z11_XN/msk/MSK_966251.tif b/tests/data/flair2/FLAIR2/flair_labels_train/D893_2022/Z11_XN/msk/MSK_966251.tif new file mode 100644 index 00000000000..d9c7477dedc Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_labels_train/D893_2022/Z11_XN/msk/MSK_966251.tif differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train.zip b/tests/data/flair2/FLAIR2/flair_sen_train.zip new file mode 100644 index 00000000000..bb63b19c1d4 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train.zip differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D162_2014/Z19_RM/sen/SEN2_sp_D162_2014_Z19_RM_data.npy b/tests/data/flair2/FLAIR2/flair_sen_train/D162_2014/Z19_RM/sen/SEN2_sp_D162_2014_Z19_RM_data.npy new file mode 100644 index 00000000000..51e00931a7d Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train/D162_2014/Z19_RM/sen/SEN2_sp_D162_2014_Z19_RM_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D162_2014/Z19_RM/sen/SEN2_sp_D162_2014_Z19_RM_masks.npy b/tests/data/flair2/FLAIR2/flair_sen_train/D162_2014/Z19_RM/sen/SEN2_sp_D162_2014_Z19_RM_masks.npy new file mode 100644 index 00000000000..722da4e4452 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train/D162_2014/Z19_RM/sen/SEN2_sp_D162_2014_Z19_RM_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D162_2014/Z19_RM/sen/SEN2_sp_D162_2014_Z19_RM_products.txt b/tests/data/flair2/FLAIR2/flair_sen_train/D162_2014/Z19_RM/sen/SEN2_sp_D162_2014_Z19_RM_products.txt new file mode 100644 index 00000000000..4a2fee57ef7 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_sen_train/D162_2014/Z19_RM/sen/SEN2_sp_D162_2014_Z19_RM_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D217_2021/Z14_XG/sen/SEN2_sp_D217_2021_Z14_XG_data.npy b/tests/data/flair2/FLAIR2/flair_sen_train/D217_2021/Z14_XG/sen/SEN2_sp_D217_2021_Z14_XG_data.npy new file mode 100644 index 00000000000..350ec67458a Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train/D217_2021/Z14_XG/sen/SEN2_sp_D217_2021_Z14_XG_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D217_2021/Z14_XG/sen/SEN2_sp_D217_2021_Z14_XG_masks.npy b/tests/data/flair2/FLAIR2/flair_sen_train/D217_2021/Z14_XG/sen/SEN2_sp_D217_2021_Z14_XG_masks.npy new file mode 100644 index 00000000000..eaa60fd5670 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train/D217_2021/Z14_XG/sen/SEN2_sp_D217_2021_Z14_XG_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D217_2021/Z14_XG/sen/SEN2_sp_D217_2021_Z14_XG_products.txt b/tests/data/flair2/FLAIR2/flair_sen_train/D217_2021/Z14_XG/sen/SEN2_sp_D217_2021_Z14_XG_products.txt new file mode 100644 index 00000000000..d69ab4d9800 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_sen_train/D217_2021/Z14_XG/sen/SEN2_sp_D217_2021_Z14_XG_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D300_2013/Z19_PU/sen/SEN2_sp_D300_2013_Z19_PU_data.npy b/tests/data/flair2/FLAIR2/flair_sen_train/D300_2013/Z19_PU/sen/SEN2_sp_D300_2013_Z19_PU_data.npy new file mode 100644 index 00000000000..8d930570482 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train/D300_2013/Z19_PU/sen/SEN2_sp_D300_2013_Z19_PU_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D300_2013/Z19_PU/sen/SEN2_sp_D300_2013_Z19_PU_masks.npy b/tests/data/flair2/FLAIR2/flair_sen_train/D300_2013/Z19_PU/sen/SEN2_sp_D300_2013_Z19_PU_masks.npy new file mode 100644 index 00000000000..03426cbb99a Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train/D300_2013/Z19_PU/sen/SEN2_sp_D300_2013_Z19_PU_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D300_2013/Z19_PU/sen/SEN2_sp_D300_2013_Z19_PU_products.txt b/tests/data/flair2/FLAIR2/flair_sen_train/D300_2013/Z19_PU/sen/SEN2_sp_D300_2013_Z19_PU_products.txt new file mode 100644 index 00000000000..4a2fee57ef7 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_sen_train/D300_2013/Z19_PU/sen/SEN2_sp_D300_2013_Z19_PU_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D346_2018/Z12_IE/sen/SEN2_sp_D346_2018_Z12_IE_data.npy b/tests/data/flair2/FLAIR2/flair_sen_train/D346_2018/Z12_IE/sen/SEN2_sp_D346_2018_Z12_IE_data.npy new file mode 100644 index 00000000000..e1ae61696db Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train/D346_2018/Z12_IE/sen/SEN2_sp_D346_2018_Z12_IE_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D346_2018/Z12_IE/sen/SEN2_sp_D346_2018_Z12_IE_masks.npy b/tests/data/flair2/FLAIR2/flair_sen_train/D346_2018/Z12_IE/sen/SEN2_sp_D346_2018_Z12_IE_masks.npy new file mode 100644 index 00000000000..e14e030791c Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train/D346_2018/Z12_IE/sen/SEN2_sp_D346_2018_Z12_IE_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D346_2018/Z12_IE/sen/SEN2_sp_D346_2018_Z12_IE_products.txt b/tests/data/flair2/FLAIR2/flair_sen_train/D346_2018/Z12_IE/sen/SEN2_sp_D346_2018_Z12_IE_products.txt new file mode 100644 index 00000000000..5a239933a81 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_sen_train/D346_2018/Z12_IE/sen/SEN2_sp_D346_2018_Z12_IE_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D565_2014/Z18_DP/sen/SEN2_sp_D565_2014_Z18_DP_data.npy b/tests/data/flair2/FLAIR2/flair_sen_train/D565_2014/Z18_DP/sen/SEN2_sp_D565_2014_Z18_DP_data.npy new file mode 100644 index 00000000000..8b88e9f5900 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train/D565_2014/Z18_DP/sen/SEN2_sp_D565_2014_Z18_DP_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D565_2014/Z18_DP/sen/SEN2_sp_D565_2014_Z18_DP_masks.npy b/tests/data/flair2/FLAIR2/flair_sen_train/D565_2014/Z18_DP/sen/SEN2_sp_D565_2014_Z18_DP_masks.npy new file mode 100644 index 00000000000..ac3de5ce6d7 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train/D565_2014/Z18_DP/sen/SEN2_sp_D565_2014_Z18_DP_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D565_2014/Z18_DP/sen/SEN2_sp_D565_2014_Z18_DP_products.txt b/tests/data/flair2/FLAIR2/flair_sen_train/D565_2014/Z18_DP/sen/SEN2_sp_D565_2014_Z18_DP_products.txt new file mode 100644 index 00000000000..1c7c6c9ddc7 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_sen_train/D565_2014/Z18_DP/sen/SEN2_sp_D565_2014_Z18_DP_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D616_2018/Z10_OK/sen/SEN2_sp_D616_2018_Z10_OK_data.npy b/tests/data/flair2/FLAIR2/flair_sen_train/D616_2018/Z10_OK/sen/SEN2_sp_D616_2018_Z10_OK_data.npy new file mode 100644 index 00000000000..7aa3d00b7de Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train/D616_2018/Z10_OK/sen/SEN2_sp_D616_2018_Z10_OK_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D616_2018/Z10_OK/sen/SEN2_sp_D616_2018_Z10_OK_masks.npy b/tests/data/flair2/FLAIR2/flair_sen_train/D616_2018/Z10_OK/sen/SEN2_sp_D616_2018_Z10_OK_masks.npy new file mode 100644 index 00000000000..a94c4ea5edd Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train/D616_2018/Z10_OK/sen/SEN2_sp_D616_2018_Z10_OK_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D616_2018/Z10_OK/sen/SEN2_sp_D616_2018_Z10_OK_products.txt b/tests/data/flair2/FLAIR2/flair_sen_train/D616_2018/Z10_OK/sen/SEN2_sp_D616_2018_Z10_OK_products.txt new file mode 100644 index 00000000000..e3102a94f19 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_sen_train/D616_2018/Z10_OK/sen/SEN2_sp_D616_2018_Z10_OK_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D782_2015/Z10_SW/sen/SEN2_sp_D782_2015_Z10_SW_data.npy b/tests/data/flair2/FLAIR2/flair_sen_train/D782_2015/Z10_SW/sen/SEN2_sp_D782_2015_Z10_SW_data.npy new file mode 100644 index 00000000000..d6592dc56b8 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train/D782_2015/Z10_SW/sen/SEN2_sp_D782_2015_Z10_SW_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D782_2015/Z10_SW/sen/SEN2_sp_D782_2015_Z10_SW_masks.npy b/tests/data/flair2/FLAIR2/flair_sen_train/D782_2015/Z10_SW/sen/SEN2_sp_D782_2015_Z10_SW_masks.npy new file mode 100644 index 00000000000..46c0afa1000 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train/D782_2015/Z10_SW/sen/SEN2_sp_D782_2015_Z10_SW_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D782_2015/Z10_SW/sen/SEN2_sp_D782_2015_Z10_SW_products.txt b/tests/data/flair2/FLAIR2/flair_sen_train/D782_2015/Z10_SW/sen/SEN2_sp_D782_2015_Z10_SW_products.txt new file mode 100644 index 00000000000..e3102a94f19 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_sen_train/D782_2015/Z10_SW/sen/SEN2_sp_D782_2015_Z10_SW_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D798_2011/Z12_MP/sen/SEN2_sp_D798_2011_Z12_MP_data.npy b/tests/data/flair2/FLAIR2/flair_sen_train/D798_2011/Z12_MP/sen/SEN2_sp_D798_2011_Z12_MP_data.npy new file mode 100644 index 00000000000..78efdaf8f73 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train/D798_2011/Z12_MP/sen/SEN2_sp_D798_2011_Z12_MP_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D798_2011/Z12_MP/sen/SEN2_sp_D798_2011_Z12_MP_masks.npy b/tests/data/flair2/FLAIR2/flair_sen_train/D798_2011/Z12_MP/sen/SEN2_sp_D798_2011_Z12_MP_masks.npy new file mode 100644 index 00000000000..2c06dbfc16c Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train/D798_2011/Z12_MP/sen/SEN2_sp_D798_2011_Z12_MP_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D798_2011/Z12_MP/sen/SEN2_sp_D798_2011_Z12_MP_products.txt b/tests/data/flair2/FLAIR2/flair_sen_train/D798_2011/Z12_MP/sen/SEN2_sp_D798_2011_Z12_MP_products.txt new file mode 100644 index 00000000000..5a239933a81 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_sen_train/D798_2011/Z12_MP/sen/SEN2_sp_D798_2011_Z12_MP_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D839_2016/Z18_RZ/sen/SEN2_sp_D839_2016_Z18_RZ_data.npy b/tests/data/flair2/FLAIR2/flair_sen_train/D839_2016/Z18_RZ/sen/SEN2_sp_D839_2016_Z18_RZ_data.npy new file mode 100644 index 00000000000..497e3ad825c Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train/D839_2016/Z18_RZ/sen/SEN2_sp_D839_2016_Z18_RZ_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D839_2016/Z18_RZ/sen/SEN2_sp_D839_2016_Z18_RZ_masks.npy b/tests/data/flair2/FLAIR2/flair_sen_train/D839_2016/Z18_RZ/sen/SEN2_sp_D839_2016_Z18_RZ_masks.npy new file mode 100644 index 00000000000..da007ba3ba7 Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train/D839_2016/Z18_RZ/sen/SEN2_sp_D839_2016_Z18_RZ_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D839_2016/Z18_RZ/sen/SEN2_sp_D839_2016_Z18_RZ_products.txt b/tests/data/flair2/FLAIR2/flair_sen_train/D839_2016/Z18_RZ/sen/SEN2_sp_D839_2016_Z18_RZ_products.txt new file mode 100644 index 00000000000..1c7c6c9ddc7 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_sen_train/D839_2016/Z18_RZ/sen/SEN2_sp_D839_2016_Z18_RZ_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D893_2022/Z11_XN/sen/SEN2_sp_D893_2022_Z11_XN_data.npy b/tests/data/flair2/FLAIR2/flair_sen_train/D893_2022/Z11_XN/sen/SEN2_sp_D893_2022_Z11_XN_data.npy new file mode 100644 index 00000000000..05ba7a49e1d Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train/D893_2022/Z11_XN/sen/SEN2_sp_D893_2022_Z11_XN_data.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D893_2022/Z11_XN/sen/SEN2_sp_D893_2022_Z11_XN_masks.npy b/tests/data/flair2/FLAIR2/flair_sen_train/D893_2022/Z11_XN/sen/SEN2_sp_D893_2022_Z11_XN_masks.npy new file mode 100644 index 00000000000..15166ff2b0d Binary files /dev/null and b/tests/data/flair2/FLAIR2/flair_sen_train/D893_2022/Z11_XN/sen/SEN2_sp_D893_2022_Z11_XN_masks.npy differ diff --git a/tests/data/flair2/FLAIR2/flair_sen_train/D893_2022/Z11_XN/sen/SEN2_sp_D893_2022_Z11_XN_products.txt b/tests/data/flair2/FLAIR2/flair_sen_train/D893_2022/Z11_XN/sen/SEN2_sp_D893_2022_Z11_XN_products.txt new file mode 100644 index 00000000000..e3102a94f19 --- /dev/null +++ b/tests/data/flair2/FLAIR2/flair_sen_train/D893_2022/Z11_XN/sen/SEN2_sp_D893_2022_Z11_XN_products.txt @@ -0,0 +1 @@ +S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921 \ No newline at end of file diff --git a/tests/data/flair2/FLAIR2/md5s.txt b/tests/data/flair2/FLAIR2/md5s.txt new file mode 100644 index 00000000000..753f3b69253 --- /dev/null +++ b/tests/data/flair2/FLAIR2/md5s.txt @@ -0,0 +1,8 @@ +/home/mathias/Dev/forks/torchgeo/tests/data/flair2/FLAIR2/flair_2_labels_test.zip: b13c4a3cb7ebb5cadddc36474bb386f9 +/home/mathias/Dev/forks/torchgeo/tests/data/flair2/FLAIR2/flair_2_toy_dataset.zip: 850736cd9c092d4ec3445a29da01f742 +/home/mathias/Dev/forks/torchgeo/tests/data/flair2/FLAIR2/flair_2_sen_test.zip: 855540b98f86ab8acec87f9aa1a95e0e +/home/mathias/Dev/forks/torchgeo/tests/data/flair2/FLAIR2/flair_2_aerial_test.zip: f60ab0671fc02b6c3e490c39b0a22ed0 +/home/mathias/Dev/forks/torchgeo/tests/data/flair2/FLAIR2/flair_sen_train.zip: b719b0859ab1eb7ae0fae73b90fbad80 +/home/mathias/Dev/forks/torchgeo/tests/data/flair2/FLAIR2/flair_aerial_train.zip: 4c7541ec00136e9ee42592931f90f395 +/home/mathias/Dev/forks/torchgeo/tests/data/flair2/FLAIR2/flair_labels_train.zip: b109583c8745342714a817252aeb7f84 +/home/mathias/Dev/forks/torchgeo/tests/data/flair2/FLAIR2/flair_2_centroids_sp_to_patch.zip: 82010d9917c8bce52e18d82dac292b5b diff --git a/tests/data/flair2/data.py b/tests/data/flair2/data.py new file mode 100644 index 00000000000..020f34f45cc --- /dev/null +++ b/tests/data/flair2/data.py @@ -0,0 +1,263 @@ +#!/usr/bin/env python3 + +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +import glob +import hashlib +import json +import os +import shutil +import string +from collections.abc import Sequence + +import numpy as np +import rasterio +from pyproj import CRS + +# General hyperparams / speed up by choosing a small value (actual values will be 256) +IMG_SIZE = 32 +DUMMY_DATA_SIZE = {'train': 10, 'test': 5} + +# Directory structure +root_dir = '{0}/FLAIR2' +splits: Sequence[str] = ('train', 'test') +dir_names: dict[str, dict[str, str]] = { + 'train': { + 'img': 'flair_aerial_train', + 'sen': 'flair_sen_train', + 'msk': 'flair_labels_train', + }, + 'test': { + 'img': 'flair_2_aerial_test', + 'sen': 'flair_2_sen_test', + 'msk': 'flair_2_labels_test', + }, +} +dir_names_toy: dict[str, dict[str, str]] = { + 'train': { + 'img': 'flair_2_toy_aerial_train', + 'sen': 'flair_2_toy_sen_train', + 'msk': 'flair_2_toy_labels_train', + }, + 'test': { + 'img': 'flair_2_toy_aerial_test', + 'sen': 'flair_2_toy_sen_test', + 'msk': 'flair_2_toy_labels_test', + }, +} +# Replace with random digits and letters +sub_sub_dir_format = 'D{0}_{1}/Z{2}_{3}' + + +# Aerial specifics +aerial_all_bands: Sequence[str] = ('B01', 'B02', 'B03', 'B04', 'B05') +aerial_pixel_values: list[int] = list(range(256)) +aerial_profile = { + 'dtype': np.uint8, + 'count': len(aerial_all_bands), + 'width': IMG_SIZE, + 'height': IMG_SIZE, + 'crs': CRS.from_epsg(2154), + 'driver': 'GTiff', +} +aerial_format = '.tif' + +# Sentinel specifics +sentinel_format = ['.npy', '.npy', '.txt'] +sentinel_pixel_values: list[int] = list(range(20000)) +sentinel_name_format = 'SEN2_sp_D{0}_{1}_Z{2}_{3}' +SENTINEL_IMG_SIZE = [156, 207] + + +# Label specifics +# Theoretically the labels are between 1 and 18, although the flair2 description groups all pixels >13 into one class +labels_pixel_values: list[int] = list(range(1, 19)) +labels_profile = { + 'dtype': np.byte, + 'count': 1, + 'width': IMG_SIZE, + 'height': IMG_SIZE, + # In theory the date is broken at the moment but assume correct for now + 'crs': CRS.from_epsg(2154), + 'driver': 'GTiff', +} +labels_format = '.tif' + +centroids_dict: dict[str, list[int]] = {} + + +def populate_sub_sub_dirs( + dir_path: str, seed: int, type: str, domain_year_zone_location: Sequence[str] +) -> None: + # Create random 6 digit number (might have leading zeros) + rng: np.random.Generator = np.random.default_rng(seed) + + # Mimic 1:n mapping of aerial/mask to sentinel data + file_id_0 = rng.integers(1000000) + file_id_1 = rng.integers(1000000) + id_str_0 = f'{file_id_0:06}' + id_str_1 = f'{file_id_1:06}' + match type: + case 'img': + create_aerial_image(dir_path, rng, id_str_0) + create_aerial_image(dir_path, rng, id_str_1) + case 'sen': + create_sentinel_arrays(dir_path, rng, domain_year_zone_location) + case 'msk': + create_label_mask(dir_path, rng, id_str_0) + create_label_mask(dir_path, rng, id_str_1) + case _: + raise ValueError(f'Unknown type: {type}') + + +def create_aerial_image(dir_path: str, rng: np.random.Generator, id: str) -> None: + centroids_dict[f'IMG_{id}.tif'] = [IMG_SIZE // 2, IMG_SIZE // 2] + with rasterio.open( + os.path.join(dir_path, f'IMG_{id}{aerial_format}'), 'w', **aerial_profile + ) as src: + for i in range(len(aerial_all_bands)): + data = rng.choice( + aerial_pixel_values, size=(IMG_SIZE, IMG_SIZE), replace=True + ).astype(np.uint8) + src.write(data, i + 1) + + +def create_sentinel_arrays( + dir_path: str, rng: np.random.Generator, domain_year_zone_location: Sequence[str] +) -> None: + # Create random numpy array of shape (T, 10, H, W) and save it as .npy + time_num_samples = rng.integers(1, 10) + data = rng.choice( + sentinel_pixel_values, + size=( + time_num_samples, + 10, + rng.choice(SENTINEL_IMG_SIZE), + rng.choice(SENTINEL_IMG_SIZE), + ), + replace=True, + ).astype(np.uint8) + snow_cloud_mask = rng.choice( + [0, 100], + size=( + time_num_samples, + rng.choice(SENTINEL_IMG_SIZE), + rng.choice(SENTINEL_IMG_SIZE), + ), + replace=True, + ).astype(np.uint8) + + name = sentinel_name_format.format(*domain_year_zone_location) + np.save(os.path.join(dir_path, f'{name}_data{sentinel_format[0]}'), data) + np.save( + os.path.join(dir_path, f'{name}_masks{sentinel_format[1]}'), snow_cloud_mask + ) + + # Create products.txt + with open(os.path.join(dir_path, f'{name}_products{sentinel_format[2]}'), 'w') as f: + for _ in range(time_num_samples): + f.write('S2A_MSIL2A_20210415T105021_N0300_R051_T31UDP_20210415T135921') + + +def create_label_mask(dir_path: str, rng: np.random.Generator, id: str) -> None: + data = rng.choice( + labels_pixel_values, size=(IMG_SIZE, IMG_SIZE), replace=True + ).astype(np.byte) + with rasterio.open( + os.path.join(dir_path, f'MSK_{id}{labels_format}'), 'w', **labels_profile + ) as src: + src.write(data, 1) + + +def create_metadata(root_dir: str) -> None: + # Create file flair-2_centroids_sp_to_patch.json + with open(os.path.join(root_dir, 'flair-2_centroids_sp_to_patch.json'), 'w') as f: + json.dump(centroids_dict, f) + + +if __name__ == '__main__': + root_dir = root_dir.format(os.getcwd()) + + # Remove the root directory if it exists + if os.path.exists(root_dir): + shutil.rmtree(root_dir) + + def create_dir_structure(root_dir: str, dir_names: dict) -> None: + # Create the directory structure + for split in splits: + for i in range(DUMMY_DATA_SIZE[split]): + # Reproducible and the same for all types + seed = int(hashlib.md5(f'{split}{i}'.encode()).hexdigest(), 16) + rng: np.random.Generator = np.random.default_rng(seed) + + random_domain = rng.integers(100, 1000) + random_year = rng.integers(2010, 2023) + random_zone = rng.integers(10, 23) + random_area = ''.join(rng.choice(list(string.ascii_uppercase), size=2)) + for type, sub_dir in dir_names[split].items(): + # E.g. D123_2021/Z1_UF + sub_sub_dir = sub_sub_dir_format.format( + random_domain, random_year, random_zone, random_area + ) + + # type adds last directory, one of: img, sen, msk + dir_path = os.path.join(root_dir, sub_dir, sub_sub_dir, type) + os.makedirs(dir_path, exist_ok=True) + + # Required for sentinel data arrays (npy) and products.txt + domain_year_zone_location = [ + str(random_domain), + str(random_year), + str(random_zone), + random_area, + ] + populate_sub_sub_dirs( + dir_path, seed, type, domain_year_zone_location + ) + + create_metadata(root_dir) + + root_dir_toy = os.path.join(root_dir, 'flair_2_toy_dataset') + os.makedirs(root_dir_toy, exist_ok=True) + create_dir_structure(root_dir, dir_names) + create_dir_structure(root_dir_toy, dir_names_toy) + + # zip each directory/file in root_dir + for element in glob.glob(f'{root_dir}/**'): + print(element) + if os.path.isdir(element): + # Make archive with element name as root directory + shutil.make_archive( + element, 'zip', os.path.dirname(element), os.path.basename(element) + ) + else: + shutil.make_archive( + element.removesuffix('.json'), + 'zip', + os.path.dirname(element), + os.path.basename(element), + ) + + # for toy, zip the entire root_dir_toy + shutil.make_archive( + root_dir_toy, + 'zip', + os.path.dirname(root_dir_toy), + os.path.basename(root_dir_toy), + ) + + # Rename flair-2_centroids_sp_to_patch.json to flair_2_centroids_sp_to_patch.json to replicate + # the inconsistency from the actual flair2 dataset + old_metadata_path = os.path.join(root_dir, 'flair-2_centroids_sp_to_patch.zip') + new_metadata_path = os.path.join(root_dir, 'flair_2_centroids_sp_to_patch.zip') + if os.path.exists(old_metadata_path): + os.rename(old_metadata_path, new_metadata_path) + + # Compute md5 for each zip file + with open(os.path.join(root_dir, 'md5s.txt'), 'w') as md5_file: + for element in glob.glob(f'{root_dir}/**'): + if element.endswith('.zip'): + with open(element, 'rb') as f: + md5 = hashlib.md5(f.read()).hexdigest() + md5_file.write(f'{element}: {md5}\n') diff --git a/tests/datamodules/test_flair2.py b/tests/datamodules/test_flair2.py new file mode 100644 index 00000000000..2238219e45a --- /dev/null +++ b/tests/datamodules/test_flair2.py @@ -0,0 +1,43 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +import os + +import matplotlib.pyplot as plt +import pytest + +from torchgeo.datamodules import FLAIR2DataModule + + +class TestFLAIR2DataModule: + @pytest.fixture + def datamodule(self) -> FLAIR2DataModule: + root = os.path.join('tests', 'data', 'flair2', 'FLAIR2') + batch_size = 2 + num_workers = 0 + dm = FLAIR2DataModule( + root=root, + batch_size=batch_size, + num_workers=num_workers, + use_sentinel=False, + ) # FIXME: use_sentinel=True does not work due to varying dimensions + return dm + + def test_train_dataloader(self, datamodule: FLAIR2DataModule) -> None: + datamodule.setup('fit') + next(iter(datamodule.train_dataloader())) + + def test_val_dataloader(self, datamodule: FLAIR2DataModule) -> None: + datamodule.setup('validate') + next(iter(datamodule.val_dataloader())) + + def test_test_dataloader(self, datamodule: FLAIR2DataModule) -> None: + datamodule.setup('test') + next(iter(datamodule.test_dataloader())) + + def test_plot(self, datamodule: FLAIR2DataModule) -> None: + datamodule.setup('validate') + batch = next(iter(datamodule.val_dataloader())) + sample = {'image': batch['image'][0], 'mask': batch['mask'][0]} + datamodule.plot(sample) + plt.close() diff --git a/tests/datasets/test_flair2.py b/tests/datasets/test_flair2.py new file mode 100644 index 00000000000..99fbb6d8c31 --- /dev/null +++ b/tests/datasets/test_flair2.py @@ -0,0 +1,140 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +import os +import shutil +from pathlib import Path + +import matplotlib.pyplot as plt +import pytest +import torch +import torch.nn as nn +from _pytest.fixtures import SubRequest +from pytest import MonkeyPatch + +from torchgeo.datasets import FLAIR2, DatasetNotFoundError, FLAIR2Toy + + +class TestFLAIR2: + @pytest.fixture( + params=[ + (split, init_class) + for split in ['train', 'test'] + for init_class in [FLAIR2, FLAIR2Toy] + ] + ) + def dataset( + self, monkeypatch: MonkeyPatch, tmp_path: Path, request: SubRequest + ) -> FLAIR2: + md5s = { + 'flair_2_toy_dataset': '850736cd9c092d4ec3445a29da01f742', + 'flair-2_centroids_sp_to_patch': '82010d9917c8bce52e18d82dac292b5b', + 'flair_aerial_train': '4c7541ec00136e9ee42592931f90f395', + 'flair_sen_train': 'b719b0859ab1eb7ae0fae73b90fbad80', + 'flair_labels_train': 'b109583c8745342714a817252aeb7f84', + 'flair_2_aerial_test': 'f60ab0671fc02b6c3e490c39b0a22ed0', + 'flair_2_sen_test': '855540b98f86ab8acec87f9aa1a95e0e', + 'flair_2_labels_test': 'b13c4a3cb7ebb5cadddc36474bb386f9', + } + + monkeypatch.setattr(FLAIR2, 'md5s', md5s) + url_prefix = os.path.join('tests', 'data', 'flair2', 'FLAIR2') + monkeypatch.setattr(FLAIR2, 'url_prefix', url_prefix) + + root: Path = tmp_path + split: str = request.param[0] + init_class = request.param[1] + bands: tuple[str, ...] = ('B01', 'B02', 'B03', 'B04', 'B05') + transforms = nn.Identity() + + flair_class: FLAIR2 = init_class( + root, + split, + bands, + transforms, + download=True, + checksum=True, + use_sentinel=True, + ) + + return flair_class + + def test_get_num_bands(self, dataset: FLAIR2) -> None: + assert dataset.get_num_bands() == len(dataset.all_bands) + + def test_per_band_statistics(self, dataset: FLAIR2) -> None: + if dataset.split != 'train': + return + + mins, maxs, means, stdvs = dataset.per_band_statistics(dataset.split) + for stats in [mins, maxs, means, stdvs]: + assert isinstance(stats, list) + assert stats.__len__() == dataset.get_num_bands() + assert all(isinstance(stat, float) for stat in stats) + + @pytest.mark.parametrize('use_sentinel', [True, False]) + def test_getitem(self, dataset: FLAIR2, use_sentinel: bool) -> None: + dataset.use_sentinel = use_sentinel + x = dataset[0] + assert isinstance(x, dict) + assert isinstance(x['image'], torch.Tensor) + assert x['image'].shape == (len(dataset.all_bands), 32, 32) + assert isinstance(x['mask'], torch.Tensor) + assert x['image'].shape[-2:] == x['mask'].shape[-2:] + + def test_len(self, dataset: FLAIR2) -> None: + if dataset.split == 'train': + assert len(dataset) == 20 + else: + assert len(dataset) == 10 + + # Test the 1:n mapping of images to sentinels (i.e. 1 sentinel to 2 images) + if not isinstance(dataset, FLAIR2Toy): + assert dataset.files[0]['sentinel'] == dataset.files[1]['sentinel'] + + def test_already_downloaded(self, dataset: FLAIR2) -> None: + init_class = type(dataset) + init_class(root=dataset.root, split=dataset.split) + + def test_not_yet_extracted(self, dataset: FLAIR2, tmp_path: Path) -> None: + if isinstance(dataset, FLAIR2Toy): + shutil.copyfile( + os.path.join( + 'tests', 'data', 'flair2', 'FLAIR2', 'flair_2_toy_dataset.zip' + ), + os.path.join(str(tmp_path), 'flair_2_toy_dataset.zip'), + ) + else: + filenames = list(dataset.dir_names[dataset.split].values()) + filenames.append(dataset.centroids_file) + dir = os.path.join('tests', 'data', 'flair2', 'FLAIR2') + for filename in filenames: + filename = filename.replace('-', '_') + shutil.copyfile( + os.path.join(dir, f'{filename}.zip'), + os.path.join(str(tmp_path), f'{filename}.zip'), + ) + + init_class = type(dataset) + init_class(root=str(tmp_path), split=dataset.split) + + def test_invalid_split(self, dataset: FLAIR2) -> None: + with pytest.raises(AssertionError): + init_class = type(dataset) + init_class(split='foo') + + def test_not_downloaded(self, dataset: FLAIR2, tmp_path: Path) -> None: + with pytest.raises(DatasetNotFoundError, match='Dataset not found'): + init_class = type(dataset) + init_class(str(tmp_path) + 'tmp', download=False) + + @pytest.mark.parametrize('use_sentinel', [True, False]) + def test_plot(self, dataset: FLAIR2, use_sentinel: bool) -> None: + dataset.use_sentinel = use_sentinel + dataset.plot(dataset[0], suptitle='Test') + plt.close() + + sample = dataset[0] + sample['prediction'] = torch.clone(sample['mask']) + dataset.plot(sample, suptitle='Prediction') + plt.close() diff --git a/torchgeo/datamodules/__init__.py b/torchgeo/datamodules/__init__.py index dc9513a6524..acf80d3ca82 100644 --- a/torchgeo/datamodules/__init__.py +++ b/torchgeo/datamodules/__init__.py @@ -17,6 +17,7 @@ from .eurosat import EuroSAT100DataModule, EuroSATDataModule, EuroSATSpatialDataModule from .fair1m import FAIR1MDataModule from .fire_risk import FireRiskDataModule +from .flair2 import FLAIR2DataModule from .ftw import FieldsOfTheWorldDataModule from .geo import BaseDataModule, GeoDataModule, NonGeoDataModule from .geonrw import GeoNRWDataModule @@ -70,6 +71,7 @@ 'EuroSATDataModule', 'EuroSATSpatialDataModule', 'FAIR1MDataModule', + 'FLAIR2DataModule', 'FieldsOfTheWorldDataModule', 'FireRiskDataModule', 'GID15DataModule', diff --git a/torchgeo/datamodules/flair2.py b/torchgeo/datamodules/flair2.py new file mode 100644 index 00000000000..e231297a33a --- /dev/null +++ b/torchgeo/datamodules/flair2.py @@ -0,0 +1,79 @@ +"""This module contains the FLAIR2DataModule class for loading the FLAIR2 dataset. + +The FLAIR dataset is released under open license 2.0: +- https://www.etalab.gouv.fr/wp-content/uploads/2018/11/open-licence.pdf +- https://ignf.github.io/FLAIR/#FLAIR2 + +Code for loading dataset licensed under the MIT License. +""" + +from typing import Any + +import kornia.augmentation as K +import torch +from torch.utils.data import random_split + +from ..datasets import FLAIR2, FLAIR2Toy +from ..samplers.utils import _to_tuple +from ..transforms import AugmentationSequential +from .geo import NonGeoDataModule + + +class FLAIR2DataModule(NonGeoDataModule): + """LightningDataModule implementation for the FLAIR2 dataset. + + Uses the train/test splits from the dataset. + """ + + def __init__( + self, + batch_size: int = 64, + patch_size: tuple[int, int] | int = 64, + val_split_pct: float = 0.2, + num_workers: int = 0, + use_toy: bool = False, + augs: AugmentationSequential | None = None, + **kwargs: Any, + ) -> None: + """Initialize a new FLAIR2DataModule instance. + + Args: + batch_size: Size of each mini-batch. + patch_size: Size of each patch, either ``size`` or ``(height, width)``. + Should be a multiple of 32 for most segmentation architectures. + val_split_pct: Percentage of the dataset to use as a validation set. + num_workers: Number of workers for parallel data loading. + use_toy: Whether to use the toy version of the dataset. + augs: Optional augmentations to apply to the dataset. + **kwargs: Additional keyword arguments passed to + :class:`~torchgeo.datasets.FLAIR2`. + + ..versionadded:: 0.7 + """ + self.ds_class = FLAIR2 if not use_toy else FLAIR2Toy + + super().__init__(self.ds_class, batch_size, num_workers, **kwargs) + + self.patch_size = _to_tuple(patch_size) + self.val_split_pct = val_split_pct + + self.aug: AugmentationSequential = AugmentationSequential( + K.Normalize(mean=self.mean, std=self.std), data_keys=['image', 'mask'] + ) + + self.augs = augs if augs is not None else self.aug + + def setup(self, stage: str) -> None: + """Set up datasets. + + Args: + stage: Either 'fit', 'validate', 'test', or 'predict'. + """ + if stage in ['fit', 'validate']: + self.dataset = self.ds_class(split='train', **self.kwargs) + generator = torch.Generator().manual_seed(0) + self.train_dataset, self.val_dataset = random_split( + self.dataset, [1 - self.val_split_pct, self.val_split_pct], generator + ) + if stage in ['test']: + self.test_dataset = self.ds_class(split='test', **self.kwargs) diff --git a/torchgeo/datasets/__init__.py b/torchgeo/datasets/__init__.py index 3016c3af7e2..80e0ac8f477 100644 --- a/torchgeo/datasets/__init__.py +++ b/torchgeo/datasets/__init__.py @@ -46,6 +46,7 @@ from .eurosat import EuroSAT, EuroSAT100, EuroSATSpatial from .fair1m import FAIR1M from .fire_risk import FireRisk +from .flair2 import FLAIR2, FLAIR2Toy from .forestdamage import ForestDamage from .ftw import FieldsOfTheWorld from .gbif import GBIF @@ -154,6 +155,7 @@ 'ETCI2021', 'EUDEM', 'FAIR1M', + 'FLAIR2', 'GBIF', 'GID15', 'LEVIRCD', @@ -208,6 +210,7 @@ 'EuroSAT', 'EuroSAT100', 'EuroSATSpatial', + 'FLAIR2Toy', 'FieldsOfTheWorld', 'FireRisk', 'ForestDamage', diff --git a/torchgeo/datasets/flair2.py b/torchgeo/datasets/flair2.py new file mode 100644 index 00000000000..0c7207bdf02 --- /dev/null +++ b/torchgeo/datasets/flair2.py @@ -0,0 +1,762 @@ +# Code for loading dataset licensed under the MIT License. +# +# FLAIR dataset is realeasd under open license 2.0 +# ..... https://www.etalab.gouv.fr/wp-content/uploads/2018/11/open-licence.pdf +# ..... https://ignf.github.io/FLAIR/#FLAIR2 +# + +"""FLAIR2 dataset.""" + +import glob +import json +import os +from collections.abc import Callable, Collection, Sequence +from typing import Any, ClassVar, cast + +import matplotlib.pyplot as plt +import numpy as np +import rasterio +import torch +from matplotlib.colors import ListedColormap +from matplotlib.figure import Figure +from matplotlib.patches import Patch, Rectangle +from torch import Tensor + +from .errors import DatasetNotFoundError, RGBBandsMissingError +from .geo import NonGeoDataset +from .utils import Path, check_integrity, download_url, extract_archive + + +class FLAIR2(NonGeoDataset): + """FLAIR #2 (The French Land cover from Aerospace ImageRy) dataset. + + The `FLAIR #2 ` dataset is an extensive dataset from the French National Institute + of Geographical and Forest Information (IGN) that provides a unique and rich resource for large-scale geospatial analysis. + The dataset is sampled countrywide and is composed of over 20 billion annotated pixels of very high resolution aerial + imagery at 0.2 m spatial resolution, acquired over three years and different months (spatio-temporal domains). + + The FLAIR2 dataset is a dataset for semantic segmentation of aerial images. It contains aerial images, sentinel-2 images and masks for 13 classes. + The dataset is split into a training and test set. + + Dataset features: + + * over 20 billion annotated pixels + * aerial imagery + * 5x512x512 + * 0.2m spatial resolution + * 5 channels (RGB-NIR-Elevation) + * Sentinel-2 imagery + * 10-20m spatial resolution + * 10 spectral bands + * snow/cloud masks (with 0-100 probability) + * multiple time steps (T) + * Tx10xWxH, T, W, H are variable + * label (masks) + * 512x512 + * 13 classes + + Dataset classes: + + 0: "building", + 1: "pervious surface", + 2: "impervious surface", + 3: "bare soil", + 4: "water", + 5: "coniferous", + 6: "deciduous", + 7: "brushwood", + 8: "vineyard", + 9: "herbaceous vegetation", + 10: "agricultural land", + 11: "plowed land", + 12: "other" + + If you use this dataset in your research, please cite the following paper: + + * https://doi.org/10.48550/arXiv.2310.13336 + """ + + splits: ClassVar[Sequence[str]] = ('train', 'test') + + url_prefix: ClassVar[str] = ( + 'https://storage.gra.cloud.ovh.net/v1/AUTH_366279ce616242ebb14161b7991a8461/defi-ia/flair_data_2' + ) + md5s: ClassVar[dict[str, str]] = { + 'flair-2_centroids_sp_to_patch': 'f8ba3b176197c254b6c165c97e93c759', + 'flair_aerial_train': '0f575b360800f58add19c08f05e18429', + 'flair_sen_train': '56fbbd465726ea4dfeea02734edd7cc5', + 'flair_labels_train': '80d3cd2ee117a61128faa08cbb842c0c', + 'flair_2_aerial_test': 'a647e0ba7e5345b28c48d7887ee79888', + 'flair_2_sen_test': 'aae8649dbe457620a76269d915d07624', + 'flair_2_labels_test': '394a769ffcb4a783335eecd3f8baef57', + } + + dir_names: ClassVar[dict[str, dict[str, str]]] = { + 'train': { + 'images': 'flair_aerial_train', + 'sentinels': 'flair_sen_train', + 'masks': 'flair_labels_train', + }, + 'test': { + 'images': 'flair_2_aerial_test', + 'sentinels': 'flair_2_sen_test', + 'masks': 'flair_2_labels_test', + }, + } + globs: ClassVar[dict[str, str]] = { + 'images': 'IMG_*.tif', + 'sentinels': 'SEN2_*{0}.npy', + 'masks': 'MSK_*.tif', + } + centroids_file: str = 'flair-2_centroids_sp_to_patch' + # Sentinel super patch size according to datapaper + super_patch_size: int = 40 + + # Band information + rgb_bands: tuple[str, str, str] = ('B01', 'B02', 'B03') + all_bands: tuple[str, str, str, str, str] = ('B01', 'B02', 'B03', 'B04', 'B05') + + # Note: the original dataset contains 18 classes, but the dataset paper suggests + # grouping all classes >13 into "other" class, due to underrepresentation + classes: tuple[str, ...] = ( + 'building', + 'pervious surface', + 'impervious surface', + 'bare soil', + 'water', + 'coniferous', + 'deciduous', + 'brushwood', + 'vineyard', + 'herbaceous vegetation', + 'agricultural land', + 'plowed land', + 'other', + ) + # Define a colormap for the classes + cmap = ListedColormap( + [ + 'cyan', # building + 'lightgray', # pervious surface + 'darkgray', # impervious surface + 'saddlebrown', # bare soil + 'blue', # water + 'darkgreen', # coniferous + 'forestgreen', # deciduous + 'olive', # brushwood + 'purple', # vineyard + 'lime', # herbaceous vegetation + 'yellow', # agricultural land + 'orange', # plowed land + 'red', # other + ] + ) + + statistics: ClassVar[dict[str, dict[str, dict[str, float]]]] = { + 'train': { + 'B01': { + 'min': 0.0, + 'max': 255.0, + 'mean': 113.77526983072, + 'stdv': 1.4678962001526, + }, + 'B02': { + 'min': 0.0, + 'max': 255.0, + 'mean': 118.08112962721, + 'stdv': 1.2889349378677, + }, + 'B03': { + 'min': 0.0, + 'max': 255.0, + 'mean': 109.27393364381, + 'stdv': 1.2674219560871, + }, + 'B04': { + 'min': 0.0, + 'max': 255.0, + 'mean': 102.36417944851, + 'stdv': 1.1057592647291, + }, + 'B05': { + 'min': 0.0, + 'max': 255.0, + 'mean': 16.697295721745, + 'stdv': 0.82764953440507, + }, + } + } + + @staticmethod + def per_band_statistics( + split: str, bands: Sequence[str] = all_bands + ) -> tuple[list[float], ...]: + """Get statistics (min, max, means, stdvs) for each used band in order. + + Args: + split (str): Split for which to get statistics (currently only for train) + bands (Sequence[str], optional): Bands of interest, will be returned in ordered manner. Defaults to all_bands. + + Returns: + tuple[list[float]]: Filtered, ordered statistics for each band + """ + assert ( + split in FLAIR2.statistics.keys() + ), f"Statistics for '{split}' not available; use: '{list(FLAIR2.statistics.keys())}'" + ordered_bands_statistics = list( + dict( + filter( + lambda keyval: keyval[0] in bands, FLAIR2.statistics[split].items() + ) + ).values() + ) + mins = list(map(lambda dict: dict['min'], ordered_bands_statistics)) + maxs = list(map(lambda dict: dict['max'], ordered_bands_statistics)) + means = list(map(lambda dict: dict['mean'], ordered_bands_statistics)) + stdvs = list(map(lambda dict: dict['stdv'], ordered_bands_statistics)) + + return mins, maxs, means, stdvs + + def __init__( + self, + root: Path = 'data', + split: str = 'train', + bands: Sequence[str] = all_bands, + transforms: Callable[[dict[str, Tensor]], dict[str, Tensor]] | None = None, + download: bool = False, + checksum: bool = False, + use_sentinel: bool = False, + ) -> None: + """Initialize a new FLAIR2 dataset instance. + + Args: + root: root directory where dataset can be found + split: which split to load, one of 'train' or 'test' + bands: which bands to load (B01, B02, B03, B04, B05) + transforms: optional transforms to apply to sample + download: whether to download the dataset if it is not found + checksum: whether to verify the dataset using checksums + use_sentinel: whether to use sentinel data in the dataset # FIXME: sentinel does not work with dataloader due to varying dimensions + + Raises: + DatasetNotFoundError + + ..versionadded:: 0.7 + """ + assert ( + split in self.splits + ), f"Split '{split}' not in supported splits: '{self.splits}'" + + self.root = root + self.split = split + self.transforms = transforms + self.download = download + self.checksum = checksum + self.bands = bands + self.use_sentinel = use_sentinel + + self._verify() + self.centroids = self._load_centroids(self.centroids_file) + + self.files = self._load_files() + + def get_num_bands(self) -> int: + """Return the number of bands in the dataset. + + Returns: + int: number of bands in the initialized dataset (might vary from all_bands) + """ + return len(self.bands) + + def __getitem__(self, index: int) -> dict[str, Tensor]: + """Return an index within the dataset. + + Args: + index: index to return + + Returns: + image and mask at that index with image of dimension `get_num_bands()`x512x512, + sentinel image of dimension Tx10x512x512 and mask of dimension 512x512 + """ + aerial_fn = self.files[index]['image'] + sentinel_fn = cast(dict[str, str], self.files[index]['sentinel']) + mask_fn = self.files[index]['mask'] + + aerial = self._load_image(cast(Path, aerial_fn)) + mask = self._load_target(cast(Path, mask_fn)) + + sample: dict[str, Any] = {'image': aerial, 'mask': mask} + + if self.use_sentinel: + img_id = os.path.basename(cast(Path, aerial_fn)) + centroid_x_y = cast(tuple[int, int], self.centroids[img_id]) + crop_indices = self._get_crop_indices(centroid_x_y) + sentinel_data = self._load_sentinel(cast(Path, sentinel_fn['data'])) + sentinel_mask = self._load_sentinel( + cast(Path, sentinel_fn['snow_cloud_mask']) + ) + sample['sentinel_data'] = sentinel_data + sample['snow_cloud_mask'] = sentinel_mask + sample['crop_indices'] = crop_indices + + if self.transforms is not None: + sample = self.transforms(sample) + + return sample + + def __len__(self) -> int: + """Return the number of datapoints in the dataset. + + Returns: + length of dataset + """ + return len(self.files) + + def _load_centroids(self, filename: str) -> dict[str, list[int]]: + """Load centroids for mapping sentinel super-areas to aerial patches. + + For detailed information on super-patches, see p.4f of datapaper and `flair-2_centroids_sp_to_patch.json`. + CAUTION: centroids are stored as y, x + + Args: + filename: name of the file containing centroids + + Returns: + dict: centroids for super-patches + """ + with open(os.path.join(self.root, f'{filename}.json')) as f: + centroids = json.load(f) + return cast(dict[str, list[int]], centroids) + + def _get_crop_indices(self, centroid: tuple[int, int]) -> tuple[slice, slice]: + """Return indices to crop a super-patch from sentinel data based centroid coordinates. + + For detailed information on super-patches, see p.4f of datapaper and `flair-2_centroids_sp_to_patch.json`. + + Args: + centroid: centroid coordinates + + Returns: + tuple[slice, slice]: crop indices for sentinel data + """ + y, x = centroid + eigth_size = self.super_patch_size // 8 + + return ( + slice(x - eigth_size, x + eigth_size), + slice(y - eigth_size, y + eigth_size), + ) + + def _load_files(self) -> list[dict[str, Collection[str]]]: + """Return the paths of the files in the dataset. + + Args: + root: root dir of dataset + + Returns: + list of dicts containing paths for each pair of image, masks + """ + images = sorted( + glob.glob( + os.path.join( + self.root, + self.dir_names[self.split]['images'], + '**', + self.globs['images'], + ), + recursive=True, + ) + ) + + sentinels_data = sorted( + glob.glob( + os.path.join( + self.root, + self.dir_names[self.split]['sentinels'], + '**', + self.globs['sentinels'].format('_data'), + ), + recursive=True, + ) + ) + sentinels_mask = sorted( + glob.glob( + os.path.join( + self.root, + self.dir_names[self.split]['sentinels'], + '**', + self.globs['sentinels'].format('_masks'), + ), + recursive=True, + ) + ) + sentinels = [ + {'data': data, 'snow_cloud_mask': mask} + for data, mask in zip(sentinels_data, sentinels_mask) + ] + + masks = sorted( + glob.glob( + os.path.join( + self.root, + self.dir_names[self.split]['masks'], + '**', + self.globs['masks'], + ), + recursive=True, + ) + ) + + # One sentinel image might contain multiple aerial images, thus we need to match them + # without assuming a 1:1 mapping + sentinel_lookup = {'/'.join(s['data'].split('/')[-4:-2]): s for s in sentinels} + files = [ + dict( + image=image, + sentinel=sentinel_lookup['/'.join(image.split('/')[-4:-2])], + mask=mask, + ) + for image, mask in zip(images, masks) + ] + + return files + + def _load_image(self, path: Path) -> Tensor: + """Load a single image. + + Args: + path: path to the image + + Returns: + Tensor: the loaded image + """ + with rasterio.open(path) as f: + array: np.typing.NDArray[np.int_] = f.read() + tensor = torch.from_numpy(array).float() + if 'B05' in self.bands: + # Height channel will always be the last dimension + tensor[-1] = torch.div(tensor[-1], 5) + + return tensor + + def _load_sentinel(self, path: Path) -> Tensor: + # FIXME: should this really be returned as a tuple? + """Load a sentinel array. + + Args: + path (Path): path to sentinel img (data or snow cloud mask) + + Returns: + Tensor: image as tensors of shape TxCxHxW (time, channels, height, width) + """ + img = torch.from_numpy(np.load(path)).float() + + return img + + def _load_target(self, path: Path) -> Tensor: + """Load a single mask corresponding to image. + + Args: + path: path to the mask + + Returns: + Tensor: the mask of the image + """ + with rasterio.open(path) as f: + array: np.typing.NDArray[np.int_] = f.read(1) + tensor = torch.from_numpy(array).long() + # According to datapaper, the dataset contains classes beyond 13 + # however, those are grouped into a single "other" class + # Rescale the classes to be in the range [0, 12] by subtracting 1 + torch.clamp(tensor - 1, 0, len(self.classes) - 1, out=tensor) + + return tensor + + def _verify(self) -> None: + """Verify the integrity of the dataset.""" + # Check if centroids metadata file or zip is present + # Naming inconsistencies in download url and file name (flair_2_centroids_sp_to_patch.zip vs. flair-2_centroids_sp_to_patch.json) + if not os.path.isfile(os.path.join(self.root, f'{self.centroids_file}.json')): + if not os.path.isfile( + os.path.join(self.root, f'{self.centroids_file}.zip'.replace('-', '_')) + ): + if not self.download: + raise DatasetNotFoundError(self) + self._download(self.centroids_file.replace('-', '_')) + self._extract(self.centroids_file.replace('-', '_')) + + # Files to be extracted + to_extract: list[str] = [] + + # Check if dataset files (by checking glob) are present already + for train_or_test, dir_name in self.dir_names[self.split].items(): + downloaded_path = os.path.join(self.root, dir_name) + if not os.path.isdir(downloaded_path): + to_extract.append(dir_name) + continue + + files_glob = os.path.join(downloaded_path, '**', self.globs[train_or_test]) + # Format the glob of sentinel `SEN_{0}.npy` to match the actual file name + # in other cases, where it is not a format string, the glob will be the same + if not glob.glob(files_glob.format(''), recursive=True): + to_extract.append(dir_name) + + if not to_extract: + print('Data has been downloaded and extracted already...') + return + + # Deepcopy files to be extracted and check wether the zip is downloaded + to_download = list(map(lambda x: x, to_extract)) + for candidate in to_extract: + zipfile = os.path.join(self.root, f'{candidate}.zip') + if glob.glob(zipfile): + print(f'Extracting: {candidate}') + self._extract(candidate) + to_download.remove(candidate) + + # Check if there are still files to download + if not to_download: + return + + # Check if the user requested to download the dataset + if not self.download: + raise DatasetNotFoundError(self) + + print('Downloading: ', to_download) + for candidate in to_download: + self._download(candidate) + self._extract(candidate) + + def _download(self, url: str, suffix: str = '.zip') -> None: + """Download the dataset.""" + download_url( + os.path.join(self.url_prefix, f'{url}{suffix}'), + self.root, + md5=self.md5s.get(url, None) if self.checksum else None, + ) + # FIXME: Why is download_url not checking integrity (tests run through)? + assert check_integrity( + os.path.join(self.root, f'{url}{suffix}'), + self.md5s.get(url, None) if self.checksum else None, + ) + + def _extract(self, file_path: str) -> None: + """Extract the dataset.""" + assert isinstance(self.root, str | os.PathLike) + zipfile = os.path.join(self.root, f'{file_path}.zip') + extract_archive(zipfile) + + def plot( + self, + sample: dict[str, Tensor], + show_titles: bool = True, + suptitle: str | None = None, + ) -> Figure: + """Plot a sample from the dataset. + + Args: + sample: a sample return by :meth:`__getitem__` + show_titles: flag indicating whether to show titles above each panel + suptitle: optional suptitle to use for figure + + Returns: + a matplotlib Figure with the rendered sample + """ + + def normalize_plot(tensor: Tensor) -> Tensor: + """Normalize the plot.""" + return (tensor - tensor.min()) / (tensor.max() - tensor.min()) + + rgb_indices = [self.all_bands.index(band) for band in self.rgb_bands] + # Check if RGB bands are present in self.bands + if not all([band in self.bands for band in self.rgb_bands]): + raise RGBBandsMissingError() + + # Stretch to the full range of the image + image = normalize_plot(sample['image'][rgb_indices].permute(1, 2, 0)) + + # Get elevation and NIR, R, G if available + if 'B05' in self.bands: + elevation = sample['image'][self.bands.index('B05')] + if 'B04' in self.bands: + nir_r_g_indices = [self.bands.index('B04'), rgb_indices[0], rgb_indices[1]] + nir_r_g = normalize_plot(sample['image'][nir_r_g_indices].permute(1, 2, 0)) + + # Sentinel is a time-series, i.e. use [0]->T=0 + sentinel = None + if self.use_sentinel: + crop_indices = cast(Sequence[slice], sample['crop_indices']) + sentinel = sample['sentinel_data'] + sentinel = sentinel[0] + sentinel = normalize_plot(sentinel[[2, 1, 0], :, :].permute(1, 2, 0)) + + # Obtain mask and predictions if available + mask = sample['mask'].numpy().astype('uint8').squeeze() + + showing_predictions = 'prediction' in sample + predictions = None + if showing_predictions: + predictions = sample['prediction'].numpy().astype('uint8').squeeze() + + # Remove none available plots + plot_candidates = zip( + [ + 'image (R+G+B)', + 'NIR+R+G', + 'elevation', + 'sentinel', + 'predictions', + 'mask', + ], + [image, nir_r_g, elevation, sentinel, predictions, mask], + ) + plots = [plot for plot in plot_candidates if plot[1] is not None] + + num_panels = len(plots) + + kwargs = { + 'cmap': self.cmap, + 'vmin': 0, + 'vmax': len(self.classes), + 'interpolation': 'none', + } + fig, axs = plt.subplots(1, num_panels, figsize=(num_panels * 4, 5)) + + for plot in plots: + im_kwargs = ( + kwargs.copy() if plot[0] == 'mask' or plot[0] == 'predictions' else {} + ) + if plot[0] == 'sentinel': + axs[0].add_patch( + Rectangle( + (crop_indices[0].start, crop_indices[1].start), + crop_indices[0].stop - crop_indices[0].start, + crop_indices[1].stop - crop_indices[1].start, + fill=False, + edgecolor='red', + lw=0.5, + ) + ) + + axs[0].imshow(plot[1], **im_kwargs) + axs[0].axis('off') + if show_titles: + axs[0].set_title(plot[0]) + + axs = axs[1:] + + if suptitle is not None: + plt.suptitle(suptitle) + + # Create a legend for the mask + if 'mask' in [plot[0] for plot in plots]: + # Create a legend with class names + legend_elements = [ + Patch(facecolor=self.cmap(i), edgecolor='k', label=cls) + for i, cls in enumerate(self.classes) + ] + fig.legend( + handles=legend_elements, + loc='upper left', + bbox_to_anchor=(0.92, 0.85), + fontsize='large', + ) + + return fig + + +class FLAIR2Toy(FLAIR2): + """FLAIR #2 (The French Land cover from Aerospace ImageRy) dataset. + + Toy Version of the dataset. For further information refer to the FLAIR2 dataset. + """ + + md5s: ClassVar[dict[str, str]] = { + 'flair_2_toy_dataset': 'ffde17f275fc258dce19331b5e17e10a' + } + + dir_names: ClassVar[dict[str, dict[str, str]]] = { + 'train': { + 'images': 'flair_2_toy_dataset/flair_2_toy_aerial_train', + 'sentinels': 'flair_2_toy_dataset/flair_2_toy_sen_train', + 'masks': 'flair_2_toy_dataset/flair_2_toy_labels_train', + }, + 'test': { + 'images': 'flair_2_toy_dataset/flair_2_toy_aerial_test', + 'sentinels': 'flair_2_toy_dataset/flair_2_toy_sen_test', + 'masks': 'flair_2_toy_dataset/flair_2_toy_labels_test', + }, + } + centroids_file: str = 'flair_2_toy_dataset/flair-2_centroids_sp_to_patch' + + def __init__( + self, + root: Path = 'data', + split: str = 'train', + bands: Sequence[str] = FLAIR2.all_bands, + transforms: Callable[[dict[str, Tensor]], dict[str, Tensor]] | None = None, + download: bool = False, + checksum: bool = False, + use_sentinel: bool = False, + ) -> None: + """Initialize a new FLAIR2Toy dataset instance. + + Args: + root: root directory where dataset can be found + split: which split to load, one of 'train' or 'test' + bands: which bands to load (B01, B02, B03, B04, B05) + transforms: optional transforms to apply to sample + download: whether to download the dataset if it is not found + checksum: whether to verify the dataset using checksums + use_sentinel: whether to use sentinel data in the dataset # FIXME: sentinel does not work with dataloader due to varying dimensions + + Raises: + DatasetNotFoundError + + ..versionadded:: 0.7 + """ + print('-' * 80) + print('WARNING: Using toy dataset.') + print('This dataset should be used for testing purposes only.') + print( + 'Disabling use_toy-flag when initializing the dataset will initialize the full dataset.' + ) + print('-' * 80) + super().__init__( + root, split, bands, transforms, download, checksum, use_sentinel + ) + + def _verify(self) -> None: + """Verify the integrity of the dataset.""" + if os.path.isdir(os.path.join(self.root, 'flair_2_toy_dataset')): + print(os.path.join(self.root, 'flair_2_toy_dataset')) + print('Toy dataset downloaded and extracted already...') + return + + if os.path.isfile(os.path.join(self.root, 'flair_2_toy_dataset.zip')): + print('Extracting toy dataset...') + self._extract() + return + + if not self.download: + raise DatasetNotFoundError(self) + + self._download('flair_2_toy_dataset') + self._extract() + + def _download(self, url: str, suffix: str = '.zip') -> None: + """Download the dataset.""" + download_url( + os.path.join(self.url_prefix, f'{url}{suffix}'), + self.root, + md5=self.md5s.get(url, None) if self.checksum else None, + ) + # FIXME: Why is download_url not checking integrity (tests run through)? + # assert check_integrity(os.path.join(self.root, f"{url}{suffix}"), self.md5s.get(url, None) if self.checksum else None) + + def _extract(self, file_name: str = 'flair_2_toy_dataset.zip') -> None: + """Extract the dataset.""" + assert isinstance(self.root, str | os.PathLike) + assert os.path.isfile(os.path.join(self.root, file_name)) + zipfile = os.path.join(self.root, file_name) + extract_archive(zipfile)