dacapo.experiments.trainers.gp_augments
Submodules
dacapo.experiments.trainers.gp_augments.augment_configdacapo.experiments.trainers.gp_augments.elastic_configdacapo.experiments.trainers.gp_augments.gamma_configdacapo.experiments.trainers.gp_augments.intensity_configdacapo.experiments.trainers.gp_augments.intensity_scale_shift_configdacapo.experiments.trainers.gp_augments.simple_config
Package Contents
Classes
Base class for gunpowder augment configurations. Each subclass of a Augment |
|
A class that holds the configuration details for the elastic augmentations. |
|
This class is an implementation of AugmentConfig that applies simple augmentations. |
|
This class manages the configuration of gamma augmentation for a given dataset. |
|
Base class for gunpowder augment configurations. Each subclass of a Augment |
|
Base class for gunpowder augment configurations. Each subclass of a Augment |
- class dacapo.experiments.trainers.gp_augments.AugmentConfig
Base class for gunpowder augment configurations. Each subclass of a Augment should have a corresponding config class derived from AugmentConfig.
- abstract node(raw_key: gunpowder.ArrayKey, gt_key: gunpowder.ArrayKey, mask_key: gunpowder.ArrayKey) gunpowder.BatchFilter
return a gunpowder node that performs this augmentation
- class dacapo.experiments.trainers.gp_augments.ElasticAugmentConfig
A class that holds the configuration details for the elastic augmentations.
- control_point_spacing
Distance(in voxels per dimension) between control points for the elastic deformation.
- Type:
List[int]
- control_point_displacement_sigma
Standard deviation of control point displacement distribution, in world coordinates.
- Type:
List[float]
- rotation_interval
An interval to randomly sample rotation angles from (0,2PI).
- Type:
Tuple[float, float]
- subsample
Downsample factor to perform the elastic augmentation on a grid. Default is 1.
- Type:
int
- uniform_3d_rotation
Should 3D rotations be performed uniformly. The ‘rotation_interval’ will be ignored. Default is False.
- Type:
bool
- control_point_spacing: List[int]
- control_point_displacement_sigma: List[float]
- rotation_interval: Tuple[float, float]
- subsample: int
- uniform_3d_rotation: bool
- node(_raw_key=None, _gt_key=None, _mask_key=None)
Returns the object of ElasticAugment with the given configuration details.
- Parameters:
_raw_key – Unused variable, kept for future use.
_gt_key – Unused variable, kept for future use.
_mask_key – Unused variable, kept for future use.
- Returns:
- A ElasticAugment object configured with control_point_spacing,
control_point_displacement_sigma, rotation_interval, subsample and uniform_3d_rotation.
- Return type:
- class dacapo.experiments.trainers.gp_augments.SimpleAugmentConfig
This class is an implementation of AugmentConfig that applies simple augmentations.
- Parameters:
_raw_key – Key for raw data. Not used in this implementation. Defaults to None.
_gt_key – Key for ground truth data. Not used in this implementation. Defaults to None.
_mask_key – Key for mask data. Not used in this implementation. Defaults to None.
- Returns:
A node that can be included in a pipeline to perform simple data augmentations.
- Return type:
Gunpowder SimpleAugment Node
- node(_raw_key=None, _gt_key=None, _mask_key=None)
Get a gp.SimpleAugment node.
- Parameters:
_raw_key ([type], optional) – Specific key for raw data, not used in this implementation. Defaults to None.
_gt_key ([type], optional) – Specific key for ground truth data, not used in this implementation. Defaults to None.
_mask_key ([type], optional) – Specific key for mask data, not used in this implementation. Defaults to None.
- Returns:
Simple augmentation node which can be incorporated in the pipeline.
- Return type:
gunpowder.SimpleAugment
- class dacapo.experiments.trainers.gp_augments.GammaAugmentConfig
This class manages the configuration of gamma augmentation for a given dataset.
- gamma_range
A tuple of float values represents the min and max range of gamma noise
- to apply on the raw data.
- node()
Constructs a node in the augmentation pipeline.
- gamma_range: Tuple[float, float]
- node(raw_key: gunpowder.ArrayKey, _gt_key=None, _mask_key=None)
Constructs a node in the augmentation pipeline.
- Parameters:
raw_key (gp.ArrayKey) – Key to an Array (volume) in the pipeline
_gt_key (gp.ArrayKey, optional) – Ground Truth key, not used in this function. Defaults to None.
_mask_key (gp.ArrayKey, optional) – Mask Key, not used in this function. Defaults to None.
- Returns:
The augmentation method to be applied on the source data.
- Return type:
GammaAugment instance
- class dacapo.experiments.trainers.gp_augments.IntensityAugmentConfig
Base class for gunpowder augment configurations. Each subclass of a Augment should have a corresponding config class derived from AugmentConfig.
- scale: Tuple[float, float]
- shift: Tuple[float, float]
- clip: bool
- node(raw_key: gunpowder.ArrayKey, _gt_key=None, _mask_key=None)
return a gunpowder node that performs this augmentation
- class dacapo.experiments.trainers.gp_augments.IntensityScaleShiftAugmentConfig
Base class for gunpowder augment configurations. Each subclass of a Augment should have a corresponding config class derived from AugmentConfig.
- scale: float
- shift: float
- node(raw_key: gunpowder.ArrayKey, _gt_key=None, _mask_key=None)
return a gunpowder node that performs this augmentation