v0.2.1
Under the hood, quite a lot of code has been added or changed for this release, however the API remains very much the same.
Additions
- Wrapped datasets, instances of
disent.dataset.wrapper.WrappedDataset
are datasets that have some sort of mask applied to them that hides the true state space and resizes the dataset.disent.dataset.wrapper.DitheredDataset
applies an n-dimensional dithering operation to ground truth factorsdisent.dataset.wrapper.MaskedDataset
applies some provided boolean mask over the dataset
disent.dataset.DisentDataset
now supports wrapped datasets (instances ofdisent.dataset.wrapper.WrappedDataset
). New methods and properties have been added to compliment this feature:is_wrapped_data
check if there is wrapped datais_wrapped_gt_data
check if there is wrapped data and the wrapped data is ground truth datawrapped_data
obtain the wrapped data, otherwise throw an errorwrapped_gt_data
obtain the wrapped ground truth data, otherwise throw an errorunwrapped_disent_dataset
creates a copy of the disent dataset with everything the same, except the data is unwrapped.
disent.util.lightning.callbacks
additions- Support for wrapped datasets. They automatically try to unwrap them to obtain the ground truth data which can be used to compute metrics and perform visualisations.
- Support model output scaling to a certain range of values, fixing visualisations when using
VaeLatentCycleLoggingCallback
- new utilities
disent.util.math.dither
disent.util.math.random
- Self contained HDF5 ground-truth datasets. These store all the information needed to construct the dataset and state space in one file, including the factor names.
- Added
disent.dataset.data.SelfContainedHdf5GroundTruthData
to read these files - Added
disent.dataset.util.H5Builder
for creating these files. (API is not yet finalised)
- Added
disent.dataset.util.StateSpace
added helper functioniter_traversal_indices
disent.nn.transform
addedToUint8Tensor
which acts likeToStandardisedTensor
, but instead of loading images asfloat32
, it loads them asuint8
. This is useful when you need to use datasets outside of a ML Model context, eg. performing analysis. This takes up less memory.- corresponding functional version exists
to_uint_tensor
complimentingto_standardised_tensor
- corresponding functional version exists
- Begun work on a component & function registry, although do not use this as the API will change significantly.
API Breakages
- Under the hood, implementing wrapped data and
DisentDataset
copying requires the ability to copy samplers, so each sampler implementation should have theuninit_copy
method implemented too. ArrayGroundTruthData
is more strict about theobservation_shape
must be(H, W, C)
or(C, H, W)
depending onarray_chn_is_last
- Removed reconstruction losses:
ReconLossHandlerMse4
aka."mse4"
ReconLossHandlerMae2
aka."mae2"
- Renamed
disent.util.visualize.get_factor_traversal
toget_idx_traversal
Deprecations
GroundTruthData
property aliases:img_shape
new property for the deprecatedobservation_shape
obs_shape
new property for the deprecatedx_shape
img_channels
new property for the number of channels in the image
Fixes
disent.util.inout.files.AtomicSaveFile
minor fix to overwriting filesdisent.util.lightning.callbacks.LoggerProgressCallback
fix to datatypes and potential crashes due to floats- More stable experiment runs when performing sweeps. Better error handling, error messages and error catching.
- fixes to the various
requirement*.txt
files - many other minor fixes