dacapo.experiments.tasks.post_processors.dummy_post_processor
Classes
Dummy post-processor that stores some dummy data. The dummy data is a 10x10x10 |
Module Contents
- class dacapo.experiments.tasks.post_processors.dummy_post_processor.DummyPostProcessor(detection_threshold: float)
Dummy post-processor that stores some dummy data. The dummy data is a 10x10x10 array filled with the value of the min_size parameter. The min_size parameter is specified in the parameters of the post-processor. The post-processor has a detection threshold that is used to determine if an object is detected.
- detection_threshold
The detection threshold.
- enumerate_parameters()
Enumerate all possible parameters of this post-processor.
- set_prediction()
Set the prediction array identifier.
- process()
Convert predictions into the final output.
Note
This class is abstract. Subclasses must implement the abstract methods. Once created, the values of its attributes cannot be changed.
- detection_threshold
- enumerate_parameters() Iterable[dacapo.experiments.tasks.post_processors.dummy_post_processor_parameters.DummyPostProcessorParameters]
Enumerate all possible parameters of this post-processor. Should return instances of
PostProcessorParameters.- Returns:
An iterable of PostProcessorParameters instances.
- Raises:
NotImplementedError – If the method is not implemented in the subclass.
Examples
>>> post_processor = DummyPostProcessor() >>> for parameters in post_processor.enumerate_parameters(): ... print(parameters) DummyPostProcessorParameters(id=0, min_size=1) DummyPostProcessorParameters(id=1, min_size=2) DummyPostProcessorParameters(id=2, min_size=3) DummyPostProcessorParameters(id=3, min_size=4) DummyPostProcessorParameters(id=4, min_size=5) DummyPostProcessorParameters(id=5, min_size=6) DummyPostProcessorParameters(id=6, min_size=7) DummyPostProcessorParameters(id=7, min_size=8) DummyPostProcessorParameters(id=8, min_size=9) DummyPostProcessorParameters(id=9, min_size=10)
Note
This method must be implemented in the subclass. It should return an iterable of PostProcessorParameters instances.
- set_prediction(prediction_array_identifier)
Set the prediction array identifier.
- Parameters:
prediction_array_identifier – The identifier of the array containing the model’s prediction.
- Raises:
NotImplementedError – If the method is not implemented in the subclass.
Examples
>>> post_processor = DummyPostProcessor() >>> post_processor.set_prediction("prediction")
Note
This method must be implemented in the subclass. It should set the prediction_array_identifier attribute.
- process(parameters, output_array_identifier, *args, **kwargs)
Convert predictions into the final output.
- Parameters:
parameters – The parameters of the post-processor.
output_array_identifier – The identifier of the output array.
num_workers – The number of workers to use.
chunk_size – The size of the chunks to process.
- Returns:
The output array.
- Raises:
NotImplementedError – If the method is not implemented in the subclass.
Examples
>>> post_processor = DummyPostProcessor() >>> post_processor.process(parameters, "output")
Note
This method must be implemented in the subclass. It should process the predictions and store the output in the output array.