1.3 KiB
1.3 KiB
Pretraining Data Builder
This code is for building pretraining data for the self-supervised learning of SkySense++.
Install
Prepare the environment:
conda create -n data_builder python=3.12
conda activate data_builder
pip install -r requirements.txt
Download pretraining data list in lmdb format from Zenodo
Download Data
python -m rsi_download --username <username> --password <password> --api_key <api_key> <X> <Y> <Z> <date_min> <date_max>
Notes:
usernameandpasswordcan be created in the Copernicus Data Space Ecosystem,api_keycan be created in the Maxar.XYZare coordinates in the Web Mercator coordinate system.date_minanddate_maxare in the format ofYYYY-MM.
Process Data
python -m rsi_process --platform <platform> --fn_img path/to/image.zip --save_dir output_<platform>/
Notes:
platformcan bes1,s2,wv.fn_imgis the path to the downloaded zip file.save_diris the directory to save the processed data.
Automatic Script
sh run_data_builder.sh
This script will first read the pretraining list, then download the data according to the list, and proceed them automatically.