forked from LBaudoux/MLULC
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdata-downloads.sh
85 lines (69 loc) · 2.91 KB
/
data-downloads.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/usr/bin/bash
#
# Helper for the download and set up of the data of ECOCLIMAP-SG-ML
#
# To be executed to the directory where the data will be stored (with at least 25GB per member)
# PWD=data
set -vx
mkdir outputs
# 1. Weights
# ==========
mkdir saved_models
cd saved_models # <---------- PWD=data/saved_models
wget https://zenodo.org/records/14046040/files/mmt-weights-v2.0.ckpt
wget https://zenodo.org/records/14046040/files/mmt-weights-v2.0.config.yaml
echo "Weights downloaded in $PWD"
cd .. # <---------- PWD=data
# 2. ECOSG-ML files
# =================
mkdir tiff_data
mkdir tiff_data/ECOCLIMAP-SG-ML
cd tiff_data/ECOCLIMAP-SG-ML # <---------- PWD=data/tiff_data/ECOCLIMAP-SG-ML
for MB in {0..5};
do
wget "https://zenodo.org/records/14046040/files/ecosgml-v2.1-mb00$MB.zip"
done
echo "ECOSG-ML TIF files downloaded in $PWD. Now unzipping --- `date`"
for ZIP in `ls *.zip`
do
unzip $ZIP
done
echo "ECOSG-ML TIF files unzipped --- `date`"
rm *.zip
cd ../.. # <---------- PWD=data
# 3. Training/testing data
# ========================
wget https://zenodo.org/records/14046040/files/hdf5-v2.0.zip
echo "HDF5 files downloaded in $PWD. Now unzipping --- `date`"
unzip -j hdf5-v2.0.zip -d hdf5_data
echo "HDF5 files unzipped --- `date`"
rm hdf5-v2.0.zip
# 4. ESA WorldCover
# =================
cd tiff_data # <---------- PWD=data/tiff_data
wget https://zenodo.org/record/7254221/files/ESA_WorldCover_10m_2021_v200_60deg_macrotile_S30W060.zip
wget https://zenodo.org/record/7254221/files/ESA_WorldCover_10m_2021_v200_60deg_macrotile_N30W060.zip
wget https://zenodo.org/record/7254221/files/ESA_WorldCover_10m_2021_v200_60deg_macrotile_S30E000.zip
wget https://zenodo.org/record/7254221/files/ESA_WorldCover_10m_2021_v200_60deg_macrotile_N30E000.zip
echo "ESA WorldCover TIF files downloaded in $PWD. Now unzipping --- `date`"
unzip '*.zip' -d ESA-WorldCover-2021
echo "ESA WorldCover TIF files unzipped --- `date`"
rm *.zip
cd .. # <---------- PWD=data
# 5. ECOCLIMAP-SG+
# ================
mkdir tiff_data/ECOCLIMAP-SG-plus
cd tiff_data/ECOCLIMAP-SG-plus # <---------- PWD=data/tiff_data/ECOCLIMAP-SG-plus
wget https://zenodo.org/records/11517903/files/best-guess_map.zip
unzip -j best-guess_map.zip -d bguess-ecosgp-v2.0
wget https://zenodo.org/records/11517903/files/quality_score_map.zip
unzip -j quality_score_map.zip -d qscore-ecosgp-v2.0
cd ../.. # <---------- PWD=data
# 6. ECOCLIMAP-SG
# ===============
mkdir tiff_data/ECOCLIMAP-SG
set +vx
echo " "
echo "The data directory is almost ready. Two last things are to be done from the Python package root directory (MT-MLULC):"
echo " ln -s $PWD data # Create a symbolic link in the package directory"
echo " python scripts/download_ecoclimapsg.py --landingdir $PWD/tiff_data/ECOCLIMAP-SG # Download and extract ECOSG in TIF"