|
import torch |
|
import benchmark |
|
import opensr_test |
|
import matplotlib.pyplot as plt |
|
from evoland.utils import load_evoland, run_evoland |
|
|
|
|
|
model = load_evoland() |
|
|
|
|
|
dataset = opensr_test.load("spot") |
|
lr_dataset, hr_dataset = dataset["L2A"], dataset["HRharm"] |
|
|
|
|
|
results = run_evoland( |
|
model=model, |
|
lr=lr_dataset[4], |
|
hr=hr_dataset[4] |
|
) |
|
|
|
|
|
|
|
fig, ax = plt.subplots(1, 3, figsize=(10, 5)) |
|
ax[0].imshow(results["lr"].transpose(1, 2, 0)/3000) |
|
ax[0].set_title("LR") |
|
ax[0].axis("off") |
|
ax[1].imshow(results["sr"].transpose(1, 2, 0)/3000) |
|
ax[1].set_title("SR") |
|
ax[1].axis("off") |
|
ax[2].imshow(results["hr"].transpose(1, 2, 0) / 3000) |
|
ax[2].set_title("HR") |
|
plt.show() |
|
|
|
|
|
|
|
benchmark.create_geotiff(model, run_evoland, "all", "evoland/") |
|
|