Class AggregateAnnotations<S extends AnnotatorStrategy>
Object
- Type Parameters:
S
- the type ofAnnotatorStrategy
used for annotation
public class AggregateAnnotations<S extends AnnotatorStrategy>
extends Task<AnnotationWithStrategy<S>,AggregateSharedState>
Aggregates many per-image annotations together in form of a CSV file.
The following outputs are produced:
Output Name | Default? | Description |
---|---|---|
"aggregated" | yes | a CSV file with each image and corresponding image-label. |
outputs from Task |
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterAllJobsAreExecuted
(AggregateSharedState sharedState, InputOutputContext context) Called once after all calls toTask.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
.AggregateSharedState
beforeAnyJobIsExecuted
(Outputter outputter, ConcurrencyPlan concurrencyPlan, List<AnnotationWithStrategy<S>> inputs, ParametersExperiment parameters) Called once before all calls toTask.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
.If specified, default rules for determine which outputs are enabled or not.void
doJobOnInput
(InputBound<AnnotationWithStrategy<S>, AggregateSharedState> input) Performs the task on a particular input.boolean
Is the execution-time of the task per-input expected to be very quick to execute?Highest class(es) that will function as a valid input.Methods inherited from class org.anchoranalysis.experiment.bean.task.Task
executeJob, isInputCompatibleWith
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
AggregateAnnotations
public AggregateAnnotations()
-
-
Method Details
-
beforeAnyJobIsExecuted
public AggregateSharedState beforeAnyJobIsExecuted(Outputter outputter, ConcurrencyPlan concurrencyPlan, List<AnnotationWithStrategy<S>> inputs, ParametersExperiment parameters) throws ExperimentExecutionException Description copied from class:Task
Called once before all calls toTask.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
.- Specified by:
beforeAnyJobIsExecuted
in classTask<AnnotationWithStrategy<S extends AnnotatorStrategy>,
AggregateSharedState> - Parameters:
outputter
- the output-manager for the experiment (not for an individual job)concurrencyPlan
- available numbers of processors that can callTask.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
inputs
- a list of inputs, each will result in at least one call toTask.executeJob(ParametersUnbound)
.parameters
- the experiment-parameters.- Returns:
- the shared-state that is passed to each call to
Task.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
and toTask.afterAllJobsAreExecuted(S, org.anchoranalysis.io.output.outputter.InputOutputContext)
. - Throws:
ExperimentExecutionException
- if a fatal error occurs executing this step of the experiment.
-
doJobOnInput
public void doJobOnInput(InputBound<AnnotationWithStrategy<S>, AggregateSharedState> input) throws JobExecutionExceptionDescription copied from class:Task
Performs the task on a particular input.- Specified by:
doJobOnInput
in classTask<AnnotationWithStrategy<S extends AnnotatorStrategy>,
AggregateSharedState> - Parameters:
input
- the input for the job.- Throws:
JobExecutionException
- if an error occurs executing a particular job, that is not otherwise suppressed.
-
hasVeryQuickPerInputExecution
public boolean hasVeryQuickPerInputExecution()Description copied from class:Task
Is the execution-time of the task per-input expected to be very quick to execute?- Specified by:
hasVeryQuickPerInputExecution
in classTask<AnnotationWithStrategy<S extends AnnotatorStrategy>,
AggregateSharedState> - Returns:
- true iff the execution is expected to be very quick, false otherwise.
-
inputTypesExpected
Description copied from class:Task
Highest class(es) that will function as a valid input.This is usually the class of T (or sometimes the absolute base class InputFromManager).
- Specified by:
inputTypesExpected
in classTask<AnnotationWithStrategy<S extends AnnotatorStrategy>,
AggregateSharedState> - Returns:
- the input-types that a task expects.
-
defaultOutputs
Description copied from class:Task
If specified, default rules for determine which outputs are enabled or not.- Overrides:
defaultOutputs
in classTask<AnnotationWithStrategy<S extends AnnotatorStrategy>,
AggregateSharedState> - Returns:
- the default rules if they exist.
-