lfcnn.models.superresolution package

Submodules

lfcnn.models.superresolution.dummy module

Light field disparity dummy model

class lfcnn.models.superresolution.dummy.Dummy(depth=0, **kwargs)[source]

Bases: lfcnn.models.abstracts.BaseModel

create_model(inputs, augmented_shape)[source]

Create the Keras model. Needs to be implemented by the derived class to define the network topology.

Parameters
  • inputs (List[Input]) – List of Keras Inputs. Single or multi inputs supported.

  • augmented_shape – The augmented shape as generated by the generator. Can be used to obtain the original light field’s shape, for example the number of subapertures or the number of spectral channels.

Return type

Model

property depth
static final_reshape(input, augmented_shape, name='reshape')[source]

Reshape to superresolved light field

set_generator_and_reshape()[source]

lfcnn.models.superresolution.sas_conv module

Light field superresolution model using Spatial-Angular Separable (SAS) Convolution.

See:

Yeung, Henry Wing Fung, et al. “Light field spatial super-resolution using deep efficient spatial-angular separable convolution.” IEEE Transactions on Image Processing 28.5 (2018): 2319-2330.

class lfcnn.models.superresolution.sas_conv.SasConv(L=3, **kwargs)[source]

Bases: lfcnn.models.abstracts.BaseModel

Parameters

L – Number of SAS layers.

static angular2spatial(input)[source]

Angular to spatial reshape a time distributed tensor of shape (b, s*t, u, v, ch) to (b, u*v, s, t, ch) Only works when s==t.

create_model(inputs, augmented_shape=None)[source]

Create the Keras model. Needs to be implemented by the derived class to define the network topology.

Parameters
  • inputs (List[Input]) – List of Keras Inputs. Single or multi inputs supported.

  • augmented_shape – The augmented shape as generated by the generator. Can be used to obtain the original light field’s shape, for example the number of subapertures or the number of spectral channels.

Return type

Model

static final_reshape(input, name='light_field')[source]

Spatial to angular reshape a time distributed tensor of shape (b, u*v, s, t, ch) to (b, u, v, s, t, ch) Only works when u==v.

sas_block(x)[source]

Input shape (u*v, s, t, F) Output shape (u*v, s, t, F’)

set_generator_and_reshape()[source]
static spatial2angular(input)[source]

Spatial to angular reshape a time distributed tensor of shape (b, u*v, s, t, ch) to (b, s*t, u, v, ch) Only works when u==v.

Module contents

The LFCNN superresolution models.

lfcnn.models.superresolution.get(model)[source]

Given a model name, returns an lfcnn model instance.

Parameters

model (str) – Name of the model.

Returns

Model instance.