Skip to content
SR-Forge

DSen2 Model

ResBlock

Bases: Module

A standard residual block with two convolutional layers.

__init__(channels, kernel_size=3, scale=0.1)

Initializes the ResBlock.

Parameters:

Name Type Description Default
channels int

The number of input and output channels.

required
kernel_size int

The size of the convolutional kernel. Defaults to 3.

3
scale float

A scaling factor applied to the residual branch before addition. Defaults to 0.1.

0.1

forward(x: torch.Tensor) -> torch.Tensor

Defines the forward pass for the residual block.

Parameters:

Name Type Description Default
x Tensor

The input tensor.

required

Returns:

Type Description
Tensor

torch.Tensor: The output tensor after applying the residual connection.

DSen2

Bases: Model

Implementation of the DSen2 model for Sentinel-2 super-resolution.

This model is designed to super-resolve 20m and 60m Sentinel-2 bands to 10m resolution, using the 10m bands as a reference.

Reference

Lanaras, C., Bioucas-Dias, J., Baltsavias, E., & Schindler, K. (2018). Super-resolution of Sentinel-2 images: Learning a globally applicable deep neural network. ISPRS Journal of Photogrammetry and Remote Sensing.

__init__(num_layers=32, feature_size=256, input_channels=12, return_10m_bands=True)

Initializes the DSen2 model.

Parameters:

Name Type Description Default
num_layers int

The number of residual blocks in the main body of the network. Defaults to 32.

32
feature_size int

The number of channels in the intermediate feature maps. Defaults to 256.

256
input_channels int

The total number of input channels from all concatenated Sentinel-2 bands. Defaults to 12.

12
return_10m_bands bool

If True, the output dictionary will also include the original, untouched 10m bands. Defaults to True.

True