SlowGuess/NeurIPS_2023_OCR huggingface dataset:
For pre-training we conduct experiments similar to those performed in SSL4EO-S12 [13] for each sensor/product in the dataset described in Section 2.1. We pre-train various ResNet [52] and ViT [53] backbones initialized with ImageNet weights using the SimCLR v1 [21] and MoCo v2 [17] SSL methods. RGB ImageNet weights are repeated (RGBRGB...) and scaled  $(3 / C$  for  $C$  channels) in the first convolutional layer in order to handle multispectral images. During pre-training we use the same default augmentations and hyperparameters as SimCLR and MoCo with a couple of exceptions. As saturation and hue are undefined for multispectral imagery, we skip these parts of color jitter. Instead, we use the random season contrast technique proposed by Manas et al. [12] by utilizing 2 randomly sampled multitemporal images from the same location as the augmented views. Additionally, although grayscale is undefined for multispectral imagery, we take the average of all bands to compute random grayscale images. We pre-train each model for 200 epochs using a batch size of 1024. All pre-training experiments are performed on a GPU cluster, with 80 GB of memory per GPU. Each experiment takes anywhere from 15-40 hrs depending on the number of spectral bands and model size, each trained in parallel on  $4\times$  GPUs, for a total of  $\sim 4\mathrm{K}$  GPU hours including hyperparameter tuning.
For benchmarking, we freeze the encoder and fine-tune a U-Net [76] decoder for all cloud detection and land cover classification datasets mentioned above. For the L7 Irish and L8 Biome datasets, we use a random 60-20-20 train-val-test split. For the NLCD and CDL datasets, we use a random 70-15-15 train-val-test split. NLCD and CDL classes are limited to those with  $>1\%$  area, with remaining classes mapped to the background class. Splits are defined using a fixed random seed for reproducibility. Random horizontal and vertical flip and random resized crop data augmentations are used during training. Models are trained for a minimum of 20 epochs and a maximum of 100 epochs using early stopping and a learning rate schedule patience of 6 epochs. Only learning rate undergoes hyperparameter tuning, with the most common optimal learning rate being 3e-3. All benchmarking experiments are conducted on NVIDIA RTX A6000 (2.5 hr/experiment) and A100 (1 hr/experiment) GPUs for a total of  $\sim 200$  GPU hours. Configuration files and training scripts for reproducing all experiments are made available in the TorchGeo library [54].
4 Benchmark results
In order to evaluate the effectiveness of our pre-trained models, we report overall accuracy and mean intersection over union (mIoU) on four semantic segmentation datasets. Table 1 demonstrates substantial gains over ImageNet, with up to an  $18.43\%$  accuracy and  $24.25\mathrm{mIoU}$  improvement for MoCo and up to a  $14.43\%$  accuracy and  $18.69\mathrm{mIoU}$  improvement for SimCLR. Although MoCo outperforms ImageNet in 5 out of 6 experiments, SimCLR shows mixed results, outperforming ImageNet in only 2 out of 6 experiments. Our SimCLR models suffered from convergence issues with the smaller batch size we used, and may improve with better hyperparameter tuning.
Note that both our sampling method and pretext task are explicitly designed to ignore clouds. During sampling, we only select patches from scenes with  $< 20\%$  cloud cover, decreasing the frequency of clouds in our pre-training dataset. Our pretext task involves mapping patches taken from 2 different seasons to the same representation. If one patch contains partial cloud cover, the model must learn to
Table 1: Cloud detection benchmark results. Overall accuracy and mean intersection over union (mIoU) are reported for the test splits of the L7 Irish (Landsat 7 ETM+ TOA) and L8 Biome (Landsat 8 OLI/TIRS TOA) datasets for a range of backbones and pre-training techniques. All predictions are made by U-Nets with frozen backbones. Three random seeds are used to compute mean ± standard deviation of the performance.
Backbone	Pre-training	L7 Irish	L8 Biome
Accuracy	mIoU	Accuracy	mIoU
ResNet-18	ImageNet	64.08 ± 3.40	47.21 ± 3.71	41.86 ± 0.46	24.67 ± 0.37
MoCo	74.79 ± 2.20	59.77 ± 2.79	42.70 ± 5.02	27.33 ± 4.14
SimCLR	34.80 ± 11.36	21.46 ± 8.53	39.17 ± 5.12	24.44 ± 3.89
ResNet-50	ImageNet	61.77 ± 3.27	44.75 ± 3.41	45.73 ± 6.08	29.78 ± 5.23
MoCo	69.62 ± 1.94	53.42 ± 2.29	45.95 ± 5.17	29.23 ± 4.44
SimCLR	49.37 ± 12.86	33.41 ± 11.20	48.77 ± 6.42	32.41 ± 5.56
ViT-S16	ImageNet	68.22 ± 1.39	51.78 ± 1.59	47.29 ± 1.88	30.98 ± 1.61
MoCo	86.65 ± 0.43	76.03 ± 0.67	46.66 ± 3.59	30.33 ± 3.14
SimCLR	82.65 ± 0.27	70.47 ± 0.35	42.33 ± 1.80	26.99 ± 1.67
ignore it. The fact that our SSL techniques work at all, let alone outperform ImageNet, demonstrates the generalizability of our pre-trained model weights to different downstream applications.
Performance metrics for our land cover/land use tasks are reported in Table 2. Again, MoCo consistently outperforms ImageNet in 25 out of 30 experiments across all sensors and product levels, while SimCLR is unable to beat ImageNet in 24 out of 30 experiments. Performance gains by MoCo are more modest in this task with a larger number of classes, but still reach as high as  $6.60\%$  overall accuracy and  $7.13\mathrm{mIoU}$ . There are exceptions to this, particularly for ETM+ TOA, but with additional hyperparameter tuning of the pre-trained model it may be possible to exceed performance of ImageNet. We attempted to use weights based on class frequency in our cross-entropy loss, but these resulted in reduced accuracy and mIoU.
Figure 4 shows an example prediction made by a ResNet-18 backbone pre-trained on SSL4EO-L using MoCo and a U-Net fine-tuned on CDL. Although the model is unable to predict detailed features like roads and field corners, it removes much of the noise introduced by the pixel-wise decision tree classifier used to produce CDL. Black pixels in the mask represent uncommon crop types that are mapped to the background class. The model tends to pick the most common agricultural classes like corn and soybean given no examples of these crop types in the training dataset. Although winter wheat and fallow (idle farmland) are sometimes misclassified by the model, this is not unexpected.
(b) Mask
(c) Prediction
Figure 4: Landsat 8 OLI SR image, ground truth mask, and prediction made by a U-Net with a ResNet-18 backbone pre-trained using MoCo and SSL4EO-L and fine-tuned on CDL 2019.
Table 2: SSL4EO-L benchmark results. Overall accuracy and mean intersection over union (mIoU) are reported for the test splits of the NLCD and CDL datasets for a range of sensors, product levels, backbones, and pre-training techniques. All predictions are made by U-Nets with frozen backbones.
Satellite (Sensor)	Level (Product)	Backbone	Pre-training	NLCD	CDL
Accuracy	mIoU	Accuracy	mIoU
Landsats 4-5 (TM)	Level-1 (TOA)	ResNet-18	ImageNet	65.63	48.84	66.11	49.38
MoCo	67.65	51.11	68.70	52.32
SimCLR	60.86	43.74	61.94	44.86
ResNet-50	ImageNet	66.63	49.96	67.42	50.85
MoCo	68.75	53.28	69.45	53.20
SimCLR	62.05	44.98	62.80	45.77
ViT-S16	ImageNet	68.93	52.59	68.27	51.83
MoCo	67.17	50.57	67.60	51.07
SimCLR	66.82	50.17	66.92	50.28
Landsat 7 (ETM+)	Level-1 (TOA)	ResNet-18	ImageNet	66.11	49.38	65.84	49.08
MoCo	65.22	48.39	62.84	45.81
SimCLR	58.76	41.60	56.47	39.34
ResNet-50	ImageNet	64.01	47.06	66.23	49.51
MoCo	66.60	49.92	64.12	47.19
SimCLR	57.17	40.02	54.95	37.88
ViT-S16	ImageNet	62.06	45.01	57.67	40.52
MoCo	63.75	46.79	60.88	43.70
SimCLR	63.33	46.34	59.06	41.91
Level-2 (SR)	ResNet-18	ImageNet	63.34	46.34	60.70	43.58
MoCo	64.18	47.25	67.30	50.71
SimCLR	57.26	40.11	54.42	37.48
ResNet-50	ImageNet	64.29	47.38	61.66	44.57
MoCo	64.37	47.46	62.35	45.30
SimCLR	57.79	40.64	55.69	38.59
ViT-S16	ImageNet	63.54	46.56	51.38	34.57
MoCo	64.09	47.21	52.37	35.48
SimCLR	63.99	47.05	53.17	36.21
Landsats 8-9 (OLI/TIRS)	Level-1 (TOA)	ResNet-18	ImageNet	66.40	49.70	65.21	48.38
MoCo	67.82	51.30	65.74	48.96
SimCLR	62.14	45.08	60.01	42.86
ResNet-50	ImageNet	67.73	51.20	66.45	49.76
MoCo	69.17	52.87	67.29	50.70
SimCLR	64.66	47.78	62.08	45.01
ViT-S16	ImageNet	65.52	48.72	62.38	45.33
MoCo	67.11	50.49	64.62	47.73
SimCLR	66.12	49.39	63.88	46.94
Level-2 (SR)	ResNet-18	ImageNet	65.46	48.65	62.88	45.85
MoCo	67.01	50.39	68.05	51.57
SimCLR	59.93	42.79	57.44	40.30
ResNet-50	ImageNet	66.29	49.58	64.17	47.24
MoCo	67.44	50.88	65.96	49.21
SimCLR	63.65	46.68	60.01	43.17
ViT-S16	ImageNet	65.71	48.93	62.78	45.75
MoCo	66.81	50.16	64.17	47.24
SimCLR	65.04	48.20	62.61	45.46
Winter wheat is planted in the fall and may be harvested before our summer imagery is taken. Similarly, fallow can look much like pasture as weeds begin to grow in empty fields.
Thin Cloud
(c) Prediction
Figure 5: Landsat 7 ETM+ TOA image, ground truth mask, and prediction made by a U-Net with a ResNet-18 backbone pre-trained using MoCo and SSL4EO-L and fine-tuned on L7 Irish.
Figure 5 shows an example prediction made by a U-Net pre-trained on SSL4EO-L and fine-tuned on L7 Irish. The model is able to correctly detect the majority of clouds in the image, but fails to detect cloud shadow due to its infrequent appearance in the training dataset. However, the model actually does a better job than the human annotator in the lower left corner, where the "ground truth" mask misses substantial cloud and thin cloud.
There are a few limitations of the sampling method we chose to create our pre-training dataset. Due to low light levels near the poles, Landsat satellites do not capture images above  $81.8^{\circ}$  latitudes [77], and do not produce SR products above  $76^{\circ}$  latitudes. The additional  $23.5^{\circ}$  tilt of the Earth's axis during the winter [78] means that it is not possible to collect imagery for all 4 seasons above  $52.5^{\circ}$  latitude. It may be possible to relax this constraint and allow for sampling from locations where 3 out of 4 seasons have imagery. Due to cloud cover and lower populations, there is very little imagery of tropical rainforests or polar regions, both of which are common applications of Landsat data.
The benchmark datasets we create are limited to the United States and may not adequately reflect performance in other regions where agricultural practices and crops differ greatly. Ideally, we would create additional global datasets. There exist large global Landsat-based datasets including the Global Forest Cover Change dataset [40]. However, these datasets do not exist during all times when these satellites are active. We would also like to have classification datasets in addition to semantic segmentation datasets. It may be possible to classify images by biome, although this task may be too easy. In future work, we would like to add pre-trained models for MSS data, although this will require a different sampling technique due to limited coverage over most of the world.
In this paper we introduce the SSL4EO-L pre-training dataset, the first ever SSL dataset for Landsat imagery and the largest Landsat dataset in history. We pre-train the first foundation models for the Landsat family of satellites, enabling progress in a multitude of scientific fields that can benefit from remote sensing and deep learning. Additionally, we revitalize the L7 Irish and L8 Biome datasets. We create the first benchmark datasets for the TM and ETM+ SR sensors, allowing direct comparison across all modern Landsat sensors and products. All datasets, model weights, training code, and scripts used to produce our results are distributed via the TorchGeo library, allowing for ease of experimentation and reproduction of our results.
<sup>4</sup>https://www.usgs.gov/landsat-missions/landsat-collection-2-surface-reflectance
The authors gratefully acknowledge the computational and data resources provided through the joint high-performance data analytics (HPDA) project "terrabyte" of the German Aerospace Center (DLR) and the Leibniz Supercomputing Center (LRZ). This work was supported by the Helmholtz Association's Initiative and Networking Fund on the HAICORE@FZJ partition. This work made use of the Illinois Campus Cluster, a computing resource that is operated by the Illinois Campus Cluster Program (ICCP) in conjunction with the National Center for Supercomputing Applications (NCSA) and which is supported by funds from the University of Illinois at Urbana-Champaign. The work was supported in part by the National Science Foundation (NSF) through awards IIS 21-31335, OAC 21-30835, DBI 20-21898, as well as a C3.ai research award and the Taiwan-UIUC Fellowship.
[1] Laura E. P. Rocchio. Virginia T. Norwood: The mother of Landsat. Landsat Science, August 2020.
[2] Bill P. Clark. Landsat 3 Return Beam Vidicon response artifacts: A report on RBV photographic product characteristics and quality coding system. Technical report, EROS Data Center, U.S. Geological Survey, August 1981.
[3] Christopher Engebretson. Landsat Multispectral Scanner (MSS) Collection 2 (C2) Level 1 (L1) Data Format Control Book (DFCB). Technical report, Department of the Interior, U.S. Geological Survey, September 2020. LSDS-1416.
[4] Christopher Engebretson. Landsat Thematic Mapper (TM) Level 1 (L1) Data Format Control Book (DFCB). Technical report, Department of the Interior, U.S. Geological Survey, February 2018. LSDS-284.
[5] Jim Lacasse. Landsat 7 (L7) Enhanced Thematic Mapper Plus (ETM+) Level 1 (L1) Data Format Control Book (DFCB). Technical report, Department of the Interior, U.S. Geological Survey, August 2016. LSDS-272.
[6] Christopher Engebretson. Landsat 8-9 Operational Land Imager (OLI) - Thermal Infrarer Sensor (TIRS) Collection 2 Level 1 (L1) Data Format Control Book (DFCB). Technical report, Department of the Interior, U.S. Geological Survey, September 2020. LSDS-1822.
[7] Nicholas E. Young, Ryan S. Anderson, Stephen M. Chignell, Anthony G. Vorster, Rick Lawrence, and Paul H. Evangelista. A survival guide to Landsat preprocessing. *Ecology*, 98(4):920-932, 2017.
[8] Neal Jean, Sherrie Wang, Anshul Samar, George Azzari, David Lobell, and Stefano Ermon. Tile2Vec: Unsupervised representation learning for spatially distributed data. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 3967-3974, 2019.
[9] Kumar Ayush, Burak Uzkent, Chenlin Meng, Kumar Tanmay, Marshall Burke, David Lobell, and Stefano Ermon. Geography-aware self-supervised learning. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 10181-10190, 2021.
[10] Yezhen Cong, Samar Khanna, Chenlin Meng, Patrick Liu, Erik Rozi, Yutong He, Marshall Burke, David Lobell, and Stefano Ermon. SatMAE: Pre-training transformers for temporal and multi-spectral satellite imagery. Advances in Neural Information Processing Systems, 35: 197-211, 2022.
[11] Colorado J. Reed, Ritwik Gupta, Shufan Li, Sarah Brockman, Christopher Funk, Brian Clipp, Salvatore Candido, Matt Uytendaele, and Trevor Darrell. Scale-MAE: A scale-aware masked autoencoder for multiscale geospatial representation learning. arXiv preprint arXiv:2212.14532, 2022.
[12] Oscar Manas, Alexandre Lacoste, Xavier Giró-i-Nieto, David Vazquez, and Pau Rodriguez. Seasonal Contrast: Unsupervised pre-training from uncurated remote sensing data. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 9414-9423, 2021.
[77] Robert Bindschadler. Landsat coverage of the earth at high latitudes. Photogrammetric Engineering & Remote Sensing, 69(12):1333-1339, 2003.
[78] John D. Boon. The tilt of the earth's axis and the consequences thereof. Field and Laboratory, 13(1):2, 1945.
A.1 Ethics statement
Although satellite imagery in general can pose ethical concerns for surveillance and military applications, the imagery used to pre-train our models is low resolution (30 m/px) and cannot be used for such purposes. The primary applications Landsat imagery is useful for are Earth observation, including downstream tasks like climate change, agriculture, and ecology. While model training does contribute to greenhouse gas emissions, we believe that the benefits of such foundation models, especially their ability to reduce training demands for end users, outweigh these contributions.
A.2 Licensing
All data used to create our datasets is released by the USGS under public domain, and may be used, shared, transferred, or redistributed without restriction. All datasets and models we create are released under a CC0 1.0 Universal license. All code, including training scripts and core Torch-Geo contributions, is released under an MIT license. The authors bear all responsibility in case of violation of rights.
A.3 Downloading
All data, metadata, and pre-trained models used or created in this paper can be downloaded from https://huggingface.co/torchgeo, either manually or using TorchGeo (see Listing 1). Dataset images are stored in the widely used GeoTIFF format. These datasets and models will be maintained in perpetuity and may be improved over time. All datasets include dataset cards describing the dataset size, source, and license. All models include model cards describing the library used to load them, source, and license.
from torchgeo.datasets import SSL4EOL
ds = SSL4EOL(root="data", split="oli_SR", download=True)
Listing 1: Example download script for the OLI SR split of the SSL4EO-L pre-training dataset.
A.4 Reproducibility
Instructions to recreate the pre-training and benchmark datasets, results, or plots, can be found at https://github.com/microsoft/torchgeo/blob/releases/v0.5/experiments/ssl4eo/landsat/README.md. Listing 2 shows example code for pre-training on SSL4EO-L and fine-tuning/evaluating on our benchmark datasets, and can be modified to control other aspects of the training process or to train on a different sensor/product. The TorchGeo v0.5 release is the first release containing the datasets and models used and created in this paper. If you encounter any problems, please open an issue on GitHub and we will clarify the documentation.
Listing 2: Example training script to pre-train and benchmark a model on SSL4EO-L.
from lightning.pytorch import Trainer   
from torchgeo.datamodules import ( SSL4EOLDDataModule, SSL4EOLBenchmarkDataModule )   
from torchgeo.trainers import MoCoTask, SemanticSegmentationTask   
# Pre-train on SSL4EO-L using MoCo   
datamodule  $=$  SSL4EOLDDataModule(split  $=$  "oli_SR",seasons  $= 2$  ,download  $\equiv$  True) task  $=$  MoCoTask(model  $=$  "resnet18",weights  $\equiv$  True,in_channels  $= 7$  1   
trainer  $=$  Trainer(max_epochs  $\coloneqq$  200)   
trainer.fit(model  $\equiv$  task，datamodule  $\equiv$  datamodule)   
#Fine-tune and evaluate performance   
datamodule  $=$  SSL4EOLDBenchmarkDataModule(sensor  $=$  "oli_SR",product  $=$  "cdl") task  $=$  SemanticSegmentationTask(model  $=$  "unet",backbone  $=$  "resnet18")   
trainer  $=$  Trainer(max_epochs  $\coloneqq$  100)   
trainer.fit(model  $\equiv$  task，datamodule  $\equiv$  datamodule)   
trainer.test(model  $\equiv$  task，datamodule  $\equiv$  datamodule)
A.5 Class distribution
The benchmark datasets we use suffer from extreme class imbalance. Below are tables documenting the value, description, and percentage of each class in all datasets. Fill/background classes are ignored during training and are not considered when computing these statistics.
A.5.1 Cloud detection datasets
Clear pixels cover more area than all other classes combined.
Table 3: Class distribution for cloud detection datasets.
Value	Description	L7 Irish	L8 Biome
0	Fill	-	-
64	Cloud Shadow	0.7	1.5
128	Clear	66.1	50.5
192	Thin Cloud	10.2	14.7
255	Cloud	23.0	33.2
A.5.2 SSL4EO-L benchmark datasets
The top 3 classes cover more area than all other classes combined. Only classes with  $>1\%$  area are considered during evaluation, the rest are mapped to the background class. TM data is downloaded from 2011, while  $\mathrm{ETM+}$  and OLI data is downloaded from 2019. The TOA and SR versions have the same geographic locations, and therefore the same class distribution.
Table 4: Class distribution for SSL4EO-L NLCD.
Value	Description	TM	ETM+	OLI
0	Background	-	-	-
11	Open Water	2.4	2.2	2.3
21	Developed, Open Space	2.7	2.7	2.6
22	Developed, Low Intensity	1.7	1.7	1.7
31	Barren Land (Rock/Sand/Clay)	1.0	1.0	1.0
41	Deciduous Forest	9.2	9.2	8.8
42	Evergreen Forest	12.2	11.9	12.1
43	Mixed Forest	3.4	3.4	3.2
52	Shrub/Scrub	22.4	22.8	23.6
71	Grassland/Herbaceous	14.9	14.6	14.6
81	Pasture/Hay	6.2	5.9	5.8
82	Cultivated Crops	16.6	17.3	17.1
90	Woody Wetlands	4.5	4.4	4.3
95	Emergent Herbaceous Wetlands	1.6	1.5	1.6
-	Other	1.2	1.4	1.3
Table 5: Class distribution for SSL4EO-L CDL.
Value	Description	TM	ETM+	OLI
0	Background	-	-	-
1	Corn	4.6	4.9	4.7
5	Soybeans	3.6	4.1	3.9
24	Winter Wheat	1.9	1.6	1.6
36	Alfalfa	0.9	1.1	1.2
37	Other Hay/Non Alfalfa	1.2	1.6	1.6
61	Fallow/Idle Cropland	1.4	1.9	1.8
111	Open Water	1.7	1.7	1.7
121	Developed/Open Space	3.3	2.9	2.8
122	Developed/Low intensity	1.4	1.5	1.5
131	Barren	1.1	1.1	1.1
141	Deciduous Forest	11.9	10.6	10.2
142	Evergreen Forest	13.3	12.7	12.9
143	Mixed Forest	1.5	3.2	2.9
152	Shrubland	22.4	24.2	25.0
176	Grass/Pasture	20.3	16.6	16.5
190	Woody Wetlands	3.9	4.2	4.1
195	Herbaceous Wetlands	1.3	1.4	1.5
-	Other	4.2	4.7	4.8
A.6 Spectral bands
Figure 6: Spectral wavelengths and spatial resolutions of each band captured by all Landsat sensors. On Landsats 1-3, MSS bands were actually numbered 4-7. Landsat 9 introduced new and improved OLI-2/TIRS-2 sensors, but the bands are identical, so the sensors were combined in this figure.
A.7 Data visualization
(a) Spring (2021-03-22)
(b) Summer (2022-06-13)
(c) Fall (2022-10-19)
Figure 7: Example location showing the time-series nature of SSL4EO-L. Each location has imagery from 4 different seasons. Images are selected from a 60-day window centered about the vernal and autumnal equinoxes and the summer and winter solstices in order to maximize seasonal changes. Images are limited to a 2-year window to minimize man-made changes. Image location is Ci County, Handan, Heibei, China.
(d) Winter (2022-12-22)
A.8 Model complexity
Table 6: Complexity of backbone models used in this paper. Includes the number of parameters, memory requirements, floating point operations per second (FLOPS), and multiply-accumulate operations (MACs) of each model. All experiments were performed on an NVIDIA A100 GPU.
Model	# Params (M)	Memory (MB)	FLOPS (G/s)	MACs (G)
ResNet-18	11.21	44.87	622.49	136.21
ResNet-50	23.56	94.46	366.32	281.72
ViT-S16	22.46	89.83	423.61	281.28
A.9 Sampling algorithm
Procedure DownloadSSL4EO  $(N = 250,000,S = 4,\sigma = 50\mathrm{km})$
Data:  $M = \{\mu \}$  centroids of 10K most populous cities in the world   
Result: Downloads non-overlapping, cloud-free, nodata-free images from  $N$  locations during S seasons   
 $X\gets \{\}$    
while len  $(X) <   N$  ..   
 $\mu \sim \mathcal{U}(M)$ $x\sim \mathcal{N}(\mu ,\sigma)$    
# Ensure x does not overlap with existing sampled patches if Overlaps  $(x,X):\# 264$  px buffer continue   
# Look for S cloud-free, nodata-free images at location x   
 $T\leftarrow \{\}$ $t\gets 0$    
for t in range(S): # 60-day and 2-year window around equinoxes/solstices if CloudCover(x,t): #  $20\%$  threshold continue if NoData(x,t): continue   
 $T\gets T\cup \{t\}$    
if len  $(T) <   S$  .. continue   
# Download from Google Earth Engine Download  $(x,T)$ $X\gets X\cup \{x\}$