API Reference

This page lists the available functions and classes of pysegcnn.

Dataset

Custom dataset classes compliant to the PyTorch standard.

Generic classes

Generic class to implement a custom dataset.

core.dataset.ImageDataset

Base class for multispectral image data.

Generic class to implement a custom dataset following a standard directory structure.

core.dataset.StandardEoDataset

Base class for standard Earth Observation style datasets.

Specific classes

Specific classes for some open-source image datasets. Currently, the following spaceborne multispectral image datasets are supported out-of-the-box:

core.dataset.SparcsDataset

Class for the Sparcs dataset by Hughes & Hayes (2014).

core.dataset.Cloud95Dataset

Class for the Cloud-95 dataset by Mohajerani & Saeedi (2020).

Models

Layers

Convolutional neural network layers.

core.layers.Block

Basic convolutional block.

core.layers.Conv2dSame

A convolution preserving the shape of its input.

core.layers.ConvBnReluMaxPool

Block of convolution, batchnorm, relu and 2x2 max pool.

core.layers.ConvBnReluMaxUnpool

Block of convolution, batchnorm, relu and 2x2 max unpool.

core.layers.ConvBnReluUpsample

Block of convolution, batchnorm, relu and nearest neighbor upsample.

Encoder-Decoder architechture

Generic Encoder and Decoder classes to build an encoder-decoder architecture.

core.layers.EncoderBlock

Block of a convolutional encoder.

core.layers.DecoderBlock

Block of a convolutional decoder.

core.layers.Encoder

Generic convolutional encoder.

core.layers.Decoder

Generic convolutional decoder.

Neural Networks

core.models.Network

Generic Network class.

core.models.UNet

A slightly modified implementation of U-Net in PyTorch.