thelper.nn.sr package

Neural network and model package for super resolution.

This package contains classes that define blocks and modules used in various neural network for super resolution architectures. Most of these classes have been adapted from external sources; see their individual headers for more information.

Submodules

thelper.nn.sr.srcnn module

class thelper.nn.sr.srcnn.SRCNN(task, num_channels=1, base_filter=64, groups=1)[source]

Bases: thelper.nn.utils.Module

Implements the SRCNN architecture.

See Dong et al., “Image Super-Resolution Using Deep Convolutional Networks” (2014) for more information (https://arxiv.org/abs/1501.00092).

__init__(task, num_channels=1, base_filter=64, groups=1)[source]

Receives a task object to hold internally for model specialization.

forward(x)[source]

Transforms an input tensor in order to generate a prediction.

set_task(task)[source]

Adapts the model to support a new task, replacing layers if needed.

weight_init()[source]

thelper.nn.sr.vdsr module

class thelper.nn.sr.vdsr.VDSR(task, num_channels=1, base_filter=64, kernel_size0=3, num_residuals=18, groups=1, activation='relu', norm='batch')[source]

Bases: thelper.nn.utils.Module

Implements the VDSR architecture.

See Kim et al., “Accurate Image Super-Resolution Using Very Deep Convolutional Networks” (2015) for more information (https://arxiv.org/abs/1511.04587).

__init__(task, num_channels=1, base_filter=64, kernel_size0=3, num_residuals=18, groups=1, activation='relu', norm='batch')[source]

Receives a task object to hold internally for model specialization.

forward(x)[source]

Transforms an input tensor in order to generate a prediction.

set_task(task)[source]

Adapts the model to support a new task, replacing layers if needed.

weight_init()[source]