Skip to content
/ sr4rs Public
forked from remicres/sr4rs

Super resolution for remote sensing

License

Notifications You must be signed in to change notification settings

cuulee/sr4rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SR4RS

An open source tool for super resolution. You can add your own models, cost functions, feel free to open a PR!

Super Resolution for Remote Sensing

This work has been supported by the Programme National de Télédétection Spatiale (PNTS), grant n° PNTS-2020-07

Cite

@misc{sr4rs2021,
  author = {Cresson, R.},
  title = {Super Resolution for Remote Sensing},
  year = {2021},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/remicres/sr4rs}},
  commit = {28792f2ed0b45c6f66abf9cb9cfa4a5d8e58d511}
}

Representative images

The following are Sentinel-2 images processed with a model trained from pansharpened Spot-6/7 images.

Look at the entire Sentinel-2 image processed over the Montpellier area (Image is resampled in another cartographic projection, which might distord a bit the nice result!).

Read more

Blog post on MDL4EO

How to use?

SR4RS needs OTBTF>=2.3 to work.

Quick HR image generation using pre-trained model

  1. Get the latest OTBTF docker image and enter the docker image. Use the nice and lightweight builds done by Vincent@LaTelescop (see here to see all flavours). Here is an example with the otbtf gpu:2.3-dev image, using NVIDIA runtime:
docker run -ti --runtime=nvidia registry.gitlab.com/latelescop/docker/otbtf/gpu:2.3-dev bash
  1. Download and unzip a pre-trained SavedModel (see this section to see available pre-trained models)
wget https://nextcloud.inrae.fr/s/JLsak68H2KYzPyG/download
unzip download
  1. Clone SR4RS
git clone https://github.com/remicres/sr4rs.git
  1. Use SR4RS to create an HR image (the considered pre-trained model runs on a Sentinel-2 image, 4-channels ordered as Red, Green, Blue, Near infrared). Just download a Sentinel-2 image from ESA hub or elsewhere, then concatenate the bands in this order (for that you can use the OTB application named otbcli_ConcatenateImages).
python sr4rs/code/sr.py \
--savedmodel sr4rs_mini-mtp-2.5_savedmodel \
--input /path/to/some/S2_image/stacked_channels_4328_10m.tif \
--output test.tif

Train a model

Here is a summary of the steps to follow.

  1. Generate patches images using the PatchesExtraction application from OTBTF, from one low-res image (LR) and one high-res image (HR)
  2. Run train.py on your patches images, and generate a SavedModel
  3. Use sr.py on LR image using the previously generated SavedModel

For more details, see the documentation and check the pre-trained models.

About

Super resolution for remote sensing

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%