image
imagewidth (px)
12
12

Creating Cloud-Cloudless Paired Dataset

To generate the Cloud-Cloudless Paired Dataset, we utilize an existing dataset that encompasses imagery from five municipalities in Colombia. This dataset is structured with each municipality containing 165 images, acquired through the satellite_extractor API and based on SentinelHub, spanning across 12 different channels. Within each municipality, we have meticulously identified the optimal cloudless image and stored the corresponding names in a dictionary called cloudless_groundtruths.

The primary objective is to subtract this specific cloudless image from the set of 165 images, resulting in 164 images per municipality. Subsequently, each of these 164 images will be paired with the previously identified cloudless image. Consequently, this process creates a total of 164 * 2 * NUM_MUNICIPALITIES, yielding 1640 images or 820 image pairs in total.

To facilitate this dataset creation, we have introduced the class Cloud2CloudlesDataset. This class replicates each corresponding ground truth for the 164 images in each municipality, storing every paired set in a newly designated folder named DATASET.

Originally, the images were formatted as image_DD%%MM%%YY. As part of the dataset creation process, we will rename these images to image_DD%%MM%%YY_gt for the ground truth image and image_DD%%MM%%YY_cloud for the image with clouds.

Upon initialization, the class requires the path to the source dataset, which contains raw images for each municipality organized in N folders, and the final path where the new dataset will be stored.

The implementation includes thorough testing to verify the number of images, ensuring that the final count aligns with the total number of images encountered in the source folder path. Additionally, one of the functions within this class ensures the existence of each folder in the specified destination path, guaranteeing a well-organized and comprehensive Cloud-Cloudless Paired Dataset.

Github code here:

Downloads last month
6
Edit dataset card