msdnet.data module¶
Module for image data input.
Below, is the number of image channels, and the image dimensions in pixels.
-
class
msdnet.data.
DataPoint
[source]¶ Bases:
abc.ABC
Base class for a single data point (input image with corresponding target image)
-
property
input
¶ Input image
-
property
target
¶ Target image
-
property
mask
¶ Mask image
-
property
-
class
msdnet.data.
OnlyAllDataPoint
[source]¶ Bases:
msdnet.data.DataPoint
Base class for a single data point (input image with corresponding target image) that can only return all images at once (i.e. getall).
-
errormsg
= 'Only getall supported'¶
-
-
class
msdnet.data.
BatchProvider
(dlist, batchsize, seed=None)[source]¶ Bases:
object
Object that returns small random batches of datapoints.
- Parameters
dlist – List of
DataPoint
.batchsize – Number of datapoints per batch.
seed – (optional) Random seed.
-
class
msdnet.data.
ArrayDataPoint
(inputarray, targetarray=None, maskarray=None)[source]¶ Bases:
msdnet.data.DataPoint
Datapoint with numpy array image data.
- Parameters
inputarray – numpy array with input image (size: )
targetarray – (optional) numpy array with target image (size: )
maskarray – (optional) numpy array with mask image (size: )
-
class
msdnet.data.
ImageFileDataPoint
(inputfile, targetfile=None, maskfile=None)[source]¶ Bases:
msdnet.data.DataPoint
Datapoint with image files. Supported are: TIFFs and most standard image formats (e.g. PNG and JPEG).
- Parameters
inputfile – file name of input image
targetfile – (optional) file name of target image
maskfile – (optional) file name of mask image
-
class
msdnet.data.
OneHotDataPoint
(datapoint, labels, maskunlabeled=True)[source]¶ Bases:
msdnet.data.DataPoint
Datapoint that converts a data point with a labeled image to one-hot images.
- Parameters
datapoint – input
DataPoint
labels – list of numberical labels in label image
maskunlabeled – (optional) whether to mask out unlabeled pixels
-
class
msdnet.data.
SlabDataPoint
(datapoints, flip=False)[source]¶ Bases:
msdnet.data.DataPoint
Datapoint that represents a slab of data points.
- Parameters
datapoints – list of
DataPoint
.flip – (optional) whether to augment data by also flipping slab.