API Reference

This page lists the available functions and classes of pysegcnn.

Dataset

Custom dataset classes compliant to the PyTorch standard.

Image Dataset

Generic class to implement custom datasets.

core.dataset.ImageDataset

Base class for multispectral image data.

Supported datasets

The following open-source spaceborne multispectral image datasets are supported out-of-the-box:

core.dataset.SparcsDataset

Class for the Sparcs dataset.

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 upsampling.

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 PyTorch implementation of U-Net.