Repository navigation
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.WrappedDatasetare datasets that have some sort of mask applied to them that hides the true state space and resizes the dataset.disent.dataset.wrapper.DitheredDatasetapplies an n-dimensional dithering operation to ground truth factorsdisent.dataset.wrapper.MaskedDatasetapplies some provided boolean mask over the dataset
disent.dataset.DisentDatasetnow supports wrapped datasets (instances ofdisent.dataset.wrapper.WrappedDataset). New methods and properties have been added to compliment this feature:is_wrapped_datacheck if there is wrapped datais_wrapped_gt_datacheck if there is wrapped data and the wrapped data is ground truth datawrapped_dataobtain the wrapped data, otherwise throw an errorwrapped_gt_dataobtain the wrapped ground truth data, otherwise throw an errorunwrapped_disent_datasetcreates a copy of the disent dataset with everything the same, except the data is unwrapped.
disent.util.lightning.callbacksadditions- 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.ditherdisent.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.SelfContainedHdf5GroundTruthDatato read these files - Added
disent.dataset.util.H5Builderfor creating these files. (API is not yet finalised)
- Added
disent.dataset.util.StateSpaceadded helper functioniter_traversal_indicesdisent.nn.transformaddedToUint8Tensorwhich 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_tensorcomplimentingto_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
DisentDatasetcopying requires the ability to copy samplers, so each sampler implementation should have theuninit_copymethod implemented too. ArrayGroundTruthDatais more strict about theobservation_shapemust be(H, W, C)or(C, H, W)depending onarray_chn_is_last- Removed reconstruction losses:
ReconLossHandlerMse4aka."mse4"ReconLossHandlerMae2aka."mae2"
- Renamed
disent.util.visualize.get_factor_traversaltoget_idx_traversal
Deprecations
GroundTruthDataproperty aliases:img_shapenew property for the deprecatedobservation_shapeobs_shapenew property for the deprecatedx_shapeimg_channelsnew property for the number of channels in the image
Fixes
disent.util.inout.files.AtomicSaveFileminor fix to overwriting filesdisent.util.lightning.callbacks.LoggerProgressCallbackfix 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*.txtfiles - many other minor fixes