dacapo.experiments.tasks
Subpackages
dacapo.experiments.tasks.evaluatorsdacapo.experiments.tasks.evaluators.binary_segmentation_evaluation_scoresdacapo.experiments.tasks.evaluators.binary_segmentation_evaluatordacapo.experiments.tasks.evaluators.dummy_evaluation_scoresdacapo.experiments.tasks.evaluators.dummy_evaluatordacapo.experiments.tasks.evaluators.evaluation_scoresdacapo.experiments.tasks.evaluators.evaluatordacapo.experiments.tasks.evaluators.instance_evaluation_scoresdacapo.experiments.tasks.evaluators.instance_evaluator
dacapo.experiments.tasks.lossesdacapo.experiments.tasks.post_processorsdacapo.experiments.tasks.post_processors.argmax_post_processordacapo.experiments.tasks.post_processors.argmax_post_processor_parametersdacapo.experiments.tasks.post_processors.dummy_post_processordacapo.experiments.tasks.post_processors.dummy_post_processor_parametersdacapo.experiments.tasks.post_processors.post_processordacapo.experiments.tasks.post_processors.post_processor_parametersdacapo.experiments.tasks.post_processors.threshold_post_processordacapo.experiments.tasks.post_processors.threshold_post_processor_parametersdacapo.experiments.tasks.post_processors.watershed_post_processordacapo.experiments.tasks.post_processors.watershed_post_processor_parameters
dacapo.experiments.tasks.predictorsdacapo.experiments.tasks.predictors.affinities_predictordacapo.experiments.tasks.predictors.distance_predictordacapo.experiments.tasks.predictors.dummy_predictordacapo.experiments.tasks.predictors.hot_distance_predictordacapo.experiments.tasks.predictors.inner_distance_predictordacapo.experiments.tasks.predictors.one_hot_predictordacapo.experiments.tasks.predictors.predictor
Submodules
dacapo.experiments.tasks.affinities_taskdacapo.experiments.tasks.affinities_task_configdacapo.experiments.tasks.distance_taskdacapo.experiments.tasks.distance_task_configdacapo.experiments.tasks.dummy_taskdacapo.experiments.tasks.dummy_task_configdacapo.experiments.tasks.hot_distance_taskdacapo.experiments.tasks.hot_distance_task_configdacapo.experiments.tasks.inner_distance_taskdacapo.experiments.tasks.inner_distance_task_configdacapo.experiments.tasks.one_hot_taskdacapo.experiments.tasks.one_hot_task_configdacapo.experiments.tasks.pretrained_taskdacapo.experiments.tasks.pretrained_task_configdacapo.experiments.tasks.taskdacapo.experiments.tasks.task_config
Package Contents
Classes
Helper class that provides a standard way to create an ABC using |
|
Base class for task configurations. Each subclass of a Task should |
|
A class for creating a dummy task configuration object. |
|
A dummy task class that initializes all components (predictor, loss, |
|
This is a Distance task config used for generating and |
|
DistanceTask is a subclass of Task for handling tasks associated |
|
Class that derives from the TaskConfig to perform one hot prediction tasks. |
|
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
|
This is a Affinities task config used for generating and |
|
This is a task for generating voxel affinities. |
|
This is a Distance task config used for generating and |
|
This class extends the Task class for creating tasks related to computing inner distances. |
|
Class for generating TaskConfigs for the HotDistanceTask, which predicts one hot encodings of classes, as well as signed distance transforms of those classes. |
|
A class to represent a hot distance task that use binary prediction and distance prediction. |
- class dacapo.experiments.tasks.Task
Helper class that provides a standard way to create an ABC using inheritance.
- property parameters: Iterable[dacapo.experiments.tasks.post_processors.PostProcessorParameters]
- property evaluation_scores: dacapo.experiments.tasks.evaluators.EvaluationScores
- post_processor: dacapo.experiments.tasks.post_processors.PostProcessor
- create_model(architecture)
- class dacapo.experiments.tasks.TaskConfig
Base class for task configurations. Each subclass of a Task should have a corresponding config class derived from TaskConfig.
- name: str
- verify() Tuple[bool, str]
Check whether this is a valid Task
- class dacapo.experiments.tasks.DummyTaskConfig
A class for creating a dummy task configuration object.
This class extends the TaskConfig class and initializes dummy task configuration with default attributes. It is mainly used for testing aspects of the application without the need of creating real task configurations.
- task_type
The type of task. Here, set to DummyTask.
- Type:
cls
- embedding_dims
A dummy attribute represented as an integer.
- Type:
int
- detection_threshold
Another dummy attribute represented as a float.
- Type:
float
- task_type
- embedding_dims: int
- detection_threshold: float
- verify() Tuple[bool, str]
A method to verify the dummy task configuration.
Whenever called, this method always returns False and a statement showing that the DummyTaskConfig object is never valid.
- Returns:
A tuple containing a boolean status and a string message.
- Return type:
tuple
- class dacapo.experiments.tasks.DummyTask(task_config)
A dummy task class that initializes all components (predictor, loss, post-processing, and evaluator) for the dummy task. Primarily used for testing purposes. Inherits from the Task class.
- predictor
Instance of DummyPredictor class.
- Type:
Object
- loss
Instance of DummyLoss class.
- Type:
Object
- post_processor
Instance of DummyPostProcessor class.
- Type:
Object
- evaluator
Instance of DummyEvaluator class.
- Type:
Object
- class dacapo.experiments.tasks.DistanceTaskConfig
This is a Distance task config used for generating and evaluating signed distance transforms as a way of generating segmentations.
The advantage of generating distance transforms over regular affinities is you can get a denser signal, i.e. 1 misclassified pixel in an affinity prediction could merge 2 otherwise very distinct objects, this cannot happen with distances.
- task_type
- channels: List[str]
- clip_distance: float
- tol_distance: float
- scale_factor: float
- mask_distances: bool
- clipmin: float
- clipmax: float
- class dacapo.experiments.tasks.DistanceTask(task_config)
DistanceTask is a subclass of Task for handling tasks associated with Distance.
DistanceTask uses DistancePredictor for prediction, MSELoss for computing loss, ThresholdPostProcessor for post-processing the prediction, and BinarySegmentationEvaluator for evaluating the prediction.
- predictor
DistancePredictor object
- loss
MSELoss object
- post_processor
ThresholdPostProcessor object
- evaluator
BinarySegmentationEvaluator object
- class dacapo.experiments.tasks.OneHotTaskConfig
Class that derives from the TaskConfig to perform one hot prediction tasks.
- task_type
the type of task, in this case, OneHotTask.
- classes
a List of classes which starts from id 0.
- None()
Note
The class of each voxel is simply the argmax over the vector of output probabilities.
- task_type
- classes: List[str]
- class dacapo.experiments.tasks.OneHotTask(task_config)
Helper class that provides a standard way to create an ABC using inheritance.
- class dacapo.experiments.tasks.PretrainedTaskConfig
- task_type
- sub_task_config: dacapo.experiments.tasks.task_config.TaskConfig
- weights: pathlib.Path
- class dacapo.experiments.tasks.PretrainedTask(task_config)
Helper class that provides a standard way to create an ABC using inheritance.
- create_model(architecture)
- class dacapo.experiments.tasks.AffinitiesTaskConfig
This is a Affinities task config used for generating and evaluating voxel affinities for instance segmentations.
- task_type
- neighborhood: List[funlib.geometry.Coordinate]
- lsds: bool
- lsds_to_affs_weight_ratio: float
- affs_weight_clipmin: float
- affs_weight_clipmax: float
- lsd_weight_clipmin: float
- lsd_weight_clipmax: float
- background_as_object: bool
- class dacapo.experiments.tasks.AffinitiesTask(task_config)
This is a task for generating voxel affinities.
- class dacapo.experiments.tasks.InnerDistanceTaskConfig
This is a Distance task config used for generating and evaluating signed distance transforms as a way of generating segmentations.
The advantage of generating distance transforms over regular affinities is you can get a denser signal, i.e. 1 misclassified pixel in an affinity prediction could merge 2 otherwise very distinct objects, this cannot happen with distances.
- task_type
- channels: List[str]
- clip_distance: float
- tol_distance: float
- scale_factor: float
- class dacapo.experiments.tasks.InnerDistanceTask(task_config)
This class extends the Task class for creating tasks related to computing inner distances. It provides methods for prediction, loss calculation and post-processing. It includes Binary Segmentation Evaluator for evaluation.
- task_config
The configuration for the task.
- predictor
Used for predicting the inner distances.
- loss
Used for calculating the mean square error loss.
- post_processor
Used for applying threshold post-processing.
- evaluator
Used for evaluating the results using binary segmentation.
- class dacapo.experiments.tasks.HotDistanceTaskConfig
Class for generating TaskConfigs for the HotDistanceTask, which predicts one hot encodings of classes, as well as signed distance transforms of those classes.
- task_type
A reference to the Hot Distance Task class.
- channels
A list of channel names.
- Type:
List[str]
- clip_distance
Maximum distance to consider for false positive/negatives.
- Type:
float
- tol_distance
Tolerance distance for counting false positives/negatives.
- Type:
float
- scale_factor
The amount by which to scale distances before applying a tanh normalization. Defaults to 1.
- Type:
float
- mask_distances
Whether or not to mask out regions where the true distance to object boundary cannot be known. Defaults to False
- Type:
bool
Note
Generating distance transforms over regular affinities provides you with a denser signal, i.e., one misclassified pixel in an affinity prediction can merge 2 otherwise very distinct objects, a situation that cannot happen with distances.
- task_type
- channels: List[str]
- clip_distance: float
- tol_distance: float
- scale_factor: float
- mask_distances: bool
- class dacapo.experiments.tasks.HotDistanceTask(task_config)
A class to represent a hot distance task that use binary prediction and distance prediction.
Inherits from Task class.
- predictor
HotDistancePredictor object.
- loss
HotDistanceLoss object.
- post_processor
ThresholdPostProcessor object.
- evaluator
BinarySegmentationEvaluator object.