add
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +2 -8
- .gitignore +9 -0
- App_main.py +114 -0
- README.md +4 -5
- configs/baselines/test_INR_liif_metasr_aliif.yaml +24 -0
- configs/baselines/train_1x-5x_INR_aliif.yaml +98 -0
- configs/baselines/train_1x-5x_INR_diinn_arbrcan_sadn_overnet.yaml +81 -0
- configs/baselines/train_1x-5x_INR_liif.yaml +85 -0
- configs/baselines/train_1x-5x_INR_metasr.yaml +80 -0
- configs/test_CNN.yaml +25 -0
- configs/test_INR_diinn_arbrcan_funsr_overnet.yaml +25 -0
- configs/test_interpolate.yaml +24 -0
- configs/train_1x-5x_INR_funsr.yaml +115 -0
- configs/train_CNN.yaml +94 -0
- data_split/AID_split.json +0 -0
- data_split/UC_split.json +1 -0
- datasets/__init__.py +9 -0
- datasets/cnn_sr_wrappers.py +75 -0
- datasets/datasets.py +21 -0
- datasets/datasets_loader.py +69 -0
- datasets/image_folder.py +87 -0
- datasets/inr_diinn_sr_wrappers.py +76 -0
- datasets/inr_sr_wrappers.py +177 -0
- datasets/rs_super_warp.py +75 -0
- datasets/wrappers.py +248 -0
- examples/AID_bridge_19_HR.png +0 -0
- examples/AID_bridge_19_LR.png +0 -0
- examples/AID_commercial_32_HR.png +0 -0
- examples/AID_commercial_32_LR.png +0 -0
- examples/AID_parking_60_HR.png +0 -0
- examples/AID_parking_60_LR.png +0 -0
- examples/AID_school_161_HR.png +0 -0
- examples/AID_school_161_LR.png +0 -0
- examples/UC_airplane00_HR.png +0 -0
- examples/UC_airplane00_LR.png +0 -0
- examples/UC_airplane95_HR.png +0 -0
- examples/UC_airplane95_LR.png +0 -0
- examples/UC_freeway35_HR.png +0 -0
- examples/UC_freeway35_LR.png +0 -0
- examples/UC_storagetanks54_HR.png +0 -0
- examples/UC_storagetanks54_LR.png +0 -0
- examples/airplane00.tif +0 -0
- examples/airplane95.tif +0 -0
- examples/bridge_19.jpg +3 -0
- examples/commercial_32.jpg +3 -0
- examples/freeway35.tif +0 -0
- examples/parking_60.jpg +3 -0
- examples/resize.py +20 -0
- examples/school_161.jpg +3 -0
- examples/storagetanks54.tif +0 -0
.gitattributes
CHANGED
@@ -2,27 +2,20 @@
|
|
2 |
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
6 |
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
12 |
*.model filter=lfs diff=lfs merge=lfs -text
|
13 |
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
16 |
*.onnx filter=lfs diff=lfs merge=lfs -text
|
17 |
*.ot filter=lfs diff=lfs merge=lfs -text
|
18 |
*.parquet filter=lfs diff=lfs merge=lfs -text
|
19 |
*.pb filter=lfs diff=lfs merge=lfs -text
|
20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
22 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
23 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
24 |
*.rar filter=lfs diff=lfs merge=lfs -text
|
25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
26 |
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
27 |
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
28 |
*.tflite filter=lfs diff=lfs merge=lfs -text
|
@@ -30,5 +23,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
30 |
*.wasm filter=lfs diff=lfs merge=lfs -text
|
31 |
*.xz filter=lfs diff=lfs merge=lfs -text
|
32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
33 |
-
*.
|
34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
2 |
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
|
|
5 |
*.ftz filter=lfs diff=lfs merge=lfs -text
|
6 |
*.gz filter=lfs diff=lfs merge=lfs -text
|
7 |
*.h5 filter=lfs diff=lfs merge=lfs -text
|
8 |
*.joblib filter=lfs diff=lfs merge=lfs -text
|
9 |
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
|
|
10 |
*.model filter=lfs diff=lfs merge=lfs -text
|
11 |
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
12 |
*.onnx filter=lfs diff=lfs merge=lfs -text
|
13 |
*.ot filter=lfs diff=lfs merge=lfs -text
|
14 |
*.parquet filter=lfs diff=lfs merge=lfs -text
|
15 |
*.pb filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
16 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
17 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
18 |
*.rar filter=lfs diff=lfs merge=lfs -text
|
|
|
19 |
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
20 |
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
21 |
*.tflite filter=lfs diff=lfs merge=lfs -text
|
|
|
23 |
*.wasm filter=lfs diff=lfs merge=lfs -text
|
24 |
*.xz filter=lfs diff=lfs merge=lfs -text
|
25 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
26 |
+
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
27 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
28 |
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
__pycache__
|
2 |
+
data/
|
3 |
+
.idea
|
4 |
+
checkpoints/
|
5 |
+
results/
|
6 |
+
pretrained/
|
7 |
+
.DS_Store
|
8 |
+
gradio_cached_examples/
|
9 |
+
pretrain/
|
App_main.py
ADDED
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
|
3 |
+
import models
|
4 |
+
import gradio as gr
|
5 |
+
|
6 |
+
# os.system('nvidia-smi')
|
7 |
+
# os.system('ls /usr/local')
|
8 |
+
# os.system('pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu113')
|
9 |
+
import torch
|
10 |
+
from torchvision import transforms
|
11 |
+
from torchvision.transforms import InterpolationMode
|
12 |
+
|
13 |
+
device = 'cuda:0' if torch.cuda.is_available() else 'cpu'
|
14 |
+
|
15 |
+
|
16 |
+
def construct_sample(img, mean=0.5, std=0.5):
|
17 |
+
img = transforms.ToTensor()(img)
|
18 |
+
img = transforms.Resize(48, InterpolationMode.BICUBIC)(img)
|
19 |
+
img = transforms.Normalize(mean, std)(img)
|
20 |
+
return img
|
21 |
+
|
22 |
+
def build_model(cp):
|
23 |
+
model_spec = torch.load(cp, map_location='cpu')['model']
|
24 |
+
print(model_spec['args'])
|
25 |
+
model = models.make(model_spec, load_sd=True).to(device)
|
26 |
+
return model
|
27 |
+
|
28 |
+
|
29 |
+
# Function for building extraction
|
30 |
+
def sr_func(img, cp, scale):
|
31 |
+
if cp == 'UC':
|
32 |
+
checkpoint = 'pretrain/UC_FunSR_RDN.pth'
|
33 |
+
elif cp == 'AID':
|
34 |
+
checkpoint = 'pretrain/AID_FunSR_RDN.pth'
|
35 |
+
else:
|
36 |
+
raise NotImplementedError
|
37 |
+
sample = construct_sample(img)
|
38 |
+
print('Use: ', device)
|
39 |
+
model = build_model(checkpoint)
|
40 |
+
model.eval()
|
41 |
+
sample = sample.to(device)
|
42 |
+
sample = sample.unsqueeze(0)
|
43 |
+
|
44 |
+
ori_size = torch.tensor(sample.shape[2:]) # BCHW
|
45 |
+
target_size = ori_size * scale
|
46 |
+
target_size = target_size.long()
|
47 |
+
lr_target_size_img = torch.nn.functional.interpolate(sample, scale_factor=scale, mode='nearest')
|
48 |
+
with torch.no_grad():
|
49 |
+
pred = model(sample, target_size.tolist())
|
50 |
+
|
51 |
+
if isinstance(pred, list):
|
52 |
+
pred = pred[-1]
|
53 |
+
pred = pred * 0.5 + 0.5
|
54 |
+
|
55 |
+
pred *= 255
|
56 |
+
pred = pred[0].detach().cpu()
|
57 |
+
lr_target_size_img = lr_target_size_img * 0.5 + 0.5
|
58 |
+
lr_target_size_img = 255 * lr_target_size_img[0].detach().cpu()
|
59 |
+
|
60 |
+
lr_target_size_img = torch.clamp(lr_target_size_img, 0, 255).permute(1,2,0).numpy().astype(np.uint8)
|
61 |
+
pred = torch.clamp(pred, 0, 255).permute(1,2,0).numpy().astype(np.uint8)
|
62 |
+
|
63 |
+
line = np.ones((pred.shape[0], 5, 3), dtype=np.uint8) * 255
|
64 |
+
pred = np.concatenate((lr_target_size_img, line, pred), axis=1)
|
65 |
+
return pred
|
66 |
+
|
67 |
+
title = "FunSR"
|
68 |
+
description = "Gradio demo for continuous remote sensing image super-resolution. Upload image from UCMerced or AID Dataset or click any one of the examples, " \
|
69 |
+
"Then change the upscaling magnification, and click \"Submit\" and wait for the super-resolved result. \n" \
|
70 |
+
"Paper: Continuous Remote Sensing Image Super-Resolution based on Context Interaction in Implicit Function Space"
|
71 |
+
|
72 |
+
article = "<p style='text-align: center'><a href='https://kyanchen.github.io/FunSR/' target='_blank'>FunSR Project " \
|
73 |
+
"Page</a></p> "
|
74 |
+
|
75 |
+
default_scale = 4.0
|
76 |
+
examples = [
|
77 |
+
['examples/AID_school_161_LR.png', 'AID', default_scale],
|
78 |
+
['examples/AID_bridge_19_LR.png', 'AID', default_scale],
|
79 |
+
['examples/AID_parking_60_LR.png', 'AID', default_scale],
|
80 |
+
['examples/AID_commercial_32_LR.png', 'AID', default_scale],
|
81 |
+
|
82 |
+
['examples/UC_airplane95_LR.png', 'UC', default_scale],
|
83 |
+
['examples/UC_freeway35_LR.png', 'UC', default_scale],
|
84 |
+
['examples/UC_storagetanks54_LR.png', 'UC', default_scale],
|
85 |
+
['examples/UC_airplane00_LR.png', 'UC', default_scale],
|
86 |
+
]
|
87 |
+
|
88 |
+
with gr.Blocks() as demo:
|
89 |
+
image_input = gr.inputs.Image(type='pil', label='Input Img')
|
90 |
+
# with gr.Row().style(equal_height=True):
|
91 |
+
# image_LR_output = gr.outputs.Image(label='LR Img', type='numpy')
|
92 |
+
image_output = gr.outputs.Image(label='SR Result', type='numpy')
|
93 |
+
with gr.Row():
|
94 |
+
checkpoint = gr.inputs.Radio(['WHU', 'INRIA'], label='Checkpoint')
|
95 |
+
scale = gr.Slider(1, 12, value=4.0, step=0.1, label='scale')
|
96 |
+
|
97 |
+
io = gr.Interface(fn=sr_func,
|
98 |
+
inputs=[image_input,
|
99 |
+
checkpoint,
|
100 |
+
scale
|
101 |
+
],
|
102 |
+
outputs=[
|
103 |
+
# image_LR_output,
|
104 |
+
image_output
|
105 |
+
],
|
106 |
+
title=title,
|
107 |
+
description=description,
|
108 |
+
article=article,
|
109 |
+
allow_flagging='auto',
|
110 |
+
examples=examples,
|
111 |
+
cache_examples=True,
|
112 |
+
layout="grid"
|
113 |
+
)
|
114 |
+
io.launch()
|
README.md
CHANGED
@@ -1,12 +1,11 @@
|
|
1 |
---
|
2 |
title: FunSR
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
colorTo: yellow
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 3.
|
8 |
-
app_file:
|
9 |
pinned: false
|
10 |
---
|
11 |
-
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
title: FunSR
|
3 |
+
emoji: 🐢
|
4 |
+
colorFrom: red
|
5 |
colorTo: yellow
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 3.18.0
|
8 |
+
app_file: App_main.py
|
9 |
pinned: false
|
10 |
---
|
|
|
11 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
configs/baselines/test_INR_liif_metasr_aliif.yaml
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
test_dataset:
|
2 |
+
dataset:
|
3 |
+
name: hr_data_loader
|
4 |
+
args:
|
5 |
+
# root_path: /data/kyanchen/datasets/UC/256
|
6 |
+
# split_file: data_split/UC_split.json
|
7 |
+
root_path: /data/kyanchen/datasets/AID
|
8 |
+
split_file: data_split/AID_split.json
|
9 |
+
split_key: test
|
10 |
+
cache: none
|
11 |
+
wrapper:
|
12 |
+
name: inr_fixed_scale_sr_warp
|
13 |
+
args:
|
14 |
+
scale_ratio: 4
|
15 |
+
patch_size: 48
|
16 |
+
augment: false
|
17 |
+
val_mode: false
|
18 |
+
test_mode: true
|
19 |
+
return_cell: true
|
20 |
+
batch_size: 1
|
21 |
+
eval_type: psnr+ssim
|
22 |
+
data_norm:
|
23 |
+
inp: {sub: [0.5], div: [0.5]}
|
24 |
+
gt: {sub: [0.5], div: [0.5]}
|
configs/baselines/train_1x-5x_INR_aliif.yaml
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
train_dataset:
|
2 |
+
dataset:
|
3 |
+
name: hr_data_loader
|
4 |
+
args:
|
5 |
+
# root_path: /data/kyanchen/datasets/UC/256
|
6 |
+
# split_file: data_split/UC_split.json
|
7 |
+
root_path: /data/kyanchen/datasets/AID
|
8 |
+
split_file: data_split/AID_split.json
|
9 |
+
split_key: train
|
10 |
+
cache: none
|
11 |
+
wrapper:
|
12 |
+
name: inr_range_scale_sr_warp
|
13 |
+
args:
|
14 |
+
max_scale_ratio: 5
|
15 |
+
patch_size: 48
|
16 |
+
augment: true
|
17 |
+
sample_q: 1024
|
18 |
+
val_mode: false
|
19 |
+
test_mode: false
|
20 |
+
return_cell: true
|
21 |
+
batch_size: 48
|
22 |
+
num_workers: 4
|
23 |
+
|
24 |
+
val_dataset:
|
25 |
+
dataset:
|
26 |
+
name: hr_data_loader
|
27 |
+
args:
|
28 |
+
# root_path: /data/kyanchen/datasets/UC/256
|
29 |
+
# split_file: data_split/UC_split.json
|
30 |
+
root_path: /data/kyanchen/datasets/AID
|
31 |
+
split_file: data_split/AID_split.json
|
32 |
+
split_key: val
|
33 |
+
first_k: 128
|
34 |
+
cache: none
|
35 |
+
wrapper:
|
36 |
+
name: inr_range_scale_sr_warp
|
37 |
+
args:
|
38 |
+
max_scale_ratio: 5
|
39 |
+
patch_size: 48
|
40 |
+
augment: false
|
41 |
+
sample_q: 1024
|
42 |
+
val_mode: true
|
43 |
+
test_mode: false
|
44 |
+
return_cell: true
|
45 |
+
batch_size: 48
|
46 |
+
num_workers: 4
|
47 |
+
|
48 |
+
eval_type: psnr+ssim
|
49 |
+
|
50 |
+
data_norm:
|
51 |
+
inp: {sub: [0.5], div: [0.5]}
|
52 |
+
gt: {sub: [0.5], div: [0.5]}
|
53 |
+
|
54 |
+
model:
|
55 |
+
name: aliif
|
56 |
+
args:
|
57 |
+
encoder_spec:
|
58 |
+
# name: edsr-baseline
|
59 |
+
# name: rdn
|
60 |
+
name: rcan
|
61 |
+
args:
|
62 |
+
no_upsampling: true
|
63 |
+
imnet_spec:
|
64 |
+
name: mlp_pw
|
65 |
+
args:
|
66 |
+
out_dim: 3
|
67 |
+
hidden_list: [16, 16, 16, 16]
|
68 |
+
pdn_spec:
|
69 |
+
name: ExpansionNet
|
70 |
+
args:
|
71 |
+
in_dim: 580
|
72 |
+
out_dim: 10
|
73 |
+
hidden_list: [ 256, 256, 256, 256 ]
|
74 |
+
basis_spec:
|
75 |
+
name: basis
|
76 |
+
args:
|
77 |
+
basis_num: 10
|
78 |
+
hidden: 16
|
79 |
+
state: train
|
80 |
+
path: ./save/test/epoch-last.pth
|
81 |
+
|
82 |
+
optimizer:
|
83 |
+
name: adamw
|
84 |
+
args:
|
85 |
+
lr: 1.e-4
|
86 |
+
|
87 |
+
epoch_max: 3000
|
88 |
+
|
89 |
+
lr_scheduler:
|
90 |
+
# name: CosineAnnealingLR
|
91 |
+
# T_max: 1500
|
92 |
+
# eta_min: 1.e-7
|
93 |
+
name: MultiStepLR
|
94 |
+
milestones: [2000]
|
95 |
+
gamma: 0.1
|
96 |
+
|
97 |
+
epoch_val_interval: 40
|
98 |
+
epoch_save_interval: 300
|
configs/baselines/train_1x-5x_INR_diinn_arbrcan_sadn_overnet.yaml
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
train_dataset:
|
2 |
+
dataset:
|
3 |
+
name: hr_data_loader
|
4 |
+
args:
|
5 |
+
# root_path: /data/kyanchen/datasets/UC/256
|
6 |
+
# split_file: data_split/UC_split.json
|
7 |
+
root_path: /data/kyanchen/datasets/AID
|
8 |
+
split_file: data_split/AID_split.json
|
9 |
+
split_key: train
|
10 |
+
cache: none
|
11 |
+
wrapper:
|
12 |
+
name: inr_diinn_select_scale_sr_warp
|
13 |
+
args:
|
14 |
+
scales: [2, 2.5, 3, 3.5, 4]
|
15 |
+
patch_size: 48
|
16 |
+
augment: true
|
17 |
+
val_mode: false
|
18 |
+
test_mode: false
|
19 |
+
batch_size: 32
|
20 |
+
num_workers: 4
|
21 |
+
|
22 |
+
val_dataset:
|
23 |
+
dataset:
|
24 |
+
name: hr_data_loader
|
25 |
+
args:
|
26 |
+
# root_path: /data/kyanchen/datasets/UC/256
|
27 |
+
# split_file: data_split/UC_split.json
|
28 |
+
root_path: /data/kyanchen/datasets/AID
|
29 |
+
split_file: data_split/AID_split.json
|
30 |
+
split_key: val
|
31 |
+
first_k: 128
|
32 |
+
cache: none
|
33 |
+
wrapper:
|
34 |
+
name: cnn_fixed_scale_sr_warp
|
35 |
+
args:
|
36 |
+
scale_ratio: 5
|
37 |
+
patch_size: 48
|
38 |
+
augment: false
|
39 |
+
val_mode: true
|
40 |
+
test_mode: false
|
41 |
+
batch_size: 8
|
42 |
+
num_workers: 4
|
43 |
+
|
44 |
+
eval_type: psnr+ssim
|
45 |
+
|
46 |
+
data_norm:
|
47 |
+
img: {sub: [0.5], div: [0.5]}
|
48 |
+
gt: {sub: [0.5], div: [0.5]}
|
49 |
+
|
50 |
+
model:
|
51 |
+
# name: diinn
|
52 |
+
# name: arbrcan
|
53 |
+
# name: sadnarc
|
54 |
+
# name: edsr-sadn
|
55 |
+
# name: rdn-sadn
|
56 |
+
name: overnet
|
57 |
+
args:
|
58 |
+
encoder_spec:
|
59 |
+
# name: edsr-baseline
|
60 |
+
# name: rdn
|
61 |
+
name: rcan
|
62 |
+
args:
|
63 |
+
no_upsampling: true
|
64 |
+
|
65 |
+
optimizer:
|
66 |
+
name: adamw
|
67 |
+
args:
|
68 |
+
lr: 1.e-4
|
69 |
+
|
70 |
+
epoch_max: 3000
|
71 |
+
|
72 |
+
lr_scheduler:
|
73 |
+
# name: CosineAnnealingLR
|
74 |
+
# T_max: 1500
|
75 |
+
# eta_min: 1.e-7
|
76 |
+
name: MultiStepLR
|
77 |
+
milestones: [2000]
|
78 |
+
gamma: 0.1
|
79 |
+
|
80 |
+
epoch_val_interval: 40
|
81 |
+
epoch_save_interval: 300
|
configs/baselines/train_1x-5x_INR_liif.yaml
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
train_dataset:
|
2 |
+
dataset:
|
3 |
+
name: hr_data_loader
|
4 |
+
args:
|
5 |
+
# root_path: /data/kyanchen/datasets/UC/256
|
6 |
+
# split_file: data_split/UC_split.json
|
7 |
+
root_path: /data/kyanchen/datasets/AID
|
8 |
+
split_file: data_split/AID_split.json
|
9 |
+
split_key: train
|
10 |
+
cache: none
|
11 |
+
wrapper:
|
12 |
+
name: inr_range_scale_sr_warp
|
13 |
+
args:
|
14 |
+
max_scale_ratio: 5
|
15 |
+
patch_size: 48
|
16 |
+
augment: true
|
17 |
+
sample_q: 1024
|
18 |
+
val_mode: false
|
19 |
+
test_mode: false
|
20 |
+
return_cell: true
|
21 |
+
batch_size: 64
|
22 |
+
num_workers: 4
|
23 |
+
|
24 |
+
val_dataset:
|
25 |
+
dataset:
|
26 |
+
name: hr_data_loader
|
27 |
+
args:
|
28 |
+
# root_path: /data/kyanchen/datasets/UC/256
|
29 |
+
# split_file: data_split/UC_split.json
|
30 |
+
root_path: /data/kyanchen/datasets/AID
|
31 |
+
split_file: data_split/AID_split.json
|
32 |
+
split_key: val
|
33 |
+
first_k: 128
|
34 |
+
cache: none
|
35 |
+
wrapper:
|
36 |
+
name: inr_range_scale_sr_warp
|
37 |
+
args:
|
38 |
+
max_scale_ratio: 5
|
39 |
+
patch_size: 48
|
40 |
+
augment: false
|
41 |
+
sample_q: 1024
|
42 |
+
val_mode: true
|
43 |
+
test_mode: false
|
44 |
+
return_cell: true
|
45 |
+
batch_size: 64
|
46 |
+
num_workers: 4
|
47 |
+
|
48 |
+
eval_type: psnr+ssim
|
49 |
+
|
50 |
+
data_norm:
|
51 |
+
inp: {sub: [0.5], div: [0.5]}
|
52 |
+
gt: {sub: [0.5], div: [0.5]}
|
53 |
+
|
54 |
+
model:
|
55 |
+
name: liif
|
56 |
+
args:
|
57 |
+
encoder_spec:
|
58 |
+
# name: edsr-baseline
|
59 |
+
# name: rdn
|
60 |
+
name: rcan
|
61 |
+
args:
|
62 |
+
no_upsampling: true
|
63 |
+
imnet_spec:
|
64 |
+
name: mlp
|
65 |
+
args:
|
66 |
+
out_dim: 3
|
67 |
+
hidden_list: [256, 256, 256, 256]
|
68 |
+
|
69 |
+
optimizer:
|
70 |
+
name: adamw
|
71 |
+
args:
|
72 |
+
lr: 1.e-4
|
73 |
+
|
74 |
+
epoch_max: 4000
|
75 |
+
|
76 |
+
lr_scheduler:
|
77 |
+
# name: CosineAnnealingLR
|
78 |
+
# T_max: 1500
|
79 |
+
# eta_min: 1.e-7
|
80 |
+
name: MultiStepLR
|
81 |
+
milestones: [2500]
|
82 |
+
gamma: 0.1
|
83 |
+
|
84 |
+
epoch_val_interval: 40
|
85 |
+
epoch_save_interval: 300
|
configs/baselines/train_1x-5x_INR_metasr.yaml
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
train_dataset:
|
2 |
+
dataset:
|
3 |
+
name: hr_data_loader
|
4 |
+
args:
|
5 |
+
# root_path: /data/kyanchen/datasets/UC/256
|
6 |
+
# split_file: data_split/UC_split.json
|
7 |
+
root_path: /data/kyanchen/datasets/AID
|
8 |
+
split_file: data_split/AID_split.json
|
9 |
+
split_key: train
|
10 |
+
cache: none
|
11 |
+
wrapper:
|
12 |
+
name: inr_range_scale_sr_warp
|
13 |
+
args:
|
14 |
+
max_scale_ratio: 5
|
15 |
+
patch_size: 48
|
16 |
+
augment: true
|
17 |
+
sample_q: 1024
|
18 |
+
val_mode: false
|
19 |
+
test_mode: false
|
20 |
+
return_cell: true
|
21 |
+
batch_size: 64
|
22 |
+
num_workers: 4
|
23 |
+
|
24 |
+
val_dataset:
|
25 |
+
dataset:
|
26 |
+
name: hr_data_loader
|
27 |
+
args:
|
28 |
+
# root_path: /data/kyanchen/datasets/UC/256
|
29 |
+
# split_file: data_split/UC_split.json
|
30 |
+
root_path: /data/kyanchen/datasets/AID
|
31 |
+
split_file: data_split/AID_split.json
|
32 |
+
split_key: val
|
33 |
+
first_k: 128
|
34 |
+
cache: none
|
35 |
+
wrapper:
|
36 |
+
name: inr_range_scale_sr_warp
|
37 |
+
args:
|
38 |
+
max_scale_ratio: 5
|
39 |
+
patch_size: 48
|
40 |
+
augment: false
|
41 |
+
sample_q: 1024
|
42 |
+
val_mode: true
|
43 |
+
test_mode: false
|
44 |
+
return_cell: true
|
45 |
+
batch_size: 64
|
46 |
+
num_workers: 4
|
47 |
+
|
48 |
+
eval_type: psnr+ssim
|
49 |
+
|
50 |
+
data_norm:
|
51 |
+
inp: {sub: [0.5], div: [0.5]}
|
52 |
+
gt: {sub: [0.5], div: [0.5]}
|
53 |
+
|
54 |
+
model:
|
55 |
+
name: metasr
|
56 |
+
args:
|
57 |
+
encoder_spec:
|
58 |
+
# name: edsr-baseline
|
59 |
+
# name: rdn
|
60 |
+
name: rcan
|
61 |
+
args:
|
62 |
+
no_upsampling: true
|
63 |
+
|
64 |
+
optimizer:
|
65 |
+
name: adamw
|
66 |
+
args:
|
67 |
+
lr: 1.e-4
|
68 |
+
|
69 |
+
epoch_max: 3000
|
70 |
+
|
71 |
+
lr_scheduler:
|
72 |
+
# name: CosineAnnealingLR
|
73 |
+
# T_max: 1500
|
74 |
+
# eta_min: 1.e-7
|
75 |
+
name: MultiStepLR
|
76 |
+
milestones: [2000]
|
77 |
+
gamma: 0.1
|
78 |
+
|
79 |
+
epoch_val_interval: 40
|
80 |
+
epoch_save_interval: 300
|
configs/test_CNN.yaml
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
test_dataset:
|
2 |
+
dataset:
|
3 |
+
name: hr_data_loader
|
4 |
+
args:
|
5 |
+
# root_path: /data/kyanchen/datasets/UC/256
|
6 |
+
# split_file: data_split/UC_split.json
|
7 |
+
root_path: /data/kyanchen/datasets/AID
|
8 |
+
split_file: data_split/AID_split.json
|
9 |
+
split_key: test
|
10 |
+
cache: none
|
11 |
+
wrapper:
|
12 |
+
name: cnn_fixed_scale_sr_warp
|
13 |
+
args:
|
14 |
+
scale_ratio: 5
|
15 |
+
patch_size: 48
|
16 |
+
augment: false
|
17 |
+
val_mode: false
|
18 |
+
test_mode: true
|
19 |
+
batch_size: 8
|
20 |
+
|
21 |
+
eval_type: psnr+ssim
|
22 |
+
|
23 |
+
data_norm:
|
24 |
+
img: {sub: [0.5], div: [0.5]}
|
25 |
+
gt: {sub: [0.5], div: [0.5]}
|
configs/test_INR_diinn_arbrcan_funsr_overnet.yaml
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
test_dataset:
|
2 |
+
dataset:
|
3 |
+
name: hr_data_loader
|
4 |
+
args:
|
5 |
+
# root_path: /data/kyanchen/datasets/UC/256
|
6 |
+
# split_file: data_split/UC_split.json
|
7 |
+
root_path: /data/kyanchen/datasets/AID
|
8 |
+
split_file: data_split/AID_split.json
|
9 |
+
split_key: test
|
10 |
+
cache: none
|
11 |
+
wrapper:
|
12 |
+
name: cnn_fixed_scale_sr_warp
|
13 |
+
args:
|
14 |
+
scale_ratio: 5
|
15 |
+
patch_size: 48
|
16 |
+
augment: false
|
17 |
+
val_mode: false
|
18 |
+
test_mode: true
|
19 |
+
batch_size: 8
|
20 |
+
|
21 |
+
eval_type: psnr+ssim
|
22 |
+
|
23 |
+
data_norm:
|
24 |
+
img: {sub: [0.5], div: [0.5]}
|
25 |
+
gt: {sub: [0.5], div: [0.5]}
|
configs/test_interpolate.yaml
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
test_dataset:
|
2 |
+
dataset:
|
3 |
+
name: hr_data_loader
|
4 |
+
args:
|
5 |
+
# root_path: /data/kyanchen/datasets/UC/256
|
6 |
+
# split_file: data_split/UC_split.json
|
7 |
+
root_path: /data/kyanchen/datasets/AID
|
8 |
+
split_file: data_split/AID_split.json
|
9 |
+
split_key: test
|
10 |
+
cache: none
|
11 |
+
wrapper:
|
12 |
+
name: cnn_fixed_scale_sr_warp
|
13 |
+
args:
|
14 |
+
scale_ratio: 4
|
15 |
+
patch_size: 48
|
16 |
+
test_mode: true
|
17 |
+
augment: false
|
18 |
+
batch_size: 64
|
19 |
+
|
20 |
+
eval_type: psnr+ssim
|
21 |
+
|
22 |
+
data_norm:
|
23 |
+
img: {sub: [0.5], div: [0.5]}
|
24 |
+
gt: {sub: [0.5], div: [0.5]}
|
configs/train_1x-5x_INR_funsr.yaml
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
train_dataset:
|
2 |
+
dataset:
|
3 |
+
name: hr_data_loader
|
4 |
+
args:
|
5 |
+
root_path: /data/kyanchen/datasets/UC/256
|
6 |
+
split_file: data_split/UC_split.json
|
7 |
+
# root_path: /data/kyanchen/datasets/AID
|
8 |
+
# split_file: data_split/AID_split.json
|
9 |
+
split_key: train
|
10 |
+
cache: none
|
11 |
+
wrapper:
|
12 |
+
name: inr_diinn_select_scale_sr_warp
|
13 |
+
args:
|
14 |
+
scales: [2, 2.5, 3, 3.5, 4]
|
15 |
+
# scales: [1.5, 1.7, 2, 2.3, 2.5, 2.7, 3, 3.3, 3.5, 3.7, 4, 4.3, 4.5, 4.7, 5]
|
16 |
+
patch_size: 48
|
17 |
+
augment: true
|
18 |
+
val_mode: false
|
19 |
+
test_mode: false
|
20 |
+
batch_size: 8
|
21 |
+
num_workers: 4
|
22 |
+
|
23 |
+
val_dataset:
|
24 |
+
dataset:
|
25 |
+
name: hr_data_loader
|
26 |
+
args:
|
27 |
+
root_path: /data/kyanchen/datasets/UC/256
|
28 |
+
split_file: data_split/UC_split.json
|
29 |
+
# root_path: /data/kyanchen/datasets/AID
|
30 |
+
# split_file: data_split/AID_split.json
|
31 |
+
split_key: test
|
32 |
+
# first_k: 128
|
33 |
+
cache: none
|
34 |
+
wrapper:
|
35 |
+
name: cnn_fixed_scale_sr_warp
|
36 |
+
args:
|
37 |
+
scale_ratio: 2
|
38 |
+
patch_size: 48
|
39 |
+
augment: false
|
40 |
+
val_mode: false
|
41 |
+
test_mode: true
|
42 |
+
batch_size: 4
|
43 |
+
num_workers: 4
|
44 |
+
|
45 |
+
eval_type: psnr+ssim
|
46 |
+
|
47 |
+
data_norm:
|
48 |
+
img: {sub: [0.5], div: [0.5]}
|
49 |
+
gt: {sub: [0.5], div: [0.5]}
|
50 |
+
|
51 |
+
model:
|
52 |
+
name: funsr
|
53 |
+
args:
|
54 |
+
encoder_spec:
|
55 |
+
name: edsr-baseline
|
56 |
+
# name: rdn
|
57 |
+
# name: rcan
|
58 |
+
args:
|
59 |
+
no_upsampling: true
|
60 |
+
has_multiscale: true
|
61 |
+
neck:
|
62 |
+
name: transformer_neck
|
63 |
+
args:
|
64 |
+
d_dim: 256
|
65 |
+
downsample: true
|
66 |
+
has_pe: true
|
67 |
+
has_norm: true
|
68 |
+
class_token: true
|
69 |
+
num_encoder_layers: 3
|
70 |
+
decoder:
|
71 |
+
name: sirens
|
72 |
+
args:
|
73 |
+
num_inner_layers: 9
|
74 |
+
is_residual: true
|
75 |
+
global_decoder:
|
76 |
+
name: sirens
|
77 |
+
is_proj: true
|
78 |
+
args:
|
79 |
+
num_inner_layers: 9
|
80 |
+
is_residual: true
|
81 |
+
encoder_rgb: true
|
82 |
+
n_forward_times: 1
|
83 |
+
encode_hr_coord: true
|
84 |
+
has_bn: true
|
85 |
+
encode_scale_ratio: true
|
86 |
+
local_unfold: false
|
87 |
+
weight_gen_func: 'nearest-exact' # bilinear, nearest-exact,bicubic
|
88 |
+
|
89 |
+
optimizer:
|
90 |
+
name: adamw
|
91 |
+
args:
|
92 |
+
lr: 0.0001
|
93 |
+
#optimizer:
|
94 |
+
# name: adam
|
95 |
+
# args:
|
96 |
+
# lr: 0.0001
|
97 |
+
|
98 |
+
epoch_max: 4000
|
99 |
+
|
100 |
+
lr_scheduler:
|
101 |
+
# name: CosineAnnealingLR
|
102 |
+
# T_max: 1500
|
103 |
+
# eta_min: 1.e-7
|
104 |
+
name: CosineAnnealingWarmUpLR
|
105 |
+
epochs: 4000
|
106 |
+
warm_up_epochs: 50
|
107 |
+
eta_min: 1.e-8
|
108 |
+
|
109 |
+
# name: MultiStepLR
|
110 |
+
# milestones: [2000, 3000]
|
111 |
+
# gamma: 0.1
|
112 |
+
|
113 |
+
#resume: checkpoints/EXP20221215_00/epoch-last.pth
|
114 |
+
epoch_val_interval: 50
|
115 |
+
epoch_save_interval: 300
|
configs/train_CNN.yaml
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
train_dataset:
|
2 |
+
dataset:
|
3 |
+
name: hr_data_loader
|
4 |
+
args:
|
5 |
+
# root_path: /data/kyanchen/datasets/UC/256
|
6 |
+
# split_file: data_split/UC_split.json
|
7 |
+
root_path: /data/kyanchen/datasets/AID
|
8 |
+
split_file: data_split/AID_split.json
|
9 |
+
split_key: train
|
10 |
+
cache: none
|
11 |
+
wrapper:
|
12 |
+
name: cnn_fixed_scale_sr_warp
|
13 |
+
args:
|
14 |
+
scale_ratio: 2
|
15 |
+
patch_size: 48
|
16 |
+
augment: true
|
17 |
+
val_mode: false
|
18 |
+
test_mode: false
|
19 |
+
batch_size: 96
|
20 |
+
num_workers: 8
|
21 |
+
|
22 |
+
val_dataset:
|
23 |
+
dataset:
|
24 |
+
name: hr_data_loader
|
25 |
+
args:
|
26 |
+
# root_path: /data/kyanchen/datasets/UC/256
|
27 |
+
# split_file: data_split/UC_split.json
|
28 |
+
root_path: /data/kyanchen/datasets/AID
|
29 |
+
split_file: data_split/AID_split.json
|
30 |
+
split_key: val
|
31 |
+
cache: none
|
32 |
+
wrapper:
|
33 |
+
name: cnn_fixed_scale_sr_warp
|
34 |
+
args:
|
35 |
+
scale_ratio: 2
|
36 |
+
patch_size: 48
|
37 |
+
augment: false
|
38 |
+
val_mode: true
|
39 |
+
test_mode: false
|
40 |
+
batch_size: 32
|
41 |
+
num_workers: 4
|
42 |
+
|
43 |
+
data_norm:
|
44 |
+
img: {sub: [0.5], div: [0.5]}
|
45 |
+
gt: {sub: [0.5], div: [0.5]}
|
46 |
+
|
47 |
+
#model:
|
48 |
+
# name: TransENet
|
49 |
+
# args:
|
50 |
+
# scale_ratio: 2
|
51 |
+
|
52 |
+
#model:
|
53 |
+
# name: SRCNN
|
54 |
+
# args:
|
55 |
+
# scale_ratio: 2
|
56 |
+
|
57 |
+
#model:
|
58 |
+
# name: FSRCNN
|
59 |
+
# args:
|
60 |
+
# scale_ratio: 2
|
61 |
+
|
62 |
+
#model:
|
63 |
+
# name: LGCNET
|
64 |
+
# args:
|
65 |
+
# scale_ratio: 2
|
66 |
+
|
67 |
+
#model:
|
68 |
+
# name: DCM
|
69 |
+
# args:
|
70 |
+
# scale_ratio: 2
|
71 |
+
|
72 |
+
model:
|
73 |
+
name: VDSR
|
74 |
+
args:
|
75 |
+
scale_ratio: 2
|
76 |
+
|
77 |
+
optimizer:
|
78 |
+
name: adamw
|
79 |
+
args:
|
80 |
+
lr: 0.0001
|
81 |
+
|
82 |
+
epoch_max: 1300
|
83 |
+
#epoch_max: 2000
|
84 |
+
|
85 |
+
lr_scheduler:
|
86 |
+
# name: CosineAnnealingLR
|
87 |
+
# T_max: 300
|
88 |
+
# eta_min: 1.e-6
|
89 |
+
name: MultiStepLR
|
90 |
+
milestones: [1000]
|
91 |
+
gamma: 0.5
|
92 |
+
|
93 |
+
epoch_val_interval: 50
|
94 |
+
epoch_save_interval: 300
|
data_split/AID_split.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
data_split/UC_split.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"train": ["agricultural/agricultural49.tif", "agricultural/agricultural58.tif", "agricultural/agricultural24.tif", "agricultural/agricultural44.tif", "agricultural/agricultural17.tif", "agricultural/agricultural21.tif", "agricultural/agricultural94.tif", "agricultural/agricultural50.tif", "agricultural/agricultural34.tif", "agricultural/agricultural16.tif", "agricultural/agricultural92.tif", "agricultural/agricultural62.tif", "agricultural/agricultural59.tif", "agricultural/agricultural87.tif", "agricultural/agricultural28.tif", "agricultural/agricultural79.tif", "agricultural/agricultural05.tif", "agricultural/agricultural43.tif", "agricultural/agricultural55.tif", "agricultural/agricultural51.tif", "agricultural/agricultural75.tif", "agricultural/agricultural57.tif", "agricultural/agricultural99.tif", "agricultural/agricultural83.tif", "agricultural/agricultural73.tif", "agricultural/agricultural04.tif", "agricultural/agricultural69.tif", "agricultural/agricultural42.tif", "agricultural/agricultural70.tif", "agricultural/agricultural78.tif", "agricultural/agricultural71.tif", "agricultural/agricultural54.tif", "agricultural/agricultural77.tif", "agricultural/agricultural39.tif", "agricultural/agricultural32.tif", "agricultural/agricultural81.tif", "agricultural/agricultural33.tif", "agricultural/agricultural84.tif", "agricultural/agricultural89.tif", "agricultural/agricultural13.tif", "agricultural/agricultural61.tif", "agricultural/agricultural41.tif", "agricultural/agricultural31.tif", "agricultural/agricultural65.tif", "agricultural/agricultural18.tif", "agricultural/agricultural80.tif", "agricultural/agricultural12.tif", "agricultural/agricultural37.tif", "agricultural/agricultural82.tif", "agricultural/agricultural06.tif", "agricultural/agricultural85.tif", "agricultural/agricultural95.tif", "agricultural/agricultural52.tif", "agricultural/agricultural14.tif", "agricultural/agricultural72.tif", "agricultural/agricultural86.tif", "agricultural/agricultural10.tif", "agricultural/agricultural56.tif", "agricultural/agricultural90.tif", "agricultural/agricultural63.tif", "airplane/airplane53.tif", "airplane/airplane22.tif", "airplane/airplane00.tif", "airplane/airplane99.tif", "airplane/airplane10.tif", "airplane/airplane31.tif", "airplane/airplane32.tif", "airplane/airplane90.tif", "airplane/airplane51.tif", "airplane/airplane07.tif", "airplane/airplane82.tif", "airplane/airplane48.tif", "airplane/airplane93.tif", "airplane/airplane39.tif", "airplane/airplane52.tif", "airplane/airplane49.tif", "airplane/airplane84.tif", "airplane/airplane73.tif", "airplane/airplane05.tif", "airplane/airplane01.tif", "airplane/airplane14.tif", "airplane/airplane50.tif", "airplane/airplane59.tif", "airplane/airplane57.tif", "airplane/airplane68.tif", "airplane/airplane72.tif", "airplane/airplane04.tif", "airplane/airplane78.tif", "airplane/airplane28.tif", "airplane/airplane26.tif", "airplane/airplane83.tif", "airplane/airplane55.tif", "airplane/airplane66.tif", "airplane/airplane92.tif", "airplane/airplane60.tif", "airplane/airplane58.tif", "airplane/airplane63.tif", "airplane/airplane81.tif", "airplane/airplane21.tif", "airplane/airplane69.tif", "airplane/airplane18.tif", "airplane/airplane54.tif", "airplane/airplane44.tif", "airplane/airplane87.tif", "airplane/airplane62.tif", "airplane/airplane30.tif", "airplane/airplane76.tif", "airplane/airplane24.tif", "airplane/airplane36.tif", "airplane/airplane56.tif", "airplane/airplane38.tif", "airplane/airplane75.tif", "airplane/airplane70.tif", "airplane/airplane79.tif", "airplane/airplane41.tif", "airplane/airplane89.tif", "airplane/airplane06.tif", "airplane/airplane67.tif", "airplane/airplane02.tif", "airplane/airplane45.tif", "baseballdiamond/baseballdiamond63.tif", "baseballdiamond/baseballdiamond39.tif", "baseballdiamond/baseballdiamond67.tif", "baseballdiamond/baseballdiamond10.tif", "baseballdiamond/baseballdiamond80.tif", "baseballdiamond/baseballdiamond11.tif", "baseballdiamond/baseballdiamond46.tif", "baseballdiamond/baseballdiamond77.tif", "baseballdiamond/baseballdiamond33.tif", "baseballdiamond/baseballdiamond76.tif", "baseballdiamond/baseballdiamond78.tif", "baseballdiamond/baseballdiamond96.tif", "baseballdiamond/baseballdiamond84.tif", "baseballdiamond/baseballdiamond42.tif", "baseballdiamond/baseballdiamond40.tif", "baseballdiamond/baseballdiamond02.tif", "baseballdiamond/baseballdiamond45.tif", "baseballdiamond/baseballdiamond86.tif", "baseballdiamond/baseballdiamond49.tif", "baseballdiamond/baseballdiamond43.tif", "baseballdiamond/baseballdiamond59.tif", "baseballdiamond/baseballdiamond03.tif", "baseballdiamond/baseballdiamond01.tif", "baseballdiamond/baseballdiamond26.tif", "baseballdiamond/baseballdiamond69.tif", "baseballdiamond/baseballdiamond18.tif", "baseballdiamond/baseballdiamond44.tif", "baseballdiamond/baseballdiamond68.tif", "baseballdiamond/baseballdiamond14.tif", "baseballdiamond/baseballdiamond94.tif", "baseballdiamond/baseballdiamond22.tif", "baseballdiamond/baseballdiamond00.tif", "baseballdiamond/baseballdiamond05.tif", "baseballdiamond/baseballdiamond60.tif", "baseballdiamond/baseballdiamond57.tif", "baseballdiamond/baseballdiamond51.tif", "baseballdiamond/baseballdiamond65.tif", "baseballdiamond/baseballdiamond06.tif", "baseballdiamond/baseballdiamond28.tif", "baseballdiamond/baseballdiamond20.tif", "baseballdiamond/baseballdiamond23.tif", "baseballdiamond/baseballdiamond97.tif", "baseballdiamond/baseballdiamond13.tif", "baseballdiamond/baseballdiamond87.tif", "baseballdiamond/baseballdiamond70.tif", "baseballdiamond/baseballdiamond66.tif", "baseballdiamond/baseballdiamond09.tif", "baseballdiamond/baseballdiamond19.tif", "baseballdiamond/baseballdiamond95.tif", "baseballdiamond/baseballdiamond12.tif", "baseballdiamond/baseballdiamond75.tif", "baseballdiamond/baseballdiamond07.tif", "baseballdiamond/baseballdiamond15.tif", "baseballdiamond/baseballdiamond54.tif", "baseballdiamond/baseballdiamond32.tif", "baseballdiamond/baseballdiamond48.tif", "baseballdiamond/baseballdiamond61.tif", "baseballdiamond/baseballdiamond16.tif", "baseballdiamond/baseballdiamond29.tif", "baseballdiamond/baseballdiamond47.tif", "beach/beach16.tif", "beach/beach73.tif", "beach/beach43.tif", "beach/beach64.tif", "beach/beach84.tif", "beach/beach34.tif", "beach/beach01.tif", "beach/beach44.tif", "beach/beach49.tif", "beach/beach21.tif", "beach/beach52.tif", "beach/beach86.tif", "beach/beach40.tif", "beach/beach00.tif", "beach/beach90.tif", "beach/beach57.tif", "beach/beach91.tif", "beach/beach22.tif", "beach/beach23.tif", "beach/beach28.tif", "beach/beach30.tif", "beach/beach26.tif", "beach/beach25.tif", "beach/beach09.tif", "beach/beach79.tif", "beach/beach48.tif", "beach/beach87.tif", "beach/beach03.tif", "beach/beach17.tif", "beach/beach60.tif", "beach/beach19.tif", "beach/beach78.tif", "beach/beach80.tif", "beach/beach37.tif", "beach/beach72.tif", "beach/beach24.tif", "beach/beach85.tif", "beach/beach59.tif", "beach/beach54.tif", "beach/beach07.tif", "beach/beach33.tif", "beach/beach71.tif", "beach/beach18.tif", "beach/beach65.tif", "beach/beach67.tif", "beach/beach38.tif", "beach/beach89.tif", "beach/beach74.tif", "beach/beach15.tif", "beach/beach20.tif", "beach/beach50.tif", "beach/beach76.tif", "beach/beach99.tif", "beach/beach69.tif", "beach/beach93.tif", "beach/beach06.tif", "beach/beach27.tif", "beach/beach83.tif", "beach/beach63.tif", "beach/beach62.tif", "buildings/buildings06.tif", "buildings/buildings94.tif", "buildings/buildings37.tif", "buildings/buildings08.tif", "buildings/buildings18.tif", "buildings/buildings33.tif", "buildings/buildings58.tif", "buildings/buildings95.tif", "buildings/buildings56.tif", "buildings/buildings29.tif", "buildings/buildings89.tif", "buildings/buildings20.tif", "buildings/buildings90.tif", "buildings/buildings83.tif", "buildings/buildings13.tif", "buildings/buildings03.tif", "buildings/buildings39.tif", "buildings/buildings31.tif", "buildings/buildings64.tif", "buildings/buildings05.tif", "buildings/buildings24.tif", "buildings/buildings71.tif", "buildings/buildings78.tif", "buildings/buildings76.tif", "buildings/buildings88.tif", "buildings/buildings02.tif", "buildings/buildings72.tif", "buildings/buildings92.tif", "buildings/buildings82.tif", "buildings/buildings07.tif", "buildings/buildings77.tif", "buildings/buildings87.tif", "buildings/buildings53.tif", "buildings/buildings17.tif", "buildings/buildings66.tif", "buildings/buildings81.tif", "buildings/buildings65.tif", "buildings/buildings68.tif", "buildings/buildings99.tif", "buildings/buildings42.tif", "buildings/buildings16.tif", "buildings/buildings85.tif", "buildings/buildings55.tif", "buildings/buildings14.tif", "buildings/buildings48.tif", "buildings/buildings69.tif", "buildings/buildings32.tif", "buildings/buildings67.tif", "buildings/buildings70.tif", "buildings/buildings40.tif", "buildings/buildings00.tif", "buildings/buildings57.tif", "buildings/buildings26.tif", "buildings/buildings04.tif", "buildings/buildings75.tif", "buildings/buildings80.tif", "buildings/buildings52.tif", "buildings/buildings10.tif", "buildings/buildings35.tif", "buildings/buildings30.tif", "chaparral/chaparral80.tif", "chaparral/chaparral16.tif", "chaparral/chaparral10.tif", "chaparral/chaparral33.tif", "chaparral/chaparral28.tif", "chaparral/chaparral32.tif", "chaparral/chaparral71.tif", "chaparral/chaparral97.tif", "chaparral/chaparral88.tif", "chaparral/chaparral17.tif", "chaparral/chaparral05.tif", "chaparral/chaparral09.tif", "chaparral/chaparral46.tif", "chaparral/chaparral49.tif", "chaparral/chaparral91.tif", "chaparral/chaparral92.tif", "chaparral/chaparral02.tif", "chaparral/chaparral68.tif", "chaparral/chaparral18.tif", "chaparral/chaparral25.tif", "chaparral/chaparral00.tif", "chaparral/chaparral11.tif", "chaparral/chaparral50.tif", "chaparral/chaparral24.tif", "chaparral/chaparral54.tif", "chaparral/chaparral81.tif", "chaparral/chaparral58.tif", "chaparral/chaparral85.tif", "chaparral/chaparral75.tif", "chaparral/chaparral41.tif", "chaparral/chaparral90.tif", "chaparral/chaparral62.tif", "chaparral/chaparral22.tif", "chaparral/chaparral76.tif", "chaparral/chaparral48.tif", "chaparral/chaparral65.tif", "chaparral/chaparral08.tif", "chaparral/chaparral53.tif", "chaparral/chaparral45.tif", "chaparral/chaparral01.tif", "chaparral/chaparral21.tif", "chaparral/chaparral63.tif", "chaparral/chaparral26.tif", "chaparral/chaparral64.tif", "chaparral/chaparral03.tif", "chaparral/chaparral31.tif", "chaparral/chaparral59.tif", "chaparral/chaparral82.tif", "chaparral/chaparral19.tif", "chaparral/chaparral51.tif", "chaparral/chaparral23.tif", "chaparral/chaparral07.tif", "chaparral/chaparral56.tif", "chaparral/chaparral39.tif", "chaparral/chaparral34.tif", "chaparral/chaparral36.tif", "chaparral/chaparral79.tif", "chaparral/chaparral94.tif", "chaparral/chaparral42.tif", "chaparral/chaparral35.tif", "denseresidential/denseresidential07.tif", "denseresidential/denseresidential01.tif", "denseresidential/denseresidential16.tif", "denseresidential/denseresidential30.tif", "denseresidential/denseresidential80.tif", "denseresidential/denseresidential56.tif", "denseresidential/denseresidential08.tif", "denseresidential/denseresidential95.tif", "denseresidential/denseresidential61.tif", "denseresidential/denseresidential77.tif", "denseresidential/denseresidential93.tif", "denseresidential/denseresidential04.tif", "denseresidential/denseresidential99.tif", "denseresidential/denseresidential86.tif", "denseresidential/denseresidential97.tif", "denseresidential/denseresidential82.tif", "denseresidential/denseresidential96.tif", "denseresidential/denseresidential87.tif", "denseresidential/denseresidential84.tif", "denseresidential/denseresidential90.tif", "denseresidential/denseresidential41.tif", "denseresidential/denseresidential53.tif", "denseresidential/denseresidential67.tif", "denseresidential/denseresidential21.tif", "denseresidential/denseresidential11.tif", "denseresidential/denseresidential15.tif", "denseresidential/denseresidential68.tif", "denseresidential/denseresidential00.tif", "denseresidential/denseresidential13.tif", "denseresidential/denseresidential49.tif", "denseresidential/denseresidential76.tif", "denseresidential/denseresidential06.tif", "denseresidential/denseresidential24.tif", "denseresidential/denseresidential55.tif", "denseresidential/denseresidential71.tif", "denseresidential/denseresidential34.tif", "denseresidential/denseresidential62.tif", "denseresidential/denseresidential37.tif", "denseresidential/denseresidential20.tif", "denseresidential/denseresidential81.tif", "denseresidential/denseresidential85.tif", "denseresidential/denseresidential02.tif", "denseresidential/denseresidential92.tif", "denseresidential/denseresidential27.tif", "denseresidential/denseresidential26.tif", "denseresidential/denseresidential05.tif", "denseresidential/denseresidential12.tif", "denseresidential/denseresidential66.tif", "denseresidential/denseresidential44.tif", "denseresidential/denseresidential83.tif", "denseresidential/denseresidential33.tif", "denseresidential/denseresidential74.tif", "denseresidential/denseresidential17.tif", "denseresidential/denseresidential60.tif", "denseresidential/denseresidential75.tif", "denseresidential/denseresidential39.tif", "denseresidential/denseresidential73.tif", "denseresidential/denseresidential38.tif", "denseresidential/denseresidential10.tif", "denseresidential/denseresidential19.tif", "forest/forest87.tif", "forest/forest05.tif", "forest/forest13.tif", "forest/forest37.tif", "forest/forest07.tif", "forest/forest34.tif", "forest/forest30.tif", "forest/forest26.tif", "forest/forest80.tif", "forest/forest79.tif", "forest/forest70.tif", "forest/forest16.tif", "forest/forest20.tif", "forest/forest18.tif", "forest/forest90.tif", "forest/forest94.tif", "forest/forest33.tif", "forest/forest78.tif", "forest/forest76.tif", "forest/forest41.tif", "forest/forest48.tif", "forest/forest23.tif", "forest/forest43.tif", "forest/forest61.tif", "forest/forest72.tif", "forest/forest10.tif", "forest/forest49.tif", "forest/forest86.tif", "forest/forest82.tif", "forest/forest65.tif", "forest/forest46.tif", "forest/forest66.tif", "forest/forest97.tif", "forest/forest50.tif", "forest/forest59.tif", "forest/forest08.tif", "forest/forest98.tif", "forest/forest19.tif", "forest/forest14.tif", "forest/forest75.tif", "forest/forest77.tif", "forest/forest15.tif", "forest/forest44.tif", "forest/forest91.tif", "forest/forest57.tif", "forest/forest21.tif", "forest/forest99.tif", "forest/forest47.tif", "forest/forest60.tif", "forest/forest56.tif", "forest/forest84.tif", "forest/forest95.tif", "forest/forest63.tif", "forest/forest71.tif", "forest/forest83.tif", "forest/forest51.tif", "forest/forest58.tif", "forest/forest73.tif", "forest/forest28.tif", "forest/forest27.tif", "freeway/freeway15.tif", "freeway/freeway66.tif", "freeway/freeway58.tif", "freeway/freeway53.tif", "freeway/freeway82.tif", "freeway/freeway27.tif", "freeway/freeway41.tif", "freeway/freeway16.tif", "freeway/freeway22.tif", "freeway/freeway86.tif", "freeway/freeway48.tif", "freeway/freeway63.tif", "freeway/freeway39.tif", "freeway/freeway00.tif", "freeway/freeway31.tif", "freeway/freeway29.tif", "freeway/freeway62.tif", "freeway/freeway02.tif", "freeway/freeway78.tif", "freeway/freeway19.tif", "freeway/freeway94.tif", "freeway/freeway08.tif", "freeway/freeway59.tif", "freeway/freeway13.tif", "freeway/freeway99.tif", "freeway/freeway49.tif", "freeway/freeway50.tif", "freeway/freeway95.tif", "freeway/freeway51.tif", "freeway/freeway89.tif", "freeway/freeway37.tif", "freeway/freeway11.tif", "freeway/freeway91.tif", "freeway/freeway77.tif", "freeway/freeway85.tif", "freeway/freeway10.tif", "freeway/freeway60.tif", "freeway/freeway40.tif", "freeway/freeway23.tif", "freeway/freeway72.tif", "freeway/freeway38.tif", "freeway/freeway09.tif", "freeway/freeway30.tif", "freeway/freeway18.tif", "freeway/freeway12.tif", "freeway/freeway75.tif", "freeway/freeway42.tif", "freeway/freeway92.tif", "freeway/freeway34.tif", "freeway/freeway88.tif", "freeway/freeway43.tif", "freeway/freeway24.tif", "freeway/freeway79.tif", "freeway/freeway69.tif", "freeway/freeway81.tif", "freeway/freeway64.tif", "freeway/freeway32.tif", "freeway/freeway44.tif", "freeway/freeway90.tif", "freeway/freeway76.tif", "golfcourse/golfcourse68.tif", "golfcourse/golfcourse62.tif", "golfcourse/golfcourse17.tif", "golfcourse/golfcourse43.tif", "golfcourse/golfcourse79.tif", "golfcourse/golfcourse40.tif", "golfcourse/golfcourse13.tif", "golfcourse/golfcourse19.tif", "golfcourse/golfcourse22.tif", "golfcourse/golfcourse82.tif", "golfcourse/golfcourse05.tif", "golfcourse/golfcourse37.tif", "golfcourse/golfcourse06.tif", "golfcourse/golfcourse50.tif", "golfcourse/golfcourse00.tif", "golfcourse/golfcourse30.tif", "golfcourse/golfcourse89.tif", "golfcourse/golfcourse46.tif", "golfcourse/golfcourse86.tif", "golfcourse/golfcourse49.tif", "golfcourse/golfcourse01.tif", "golfcourse/golfcourse56.tif", "golfcourse/golfcourse41.tif", "golfcourse/golfcourse61.tif", "golfcourse/golfcourse81.tif", "golfcourse/golfcourse20.tif", "golfcourse/golfcourse31.tif", "golfcourse/golfcourse09.tif", "golfcourse/golfcourse42.tif", "golfcourse/golfcourse12.tif", "golfcourse/golfcourse32.tif", "golfcourse/golfcourse70.tif", "golfcourse/golfcourse80.tif", "golfcourse/golfcourse39.tif", "golfcourse/golfcourse63.tif", "golfcourse/golfcourse07.tif", "golfcourse/golfcourse18.tif", "golfcourse/golfcourse75.tif", "golfcourse/golfcourse28.tif", "golfcourse/golfcourse72.tif", "golfcourse/golfcourse29.tif", "golfcourse/golfcourse52.tif", "golfcourse/golfcourse57.tif", "golfcourse/golfcourse48.tif", "golfcourse/golfcourse38.tif", "golfcourse/golfcourse71.tif", "golfcourse/golfcourse92.tif", "golfcourse/golfcourse47.tif", "golfcourse/golfcourse96.tif", "golfcourse/golfcourse83.tif", "golfcourse/golfcourse76.tif", "golfcourse/golfcourse98.tif", "golfcourse/golfcourse73.tif", "golfcourse/golfcourse78.tif", "golfcourse/golfcourse53.tif", "golfcourse/golfcourse94.tif", "golfcourse/golfcourse33.tif", "golfcourse/golfcourse51.tif", "golfcourse/golfcourse54.tif", "golfcourse/golfcourse44.tif", "harbor/harbor11.tif", "harbor/harbor98.tif", "harbor/harbor33.tif", "harbor/harbor06.tif", "harbor/harbor27.tif", "harbor/harbor46.tif", "harbor/harbor23.tif", "harbor/harbor50.tif", "harbor/harbor18.tif", "harbor/harbor48.tif", "harbor/harbor03.tif", "harbor/harbor70.tif", "harbor/harbor82.tif", "harbor/harbor85.tif", "harbor/harbor04.tif", "harbor/harbor65.tif", "harbor/harbor64.tif", "harbor/harbor67.tif", "harbor/harbor51.tif", "harbor/harbor29.tif", "harbor/harbor78.tif", "harbor/harbor07.tif", "harbor/harbor10.tif", "harbor/harbor09.tif", "harbor/harbor16.tif", "harbor/harbor45.tif", "harbor/harbor19.tif", "harbor/harbor92.tif", "harbor/harbor53.tif", "harbor/harbor47.tif", "harbor/harbor08.tif", "harbor/harbor22.tif", "harbor/harbor57.tif", "harbor/harbor69.tif", "harbor/harbor61.tif", "harbor/harbor74.tif", "harbor/harbor68.tif", "harbor/harbor13.tif", "harbor/harbor56.tif", "harbor/harbor37.tif", "harbor/harbor90.tif", "harbor/harbor43.tif", "harbor/harbor54.tif", "harbor/harbor55.tif", "harbor/harbor26.tif", "harbor/harbor35.tif", "harbor/harbor81.tif", "harbor/harbor71.tif", "harbor/harbor02.tif", "harbor/harbor80.tif", "harbor/harbor41.tif", "harbor/harbor99.tif", "harbor/harbor75.tif", "harbor/harbor79.tif", "harbor/harbor25.tif", "harbor/harbor84.tif", "harbor/harbor89.tif", "harbor/harbor58.tif", "harbor/harbor77.tif", "harbor/harbor72.tif", "intersection/intersection75.tif", "intersection/intersection10.tif", "intersection/intersection23.tif", "intersection/intersection41.tif", "intersection/intersection65.tif", "intersection/intersection15.tif", "intersection/intersection38.tif", "intersection/intersection77.tif", "intersection/intersection50.tif", "intersection/intersection13.tif", "intersection/intersection55.tif", "intersection/intersection96.tif", "intersection/intersection99.tif", "intersection/intersection90.tif", "intersection/intersection60.tif", "intersection/intersection30.tif", "intersection/intersection62.tif", "intersection/intersection95.tif", "intersection/intersection92.tif", "intersection/intersection28.tif", "intersection/intersection46.tif", "intersection/intersection49.tif", "intersection/intersection40.tif", "intersection/intersection24.tif", "intersection/intersection45.tif", "intersection/intersection53.tif", "intersection/intersection12.tif", "intersection/intersection36.tif", "intersection/intersection27.tif", "intersection/intersection80.tif", "intersection/intersection34.tif", "intersection/intersection21.tif", "intersection/intersection05.tif", "intersection/intersection54.tif", "intersection/intersection98.tif", "intersection/intersection37.tif", "intersection/intersection33.tif", "intersection/intersection59.tif", "intersection/intersection64.tif", "intersection/intersection47.tif", "intersection/intersection70.tif", "intersection/intersection02.tif", "intersection/intersection89.tif", "intersection/intersection20.tif", "intersection/intersection04.tif", "intersection/intersection32.tif", "intersection/intersection63.tif", "intersection/intersection17.tif", "intersection/intersection42.tif", "intersection/intersection57.tif", "intersection/intersection67.tif", "intersection/intersection11.tif", "intersection/intersection08.tif", "intersection/intersection71.tif", "intersection/intersection83.tif", "intersection/intersection51.tif", "intersection/intersection58.tif", "intersection/intersection06.tif", "intersection/intersection19.tif", "intersection/intersection69.tif", "mediumresidential/mediumresidential52.tif", "mediumresidential/mediumresidential17.tif", "mediumresidential/mediumresidential06.tif", "mediumresidential/mediumresidential47.tif", "mediumresidential/mediumresidential27.tif", "mediumresidential/mediumresidential21.tif", "mediumresidential/mediumresidential48.tif", "mediumresidential/mediumresidential45.tif", "mediumresidential/mediumresidential10.tif", "mediumresidential/mediumresidential07.tif", "mediumresidential/mediumresidential36.tif", "mediumresidential/mediumresidential65.tif", "mediumresidential/mediumresidential53.tif", "mediumresidential/mediumresidential38.tif", "mediumresidential/mediumresidential33.tif", "mediumresidential/mediumresidential42.tif", "mediumresidential/mediumresidential16.tif", "mediumresidential/mediumresidential78.tif", "mediumresidential/mediumresidential88.tif", "mediumresidential/mediumresidential03.tif", "mediumresidential/mediumresidential35.tif", "mediumresidential/mediumresidential01.tif", "mediumresidential/mediumresidential14.tif", "mediumresidential/mediumresidential19.tif", "mediumresidential/mediumresidential73.tif", "mediumresidential/mediumresidential79.tif", "mediumresidential/mediumresidential37.tif", "mediumresidential/mediumresidential44.tif", "mediumresidential/mediumresidential54.tif", "mediumresidential/mediumresidential28.tif", "mediumresidential/mediumresidential22.tif", "mediumresidential/mediumresidential39.tif", "mediumresidential/mediumresidential51.tif", "mediumresidential/mediumresidential97.tif", "mediumresidential/mediumresidential59.tif", "mediumresidential/mediumresidential77.tif", "mediumresidential/mediumresidential25.tif", "mediumresidential/mediumresidential82.tif", "mediumresidential/mediumresidential12.tif", "mediumresidential/mediumresidential13.tif", "mediumresidential/mediumresidential02.tif", "mediumresidential/mediumresidential89.tif", "mediumresidential/mediumresidential15.tif", "mediumresidential/mediumresidential49.tif", "mediumresidential/mediumresidential75.tif", "mediumresidential/mediumresidential95.tif", "mediumresidential/mediumresidential96.tif", "mediumresidential/mediumresidential63.tif", "mediumresidential/mediumresidential58.tif", "mediumresidential/mediumresidential87.tif", "mediumresidential/mediumresidential11.tif", "mediumresidential/mediumresidential55.tif", "mediumresidential/mediumresidential80.tif", "mediumresidential/mediumresidential64.tif", "mediumresidential/mediumresidential66.tif", "mediumresidential/mediumresidential57.tif", "mediumresidential/mediumresidential94.tif", "mediumresidential/mediumresidential81.tif", "mediumresidential/mediumresidential91.tif", "mediumresidential/mediumresidential70.tif", "mobilehomepark/mobilehomepark05.tif", "mobilehomepark/mobilehomepark37.tif", "mobilehomepark/mobilehomepark27.tif", "mobilehomepark/mobilehomepark26.tif", "mobilehomepark/mobilehomepark72.tif", "mobilehomepark/mobilehomepark33.tif", "mobilehomepark/mobilehomepark62.tif", "mobilehomepark/mobilehomepark22.tif", "mobilehomepark/mobilehomepark25.tif", "mobilehomepark/mobilehomepark06.tif", "mobilehomepark/mobilehomepark46.tif", "mobilehomepark/mobilehomepark00.tif", "mobilehomepark/mobilehomepark56.tif", "mobilehomepark/mobilehomepark03.tif", "mobilehomepark/mobilehomepark60.tif", "mobilehomepark/mobilehomepark98.tif", "mobilehomepark/mobilehomepark77.tif", "mobilehomepark/mobilehomepark13.tif", "mobilehomepark/mobilehomepark95.tif", "mobilehomepark/mobilehomepark45.tif", "mobilehomepark/mobilehomepark88.tif", "mobilehomepark/mobilehomepark04.tif", "mobilehomepark/mobilehomepark87.tif", "mobilehomepark/mobilehomepark50.tif", "mobilehomepark/mobilehomepark09.tif", "mobilehomepark/mobilehomepark71.tif", "mobilehomepark/mobilehomepark31.tif", "mobilehomepark/mobilehomepark99.tif", "mobilehomepark/mobilehomepark97.tif", "mobilehomepark/mobilehomepark23.tif", "mobilehomepark/mobilehomepark81.tif", "mobilehomepark/mobilehomepark70.tif", "mobilehomepark/mobilehomepark02.tif", "mobilehomepark/mobilehomepark85.tif", "mobilehomepark/mobilehomepark54.tif", "mobilehomepark/mobilehomepark69.tif", "mobilehomepark/mobilehomepark55.tif", "mobilehomepark/mobilehomepark49.tif", "mobilehomepark/mobilehomepark74.tif", "mobilehomepark/mobilehomepark53.tif", "mobilehomepark/mobilehomepark14.tif", "mobilehomepark/mobilehomepark57.tif", "mobilehomepark/mobilehomepark82.tif", "mobilehomepark/mobilehomepark92.tif", "mobilehomepark/mobilehomepark80.tif", "mobilehomepark/mobilehomepark16.tif", "mobilehomepark/mobilehomepark19.tif", "mobilehomepark/mobilehomepark91.tif", "mobilehomepark/mobilehomepark86.tif", "mobilehomepark/mobilehomepark39.tif", "mobilehomepark/mobilehomepark30.tif", "mobilehomepark/mobilehomepark61.tif", "mobilehomepark/mobilehomepark90.tif", "mobilehomepark/mobilehomepark20.tif", "mobilehomepark/mobilehomepark76.tif", "mobilehomepark/mobilehomepark83.tif", "mobilehomepark/mobilehomepark01.tif", "mobilehomepark/mobilehomepark17.tif", "mobilehomepark/mobilehomepark15.tif", "mobilehomepark/mobilehomepark67.tif", "overpass/overpass16.tif", "overpass/overpass43.tif", "overpass/overpass51.tif", "overpass/overpass52.tif", "overpass/overpass93.tif", "overpass/overpass61.tif", "overpass/overpass27.tif", "overpass/overpass91.tif", "overpass/overpass03.tif", "overpass/overpass40.tif", "overpass/overpass80.tif", "overpass/overpass11.tif", "overpass/overpass54.tif", "overpass/overpass00.tif", "overpass/overpass30.tif", "overpass/overpass83.tif", "overpass/overpass53.tif", "overpass/overpass02.tif", "overpass/overpass48.tif", "overpass/overpass74.tif", "overpass/overpass77.tif", "overpass/overpass95.tif", "overpass/overpass45.tif", "overpass/overpass86.tif", "overpass/overpass36.tif", "overpass/overpass89.tif", "overpass/overpass50.tif", "overpass/overpass01.tif", "overpass/overpass81.tif", "overpass/overpass04.tif", "overpass/overpass19.tif", "overpass/overpass49.tif", "overpass/overpass34.tif", "overpass/overpass14.tif", "overpass/overpass67.tif", "overpass/overpass79.tif", "overpass/overpass96.tif", "overpass/overpass10.tif", "overpass/overpass99.tif", "overpass/overpass44.tif", "overpass/overpass47.tif", "overpass/overpass90.tif", "overpass/overpass94.tif", "overpass/overpass70.tif", "overpass/overpass57.tif", "overpass/overpass58.tif", "overpass/overpass65.tif", "overpass/overpass56.tif", "overpass/overpass24.tif", "overpass/overpass06.tif", "overpass/overpass71.tif", "overpass/overpass66.tif", "overpass/overpass39.tif", "overpass/overpass37.tif", "overpass/overpass41.tif", "overpass/overpass07.tif", "overpass/overpass12.tif", "overpass/overpass29.tif", "overpass/overpass60.tif", "overpass/overpass88.tif", "parkinglot/parkinglot44.tif", "parkinglot/parkinglot71.tif", "parkinglot/parkinglot86.tif", "parkinglot/parkinglot41.tif", "parkinglot/parkinglot48.tif", "parkinglot/parkinglot22.tif", "parkinglot/parkinglot24.tif", "parkinglot/parkinglot59.tif", "parkinglot/parkinglot11.tif", "parkinglot/parkinglot05.tif", "parkinglot/parkinglot21.tif", "parkinglot/parkinglot75.tif", "parkinglot/parkinglot94.tif", "parkinglot/parkinglot69.tif", "parkinglot/parkinglot46.tif", "parkinglot/parkinglot53.tif", "parkinglot/parkinglot52.tif", "parkinglot/parkinglot08.tif", "parkinglot/parkinglot58.tif", "parkinglot/parkinglot97.tif", "parkinglot/parkinglot62.tif", "parkinglot/parkinglot98.tif", "parkinglot/parkinglot87.tif", "parkinglot/parkinglot57.tif", "parkinglot/parkinglot72.tif", "parkinglot/parkinglot02.tif", "parkinglot/parkinglot63.tif", "parkinglot/parkinglot27.tif", "parkinglot/parkinglot92.tif", "parkinglot/parkinglot73.tif", "parkinglot/parkinglot60.tif", "parkinglot/parkinglot54.tif", "parkinglot/parkinglot20.tif", "parkinglot/parkinglot80.tif", "parkinglot/parkinglot64.tif", "parkinglot/parkinglot18.tif", "parkinglot/parkinglot45.tif", "parkinglot/parkinglot32.tif", "parkinglot/parkinglot61.tif", "parkinglot/parkinglot49.tif", "parkinglot/parkinglot51.tif", "parkinglot/parkinglot15.tif", "parkinglot/parkinglot16.tif", "parkinglot/parkinglot96.tif", "parkinglot/parkinglot39.tif", "parkinglot/parkinglot25.tif", "parkinglot/parkinglot43.tif", "parkinglot/parkinglot40.tif", "parkinglot/parkinglot78.tif", "parkinglot/parkinglot34.tif", "parkinglot/parkinglot06.tif", "parkinglot/parkinglot07.tif", "parkinglot/parkinglot68.tif", "parkinglot/parkinglot95.tif", "parkinglot/parkinglot47.tif", "parkinglot/parkinglot12.tif", "parkinglot/parkinglot36.tif", "parkinglot/parkinglot37.tif", "parkinglot/parkinglot01.tif", "parkinglot/parkinglot81.tif", "river/river91.tif", "river/river90.tif", "river/river21.tif", "river/river25.tif", "river/river82.tif", "river/river69.tif", "river/river45.tif", "river/river79.tif", "river/river86.tif", "river/river31.tif", "river/river02.tif", "river/river41.tif", "river/river83.tif", "river/river03.tif", "river/river84.tif", "river/river59.tif", "river/river63.tif", "river/river30.tif", "river/river71.tif", "river/river22.tif", "river/river12.tif", "river/river10.tif", "river/river87.tif", "river/river27.tif", "river/river46.tif", "river/river37.tif", "river/river65.tif", "river/river74.tif", "river/river28.tif", "river/river77.tif", "river/river05.tif", "river/river42.tif", "river/river06.tif", "river/river50.tif", "river/river29.tif", "river/river66.tif", "river/river51.tif", "river/river19.tif", "river/river73.tif", "river/river64.tif", "river/river34.tif", "river/river24.tif", "river/river94.tif", "river/river57.tif", "river/river92.tif", "river/river98.tif", "river/river11.tif", "river/river09.tif", "river/river76.tif", "river/river68.tif", "river/river95.tif", "river/river01.tif", "river/river58.tif", "river/river16.tif", "river/river55.tif", "river/river04.tif", "river/river81.tif", "river/river33.tif", "river/river61.tif", "river/river60.tif", "runway/runway89.tif", "runway/runway09.tif", "runway/runway65.tif", "runway/runway49.tif", "runway/runway05.tif", "runway/runway01.tif", "runway/runway63.tif", "runway/runway43.tif", "runway/runway18.tif", "runway/runway96.tif", "runway/runway30.tif", "runway/runway83.tif", "runway/runway37.tif", "runway/runway71.tif", "runway/runway50.tif", "runway/runway54.tif", "runway/runway23.tif", "runway/runway72.tif", "runway/runway34.tif", "runway/runway56.tif", "runway/runway53.tif", "runway/runway20.tif", "runway/runway44.tif", "runway/runway60.tif", "runway/runway91.tif", "runway/runway00.tif", "runway/runway74.tif", "runway/runway16.tif", "runway/runway29.tif", "runway/runway84.tif", "runway/runway06.tif", "runway/runway07.tif", "runway/runway27.tif", "runway/runway03.tif", "runway/runway68.tif", "runway/runway85.tif", "runway/runway98.tif", "runway/runway25.tif", "runway/runway17.tif", "runway/runway28.tif", "runway/runway90.tif", "runway/runway04.tif", "runway/runway19.tif", "runway/runway70.tif", "runway/runway81.tif", "runway/runway55.tif", "runway/runway22.tif", "runway/runway94.tif", "runway/runway99.tif", "runway/runway39.tif", "runway/runway32.tif", "runway/runway80.tif", "runway/runway61.tif", "runway/runway41.tif", "runway/runway36.tif", "runway/runway10.tif", "runway/runway52.tif", "runway/runway62.tif", "runway/runway35.tif", "runway/runway86.tif", "sparseresidential/sparseresidential47.tif", "sparseresidential/sparseresidential72.tif", "sparseresidential/sparseresidential36.tif", "sparseresidential/sparseresidential15.tif", "sparseresidential/sparseresidential03.tif", "sparseresidential/sparseresidential21.tif", "sparseresidential/sparseresidential06.tif", "sparseresidential/sparseresidential88.tif", "sparseresidential/sparseresidential09.tif", "sparseresidential/sparseresidential83.tif", "sparseresidential/sparseresidential70.tif", "sparseresidential/sparseresidential44.tif", "sparseresidential/sparseresidential00.tif", "sparseresidential/sparseresidential82.tif", "sparseresidential/sparseresidential74.tif", "sparseresidential/sparseresidential90.tif", "sparseresidential/sparseresidential89.tif", "sparseresidential/sparseresidential58.tif", "sparseresidential/sparseresidential68.tif", "sparseresidential/sparseresidential45.tif", "sparseresidential/sparseresidential10.tif", "sparseresidential/sparseresidential30.tif", "sparseresidential/sparseresidential94.tif", "sparseresidential/sparseresidential16.tif", "sparseresidential/sparseresidential14.tif", "sparseresidential/sparseresidential96.tif", "sparseresidential/sparseresidential34.tif", "sparseresidential/sparseresidential61.tif", "sparseresidential/sparseresidential85.tif", "sparseresidential/sparseresidential86.tif", "sparseresidential/sparseresidential78.tif", "sparseresidential/sparseresidential28.tif", "sparseresidential/sparseresidential48.tif", "sparseresidential/sparseresidential79.tif", "sparseresidential/sparseresidential67.tif", "sparseresidential/sparseresidential73.tif", "sparseresidential/sparseresidential50.tif", "sparseresidential/sparseresidential77.tif", "sparseresidential/sparseresidential64.tif", "sparseresidential/sparseresidential43.tif", "sparseresidential/sparseresidential71.tif", "sparseresidential/sparseresidential52.tif", "sparseresidential/sparseresidential51.tif", "sparseresidential/sparseresidential93.tif", "sparseresidential/sparseresidential84.tif", "sparseresidential/sparseresidential39.tif", "sparseresidential/sparseresidential65.tif", "sparseresidential/sparseresidential37.tif", "sparseresidential/sparseresidential01.tif", "sparseresidential/sparseresidential91.tif", "sparseresidential/sparseresidential17.tif", "sparseresidential/sparseresidential33.tif", "sparseresidential/sparseresidential32.tif", "sparseresidential/sparseresidential80.tif", "sparseresidential/sparseresidential81.tif", "sparseresidential/sparseresidential75.tif", "sparseresidential/sparseresidential56.tif", "sparseresidential/sparseresidential13.tif", "sparseresidential/sparseresidential63.tif", "sparseresidential/sparseresidential98.tif", "storagetanks/storagetanks54.tif", "storagetanks/storagetanks20.tif", "storagetanks/storagetanks36.tif", "storagetanks/storagetanks49.tif", "storagetanks/storagetanks85.tif", "storagetanks/storagetanks84.tif", "storagetanks/storagetanks33.tif", "storagetanks/storagetanks15.tif", "storagetanks/storagetanks30.tif", "storagetanks/storagetanks43.tif", "storagetanks/storagetanks45.tif", "storagetanks/storagetanks73.tif", "storagetanks/storagetanks00.tif", "storagetanks/storagetanks95.tif", "storagetanks/storagetanks18.tif", "storagetanks/storagetanks76.tif", "storagetanks/storagetanks01.tif", "storagetanks/storagetanks03.tif", "storagetanks/storagetanks55.tif", "storagetanks/storagetanks26.tif", "storagetanks/storagetanks32.tif", "storagetanks/storagetanks08.tif", "storagetanks/storagetanks52.tif", "storagetanks/storagetanks53.tif", "storagetanks/storagetanks56.tif", "storagetanks/storagetanks78.tif", "storagetanks/storagetanks14.tif", "storagetanks/storagetanks27.tif", "storagetanks/storagetanks75.tif", "storagetanks/storagetanks66.tif", "storagetanks/storagetanks98.tif", "storagetanks/storagetanks40.tif", "storagetanks/storagetanks37.tif", "storagetanks/storagetanks86.tif", "storagetanks/storagetanks06.tif", "storagetanks/storagetanks67.tif", "storagetanks/storagetanks05.tif", "storagetanks/storagetanks48.tif", "storagetanks/storagetanks35.tif", "storagetanks/storagetanks28.tif", "storagetanks/storagetanks44.tif", "storagetanks/storagetanks60.tif", "storagetanks/storagetanks61.tif", "storagetanks/storagetanks99.tif", "storagetanks/storagetanks91.tif", "storagetanks/storagetanks88.tif", "storagetanks/storagetanks82.tif", "storagetanks/storagetanks71.tif", "storagetanks/storagetanks38.tif", "storagetanks/storagetanks11.tif", "storagetanks/storagetanks46.tif", "storagetanks/storagetanks34.tif", "storagetanks/storagetanks07.tif", "storagetanks/storagetanks41.tif", "storagetanks/storagetanks58.tif", "storagetanks/storagetanks90.tif", "storagetanks/storagetanks65.tif", "storagetanks/storagetanks72.tif", "storagetanks/storagetanks25.tif", "storagetanks/storagetanks57.tif", "tenniscourt/tenniscourt52.tif", "tenniscourt/tenniscourt58.tif", "tenniscourt/tenniscourt14.tif", "tenniscourt/tenniscourt63.tif", "tenniscourt/tenniscourt22.tif", "tenniscourt/tenniscourt02.tif", "tenniscourt/tenniscourt11.tif", "tenniscourt/tenniscourt36.tif", "tenniscourt/tenniscourt57.tif", "tenniscourt/tenniscourt15.tif", "tenniscourt/tenniscourt66.tif", "tenniscourt/tenniscourt93.tif", "tenniscourt/tenniscourt35.tif", "tenniscourt/tenniscourt17.tif", "tenniscourt/tenniscourt43.tif", "tenniscourt/tenniscourt92.tif", "tenniscourt/tenniscourt67.tif", "tenniscourt/tenniscourt60.tif", "tenniscourt/tenniscourt10.tif", "tenniscourt/tenniscourt24.tif", "tenniscourt/tenniscourt33.tif", "tenniscourt/tenniscourt48.tif", "tenniscourt/tenniscourt23.tif", "tenniscourt/tenniscourt07.tif", "tenniscourt/tenniscourt05.tif", "tenniscourt/tenniscourt72.tif", "tenniscourt/tenniscourt27.tif", "tenniscourt/tenniscourt54.tif", "tenniscourt/tenniscourt77.tif", "tenniscourt/tenniscourt04.tif", "tenniscourt/tenniscourt84.tif", "tenniscourt/tenniscourt65.tif", "tenniscourt/tenniscourt47.tif", "tenniscourt/tenniscourt28.tif", "tenniscourt/tenniscourt73.tif", "tenniscourt/tenniscourt00.tif", "tenniscourt/tenniscourt46.tif", "tenniscourt/tenniscourt62.tif", "tenniscourt/tenniscourt26.tif", "tenniscourt/tenniscourt90.tif", "tenniscourt/tenniscourt82.tif", "tenniscourt/tenniscourt50.tif", "tenniscourt/tenniscourt56.tif", "tenniscourt/tenniscourt85.tif", "tenniscourt/tenniscourt96.tif", "tenniscourt/tenniscourt09.tif", "tenniscourt/tenniscourt01.tif", "tenniscourt/tenniscourt03.tif", "tenniscourt/tenniscourt80.tif", "tenniscourt/tenniscourt79.tif", "tenniscourt/tenniscourt16.tif", "tenniscourt/tenniscourt89.tif", "tenniscourt/tenniscourt38.tif", "tenniscourt/tenniscourt37.tif", "tenniscourt/tenniscourt08.tif", "tenniscourt/tenniscourt51.tif", "tenniscourt/tenniscourt34.tif", "tenniscourt/tenniscourt78.tif", "tenniscourt/tenniscourt64.tif", "tenniscourt/tenniscourt55.tif"], "val": ["agricultural/agricultural15.tif", "agricultural/agricultural66.tif", "agricultural/agricultural08.tif", "agricultural/agricultural38.tif", "agricultural/agricultural96.tif", "agricultural/agricultural64.tif", "agricultural/agricultural68.tif", "agricultural/agricultural29.tif", "agricultural/agricultural22.tif", "agricultural/agricultural74.tif", "agricultural/agricultural40.tif", "agricultural/agricultural36.tif", "agricultural/agricultural19.tif", "agricultural/agricultural00.tif", "agricultural/agricultural60.tif", "agricultural/agricultural53.tif", "agricultural/agricultural46.tif", "agricultural/agricultural26.tif", "agricultural/agricultural93.tif", "agricultural/agricultural03.tif", "airplane/airplane80.tif", "airplane/airplane03.tif", "airplane/airplane74.tif", "airplane/airplane96.tif", "airplane/airplane16.tif", "airplane/airplane27.tif", "airplane/airplane94.tif", "airplane/airplane65.tif", "airplane/airplane12.tif", "airplane/airplane08.tif", "airplane/airplane29.tif", "airplane/airplane46.tif", "airplane/airplane42.tif", "airplane/airplane19.tif", "airplane/airplane43.tif", "airplane/airplane85.tif", "airplane/airplane20.tif", "airplane/airplane13.tif", "airplane/airplane40.tif", "airplane/airplane47.tif", "baseballdiamond/baseballdiamond27.tif", "baseballdiamond/baseballdiamond37.tif", "baseballdiamond/baseballdiamond30.tif", "baseballdiamond/baseballdiamond53.tif", "baseballdiamond/baseballdiamond58.tif", "baseballdiamond/baseballdiamond55.tif", "baseballdiamond/baseballdiamond85.tif", "baseballdiamond/baseballdiamond90.tif", "baseballdiamond/baseballdiamond98.tif", "baseballdiamond/baseballdiamond82.tif", "baseballdiamond/baseballdiamond21.tif", "baseballdiamond/baseballdiamond41.tif", "baseballdiamond/baseballdiamond72.tif", "baseballdiamond/baseballdiamond79.tif", "baseballdiamond/baseballdiamond83.tif", "baseballdiamond/baseballdiamond50.tif", "baseballdiamond/baseballdiamond81.tif", "baseballdiamond/baseballdiamond52.tif", "baseballdiamond/baseballdiamond56.tif", "baseballdiamond/baseballdiamond38.tif", "beach/beach32.tif", "beach/beach82.tif", "beach/beach96.tif", "beach/beach11.tif", "beach/beach29.tif", "beach/beach97.tif", "beach/beach53.tif", "beach/beach98.tif", "beach/beach51.tif", "beach/beach58.tif", "beach/beach92.tif", "beach/beach68.tif", "beach/beach56.tif", "beach/beach41.tif", "beach/beach42.tif", "beach/beach36.tif", "beach/beach61.tif", "beach/beach02.tif", "beach/beach81.tif", "beach/beach04.tif", "buildings/buildings27.tif", "buildings/buildings44.tif", "buildings/buildings63.tif", "buildings/buildings46.tif", "buildings/buildings73.tif", "buildings/buildings54.tif", "buildings/buildings79.tif", "buildings/buildings11.tif", "buildings/buildings86.tif", "buildings/buildings61.tif", "buildings/buildings91.tif", "buildings/buildings98.tif", "buildings/buildings84.tif", "buildings/buildings36.tif", "buildings/buildings59.tif", "buildings/buildings60.tif", "buildings/buildings45.tif", "buildings/buildings49.tif", "buildings/buildings43.tif", "buildings/buildings12.tif", "chaparral/chaparral93.tif", "chaparral/chaparral57.tif", "chaparral/chaparral20.tif", "chaparral/chaparral69.tif", "chaparral/chaparral78.tif", "chaparral/chaparral96.tif", "chaparral/chaparral52.tif", "chaparral/chaparral38.tif", "chaparral/chaparral83.tif", "chaparral/chaparral61.tif", "chaparral/chaparral40.tif", "chaparral/chaparral13.tif", "chaparral/chaparral66.tif", "chaparral/chaparral77.tif", "chaparral/chaparral89.tif", "chaparral/chaparral27.tif", "chaparral/chaparral60.tif", "chaparral/chaparral74.tif", "chaparral/chaparral70.tif", "chaparral/chaparral86.tif", "denseresidential/denseresidential09.tif", "denseresidential/denseresidential65.tif", "denseresidential/denseresidential45.tif", "denseresidential/denseresidential59.tif", "denseresidential/denseresidential31.tif", "denseresidential/denseresidential98.tif", "denseresidential/denseresidential14.tif", "denseresidential/denseresidential28.tif", "denseresidential/denseresidential89.tif", "denseresidential/denseresidential47.tif", "denseresidential/denseresidential88.tif", "denseresidential/denseresidential64.tif", "denseresidential/denseresidential25.tif", "denseresidential/denseresidential03.tif", "denseresidential/denseresidential40.tif", "denseresidential/denseresidential78.tif", "denseresidential/denseresidential36.tif", "denseresidential/denseresidential91.tif", "denseresidential/denseresidential63.tif", "denseresidential/denseresidential43.tif", "forest/forest93.tif", "forest/forest04.tif", "forest/forest85.tif", "forest/forest89.tif", "forest/forest09.tif", "forest/forest40.tif", "forest/forest17.tif", "forest/forest54.tif", "forest/forest11.tif", "forest/forest68.tif", "forest/forest35.tif", "forest/forest52.tif", "forest/forest36.tif", "forest/forest67.tif", "forest/forest31.tif", "forest/forest55.tif", "forest/forest06.tif", "forest/forest92.tif", "forest/forest22.tif", "forest/forest12.tif", "freeway/freeway35.tif", "freeway/freeway46.tif", "freeway/freeway67.tif", "freeway/freeway36.tif", "freeway/freeway97.tif", "freeway/freeway17.tif", "freeway/freeway96.tif", "freeway/freeway03.tif", "freeway/freeway84.tif", "freeway/freeway56.tif", "freeway/freeway04.tif", "freeway/freeway01.tif", "freeway/freeway68.tif", "freeway/freeway98.tif", "freeway/freeway87.tif", "freeway/freeway52.tif", "freeway/freeway70.tif", "freeway/freeway14.tif", "freeway/freeway57.tif", "freeway/freeway25.tif", "golfcourse/golfcourse91.tif", "golfcourse/golfcourse88.tif", "golfcourse/golfcourse34.tif", "golfcourse/golfcourse95.tif", "golfcourse/golfcourse87.tif", "golfcourse/golfcourse60.tif", "golfcourse/golfcourse74.tif", "golfcourse/golfcourse58.tif", "golfcourse/golfcourse99.tif", "golfcourse/golfcourse21.tif", "golfcourse/golfcourse77.tif", "golfcourse/golfcourse84.tif", "golfcourse/golfcourse65.tif", "golfcourse/golfcourse97.tif", "golfcourse/golfcourse14.tif", "golfcourse/golfcourse11.tif", "golfcourse/golfcourse25.tif", "golfcourse/golfcourse85.tif", "golfcourse/golfcourse26.tif", "golfcourse/golfcourse36.tif", "harbor/harbor20.tif", "harbor/harbor12.tif", "harbor/harbor73.tif", "harbor/harbor36.tif", "harbor/harbor00.tif", "harbor/harbor42.tif", "harbor/harbor49.tif", "harbor/harbor52.tif", "harbor/harbor01.tif", "harbor/harbor87.tif", "harbor/harbor66.tif", "harbor/harbor93.tif", "harbor/harbor44.tif", "harbor/harbor59.tif", "harbor/harbor28.tif", "harbor/harbor97.tif", "harbor/harbor39.tif", "harbor/harbor60.tif", "harbor/harbor05.tif", "harbor/harbor83.tif", "intersection/intersection43.tif", "intersection/intersection87.tif", "intersection/intersection16.tif", "intersection/intersection78.tif", "intersection/intersection44.tif", "intersection/intersection72.tif", "intersection/intersection07.tif", "intersection/intersection84.tif", "intersection/intersection01.tif", "intersection/intersection09.tif", "intersection/intersection73.tif", "intersection/intersection48.tif", "intersection/intersection74.tif", "intersection/intersection52.tif", "intersection/intersection91.tif", "intersection/intersection79.tif", "intersection/intersection18.tif", "intersection/intersection85.tif", "intersection/intersection81.tif", "intersection/intersection31.tif", "mediumresidential/mediumresidential84.tif", "mediumresidential/mediumresidential29.tif", "mediumresidential/mediumresidential61.tif", "mediumresidential/mediumresidential56.tif", "mediumresidential/mediumresidential85.tif", "mediumresidential/mediumresidential41.tif", "mediumresidential/mediumresidential98.tif", "mediumresidential/mediumresidential93.tif", "mediumresidential/mediumresidential43.tif", "mediumresidential/mediumresidential86.tif", "mediumresidential/mediumresidential24.tif", "mediumresidential/mediumresidential68.tif", "mediumresidential/mediumresidential62.tif", "mediumresidential/mediumresidential90.tif", "mediumresidential/mediumresidential71.tif", "mediumresidential/mediumresidential60.tif", "mediumresidential/mediumresidential99.tif", "mediumresidential/mediumresidential26.tif", "mediumresidential/mediumresidential30.tif", "mediumresidential/mediumresidential46.tif", "mobilehomepark/mobilehomepark75.tif", "mobilehomepark/mobilehomepark21.tif", "mobilehomepark/mobilehomepark36.tif", "mobilehomepark/mobilehomepark94.tif", "mobilehomepark/mobilehomepark44.tif", "mobilehomepark/mobilehomepark18.tif", "mobilehomepark/mobilehomepark73.tif", "mobilehomepark/mobilehomepark32.tif", "mobilehomepark/mobilehomepark47.tif", "mobilehomepark/mobilehomepark12.tif", "mobilehomepark/mobilehomepark42.tif", "mobilehomepark/mobilehomepark79.tif", "mobilehomepark/mobilehomepark89.tif", "mobilehomepark/mobilehomepark78.tif", "mobilehomepark/mobilehomepark64.tif", "mobilehomepark/mobilehomepark10.tif", "mobilehomepark/mobilehomepark84.tif", "mobilehomepark/mobilehomepark65.tif", "mobilehomepark/mobilehomepark11.tif", "mobilehomepark/mobilehomepark40.tif", "overpass/overpass76.tif", "overpass/overpass64.tif", "overpass/overpass98.tif", "overpass/overpass72.tif", "overpass/overpass35.tif", "overpass/overpass68.tif", "overpass/overpass73.tif", "overpass/overpass26.tif", "overpass/overpass42.tif", "overpass/overpass75.tif", "overpass/overpass38.tif", "overpass/overpass31.tif", "overpass/overpass63.tif", "overpass/overpass78.tif", "overpass/overpass18.tif", "overpass/overpass92.tif", "overpass/overpass22.tif", "overpass/overpass82.tif", "overpass/overpass09.tif", "overpass/overpass05.tif", "parkinglot/parkinglot89.tif", "parkinglot/parkinglot10.tif", "parkinglot/parkinglot83.tif", "parkinglot/parkinglot00.tif", "parkinglot/parkinglot33.tif", "parkinglot/parkinglot35.tif", "parkinglot/parkinglot04.tif", "parkinglot/parkinglot50.tif", "parkinglot/parkinglot79.tif", "parkinglot/parkinglot19.tif", "parkinglot/parkinglot84.tif", "parkinglot/parkinglot85.tif", "parkinglot/parkinglot13.tif", "parkinglot/parkinglot29.tif", "parkinglot/parkinglot55.tif", "parkinglot/parkinglot14.tif", "parkinglot/parkinglot31.tif", "parkinglot/parkinglot93.tif", "parkinglot/parkinglot30.tif", "parkinglot/parkinglot74.tif", "river/river18.tif", "river/river39.tif", "river/river08.tif", "river/river38.tif", "river/river47.tif", "river/river56.tif", "river/river62.tif", "river/river17.tif", "river/river35.tif", "river/river48.tif", "river/river75.tif", "river/river80.tif", "river/river96.tif", "river/river13.tif", "river/river70.tif", "river/river15.tif", "river/river52.tif", "river/river32.tif", "river/river49.tif", "river/river23.tif", "runway/runway12.tif", "runway/runway75.tif", "runway/runway24.tif", "runway/runway48.tif", "runway/runway33.tif", "runway/runway26.tif", "runway/runway57.tif", "runway/runway87.tif", "runway/runway67.tif", "runway/runway77.tif", "runway/runway73.tif", "runway/runway13.tif", "runway/runway82.tif", "runway/runway88.tif", "runway/runway79.tif", "runway/runway46.tif", "runway/runway15.tif", "runway/runway45.tif", "runway/runway40.tif", "runway/runway31.tif", "sparseresidential/sparseresidential11.tif", "sparseresidential/sparseresidential97.tif", "sparseresidential/sparseresidential07.tif", "sparseresidential/sparseresidential24.tif", "sparseresidential/sparseresidential23.tif", "sparseresidential/sparseresidential99.tif", "sparseresidential/sparseresidential29.tif", "sparseresidential/sparseresidential59.tif", "sparseresidential/sparseresidential57.tif", "sparseresidential/sparseresidential69.tif", "sparseresidential/sparseresidential53.tif", "sparseresidential/sparseresidential66.tif", "sparseresidential/sparseresidential55.tif", "sparseresidential/sparseresidential62.tif", "sparseresidential/sparseresidential18.tif", "sparseresidential/sparseresidential41.tif", "sparseresidential/sparseresidential05.tif", "sparseresidential/sparseresidential54.tif", "sparseresidential/sparseresidential22.tif", "sparseresidential/sparseresidential60.tif", "storagetanks/storagetanks42.tif", "storagetanks/storagetanks17.tif", "storagetanks/storagetanks93.tif", "storagetanks/storagetanks83.tif", "storagetanks/storagetanks12.tif", "storagetanks/storagetanks39.tif", "storagetanks/storagetanks24.tif", "storagetanks/storagetanks31.tif", "storagetanks/storagetanks51.tif", "storagetanks/storagetanks81.tif", "storagetanks/storagetanks92.tif", "storagetanks/storagetanks23.tif", "storagetanks/storagetanks19.tif", "storagetanks/storagetanks16.tif", "storagetanks/storagetanks80.tif", "storagetanks/storagetanks21.tif", "storagetanks/storagetanks97.tif", "storagetanks/storagetanks68.tif", "storagetanks/storagetanks89.tif", "storagetanks/storagetanks13.tif", "tenniscourt/tenniscourt75.tif", "tenniscourt/tenniscourt39.tif", "tenniscourt/tenniscourt20.tif", "tenniscourt/tenniscourt41.tif", "tenniscourt/tenniscourt59.tif", "tenniscourt/tenniscourt25.tif", "tenniscourt/tenniscourt30.tif", "tenniscourt/tenniscourt83.tif", "tenniscourt/tenniscourt74.tif", "tenniscourt/tenniscourt49.tif", "tenniscourt/tenniscourt18.tif", "tenniscourt/tenniscourt71.tif", "tenniscourt/tenniscourt31.tif", "tenniscourt/tenniscourt40.tif", "tenniscourt/tenniscourt42.tif", "tenniscourt/tenniscourt61.tif", "tenniscourt/tenniscourt95.tif", "tenniscourt/tenniscourt97.tif", "tenniscourt/tenniscourt06.tif", "tenniscourt/tenniscourt29.tif"], "test": ["agricultural/agricultural11.tif", "agricultural/agricultural23.tif", "agricultural/agricultural35.tif", "agricultural/agricultural09.tif", "agricultural/agricultural91.tif", "agricultural/agricultural88.tif", "agricultural/agricultural02.tif", "agricultural/agricultural20.tif", "agricultural/agricultural97.tif", "agricultural/agricultural76.tif", "agricultural/agricultural30.tif", "agricultural/agricultural47.tif", "agricultural/agricultural27.tif", "agricultural/agricultural07.tif", "agricultural/agricultural01.tif", "agricultural/agricultural45.tif", "agricultural/agricultural48.tif", "agricultural/agricultural98.tif", "agricultural/agricultural67.tif", "agricultural/agricultural25.tif", "airplane/airplane34.tif", "airplane/airplane09.tif", "airplane/airplane37.tif", "airplane/airplane11.tif", "airplane/airplane15.tif", "airplane/airplane61.tif", "airplane/airplane23.tif", "airplane/airplane33.tif", "airplane/airplane98.tif", "airplane/airplane64.tif", "airplane/airplane71.tif", "airplane/airplane91.tif", "airplane/airplane97.tif", "airplane/airplane17.tif", "airplane/airplane88.tif", "airplane/airplane35.tif", "airplane/airplane77.tif", "airplane/airplane86.tif", "airplane/airplane95.tif", "airplane/airplane25.tif", "baseballdiamond/baseballdiamond08.tif", "baseballdiamond/baseballdiamond71.tif", "baseballdiamond/baseballdiamond35.tif", "baseballdiamond/baseballdiamond62.tif", "baseballdiamond/baseballdiamond24.tif", "baseballdiamond/baseballdiamond73.tif", "baseballdiamond/baseballdiamond04.tif", "baseballdiamond/baseballdiamond64.tif", "baseballdiamond/baseballdiamond31.tif", "baseballdiamond/baseballdiamond36.tif", "baseballdiamond/baseballdiamond91.tif", "baseballdiamond/baseballdiamond34.tif", "baseballdiamond/baseballdiamond17.tif", "baseballdiamond/baseballdiamond93.tif", "baseballdiamond/baseballdiamond25.tif", "baseballdiamond/baseballdiamond99.tif", "baseballdiamond/baseballdiamond92.tif", "baseballdiamond/baseballdiamond88.tif", "baseballdiamond/baseballdiamond74.tif", "baseballdiamond/baseballdiamond89.tif", "beach/beach75.tif", "beach/beach95.tif", "beach/beach66.tif", "beach/beach55.tif", "beach/beach05.tif", "beach/beach70.tif", "beach/beach12.tif", "beach/beach94.tif", "beach/beach08.tif", "beach/beach47.tif", "beach/beach39.tif", "beach/beach77.tif", "beach/beach45.tif", "beach/beach88.tif", "beach/beach35.tif", "beach/beach10.tif", "beach/beach31.tif", "beach/beach46.tif", "beach/beach13.tif", "beach/beach14.tif", "buildings/buildings21.tif", "buildings/buildings51.tif", "buildings/buildings47.tif", "buildings/buildings96.tif", "buildings/buildings23.tif", "buildings/buildings97.tif", "buildings/buildings19.tif", "buildings/buildings38.tif", "buildings/buildings28.tif", "buildings/buildings25.tif", "buildings/buildings62.tif", "buildings/buildings50.tif", "buildings/buildings01.tif", "buildings/buildings34.tif", "buildings/buildings22.tif", "buildings/buildings09.tif", "buildings/buildings41.tif", "buildings/buildings15.tif", "buildings/buildings93.tif", "buildings/buildings74.tif", "chaparral/chaparral55.tif", "chaparral/chaparral29.tif", "chaparral/chaparral95.tif", "chaparral/chaparral99.tif", "chaparral/chaparral30.tif", "chaparral/chaparral72.tif", "chaparral/chaparral15.tif", "chaparral/chaparral37.tif", "chaparral/chaparral44.tif", "chaparral/chaparral06.tif", "chaparral/chaparral12.tif", "chaparral/chaparral04.tif", "chaparral/chaparral14.tif", "chaparral/chaparral43.tif", "chaparral/chaparral98.tif", "chaparral/chaparral67.tif", "chaparral/chaparral87.tif", "chaparral/chaparral47.tif", "chaparral/chaparral84.tif", "chaparral/chaparral73.tif", "denseresidential/denseresidential72.tif", "denseresidential/denseresidential50.tif", "denseresidential/denseresidential18.tif", "denseresidential/denseresidential42.tif", "denseresidential/denseresidential32.tif", "denseresidential/denseresidential35.tif", "denseresidential/denseresidential79.tif", "denseresidential/denseresidential58.tif", "denseresidential/denseresidential46.tif", "denseresidential/denseresidential94.tif", "denseresidential/denseresidential51.tif", "denseresidential/denseresidential48.tif", "denseresidential/denseresidential23.tif", "denseresidential/denseresidential57.tif", "denseresidential/denseresidential22.tif", "denseresidential/denseresidential52.tif", "denseresidential/denseresidential54.tif", "denseresidential/denseresidential70.tif", "denseresidential/denseresidential69.tif", "denseresidential/denseresidential29.tif", "forest/forest69.tif", "forest/forest45.tif", "forest/forest25.tif", "forest/forest64.tif", "forest/forest53.tif", "forest/forest62.tif", "forest/forest42.tif", "forest/forest32.tif", "forest/forest02.tif", "forest/forest96.tif", "forest/forest29.tif", "forest/forest81.tif", "forest/forest01.tif", "forest/forest24.tif", "forest/forest03.tif", "forest/forest00.tif", "forest/forest39.tif", "forest/forest88.tif", "forest/forest74.tif", "forest/forest38.tif", "freeway/freeway65.tif", "freeway/freeway73.tif", "freeway/freeway61.tif", "freeway/freeway71.tif", "freeway/freeway07.tif", "freeway/freeway33.tif", "freeway/freeway05.tif", "freeway/freeway28.tif", "freeway/freeway55.tif", "freeway/freeway26.tif", "freeway/freeway93.tif", "freeway/freeway06.tif", "freeway/freeway80.tif", "freeway/freeway74.tif", "freeway/freeway47.tif", "freeway/freeway45.tif", "freeway/freeway54.tif", "freeway/freeway20.tif", "freeway/freeway21.tif", "freeway/freeway83.tif", "golfcourse/golfcourse10.tif", "golfcourse/golfcourse66.tif", "golfcourse/golfcourse02.tif", "golfcourse/golfcourse35.tif", "golfcourse/golfcourse69.tif", "golfcourse/golfcourse45.tif", "golfcourse/golfcourse24.tif", "golfcourse/golfcourse23.tif", "golfcourse/golfcourse55.tif", "golfcourse/golfcourse08.tif", "golfcourse/golfcourse93.tif", "golfcourse/golfcourse67.tif", "golfcourse/golfcourse64.tif", "golfcourse/golfcourse16.tif", "golfcourse/golfcourse59.tif", "golfcourse/golfcourse03.tif", "golfcourse/golfcourse04.tif", "golfcourse/golfcourse27.tif", "golfcourse/golfcourse90.tif", "golfcourse/golfcourse15.tif", "harbor/harbor15.tif", "harbor/harbor88.tif", "harbor/harbor14.tif", "harbor/harbor31.tif", "harbor/harbor95.tif", "harbor/harbor96.tif", "harbor/harbor24.tif", "harbor/harbor91.tif", "harbor/harbor94.tif", "harbor/harbor63.tif", "harbor/harbor34.tif", "harbor/harbor62.tif", "harbor/harbor32.tif", "harbor/harbor76.tif", "harbor/harbor40.tif", "harbor/harbor86.tif", "harbor/harbor17.tif", "harbor/harbor30.tif", "harbor/harbor38.tif", "harbor/harbor21.tif", "intersection/intersection82.tif", "intersection/intersection88.tif", "intersection/intersection35.tif", "intersection/intersection56.tif", "intersection/intersection03.tif", "intersection/intersection00.tif", "intersection/intersection29.tif", "intersection/intersection68.tif", "intersection/intersection25.tif", "intersection/intersection66.tif", "intersection/intersection61.tif", "intersection/intersection86.tif", "intersection/intersection93.tif", "intersection/intersection39.tif", "intersection/intersection76.tif", "intersection/intersection14.tif", "intersection/intersection26.tif", "intersection/intersection22.tif", "intersection/intersection97.tif", "intersection/intersection94.tif", "mediumresidential/mediumresidential32.tif", "mediumresidential/mediumresidential31.tif", "mediumresidential/mediumresidential92.tif", "mediumresidential/mediumresidential23.tif", "mediumresidential/mediumresidential08.tif", "mediumresidential/mediumresidential74.tif", "mediumresidential/mediumresidential18.tif", "mediumresidential/mediumresidential00.tif", "mediumresidential/mediumresidential50.tif", "mediumresidential/mediumresidential67.tif", "mediumresidential/mediumresidential72.tif", "mediumresidential/mediumresidential04.tif", "mediumresidential/mediumresidential40.tif", "mediumresidential/mediumresidential09.tif", "mediumresidential/mediumresidential69.tif", "mediumresidential/mediumresidential76.tif", "mediumresidential/mediumresidential34.tif", "mediumresidential/mediumresidential20.tif", "mediumresidential/mediumresidential83.tif", "mediumresidential/mediumresidential05.tif", "mobilehomepark/mobilehomepark52.tif", "mobilehomepark/mobilehomepark59.tif", "mobilehomepark/mobilehomepark28.tif", "mobilehomepark/mobilehomepark38.tif", "mobilehomepark/mobilehomepark29.tif", "mobilehomepark/mobilehomepark43.tif", "mobilehomepark/mobilehomepark68.tif", "mobilehomepark/mobilehomepark93.tif", "mobilehomepark/mobilehomepark66.tif", "mobilehomepark/mobilehomepark35.tif", "mobilehomepark/mobilehomepark51.tif", "mobilehomepark/mobilehomepark48.tif", "mobilehomepark/mobilehomepark07.tif", "mobilehomepark/mobilehomepark96.tif", "mobilehomepark/mobilehomepark24.tif", "mobilehomepark/mobilehomepark58.tif", "mobilehomepark/mobilehomepark63.tif", "mobilehomepark/mobilehomepark34.tif", "mobilehomepark/mobilehomepark08.tif", "mobilehomepark/mobilehomepark41.tif", "overpass/overpass23.tif", "overpass/overpass85.tif", "overpass/overpass25.tif", "overpass/overpass84.tif", "overpass/overpass46.tif", "overpass/overpass15.tif", "overpass/overpass87.tif", "overpass/overpass20.tif", "overpass/overpass32.tif", "overpass/overpass59.tif", "overpass/overpass13.tif", "overpass/overpass62.tif", "overpass/overpass55.tif", "overpass/overpass28.tif", "overpass/overpass17.tif", "overpass/overpass33.tif", "overpass/overpass69.tif", "overpass/overpass08.tif", "overpass/overpass21.tif", "overpass/overpass97.tif", "parkinglot/parkinglot28.tif", "parkinglot/parkinglot65.tif", "parkinglot/parkinglot09.tif", "parkinglot/parkinglot70.tif", "parkinglot/parkinglot82.tif", "parkinglot/parkinglot91.tif", "parkinglot/parkinglot88.tif", "parkinglot/parkinglot56.tif", "parkinglot/parkinglot38.tif", "parkinglot/parkinglot03.tif", "parkinglot/parkinglot66.tif", "parkinglot/parkinglot99.tif", "parkinglot/parkinglot77.tif", "parkinglot/parkinglot42.tif", "parkinglot/parkinglot17.tif", "parkinglot/parkinglot76.tif", "parkinglot/parkinglot23.tif", "parkinglot/parkinglot26.tif", "parkinglot/parkinglot90.tif", "parkinglot/parkinglot67.tif", "river/river14.tif", "river/river40.tif", "river/river67.tif", "river/river36.tif", "river/river53.tif", "river/river72.tif", "river/river89.tif", "river/river00.tif", "river/river97.tif", "river/river99.tif", "river/river93.tif", "river/river44.tif", "river/river20.tif", "river/river78.tif", "river/river43.tif", "river/river26.tif", "river/river07.tif", "river/river54.tif", "river/river85.tif", "river/river88.tif", "runway/runway08.tif", "runway/runway02.tif", "runway/runway97.tif", "runway/runway11.tif", "runway/runway66.tif", "runway/runway51.tif", "runway/runway58.tif", "runway/runway78.tif", "runway/runway95.tif", "runway/runway21.tif", "runway/runway38.tif", "runway/runway92.tif", "runway/runway47.tif", "runway/runway64.tif", "runway/runway69.tif", "runway/runway14.tif", "runway/runway76.tif", "runway/runway59.tif", "runway/runway42.tif", "runway/runway93.tif", "sparseresidential/sparseresidential25.tif", "sparseresidential/sparseresidential27.tif", "sparseresidential/sparseresidential87.tif", "sparseresidential/sparseresidential95.tif", "sparseresidential/sparseresidential35.tif", "sparseresidential/sparseresidential20.tif", "sparseresidential/sparseresidential46.tif", "sparseresidential/sparseresidential19.tif", "sparseresidential/sparseresidential40.tif", "sparseresidential/sparseresidential31.tif", "sparseresidential/sparseresidential49.tif", "sparseresidential/sparseresidential42.tif", "sparseresidential/sparseresidential08.tif", "sparseresidential/sparseresidential02.tif", "sparseresidential/sparseresidential12.tif", "sparseresidential/sparseresidential04.tif", "sparseresidential/sparseresidential92.tif", "sparseresidential/sparseresidential38.tif", "sparseresidential/sparseresidential26.tif", "sparseresidential/sparseresidential76.tif", "storagetanks/storagetanks79.tif", "storagetanks/storagetanks62.tif", "storagetanks/storagetanks63.tif", "storagetanks/storagetanks29.tif", "storagetanks/storagetanks87.tif", "storagetanks/storagetanks74.tif", "storagetanks/storagetanks50.tif", "storagetanks/storagetanks64.tif", "storagetanks/storagetanks10.tif", "storagetanks/storagetanks94.tif", "storagetanks/storagetanks22.tif", "storagetanks/storagetanks59.tif", "storagetanks/storagetanks47.tif", "storagetanks/storagetanks77.tif", "storagetanks/storagetanks04.tif", "storagetanks/storagetanks70.tif", "storagetanks/storagetanks02.tif", "storagetanks/storagetanks96.tif", "storagetanks/storagetanks09.tif", "storagetanks/storagetanks69.tif", "tenniscourt/tenniscourt81.tif", "tenniscourt/tenniscourt88.tif", "tenniscourt/tenniscourt32.tif", "tenniscourt/tenniscourt45.tif", "tenniscourt/tenniscourt87.tif", "tenniscourt/tenniscourt53.tif", "tenniscourt/tenniscourt86.tif", "tenniscourt/tenniscourt76.tif", "tenniscourt/tenniscourt99.tif", "tenniscourt/tenniscourt94.tif", "tenniscourt/tenniscourt12.tif", "tenniscourt/tenniscourt21.tif", "tenniscourt/tenniscourt98.tif", "tenniscourt/tenniscourt19.tif", "tenniscourt/tenniscourt44.tif", "tenniscourt/tenniscourt70.tif", "tenniscourt/tenniscourt13.tif", "tenniscourt/tenniscourt69.tif", "tenniscourt/tenniscourt91.tif", "tenniscourt/tenniscourt68.tif"]}
|
datasets/__init__.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from .datasets import register, make
|
2 |
+
from . import image_folder
|
3 |
+
from . import wrappers
|
4 |
+
from . import rs_super_warp
|
5 |
+
from . import cnn_sr_wrappers
|
6 |
+
from . import inr_sr_wrappers
|
7 |
+
from . import datasets_loader
|
8 |
+
|
9 |
+
from .inr_diinn_sr_wrappers import INRSelectScaleSRWarp
|
datasets/cnn_sr_wrappers.py
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import functools
|
2 |
+
import os.path
|
3 |
+
import random
|
4 |
+
import math
|
5 |
+
|
6 |
+
import torchvision.transforms
|
7 |
+
from PIL import Image
|
8 |
+
import numpy as np
|
9 |
+
import torch
|
10 |
+
from einops import rearrange
|
11 |
+
from torch.utils.data import Dataset
|
12 |
+
from torchvision import transforms
|
13 |
+
from torchvision.transforms import InterpolationMode
|
14 |
+
|
15 |
+
from datasets import register
|
16 |
+
import torchvision.transforms
|
17 |
+
from utils import to_pixel_samples, to_coordinates
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
+
def resize_fn(img, size):
|
22 |
+
return transforms.ToTensor()(
|
23 |
+
transforms.Resize(size, Image.BICUBIC)(
|
24 |
+
transforms.ToPILImage()(img)))
|
25 |
+
|
26 |
+
|
27 |
+
@register('cnn_fixed_scale_sr_warp')
|
28 |
+
class CNNFixedScaleSRWarp(Dataset):
|
29 |
+
def __init__(self, dataset, scale_ratio, patch_size=48,
|
30 |
+
augment=False, val_mode=False, test_mode=False,
|
31 |
+
vis_continuous=False):
|
32 |
+
self.dataset = dataset
|
33 |
+
self.augment = augment
|
34 |
+
self.scale_ratio = scale_ratio
|
35 |
+
self.hr_size = int(patch_size * scale_ratio)
|
36 |
+
self.test_mode = test_mode
|
37 |
+
self.val_mode = val_mode
|
38 |
+
self.patch_size = patch_size
|
39 |
+
self.vis_continuous = vis_continuous
|
40 |
+
|
41 |
+
def __len__(self):
|
42 |
+
return len(self.dataset)
|
43 |
+
|
44 |
+
def __getitem__(self, idx):
|
45 |
+
img_hr, file_name = self.dataset[idx]
|
46 |
+
class_name = os.path.basename(os.path.dirname(file_name))
|
47 |
+
file_name = os.path.basename(file_name).split('.')[0]
|
48 |
+
|
49 |
+
if self.vis_continuous:
|
50 |
+
img_lr = transforms.Resize(self.patch_size, InterpolationMode.BICUBIC)(
|
51 |
+
transforms.CenterCrop(4*self.patch_size)(img_hr))
|
52 |
+
|
53 |
+
# img_hr: 3xHxW
|
54 |
+
if self.test_mode:
|
55 |
+
img_hr = transforms.CenterCrop(self.hr_size)(img_hr)
|
56 |
+
else:
|
57 |
+
img_hr = transforms.RandomCrop(self.hr_size)(img_hr)
|
58 |
+
|
59 |
+
if not self.vis_continuous:
|
60 |
+
img_lr = transforms.Resize(self.patch_size, InterpolationMode.BICUBIC)(img_hr)
|
61 |
+
|
62 |
+
if self.augment and not self.test_mode:
|
63 |
+
if random.random() < 0.5:
|
64 |
+
img_lr = img_lr.flip(-1)
|
65 |
+
img_hr = img_hr.flip(-1)
|
66 |
+
if random.random() < 0.5:
|
67 |
+
img_lr = img_lr.flip(-2)
|
68 |
+
img_hr = img_hr.flip(-2)
|
69 |
+
|
70 |
+
return {
|
71 |
+
'img': img_lr,
|
72 |
+
'gt': img_hr,
|
73 |
+
'class_name': class_name,
|
74 |
+
'filename': file_name
|
75 |
+
}
|
datasets/datasets.py
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import copy
|
2 |
+
|
3 |
+
|
4 |
+
datasets = {}
|
5 |
+
|
6 |
+
|
7 |
+
def register(name):
|
8 |
+
def decorator(cls):
|
9 |
+
datasets[name] = cls
|
10 |
+
return cls
|
11 |
+
return decorator
|
12 |
+
|
13 |
+
|
14 |
+
def make(dataset_spec, args=None):
|
15 |
+
if args is not None:
|
16 |
+
dataset_args = copy.deepcopy(dataset_spec['args'])
|
17 |
+
dataset_args.update(args)
|
18 |
+
else:
|
19 |
+
dataset_args = dataset_spec['args']
|
20 |
+
dataset = datasets[dataset_spec['name']](**dataset_args)
|
21 |
+
return dataset
|
datasets/datasets_loader.py
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import json
|
3 |
+
from PIL import Image
|
4 |
+
|
5 |
+
import pickle
|
6 |
+
import imageio
|
7 |
+
import numpy as np
|
8 |
+
import torch
|
9 |
+
from torch.utils.data import Dataset
|
10 |
+
from torchvision import transforms
|
11 |
+
|
12 |
+
from datasets import register
|
13 |
+
|
14 |
+
|
15 |
+
@register('hr_data_loader')
|
16 |
+
class HRImgLoader(Dataset):
|
17 |
+
def __init__(self, root_path, split_file, split_key, first_k=None, cache='none'):
|
18 |
+
self.cache = cache
|
19 |
+
with open(split_file, 'r') as f:
|
20 |
+
filenames = json.load(f)[split_key]
|
21 |
+
if first_k is not None:
|
22 |
+
filenames = filenames[:first_k]
|
23 |
+
|
24 |
+
self.files = []
|
25 |
+
for filename in filenames:
|
26 |
+
file = os.path.join(root_path, filename)
|
27 |
+
|
28 |
+
if cache == 'none':
|
29 |
+
self.files.append(file)
|
30 |
+
|
31 |
+
elif cache == 'bin':
|
32 |
+
bin_root = os.path.join(os.path.dirname(root_path),
|
33 |
+
'_bin_' + os.path.basename(root_path))
|
34 |
+
if not os.path.exists(bin_root):
|
35 |
+
os.mkdir(bin_root)
|
36 |
+
print('mkdir', bin_root)
|
37 |
+
bin_file = os.path.join(
|
38 |
+
bin_root, filename.split('.')[0] + '.pkl')
|
39 |
+
if not os.path.exists(bin_file):
|
40 |
+
with open(bin_file, 'wb') as f:
|
41 |
+
pickle.dump(imageio.imread(file), f)
|
42 |
+
print('dump', bin_file)
|
43 |
+
self.files.append(bin_file)
|
44 |
+
|
45 |
+
elif cache == 'in_memory':
|
46 |
+
self.files.append(transforms.ToTensor()(
|
47 |
+
Image.open(file).convert('RGB')))
|
48 |
+
|
49 |
+
def __len__(self):
|
50 |
+
return len(self.files)
|
51 |
+
|
52 |
+
def __getitem__(self, idx):
|
53 |
+
x = self.files[idx]
|
54 |
+
file_name = x
|
55 |
+
|
56 |
+
if self.cache == 'none':
|
57 |
+
return transforms.ToTensor()(Image.open(x).convert('RGB')), file_name
|
58 |
+
|
59 |
+
elif self.cache == 'bin':
|
60 |
+
with open(x, 'rb') as f:
|
61 |
+
x = pickle.load(f)
|
62 |
+
x = np.ascontiguousarray(x.transpose(2, 0, 1))
|
63 |
+
x = torch.from_numpy(x).float() / 255
|
64 |
+
return x, file_name
|
65 |
+
|
66 |
+
elif self.cache == 'in_memory':
|
67 |
+
return x, file_name
|
68 |
+
|
69 |
+
|
datasets/image_folder.py
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import json
|
3 |
+
from PIL import Image
|
4 |
+
|
5 |
+
import pickle
|
6 |
+
import imageio
|
7 |
+
import numpy as np
|
8 |
+
import torch
|
9 |
+
from torch.utils.data import Dataset
|
10 |
+
from torchvision import transforms
|
11 |
+
|
12 |
+
from datasets import register
|
13 |
+
|
14 |
+
|
15 |
+
@register('image-folder')
|
16 |
+
class ImageFolder(Dataset):
|
17 |
+
|
18 |
+
def __init__(self, root_path, split_file=None, split_key=None, first_k=None,
|
19 |
+
repeat=1, cache='none'):
|
20 |
+
self.repeat = repeat
|
21 |
+
self.cache = cache
|
22 |
+
|
23 |
+
if split_file is None:
|
24 |
+
filenames = sorted(os.listdir(root_path))
|
25 |
+
else:
|
26 |
+
with open(split_file, 'r') as f:
|
27 |
+
filenames = json.load(f)[split_key]
|
28 |
+
if first_k is not None:
|
29 |
+
filenames = filenames[:first_k]
|
30 |
+
|
31 |
+
self.files = []
|
32 |
+
for filename in filenames:
|
33 |
+
file = os.path.join(root_path, filename)
|
34 |
+
|
35 |
+
if cache == 'none':
|
36 |
+
self.files.append(file)
|
37 |
+
|
38 |
+
elif cache == 'bin':
|
39 |
+
bin_root = os.path.join(os.path.dirname(root_path),
|
40 |
+
'_bin_' + os.path.basename(root_path))
|
41 |
+
if not os.path.exists(bin_root):
|
42 |
+
os.mkdir(bin_root)
|
43 |
+
print('mkdir', bin_root)
|
44 |
+
bin_file = os.path.join(
|
45 |
+
bin_root, filename.split('.')[0] + '.pkl')
|
46 |
+
if not os.path.exists(bin_file):
|
47 |
+
with open(bin_file, 'wb') as f:
|
48 |
+
pickle.dump(imageio.imread(file), f)
|
49 |
+
print('dump', bin_file)
|
50 |
+
self.files.append(bin_file)
|
51 |
+
|
52 |
+
elif cache == 'in_memory':
|
53 |
+
self.files.append(transforms.ToTensor()(
|
54 |
+
Image.open(file).convert('RGB')))
|
55 |
+
|
56 |
+
def __len__(self):
|
57 |
+
return len(self.files) * self.repeat
|
58 |
+
|
59 |
+
def __getitem__(self, idx):
|
60 |
+
x = self.files[idx % len(self.files)]
|
61 |
+
|
62 |
+
if self.cache == 'none':
|
63 |
+
return transforms.ToTensor()(Image.open(x).convert('RGB'))
|
64 |
+
|
65 |
+
elif self.cache == 'bin':
|
66 |
+
with open(x, 'rb') as f:
|
67 |
+
x = pickle.load(f)
|
68 |
+
x = np.ascontiguousarray(x.transpose(2, 0, 1))
|
69 |
+
x = torch.from_numpy(x).float() / 255
|
70 |
+
return x
|
71 |
+
|
72 |
+
elif self.cache == 'in_memory':
|
73 |
+
return x
|
74 |
+
|
75 |
+
|
76 |
+
@register('paired-image-folders')
|
77 |
+
class PairedImageFolders(Dataset):
|
78 |
+
|
79 |
+
def __init__(self, root_path_1, root_path_2, **kwargs):
|
80 |
+
self.dataset_1 = ImageFolder(root_path_1, **kwargs)
|
81 |
+
self.dataset_2 = ImageFolder(root_path_2, **kwargs)
|
82 |
+
|
83 |
+
def __len__(self):
|
84 |
+
return len(self.dataset_1)
|
85 |
+
|
86 |
+
def __getitem__(self, idx):
|
87 |
+
return self.dataset_1[idx], self.dataset_2[idx]
|
datasets/inr_diinn_sr_wrappers.py
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import copy
|
2 |
+
import functools
|
3 |
+
import os
|
4 |
+
import random
|
5 |
+
import math
|
6 |
+
from PIL import Image
|
7 |
+
|
8 |
+
import numpy as np
|
9 |
+
import torch
|
10 |
+
from einops import rearrange
|
11 |
+
from torch.utils.data import Dataset
|
12 |
+
from torchvision import transforms
|
13 |
+
|
14 |
+
from datasets import register
|
15 |
+
from utils import to_pixel_samples, to_coordinates
|
16 |
+
|
17 |
+
import torchvision.transforms.functional as TF
|
18 |
+
import random
|
19 |
+
from typing import Sequence
|
20 |
+
|
21 |
+
|
22 |
+
class MyRotateTransform:
|
23 |
+
def __init__(self, angles: Sequence[int], p=0.5):
|
24 |
+
self.angles = angles
|
25 |
+
self.p = p
|
26 |
+
|
27 |
+
def __call__(self, x):
|
28 |
+
if torch.rand(1) < self.p:
|
29 |
+
return x
|
30 |
+
angle = random.choice(self.angles)
|
31 |
+
return TF.rotate(x, angle)
|
32 |
+
|
33 |
+
|
34 |
+
@register('inr_diinn_select_scale_sr_warp')
|
35 |
+
class INRSelectScaleSRWarp(Dataset):
|
36 |
+
def __init__(self,
|
37 |
+
dataset, scales, patch_size=48,
|
38 |
+
augment=False,
|
39 |
+
val_mode=False, test_mode=False
|
40 |
+
):
|
41 |
+
super(INRSelectScaleSRWarp, self).__init__()
|
42 |
+
self.dataset = dataset
|
43 |
+
self.scales = scales
|
44 |
+
self.patch_size = patch_size
|
45 |
+
self.augment = augment
|
46 |
+
self.test_mode = test_mode
|
47 |
+
self.val_mode = val_mode
|
48 |
+
|
49 |
+
def __len__(self):
|
50 |
+
return len(self.dataset)
|
51 |
+
|
52 |
+
def __getitem__(self, idx):
|
53 |
+
# import pdb
|
54 |
+
# pdb.set_trace()
|
55 |
+
img_hr_ori, file_name = self.dataset[idx]
|
56 |
+
class_name = os.path.basename(os.path.dirname(file_name))
|
57 |
+
|
58 |
+
sample = {}
|
59 |
+
for scale in self.scales:
|
60 |
+
hr_size = self.patch_size * scale
|
61 |
+
hr_size = int(hr_size)
|
62 |
+
|
63 |
+
if self.test_mode or self.val_mode:
|
64 |
+
hr_size = int(self.patch_size * max(self.scales))
|
65 |
+
img_hr = transforms.CenterCrop(hr_size)(img_hr_ori)
|
66 |
+
else:
|
67 |
+
img_hr = transforms.RandomCrop(hr_size)(copy.deepcopy(img_hr_ori))
|
68 |
+
if self.augment:
|
69 |
+
img_hr = transforms.RandomHorizontalFlip(p=0.5)(img_hr)
|
70 |
+
img_hr = transforms.RandomVerticalFlip(p=0.5)(img_hr)
|
71 |
+
img_hr = MyRotateTransform([90, 180, 270], p=0.5)(img_hr)
|
72 |
+
|
73 |
+
img_lr = transforms.Resize(self.patch_size, TF.InterpolationMode.BICUBIC)(img_hr)
|
74 |
+
sample[scale] = {'img': img_lr, 'gt': img_hr, 'class_name': class_name}
|
75 |
+
|
76 |
+
return sample
|
datasets/inr_sr_wrappers.py
ADDED
@@ -0,0 +1,177 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import functools
|
2 |
+
import os
|
3 |
+
import random
|
4 |
+
import math
|
5 |
+
from PIL import Image
|
6 |
+
|
7 |
+
import numpy as np
|
8 |
+
import torch
|
9 |
+
from einops import rearrange
|
10 |
+
from torch.utils.data import Dataset
|
11 |
+
from torchvision import transforms
|
12 |
+
|
13 |
+
from datasets import register
|
14 |
+
from utils import to_pixel_samples, to_coordinates
|
15 |
+
|
16 |
+
import torchvision.transforms.functional as TF
|
17 |
+
import random
|
18 |
+
from typing import Sequence
|
19 |
+
|
20 |
+
|
21 |
+
class MyRotateTransform:
|
22 |
+
def __init__(self, angles: Sequence[int], p=0.5):
|
23 |
+
self.angles = angles
|
24 |
+
self.p = p
|
25 |
+
|
26 |
+
def __call__(self, x):
|
27 |
+
if torch.rand(1) < self.p:
|
28 |
+
return x
|
29 |
+
angle = random.choice(self.angles)
|
30 |
+
return TF.rotate(x, angle)
|
31 |
+
|
32 |
+
@register('inr_fixed_scale_sr_warp')
|
33 |
+
class INRFixedScaleSRWarp(Dataset):
|
34 |
+
def __init__(self,
|
35 |
+
dataset, scale_ratio, patch_size=48,
|
36 |
+
augment=False, sample_q=None,
|
37 |
+
val_mode=False, test_mode=False,
|
38 |
+
encode_scale_ratio=False,
|
39 |
+
return_cell=False, # for liff
|
40 |
+
):
|
41 |
+
super(INRFixedScaleSRWarp, self).__init__()
|
42 |
+
self.dataset = dataset
|
43 |
+
self.scale_ratio = scale_ratio
|
44 |
+
self.patch_size = patch_size
|
45 |
+
self.hr_size = int(patch_size * scale_ratio)
|
46 |
+
self.augment = augment
|
47 |
+
self.sample_q = sample_q
|
48 |
+
self.test_mode = test_mode
|
49 |
+
self.val_mode = val_mode
|
50 |
+
self.encode_scale_ratio = encode_scale_ratio
|
51 |
+
self.return_cell = return_cell
|
52 |
+
|
53 |
+
def __len__(self):
|
54 |
+
return len(self.dataset)
|
55 |
+
|
56 |
+
def __getitem__(self, idx):
|
57 |
+
# import pdb
|
58 |
+
# pdb.set_trace()
|
59 |
+
img_hr, file_name = self.dataset[idx]
|
60 |
+
class_name = os.path.basename(os.path.dirname(file_name))
|
61 |
+
file_name = os.path.basename(file_name).split('.')[0]
|
62 |
+
# img_hr: 3xHxW
|
63 |
+
h, w = img_hr.shape[-2:]
|
64 |
+
# if h < 256 or w < 256:
|
65 |
+
# img_hr = transforms.Resize(256, Image.BICUBIC)(img_hr)
|
66 |
+
|
67 |
+
if self.test_mode or self.val_mode:
|
68 |
+
img_hr = transforms.CenterCrop(self.hr_size)(img_hr)
|
69 |
+
else:
|
70 |
+
img_hr = transforms.RandomCrop(self.hr_size)(img_hr)
|
71 |
+
if self.augment:
|
72 |
+
img_hr = transforms.RandomHorizontalFlip(p=0.5)(img_hr)
|
73 |
+
img_hr = transforms.RandomVerticalFlip(p=0.5)(img_hr)
|
74 |
+
img_hr = MyRotateTransform([90, 180, 270], p=0.5)(img_hr)
|
75 |
+
|
76 |
+
img_lr = transforms.Resize(self.patch_size, Image.BICUBIC)(img_hr)
|
77 |
+
|
78 |
+
hr_coord = to_coordinates(size=img_hr.shape[-2:], return_map=False)
|
79 |
+
hr_rgb = rearrange(img_hr, 'C H W -> (H W) C')
|
80 |
+
|
81 |
+
if self.sample_q is not None and not self.test_mode:
|
82 |
+
sample_lst = np.random.choice(
|
83 |
+
len(hr_coord), self.sample_q, replace=False)
|
84 |
+
hr_coord = hr_coord[sample_lst]
|
85 |
+
hr_rgb = hr_rgb[sample_lst]
|
86 |
+
return_dict = {
|
87 |
+
'inp': img_lr,
|
88 |
+
'coord': hr_coord,
|
89 |
+
'gt': hr_rgb,
|
90 |
+
'class_name': class_name,
|
91 |
+
'filename': file_name
|
92 |
+
}
|
93 |
+
|
94 |
+
if self.encode_scale_ratio:
|
95 |
+
scale_ratio = torch.ones_like(hr_coord) * self.patch_size / self.hr_size
|
96 |
+
return_dict['scale_ratio'] = scale_ratio
|
97 |
+
|
98 |
+
if self.return_cell:
|
99 |
+
cell = torch.ones_like(hr_coord)
|
100 |
+
cell[:, 0] *= 2 / img_hr.shape[-2]
|
101 |
+
cell[:, 1] *= 2 / img_hr.shape[-1]
|
102 |
+
return_dict['cell'] = cell
|
103 |
+
|
104 |
+
return return_dict
|
105 |
+
|
106 |
+
|
107 |
+
@register('inr_range_scale_sr_warp')
|
108 |
+
class INRRangeScaleSRWarp(Dataset):
|
109 |
+
def __init__(self,
|
110 |
+
dataset, max_scale_ratio, patch_size=48,
|
111 |
+
augment=False, sample_q=None,
|
112 |
+
val_mode=False, test_mode=False,
|
113 |
+
encode_scale_ratio=False,
|
114 |
+
return_cell=False, # for liff
|
115 |
+
):
|
116 |
+
super(INRRangeScaleSRWarp, self).__init__()
|
117 |
+
self.dataset = dataset
|
118 |
+
self.max_scale_ratio = max_scale_ratio
|
119 |
+
self.patch_size = patch_size
|
120 |
+
assert max_scale_ratio <= 8
|
121 |
+
self.augment = augment
|
122 |
+
self.sample_q = sample_q
|
123 |
+
self.test_mode = test_mode
|
124 |
+
self.val_mode = val_mode
|
125 |
+
self.encode_scale_ratio = encode_scale_ratio
|
126 |
+
self.return_cell = return_cell
|
127 |
+
|
128 |
+
def __len__(self):
|
129 |
+
return len(self.dataset)
|
130 |
+
|
131 |
+
def __getitem__(self, idx):
|
132 |
+
img_hr, file_name = self.dataset[idx]
|
133 |
+
class_name = os.path.basename(os.path.dirname(file_name))
|
134 |
+
h, w = img_hr.shape[-2:]
|
135 |
+
# if h < 256 or w < 256:
|
136 |
+
# img_hr = transforms.Resize(256, Image.BICUBIC)(img_hr)
|
137 |
+
|
138 |
+
hr_size = self.patch_size + self.patch_size * torch.rand([]) * (self.max_scale_ratio - 1)
|
139 |
+
hr_size = int(hr_size)
|
140 |
+
|
141 |
+
if self.test_mode or self.val_mode:
|
142 |
+
hr_size = int(self.patch_size * self.max_scale_ratio)
|
143 |
+
img_hr = transforms.CenterCrop(hr_size)(img_hr)
|
144 |
+
else:
|
145 |
+
img_hr = transforms.RandomCrop(hr_size)(img_hr)
|
146 |
+
if self.augment:
|
147 |
+
img_hr = transforms.RandomHorizontalFlip(p=0.5)(img_hr)
|
148 |
+
img_hr = transforms.RandomVerticalFlip(p=0.5)(img_hr)
|
149 |
+
img_hr = MyRotateTransform([90, 180, 270], p=0.5)(img_hr)
|
150 |
+
|
151 |
+
img_lr = transforms.Resize(self.patch_size, Image.BICUBIC)(img_hr)
|
152 |
+
|
153 |
+
hr_coord = to_coordinates(size=img_hr.shape[-2:], return_map=False)
|
154 |
+
hr_rgb = rearrange(img_hr, 'C H W -> (H W) C')
|
155 |
+
|
156 |
+
if self.sample_q is not None and not self.test_mode:
|
157 |
+
sample_lst = np.random.choice(
|
158 |
+
len(hr_coord), self.sample_q, replace=False)
|
159 |
+
hr_coord = hr_coord[sample_lst]
|
160 |
+
hr_rgb = hr_rgb[sample_lst]
|
161 |
+
return_dict = {
|
162 |
+
'inp': img_lr,
|
163 |
+
'coord': hr_coord,
|
164 |
+
'gt': hr_rgb,
|
165 |
+
'class_name': class_name
|
166 |
+
}
|
167 |
+
if self.encode_scale_ratio:
|
168 |
+
scale_ratio = torch.ones_like(hr_coord) * self.patch_size / hr_size
|
169 |
+
return_dict['scale_ratio'] = scale_ratio
|
170 |
+
|
171 |
+
if self.return_cell:
|
172 |
+
cell = torch.ones_like(hr_coord)
|
173 |
+
cell[:, 0] *= 2 / img_hr.shape[-2]
|
174 |
+
cell[:, 1] *= 2 / img_hr.shape[-1]
|
175 |
+
return_dict['cell'] = cell
|
176 |
+
|
177 |
+
return return_dict
|
datasets/rs_super_warp.py
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import functools
|
2 |
+
import random
|
3 |
+
import math
|
4 |
+
from PIL import Image
|
5 |
+
import numpy as np
|
6 |
+
import torch
|
7 |
+
from einops import rearrange
|
8 |
+
from torch.utils.data import Dataset
|
9 |
+
from torchvision import transforms
|
10 |
+
from datasets import register
|
11 |
+
from utils import to_pixel_samples, to_coordinates
|
12 |
+
|
13 |
+
|
14 |
+
def resize_fn(img, size):
|
15 |
+
return transforms.ToTensor()(
|
16 |
+
transforms.Resize(size, Image.BICUBIC)(
|
17 |
+
transforms.ToPILImage()(img)))
|
18 |
+
|
19 |
+
|
20 |
+
@register('rs_sr_warp')
|
21 |
+
class RSSRWarp(Dataset):
|
22 |
+
def __init__(self, dataset, size_min=None, size_max=None,
|
23 |
+
augment=False, gt_resize=None, sample_q=None, val_mode=False):
|
24 |
+
self.dataset = dataset
|
25 |
+
self.size_min = size_min
|
26 |
+
if size_max is None:
|
27 |
+
size_max = size_min
|
28 |
+
self.size_max = size_max
|
29 |
+
self.augment = augment
|
30 |
+
self.gt_resize = gt_resize
|
31 |
+
self.sample_q = sample_q
|
32 |
+
self.val_mode = val_mode
|
33 |
+
|
34 |
+
def __len__(self):
|
35 |
+
return len(self.dataset)
|
36 |
+
|
37 |
+
def __getitem__(self, idx):
|
38 |
+
img_lr, img_hr = self.dataset[idx]
|
39 |
+
# p = idx / (len(self.dataset) - 1)
|
40 |
+
if not self.val_mode:
|
41 |
+
p = random.random()
|
42 |
+
w_hr = round(self.size_min + (self.size_max - self.size_min) * p)
|
43 |
+
img_hr = resize_fn(img_hr, w_hr)
|
44 |
+
else:
|
45 |
+
img_hr = resize_fn(img_hr, self.size_max)
|
46 |
+
|
47 |
+
|
48 |
+
if self.augment and not self.val_mode:
|
49 |
+
if random.random() < 0.5:
|
50 |
+
img_lr = img_lr.flip(-1)
|
51 |
+
img_hr = img_hr.flip(-1)
|
52 |
+
if random.random() < 0.5:
|
53 |
+
img_lr = img_lr.flip(-2)
|
54 |
+
img_hr = img_hr.flip(-2)
|
55 |
+
|
56 |
+
if self.gt_resize is not None:
|
57 |
+
img_hr = resize_fn(img_hr, self.gt_resize)
|
58 |
+
|
59 |
+
hr_coord = to_coordinates(size=img_hr.shape[-2:], return_map=False)
|
60 |
+
hr_rgb = rearrange(img_hr, 'C H W -> (H W) C')
|
61 |
+
|
62 |
+
if self.sample_q is not None:
|
63 |
+
sample_lst = np.random.choice(len(hr_coord), self.sample_q, replace=False)
|
64 |
+
hr_coord = hr_coord[sample_lst]
|
65 |
+
hr_rgb = hr_rgb[sample_lst]
|
66 |
+
|
67 |
+
# cell = torch.ones_like(hr_coord)
|
68 |
+
# cell[:, 0] *= 2 / img_hr.shape[-2]
|
69 |
+
# cell[:, 1] *= 2 / img_hr.shape[-1]
|
70 |
+
|
71 |
+
return {
|
72 |
+
'inp': img_lr,
|
73 |
+
'coord': hr_coord,
|
74 |
+
'gt': hr_rgb
|
75 |
+
}
|
datasets/wrappers.py
ADDED
@@ -0,0 +1,248 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import functools
|
2 |
+
import random
|
3 |
+
import math
|
4 |
+
from PIL import Image
|
5 |
+
|
6 |
+
import numpy as np
|
7 |
+
import torch
|
8 |
+
from torch.utils.data import Dataset
|
9 |
+
from torchvision import transforms
|
10 |
+
|
11 |
+
from datasets import register
|
12 |
+
from utils import to_pixel_samples
|
13 |
+
|
14 |
+
|
15 |
+
@register('liff_test_warp')
|
16 |
+
class LIIFTestWarp(Dataset):
|
17 |
+
def __init__(self, dataset, scale_ratio, val_mode=False, sample_q=None):
|
18 |
+
self.dataset = dataset
|
19 |
+
self.scale_ratio = scale_ratio
|
20 |
+
self.val_mode = val_mode
|
21 |
+
self.sample_q = sample_q
|
22 |
+
print('hr_scale: ', int(scale_ratio*32))
|
23 |
+
|
24 |
+
def __len__(self):
|
25 |
+
return len(self.dataset)
|
26 |
+
|
27 |
+
def __getitem__(self, idx):
|
28 |
+
img_lr, img_hr = self.dataset[idx]
|
29 |
+
if img_hr.shape[-1] < 256:
|
30 |
+
img_hr = transforms.Resize([256, 256])(img_hr)
|
31 |
+
|
32 |
+
img_hr = transforms.Resize([self.scale_ratio*32, self.scale_ratio*32])(img_hr)
|
33 |
+
|
34 |
+
hr_coord, hr_rgb = to_pixel_samples(img_hr.contiguous())
|
35 |
+
|
36 |
+
if self.sample_q is not None:
|
37 |
+
sample_lst = np.random.choice(len(hr_coord), self.sample_q, replace=False)
|
38 |
+
hr_coord = hr_coord[sample_lst]
|
39 |
+
hr_rgb = hr_rgb[sample_lst]
|
40 |
+
|
41 |
+
cell = torch.ones_like(hr_coord)
|
42 |
+
cell[:, 0] *= 2 / img_hr.shape[-2]
|
43 |
+
cell[:, 1] *= 2 / img_hr.shape[-1]
|
44 |
+
|
45 |
+
return {
|
46 |
+
'inp': img_lr,
|
47 |
+
'coord': hr_coord,
|
48 |
+
'cell': cell,
|
49 |
+
'gt': hr_rgb
|
50 |
+
}
|
51 |
+
|
52 |
+
@register('sr-implicit-paired')
|
53 |
+
class SRImplicitPaired(Dataset):
|
54 |
+
|
55 |
+
def __init__(self, dataset, inp_size=None, augment=False, sample_q=None):
|
56 |
+
self.dataset = dataset
|
57 |
+
self.inp_size = inp_size
|
58 |
+
self.augment = augment
|
59 |
+
self.sample_q = sample_q
|
60 |
+
|
61 |
+
def __len__(self):
|
62 |
+
return len(self.dataset)
|
63 |
+
|
64 |
+
def __getitem__(self, idx):
|
65 |
+
img_lr, img_hr = self.dataset[idx]
|
66 |
+
if img_hr.shape[-1] < 256:
|
67 |
+
img_hr = transforms.Resize([256, 256])(img_hr)
|
68 |
+
|
69 |
+
s = img_hr.shape[-2] // img_lr.shape[-2] # assume int scale
|
70 |
+
if self.inp_size is None:
|
71 |
+
h_lr, w_lr = img_lr.shape[-2:]
|
72 |
+
img_hr = img_hr[:, :h_lr * s, :w_lr * s]
|
73 |
+
crop_lr, crop_hr = img_lr, img_hr
|
74 |
+
else:
|
75 |
+
w_lr = self.inp_size
|
76 |
+
x0 = random.randint(0, img_lr.shape[-2] - w_lr)
|
77 |
+
y0 = random.randint(0, img_lr.shape[-1] - w_lr)
|
78 |
+
crop_lr = img_lr[:, x0: x0 + w_lr, y0: y0 + w_lr]
|
79 |
+
w_hr = w_lr * s
|
80 |
+
x1 = x0 * s
|
81 |
+
y1 = y0 * s
|
82 |
+
crop_hr = img_hr[:, x1: x1 + w_hr, y1: y1 + w_hr]
|
83 |
+
|
84 |
+
if self.augment:
|
85 |
+
hflip = random.random() < 0.5
|
86 |
+
vflip = random.random() < 0.5
|
87 |
+
dflip = random.random() < 0.5
|
88 |
+
|
89 |
+
def augment(x):
|
90 |
+
if hflip:
|
91 |
+
x = x.flip(-2)
|
92 |
+
if vflip:
|
93 |
+
x = x.flip(-1)
|
94 |
+
if dflip:
|
95 |
+
x = x.transpose(-2, -1)
|
96 |
+
return x
|
97 |
+
|
98 |
+
crop_lr = augment(crop_lr)
|
99 |
+
crop_hr = augment(crop_hr)
|
100 |
+
|
101 |
+
hr_coord, hr_rgb = to_pixel_samples(crop_hr.contiguous())
|
102 |
+
|
103 |
+
if self.sample_q is not None:
|
104 |
+
sample_lst = np.random.choice(
|
105 |
+
len(hr_coord), self.sample_q, replace=False)
|
106 |
+
hr_coord = hr_coord[sample_lst]
|
107 |
+
hr_rgb = hr_rgb[sample_lst]
|
108 |
+
|
109 |
+
cell = torch.ones_like(hr_coord)
|
110 |
+
cell[:, 0] *= 2 / crop_hr.shape[-2]
|
111 |
+
cell[:, 1] *= 2 / crop_hr.shape[-1]
|
112 |
+
|
113 |
+
return {
|
114 |
+
'inp': crop_lr,
|
115 |
+
'coord': hr_coord,
|
116 |
+
'cell': cell,
|
117 |
+
'gt': hr_rgb
|
118 |
+
}
|
119 |
+
|
120 |
+
|
121 |
+
def resize_fn(img, size):
|
122 |
+
return transforms.ToTensor()(
|
123 |
+
transforms.Resize(size, Image.BICUBIC)(
|
124 |
+
transforms.ToPILImage()(img)))
|
125 |
+
|
126 |
+
|
127 |
+
@register('sr-implicit-downsampled')
|
128 |
+
class SRImplicitDownsampled(Dataset):
|
129 |
+
|
130 |
+
def __init__(self, dataset, inp_size=None, scale_min=1, scale_max=None,
|
131 |
+
augment=False, sample_q=None):
|
132 |
+
self.dataset = dataset
|
133 |
+
self.inp_size = inp_size
|
134 |
+
self.scale_min = scale_min
|
135 |
+
if scale_max is None:
|
136 |
+
scale_max = scale_min
|
137 |
+
self.scale_max = scale_max
|
138 |
+
self.augment = augment
|
139 |
+
self.sample_q = sample_q
|
140 |
+
|
141 |
+
def __len__(self):
|
142 |
+
return len(self.dataset)
|
143 |
+
|
144 |
+
def __getitem__(self, idx):
|
145 |
+
img = self.dataset[idx]
|
146 |
+
s = random.uniform(self.scale_min, self.scale_max)
|
147 |
+
|
148 |
+
if self.inp_size is None:
|
149 |
+
h_lr = math.floor(img.shape[-2] / s + 1e-9)
|
150 |
+
w_lr = math.floor(img.shape[-1] / s + 1e-9)
|
151 |
+
img = img[:, :round(h_lr * s), :round(w_lr * s)] # assume round int
|
152 |
+
img_down = resize_fn(img, (h_lr, w_lr))
|
153 |
+
crop_lr, crop_hr = img_down, img
|
154 |
+
else:
|
155 |
+
w_lr = self.inp_size
|
156 |
+
w_hr = round(w_lr * s)
|
157 |
+
x0 = random.randint(0, img.shape[-2] - w_hr)
|
158 |
+
y0 = random.randint(0, img.shape[-1] - w_hr)
|
159 |
+
crop_hr = img[:, x0: x0 + w_hr, y0: y0 + w_hr]
|
160 |
+
crop_lr = resize_fn(crop_hr, w_lr)
|
161 |
+
|
162 |
+
if self.augment:
|
163 |
+
hflip = random.random() < 0.5
|
164 |
+
vflip = random.random() < 0.5
|
165 |
+
dflip = random.random() < 0.5
|
166 |
+
|
167 |
+
def augment(x):
|
168 |
+
if hflip:
|
169 |
+
x = x.flip(-2)
|
170 |
+
if vflip:
|
171 |
+
x = x.flip(-1)
|
172 |
+
if dflip:
|
173 |
+
x = x.transpose(-2, -1)
|
174 |
+
return x
|
175 |
+
|
176 |
+
crop_lr = augment(crop_lr)
|
177 |
+
crop_hr = augment(crop_hr)
|
178 |
+
|
179 |
+
hr_coord, hr_rgb = to_pixel_samples(crop_hr.contiguous())
|
180 |
+
|
181 |
+
if self.sample_q is not None:
|
182 |
+
sample_lst = np.random.choice(
|
183 |
+
len(hr_coord), self.sample_q, replace=False)
|
184 |
+
hr_coord = hr_coord[sample_lst]
|
185 |
+
hr_rgb = hr_rgb[sample_lst]
|
186 |
+
|
187 |
+
cell = torch.ones_like(hr_coord)
|
188 |
+
cell[:, 0] *= 2 / crop_hr.shape[-2]
|
189 |
+
cell[:, 1] *= 2 / crop_hr.shape[-1]
|
190 |
+
|
191 |
+
return {
|
192 |
+
'inp': crop_lr,
|
193 |
+
'coord': hr_coord,
|
194 |
+
'cell': cell,
|
195 |
+
'gt': hr_rgb
|
196 |
+
}
|
197 |
+
|
198 |
+
|
199 |
+
@register('sr-implicit-uniform-varied')
|
200 |
+
class SRImplicitUniformVaried(Dataset):
|
201 |
+
|
202 |
+
def __init__(self, dataset, size_min, size_max=None,
|
203 |
+
augment=False, gt_resize=None, sample_q=None):
|
204 |
+
self.dataset = dataset
|
205 |
+
self.size_min = size_min
|
206 |
+
if size_max is None:
|
207 |
+
size_max = size_min
|
208 |
+
self.size_max = size_max
|
209 |
+
self.augment = augment
|
210 |
+
self.gt_resize = gt_resize
|
211 |
+
self.sample_q = sample_q
|
212 |
+
|
213 |
+
def __len__(self):
|
214 |
+
return len(self.dataset)
|
215 |
+
|
216 |
+
def __getitem__(self, idx):
|
217 |
+
img_lr, img_hr = self.dataset[idx]
|
218 |
+
# p = idx / (len(self.dataset) - 1)
|
219 |
+
p = random.random()
|
220 |
+
w_hr = round(self.size_min + (self.size_max - self.size_min) * p)
|
221 |
+
img_hr = resize_fn(img_hr, w_hr)
|
222 |
+
|
223 |
+
if self.augment:
|
224 |
+
if random.random() < 0.5:
|
225 |
+
img_lr = img_lr.flip(-1)
|
226 |
+
img_hr = img_hr.flip(-1)
|
227 |
+
|
228 |
+
if self.gt_resize is not None:
|
229 |
+
img_hr = resize_fn(img_hr, self.gt_resize)
|
230 |
+
|
231 |
+
hr_coord, hr_rgb = to_pixel_samples(img_hr)
|
232 |
+
|
233 |
+
if self.sample_q is not None:
|
234 |
+
sample_lst = np.random.choice(
|
235 |
+
len(hr_coord), self.sample_q, replace=False)
|
236 |
+
hr_coord = hr_coord[sample_lst]
|
237 |
+
hr_rgb = hr_rgb[sample_lst]
|
238 |
+
|
239 |
+
cell = torch.ones_like(hr_coord)
|
240 |
+
cell[:, 0] *= 2 / img_hr.shape[-2]
|
241 |
+
cell[:, 1] *= 2 / img_hr.shape[-1]
|
242 |
+
|
243 |
+
return {
|
244 |
+
'inp': img_lr,
|
245 |
+
'coord': hr_coord,
|
246 |
+
'cell': cell,
|
247 |
+
'gt': hr_rgb
|
248 |
+
}
|
examples/AID_bridge_19_HR.png
ADDED
![]() |
examples/AID_bridge_19_LR.png
ADDED
![]() |
examples/AID_commercial_32_HR.png
ADDED
![]() |
examples/AID_commercial_32_LR.png
ADDED
![]() |
examples/AID_parking_60_HR.png
ADDED
![]() |
examples/AID_parking_60_LR.png
ADDED
![]() |
examples/AID_school_161_HR.png
ADDED
![]() |
examples/AID_school_161_LR.png
ADDED
![]() |
examples/UC_airplane00_HR.png
ADDED
![]() |
examples/UC_airplane00_LR.png
ADDED
![]() |
examples/UC_airplane95_HR.png
ADDED
![]() |
examples/UC_airplane95_LR.png
ADDED
![]() |
examples/UC_freeway35_HR.png
ADDED
![]() |
examples/UC_freeway35_LR.png
ADDED
![]() |
examples/UC_storagetanks54_HR.png
ADDED
![]() |
examples/UC_storagetanks54_LR.png
ADDED
![]() |
examples/airplane00.tif
ADDED
|
examples/airplane95.tif
ADDED
|
examples/bridge_19.jpg
ADDED
![]() |
Git LFS Details
|
examples/commercial_32.jpg
ADDED
![]() |
Git LFS Details
|
examples/freeway35.tif
ADDED
|
examples/parking_60.jpg
ADDED
![]() |
Git LFS Details
|
examples/resize.py
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import glob
|
2 |
+
|
3 |
+
from PIL import Image
|
4 |
+
from torchvision import transforms
|
5 |
+
import cv2
|
6 |
+
from torchvision.transforms import InterpolationMode
|
7 |
+
|
8 |
+
patch_size = 48
|
9 |
+
|
10 |
+
for file in glob.glob("*.tif"):
|
11 |
+
img = transforms.ToTensor()(Image.open(file).convert('RGB')) * 255
|
12 |
+
img_lr = transforms.Resize(patch_size, InterpolationMode.BICUBIC)(
|
13 |
+
transforms.CenterCrop(4 * patch_size)(img))
|
14 |
+
|
15 |
+
img_hr = transforms.CenterCrop(4 * patch_size)(img)
|
16 |
+
|
17 |
+
cv2.imwrite(f'UC_{file.split(".")[0]}_LR.png', img_lr.permute((1, 2, 0)).numpy())
|
18 |
+
print(f'UC_{file.split(".")[0]}_LR.png')
|
19 |
+
cv2.imwrite(f'UC_{file.split(".")[0]}_HR.png', img_hr.permute((1, 2, 0)).numpy())
|
20 |
+
|
examples/school_161.jpg
ADDED
![]() |
Git LFS Details
|
examples/storagetanks54.tif
ADDED
|